aclocal.m4 revision af9a7ee5
1af9a7ee5Smrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*- 2af9a7ee5Smrg 3af9a7ee5Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4caade7ccSmrg 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 14af9a7ee5Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16485f0483Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17e8a5466aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18e8a5466aSmrg[m4_warning([this file was generated for autoconf 2.68. 19485f0483SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20485f0483SmrgIf you have problems, you may need to regenerate the build system entirely. 21af9a7ee5SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22caade7ccSmrg 23af9a7ee5Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24caade7ccSmrg# 25caade7ccSmrg# This file is free software; the Free Software Foundation 26caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 27caade7ccSmrg# with or without modifications, as long as this notice is preserved. 28caade7ccSmrg 29caade7ccSmrg# AM_AUTOMAKE_VERSION(VERSION) 30caade7ccSmrg# ---------------------------- 31caade7ccSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32caade7ccSmrg# generated from the m4 files accompanying Automake X.Y. 33caade7ccSmrg# (This private macro should not be called outside this file.) 34caade7ccSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35af9a7ee5Smrg[am__api_version='1.13' 36caade7ccSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37caade7ccSmrgdnl require some minimum version. Point them to the right macro. 38af9a7ee5Smrgm4_if([$1], [1.13.2], [], 39caade7ccSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40caade7ccSmrg]) 41caade7ccSmrg 42caade7ccSmrg# _AM_AUTOCONF_VERSION(VERSION) 43caade7ccSmrg# ----------------------------- 44caade7ccSmrg# aclocal traces this macro to find the Autoconf version. 45caade7ccSmrg# This is a private macro too. Using m4_define simplifies 46caade7ccSmrg# the logic in aclocal, which can simply ignore this definition. 47caade7ccSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48caade7ccSmrg 49caade7ccSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50caade7ccSmrg# ------------------------------- 51caade7ccSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52485f0483Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53caade7ccSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54af9a7ee5Smrg[AM_AUTOMAKE_VERSION([1.13.2])dnl 55485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56485f0483Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57485f0483Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58caade7ccSmrg 59caade7ccSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60caade7ccSmrg 61af9a7ee5Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62caade7ccSmrg# 63caade7ccSmrg# This file is free software; the Free Software Foundation 64caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 65caade7ccSmrg# with or without modifications, as long as this notice is preserved. 66caade7ccSmrg 67caade7ccSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68af9a7ee5Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69af9a7ee5Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70caade7ccSmrg# 71caade7ccSmrg# Of course, Automake must honor this variable whenever it calls a 72caade7ccSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73caade7ccSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74caade7ccSmrg# depending on how configure is run. This is pretty annoying, since 75caade7ccSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76caade7ccSmrg# source directory, any form will work fine, but in subdirectories a 77caade7ccSmrg# relative path needs to be adjusted first. 78caade7ccSmrg# 79caade7ccSmrg# $ac_aux_dir/missing 80caade7ccSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81caade7ccSmrg# $top_srcdir/$ac_aux_dir/missing 82caade7ccSmrg# fails if $ac_aux_dir is absolute, 83caade7ccSmrg# fails when called from a subdirectory in a VPATH build with 84caade7ccSmrg# a relative $ac_aux_dir 85caade7ccSmrg# 86caade7ccSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87caade7ccSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88af9a7ee5Smrg# harmless because $srcdir is '.', but things will broke when you 89caade7ccSmrg# start a VPATH build or use an absolute $srcdir. 90caade7ccSmrg# 91caade7ccSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92caade7ccSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93caade7ccSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94caade7ccSmrg# and then we would define $MISSING as 95caade7ccSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96caade7ccSmrg# This will work as long as MISSING is not called from configure, because 97caade7ccSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98caade7ccSmrg# However there are other variables, like CC, which are often used in 99caade7ccSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100caade7ccSmrg# 101caade7ccSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102caade7ccSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103caade7ccSmrg# configured tree to be moved without reconfiguration. 104caade7ccSmrg 105caade7ccSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106caade7ccSmrg[dnl Rely on autoconf to set up CDPATH properly. 107caade7ccSmrgAC_PREREQ([2.50])dnl 108caade7ccSmrg# expand $ac_aux_dir to an absolute path 109caade7ccSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 110caade7ccSmrg]) 111caade7ccSmrg 112caade7ccSmrg# AM_CONDITIONAL -*- Autoconf -*- 113caade7ccSmrg 114af9a7ee5Smrg# Copyright (C) 1997-2013 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 120caade7ccSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 121caade7ccSmrg# ------------------------------------- 122caade7ccSmrg# Define a conditional. 123caade7ccSmrgAC_DEFUN([AM_CONDITIONAL], 124af9a7ee5Smrg[AC_PREREQ([2.52])dnl 125af9a7ee5Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 126af9a7ee5Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 127caade7ccSmrgAC_SUBST([$1_TRUE])dnl 128caade7ccSmrgAC_SUBST([$1_FALSE])dnl 129caade7ccSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 130caade7ccSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 131485f0483Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 132caade7ccSmrgif $2; then 133caade7ccSmrg $1_TRUE= 134caade7ccSmrg $1_FALSE='#' 135caade7ccSmrgelse 136caade7ccSmrg $1_TRUE='#' 137caade7ccSmrg $1_FALSE= 138caade7ccSmrgfi 139caade7ccSmrgAC_CONFIG_COMMANDS_PRE( 140caade7ccSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 141caade7ccSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 142caade7ccSmrgUsually this means the macro was only invoked conditionally.]]) 143caade7ccSmrgfi])]) 144caade7ccSmrg 145af9a7ee5Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 146caade7ccSmrg# 147caade7ccSmrg# This file is free software; the Free Software Foundation 148caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 149caade7ccSmrg# with or without modifications, as long as this notice is preserved. 150caade7ccSmrg 151caade7ccSmrg 152af9a7ee5Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 153caade7ccSmrg# written in clear, in which case automake, when reading aclocal.m4, 154caade7ccSmrg# will think it sees a *use*, and therefore will trigger all it's 155caade7ccSmrg# C support machinery. Also note that it means that autoscan, seeing 156caade7ccSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157caade7ccSmrg 158caade7ccSmrg 159caade7ccSmrg# _AM_DEPENDENCIES(NAME) 160caade7ccSmrg# ---------------------- 161caade7ccSmrg# See how the compiler implements dependency checking. 162af9a7ee5Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 163caade7ccSmrg# We try a few techniques and use that to set a single cache variable. 164caade7ccSmrg# 165caade7ccSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 166caade7ccSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 167caade7ccSmrg# dependency, and given that the user is not expected to run this macro, 168caade7ccSmrg# just rely on AC_PROG_CC. 169caade7ccSmrgAC_DEFUN([_AM_DEPENDENCIES], 170caade7ccSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 171caade7ccSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 172caade7ccSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 173caade7ccSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174caade7ccSmrg 175af9a7ee5Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 176af9a7ee5Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 177af9a7ee5Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 178af9a7ee5Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 179af9a7ee5Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 180af9a7ee5Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 181af9a7ee5Smrg [depcc="$$1" am_compiler_list=]) 182caade7ccSmrg 183caade7ccSmrgAC_CACHE_CHECK([dependency style of $depcc], 184caade7ccSmrg [am_cv_$1_dependencies_compiler_type], 185caade7ccSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 186caade7ccSmrg # We make a subdir and do the tests there. Otherwise we can end up 187caade7ccSmrg # making bogus files that we don't know about and never remove. For 188caade7ccSmrg # instance it was reported that on HP-UX the gcc test will end up 189af9a7ee5Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 190af9a7ee5Smrg # in D". 191af9a7ee5Smrg rm -rf conftest.dir 192caade7ccSmrg mkdir conftest.dir 193caade7ccSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 194caade7ccSmrg # using a relative directory. 195caade7ccSmrg cp "$am_depcomp" conftest.dir 196caade7ccSmrg cd conftest.dir 197caade7ccSmrg # We will build objects and dependencies in a subdirectory because 198caade7ccSmrg # it helps to detect inapplicable dependency modes. For instance 199caade7ccSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 200caade7ccSmrg # side effect of compilation, but ICC will put the dependencies in 201caade7ccSmrg # the current directory while Tru64 will put them in the object 202caade7ccSmrg # directory. 203caade7ccSmrg mkdir sub 204caade7ccSmrg 205caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 206caade7ccSmrg if test "$am_compiler_list" = ""; then 207caade7ccSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208caade7ccSmrg fi 209485f0483Smrg am__universal=false 210485f0483Smrg m4_case([$1], [CC], 211485f0483Smrg [case " $depcc " in #( 212485f0483Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 213485f0483Smrg esac], 214485f0483Smrg [CXX], 215485f0483Smrg [case " $depcc " in #( 216485f0483Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 217485f0483Smrg esac]) 218485f0483Smrg 219caade7ccSmrg for depmode in $am_compiler_list; do 220caade7ccSmrg # Setup a source with many dependencies, because some compilers 221caade7ccSmrg # like to wrap large dependency lists on column 80 (with \), and 222caade7ccSmrg # we should not choose a depcomp mode which is confused by this. 223caade7ccSmrg # 224caade7ccSmrg # We need to recreate these files for each test, as the compiler may 225caade7ccSmrg # overwrite some of them when testing with obscure command lines. 226caade7ccSmrg # This happens at least with the AIX C compiler. 227caade7ccSmrg : > sub/conftest.c 228caade7ccSmrg for i in 1 2 3 4 5 6; do 229caade7ccSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 230af9a7ee5Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 231af9a7ee5Smrg # Solaris 10 /bin/sh. 232af9a7ee5Smrg echo '/* dummy */' > sub/conftst$i.h 233caade7ccSmrg done 234caade7ccSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235caade7ccSmrg 236af9a7ee5Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 237485f0483Smrg # mode. It turns out that the SunPro C++ compiler does not properly 238af9a7ee5Smrg # handle '-M -o', and we need to detect this. Also, some Intel 239af9a7ee5Smrg # versions had trouble with output in subdirs. 240485f0483Smrg am__obj=sub/conftest.${OBJEXT-o} 241485f0483Smrg am__minus_obj="-o $am__obj" 242caade7ccSmrg case $depmode in 243485f0483Smrg gcc) 244485f0483Smrg # This depmode causes a compiler race in universal mode. 245485f0483Smrg test "$am__universal" = false || continue 246485f0483Smrg ;; 247caade7ccSmrg nosideeffect) 248af9a7ee5Smrg # After this tag, mechanisms are not by side-effect, so they'll 249af9a7ee5Smrg # only be used when explicitly requested. 250caade7ccSmrg if test "x$enable_dependency_tracking" = xyes; then 251caade7ccSmrg continue 252caade7ccSmrg else 253caade7ccSmrg break 254caade7ccSmrg fi 255caade7ccSmrg ;; 256af9a7ee5Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 257af9a7ee5Smrg # This compiler won't grok '-c -o', but also, the minuso test has 258485f0483Smrg # not run yet. These depmodes are late enough in the game, and 259485f0483Smrg # so weak that their functioning should not be impacted. 260485f0483Smrg am__obj=conftest.${OBJEXT-o} 261485f0483Smrg am__minus_obj= 262485f0483Smrg ;; 263caade7ccSmrg none) break ;; 264caade7ccSmrg esac 265caade7ccSmrg if depmode=$depmode \ 266485f0483Smrg source=sub/conftest.c object=$am__obj \ 267caade7ccSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 268485f0483Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 269caade7ccSmrg >/dev/null 2>conftest.err && 270caade7ccSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 271caade7ccSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 272485f0483Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 273caade7ccSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 274caade7ccSmrg # icc doesn't choke on unknown options, it will just issue warnings 275caade7ccSmrg # or remarks (even with -Werror). So we grep stderr for any message 276caade7ccSmrg # that says an option was ignored or not supported. 277caade7ccSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 278caade7ccSmrg # icc: Command line warning: ignoring option '-M'; no argument required 279caade7ccSmrg # The diagnosis changed in icc 8.0: 280caade7ccSmrg # icc: Command line remark: option '-MP' not supported 281caade7ccSmrg if (grep 'ignoring option' conftest.err || 282caade7ccSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 283caade7ccSmrg am_cv_$1_dependencies_compiler_type=$depmode 284caade7ccSmrg break 285caade7ccSmrg fi 286caade7ccSmrg fi 287caade7ccSmrg done 288caade7ccSmrg 289caade7ccSmrg cd .. 290caade7ccSmrg rm -rf conftest.dir 291caade7ccSmrgelse 292caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 293caade7ccSmrgfi 294caade7ccSmrg]) 295caade7ccSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 296caade7ccSmrgAM_CONDITIONAL([am__fastdep$1], [ 297caade7ccSmrg test "x$enable_dependency_tracking" != xno \ 298caade7ccSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 299caade7ccSmrg]) 300caade7ccSmrg 301caade7ccSmrg 302caade7ccSmrg# AM_SET_DEPDIR 303caade7ccSmrg# ------------- 304caade7ccSmrg# Choose a directory name for dependency files. 305af9a7ee5Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 306caade7ccSmrgAC_DEFUN([AM_SET_DEPDIR], 307caade7ccSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 308caade7ccSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309caade7ccSmrg]) 310caade7ccSmrg 311caade7ccSmrg 312caade7ccSmrg# AM_DEP_TRACK 313caade7ccSmrg# ------------ 314caade7ccSmrgAC_DEFUN([AM_DEP_TRACK], 315af9a7ee5Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 316af9a7ee5SmrgAS_HELP_STRING( 317af9a7ee5Smrg [--enable-dependency-tracking], 318af9a7ee5Smrg [do not reject slow dependency extractors]) 319af9a7ee5SmrgAS_HELP_STRING( 320af9a7ee5Smrg [--disable-dependency-tracking], 321af9a7ee5Smrg [speeds up one-time build])]) 322caade7ccSmrgif test "x$enable_dependency_tracking" != xno; then 323caade7ccSmrg am_depcomp="$ac_aux_dir/depcomp" 324caade7ccSmrg AMDEPBACKSLASH='\' 325af9a7ee5Smrg am__nodep='_no' 326caade7ccSmrgfi 327caade7ccSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 328caade7ccSmrgAC_SUBST([AMDEPBACKSLASH])dnl 329caade7ccSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 330af9a7ee5SmrgAC_SUBST([am__nodep])dnl 331af9a7ee5Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 332caade7ccSmrg]) 333caade7ccSmrg 334caade7ccSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335caade7ccSmrg 336af9a7ee5Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 337caade7ccSmrg# 338caade7ccSmrg# This file is free software; the Free Software Foundation 339caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 340caade7ccSmrg# with or without modifications, as long as this notice is preserved. 341caade7ccSmrg 342caade7ccSmrg 343caade7ccSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344caade7ccSmrg# ------------------------------ 345caade7ccSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 346485f0483Smrg[{ 347af9a7ee5Smrg # Older Autoconf quotes --file arguments for eval, but not when files 348485f0483Smrg # are listed without --file. Let's play safe and only enable the eval 349485f0483Smrg # if we detect the quoting. 350485f0483Smrg case $CONFIG_FILES in 351485f0483Smrg *\'*) eval set x "$CONFIG_FILES" ;; 352485f0483Smrg *) set x $CONFIG_FILES ;; 353485f0483Smrg esac 354485f0483Smrg shift 355485f0483Smrg for mf 356485f0483Smrg do 357485f0483Smrg # Strip MF so we end up with the name of the file. 358485f0483Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 359485f0483Smrg # Check whether this is an Automake generated Makefile or not. 360af9a7ee5Smrg # We used to match only the files named 'Makefile.in', but 361485f0483Smrg # some people rename them; so instead we look at the file content. 362485f0483Smrg # Grep'ing the first line is not enough: some people post-process 363485f0483Smrg # each Makefile.in and add a new line on top of each file to say so. 364485f0483Smrg # Grep'ing the whole file is not good either: AIX grep has a line 365485f0483Smrg # limit of 2048, but all sed's we know have understand at least 4000. 366485f0483Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 367485f0483Smrg dirpart=`AS_DIRNAME("$mf")` 368485f0483Smrg else 369485f0483Smrg continue 370485f0483Smrg fi 371485f0483Smrg # Extract the definition of DEPDIR, am__include, and am__quote 372af9a7ee5Smrg # from the Makefile without running 'make'. 373485f0483Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 374485f0483Smrg test -z "$DEPDIR" && continue 375485f0483Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 376af9a7ee5Smrg test -z "$am__include" && continue 377485f0483Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 378485f0483Smrg # Find all dependency output files, they are included files with 379485f0483Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 380485f0483Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 381485f0483Smrg # expansion. 382485f0483Smrg for file in `sed -n " 383485f0483Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 384af9a7ee5Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 385485f0483Smrg # Make sure the directory exists. 386485f0483Smrg test -f "$dirpart/$file" && continue 387485f0483Smrg fdir=`AS_DIRNAME(["$file"])` 388485f0483Smrg AS_MKDIR_P([$dirpart/$fdir]) 389485f0483Smrg # echo "creating $dirpart/$file" 390485f0483Smrg echo '# dummy' > "$dirpart/$file" 391485f0483Smrg done 392caade7ccSmrg done 393485f0483Smrg} 394caade7ccSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395caade7ccSmrg 396caade7ccSmrg 397caade7ccSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 398caade7ccSmrg# ----------------------------- 399caade7ccSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 400caade7ccSmrg# 401caade7ccSmrg# This code is only required when automatic dependency tracking 402af9a7ee5Smrg# is enabled. FIXME. This creates each '.P' file that we will 403caade7ccSmrg# need in order to bootstrap the dependency handling code. 404caade7ccSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 405caade7ccSmrg[AC_CONFIG_COMMANDS([depfiles], 406caade7ccSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 407caade7ccSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408caade7ccSmrg]) 409caade7ccSmrg 410caade7ccSmrg# Do all the work for Automake. -*- Autoconf -*- 411caade7ccSmrg 412af9a7ee5Smrg# Copyright (C) 1996-2013 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 418caade7ccSmrg# This macro actually does too much. Some checks are only needed if 419caade7ccSmrg# your package does certain things. But this isn't really a big deal. 420caade7ccSmrg 421caade7ccSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 422caade7ccSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 423caade7ccSmrg# ----------------------------------------------- 424caade7ccSmrg# The call with PACKAGE and VERSION arguments is the old style 425caade7ccSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 426caade7ccSmrg# and VERSION should now be passed to AC_INIT and removed from 427caade7ccSmrg# the call to AM_INIT_AUTOMAKE. 428caade7ccSmrg# We support both call styles for the transition. After 429caade7ccSmrg# the next Automake release, Autoconf can make the AC_INIT 430caade7ccSmrg# arguments mandatory, and then we can depend on a new Autoconf 431caade7ccSmrg# release and drop the old call support. 432caade7ccSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 433af9a7ee5Smrg[AC_PREREQ([2.65])dnl 434caade7ccSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 435caade7ccSmrgdnl the ones we care about. 436caade7ccSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 437caade7ccSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 438caade7ccSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 439caade7ccSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 440caade7ccSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 441caade7ccSmrg # is not polluted with repeated "-I." 442caade7ccSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 443caade7ccSmrg # test to see if srcdir already configured 444caade7ccSmrg if test -f $srcdir/config.status; then 445caade7ccSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 446caade7ccSmrg fi 447caade7ccSmrgfi 448caade7ccSmrg 449caade7ccSmrg# test whether we have cygpath 450caade7ccSmrgif test -z "$CYGPATH_W"; then 451caade7ccSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 452caade7ccSmrg CYGPATH_W='cygpath -w' 453caade7ccSmrg else 454caade7ccSmrg CYGPATH_W=echo 455caade7ccSmrg fi 456caade7ccSmrgfi 457caade7ccSmrgAC_SUBST([CYGPATH_W]) 458caade7ccSmrg 459caade7ccSmrg# Define the identity of the package. 460caade7ccSmrgdnl Distinguish between old-style and new-style calls. 461caade7ccSmrgm4_ifval([$2], 462af9a7ee5Smrg[AC_DIAGNOSE([obsolete], 463af9a7ee5Smrg [$0: two- and three-arguments forms are deprecated.]) 464af9a7ee5Smrgm4_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. 469af9a7ee5Smrgm4_if( 470af9a7ee5Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 471af9a7ee5Smrg [ok:ok],, 472caade7ccSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 473caade7ccSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 474caade7ccSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 475caade7ccSmrg 476caade7ccSmrg_AM_IF_OPTION([no-define],, 477af9a7ee5Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 478af9a7ee5Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 479caade7ccSmrg 480caade7ccSmrg# Some tools Automake needs. 481caade7ccSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 482caade7ccSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 483af9a7ee5SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 484af9a7ee5SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 485af9a7ee5SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 486af9a7ee5SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 487af9a7ee5SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 488485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 489485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 490af9a7ee5SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 491af9a7ee5Smrg# For better backward compatibility. To be removed once Automake 1.9.x 492af9a7ee5Smrg# dies out for good. For more background, see: 493af9a7ee5Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 494af9a7ee5Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 495af9a7ee5SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 496caade7ccSmrg# We need awk for the "check" target. The system "awk" is bad on 497caade7ccSmrg# some platforms. 498caade7ccSmrgAC_REQUIRE([AC_PROG_AWK])dnl 499caade7ccSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 500caade7ccSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 501caade7ccSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 502485f0483Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 503485f0483Smrg [_AM_PROG_TAR([v7])])]) 504caade7ccSmrg_AM_IF_OPTION([no-dependencies],, 505caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 506af9a7ee5Smrg [_AM_DEPENDENCIES([CC])], 507af9a7ee5Smrg [m4_define([AC_PROG_CC], 508af9a7ee5Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 509caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 510af9a7ee5Smrg [_AM_DEPENDENCIES([CXX])], 511af9a7ee5Smrg [m4_define([AC_PROG_CXX], 512af9a7ee5Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 513caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 514af9a7ee5Smrg [_AM_DEPENDENCIES([OBJC])], 515af9a7ee5Smrg [m4_define([AC_PROG_OBJC], 516af9a7ee5Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 517af9a7ee5SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 518af9a7ee5Smrg [_AM_DEPENDENCIES([OBJCXX])], 519af9a7ee5Smrg [m4_define([AC_PROG_OBJCXX], 520af9a7ee5Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 521caade7ccSmrg]) 522af9a7ee5SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 523af9a7ee5Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 524af9a7ee5Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 525af9a7ee5Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 526485f0483SmrgAC_CONFIG_COMMANDS_PRE(dnl 527485f0483Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 528485f0483Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529caade7ccSmrg]) 530caade7ccSmrg 531af9a7ee5Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 532485f0483Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 533485f0483Smrgdnl mangled by Autoconf and run in a shell conditional statement. 534485f0483Smrgm4_define([_AC_COMPILER_EXEEXT], 535485f0483Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 536485f0483Smrg 537caade7ccSmrg 538caade7ccSmrg# When config.status generates a header, we must update the stamp-h file. 539caade7ccSmrg# This file resides in the same directory as the config header 540caade7ccSmrg# that is generated. The stamp files are numbered to have different names. 541caade7ccSmrg 542caade7ccSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 543caade7ccSmrg# loop where config.status creates the headers, so we can generate 544caade7ccSmrg# our stamp files there. 545caade7ccSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 546caade7ccSmrg[# Compute $1's index in $config_headers. 547485f0483Smrg_am_arg=$1 548caade7ccSmrg_am_stamp_count=1 549caade7ccSmrgfor _am_header in $config_headers :; do 550caade7ccSmrg case $_am_header in 551485f0483Smrg $_am_arg | $_am_arg:* ) 552caade7ccSmrg break ;; 553caade7ccSmrg * ) 554caade7ccSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 555caade7ccSmrg esac 556caade7ccSmrgdone 557485f0483Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558caade7ccSmrg 559af9a7ee5Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 560caade7ccSmrg# 561caade7ccSmrg# This file is free software; the Free Software Foundation 562caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 563caade7ccSmrg# with or without modifications, as long as this notice is preserved. 564caade7ccSmrg 565caade7ccSmrg# AM_PROG_INSTALL_SH 566caade7ccSmrg# ------------------ 567caade7ccSmrg# Define $install_sh. 568caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 569caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 570485f0483Smrgif test x"${install_sh}" != xset; then 571485f0483Smrg case $am_aux_dir in 572485f0483Smrg *\ * | *\ *) 573485f0483Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 574485f0483Smrg *) 575485f0483Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 576485f0483Smrg esac 577485f0483Smrgfi 578af9a7ee5SmrgAC_SUBST([install_sh])]) 579caade7ccSmrg 580af9a7ee5Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 581caade7ccSmrg# 582caade7ccSmrg# This file is free software; the Free Software Foundation 583caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 584caade7ccSmrg# with or without modifications, as long as this notice is preserved. 585caade7ccSmrg 586caade7ccSmrg# Check whether the underlying file-system supports filenames 587caade7ccSmrg# with a leading dot. For instance MS-DOS doesn't. 588caade7ccSmrgAC_DEFUN([AM_SET_LEADING_DOT], 589caade7ccSmrg[rm -rf .tst 2>/dev/null 590caade7ccSmrgmkdir .tst 2>/dev/null 591caade7ccSmrgif test -d .tst; then 592caade7ccSmrg am__leading_dot=. 593caade7ccSmrgelse 594caade7ccSmrg am__leading_dot=_ 595caade7ccSmrgfi 596caade7ccSmrgrmdir .tst 2>/dev/null 597caade7ccSmrgAC_SUBST([am__leading_dot])]) 598caade7ccSmrg 599caade7ccSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 600caade7ccSmrg 601af9a7ee5Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 602caade7ccSmrg# 603caade7ccSmrg# This file is free software; the Free Software Foundation 604caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 605caade7ccSmrg# with or without modifications, as long as this notice is preserved. 606caade7ccSmrg 607caade7ccSmrg# AM_MAKE_INCLUDE() 608caade7ccSmrg# ----------------- 609caade7ccSmrg# Check to see how make treats includes. 610caade7ccSmrgAC_DEFUN([AM_MAKE_INCLUDE], 611caade7ccSmrg[am_make=${MAKE-make} 612caade7ccSmrgcat > confinc << 'END' 613caade7ccSmrgam__doit: 614485f0483Smrg @echo this is the am__doit target 615caade7ccSmrg.PHONY: am__doit 616caade7ccSmrgEND 617caade7ccSmrg# If we don't find an include directive, just comment out the code. 618caade7ccSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 619caade7ccSmrgam__include="#" 620caade7ccSmrgam__quote= 621caade7ccSmrg_am_result=none 622caade7ccSmrg# First try GNU make style include. 623caade7ccSmrgecho "include confinc" > confmf 624af9a7ee5Smrg# Ignore all kinds of additional output from 'make'. 625485f0483Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 626485f0483Smrg*the\ am__doit\ target*) 627485f0483Smrg am__include=include 628485f0483Smrg am__quote= 629485f0483Smrg _am_result=GNU 630485f0483Smrg ;; 631485f0483Smrgesac 632caade7ccSmrg# Now try BSD make style include. 633caade7ccSmrgif test "$am__include" = "#"; then 634caade7ccSmrg echo '.include "confinc"' > confmf 635485f0483Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 636485f0483Smrg *the\ am__doit\ target*) 637485f0483Smrg am__include=.include 638485f0483Smrg am__quote="\"" 639485f0483Smrg _am_result=BSD 640485f0483Smrg ;; 641485f0483Smrg esac 642caade7ccSmrgfi 643caade7ccSmrgAC_SUBST([am__include]) 644caade7ccSmrgAC_SUBST([am__quote]) 645caade7ccSmrgAC_MSG_RESULT([$_am_result]) 646caade7ccSmrgrm -f confinc confmf 647caade7ccSmrg]) 648caade7ccSmrg 649caade7ccSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650caade7ccSmrg 651af9a7ee5Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 652caade7ccSmrg# 653caade7ccSmrg# This file is free software; the Free Software Foundation 654caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 655caade7ccSmrg# with or without modifications, as long as this notice is preserved. 656caade7ccSmrg 657caade7ccSmrg# AM_MISSING_PROG(NAME, PROGRAM) 658caade7ccSmrg# ------------------------------ 659caade7ccSmrgAC_DEFUN([AM_MISSING_PROG], 660caade7ccSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 661caade7ccSmrg$1=${$1-"${am_missing_run}$2"} 662caade7ccSmrgAC_SUBST($1)]) 663caade7ccSmrg 664caade7ccSmrg# AM_MISSING_HAS_RUN 665caade7ccSmrg# ------------------ 666af9a7ee5Smrg# Define MISSING if not defined so far and test if it is modern enough. 667af9a7ee5Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 668caade7ccSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 669caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 670caade7ccSmrgAC_REQUIRE_AUX_FILE([missing])dnl 671485f0483Smrgif test x"${MISSING+set}" != xset; then 672485f0483Smrg case $am_aux_dir in 673485f0483Smrg *\ * | *\ *) 674485f0483Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 675485f0483Smrg *) 676485f0483Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 677485f0483Smrg esac 678485f0483Smrgfi 679caade7ccSmrg# Use eval to expand $SHELL 680af9a7ee5Smrgif eval "$MISSING --is-lightweight"; then 681af9a7ee5Smrg am_missing_run="$MISSING " 682caade7ccSmrgelse 683caade7ccSmrg am_missing_run= 684af9a7ee5Smrg AC_MSG_WARN(['missing' script is too old or missing]) 685caade7ccSmrgfi 686caade7ccSmrg]) 687caade7ccSmrg 688caade7ccSmrg# Helper functions for option handling. -*- Autoconf -*- 689caade7ccSmrg 690af9a7ee5Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 691caade7ccSmrg# 692caade7ccSmrg# This file is free software; the Free Software Foundation 693caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 694caade7ccSmrg# with or without modifications, as long as this notice is preserved. 695caade7ccSmrg 696caade7ccSmrg# _AM_MANGLE_OPTION(NAME) 697caade7ccSmrg# ----------------------- 698caade7ccSmrgAC_DEFUN([_AM_MANGLE_OPTION], 699caade7ccSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700caade7ccSmrg 701caade7ccSmrg# _AM_SET_OPTION(NAME) 702af9a7ee5Smrg# -------------------- 703caade7ccSmrg# Set option NAME. Presently that only means defining a flag for this option. 704caade7ccSmrgAC_DEFUN([_AM_SET_OPTION], 705af9a7ee5Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706caade7ccSmrg 707caade7ccSmrg# _AM_SET_OPTIONS(OPTIONS) 708af9a7ee5Smrg# ------------------------ 709caade7ccSmrg# OPTIONS is a space-separated list of Automake options. 710caade7ccSmrgAC_DEFUN([_AM_SET_OPTIONS], 711485f0483Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712caade7ccSmrg 713caade7ccSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 714caade7ccSmrg# ------------------------------------------- 715caade7ccSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 716caade7ccSmrgAC_DEFUN([_AM_IF_OPTION], 717caade7ccSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718caade7ccSmrg 719caade7ccSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 720caade7ccSmrg 721af9a7ee5Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 722caade7ccSmrg# 723caade7ccSmrg# This file is free software; the Free Software Foundation 724caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 725caade7ccSmrg# with or without modifications, as long as this notice is preserved. 726caade7ccSmrg 727caade7ccSmrg# AM_SANITY_CHECK 728caade7ccSmrg# --------------- 729caade7ccSmrgAC_DEFUN([AM_SANITY_CHECK], 730caade7ccSmrg[AC_MSG_CHECKING([whether build environment is sane]) 731485f0483Smrg# Reject unsafe characters in $srcdir or the absolute working directory 732485f0483Smrg# name. Accept space and tab only in the latter. 733485f0483Smrgam_lf=' 734485f0483Smrg' 735485f0483Smrgcase `pwd` in 736485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 737485f0483Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 738485f0483Smrgesac 739485f0483Smrgcase $srcdir in 740485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 741af9a7ee5Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 742485f0483Smrgesac 743485f0483Smrg 744af9a7ee5Smrg# Do 'set' in a subshell so we don't clobber the current shell's 745caade7ccSmrg# arguments. Must try -L first in case configure is actually a 746caade7ccSmrg# symlink; some systems play weird games with the mod time of symlinks 747caade7ccSmrg# (eg FreeBSD returns the mod time of the symlink's containing 748caade7ccSmrg# directory). 749caade7ccSmrgif ( 750af9a7ee5Smrg am_has_slept=no 751af9a7ee5Smrg for am_try in 1 2; do 752af9a7ee5Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 753af9a7ee5Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 754af9a7ee5Smrg if test "$[*]" = "X"; then 755af9a7ee5Smrg # -L didn't work. 756af9a7ee5Smrg set X `ls -t "$srcdir/configure" conftest.file` 757af9a7ee5Smrg fi 758af9a7ee5Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 759af9a7ee5Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 760af9a7ee5Smrg 761af9a7ee5Smrg # If neither matched, then we have a broken ls. This can happen 762af9a7ee5Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 763af9a7ee5Smrg # broken ls alias from the environment. This has actually 764af9a7ee5Smrg # happened. Such a system could not be considered "sane". 765af9a7ee5Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 766af9a7ee5Smrg alias in your environment]) 767af9a7ee5Smrg fi 768af9a7ee5Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 769af9a7ee5Smrg break 770af9a7ee5Smrg fi 771af9a7ee5Smrg # Just in case. 772af9a7ee5Smrg sleep 1 773af9a7ee5Smrg am_has_slept=yes 774af9a7ee5Smrg done 775caade7ccSmrg test "$[2]" = conftest.file 776caade7ccSmrg ) 777caade7ccSmrgthen 778caade7ccSmrg # Ok. 779caade7ccSmrg : 780caade7ccSmrgelse 781caade7ccSmrg AC_MSG_ERROR([newly created file is older than distributed files! 782caade7ccSmrgCheck your system clock]) 783caade7ccSmrgfi 784af9a7ee5SmrgAC_MSG_RESULT([yes]) 785af9a7ee5Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 786af9a7ee5Smrg# generated files are strictly newer. 787af9a7ee5Smrgam_sleep_pid= 788af9a7ee5Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 789af9a7ee5Smrg ( sleep 1 ) & 790af9a7ee5Smrg am_sleep_pid=$! 791af9a7ee5Smrgfi 792af9a7ee5SmrgAC_CONFIG_COMMANDS_PRE( 793af9a7ee5Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 794af9a7ee5Smrg if test -n "$am_sleep_pid"; then 795af9a7ee5Smrg # Hide warnings about reused PIDs. 796af9a7ee5Smrg wait $am_sleep_pid 2>/dev/null 797af9a7ee5Smrg fi 798af9a7ee5Smrg AC_MSG_RESULT([done])]) 799af9a7ee5Smrgrm -f conftest.file 800af9a7ee5Smrg]) 801caade7ccSmrg 802af9a7ee5Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 803485f0483Smrg# 804485f0483Smrg# This file is free software; the Free Software Foundation 805485f0483Smrg# gives unlimited permission to copy and/or distribute it, 806485f0483Smrg# with or without modifications, as long as this notice is preserved. 807485f0483Smrg 808485f0483Smrg# AM_SILENT_RULES([DEFAULT]) 809485f0483Smrg# -------------------------- 810485f0483Smrg# Enable less verbose build rules; with the default set to DEFAULT 811af9a7ee5Smrg# ("yes" being less verbose, "no" or empty being verbose). 812485f0483SmrgAC_DEFUN([AM_SILENT_RULES], 813af9a7ee5Smrg[AC_ARG_ENABLE([silent-rules], [dnl 814af9a7ee5SmrgAS_HELP_STRING( 815af9a7ee5Smrg [--enable-silent-rules], 816af9a7ee5Smrg [less verbose build output (undo: "make V=1")]) 817af9a7ee5SmrgAS_HELP_STRING( 818af9a7ee5Smrg [--disable-silent-rules], 819af9a7ee5Smrg [verbose build output (undo: "make V=0")])dnl 820af9a7ee5Smrg]) 821af9a7ee5Smrgcase $enable_silent_rules in @%:@ ((( 822af9a7ee5Smrg yes) AM_DEFAULT_VERBOSITY=0;; 823af9a7ee5Smrg no) AM_DEFAULT_VERBOSITY=1;; 824af9a7ee5Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 825485f0483Smrgesac 826af9a7ee5Smrgdnl 827af9a7ee5Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 828af9a7ee5Smrgdnl do not support nested variable expansions. 829af9a7ee5Smrgdnl See automake bug#9928 and bug#10237. 830af9a7ee5Smrgam_make=${MAKE-make} 831af9a7ee5SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 832af9a7ee5Smrg [am_cv_make_support_nested_variables], 833af9a7ee5Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 834af9a7ee5SmrgBAR0=false 835af9a7ee5SmrgBAR1=true 836af9a7ee5SmrgV=1 837af9a7ee5Smrgam__doit: 838af9a7ee5Smrg @$(TRUE) 839af9a7ee5Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 840af9a7ee5Smrg am_cv_make_support_nested_variables=yes 841af9a7ee5Smrgelse 842af9a7ee5Smrg am_cv_make_support_nested_variables=no 843af9a7ee5Smrgfi]) 844af9a7ee5Smrgif test $am_cv_make_support_nested_variables = yes; then 845af9a7ee5Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 846af9a7ee5Smrg AM_V='$(V)' 847af9a7ee5Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 848af9a7ee5Smrgelse 849af9a7ee5Smrg AM_V=$AM_DEFAULT_VERBOSITY 850af9a7ee5Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 851af9a7ee5Smrgfi 852af9a7ee5SmrgAC_SUBST([AM_V])dnl 853af9a7ee5SmrgAM_SUBST_NOTMAKE([AM_V])dnl 854af9a7ee5SmrgAC_SUBST([AM_DEFAULT_V])dnl 855af9a7ee5SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 856485f0483SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 857485f0483SmrgAM_BACKSLASH='\' 858485f0483SmrgAC_SUBST([AM_BACKSLASH])dnl 859485f0483Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 860485f0483Smrg]) 861485f0483Smrg 862af9a7ee5Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 863caade7ccSmrg# 864caade7ccSmrg# This file is free software; the Free Software Foundation 865caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 866caade7ccSmrg# with or without modifications, as long as this notice is preserved. 867caade7ccSmrg 868caade7ccSmrg# AM_PROG_INSTALL_STRIP 869caade7ccSmrg# --------------------- 870af9a7ee5Smrg# One issue with vendor 'install' (even GNU) is that you can't 871caade7ccSmrg# specify the program used to strip binaries. This is especially 872caade7ccSmrg# annoying in cross-compiling environments, where the build's strip 873caade7ccSmrg# is unlikely to handle the host's binaries. 874caade7ccSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 875af9a7ee5Smrg# always use install-sh in "make install-strip", and initialize 876caade7ccSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 877caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 878caade7ccSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 879af9a7ee5Smrg# Installed binaries are usually stripped using 'strip' when the user 880af9a7ee5Smrg# run "make install-strip". However 'strip' might not be the right 881caade7ccSmrg# tool to use in cross-compilation environments, therefore Automake 882af9a7ee5Smrg# will honor the 'STRIP' environment variable to overrule this program. 883af9a7ee5Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 884caade7ccSmrgif test "$cross_compiling" != no; then 885caade7ccSmrg AC_CHECK_TOOL([STRIP], [strip], :) 886caade7ccSmrgfi 887caade7ccSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 888caade7ccSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 889caade7ccSmrg 890af9a7ee5Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 891caade7ccSmrg# 892caade7ccSmrg# This file is free software; the Free Software Foundation 893caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 894caade7ccSmrg# with or without modifications, as long as this notice is preserved. 895caade7ccSmrg 896caade7ccSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 897caade7ccSmrg# --------------------------- 898485f0483Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 899caade7ccSmrg# This macro is traced by Automake. 900caade7ccSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 901caade7ccSmrg 902485f0483Smrg# AM_SUBST_NOTMAKE(VARIABLE) 903af9a7ee5Smrg# -------------------------- 904485f0483Smrg# Public sister of _AM_SUBST_NOTMAKE. 905485f0483SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 906485f0483Smrg 907caade7ccSmrg# Check how to create a tarball. -*- Autoconf -*- 908caade7ccSmrg 909af9a7ee5Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 910caade7ccSmrg# 911caade7ccSmrg# This file is free software; the Free Software Foundation 912caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 913caade7ccSmrg# with or without modifications, as long as this notice is preserved. 914caade7ccSmrg 915caade7ccSmrg# _AM_PROG_TAR(FORMAT) 916caade7ccSmrg# -------------------- 917caade7ccSmrg# Check how to create a tarball in format FORMAT. 918af9a7ee5Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 919caade7ccSmrg# 920caade7ccSmrg# Substitute a variable $(am__tar) that is a command 921caade7ccSmrg# writing to stdout a FORMAT-tarball containing the directory 922caade7ccSmrg# $tardir. 923caade7ccSmrg# tardir=directory && $(am__tar) > result.tar 924caade7ccSmrg# 925caade7ccSmrg# Substitute a variable $(am__untar) that extract such 926caade7ccSmrg# a tarball read from stdin. 927caade7ccSmrg# $(am__untar) < result.tar 928af9a7ee5Smrg# 929caade7ccSmrgAC_DEFUN([_AM_PROG_TAR], 930af9a7ee5Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 931af9a7ee5Smrg# in the wild :-( We should find a proper way to deprecate it ... 932af9a7ee5SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 933af9a7ee5Smrg 934af9a7ee5Smrg# We'll loop over all known methods to create a tar archive until one works. 935caade7ccSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 936caade7ccSmrg 937af9a7ee5Smrgm4_if([$1], [v7], 938af9a7ee5Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 939af9a7ee5Smrg 940af9a7ee5Smrg [m4_case([$1], 941af9a7ee5Smrg [ustar], 942af9a7ee5Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 943af9a7ee5Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 944af9a7ee5Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 945af9a7ee5Smrg # and bug#13588). 946af9a7ee5Smrg am_max_uid=2097151 # 2^21 - 1 947af9a7ee5Smrg am_max_gid=$am_max_uid 948af9a7ee5Smrg # The $UID and $GID variables are not portable, so we need to resort 949af9a7ee5Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 950af9a7ee5Smrg # below are definitely unexpected, so allow the users to see them 951af9a7ee5Smrg # (that is, avoid stderr redirection). 952af9a7ee5Smrg am_uid=`id -u || echo unknown` 953af9a7ee5Smrg am_gid=`id -g || echo unknown` 954af9a7ee5Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 955af9a7ee5Smrg if test $am_uid -le $am_max_uid; then 956af9a7ee5Smrg AC_MSG_RESULT([yes]) 957af9a7ee5Smrg else 958af9a7ee5Smrg AC_MSG_RESULT([no]) 959af9a7ee5Smrg _am_tools=none 960af9a7ee5Smrg fi 961af9a7ee5Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 962af9a7ee5Smrg if test $am_gid -le $am_max_gid; then 963af9a7ee5Smrg AC_MSG_RESULT([yes]) 964af9a7ee5Smrg else 965af9a7ee5Smrg AC_MSG_RESULT([no]) 966af9a7ee5Smrg _am_tools=none 967af9a7ee5Smrg fi], 968af9a7ee5Smrg 969af9a7ee5Smrg [pax], 970af9a7ee5Smrg [], 971caade7ccSmrg 972af9a7ee5Smrg [m4_fatal([Unknown tar format])]) 973af9a7ee5Smrg 974af9a7ee5Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 975af9a7ee5Smrg 976af9a7ee5Smrg # Go ahead even if we have the value already cached. We do so because we 977af9a7ee5Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 978af9a7ee5Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 979af9a7ee5Smrg 980af9a7ee5Smrg for _am_tool in $_am_tools; do 981af9a7ee5Smrg case $_am_tool in 982af9a7ee5Smrg gnutar) 983af9a7ee5Smrg for _am_tar in tar gnutar gtar; do 984af9a7ee5Smrg AM_RUN_LOG([$_am_tar --version]) && break 985af9a7ee5Smrg done 986af9a7ee5Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 987af9a7ee5Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 988af9a7ee5Smrg am__untar="$_am_tar -xf -" 989af9a7ee5Smrg ;; 990af9a7ee5Smrg plaintar) 991af9a7ee5Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 992af9a7ee5Smrg # ustar tarball either. 993af9a7ee5Smrg (tar --version) >/dev/null 2>&1 && continue 994af9a7ee5Smrg am__tar='tar chf - "$$tardir"' 995af9a7ee5Smrg am__tar_='tar chf - "$tardir"' 996af9a7ee5Smrg am__untar='tar xf -' 997af9a7ee5Smrg ;; 998af9a7ee5Smrg pax) 999af9a7ee5Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1000af9a7ee5Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1001af9a7ee5Smrg am__untar='pax -r' 1002af9a7ee5Smrg ;; 1003af9a7ee5Smrg cpio) 1004af9a7ee5Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1005af9a7ee5Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1006af9a7ee5Smrg am__untar='cpio -i -H $1 -d' 1007af9a7ee5Smrg ;; 1008af9a7ee5Smrg none) 1009af9a7ee5Smrg am__tar=false 1010af9a7ee5Smrg am__tar_=false 1011af9a7ee5Smrg am__untar=false 1012af9a7ee5Smrg ;; 1013af9a7ee5Smrg esac 1014af9a7ee5Smrg 1015af9a7ee5Smrg # If the value was cached, stop now. We just wanted to have am__tar 1016af9a7ee5Smrg # and am__untar set. 1017af9a7ee5Smrg test -n "${am_cv_prog_tar_$1}" && break 1018af9a7ee5Smrg 1019af9a7ee5Smrg # tar/untar a dummy directory, and stop if the command works. 1020af9a7ee5Smrg rm -rf conftest.dir 1021af9a7ee5Smrg mkdir conftest.dir 1022af9a7ee5Smrg echo GrepMe > conftest.dir/file 1023af9a7ee5Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1024af9a7ee5Smrg rm -rf conftest.dir 1025af9a7ee5Smrg if test -s conftest.tar; then 1026af9a7ee5Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1027af9a7ee5Smrg AM_RUN_LOG([cat conftest.dir/file]) 1028af9a7ee5Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1029af9a7ee5Smrg fi 1030af9a7ee5Smrg done 1031caade7ccSmrg rm -rf conftest.dir 1032caade7ccSmrg 1033af9a7ee5Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1034af9a7ee5Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1035af9a7ee5Smrg 1036caade7ccSmrgAC_SUBST([am__tar]) 1037caade7ccSmrgAC_SUBST([am__untar]) 1038caade7ccSmrg]) # _AM_PROG_TAR 1039caade7ccSmrg 1040af9a7ee5Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1041af9a7ee5Smrg# 1042af9a7ee5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1043af9a7ee5Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1044af9a7ee5Smrg# Foundation, Inc. 1045af9a7ee5Smrg# Written by Gordon Matzigkeit, 1996 1046af9a7ee5Smrg# 1047af9a7ee5Smrg# This file is free software; the Free Software Foundation gives 1048af9a7ee5Smrg# unlimited permission to copy and/or distribute it, with or without 1049af9a7ee5Smrg# modifications, as long as this notice is preserved. 1050caade7ccSmrg 1051af9a7ee5Smrgm4_define([_LT_COPYING], [dnl 1052af9a7ee5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1053af9a7ee5Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1054af9a7ee5Smrg# Foundation, Inc. 1055af9a7ee5Smrg# Written by Gordon Matzigkeit, 1996 1056caade7ccSmrg# 1057af9a7ee5Smrg# This file is part of GNU Libtool. 1058caade7ccSmrg# 1059af9a7ee5Smrg# GNU Libtool is free software; you can redistribute it and/or 1060af9a7ee5Smrg# modify it under the terms of the GNU General Public License as 1061af9a7ee5Smrg# published by the Free Software Foundation; either version 2 of 1062af9a7ee5Smrg# the License, or (at your option) any later version. 1063caade7ccSmrg# 1064af9a7ee5Smrg# As a special exception to the GNU General Public License, 1065af9a7ee5Smrg# if you distribute this file as part of a program or library that 1066af9a7ee5Smrg# is built using GNU Libtool, you may include this file under the 1067af9a7ee5Smrg# same distribution terms that you use for the rest of that program. 1068caade7ccSmrg# 1069af9a7ee5Smrg# GNU Libtool is distributed in the hope that it will be useful, 1070af9a7ee5Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1071af9a7ee5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1072af9a7ee5Smrg# GNU General Public License for more details. 1073caade7ccSmrg# 1074af9a7ee5Smrg# You should have received a copy of the GNU General Public License 1075af9a7ee5Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 1076af9a7ee5Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1077af9a7ee5Smrg# obtained by writing to the Free Software Foundation, Inc., 1078af9a7ee5Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1079af9a7ee5Smrg]) 1080caade7ccSmrg 1081af9a7ee5Smrg# serial 57 LT_INIT 1082caade7ccSmrg 1083caade7ccSmrg 1084af9a7ee5Smrg# LT_PREREQ(VERSION) 1085af9a7ee5Smrg# ------------------ 1086af9a7ee5Smrg# Complain and exit if this libtool version is less that VERSION. 1087af9a7ee5Smrgm4_defun([LT_PREREQ], 1088af9a7ee5Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1089af9a7ee5Smrg [m4_default([$3], 1090af9a7ee5Smrg [m4_fatal([Libtool version $1 or higher is required], 1091af9a7ee5Smrg 63)])], 1092af9a7ee5Smrg [$2])]) 1093caade7ccSmrg 1094caade7ccSmrg 1095af9a7ee5Smrg# _LT_CHECK_BUILDDIR 1096af9a7ee5Smrg# ------------------ 1097af9a7ee5Smrg# Complain if the absolute build directory name contains unusual characters 1098af9a7ee5Smrgm4_defun([_LT_CHECK_BUILDDIR], 1099af9a7ee5Smrg[case `pwd` in 1100af9a7ee5Smrg *\ * | *\ *) 1101af9a7ee5Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1102af9a7ee5Smrgesac 1103af9a7ee5Smrg]) 1104caade7ccSmrg 1105caade7ccSmrg 1106af9a7ee5Smrg# LT_INIT([OPTIONS]) 1107af9a7ee5Smrg# ------------------ 1108af9a7ee5SmrgAC_DEFUN([LT_INIT], 1109af9a7ee5Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1110af9a7ee5SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1111af9a7ee5SmrgAC_BEFORE([$0], [LT_LANG])dnl 1112af9a7ee5SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 1113af9a7ee5SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 1114af9a7ee5Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115caade7ccSmrg 1116af9a7ee5Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1117af9a7ee5Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1118af9a7ee5Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1119af9a7ee5Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1120af9a7ee5Smrgdnl unless we require an AC_DEFUNed macro: 1121af9a7ee5SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1122af9a7ee5SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1123af9a7ee5SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1124af9a7ee5SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1125af9a7ee5Smrgm4_require([_LT_PROG_LTMAIN])dnl 1126caade7ccSmrg 1127af9a7ee5Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128caade7ccSmrg 1129af9a7ee5Smrgdnl Parse OPTIONS 1130af9a7ee5Smrg_LT_SET_OPTIONS([$0], [$1]) 1131caade7ccSmrg 1132af9a7ee5Smrg# This can be used to rebuild libtool when needed 1133af9a7ee5SmrgLIBTOOL_DEPS="$ltmain" 1134b9b4fd27Smrg 1135af9a7ee5Smrg# Always use our own libtool. 1136af9a7ee5SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1137af9a7ee5SmrgAC_SUBST(LIBTOOL)dnl 1138b9b4fd27Smrg 1139af9a7ee5Smrg_LT_SETUP 1140caade7ccSmrg 1141af9a7ee5Smrg# Only expand once: 1142af9a7ee5Smrgm4_define([LT_INIT]) 1143af9a7ee5Smrg])# LT_INIT 1144b9b4fd27Smrg 1145af9a7ee5Smrg# Old names: 1146af9a7ee5SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1147af9a7ee5SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1148af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 1149af9a7ee5Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1150af9a7ee5Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151b9b4fd27Smrg 1152b9b4fd27Smrg 1153af9a7ee5Smrg# _LT_CC_BASENAME(CC) 1154caade7ccSmrg# ------------------- 1155af9a7ee5Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1156af9a7ee5Smrgm4_defun([_LT_CC_BASENAME], 1157af9a7ee5Smrg[for cc_temp in $1""; do 1158af9a7ee5Smrg case $cc_temp in 1159af9a7ee5Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1160af9a7ee5Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1161af9a7ee5Smrg \-*) ;; 1162af9a7ee5Smrg *) break;; 1163af9a7ee5Smrg esac 1164af9a7ee5Smrgdone 1165af9a7ee5Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1166af9a7ee5Smrg]) 1167caade7ccSmrg 1168caade7ccSmrg 1169af9a7ee5Smrg# _LT_FILEUTILS_DEFAULTS 1170af9a7ee5Smrg# ---------------------- 1171af9a7ee5Smrg# It is okay to use these file commands and assume they have been set 1172af9a7ee5Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1173af9a7ee5Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1174af9a7ee5Smrg[: ${CP="cp -f"} 1175af9a7ee5Smrg: ${MV="mv -f"} 1176af9a7ee5Smrg: ${RM="rm -f"} 1177af9a7ee5Smrg])# _LT_FILEUTILS_DEFAULTS 1178caade7ccSmrg 1179caade7ccSmrg 1180af9a7ee5Smrg# _LT_SETUP 1181af9a7ee5Smrg# --------- 1182af9a7ee5Smrgm4_defun([_LT_SETUP], 1183af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1184af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1185af9a7ee5SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1186af9a7ee5SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1187caade7ccSmrg 1188af9a7ee5Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1189af9a7ee5Smrgdnl 1190af9a7ee5Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1191af9a7ee5Smrg_LT_DECL([], [host], [0])dnl 1192af9a7ee5Smrg_LT_DECL([], [host_os], [0])dnl 1193af9a7ee5Smrgdnl 1194af9a7ee5Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1195af9a7ee5Smrg_LT_DECL([], [build], [0])dnl 1196af9a7ee5Smrg_LT_DECL([], [build_os], [0])dnl 1197af9a7ee5Smrgdnl 1198af9a7ee5SmrgAC_REQUIRE([AC_PROG_CC])dnl 1199af9a7ee5SmrgAC_REQUIRE([LT_PATH_LD])dnl 1200af9a7ee5SmrgAC_REQUIRE([LT_PATH_NM])dnl 1201af9a7ee5Smrgdnl 1202af9a7ee5SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1203af9a7ee5Smrgtest -z "$LN_S" && LN_S="ln -s" 1204af9a7ee5Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1205af9a7ee5Smrgdnl 1206af9a7ee5SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1207af9a7ee5Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1208af9a7ee5Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1209af9a7ee5Smrgdnl 1210af9a7ee5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1211af9a7ee5Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1212af9a7ee5Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1213af9a7ee5Smrgm4_require([_LT_CMD_RELOAD])dnl 1214af9a7ee5Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1215af9a7ee5Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1216af9a7ee5Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1217af9a7ee5Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1218af9a7ee5Smrgm4_require([_LT_WITH_SYSROOT])dnl 1219caade7ccSmrg 1220af9a7ee5Smrg_LT_CONFIG_LIBTOOL_INIT([ 1221af9a7ee5Smrg# See if we are running on zsh, and set the options which allow our 1222af9a7ee5Smrg# commands through without removal of \ escapes INIT. 1223af9a7ee5Smrgif test -n "\${ZSH_VERSION+set}" ; then 1224af9a7ee5Smrg setopt NO_GLOB_SUBST 1225af9a7ee5Smrgfi 1226af9a7ee5Smrg]) 1227af9a7ee5Smrgif test -n "${ZSH_VERSION+set}" ; then 1228af9a7ee5Smrg setopt NO_GLOB_SUBST 1229caade7ccSmrgfi 1230caade7ccSmrg 1231af9a7ee5Smrg_LT_CHECK_OBJDIR 1232caade7ccSmrg 1233af9a7ee5Smrgm4_require([_LT_TAG_COMPILER])dnl 1234caade7ccSmrg 1235af9a7ee5Smrgcase $host_os in 1236af9a7ee5Smrgaix3*) 1237af9a7ee5Smrg # AIX sometimes has problems with the GCC collect2 program. For some 1238af9a7ee5Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1239af9a7ee5Smrg # vanish in a puff of smoke. 1240af9a7ee5Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 1241af9a7ee5Smrg COLLECT_NAMES= 1242af9a7ee5Smrg export COLLECT_NAMES 1243af9a7ee5Smrg fi 1244af9a7ee5Smrg ;; 1245af9a7ee5Smrgesac 1246caade7ccSmrg 1247af9a7ee5Smrg# Global variables: 1248af9a7ee5Smrgofile=libtool 1249af9a7ee5Smrgcan_build_shared=yes 1250caade7ccSmrg 1251af9a7ee5Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 1252af9a7ee5Smrg# which needs '.lib'). 1253af9a7ee5Smrglibext=a 1254b9b4fd27Smrg 1255af9a7ee5Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1256caade7ccSmrg 1257af9a7ee5Smrgold_CC="$CC" 1258af9a7ee5Smrgold_CFLAGS="$CFLAGS" 1259caade7ccSmrg 1260af9a7ee5Smrg# Set sane defaults for various variables 1261af9a7ee5Smrgtest -z "$CC" && CC=cc 1262af9a7ee5Smrgtest -z "$LTCC" && LTCC=$CC 1263af9a7ee5Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1264af9a7ee5Smrgtest -z "$LD" && LD=ld 1265af9a7ee5Smrgtest -z "$ac_objext" && ac_objext=o 1266caade7ccSmrg 1267af9a7ee5Smrg_LT_CC_BASENAME([$compiler]) 1268caade7ccSmrg 1269af9a7ee5Smrg# Only perform the check for file, if the check method requires it 1270af9a7ee5Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1271af9a7ee5Smrgcase $deplibs_check_method in 1272af9a7ee5Smrgfile_magic*) 1273af9a7ee5Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1274af9a7ee5Smrg _LT_PATH_MAGIC 1275af9a7ee5Smrg fi 1276af9a7ee5Smrg ;; 1277af9a7ee5Smrgesac 1278caade7ccSmrg 1279af9a7ee5Smrg# Use C for the default configuration in the libtool script 1280af9a7ee5SmrgLT_SUPPORTED_TAG([CC]) 1281af9a7ee5Smrg_LT_LANG_C_CONFIG 1282af9a7ee5Smrg_LT_LANG_DEFAULT_CONFIG 1283af9a7ee5Smrg_LT_CONFIG_COMMANDS 1284af9a7ee5Smrg])# _LT_SETUP 1285caade7ccSmrg 1286caade7ccSmrg 1287af9a7ee5Smrg# _LT_PREPARE_SED_QUOTE_VARS 1288af9a7ee5Smrg# -------------------------- 1289af9a7ee5Smrg# Define a few sed substitution that help us do robust quoting. 1290af9a7ee5Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1291af9a7ee5Smrg[# Backslashify metacharacters that are still active within 1292af9a7ee5Smrg# double-quoted strings. 1293af9a7ee5Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294caade7ccSmrg 1295af9a7ee5Smrg# Same as above, but do not quote variable references. 1296af9a7ee5Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297b9b4fd27Smrg 1298af9a7ee5Smrg# Sed substitution to delay expansion of an escaped shell variable in a 1299af9a7ee5Smrg# double_quote_subst'ed string. 1300af9a7ee5Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1301e8a5466aSmrg 1302af9a7ee5Smrg# Sed substitution to delay expansion of an escaped single quote. 1303af9a7ee5Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1304e8a5466aSmrg 1305af9a7ee5Smrg# Sed substitution to avoid accidental globbing in evaled expressions 1306af9a7ee5Smrgno_glob_subst='s/\*/\\\*/g' 1307af9a7ee5Smrg]) 1308b9b4fd27Smrg 1309af9a7ee5Smrg# _LT_PROG_LTMAIN 1310af9a7ee5Smrg# --------------- 1311af9a7ee5Smrg# Note that this code is called both from `configure', and `config.status' 1312af9a7ee5Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1313af9a7ee5Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 1314af9a7ee5Smrg# so we pass a copy along to make sure it has a sensible value anyway. 1315af9a7ee5Smrgm4_defun([_LT_PROG_LTMAIN], 1316af9a7ee5Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1317af9a7ee5Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1318af9a7ee5Smrgltmain="$ac_aux_dir/ltmain.sh" 1319af9a7ee5Smrg])# _LT_PROG_LTMAIN 1320a5602400Smrg 1321a5602400Smrg 1322a5602400Smrg 1323af9a7ee5Smrg# So that we can recreate a full libtool script including additional 1324af9a7ee5Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1325af9a7ee5Smrg# in macros and then make a single call at the end using the `libtool' 1326af9a7ee5Smrg# label. 1327a5602400Smrg 1328a5602400Smrg 1329af9a7ee5Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1330af9a7ee5Smrg# ---------------------------------------- 1331af9a7ee5Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1332af9a7ee5Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 1333af9a7ee5Smrg[m4_ifval([$1], 1334af9a7ee5Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1335af9a7ee5Smrg [$1 1336af9a7ee5Smrg])])]) 1337b9b4fd27Smrg 1338af9a7ee5Smrg# Initialize. 1339af9a7ee5Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340b9b4fd27Smrg 1341b9b4fd27Smrg 1342af9a7ee5Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 1343af9a7ee5Smrg# ------------------------------ 1344af9a7ee5Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1345af9a7ee5Smrgm4_define([_LT_CONFIG_LIBTOOL], 1346af9a7ee5Smrg[m4_ifval([$1], 1347af9a7ee5Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1348af9a7ee5Smrg [$1 1349af9a7ee5Smrg])])]) 1350b9b4fd27Smrg 1351af9a7ee5Smrg# Initialize. 1352af9a7ee5Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353e8a5466aSmrg 1354e8a5466aSmrg 1355af9a7ee5Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1356af9a7ee5Smrg# ----------------------------------------------------- 1357af9a7ee5Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 1358af9a7ee5Smrg[_LT_CONFIG_LIBTOOL([$1]) 1359af9a7ee5Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 1360af9a7ee5Smrg]) 1361e8a5466aSmrg 1362b9b4fd27Smrg 1363af9a7ee5Smrg# _LT_FORMAT_COMMENT([COMMENT]) 1364af9a7ee5Smrg# ----------------------------- 1365af9a7ee5Smrg# Add leading comment marks to the start of each line, and a trailing 1366af9a7ee5Smrg# full-stop to the whole comment if one is not present already. 1367af9a7ee5Smrgm4_define([_LT_FORMAT_COMMENT], 1368af9a7ee5Smrg[m4_ifval([$1], [ 1369af9a7ee5Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1370af9a7ee5Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1371af9a7ee5Smrg)]) 1372b9b4fd27Smrg 1373b9b4fd27Smrg 1374b9b4fd27Smrg 1375b9b4fd27Smrg 1376b9b4fd27Smrg 1377af9a7ee5Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1378af9a7ee5Smrg# ------------------------------------------------------------------- 1379af9a7ee5Smrg# CONFIGNAME is the name given to the value in the libtool script. 1380af9a7ee5Smrg# VARNAME is the (base) name used in the configure script. 1381af9a7ee5Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1382af9a7ee5Smrg# VARNAME. Any other value will be used directly. 1383af9a7ee5Smrgm4_define([_LT_DECL], 1384af9a7ee5Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1385af9a7ee5Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1386af9a7ee5Smrg [m4_ifval([$1], [$1], [$2])]) 1387af9a7ee5Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1388af9a7ee5Smrg m4_ifval([$4], 1389af9a7ee5Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1390af9a7ee5Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 1391af9a7ee5Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 1392af9a7ee5Smrg]) 1393b9b4fd27Smrg 1394b9b4fd27Smrg 1395af9a7ee5Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1396af9a7ee5Smrg# -------------------------------------------------------- 1397af9a7ee5Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398a5602400Smrg 1399a5602400Smrg 1400af9a7ee5Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1401af9a7ee5Smrg# ------------------------------------------------ 1402af9a7ee5Smrgm4_define([lt_decl_tag_varnames], 1403af9a7ee5Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1404a5602400Smrg 1405a5602400Smrg 1406af9a7ee5Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1407af9a7ee5Smrg# --------------------------------------------------------- 1408af9a7ee5Smrgm4_define([_lt_decl_filter], 1409af9a7ee5Smrg[m4_case([$#], 1410af9a7ee5Smrg [0], [m4_fatal([$0: too few arguments: $#])], 1411af9a7ee5Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 1412af9a7ee5Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1413af9a7ee5Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1414af9a7ee5Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1415af9a7ee5Smrg]) 1416a5602400Smrg 1417a5602400Smrg 1418af9a7ee5Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1419af9a7ee5Smrg# -------------------------------------------------- 1420af9a7ee5Smrgm4_define([lt_decl_quote_varnames], 1421af9a7ee5Smrg[_lt_decl_filter([value], [1], $@)]) 1422a5602400Smrg 1423a5602400Smrg 1424af9a7ee5Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1425af9a7ee5Smrg# --------------------------------------------------- 1426af9a7ee5Smrgm4_define([lt_decl_dquote_varnames], 1427af9a7ee5Smrg[_lt_decl_filter([value], [2], $@)]) 1428a5602400Smrg 1429caade7ccSmrg 1430af9a7ee5Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1431af9a7ee5Smrg# --------------------------------------------------- 1432af9a7ee5Smrgm4_define([lt_decl_varnames_tagged], 1433af9a7ee5Smrg[m4_assert([$# <= 2])dnl 1434af9a7ee5Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 1435af9a7ee5Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1436af9a7ee5Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1437af9a7ee5Smrgm4_define([_lt_decl_varnames_tagged], 1438af9a7ee5Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439caade7ccSmrg 1440caade7ccSmrg 1441af9a7ee5Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1442af9a7ee5Smrg# ------------------------------------------------ 1443af9a7ee5Smrgm4_define([lt_decl_all_varnames], 1444af9a7ee5Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 1445af9a7ee5Smrg m4_if([$2], [], 1446af9a7ee5Smrg m4_quote(lt_decl_varnames), 1447af9a7ee5Smrg m4_quote(m4_shift($@))))[]dnl 1448af9a7ee5Smrg]) 1449af9a7ee5Smrgm4_define([_lt_decl_all_varnames], 1450af9a7ee5Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 1451af9a7ee5Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1452af9a7ee5Smrg]) 1453caade7ccSmrg 1454caade7ccSmrg 1455af9a7ee5Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1456af9a7ee5Smrg# ------------------------------------ 1457af9a7ee5Smrg# Quote a variable value, and forward it to `config.status' so that its 1458af9a7ee5Smrg# declaration there will have the same value as in `configure'. VARNAME 1459af9a7ee5Smrg# must have a single quote delimited value for this to work. 1460af9a7ee5Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 1461af9a7ee5Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462e8a5466aSmrg 1463e8a5466aSmrg 1464af9a7ee5Smrg# _LT_CONFIG_STATUS_DECLARATIONS 1465af9a7ee5Smrg# ------------------------------ 1466af9a7ee5Smrg# We delimit libtool config variables with single quotes, so when 1467af9a7ee5Smrg# we write them to config.status, we have to be sure to quote all 1468af9a7ee5Smrg# embedded single quotes properly. In configure, this macro expands 1469af9a7ee5Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1470af9a7ee5Smrg# 1471af9a7ee5Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1472af9a7ee5Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1473af9a7ee5Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1474af9a7ee5Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475e8a5466aSmrg 1476caade7ccSmrg 1477af9a7ee5Smrg# _LT_LIBTOOL_TAGS 1478af9a7ee5Smrg# ---------------- 1479af9a7ee5Smrg# Output comment and list of tags supported by the script 1480af9a7ee5Smrgm4_defun([_LT_LIBTOOL_TAGS], 1481af9a7ee5Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1482af9a7ee5Smrgavailable_tags="_LT_TAGS"dnl 1483af9a7ee5Smrg]) 1484caade7ccSmrg 1485caade7ccSmrg 1486af9a7ee5Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1487af9a7ee5Smrg# ----------------------------------- 1488af9a7ee5Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 1489af9a7ee5Smrg# expand to a commented shell variable setting: 1490e8a5466aSmrg# 1491af9a7ee5Smrg# # Some comment about what VAR is for. 1492af9a7ee5Smrg# visible_name=$lt_internal_name 1493af9a7ee5Smrgm4_define([_LT_LIBTOOL_DECLARE], 1494af9a7ee5Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1495af9a7ee5Smrg [description])))[]dnl 1496af9a7ee5Smrgm4_pushdef([_libtool_name], 1497af9a7ee5Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1498af9a7ee5Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1499af9a7ee5Smrg [0], [_libtool_name=[$]$1], 1500af9a7ee5Smrg [1], [_libtool_name=$lt_[]$1], 1501af9a7ee5Smrg [2], [_libtool_name=$lt_[]$1], 1502af9a7ee5Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1503af9a7ee5Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1504af9a7ee5Smrg]) 1505caade7ccSmrg 1506e8a5466aSmrg 1507af9a7ee5Smrg# _LT_LIBTOOL_CONFIG_VARS 1508af9a7ee5Smrg# ----------------------- 1509af9a7ee5Smrg# Produce commented declarations of non-tagged libtool config variables 1510af9a7ee5Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1511af9a7ee5Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1512af9a7ee5Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 1513af9a7ee5Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 1514af9a7ee5Smrg[m4_foreach([_lt_var], 1515af9a7ee5Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1516af9a7ee5Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517e8a5466aSmrg 1518caade7ccSmrg 1519af9a7ee5Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 1520af9a7ee5Smrg# ------------------------- 1521af9a7ee5Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 1522af9a7ee5Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1523af9a7ee5Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524caade7ccSmrg 1525af9a7ee5Smrg 1526af9a7ee5Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 1527af9a7ee5Smrg# ------------------------------ 1528af9a7ee5Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529af9a7ee5Smrg 1530af9a7ee5Smrg 1531af9a7ee5Smrg# _LT_CONFIG_COMMANDS 1532a5602400Smrg# ------------------- 1533af9a7ee5Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1534af9a7ee5Smrg# variables for single and double quote escaping we saved from calls 1535af9a7ee5Smrg# to _LT_DECL, we can put quote escaped variables declarations 1536af9a7ee5Smrg# into `config.status', and then the shell code to quote escape them in 1537af9a7ee5Smrg# for loops in `config.status'. Finally, any additional code accumulated 1538af9a7ee5Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1539af9a7ee5Smrgm4_defun([_LT_CONFIG_COMMANDS], 1540af9a7ee5Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 1541af9a7ee5Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 1542af9a7ee5Smrg dnl instead of duplicating it all over again into config.status, 1543af9a7ee5Smrg dnl then we will have config.status run $CONFIG_LT later, so it 1544af9a7ee5Smrg dnl needs to know what name is stored there: 1545af9a7ee5Smrg [AC_CONFIG_COMMANDS([libtool], 1546af9a7ee5Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1547af9a7ee5Smrg dnl If the libtool generation code is destined for config.status, 1548af9a7ee5Smrg dnl expand the accumulated commands and init code now: 1549af9a7ee5Smrg [AC_CONFIG_COMMANDS([libtool], 1550af9a7ee5Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1551af9a7ee5Smrg])#_LT_CONFIG_COMMANDS 1552a5602400Smrg 1553485f0483Smrg 1554af9a7ee5Smrg# Initialize. 1555af9a7ee5Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1556af9a7ee5Smrg[ 1557485f0483Smrg 1558af9a7ee5Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1559af9a7ee5Smrg# if CDPATH is set. 1560af9a7ee5Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561485f0483Smrg 1562af9a7ee5Smrgsed_quote_subst='$sed_quote_subst' 1563af9a7ee5Smrgdouble_quote_subst='$double_quote_subst' 1564af9a7ee5Smrgdelay_variable_subst='$delay_variable_subst' 1565af9a7ee5Smrg_LT_CONFIG_STATUS_DECLARATIONS 1566af9a7ee5SmrgLTCC='$LTCC' 1567af9a7ee5SmrgLTCFLAGS='$LTCFLAGS' 1568af9a7ee5Smrgcompiler='$compiler_DEFAULT' 1569b9b4fd27Smrg 1570af9a7ee5Smrg# A function that is used when there is no print builtin or printf. 1571af9a7ee5Smrgfunc_fallback_echo () 1572af9a7ee5Smrg{ 1573af9a7ee5Smrg eval 'cat <<_LTECHO_EOF 1574af9a7ee5Smrg\$[]1 1575af9a7ee5Smrg_LTECHO_EOF' 1576af9a7ee5Smrg} 1577caade7ccSmrg 1578af9a7ee5Smrg# Quote evaled strings. 1579af9a7ee5Smrgfor var in lt_decl_all_varnames([[ \ 1580af9a7ee5Smrg]], lt_decl_quote_varnames); do 1581af9a7ee5Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1582af9a7ee5Smrg *[[\\\\\\\`\\"\\\$]]*) 1583af9a7ee5Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1584af9a7ee5Smrg ;; 1585af9a7ee5Smrg *) 1586af9a7ee5Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1587af9a7ee5Smrg ;; 1588af9a7ee5Smrg esac 1589af9a7ee5Smrgdone 1590485f0483Smrg 1591af9a7ee5Smrg# Double-quote double-evaled strings. 1592af9a7ee5Smrgfor var in lt_decl_all_varnames([[ \ 1593af9a7ee5Smrg]], lt_decl_dquote_varnames); do 1594af9a7ee5Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1595af9a7ee5Smrg *[[\\\\\\\`\\"\\\$]]*) 1596af9a7ee5Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1597af9a7ee5Smrg ;; 1598af9a7ee5Smrg *) 1599af9a7ee5Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1600af9a7ee5Smrg ;; 1601af9a7ee5Smrg esac 1602af9a7ee5Smrgdone 1603caade7ccSmrg 1604af9a7ee5Smrg_LT_OUTPUT_LIBTOOL_INIT 1605af9a7ee5Smrg]) 1606caade7ccSmrg 1607af9a7ee5Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1608af9a7ee5Smrg# ------------------------------------ 1609af9a7ee5Smrg# Generate a child script FILE with all initialization necessary to 1610af9a7ee5Smrg# reuse the environment learned by the parent script, and make the 1611af9a7ee5Smrg# file executable. If COMMENT is supplied, it is inserted after the 1612af9a7ee5Smrg# `#!' sequence but before initialization text begins. After this 1613af9a7ee5Smrg# macro, additional text can be appended to FILE to form the body of 1614af9a7ee5Smrg# the child script. The macro ends with non-zero status if the 1615af9a7ee5Smrg# file could not be fully written (such as if the disk is full). 1616af9a7ee5Smrgm4_ifdef([AS_INIT_GENERATED], 1617af9a7ee5Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1618af9a7ee5Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 1619af9a7ee5Smrg[m4_require([AS_PREPARE])]dnl 1620af9a7ee5Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1621af9a7ee5Smrg[lt_write_fail=0 1622af9a7ee5Smrgcat >$1 <<_ASEOF || lt_write_fail=1 1623af9a7ee5Smrg#! $SHELL 1624af9a7ee5Smrg# Generated by $as_me. 1625af9a7ee5Smrg$2 1626af9a7ee5SmrgSHELL=\${CONFIG_SHELL-$SHELL} 1627af9a7ee5Smrgexport SHELL 1628af9a7ee5Smrg_ASEOF 1629af9a7ee5Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 1630af9a7ee5SmrgAS_SHELL_SANITIZE 1631af9a7ee5Smrg_AS_PREPARE 1632af9a7ee5Smrgexec AS_MESSAGE_FD>&1 1633af9a7ee5Smrg_ASEOF 1634af9a7ee5Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 1635af9a7ee5Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636caade7ccSmrg 1637af9a7ee5Smrg# LT_OUTPUT 1638af9a7ee5Smrg# --------- 1639af9a7ee5Smrg# This macro allows early generation of the libtool script (before 1640af9a7ee5Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 1641af9a7ee5Smrg# tests. 1642af9a7ee5SmrgAC_DEFUN([LT_OUTPUT], 1643af9a7ee5Smrg[: ${CONFIG_LT=./config.lt} 1644af9a7ee5SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 1645af9a7ee5Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1646af9a7ee5Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647caade7ccSmrg 1648af9a7ee5Smrgcat >>"$CONFIG_LT" <<\_LTEOF 1649af9a7ee5Smrglt_cl_silent=false 1650af9a7ee5Smrgexec AS_MESSAGE_LOG_FD>>config.log 1651af9a7ee5Smrg{ 1652af9a7ee5Smrg echo 1653af9a7ee5Smrg AS_BOX([Running $as_me.]) 1654af9a7ee5Smrg} >&AS_MESSAGE_LOG_FD 1655caade7ccSmrg 1656af9a7ee5Smrglt_cl_help="\ 1657af9a7ee5Smrg\`$as_me' creates a local libtool stub from the current configuration, 1658af9a7ee5Smrgfor use in further configure time tests before the real libtool is 1659af9a7ee5Smrggenerated. 1660caade7ccSmrg 1661af9a7ee5SmrgUsage: $[0] [[OPTIONS]] 1662caade7ccSmrg 1663af9a7ee5Smrg -h, --help print this help, then exit 1664af9a7ee5Smrg -V, --version print version number, then exit 1665af9a7ee5Smrg -q, --quiet do not print progress messages 1666af9a7ee5Smrg -d, --debug don't remove temporary files 1667caade7ccSmrg 1668af9a7ee5SmrgReport bugs to <bug-libtool@gnu.org>." 1669caade7ccSmrg 1670af9a7ee5Smrglt_cl_version="\ 1671af9a7ee5Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1672af9a7ee5Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1673af9a7ee5Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674caade7ccSmrg 1675af9a7ee5SmrgCopyright (C) 2011 Free Software Foundation, Inc. 1676af9a7ee5SmrgThis config.lt script is free software; the Free Software Foundation 1677af9a7ee5Smrggives unlimited permision to copy, distribute and modify it." 1678caade7ccSmrg 1679af9a7ee5Smrgwhile test $[#] != 0 1680af9a7ee5Smrgdo 1681af9a7ee5Smrg case $[1] in 1682af9a7ee5Smrg --version | --v* | -V ) 1683af9a7ee5Smrg echo "$lt_cl_version"; exit 0 ;; 1684af9a7ee5Smrg --help | --h* | -h ) 1685af9a7ee5Smrg echo "$lt_cl_help"; exit 0 ;; 1686af9a7ee5Smrg --debug | --d* | -d ) 1687af9a7ee5Smrg debug=: ;; 1688af9a7ee5Smrg --quiet | --q* | --silent | --s* | -q ) 1689af9a7ee5Smrg lt_cl_silent=: ;; 1690caade7ccSmrg 1691af9a7ee5Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 1692af9a7ee5SmrgTry \`$[0] --help' for more information.]) ;; 1693caade7ccSmrg 1694af9a7ee5Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 1695af9a7ee5SmrgTry \`$[0] --help' for more information.]) ;; 1696af9a7ee5Smrg esac 1697af9a7ee5Smrg shift 1698af9a7ee5Smrgdone 1699b9b4fd27Smrg 1700af9a7ee5Smrgif $lt_cl_silent; then 1701af9a7ee5Smrg exec AS_MESSAGE_FD>/dev/null 1702af9a7ee5Smrgfi 1703af9a7ee5Smrg_LTEOF 1704b9b4fd27Smrg 1705af9a7ee5Smrgcat >>"$CONFIG_LT" <<_LTEOF 1706af9a7ee5Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1707af9a7ee5Smrg_LTEOF 1708b9b4fd27Smrg 1709af9a7ee5Smrgcat >>"$CONFIG_LT" <<\_LTEOF 1710af9a7ee5SmrgAC_MSG_NOTICE([creating $ofile]) 1711af9a7ee5Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 1712af9a7ee5SmrgAS_EXIT(0) 1713af9a7ee5Smrg_LTEOF 1714af9a7ee5Smrgchmod +x "$CONFIG_LT" 1715b9b4fd27Smrg 1716af9a7ee5Smrg# configure is writing to config.log, but config.lt does its own redirection, 1717af9a7ee5Smrg# appending to config.log, which fails on DOS, as config.log is still kept 1718af9a7ee5Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 1719af9a7ee5Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 1720af9a7ee5Smrglt_cl_success=: 1721af9a7ee5Smrgtest "$silent" = yes && 1722af9a7ee5Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 1723af9a7ee5Smrgexec AS_MESSAGE_LOG_FD>/dev/null 1724af9a7ee5Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1725af9a7ee5Smrgexec AS_MESSAGE_LOG_FD>>config.log 1726af9a7ee5Smrg$lt_cl_success || AS_EXIT(1) 1727af9a7ee5Smrg])# LT_OUTPUT 1728b9b4fd27Smrg 1729b9b4fd27Smrg 1730af9a7ee5Smrg# _LT_CONFIG(TAG) 1731af9a7ee5Smrg# --------------- 1732af9a7ee5Smrg# If TAG is the built-in tag, create an initial libtool script with a 1733af9a7ee5Smrg# default configuration from the untagged config vars. Otherwise add code 1734af9a7ee5Smrg# to config.status for appending the configuration named by TAG from the 1735af9a7ee5Smrg# matching tagged config vars. 1736af9a7ee5Smrgm4_defun([_LT_CONFIG], 1737af9a7ee5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1738af9a7ee5Smrg_LT_CONFIG_SAVE_COMMANDS([ 1739af9a7ee5Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1740af9a7ee5Smrg m4_if(_LT_TAG, [C], [ 1741af9a7ee5Smrg # See if we are running on zsh, and set the options which allow our 1742af9a7ee5Smrg # commands through without removal of \ escapes. 1743af9a7ee5Smrg if test -n "${ZSH_VERSION+set}" ; then 1744af9a7ee5Smrg setopt NO_GLOB_SUBST 1745af9a7ee5Smrg fi 1746b9b4fd27Smrg 1747af9a7ee5Smrg cfgfile="${ofile}T" 1748af9a7ee5Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1749af9a7ee5Smrg $RM "$cfgfile" 1750b9b4fd27Smrg 1751af9a7ee5Smrg cat <<_LT_EOF >> "$cfgfile" 1752af9a7ee5Smrg#! $SHELL 1753b9b4fd27Smrg 1754af9a7ee5Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1755af9a7ee5Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1756af9a7ee5Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1757af9a7ee5Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1758af9a7ee5Smrg# 1759af9a7ee5Smrg_LT_COPYING 1760af9a7ee5Smrg_LT_LIBTOOL_TAGS 1761b9b4fd27Smrg 1762af9a7ee5Smrg# ### BEGIN LIBTOOL CONFIG 1763af9a7ee5Smrg_LT_LIBTOOL_CONFIG_VARS 1764af9a7ee5Smrg_LT_LIBTOOL_TAG_VARS 1765af9a7ee5Smrg# ### END LIBTOOL CONFIG 1766b9b4fd27Smrg 1767af9a7ee5Smrg_LT_EOF 1768b9b4fd27Smrg 1769af9a7ee5Smrg case $host_os in 1770af9a7ee5Smrg aix3*) 1771af9a7ee5Smrg cat <<\_LT_EOF >> "$cfgfile" 1772af9a7ee5Smrg# AIX sometimes has problems with the GCC collect2 program. For some 1773af9a7ee5Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 1774af9a7ee5Smrg# vanish in a puff of smoke. 1775af9a7ee5Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 1776af9a7ee5Smrg COLLECT_NAMES= 1777af9a7ee5Smrg export COLLECT_NAMES 1778af9a7ee5Smrgfi 1779af9a7ee5Smrg_LT_EOF 1780af9a7ee5Smrg ;; 1781af9a7ee5Smrg esac 1782b9b4fd27Smrg 1783af9a7ee5Smrg _LT_PROG_LTMAIN 1784b9b4fd27Smrg 1785af9a7ee5Smrg # We use sed instead of cat because bash on DJGPP gets confused if 1786af9a7ee5Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 1787af9a7ee5Smrg # text mode, it properly converts lines to CR/LF. This bash problem 1788af9a7ee5Smrg # is reportedly fixed, but why not run on old versions too? 1789af9a7ee5Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 1790af9a7ee5Smrg || (rm -f "$cfgfile"; exit 1) 1791b9b4fd27Smrg 1792af9a7ee5Smrg _LT_PROG_REPLACE_SHELLFNS 1793e8a5466aSmrg 1794af9a7ee5Smrg mv -f "$cfgfile" "$ofile" || 1795af9a7ee5Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1796af9a7ee5Smrg chmod +x "$ofile" 1797af9a7ee5Smrg], 1798af9a7ee5Smrg[cat <<_LT_EOF >> "$ofile" 1799b9b4fd27Smrg 1800af9a7ee5Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1801af9a7ee5Smrgdnl in a comment (ie after a #). 1802af9a7ee5Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 1803af9a7ee5Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1804af9a7ee5Smrg# ### END LIBTOOL TAG CONFIG: $1 1805af9a7ee5Smrg_LT_EOF 1806af9a7ee5Smrg])dnl /m4_if 1807af9a7ee5Smrg], 1808af9a7ee5Smrg[m4_if([$1], [], [ 1809af9a7ee5Smrg PACKAGE='$PACKAGE' 1810af9a7ee5Smrg VERSION='$VERSION' 1811af9a7ee5Smrg TIMESTAMP='$TIMESTAMP' 1812af9a7ee5Smrg RM='$RM' 1813af9a7ee5Smrg ofile='$ofile'], []) 1814af9a7ee5Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 1815af9a7ee5Smrg])# _LT_CONFIG 1816b9b4fd27Smrg 1817b9b4fd27Smrg 1818af9a7ee5Smrg# LT_SUPPORTED_TAG(TAG) 1819af9a7ee5Smrg# --------------------- 1820af9a7ee5Smrg# Trace this macro to discover what tags are supported by the libtool 1821af9a7ee5Smrg# --tag option, using: 1822af9a7ee5Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1823af9a7ee5SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824b9b4fd27Smrg 1825b9b4fd27Smrg 1826af9a7ee5Smrg# C support is built-in for now 1827af9a7ee5Smrgm4_define([_LT_LANG_C_enabled], []) 1828af9a7ee5Smrgm4_define([_LT_TAGS], []) 1829b9b4fd27Smrg 1830b9b4fd27Smrg 1831af9a7ee5Smrg# LT_LANG(LANG) 1832af9a7ee5Smrg# ------------- 1833af9a7ee5Smrg# Enable libtool support for the given language if not already enabled. 1834af9a7ee5SmrgAC_DEFUN([LT_LANG], 1835af9a7ee5Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 1836af9a7ee5Smrgm4_case([$1], 1837af9a7ee5Smrg [C], [_LT_LANG(C)], 1838af9a7ee5Smrg [C++], [_LT_LANG(CXX)], 1839af9a7ee5Smrg [Go], [_LT_LANG(GO)], 1840af9a7ee5Smrg [Java], [_LT_LANG(GCJ)], 1841af9a7ee5Smrg [Fortran 77], [_LT_LANG(F77)], 1842af9a7ee5Smrg [Fortran], [_LT_LANG(FC)], 1843af9a7ee5Smrg [Windows Resource], [_LT_LANG(RC)], 1844af9a7ee5Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1845af9a7ee5Smrg [_LT_LANG($1)], 1846af9a7ee5Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 1847af9a7ee5Smrg])# LT_LANG 1848b9b4fd27Smrg 1849b9b4fd27Smrg 1850af9a7ee5Smrg# _LT_LANG(LANGNAME) 1851af9a7ee5Smrg# ------------------ 1852af9a7ee5Smrgm4_defun([_LT_LANG], 1853af9a7ee5Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1854af9a7ee5Smrg [LT_SUPPORTED_TAG([$1])dnl 1855af9a7ee5Smrg m4_append([_LT_TAGS], [$1 ])dnl 1856af9a7ee5Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 1857af9a7ee5Smrg _LT_LANG_$1_CONFIG($1)])dnl 1858af9a7ee5Smrg])# _LT_LANG 1859e8a5466aSmrg 1860b9b4fd27Smrg 1861af9a7ee5Smrgm4_ifndef([AC_PROG_GO], [ 1862af9a7ee5Smrg# NOTE: This macro has been submitted for inclusion into # 1863af9a7ee5Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1864af9a7ee5Smrg# a released version of Autoconf we should remove this # 1865af9a7ee5Smrg# macro and use it instead. # 1866af9a7ee5Smrgm4_defun([AC_PROG_GO], 1867af9a7ee5Smrg[AC_LANG_PUSH(Go)dnl 1868af9a7ee5SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1869af9a7ee5SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1870af9a7ee5Smrg_AC_ARG_VAR_LDFLAGS()dnl 1871af9a7ee5SmrgAC_CHECK_TOOL(GOC, gccgo) 1872af9a7ee5Smrgif test -z "$GOC"; then 1873af9a7ee5Smrg if test -n "$ac_tool_prefix"; then 1874af9a7ee5Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1875af9a7ee5Smrg fi 1876b9b4fd27Smrgfi 1877af9a7ee5Smrgif test -z "$GOC"; then 1878af9a7ee5Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1879b9b4fd27Smrgfi 1880af9a7ee5Smrg])#m4_defun 1881af9a7ee5Smrg])#m4_ifndef 1882b9b4fd27Smrg 1883caade7ccSmrg 1884af9a7ee5Smrg# _LT_LANG_DEFAULT_CONFIG 1885af9a7ee5Smrg# ----------------------- 1886af9a7ee5Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 1887af9a7ee5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 1888af9a7ee5Smrg [LT_LANG(CXX)], 1889af9a7ee5Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890caade7ccSmrg 1891af9a7ee5SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 1892af9a7ee5Smrg [LT_LANG(F77)], 1893af9a7ee5Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894caade7ccSmrg 1895af9a7ee5SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 1896af9a7ee5Smrg [LT_LANG(FC)], 1897af9a7ee5Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898caade7ccSmrg 1899af9a7ee5Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 1900af9a7ee5Smrgdnl pulling things in needlessly. 1901af9a7ee5SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 1902af9a7ee5Smrg [LT_LANG(GCJ)], 1903af9a7ee5Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1904af9a7ee5Smrg [LT_LANG(GCJ)], 1905af9a7ee5Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 1906af9a7ee5Smrg [LT_LANG(GCJ)], 1907af9a7ee5Smrg [m4_ifdef([AC_PROG_GCJ], 1908af9a7ee5Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 1909af9a7ee5Smrg m4_ifdef([A][M_PROG_GCJ], 1910af9a7ee5Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 1911af9a7ee5Smrg m4_ifdef([LT_PROG_GCJ], 1912af9a7ee5Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913caade7ccSmrg 1914af9a7ee5SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 1915af9a7ee5Smrg [LT_LANG(GO)], 1916af9a7ee5Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917caade7ccSmrg 1918af9a7ee5SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 1919af9a7ee5Smrg [LT_LANG(RC)], 1920af9a7ee5Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 1921af9a7ee5Smrg])# _LT_LANG_DEFAULT_CONFIG 1922485f0483Smrg 1923af9a7ee5Smrg# Obsolete macros: 1924af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 1925af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 1926af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 1927af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 1928af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1929af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 1930af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 1931af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 1932af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 1933af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 1934af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935caade7ccSmrg 1936e8a5466aSmrg 1937af9a7ee5Smrg# _LT_TAG_COMPILER 1938af9a7ee5Smrg# ---------------- 1939af9a7ee5Smrgm4_defun([_LT_TAG_COMPILER], 1940af9a7ee5Smrg[AC_REQUIRE([AC_PROG_CC])dnl 1941e8a5466aSmrg 1942af9a7ee5Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 1943af9a7ee5Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 1944af9a7ee5Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 1945af9a7ee5Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946e8a5466aSmrg 1947af9a7ee5Smrg# If no C compiler was specified, use CC. 1948af9a7ee5SmrgLTCC=${LTCC-"$CC"} 1949e8a5466aSmrg 1950af9a7ee5Smrg# If no C compiler flags were specified, use CFLAGS. 1951af9a7ee5SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952e8a5466aSmrg 1953af9a7ee5Smrg# Allow CC to be a program name with arguments. 1954af9a7ee5Smrgcompiler=$CC 1955af9a7ee5Smrg])# _LT_TAG_COMPILER 1956caade7ccSmrg 1957caade7ccSmrg 1958af9a7ee5Smrg# _LT_COMPILER_BOILERPLATE 1959af9a7ee5Smrg# ------------------------ 1960af9a7ee5Smrg# Check for compiler boilerplate output or warnings with 1961af9a7ee5Smrg# the simple compiler test code. 1962af9a7ee5Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 1963af9a7ee5Smrg[m4_require([_LT_DECL_SED])dnl 1964af9a7ee5Smrgac_outfile=conftest.$ac_objext 1965af9a7ee5Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 1966af9a7ee5Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1967af9a7ee5Smrg_lt_compiler_boilerplate=`cat conftest.err` 1968af9a7ee5Smrg$RM conftest* 1969af9a7ee5Smrg])# _LT_COMPILER_BOILERPLATE 1970caade7ccSmrg 1971caade7ccSmrg 1972af9a7ee5Smrg# _LT_LINKER_BOILERPLATE 1973af9a7ee5Smrg# ---------------------- 1974af9a7ee5Smrg# Check for linker boilerplate output or warnings with 1975af9a7ee5Smrg# the simple link test code. 1976af9a7ee5Smrgm4_defun([_LT_LINKER_BOILERPLATE], 1977af9a7ee5Smrg[m4_require([_LT_DECL_SED])dnl 1978af9a7ee5Smrgac_outfile=conftest.$ac_objext 1979af9a7ee5Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 1980af9a7ee5Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1981af9a7ee5Smrg_lt_linker_boilerplate=`cat conftest.err` 1982af9a7ee5Smrg$RM -r conftest* 1983af9a7ee5Smrg])# _LT_LINKER_BOILERPLATE 1984caade7ccSmrg 1985af9a7ee5Smrg# _LT_REQUIRED_DARWIN_CHECKS 1986af9a7ee5Smrg# ------------------------- 1987af9a7ee5Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1988af9a7ee5Smrg case $host_os in 1989af9a7ee5Smrg rhapsody* | darwin*) 1990af9a7ee5Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 1991af9a7ee5Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 1992af9a7ee5Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 1993af9a7ee5Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 1994af9a7ee5Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1995af9a7ee5Smrg _LT_DECL([], [DSYMUTIL], [1], 1996af9a7ee5Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1997af9a7ee5Smrg _LT_DECL([], [NMEDIT], [1], 1998af9a7ee5Smrg [Tool to change global to local symbols on Mac OS X]) 1999af9a7ee5Smrg _LT_DECL([], [LIPO], [1], 2000af9a7ee5Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 2001af9a7ee5Smrg _LT_DECL([], [OTOOL], [1], 2002af9a7ee5Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2003af9a7ee5Smrg _LT_DECL([], [OTOOL64], [1], 2004af9a7ee5Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005b9b4fd27Smrg 2006af9a7ee5Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2007af9a7ee5Smrg [lt_cv_apple_cc_single_mod=no 2008af9a7ee5Smrg if test -z "${LT_MULTI_MODULE}"; then 2009af9a7ee5Smrg # By default we will add the -single_module flag. You can override 2010af9a7ee5Smrg # by either setting the environment variable LT_MULTI_MODULE 2011af9a7ee5Smrg # non-empty at configure time, or by adding -multi_module to the 2012af9a7ee5Smrg # link flags. 2013af9a7ee5Smrg rm -rf libconftest.dylib* 2014af9a7ee5Smrg echo "int foo(void){return 1;}" > conftest.c 2015af9a7ee5Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2016af9a7ee5Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2017af9a7ee5Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2018af9a7ee5Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2019af9a7ee5Smrg _lt_result=$? 2020af9a7ee5Smrg # If there is a non-empty error log, and "single_module" 2021af9a7ee5Smrg # appears in it, assume the flag caused a linker warning 2022af9a7ee5Smrg if test -s conftest.err && $GREP single_module conftest.err; then 2023af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2024af9a7ee5Smrg # Otherwise, if the output was created with a 0 exit code from 2025af9a7ee5Smrg # the compiler, it worked. 2026af9a7ee5Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2027af9a7ee5Smrg lt_cv_apple_cc_single_mod=yes 2028af9a7ee5Smrg else 2029af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2030af9a7ee5Smrg fi 2031af9a7ee5Smrg rm -rf libconftest.dylib* 2032af9a7ee5Smrg rm -f conftest.* 2033af9a7ee5Smrg fi]) 2034b9b4fd27Smrg 2035af9a7ee5Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2036af9a7ee5Smrg [lt_cv_ld_exported_symbols_list], 2037af9a7ee5Smrg [lt_cv_ld_exported_symbols_list=no 2038af9a7ee5Smrg save_LDFLAGS=$LDFLAGS 2039af9a7ee5Smrg echo "_main" > conftest.sym 2040af9a7ee5Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2041af9a7ee5Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2042af9a7ee5Smrg [lt_cv_ld_exported_symbols_list=yes], 2043af9a7ee5Smrg [lt_cv_ld_exported_symbols_list=no]) 2044af9a7ee5Smrg LDFLAGS="$save_LDFLAGS" 2045af9a7ee5Smrg ]) 2046b9b4fd27Smrg 2047af9a7ee5Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2048af9a7ee5Smrg [lt_cv_ld_force_load=no 2049af9a7ee5Smrg cat > conftest.c << _LT_EOF 2050af9a7ee5Smrgint forced_loaded() { return 2;} 2051af9a7ee5Smrg_LT_EOF 2052af9a7ee5Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2053af9a7ee5Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2054af9a7ee5Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2055af9a7ee5Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2056af9a7ee5Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2057af9a7ee5Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2058af9a7ee5Smrg cat > conftest.c << _LT_EOF 2059af9a7ee5Smrgint main() { return 0;} 2060af9a7ee5Smrg_LT_EOF 2061af9a7ee5Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2062af9a7ee5Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2063af9a7ee5Smrg _lt_result=$? 2064af9a7ee5Smrg if test -s conftest.err && $GREP force_load conftest.err; then 2065af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2066af9a7ee5Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2067af9a7ee5Smrg lt_cv_ld_force_load=yes 2068af9a7ee5Smrg else 2069af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2070af9a7ee5Smrg fi 2071af9a7ee5Smrg rm -f conftest.err libconftest.a conftest conftest.c 2072af9a7ee5Smrg rm -rf conftest.dSYM 2073af9a7ee5Smrg ]) 2074af9a7ee5Smrg case $host_os in 2075af9a7ee5Smrg rhapsody* | darwin1.[[012]]) 2076af9a7ee5Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2077af9a7ee5Smrg darwin1.*) 2078af9a7ee5Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2079af9a7ee5Smrg darwin*) # darwin 5.x on 2080af9a7ee5Smrg # if running on 10.5 or later, the deployment target defaults 2081af9a7ee5Smrg # to the OS version, if on x86, and 10.4, the deployment 2082af9a7ee5Smrg # target defaults to 10.4. Don't you love it? 2083af9a7ee5Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2084af9a7ee5Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2085af9a7ee5Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2086af9a7ee5Smrg 10.[[012]]*) 2087af9a7ee5Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2088af9a7ee5Smrg 10.*) 2089af9a7ee5Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2090af9a7ee5Smrg esac 2091af9a7ee5Smrg ;; 2092af9a7ee5Smrg esac 2093af9a7ee5Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2094af9a7ee5Smrg _lt_dar_single_mod='$single_module' 2095af9a7ee5Smrg fi 2096af9a7ee5Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2097af9a7ee5Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2098af9a7ee5Smrg else 2099af9a7ee5Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2100af9a7ee5Smrg fi 2101af9a7ee5Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2102af9a7ee5Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 2103af9a7ee5Smrg else 2104af9a7ee5Smrg _lt_dsymutil= 2105af9a7ee5Smrg fi 2106af9a7ee5Smrg ;; 2107af9a7ee5Smrg esac 2108b9b4fd27Smrg]) 2109caade7ccSmrg 2110b9b4fd27Smrg 2111af9a7ee5Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2112af9a7ee5Smrg# --------------------------------- 2113af9a7ee5Smrg# Checks for linker and compiler features on darwin 2114af9a7ee5Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 2115af9a7ee5Smrg[ 2116af9a7ee5Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2117af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2118af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no 2119af9a7ee5Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 2120af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2121af9a7ee5Smrg if test "$lt_cv_ld_force_load" = "yes"; then 2122af9a7ee5Smrg _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\"`' 2123af9a7ee5Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2124af9a7ee5Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2125af9a7ee5Smrg else 2126af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2127af9a7ee5Smrg fi 2128af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 2129af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2130af9a7ee5Smrg case $cc_basename in 2131af9a7ee5Smrg ifort*) _lt_dar_can_shared=yes ;; 2132af9a7ee5Smrg *) _lt_dar_can_shared=$GCC ;; 2133af9a7ee5Smrg esac 2134af9a7ee5Smrg if test "$_lt_dar_can_shared" = "yes"; then 2135af9a7ee5Smrg output_verbose_link_cmd=func_echo_all 2136af9a7ee5Smrg _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}" 2137af9a7ee5Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2138af9a7ee5Smrg _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}" 2139af9a7ee5Smrg _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}" 2140af9a7ee5Smrg m4_if([$1], [CXX], 2141af9a7ee5Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2142af9a7ee5Smrg _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}" 2143af9a7ee5Smrg _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}" 2144af9a7ee5Smrg fi 2145af9a7ee5Smrg],[]) 2146af9a7ee5Smrg else 2147af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 2148af9a7ee5Smrg fi 2149caade7ccSmrg]) 2150caade7ccSmrg 2151af9a7ee5Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2152af9a7ee5Smrg# ---------------------------------- 2153af9a7ee5Smrg# Links a minimal program and checks the executable 2154af9a7ee5Smrg# for the system default hardcoded library path. In most cases, 2155af9a7ee5Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 2156af9a7ee5Smrg# the location of the communication and MPI libs are included too. 2157af9a7ee5Smrg# If we don't find anything, use the default library path according 2158af9a7ee5Smrg# to the aix ld manual. 2159af9a7ee5Smrg# Store the results from the different compilers for each TAGNAME. 2160af9a7ee5Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 2161af9a7ee5Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 2162af9a7ee5Smrg[m4_require([_LT_DECL_SED])dnl 2163af9a7ee5Smrgif test "${lt_cv_aix_libpath+set}" = set; then 2164af9a7ee5Smrg aix_libpath=$lt_cv_aix_libpath 2165af9a7ee5Smrgelse 2166af9a7ee5Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2167af9a7ee5Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2168af9a7ee5Smrg lt_aix_libpath_sed='[ 2169af9a7ee5Smrg /Import File Strings/,/^$/ { 2170af9a7ee5Smrg /^0/ { 2171af9a7ee5Smrg s/^0 *\([^ ]*\) *$/\1/ 2172af9a7ee5Smrg p 2173af9a7ee5Smrg } 2174af9a7ee5Smrg }]' 2175af9a7ee5Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2176af9a7ee5Smrg # Check for a 64-bit object if we didn't find anything. 2177af9a7ee5Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2178af9a7ee5Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2179af9a7ee5Smrg fi],[]) 2180af9a7ee5Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2181af9a7ee5Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2182af9a7ee5Smrg fi 2183af9a7ee5Smrg ]) 2184af9a7ee5Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2185af9a7ee5Smrgfi 2186af9a7ee5Smrg])# _LT_SYS_MODULE_PATH_AIX 2187caade7ccSmrg 2188caade7ccSmrg 2189af9a7ee5Smrg# _LT_SHELL_INIT(ARG) 2190af9a7ee5Smrg# ------------------- 2191af9a7ee5Smrgm4_define([_LT_SHELL_INIT], 2192af9a7ee5Smrg[m4_divert_text([M4SH-INIT], [$1 2193af9a7ee5Smrg])])# _LT_SHELL_INIT 2194caade7ccSmrg 2195caade7ccSmrg 2196485f0483Smrg 2197af9a7ee5Smrg# _LT_PROG_ECHO_BACKSLASH 2198af9a7ee5Smrg# ----------------------- 2199af9a7ee5Smrg# Find how we can fake an echo command that does not interpret backslash. 2200af9a7ee5Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 2201af9a7ee5Smrg# of the generated configure script which will find a shell with a builtin 2202af9a7ee5Smrg# printf (which we can use as an echo command). 2203af9a7ee5Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 2204af9a7ee5Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2205af9a7ee5SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2206af9a7ee5SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207caade7ccSmrg 2208af9a7ee5SmrgAC_MSG_CHECKING([how to print strings]) 2209af9a7ee5Smrg# Test print first, because it will be a builtin if present. 2210af9a7ee5Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2211af9a7ee5Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2212af9a7ee5Smrg ECHO='print -r --' 2213af9a7ee5Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2214af9a7ee5Smrg ECHO='printf %s\n' 2215af9a7ee5Smrgelse 2216af9a7ee5Smrg # Use this function as a fallback that always works. 2217af9a7ee5Smrg func_fallback_echo () 2218af9a7ee5Smrg { 2219af9a7ee5Smrg eval 'cat <<_LTECHO_EOF 2220af9a7ee5Smrg$[]1 2221af9a7ee5Smrg_LTECHO_EOF' 2222af9a7ee5Smrg } 2223af9a7ee5Smrg ECHO='func_fallback_echo' 2224af9a7ee5Smrgfi 2225caade7ccSmrg 2226af9a7ee5Smrg# func_echo_all arg... 2227af9a7ee5Smrg# Invoke $ECHO with all args, space-separated. 2228af9a7ee5Smrgfunc_echo_all () 2229af9a7ee5Smrg{ 2230af9a7ee5Smrg $ECHO "$*" 2231af9a7ee5Smrg} 2232caade7ccSmrg 2233af9a7ee5Smrgcase "$ECHO" in 2234af9a7ee5Smrg printf*) AC_MSG_RESULT([printf]) ;; 2235af9a7ee5Smrg print*) AC_MSG_RESULT([print -r]) ;; 2236af9a7ee5Smrg *) AC_MSG_RESULT([cat]) ;; 2237af9a7ee5Smrgesac 2238caade7ccSmrg 2239af9a7ee5Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 2240af9a7ee5Smrg[_AS_DETECT_SUGGESTED([ 2241af9a7ee5Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2242af9a7ee5Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2243af9a7ee5Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2244af9a7ee5Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2245af9a7ee5Smrg PATH=/empty FPATH=/empty; export PATH FPATH 2246af9a7ee5Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 2247af9a7ee5Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248caade7ccSmrg 2249af9a7ee5Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2250af9a7ee5Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2251af9a7ee5Smrg])# _LT_PROG_ECHO_BACKSLASH 2252caade7ccSmrg 2253caade7ccSmrg 2254af9a7ee5Smrg# _LT_WITH_SYSROOT 2255b9b4fd27Smrg# ---------------- 2256af9a7ee5SmrgAC_DEFUN([_LT_WITH_SYSROOT], 2257af9a7ee5Smrg[AC_MSG_CHECKING([for sysroot]) 2258af9a7ee5SmrgAC_ARG_WITH([sysroot], 2259af9a7ee5Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2260af9a7ee5Smrg (or the compiler's sysroot if not specified).], 2261af9a7ee5Smrg[], [with_sysroot=no]) 2262caade7ccSmrg 2263af9a7ee5Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 2264af9a7ee5Smrgdnl in case the user passed a directory name. 2265af9a7ee5Smrglt_sysroot= 2266af9a7ee5Smrgcase ${with_sysroot} in #( 2267af9a7ee5Smrg yes) 2268af9a7ee5Smrg if test "$GCC" = yes; then 2269af9a7ee5Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2270af9a7ee5Smrg fi 2271af9a7ee5Smrg ;; #( 2272af9a7ee5Smrg /*) 2273af9a7ee5Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2274af9a7ee5Smrg ;; #( 2275af9a7ee5Smrg no|'') 2276af9a7ee5Smrg ;; #( 2277af9a7ee5Smrg *) 2278af9a7ee5Smrg AC_MSG_RESULT([${with_sysroot}]) 2279af9a7ee5Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 2280af9a7ee5Smrg ;; 2281af9a7ee5Smrgesac 2282caade7ccSmrg 2283af9a7ee5Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 2284af9a7ee5Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2285af9a7ee5Smrg[dependent libraries, and in which our libraries should be installed.])]) 2286b9b4fd27Smrg 2287af9a7ee5Smrg# _LT_ENABLE_LOCK 2288af9a7ee5Smrg# --------------- 2289af9a7ee5Smrgm4_defun([_LT_ENABLE_LOCK], 2290af9a7ee5Smrg[AC_ARG_ENABLE([libtool-lock], 2291af9a7ee5Smrg [AS_HELP_STRING([--disable-libtool-lock], 2292af9a7ee5Smrg [avoid locking (might break parallel builds)])]) 2293af9a7ee5Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294b9b4fd27Smrg 2295af9a7ee5Smrg# Some flags need to be propagated to the compiler or linker for good 2296af9a7ee5Smrg# libtool support. 2297af9a7ee5Smrgcase $host in 2298af9a7ee5Smrgia64-*-hpux*) 2299af9a7ee5Smrg # Find out which ABI we are using. 2300af9a7ee5Smrg echo 'int i;' > conftest.$ac_ext 2301af9a7ee5Smrg if AC_TRY_EVAL(ac_compile); then 2302af9a7ee5Smrg case `/usr/bin/file conftest.$ac_objext` in 2303af9a7ee5Smrg *ELF-32*) 2304af9a7ee5Smrg HPUX_IA64_MODE="32" 2305af9a7ee5Smrg ;; 2306af9a7ee5Smrg *ELF-64*) 2307af9a7ee5Smrg HPUX_IA64_MODE="64" 2308af9a7ee5Smrg ;; 2309af9a7ee5Smrg esac 2310af9a7ee5Smrg fi 2311af9a7ee5Smrg rm -rf conftest* 2312af9a7ee5Smrg ;; 2313af9a7ee5Smrg*-*-irix6*) 2314af9a7ee5Smrg # Find out which ABI we are using. 2315af9a7ee5Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2316af9a7ee5Smrg if AC_TRY_EVAL(ac_compile); then 2317af9a7ee5Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2318af9a7ee5Smrg case `/usr/bin/file conftest.$ac_objext` in 2319af9a7ee5Smrg *32-bit*) 2320af9a7ee5Smrg LD="${LD-ld} -melf32bsmip" 2321af9a7ee5Smrg ;; 2322af9a7ee5Smrg *N32*) 2323af9a7ee5Smrg LD="${LD-ld} -melf32bmipn32" 2324af9a7ee5Smrg ;; 2325af9a7ee5Smrg *64-bit*) 2326af9a7ee5Smrg LD="${LD-ld} -melf64bmip" 2327af9a7ee5Smrg ;; 2328af9a7ee5Smrg esac 2329af9a7ee5Smrg else 2330af9a7ee5Smrg case `/usr/bin/file conftest.$ac_objext` in 2331af9a7ee5Smrg *32-bit*) 2332af9a7ee5Smrg LD="${LD-ld} -32" 2333af9a7ee5Smrg ;; 2334af9a7ee5Smrg *N32*) 2335af9a7ee5Smrg LD="${LD-ld} -n32" 2336af9a7ee5Smrg ;; 2337af9a7ee5Smrg *64-bit*) 2338af9a7ee5Smrg LD="${LD-ld} -64" 2339af9a7ee5Smrg ;; 2340af9a7ee5Smrg esac 2341af9a7ee5Smrg fi 2342af9a7ee5Smrg fi 2343af9a7ee5Smrg rm -rf conftest* 2344af9a7ee5Smrg ;; 2345b9b4fd27Smrg 2346af9a7ee5Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2347af9a7ee5Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2348af9a7ee5Smrg # Find out which ABI we are using. 2349af9a7ee5Smrg echo 'int i;' > conftest.$ac_ext 2350af9a7ee5Smrg if AC_TRY_EVAL(ac_compile); then 2351af9a7ee5Smrg case `/usr/bin/file conftest.o` in 2352af9a7ee5Smrg *32-bit*) 2353af9a7ee5Smrg case $host in 2354af9a7ee5Smrg x86_64-*kfreebsd*-gnu) 2355af9a7ee5Smrg LD="${LD-ld} -m elf_i386_fbsd" 2356af9a7ee5Smrg ;; 2357af9a7ee5Smrg x86_64-*linux*) 2358af9a7ee5Smrg LD="${LD-ld} -m elf_i386" 2359af9a7ee5Smrg ;; 2360af9a7ee5Smrg ppc64-*linux*|powerpc64-*linux*) 2361af9a7ee5Smrg LD="${LD-ld} -m elf32ppclinux" 2362af9a7ee5Smrg ;; 2363af9a7ee5Smrg s390x-*linux*) 2364af9a7ee5Smrg LD="${LD-ld} -m elf_s390" 2365af9a7ee5Smrg ;; 2366af9a7ee5Smrg sparc64-*linux*) 2367af9a7ee5Smrg LD="${LD-ld} -m elf32_sparc" 2368af9a7ee5Smrg ;; 2369af9a7ee5Smrg esac 2370af9a7ee5Smrg ;; 2371af9a7ee5Smrg *64-bit*) 2372af9a7ee5Smrg case $host in 2373af9a7ee5Smrg x86_64-*kfreebsd*-gnu) 2374af9a7ee5Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 2375af9a7ee5Smrg ;; 2376af9a7ee5Smrg x86_64-*linux*) 2377af9a7ee5Smrg LD="${LD-ld} -m elf_x86_64" 2378af9a7ee5Smrg ;; 2379af9a7ee5Smrg ppc*-*linux*|powerpc*-*linux*) 2380af9a7ee5Smrg LD="${LD-ld} -m elf64ppc" 2381af9a7ee5Smrg ;; 2382af9a7ee5Smrg s390*-*linux*|s390*-*tpf*) 2383af9a7ee5Smrg LD="${LD-ld} -m elf64_s390" 2384af9a7ee5Smrg ;; 2385af9a7ee5Smrg sparc*-*linux*) 2386af9a7ee5Smrg LD="${LD-ld} -m elf64_sparc" 2387af9a7ee5Smrg ;; 2388af9a7ee5Smrg esac 2389af9a7ee5Smrg ;; 2390caade7ccSmrg esac 2391af9a7ee5Smrg fi 2392af9a7ee5Smrg rm -rf conftest* 2393af9a7ee5Smrg ;; 2394caade7ccSmrg 2395af9a7ee5Smrg*-*-sco3.2v5*) 2396af9a7ee5Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2397af9a7ee5Smrg SAVE_CFLAGS="$CFLAGS" 2398af9a7ee5Smrg CFLAGS="$CFLAGS -belf" 2399af9a7ee5Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2400af9a7ee5Smrg [AC_LANG_PUSH(C) 2401af9a7ee5Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2402af9a7ee5Smrg AC_LANG_POP]) 2403af9a7ee5Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2404af9a7ee5Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2405af9a7ee5Smrg CFLAGS="$SAVE_CFLAGS" 2406af9a7ee5Smrg fi 2407af9a7ee5Smrg ;; 2408af9a7ee5Smrg*-*solaris*) 2409af9a7ee5Smrg # Find out which ABI we are using. 2410af9a7ee5Smrg echo 'int i;' > conftest.$ac_ext 2411af9a7ee5Smrg if AC_TRY_EVAL(ac_compile); then 2412af9a7ee5Smrg case `/usr/bin/file conftest.o` in 2413af9a7ee5Smrg *64-bit*) 2414af9a7ee5Smrg case $lt_cv_prog_gnu_ld in 2415af9a7ee5Smrg yes*) 2416af9a7ee5Smrg case $host in 2417af9a7ee5Smrg i?86-*-solaris*) 2418af9a7ee5Smrg LD="${LD-ld} -m elf_x86_64" 2419af9a7ee5Smrg ;; 2420af9a7ee5Smrg sparc*-*-solaris*) 2421af9a7ee5Smrg LD="${LD-ld} -m elf64_sparc" 2422af9a7ee5Smrg ;; 2423af9a7ee5Smrg esac 2424af9a7ee5Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2425af9a7ee5Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2426af9a7ee5Smrg LD="${LD-ld}_sol2" 2427af9a7ee5Smrg fi 2428af9a7ee5Smrg ;; 2429af9a7ee5Smrg *) 2430af9a7ee5Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2431af9a7ee5Smrg LD="${LD-ld} -64" 2432af9a7ee5Smrg fi 2433af9a7ee5Smrg ;; 2434af9a7ee5Smrg esac 2435caade7ccSmrg ;; 2436caade7ccSmrg esac 2437af9a7ee5Smrg fi 2438af9a7ee5Smrg rm -rf conftest* 2439af9a7ee5Smrg ;; 2440af9a7ee5Smrgesac 2441caade7ccSmrg 2442af9a7ee5Smrgneed_locks="$enable_libtool_lock" 2443af9a7ee5Smrg])# _LT_ENABLE_LOCK 2444caade7ccSmrg 2445caade7ccSmrg 2446af9a7ee5Smrg# _LT_PROG_AR 2447af9a7ee5Smrg# ----------- 2448af9a7ee5Smrgm4_defun([_LT_PROG_AR], 2449af9a7ee5Smrg[AC_CHECK_TOOLS(AR, [ar], false) 2450af9a7ee5Smrg: ${AR=ar} 2451af9a7ee5Smrg: ${AR_FLAGS=cru} 2452af9a7ee5Smrg_LT_DECL([], [AR], [1], [The archiver]) 2453af9a7ee5Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2454b9b4fd27Smrg 2455af9a7ee5SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2456af9a7ee5Smrg [lt_cv_ar_at_file=no 2457af9a7ee5Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2458af9a7ee5Smrg [echo conftest.$ac_objext > conftest.lst 2459af9a7ee5Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2460af9a7ee5Smrg AC_TRY_EVAL([lt_ar_try]) 2461af9a7ee5Smrg if test "$ac_status" -eq 0; then 2462af9a7ee5Smrg # Ensure the archiver fails upon bogus file names. 2463af9a7ee5Smrg rm -f conftest.$ac_objext libconftest.a 2464af9a7ee5Smrg AC_TRY_EVAL([lt_ar_try]) 2465af9a7ee5Smrg if test "$ac_status" -ne 0; then 2466af9a7ee5Smrg lt_cv_ar_at_file=@ 2467af9a7ee5Smrg fi 2468af9a7ee5Smrg fi 2469af9a7ee5Smrg rm -f conftest.* libconftest.a 2470af9a7ee5Smrg ]) 2471af9a7ee5Smrg ]) 2472caade7ccSmrg 2473af9a7ee5Smrgif test "x$lt_cv_ar_at_file" = xno; then 2474af9a7ee5Smrg archiver_list_spec= 2475af9a7ee5Smrgelse 2476af9a7ee5Smrg archiver_list_spec=$lt_cv_ar_at_file 2477af9a7ee5Smrgfi 2478af9a7ee5Smrg_LT_DECL([], [archiver_list_spec], [1], 2479af9a7ee5Smrg [How to feed a file listing to the archiver]) 2480af9a7ee5Smrg])# _LT_PROG_AR 2481caade7ccSmrg 2482caade7ccSmrg 2483af9a7ee5Smrg# _LT_CMD_OLD_ARCHIVE 2484af9a7ee5Smrg# ------------------- 2485af9a7ee5Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 2486af9a7ee5Smrg[_LT_PROG_AR 2487caade7ccSmrg 2488af9a7ee5SmrgAC_CHECK_TOOL(STRIP, strip, :) 2489af9a7ee5Smrgtest -z "$STRIP" && STRIP=: 2490af9a7ee5Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491caade7ccSmrg 2492af9a7ee5SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 2493af9a7ee5Smrgtest -z "$RANLIB" && RANLIB=: 2494af9a7ee5Smrg_LT_DECL([], [RANLIB], [1], 2495af9a7ee5Smrg [Commands used to install an old-style archive]) 2496b9b4fd27Smrg 2497af9a7ee5Smrg# Determine commands to create old-style static archives. 2498af9a7ee5Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2499af9a7ee5Smrgold_postinstall_cmds='chmod 644 $oldlib' 2500af9a7ee5Smrgold_postuninstall_cmds= 2501b9b4fd27Smrg 2502af9a7ee5Smrgif test -n "$RANLIB"; then 2503af9a7ee5Smrg case $host_os in 2504af9a7ee5Smrg openbsd*) 2505af9a7ee5Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2506af9a7ee5Smrg ;; 2507af9a7ee5Smrg *) 2508af9a7ee5Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2509af9a7ee5Smrg ;; 2510b9b4fd27Smrg esac 2511af9a7ee5Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2512b9b4fd27Smrgfi 2513b9b4fd27Smrg 2514af9a7ee5Smrgcase $host_os in 2515af9a7ee5Smrg darwin*) 2516af9a7ee5Smrg lock_old_archive_extraction=yes ;; 2517af9a7ee5Smrg *) 2518af9a7ee5Smrg lock_old_archive_extraction=no ;; 2519af9a7ee5Smrgesac 2520af9a7ee5Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 2521af9a7ee5Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 2522af9a7ee5Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 2523af9a7ee5Smrg [Commands used to build an old-style archive]) 2524af9a7ee5Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 2525af9a7ee5Smrg [Whether to use a lock for old archive extraction]) 2526af9a7ee5Smrg])# _LT_CMD_OLD_ARCHIVE 2527b9b4fd27Smrg 2528b9b4fd27Smrg 2529af9a7ee5Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2530af9a7ee5Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2531af9a7ee5Smrg# ---------------------------------------------------------------- 2532af9a7ee5Smrg# Check whether the given compiler option works 2533af9a7ee5SmrgAC_DEFUN([_LT_COMPILER_OPTION], 2534af9a7ee5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2535af9a7ee5Smrgm4_require([_LT_DECL_SED])dnl 2536af9a7ee5SmrgAC_CACHE_CHECK([$1], [$2], 2537af9a7ee5Smrg [$2=no 2538af9a7ee5Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2539af9a7ee5Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2540af9a7ee5Smrg lt_compiler_flag="$3" 2541af9a7ee5Smrg # Insert the option either (1) after the last *FLAGS variable, or 2542af9a7ee5Smrg # (2) before a word containing "conftest.", or (3) at the end. 2543af9a7ee5Smrg # Note that $ac_compile itself does not contain backslashes and begins 2544af9a7ee5Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2545af9a7ee5Smrg # The option is referenced via a variable to avoid confusing sed. 2546af9a7ee5Smrg lt_compile=`echo "$ac_compile" | $SED \ 2547af9a7ee5Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2548af9a7ee5Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2549af9a7ee5Smrg -e 's:$: $lt_compiler_flag:'` 2550af9a7ee5Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2551af9a7ee5Smrg (eval "$lt_compile" 2>conftest.err) 2552af9a7ee5Smrg ac_status=$? 2553af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2554af9a7ee5Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2555af9a7ee5Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 2556af9a7ee5Smrg # The compiler can only warn and ignore the option if not recognized 2557af9a7ee5Smrg # So say no if there are warnings other than the usual output. 2558af9a7ee5Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2559af9a7ee5Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2560af9a7ee5Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2561af9a7ee5Smrg $2=yes 2562af9a7ee5Smrg fi 2563af9a7ee5Smrg fi 2564af9a7ee5Smrg $RM conftest* 2565af9a7ee5Smrg]) 2566af9a7ee5Smrg 2567af9a7ee5Smrgif test x"[$]$2" = xyes; then 2568af9a7ee5Smrg m4_if([$5], , :, [$5]) 2569af9a7ee5Smrgelse 2570af9a7ee5Smrg m4_if([$6], , :, [$6]) 2571af9a7ee5Smrgfi 2572af9a7ee5Smrg])# _LT_COMPILER_OPTION 2573caade7ccSmrg 2574af9a7ee5Smrg# Old name: 2575af9a7ee5SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2576af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 2577af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578caade7ccSmrg 2579af9a7ee5Smrg 2580af9a7ee5Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2581af9a7ee5Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2582af9a7ee5Smrg# ---------------------------------------------------- 2583af9a7ee5Smrg# Check whether the given linker option works 2584af9a7ee5SmrgAC_DEFUN([_LT_LINKER_OPTION], 2585b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2586af9a7ee5Smrgm4_require([_LT_DECL_SED])dnl 2587af9a7ee5SmrgAC_CACHE_CHECK([$1], [$2], 2588af9a7ee5Smrg [$2=no 2589af9a7ee5Smrg save_LDFLAGS="$LDFLAGS" 2590af9a7ee5Smrg LDFLAGS="$LDFLAGS $3" 2591af9a7ee5Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 2592af9a7ee5Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2593af9a7ee5Smrg # The linker can only warn and ignore the option if not recognized 2594af9a7ee5Smrg # So say no if there are warnings 2595af9a7ee5Smrg if test -s conftest.err; then 2596af9a7ee5Smrg # Append any errors to the config.log. 2597af9a7ee5Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2598af9a7ee5Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2599af9a7ee5Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2600af9a7ee5Smrg if diff conftest.exp conftest.er2 >/dev/null; then 2601af9a7ee5Smrg $2=yes 2602af9a7ee5Smrg fi 2603af9a7ee5Smrg else 2604af9a7ee5Smrg $2=yes 2605af9a7ee5Smrg fi 2606af9a7ee5Smrg fi 2607af9a7ee5Smrg $RM -r conftest* 2608af9a7ee5Smrg LDFLAGS="$save_LDFLAGS" 2609af9a7ee5Smrg]) 2610caade7ccSmrg 2611af9a7ee5Smrgif test x"[$]$2" = xyes; then 2612af9a7ee5Smrg m4_if([$4], , :, [$4]) 2613af9a7ee5Smrgelse 2614af9a7ee5Smrg m4_if([$5], , :, [$5]) 2615af9a7ee5Smrgfi 2616af9a7ee5Smrg])# _LT_LINKER_OPTION 2617caade7ccSmrg 2618af9a7ee5Smrg# Old name: 2619af9a7ee5SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2620af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 2621af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2622caade7ccSmrg 2623caade7ccSmrg 2624af9a7ee5Smrg# LT_CMD_MAX_LEN 2625af9a7ee5Smrg#--------------- 2626af9a7ee5SmrgAC_DEFUN([LT_CMD_MAX_LEN], 2627af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2628af9a7ee5Smrg# find the maximum length of command line arguments 2629af9a7ee5SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2630af9a7ee5SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2631af9a7ee5Smrg i=0 2632af9a7ee5Smrg teststring="ABCD" 2633caade7ccSmrg 2634af9a7ee5Smrg case $build_os in 2635af9a7ee5Smrg msdosdjgpp*) 2636af9a7ee5Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2637af9a7ee5Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2638af9a7ee5Smrg # during glob expansion). Even if it were fixed, the result of this 2639af9a7ee5Smrg # check would be larger than it should be. 2640af9a7ee5Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2641af9a7ee5Smrg ;; 2642caade7ccSmrg 2643af9a7ee5Smrg gnu*) 2644af9a7ee5Smrg # Under GNU Hurd, this test is not required because there is 2645af9a7ee5Smrg # no limit to the length of command line arguments. 2646af9a7ee5Smrg # Libtool will interpret -1 as no limit whatsoever 2647af9a7ee5Smrg lt_cv_sys_max_cmd_len=-1; 2648caade7ccSmrg ;; 2649caade7ccSmrg 2650af9a7ee5Smrg cygwin* | mingw* | cegcc*) 2651af9a7ee5Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2652af9a7ee5Smrg # about 5 minutes as the teststring grows exponentially. 2653af9a7ee5Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 2654af9a7ee5Smrg # you end up with a "frozen" computer, even though with patience 2655af9a7ee5Smrg # the test eventually succeeds (with a max line length of 256k). 2656af9a7ee5Smrg # Instead, let's just punt: use the minimum linelength reported by 2657af9a7ee5Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 2658af9a7ee5Smrg lt_cv_sys_max_cmd_len=8192; 2659af9a7ee5Smrg ;; 2660caade7ccSmrg 2661af9a7ee5Smrg mint*) 2662af9a7ee5Smrg # On MiNT this can take a long time and run out of memory. 2663af9a7ee5Smrg lt_cv_sys_max_cmd_len=8192; 2664af9a7ee5Smrg ;; 2665caade7ccSmrg 2666af9a7ee5Smrg amigaos*) 2667af9a7ee5Smrg # On AmigaOS with pdksh, this test takes hours, literally. 2668af9a7ee5Smrg # So we just punt and use a minimum line length of 8192. 2669af9a7ee5Smrg lt_cv_sys_max_cmd_len=8192; 2670af9a7ee5Smrg ;; 2671caade7ccSmrg 2672af9a7ee5Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2673af9a7ee5Smrg # This has been around since 386BSD, at least. Likely further. 2674af9a7ee5Smrg if test -x /sbin/sysctl; then 2675af9a7ee5Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2676af9a7ee5Smrg elif test -x /usr/sbin/sysctl; then 2677af9a7ee5Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2678af9a7ee5Smrg else 2679af9a7ee5Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2680af9a7ee5Smrg fi 2681af9a7ee5Smrg # And add a safety zone 2682af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2683af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2684af9a7ee5Smrg ;; 2685caade7ccSmrg 2686af9a7ee5Smrg interix*) 2687af9a7ee5Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2688af9a7ee5Smrg lt_cv_sys_max_cmd_len=196608 2689af9a7ee5Smrg ;; 2690caade7ccSmrg 2691af9a7ee5Smrg os2*) 2692af9a7ee5Smrg # The test takes a long time on OS/2. 2693af9a7ee5Smrg lt_cv_sys_max_cmd_len=8192 2694af9a7ee5Smrg ;; 2695caade7ccSmrg 2696af9a7ee5Smrg osf*) 2697af9a7ee5Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2698af9a7ee5Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2699af9a7ee5Smrg # nice to cause kernel panics so lets avoid the loop below. 2700af9a7ee5Smrg # First set a reasonable default. 2701af9a7ee5Smrg lt_cv_sys_max_cmd_len=16384 2702af9a7ee5Smrg # 2703af9a7ee5Smrg if test -x /sbin/sysconfig; then 2704af9a7ee5Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2705af9a7ee5Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 2706af9a7ee5Smrg esac 2707af9a7ee5Smrg fi 2708af9a7ee5Smrg ;; 2709af9a7ee5Smrg sco3.2v5*) 2710af9a7ee5Smrg lt_cv_sys_max_cmd_len=102400 2711af9a7ee5Smrg ;; 2712af9a7ee5Smrg sysv5* | sco5v6* | sysv4.2uw2*) 2713af9a7ee5Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2714af9a7ee5Smrg if test -n "$kargmax"; then 2715af9a7ee5Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2716af9a7ee5Smrg else 2717af9a7ee5Smrg lt_cv_sys_max_cmd_len=32768 2718af9a7ee5Smrg fi 2719af9a7ee5Smrg ;; 2720af9a7ee5Smrg *) 2721af9a7ee5Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2722af9a7ee5Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 2723af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2724af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2725af9a7ee5Smrg else 2726af9a7ee5Smrg # Make teststring a little bigger before we do anything with it. 2727af9a7ee5Smrg # a 1K string should be a reasonable start. 2728af9a7ee5Smrg for i in 1 2 3 4 5 6 7 8 ; do 2729af9a7ee5Smrg teststring=$teststring$teststring 2730af9a7ee5Smrg done 2731af9a7ee5Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2732af9a7ee5Smrg # If test is not a shell built-in, we'll probably end up computing a 2733af9a7ee5Smrg # maximum length that is only half of the actual maximum length, but 2734af9a7ee5Smrg # we can't tell. 2735af9a7ee5Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2736af9a7ee5Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 2737af9a7ee5Smrg test $i != 17 # 1/2 MB should be enough 2738af9a7ee5Smrg do 2739af9a7ee5Smrg i=`expr $i + 1` 2740af9a7ee5Smrg teststring=$teststring$teststring 2741af9a7ee5Smrg done 2742af9a7ee5Smrg # Only check the string length outside the loop. 2743af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2744af9a7ee5Smrg teststring= 2745af9a7ee5Smrg # Add a significant safety factor because C++ compilers can tack on 2746af9a7ee5Smrg # massive amounts of additional arguments before passing them to the 2747af9a7ee5Smrg # linker. It appears as though 1/2 is a usable value. 2748af9a7ee5Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2749af9a7ee5Smrg fi 2750af9a7ee5Smrg ;; 2751af9a7ee5Smrg esac 2752af9a7ee5Smrg]) 2753af9a7ee5Smrgif test -n $lt_cv_sys_max_cmd_len ; then 2754af9a7ee5Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2755af9a7ee5Smrgelse 2756af9a7ee5Smrg AC_MSG_RESULT(none) 2757af9a7ee5Smrgfi 2758af9a7ee5Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 2759af9a7ee5Smrg_LT_DECL([], [max_cmd_len], [0], 2760af9a7ee5Smrg [What is the maximum length of a command?]) 2761af9a7ee5Smrg])# LT_CMD_MAX_LEN 2762caade7ccSmrg 2763af9a7ee5Smrg# Old name: 2764af9a7ee5SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2765af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 2766af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2767caade7ccSmrg 2768caade7ccSmrg 2769af9a7ee5Smrg# _LT_HEADER_DLFCN 2770af9a7ee5Smrg# ---------------- 2771af9a7ee5Smrgm4_defun([_LT_HEADER_DLFCN], 2772af9a7ee5Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2773af9a7ee5Smrg])# _LT_HEADER_DLFCN 2774caade7ccSmrg 2775b9b4fd27Smrg 2776af9a7ee5Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2777af9a7ee5Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2778af9a7ee5Smrg# ---------------------------------------------------------------- 2779af9a7ee5Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 2780af9a7ee5Smrg[m4_require([_LT_HEADER_DLFCN])dnl 2781af9a7ee5Smrgif test "$cross_compiling" = yes; then : 2782af9a7ee5Smrg [$4] 2783af9a7ee5Smrgelse 2784af9a7ee5Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2785af9a7ee5Smrg lt_status=$lt_dlunknown 2786af9a7ee5Smrg cat > conftest.$ac_ext <<_LT_EOF 2787af9a7ee5Smrg[#line $LINENO "configure" 2788af9a7ee5Smrg#include "confdefs.h" 2789b9b4fd27Smrg 2790af9a7ee5Smrg#if HAVE_DLFCN_H 2791af9a7ee5Smrg#include <dlfcn.h> 2792af9a7ee5Smrg#endif 2793caade7ccSmrg 2794af9a7ee5Smrg#include <stdio.h> 2795caade7ccSmrg 2796af9a7ee5Smrg#ifdef RTLD_GLOBAL 2797af9a7ee5Smrg# define LT_DLGLOBAL RTLD_GLOBAL 2798af9a7ee5Smrg#else 2799af9a7ee5Smrg# ifdef DL_GLOBAL 2800af9a7ee5Smrg# define LT_DLGLOBAL DL_GLOBAL 2801af9a7ee5Smrg# else 2802af9a7ee5Smrg# define LT_DLGLOBAL 0 2803af9a7ee5Smrg# endif 2804af9a7ee5Smrg#endif 2805b9b4fd27Smrg 2806af9a7ee5Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2807af9a7ee5Smrg find out it does not work in some platform. */ 2808af9a7ee5Smrg#ifndef LT_DLLAZY_OR_NOW 2809af9a7ee5Smrg# ifdef RTLD_LAZY 2810af9a7ee5Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2811af9a7ee5Smrg# else 2812af9a7ee5Smrg# ifdef DL_LAZY 2813af9a7ee5Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 2814af9a7ee5Smrg# else 2815af9a7ee5Smrg# ifdef RTLD_NOW 2816af9a7ee5Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2817af9a7ee5Smrg# else 2818af9a7ee5Smrg# ifdef DL_NOW 2819af9a7ee5Smrg# define LT_DLLAZY_OR_NOW DL_NOW 2820af9a7ee5Smrg# else 2821af9a7ee5Smrg# define LT_DLLAZY_OR_NOW 0 2822af9a7ee5Smrg# endif 2823af9a7ee5Smrg# endif 2824af9a7ee5Smrg# endif 2825af9a7ee5Smrg# endif 2826af9a7ee5Smrg#endif 2827b9b4fd27Smrg 2828af9a7ee5Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 2829af9a7ee5Smrg correspondingly for the symbols needed. */ 2830af9a7ee5Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2831af9a7ee5Smrgint fnord () __attribute__((visibility("default"))); 2832af9a7ee5Smrg#endif 2833b9b4fd27Smrg 2834af9a7ee5Smrgint fnord () { return 42; } 2835af9a7ee5Smrgint main () 2836af9a7ee5Smrg{ 2837af9a7ee5Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2838af9a7ee5Smrg int status = $lt_dlunknown; 2839b9b4fd27Smrg 2840af9a7ee5Smrg if (self) 2841af9a7ee5Smrg { 2842af9a7ee5Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2843af9a7ee5Smrg else 2844af9a7ee5Smrg { 2845af9a7ee5Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2846af9a7ee5Smrg else puts (dlerror ()); 2847af9a7ee5Smrg } 2848af9a7ee5Smrg /* dlclose (self); */ 2849af9a7ee5Smrg } 2850af9a7ee5Smrg else 2851af9a7ee5Smrg puts (dlerror ()); 2852b9b4fd27Smrg 2853af9a7ee5Smrg return status; 2854af9a7ee5Smrg}] 2855af9a7ee5Smrg_LT_EOF 2856af9a7ee5Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2857af9a7ee5Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2858af9a7ee5Smrg lt_status=$? 2859af9a7ee5Smrg case x$lt_status in 2860af9a7ee5Smrg x$lt_dlno_uscore) $1 ;; 2861af9a7ee5Smrg x$lt_dlneed_uscore) $2 ;; 2862af9a7ee5Smrg x$lt_dlunknown|x*) $3 ;; 2863af9a7ee5Smrg esac 2864af9a7ee5Smrg else : 2865af9a7ee5Smrg # compilation failed 2866af9a7ee5Smrg $3 2867af9a7ee5Smrg fi 2868af9a7ee5Smrgfi 2869af9a7ee5Smrgrm -fr conftest* 2870af9a7ee5Smrg])# _LT_TRY_DLOPEN_SELF 2871b9b4fd27Smrg 2872b9b4fd27Smrg 2873af9a7ee5Smrg# LT_SYS_DLOPEN_SELF 2874af9a7ee5Smrg# ------------------ 2875af9a7ee5SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 2876af9a7ee5Smrg[m4_require([_LT_HEADER_DLFCN])dnl 2877af9a7ee5Smrgif test "x$enable_dlopen" != xyes; then 2878af9a7ee5Smrg enable_dlopen=unknown 2879af9a7ee5Smrg enable_dlopen_self=unknown 2880af9a7ee5Smrg enable_dlopen_self_static=unknown 2881af9a7ee5Smrgelse 2882af9a7ee5Smrg lt_cv_dlopen=no 2883af9a7ee5Smrg lt_cv_dlopen_libs= 2884caade7ccSmrg 2885af9a7ee5Smrg case $host_os in 2886af9a7ee5Smrg beos*) 2887af9a7ee5Smrg lt_cv_dlopen="load_add_on" 2888af9a7ee5Smrg lt_cv_dlopen_libs= 2889af9a7ee5Smrg lt_cv_dlopen_self=yes 2890af9a7ee5Smrg ;; 2891caade7ccSmrg 2892af9a7ee5Smrg mingw* | pw32* | cegcc*) 2893af9a7ee5Smrg lt_cv_dlopen="LoadLibrary" 2894af9a7ee5Smrg lt_cv_dlopen_libs= 2895af9a7ee5Smrg ;; 2896caade7ccSmrg 2897af9a7ee5Smrg cygwin*) 2898af9a7ee5Smrg lt_cv_dlopen="dlopen" 2899af9a7ee5Smrg lt_cv_dlopen_libs= 2900af9a7ee5Smrg ;; 2901caade7ccSmrg 2902af9a7ee5Smrg darwin*) 2903af9a7ee5Smrg # if libdl is installed we need to link against it 2904af9a7ee5Smrg AC_CHECK_LIB([dl], [dlopen], 2905af9a7ee5Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2906af9a7ee5Smrg lt_cv_dlopen="dyld" 2907af9a7ee5Smrg lt_cv_dlopen_libs= 2908af9a7ee5Smrg lt_cv_dlopen_self=yes 2909af9a7ee5Smrg ]) 2910af9a7ee5Smrg ;; 2911caade7ccSmrg 2912af9a7ee5Smrg *) 2913af9a7ee5Smrg AC_CHECK_FUNC([shl_load], 2914af9a7ee5Smrg [lt_cv_dlopen="shl_load"], 2915af9a7ee5Smrg [AC_CHECK_LIB([dld], [shl_load], 2916af9a7ee5Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 2917af9a7ee5Smrg [AC_CHECK_FUNC([dlopen], 2918af9a7ee5Smrg [lt_cv_dlopen="dlopen"], 2919af9a7ee5Smrg [AC_CHECK_LIB([dl], [dlopen], 2920af9a7ee5Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2921af9a7ee5Smrg [AC_CHECK_LIB([svld], [dlopen], 2922af9a7ee5Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2923af9a7ee5Smrg [AC_CHECK_LIB([dld], [dld_link], 2924af9a7ee5Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 2925af9a7ee5Smrg ]) 2926af9a7ee5Smrg ]) 2927af9a7ee5Smrg ]) 2928af9a7ee5Smrg ]) 2929af9a7ee5Smrg ]) 2930af9a7ee5Smrg ;; 2931af9a7ee5Smrg esac 2932caade7ccSmrg 2933af9a7ee5Smrg if test "x$lt_cv_dlopen" != xno; then 2934af9a7ee5Smrg enable_dlopen=yes 2935af9a7ee5Smrg else 2936af9a7ee5Smrg enable_dlopen=no 2937af9a7ee5Smrg fi 2938caade7ccSmrg 2939af9a7ee5Smrg case $lt_cv_dlopen in 2940af9a7ee5Smrg dlopen) 2941af9a7ee5Smrg save_CPPFLAGS="$CPPFLAGS" 2942af9a7ee5Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2943caade7ccSmrg 2944af9a7ee5Smrg save_LDFLAGS="$LDFLAGS" 2945af9a7ee5Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2946caade7ccSmrg 2947af9a7ee5Smrg save_LIBS="$LIBS" 2948af9a7ee5Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2949caade7ccSmrg 2950af9a7ee5Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2951af9a7ee5Smrg lt_cv_dlopen_self, [dnl 2952af9a7ee5Smrg _LT_TRY_DLOPEN_SELF( 2953af9a7ee5Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2954af9a7ee5Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2955e8a5466aSmrg ]) 2956af9a7ee5Smrg 2957af9a7ee5Smrg if test "x$lt_cv_dlopen_self" = xyes; then 2958af9a7ee5Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2959af9a7ee5Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2960af9a7ee5Smrg lt_cv_dlopen_self_static, [dnl 2961af9a7ee5Smrg _LT_TRY_DLOPEN_SELF( 2962af9a7ee5Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2963af9a7ee5Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2964af9a7ee5Smrg ]) 2965b9b4fd27Smrg fi 2966af9a7ee5Smrg 2967af9a7ee5Smrg CPPFLAGS="$save_CPPFLAGS" 2968af9a7ee5Smrg LDFLAGS="$save_LDFLAGS" 2969af9a7ee5Smrg LIBS="$save_LIBS" 2970b9b4fd27Smrg ;; 2971caade7ccSmrg esac 2972b9b4fd27Smrg 2973af9a7ee5Smrg case $lt_cv_dlopen_self in 2974af9a7ee5Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2975af9a7ee5Smrg *) enable_dlopen_self=unknown ;; 2976caade7ccSmrg esac 2977caade7ccSmrg 2978af9a7ee5Smrg case $lt_cv_dlopen_self_static in 2979af9a7ee5Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2980af9a7ee5Smrg *) enable_dlopen_self_static=unknown ;; 2981af9a7ee5Smrg esac 2982a5602400Smrgfi 2983af9a7ee5Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2984af9a7ee5Smrg [Whether dlopen is supported]) 2985af9a7ee5Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2986af9a7ee5Smrg [Whether dlopen of programs is supported]) 2987af9a7ee5Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2988af9a7ee5Smrg [Whether dlopen of statically linked programs is supported]) 2989af9a7ee5Smrg])# LT_SYS_DLOPEN_SELF 2990caade7ccSmrg 2991af9a7ee5Smrg# Old name: 2992af9a7ee5SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2993af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 2994af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2995caade7ccSmrg 2996e8a5466aSmrg 2997af9a7ee5Smrg# _LT_COMPILER_C_O([TAGNAME]) 2998af9a7ee5Smrg# --------------------------- 2999af9a7ee5Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 3000af9a7ee5Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3001af9a7ee5Smrgm4_defun([_LT_COMPILER_C_O], 3002af9a7ee5Smrg[m4_require([_LT_DECL_SED])dnl 3003af9a7ee5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3004af9a7ee5Smrgm4_require([_LT_TAG_COMPILER])dnl 3005af9a7ee5SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3006af9a7ee5Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3007af9a7ee5Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3008af9a7ee5Smrg $RM -r conftest 2>/dev/null 3009af9a7ee5Smrg mkdir conftest 3010af9a7ee5Smrg cd conftest 3011af9a7ee5Smrg mkdir out 3012af9a7ee5Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3013caade7ccSmrg 3014af9a7ee5Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3015af9a7ee5Smrg # Insert the option either (1) after the last *FLAGS variable, or 3016af9a7ee5Smrg # (2) before a word containing "conftest.", or (3) at the end. 3017af9a7ee5Smrg # Note that $ac_compile itself does not contain backslashes and begins 3018af9a7ee5Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3019af9a7ee5Smrg lt_compile=`echo "$ac_compile" | $SED \ 3020af9a7ee5Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3021af9a7ee5Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3022af9a7ee5Smrg -e 's:$: $lt_compiler_flag:'` 3023af9a7ee5Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3024af9a7ee5Smrg (eval "$lt_compile" 2>out/conftest.err) 3025af9a7ee5Smrg ac_status=$? 3026af9a7ee5Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 3027af9a7ee5Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3028af9a7ee5Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 3029af9a7ee5Smrg then 3030af9a7ee5Smrg # The compiler can only warn and ignore the option if not recognized 3031af9a7ee5Smrg # So say no if there are warnings 3032af9a7ee5Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3033af9a7ee5Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3034af9a7ee5Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3035af9a7ee5Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3036af9a7ee5Smrg fi 3037af9a7ee5Smrg fi 3038af9a7ee5Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 3039af9a7ee5Smrg $RM conftest* 3040af9a7ee5Smrg # SGI C++ compiler will create directory out/ii_files/ for 3041af9a7ee5Smrg # template instantiation 3042af9a7ee5Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3043af9a7ee5Smrg $RM out/* && rmdir out 3044af9a7ee5Smrg cd .. 3045af9a7ee5Smrg $RM -r conftest 3046af9a7ee5Smrg $RM conftest* 3047af9a7ee5Smrg]) 3048af9a7ee5Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3049af9a7ee5Smrg [Does compiler simultaneously support -c and -o options?]) 3050af9a7ee5Smrg])# _LT_COMPILER_C_O 3051caade7ccSmrg 3052e8a5466aSmrg 3053af9a7ee5Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3054af9a7ee5Smrg# ---------------------------------- 3055af9a7ee5Smrg# Check to see if we can do hard links to lock some files if needed 3056af9a7ee5Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 3057af9a7ee5Smrg[m4_require([_LT_ENABLE_LOCK])dnl 3058af9a7ee5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3059af9a7ee5Smrg_LT_COMPILER_C_O([$1]) 3060af9a7ee5Smrg 3061af9a7ee5Smrghard_links="nottested" 3062af9a7ee5Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3063af9a7ee5Smrg # do not overwrite the value of need_locks provided by the user 3064af9a7ee5Smrg AC_MSG_CHECKING([if we can lock with hard links]) 3065af9a7ee5Smrg hard_links=yes 3066af9a7ee5Smrg $RM conftest* 3067af9a7ee5Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3068af9a7ee5Smrg touch conftest.a 3069af9a7ee5Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 3070af9a7ee5Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3071af9a7ee5Smrg AC_MSG_RESULT([$hard_links]) 3072af9a7ee5Smrg if test "$hard_links" = no; then 3073af9a7ee5Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3074af9a7ee5Smrg need_locks=warn 3075af9a7ee5Smrg fi 3076caade7ccSmrgelse 3077af9a7ee5Smrg need_locks=no 3078caade7ccSmrgfi 3079af9a7ee5Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3080af9a7ee5Smrg])# _LT_COMPILER_FILE_LOCKS 3081caade7ccSmrg 3082b9b4fd27Smrg 3083af9a7ee5Smrg# _LT_CHECK_OBJDIR 3084af9a7ee5Smrg# ---------------- 3085af9a7ee5Smrgm4_defun([_LT_CHECK_OBJDIR], 3086af9a7ee5Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3087af9a7ee5Smrg[rm -f .libs 2>/dev/null 3088af9a7ee5Smrgmkdir .libs 2>/dev/null 3089af9a7ee5Smrgif test -d .libs; then 3090af9a7ee5Smrg lt_cv_objdir=.libs 3091af9a7ee5Smrgelse 3092af9a7ee5Smrg # MS-DOS does not allow filenames that begin with a dot. 3093af9a7ee5Smrg lt_cv_objdir=_libs 3094af9a7ee5Smrgfi 3095af9a7ee5Smrgrmdir .libs 2>/dev/null]) 3096af9a7ee5Smrgobjdir=$lt_cv_objdir 3097af9a7ee5Smrg_LT_DECL([], [objdir], [0], 3098af9a7ee5Smrg [The name of the directory that contains temporary libtool files])dnl 3099af9a7ee5Smrgm4_pattern_allow([LT_OBJDIR])dnl 3100af9a7ee5SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3101af9a7ee5Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3102af9a7ee5Smrg])# _LT_CHECK_OBJDIR 3103caade7ccSmrg 3104caade7ccSmrg 3105af9a7ee5Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3106af9a7ee5Smrg# -------------------------------------- 3107af9a7ee5Smrg# Check hardcoding attributes. 3108af9a7ee5Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3109af9a7ee5Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3110af9a7ee5Smrg_LT_TAGVAR(hardcode_action, $1)= 3111af9a7ee5Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3112af9a7ee5Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 3113af9a7ee5Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3114caade7ccSmrg 3115af9a7ee5Smrg # We can hardcode non-existent directories. 3116af9a7ee5Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3117af9a7ee5Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 3118af9a7ee5Smrg # have to relink, otherwise we might link with an installed library 3119af9a7ee5Smrg # when we should be linking with a yet-to-be-installed one 3120af9a7ee5Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3121af9a7ee5Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3122af9a7ee5Smrg # Linking always hardcodes the temporary library directory. 3123af9a7ee5Smrg _LT_TAGVAR(hardcode_action, $1)=relink 3124af9a7ee5Smrg else 3125af9a7ee5Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 3126af9a7ee5Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 3127af9a7ee5Smrg fi 3128af9a7ee5Smrgelse 3129af9a7ee5Smrg # We cannot hardcode anything, or else we can only hardcode existing 3130af9a7ee5Smrg # directories. 3131af9a7ee5Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 3132af9a7ee5Smrgfi 3133af9a7ee5SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3134a5602400Smrg 3135af9a7ee5Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3136af9a7ee5Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3137af9a7ee5Smrg # Fast installation is not supported 3138af9a7ee5Smrg enable_fast_install=no 3139af9a7ee5Smrgelif test "$shlibpath_overrides_runpath" = yes || 3140af9a7ee5Smrg test "$enable_shared" = no; then 3141af9a7ee5Smrg # Fast installation is not necessary 3142af9a7ee5Smrg enable_fast_install=needless 3143a5602400Smrgfi 3144af9a7ee5Smrg_LT_TAGDECL([], [hardcode_action], [0], 3145af9a7ee5Smrg [How to hardcode a shared library path into an executable]) 3146af9a7ee5Smrg])# _LT_LINKER_HARDCODE_LIBPATH 3147caade7ccSmrg 3148caade7ccSmrg 3149af9a7ee5Smrg# _LT_CMD_STRIPLIB 3150af9a7ee5Smrg# ---------------- 3151af9a7ee5Smrgm4_defun([_LT_CMD_STRIPLIB], 3152af9a7ee5Smrg[m4_require([_LT_DECL_EGREP]) 3153af9a7ee5Smrgstriplib= 3154af9a7ee5Smrgold_striplib= 3155af9a7ee5SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 3156af9a7ee5Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3157af9a7ee5Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3158af9a7ee5Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3159af9a7ee5Smrg AC_MSG_RESULT([yes]) 3160af9a7ee5Smrgelse 3161af9a7ee5Smrg# FIXME - insert some real tests, host_os isn't really good enough 3162caade7ccSmrg case $host_os in 3163af9a7ee5Smrg darwin*) 3164af9a7ee5Smrg if test -n "$STRIP" ; then 3165af9a7ee5Smrg striplib="$STRIP -x" 3166af9a7ee5Smrg old_striplib="$STRIP -S" 3167af9a7ee5Smrg AC_MSG_RESULT([yes]) 3168af9a7ee5Smrg else 3169af9a7ee5Smrg AC_MSG_RESULT([no]) 3170af9a7ee5Smrg fi 3171caade7ccSmrg ;; 3172b9b4fd27Smrg *) 3173af9a7ee5Smrg AC_MSG_RESULT([no]) 3174caade7ccSmrg ;; 3175caade7ccSmrg esac 3176b9b4fd27Smrgfi 3177af9a7ee5Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3178af9a7ee5Smrg_LT_DECL([], [striplib], [1]) 3179af9a7ee5Smrg])# _LT_CMD_STRIPLIB 3180caade7ccSmrg 3181caade7ccSmrg 3182af9a7ee5Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 3183af9a7ee5Smrg# ----------------------------- 3184af9a7ee5Smrg# PORTME Fill in your ld.so characteristics 3185af9a7ee5Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 3186af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3187af9a7ee5Smrgm4_require([_LT_DECL_EGREP])dnl 3188af9a7ee5Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3189af9a7ee5Smrgm4_require([_LT_DECL_OBJDUMP])dnl 3190b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 3191af9a7ee5Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3192af9a7ee5SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 3193af9a7ee5Smrgm4_if([$1], 3194af9a7ee5Smrg [], [ 3195af9a7ee5Smrgif test "$GCC" = yes; then 3196af9a7ee5Smrg case $host_os in 3197af9a7ee5Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3198af9a7ee5Smrg *) lt_awk_arg="/^libraries:/" ;; 3199af9a7ee5Smrg esac 3200af9a7ee5Smrg case $host_os in 3201af9a7ee5Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3202af9a7ee5Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 3203af9a7ee5Smrg esac 3204af9a7ee5Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3205af9a7ee5Smrg case $lt_search_path_spec in 3206af9a7ee5Smrg *\;*) 3207af9a7ee5Smrg # if the path contains ";" then we assume it to be the separator 3208af9a7ee5Smrg # otherwise default to the standard path separator (i.e. ":") - it is 3209af9a7ee5Smrg # assumed that no part of a normal pathname contains ";" but that should 3210af9a7ee5Smrg # okay in the real world where ";" in dirpaths is itself problematic. 3211af9a7ee5Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3212af9a7ee5Smrg ;; 3213af9a7ee5Smrg *) 3214af9a7ee5Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3215af9a7ee5Smrg ;; 3216af9a7ee5Smrg esac 3217af9a7ee5Smrg # Ok, now we have the path, separated by spaces, we can step through it 3218af9a7ee5Smrg # and add multilib dir if necessary. 3219af9a7ee5Smrg lt_tmp_lt_search_path_spec= 3220af9a7ee5Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3221af9a7ee5Smrg for lt_sys_path in $lt_search_path_spec; do 3222af9a7ee5Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3223af9a7ee5Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3224af9a7ee5Smrg else 3225af9a7ee5Smrg test -d "$lt_sys_path" && \ 3226af9a7ee5Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3227af9a7ee5Smrg fi 3228af9a7ee5Smrg done 3229af9a7ee5Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3230af9a7ee5SmrgBEGIN {RS=" "; FS="/|\n";} { 3231af9a7ee5Smrg lt_foo=""; 3232af9a7ee5Smrg lt_count=0; 3233af9a7ee5Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 3234af9a7ee5Smrg if ($lt_i != "" && $lt_i != ".") { 3235af9a7ee5Smrg if ($lt_i == "..") { 3236af9a7ee5Smrg lt_count++; 3237af9a7ee5Smrg } else { 3238af9a7ee5Smrg if (lt_count == 0) { 3239af9a7ee5Smrg lt_foo="/" $lt_i lt_foo; 3240af9a7ee5Smrg } else { 3241af9a7ee5Smrg lt_count--; 3242af9a7ee5Smrg } 3243af9a7ee5Smrg } 3244af9a7ee5Smrg } 3245af9a7ee5Smrg } 3246af9a7ee5Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3247af9a7ee5Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3248af9a7ee5Smrg}'` 3249af9a7ee5Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 3250af9a7ee5Smrg # for these hosts. 3251af9a7ee5Smrg case $host_os in 3252af9a7ee5Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3253af9a7ee5Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3254af9a7ee5Smrg esac 3255af9a7ee5Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3256b9b4fd27Smrgelse 3257af9a7ee5Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3258af9a7ee5Smrgfi]) 3259af9a7ee5Smrglibrary_names_spec= 3260af9a7ee5Smrglibname_spec='lib$name' 3261af9a7ee5Smrgsoname_spec= 3262af9a7ee5Smrgshrext_cmds=".so" 3263af9a7ee5Smrgpostinstall_cmds= 3264af9a7ee5Smrgpostuninstall_cmds= 3265af9a7ee5Smrgfinish_cmds= 3266af9a7ee5Smrgfinish_eval= 3267af9a7ee5Smrgshlibpath_var= 3268af9a7ee5Smrgshlibpath_overrides_runpath=unknown 3269af9a7ee5Smrgversion_type=none 3270af9a7ee5Smrgdynamic_linker="$host_os ld.so" 3271af9a7ee5Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 3272af9a7ee5Smrgneed_lib_prefix=unknown 3273af9a7ee5Smrghardcode_into_libs=no 3274caade7ccSmrg 3275af9a7ee5Smrg# when you set need_version to no, make sure it does not cause -set_version 3276af9a7ee5Smrg# flags to be left without arguments 3277af9a7ee5Smrgneed_version=unknown 3278caade7ccSmrg 3279af9a7ee5Smrgcase $host_os in 3280af9a7ee5Smrgaix3*) 3281af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3282af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3283af9a7ee5Smrg shlibpath_var=LIBPATH 3284caade7ccSmrg 3285af9a7ee5Smrg # AIX 3 has no versioning support, so we append a major version to the name. 3286af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3287af9a7ee5Smrg ;; 3288caade7ccSmrg 3289af9a7ee5Smrgaix[[4-9]]*) 3290af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3291af9a7ee5Smrg need_lib_prefix=no 3292af9a7ee5Smrg need_version=no 3293af9a7ee5Smrg hardcode_into_libs=yes 3294af9a7ee5Smrg if test "$host_cpu" = ia64; then 3295af9a7ee5Smrg # AIX 5 supports IA64 3296af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3297af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3298af9a7ee5Smrg else 3299af9a7ee5Smrg # With GCC up to 2.95.x, collect2 would create an import file 3300af9a7ee5Smrg # for dependence libraries. The import file would start with 3301af9a7ee5Smrg # the line `#! .'. This would cause the generated library to 3302af9a7ee5Smrg # depend on `.', always an invalid library. This was fixed in 3303af9a7ee5Smrg # development snapshots of GCC prior to 3.0. 3304af9a7ee5Smrg case $host_os in 3305af9a7ee5Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 3306af9a7ee5Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3307af9a7ee5Smrg echo ' yes ' 3308af9a7ee5Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3309af9a7ee5Smrg : 3310af9a7ee5Smrg else 3311af9a7ee5Smrg can_build_shared=no 3312af9a7ee5Smrg fi 3313af9a7ee5Smrg ;; 3314af9a7ee5Smrg esac 3315af9a7ee5Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3316af9a7ee5Smrg # soname into executable. Probably we can add versioning support to 3317af9a7ee5Smrg # collect2, so additional links can be useful in future. 3318af9a7ee5Smrg if test "$aix_use_runtimelinking" = yes; then 3319af9a7ee5Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3320af9a7ee5Smrg # instead of lib<name>.a to let people know that these are not 3321af9a7ee5Smrg # typical AIX shared libraries. 3322af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3323af9a7ee5Smrg else 3324af9a7ee5Smrg # We preserve .a as extension for shared libraries through AIX4.2 3325af9a7ee5Smrg # and later when we are not doing run time linking. 3326af9a7ee5Smrg library_names_spec='${libname}${release}.a $libname.a' 3327af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3328af9a7ee5Smrg fi 3329af9a7ee5Smrg shlibpath_var=LIBPATH 3330af9a7ee5Smrg fi 3331af9a7ee5Smrg ;; 3332caade7ccSmrg 3333af9a7ee5Smrgamigaos*) 3334af9a7ee5Smrg case $host_cpu in 3335af9a7ee5Smrg powerpc) 3336af9a7ee5Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 3337af9a7ee5Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3338af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3339af9a7ee5Smrg ;; 3340af9a7ee5Smrg m68k) 3341af9a7ee5Smrg library_names_spec='$libname.ixlibrary $libname.a' 3342af9a7ee5Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 3343af9a7ee5Smrg 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' 3344af9a7ee5Smrg ;; 3345af9a7ee5Smrg esac 3346af9a7ee5Smrg ;; 3347caade7ccSmrg 3348af9a7ee5Smrgbeos*) 3349af9a7ee5Smrg library_names_spec='${libname}${shared_ext}' 3350af9a7ee5Smrg dynamic_linker="$host_os ld.so" 3351af9a7ee5Smrg shlibpath_var=LIBRARY_PATH 3352af9a7ee5Smrg ;; 3353caade7ccSmrg 3354af9a7ee5Smrgbsdi[[45]]*) 3355af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3356af9a7ee5Smrg need_version=no 3357af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3358af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3359af9a7ee5Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3360af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3361af9a7ee5Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3362af9a7ee5Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3363af9a7ee5Smrg # the default ld.so.conf also contains /usr/contrib/lib and 3364af9a7ee5Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3365af9a7ee5Smrg # libtool to hard-code these into programs 3366af9a7ee5Smrg ;; 3367caade7ccSmrg 3368af9a7ee5Smrgcygwin* | mingw* | pw32* | cegcc*) 3369af9a7ee5Smrg version_type=windows 3370af9a7ee5Smrg shrext_cmds=".dll" 3371af9a7ee5Smrg need_version=no 3372af9a7ee5Smrg need_lib_prefix=no 3373caade7ccSmrg 3374af9a7ee5Smrg case $GCC,$cc_basename in 3375af9a7ee5Smrg yes,*) 3376af9a7ee5Smrg # gcc 3377af9a7ee5Smrg library_names_spec='$libname.dll.a' 3378af9a7ee5Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3379af9a7ee5Smrg postinstall_cmds='base_file=`basename \${file}`~ 3380af9a7ee5Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3381af9a7ee5Smrg dldir=$destdir/`dirname \$dlpath`~ 3382af9a7ee5Smrg test -d \$dldir || mkdir -p \$dldir~ 3383af9a7ee5Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 3384af9a7ee5Smrg chmod a+x \$dldir/$dlname~ 3385af9a7ee5Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3386af9a7ee5Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3387af9a7ee5Smrg fi' 3388af9a7ee5Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3389af9a7ee5Smrg dlpath=$dir/\$dldll~ 3390af9a7ee5Smrg $RM \$dlpath' 3391af9a7ee5Smrg shlibpath_overrides_runpath=yes 3392caade7ccSmrg 3393af9a7ee5Smrg case $host_os in 3394af9a7ee5Smrg cygwin*) 3395af9a7ee5Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3396af9a7ee5Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3397af9a7ee5Smrgm4_if([$1], [],[ 3398af9a7ee5Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3399af9a7ee5Smrg ;; 3400af9a7ee5Smrg mingw* | cegcc*) 3401af9a7ee5Smrg # MinGW DLLs use traditional 'lib' prefix 3402af9a7ee5Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3403af9a7ee5Smrg ;; 3404af9a7ee5Smrg pw32*) 3405af9a7ee5Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 3406af9a7ee5Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3407af9a7ee5Smrg ;; 3408af9a7ee5Smrg esac 3409af9a7ee5Smrg dynamic_linker='Win32 ld.exe' 3410e8a5466aSmrg ;; 3411e8a5466aSmrg 3412af9a7ee5Smrg *,cl*) 3413af9a7ee5Smrg # Native MSVC 3414af9a7ee5Smrg libname_spec='$name' 3415af9a7ee5Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3416af9a7ee5Smrg library_names_spec='${libname}.dll.lib' 3417485f0483Smrg 3418af9a7ee5Smrg case $build_os in 3419af9a7ee5Smrg mingw*) 3420af9a7ee5Smrg sys_lib_search_path_spec= 3421af9a7ee5Smrg lt_save_ifs=$IFS 3422af9a7ee5Smrg IFS=';' 3423af9a7ee5Smrg for lt_path in $LIB 3424af9a7ee5Smrg do 3425af9a7ee5Smrg IFS=$lt_save_ifs 3426af9a7ee5Smrg # Let DOS variable expansion print the short 8.3 style file name. 3427af9a7ee5Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3428af9a7ee5Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3429af9a7ee5Smrg done 3430af9a7ee5Smrg IFS=$lt_save_ifs 3431af9a7ee5Smrg # Convert to MSYS style. 3432af9a7ee5Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3433af9a7ee5Smrg ;; 3434af9a7ee5Smrg cygwin*) 3435af9a7ee5Smrg # Convert to unix form, then to dos form, then back to unix form 3436af9a7ee5Smrg # but this time dos style (no spaces!) so that the unix form looks 3437af9a7ee5Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 3438af9a7ee5Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3439af9a7ee5Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3440af9a7ee5Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3441af9a7ee5Smrg ;; 3442af9a7ee5Smrg *) 3443af9a7ee5Smrg sys_lib_search_path_spec="$LIB" 3444af9a7ee5Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3445af9a7ee5Smrg # It is most probably a Windows format PATH. 3446af9a7ee5Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3447af9a7ee5Smrg else 3448af9a7ee5Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3449af9a7ee5Smrg fi 3450af9a7ee5Smrg # FIXME: find the short name or the path components, as spaces are 3451af9a7ee5Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 3452af9a7ee5Smrg ;; 3453af9a7ee5Smrg esac 3454caade7ccSmrg 3455af9a7ee5Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3456af9a7ee5Smrg postinstall_cmds='base_file=`basename \${file}`~ 3457af9a7ee5Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3458af9a7ee5Smrg dldir=$destdir/`dirname \$dlpath`~ 3459af9a7ee5Smrg test -d \$dldir || mkdir -p \$dldir~ 3460af9a7ee5Smrg $install_prog $dir/$dlname \$dldir/$dlname' 3461af9a7ee5Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3462af9a7ee5Smrg dlpath=$dir/\$dldll~ 3463af9a7ee5Smrg $RM \$dlpath' 3464af9a7ee5Smrg shlibpath_overrides_runpath=yes 3465af9a7ee5Smrg dynamic_linker='Win32 link.exe' 3466b9b4fd27Smrg ;; 3467caade7ccSmrg 3468b9b4fd27Smrg *) 3469af9a7ee5Smrg # Assume MSVC wrapper 3470af9a7ee5Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3471af9a7ee5Smrg dynamic_linker='Win32 ld.exe' 3472b9b4fd27Smrg ;; 3473caade7ccSmrg esac 3474af9a7ee5Smrg # FIXME: first we should search . and the directory the executable is in 3475af9a7ee5Smrg shlibpath_var=PATH 3476af9a7ee5Smrg ;; 3477caade7ccSmrg 3478af9a7ee5Smrgdarwin* | rhapsody*) 3479af9a7ee5Smrg dynamic_linker="$host_os dyld" 3480af9a7ee5Smrg version_type=darwin 3481af9a7ee5Smrg need_lib_prefix=no 3482af9a7ee5Smrg need_version=no 3483af9a7ee5Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3484af9a7ee5Smrg soname_spec='${libname}${release}${major}$shared_ext' 3485af9a7ee5Smrg shlibpath_overrides_runpath=yes 3486af9a7ee5Smrg shlibpath_var=DYLD_LIBRARY_PATH 3487af9a7ee5Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3488af9a7ee5Smrgm4_if([$1], [],[ 3489af9a7ee5Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3490af9a7ee5Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3491af9a7ee5Smrg ;; 3492caade7ccSmrg 3493af9a7ee5Smrgdgux*) 3494af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3495af9a7ee5Smrg need_lib_prefix=no 3496af9a7ee5Smrg need_version=no 3497af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3498af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3499af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3500af9a7ee5Smrg ;; 3501caade7ccSmrg 3502af9a7ee5Smrgfreebsd* | dragonfly*) 3503af9a7ee5Smrg # DragonFly does not have aout. When/if they implement a new 3504af9a7ee5Smrg # versioning mechanism, adjust this. 3505af9a7ee5Smrg if test -x /usr/bin/objformat; then 3506af9a7ee5Smrg objformat=`/usr/bin/objformat` 3507b9b4fd27Smrg else 3508af9a7ee5Smrg case $host_os in 3509af9a7ee5Smrg freebsd[[23]].*) objformat=aout ;; 3510af9a7ee5Smrg *) objformat=elf ;; 3511b9b4fd27Smrg esac 3512b9b4fd27Smrg fi 3513af9a7ee5Smrg version_type=freebsd-$objformat 3514af9a7ee5Smrg case $version_type in 3515af9a7ee5Smrg freebsd-elf*) 3516af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3517af9a7ee5Smrg need_version=no 3518af9a7ee5Smrg need_lib_prefix=no 3519af9a7ee5Smrg ;; 3520af9a7ee5Smrg freebsd-*) 3521af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3522af9a7ee5Smrg need_version=yes 3523af9a7ee5Smrg ;; 3524af9a7ee5Smrg esac 3525af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3526b9b4fd27Smrg case $host_os in 3527af9a7ee5Smrg freebsd2.*) 3528af9a7ee5Smrg shlibpath_overrides_runpath=yes 3529b9b4fd27Smrg ;; 3530af9a7ee5Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3531af9a7ee5Smrg shlibpath_overrides_runpath=yes 3532af9a7ee5Smrg hardcode_into_libs=yes 3533b9b4fd27Smrg ;; 3534af9a7ee5Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3535af9a7ee5Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3536af9a7ee5Smrg shlibpath_overrides_runpath=no 3537af9a7ee5Smrg hardcode_into_libs=yes 3538b9b4fd27Smrg ;; 3539af9a7ee5Smrg *) # from 4.6 on, and DragonFly 3540af9a7ee5Smrg shlibpath_overrides_runpath=yes 3541af9a7ee5Smrg hardcode_into_libs=yes 3542b9b4fd27Smrg ;; 3543af9a7ee5Smrg esac 3544af9a7ee5Smrg ;; 3545af9a7ee5Smrg 3546af9a7ee5Smrggnu*) 3547af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3548af9a7ee5Smrg need_lib_prefix=no 3549af9a7ee5Smrg need_version=no 3550af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3551af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3552af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3553af9a7ee5Smrg shlibpath_overrides_runpath=no 3554af9a7ee5Smrg hardcode_into_libs=yes 3555af9a7ee5Smrg ;; 3556af9a7ee5Smrg 3557af9a7ee5Smrghaiku*) 3558af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3559af9a7ee5Smrg need_lib_prefix=no 3560af9a7ee5Smrg need_version=no 3561af9a7ee5Smrg dynamic_linker="$host_os runtime_loader" 3562af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3563af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3564af9a7ee5Smrg shlibpath_var=LIBRARY_PATH 3565af9a7ee5Smrg shlibpath_overrides_runpath=yes 3566af9a7ee5Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3567af9a7ee5Smrg hardcode_into_libs=yes 3568af9a7ee5Smrg ;; 3569caade7ccSmrg 3570af9a7ee5Smrghpux9* | hpux10* | hpux11*) 3571af9a7ee5Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 3572af9a7ee5Smrg # link against other versions. 3573af9a7ee5Smrg version_type=sunos 3574af9a7ee5Smrg need_lib_prefix=no 3575af9a7ee5Smrg need_version=no 3576af9a7ee5Smrg case $host_cpu in 3577af9a7ee5Smrg ia64*) 3578af9a7ee5Smrg shrext_cmds='.so' 3579af9a7ee5Smrg hardcode_into_libs=yes 3580af9a7ee5Smrg dynamic_linker="$host_os dld.so" 3581af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3582af9a7ee5Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3583af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3584af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3585af9a7ee5Smrg if test "X$HPUX_IA64_MODE" = X32; then 3586af9a7ee5Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3587af9a7ee5Smrg else 3588af9a7ee5Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3589af9a7ee5Smrg fi 3590af9a7ee5Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3591af9a7ee5Smrg ;; 3592af9a7ee5Smrg hppa*64*) 3593af9a7ee5Smrg shrext_cmds='.sl' 3594af9a7ee5Smrg hardcode_into_libs=yes 3595af9a7ee5Smrg dynamic_linker="$host_os dld.sl" 3596af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3597af9a7ee5Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3598af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3599af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3600af9a7ee5Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3601af9a7ee5Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3602af9a7ee5Smrg ;; 3603b9b4fd27Smrg *) 3604af9a7ee5Smrg shrext_cmds='.sl' 3605af9a7ee5Smrg dynamic_linker="$host_os dld.sl" 3606af9a7ee5Smrg shlibpath_var=SHLIB_PATH 3607af9a7ee5Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3608af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3609af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3610b9b4fd27Smrg ;; 3611b9b4fd27Smrg esac 3612af9a7ee5Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3613af9a7ee5Smrg postinstall_cmds='chmod 555 $lib' 3614af9a7ee5Smrg # or fails outright, so override atomically: 3615af9a7ee5Smrg install_override_mode=555 3616af9a7ee5Smrg ;; 3617caade7ccSmrg 3618af9a7ee5Smrginterix[[3-9]]*) 3619af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3620af9a7ee5Smrg need_lib_prefix=no 3621af9a7ee5Smrg need_version=no 3622af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3623af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3624af9a7ee5Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3625af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3626af9a7ee5Smrg shlibpath_overrides_runpath=no 3627af9a7ee5Smrg hardcode_into_libs=yes 3628af9a7ee5Smrg ;; 3629caade7ccSmrg 3630af9a7ee5Smrgirix5* | irix6* | nonstopux*) 3631af9a7ee5Smrg case $host_os in 3632af9a7ee5Smrg nonstopux*) version_type=nonstopux ;; 3633af9a7ee5Smrg *) 3634af9a7ee5Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3635af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3636af9a7ee5Smrg else 3637af9a7ee5Smrg version_type=irix 3638af9a7ee5Smrg fi ;; 3639af9a7ee5Smrg esac 3640af9a7ee5Smrg need_lib_prefix=no 3641af9a7ee5Smrg need_version=no 3642af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3643af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3644af9a7ee5Smrg case $host_os in 3645af9a7ee5Smrg irix5* | nonstopux*) 3646af9a7ee5Smrg libsuff= shlibsuff= 3647af9a7ee5Smrg ;; 3648af9a7ee5Smrg *) 3649af9a7ee5Smrg case $LD in # libtool.m4 will add one of these switches to LD 3650af9a7ee5Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3651af9a7ee5Smrg libsuff= shlibsuff= libmagic=32-bit;; 3652af9a7ee5Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3653af9a7ee5Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 3654af9a7ee5Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3655af9a7ee5Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 3656af9a7ee5Smrg *) libsuff= shlibsuff= libmagic=never-match;; 3657af9a7ee5Smrg esac 3658af9a7ee5Smrg ;; 3659af9a7ee5Smrg esac 3660af9a7ee5Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3661af9a7ee5Smrg shlibpath_overrides_runpath=no 3662af9a7ee5Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3663af9a7ee5Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3664af9a7ee5Smrg hardcode_into_libs=yes 3665af9a7ee5Smrg ;; 3666caade7ccSmrg 3667af9a7ee5Smrg# No shared lib support for Linux oldld, aout, or coff. 3668af9a7ee5Smrglinux*oldld* | linux*aout* | linux*coff*) 3669af9a7ee5Smrg dynamic_linker=no 3670af9a7ee5Smrg ;; 3671caade7ccSmrg 3672af9a7ee5Smrg# This must be glibc/ELF. 3673af9a7ee5Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3674af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3675af9a7ee5Smrg need_lib_prefix=no 3676af9a7ee5Smrg need_version=no 3677af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3678af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3679af9a7ee5Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3680af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3681af9a7ee5Smrg shlibpath_overrides_runpath=no 3682caade7ccSmrg 3683af9a7ee5Smrg # Some binutils ld are patched to set DT_RUNPATH 3684af9a7ee5Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3685af9a7ee5Smrg [lt_cv_shlibpath_overrides_runpath=no 3686af9a7ee5Smrg save_LDFLAGS=$LDFLAGS 3687af9a7ee5Smrg save_libdir=$libdir 3688af9a7ee5Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3689af9a7ee5Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3690af9a7ee5Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3691af9a7ee5Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3692af9a7ee5Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 3693af9a7ee5Smrg LDFLAGS=$save_LDFLAGS 3694af9a7ee5Smrg libdir=$save_libdir 3695b9b4fd27Smrg ]) 3696af9a7ee5Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3697caade7ccSmrg 3698af9a7ee5Smrg # This implies no fast_install, which is unacceptable. 3699af9a7ee5Smrg # Some rework will be needed to allow for fast_install 3700af9a7ee5Smrg # before this can be enabled. 3701af9a7ee5Smrg hardcode_into_libs=yes 3702caade7ccSmrg 3703af9a7ee5Smrg # Append ld.so.conf contents to the search path 3704af9a7ee5Smrg if test -f /etc/ld.so.conf; then 3705af9a7ee5Smrg 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' ' '` 3706af9a7ee5Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3707af9a7ee5Smrg fi 3708caade7ccSmrg 3709af9a7ee5Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 3710af9a7ee5Smrg # powerpc, because MkLinux only supported shared libraries with the 3711af9a7ee5Smrg # GNU dynamic linker. Since this was broken with cross compilers, 3712af9a7ee5Smrg # most powerpc-linux boxes support dynamic linking these days and 3713af9a7ee5Smrg # people can always --disable-shared, the test was removed, and we 3714af9a7ee5Smrg # assume the GNU/Linux dynamic linker is in use. 3715af9a7ee5Smrg dynamic_linker='GNU/Linux ld.so' 3716af9a7ee5Smrg ;; 3717caade7ccSmrg 3718af9a7ee5Smrgnetbsd*) 3719af9a7ee5Smrg version_type=sunos 3720af9a7ee5Smrg need_lib_prefix=no 3721af9a7ee5Smrg need_version=no 3722af9a7ee5Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3723af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3724af9a7ee5Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3725af9a7ee5Smrg dynamic_linker='NetBSD (a.out) ld.so' 3726af9a7ee5Smrg else 3727af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3728af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3729af9a7ee5Smrg dynamic_linker='NetBSD ld.elf_so' 3730af9a7ee5Smrg fi 3731af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3732af9a7ee5Smrg shlibpath_overrides_runpath=yes 3733af9a7ee5Smrg hardcode_into_libs=yes 3734af9a7ee5Smrg ;; 3735caade7ccSmrg 3736af9a7ee5Smrgnewsos6) 3737af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3738af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3739af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3740af9a7ee5Smrg shlibpath_overrides_runpath=yes 3741af9a7ee5Smrg ;; 3742caade7ccSmrg 3743af9a7ee5Smrg*nto* | *qnx*) 3744af9a7ee5Smrg version_type=qnx 3745af9a7ee5Smrg need_lib_prefix=no 3746af9a7ee5Smrg need_version=no 3747af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3748af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3749af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3750af9a7ee5Smrg shlibpath_overrides_runpath=no 3751af9a7ee5Smrg hardcode_into_libs=yes 3752af9a7ee5Smrg dynamic_linker='ldqnx.so' 3753af9a7ee5Smrg ;; 3754caade7ccSmrg 3755af9a7ee5Smrgopenbsd*) 3756af9a7ee5Smrg version_type=sunos 3757af9a7ee5Smrg sys_lib_dlsearch_path_spec="/usr/lib" 3758af9a7ee5Smrg need_lib_prefix=no 3759af9a7ee5Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3760af9a7ee5Smrg case $host_os in 3761af9a7ee5Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3762af9a7ee5Smrg *) need_version=no ;; 3763af9a7ee5Smrg esac 3764af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3765af9a7ee5Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3766af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3767af9a7ee5Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3768af9a7ee5Smrg case $host_os in 3769af9a7ee5Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 3770af9a7ee5Smrg shlibpath_overrides_runpath=no 3771af9a7ee5Smrg ;; 3772af9a7ee5Smrg *) 3773af9a7ee5Smrg shlibpath_overrides_runpath=yes 3774af9a7ee5Smrg ;; 3775af9a7ee5Smrg esac 3776af9a7ee5Smrg else 3777af9a7ee5Smrg shlibpath_overrides_runpath=yes 3778af9a7ee5Smrg fi 3779af9a7ee5Smrg ;; 3780caade7ccSmrg 3781af9a7ee5Smrgos2*) 3782af9a7ee5Smrg libname_spec='$name' 3783af9a7ee5Smrg shrext_cmds=".dll" 3784af9a7ee5Smrg need_lib_prefix=no 3785af9a7ee5Smrg library_names_spec='$libname${shared_ext} $libname.a' 3786af9a7ee5Smrg dynamic_linker='OS/2 ld.exe' 3787af9a7ee5Smrg shlibpath_var=LIBPATH 3788af9a7ee5Smrg ;; 3789caade7ccSmrg 3790af9a7ee5Smrgosf3* | osf4* | osf5*) 3791af9a7ee5Smrg version_type=osf 3792af9a7ee5Smrg need_lib_prefix=no 3793af9a7ee5Smrg need_version=no 3794af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3795af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3796af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3797af9a7ee5Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3798af9a7ee5Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3799af9a7ee5Smrg ;; 3800caade7ccSmrg 3801af9a7ee5Smrgrdos*) 3802af9a7ee5Smrg dynamic_linker=no 3803af9a7ee5Smrg ;; 3804caade7ccSmrg 3805af9a7ee5Smrgsolaris*) 3806af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3807af9a7ee5Smrg need_lib_prefix=no 3808af9a7ee5Smrg need_version=no 3809af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3810af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3811af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3812af9a7ee5Smrg shlibpath_overrides_runpath=yes 3813af9a7ee5Smrg hardcode_into_libs=yes 3814af9a7ee5Smrg # ldd complains unless libraries are executable 3815af9a7ee5Smrg postinstall_cmds='chmod +x $lib' 3816af9a7ee5Smrg ;; 3817caade7ccSmrg 3818af9a7ee5Smrgsunos4*) 3819af9a7ee5Smrg version_type=sunos 3820af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3821af9a7ee5Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3822af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3823af9a7ee5Smrg shlibpath_overrides_runpath=yes 3824af9a7ee5Smrg if test "$with_gnu_ld" = yes; then 3825af9a7ee5Smrg need_lib_prefix=no 3826af9a7ee5Smrg fi 3827af9a7ee5Smrg need_version=yes 3828af9a7ee5Smrg ;; 3829caade7ccSmrg 3830af9a7ee5Smrgsysv4 | sysv4.3*) 3831af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3832af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3833af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3834af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3835af9a7ee5Smrg case $host_vendor in 3836af9a7ee5Smrg sni) 3837af9a7ee5Smrg shlibpath_overrides_runpath=no 3838af9a7ee5Smrg need_lib_prefix=no 3839af9a7ee5Smrg runpath_var=LD_RUN_PATH 3840af9a7ee5Smrg ;; 3841af9a7ee5Smrg siemens) 3842af9a7ee5Smrg need_lib_prefix=no 3843af9a7ee5Smrg ;; 3844af9a7ee5Smrg motorola) 3845af9a7ee5Smrg need_lib_prefix=no 3846af9a7ee5Smrg need_version=no 3847af9a7ee5Smrg shlibpath_overrides_runpath=no 3848af9a7ee5Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3849af9a7ee5Smrg ;; 3850af9a7ee5Smrg esac 3851af9a7ee5Smrg ;; 3852caade7ccSmrg 3853af9a7ee5Smrgsysv4*MP*) 3854af9a7ee5Smrg if test -d /usr/nec ;then 3855af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3856af9a7ee5Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3857af9a7ee5Smrg soname_spec='$libname${shared_ext}.$major' 3858af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3859af9a7ee5Smrg fi 3860af9a7ee5Smrg ;; 3861b9b4fd27Smrg 3862af9a7ee5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3863af9a7ee5Smrg version_type=freebsd-elf 3864af9a7ee5Smrg need_lib_prefix=no 3865af9a7ee5Smrg need_version=no 3866af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3867af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3868af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3869af9a7ee5Smrg shlibpath_overrides_runpath=yes 3870af9a7ee5Smrg hardcode_into_libs=yes 3871af9a7ee5Smrg if test "$with_gnu_ld" = yes; then 3872af9a7ee5Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3873caade7ccSmrg else 3874af9a7ee5Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3875af9a7ee5Smrg case $host_os in 3876af9a7ee5Smrg sco3.2v5*) 3877af9a7ee5Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3878af9a7ee5Smrg ;; 3879af9a7ee5Smrg esac 3880caade7ccSmrg fi 3881af9a7ee5Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3882af9a7ee5Smrg ;; 3883caade7ccSmrg 3884af9a7ee5Smrgtpf*) 3885af9a7ee5Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3886af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3887af9a7ee5Smrg need_lib_prefix=no 3888af9a7ee5Smrg need_version=no 3889af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3890af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3891af9a7ee5Smrg shlibpath_overrides_runpath=no 3892af9a7ee5Smrg hardcode_into_libs=yes 3893af9a7ee5Smrg ;; 3894caade7ccSmrg 3895af9a7ee5Smrguts4*) 3896af9a7ee5Smrg version_type=linux # correct to gnu/linux during the next big refactor 3897af9a7ee5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3898af9a7ee5Smrg soname_spec='${libname}${release}${shared_ext}$major' 3899af9a7ee5Smrg shlibpath_var=LD_LIBRARY_PATH 3900af9a7ee5Smrg ;; 3901b9b4fd27Smrg 3902af9a7ee5Smrg*) 3903af9a7ee5Smrg dynamic_linker=no 3904af9a7ee5Smrg ;; 3905af9a7ee5Smrgesac 3906af9a7ee5SmrgAC_MSG_RESULT([$dynamic_linker]) 3907af9a7ee5Smrgtest "$dynamic_linker" = no && can_build_shared=no 3908af9a7ee5Smrg 3909af9a7ee5Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3910af9a7ee5Smrgif test "$GCC" = yes; then 3911af9a7ee5Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3912caade7ccSmrgfi 3913caade7ccSmrg 3914af9a7ee5Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3915af9a7ee5Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3916af9a7ee5Smrgfi 3917af9a7ee5Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3918af9a7ee5Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3919af9a7ee5Smrgfi 3920caade7ccSmrg 3921af9a7ee5Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3922af9a7ee5Smrg [Variables whose values should be saved in libtool wrapper scripts and 3923af9a7ee5Smrg restored at link time]) 3924af9a7ee5Smrg_LT_DECL([], [need_lib_prefix], [0], 3925af9a7ee5Smrg [Do we need the "lib" prefix for modules?]) 3926af9a7ee5Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3927af9a7ee5Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3928af9a7ee5Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3929af9a7ee5Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3930af9a7ee5Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3931af9a7ee5Smrg [Is shlibpath searched before the hard-coded library search path?]) 3932af9a7ee5Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3933af9a7ee5Smrg_LT_DECL([], [library_names_spec], [1], 3934af9a7ee5Smrg [[List of archive names. First name is the real one, the rest are links. 3935af9a7ee5Smrg The last name is the one that the linker finds with -lNAME]]) 3936af9a7ee5Smrg_LT_DECL([], [soname_spec], [1], 3937af9a7ee5Smrg [[The coded name of the library, if different from the real name]]) 3938af9a7ee5Smrg_LT_DECL([], [install_override_mode], [1], 3939af9a7ee5Smrg [Permission mode override for installation of shared libraries]) 3940af9a7ee5Smrg_LT_DECL([], [postinstall_cmds], [2], 3941af9a7ee5Smrg [Command to use after installation of a shared archive]) 3942af9a7ee5Smrg_LT_DECL([], [postuninstall_cmds], [2], 3943af9a7ee5Smrg [Command to use after uninstallation of a shared archive]) 3944af9a7ee5Smrg_LT_DECL([], [finish_cmds], [2], 3945af9a7ee5Smrg [Commands used to finish a libtool library installation in a directory]) 3946af9a7ee5Smrg_LT_DECL([], [finish_eval], [1], 3947af9a7ee5Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3948af9a7ee5Smrg not shown]]) 3949af9a7ee5Smrg_LT_DECL([], [hardcode_into_libs], [0], 3950af9a7ee5Smrg [Whether we should hardcode library paths into libraries]) 3951af9a7ee5Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3952af9a7ee5Smrg [Compile-time system search path for libraries]) 3953af9a7ee5Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 3954af9a7ee5Smrg [Run-time system search path for libraries]) 3955af9a7ee5Smrg])# _LT_SYS_DYNAMIC_LINKER 3956caade7ccSmrg 3957caade7ccSmrg 3958af9a7ee5Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3959af9a7ee5Smrg# -------------------------- 3960af9a7ee5Smrg# find a file program which can recognize shared library 3961af9a7ee5SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3962af9a7ee5Smrg[m4_require([_LT_DECL_EGREP])dnl 3963af9a7ee5SmrgAC_MSG_CHECKING([for $1]) 3964af9a7ee5SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3965af9a7ee5Smrg[case $MAGIC_CMD in 3966af9a7ee5Smrg[[\\/*] | ?:[\\/]*]) 3967af9a7ee5Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3968caade7ccSmrg ;; 3969af9a7ee5Smrg*) 3970af9a7ee5Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 3971af9a7ee5Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3972af9a7ee5Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3973af9a7ee5Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3974af9a7ee5Smrgdnl not every word. This closes a longstanding sh security hole. 3975af9a7ee5Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3976af9a7ee5Smrg for ac_dir in $ac_dummy; do 3977af9a7ee5Smrg IFS="$lt_save_ifs" 3978af9a7ee5Smrg test -z "$ac_dir" && ac_dir=. 3979af9a7ee5Smrg if test -f $ac_dir/$1; then 3980af9a7ee5Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3981af9a7ee5Smrg if test -n "$file_magic_test_file"; then 3982af9a7ee5Smrg case $deplibs_check_method in 3983af9a7ee5Smrg "file_magic "*) 3984af9a7ee5Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3985af9a7ee5Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3986af9a7ee5Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3987af9a7ee5Smrg $EGREP "$file_magic_regex" > /dev/null; then 3988af9a7ee5Smrg : 3989af9a7ee5Smrg else 3990af9a7ee5Smrg cat <<_LT_EOF 1>&2 3991caade7ccSmrg 3992af9a7ee5Smrg*** Warning: the command libtool uses to detect shared libraries, 3993af9a7ee5Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3994af9a7ee5Smrg*** The result is that libtool may fail to recognize shared libraries 3995af9a7ee5Smrg*** as such. This will affect the creation of libtool libraries that 3996af9a7ee5Smrg*** depend on shared libraries, but programs linked with such libtool 3997af9a7ee5Smrg*** libraries will work regardless of this problem. Nevertheless, you 3998af9a7ee5Smrg*** may want to report the problem to your system manager and/or to 3999af9a7ee5Smrg*** bug-libtool@gnu.org 4000af9a7ee5Smrg 4001af9a7ee5Smrg_LT_EOF 4002af9a7ee5Smrg fi ;; 4003af9a7ee5Smrg esac 4004b9b4fd27Smrg fi 4005af9a7ee5Smrg break 4006b9b4fd27Smrg fi 4007af9a7ee5Smrg done 4008af9a7ee5Smrg IFS="$lt_save_ifs" 4009af9a7ee5Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4010caade7ccSmrg ;; 4011af9a7ee5Smrgesac]) 4012af9a7ee5SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4013af9a7ee5Smrgif test -n "$MAGIC_CMD"; then 4014af9a7ee5Smrg AC_MSG_RESULT($MAGIC_CMD) 4015af9a7ee5Smrgelse 4016af9a7ee5Smrg AC_MSG_RESULT(no) 4017af9a7ee5Smrgfi 4018af9a7ee5Smrg_LT_DECL([], [MAGIC_CMD], [0], 4019af9a7ee5Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4020af9a7ee5Smrg])# _LT_PATH_TOOL_PREFIX 4021caade7ccSmrg 4022af9a7ee5Smrg# Old name: 4023af9a7ee5SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4024af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 4025af9a7ee5Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4026caade7ccSmrg 4027caade7ccSmrg 4028af9a7ee5Smrg# _LT_PATH_MAGIC 4029af9a7ee5Smrg# -------------- 4030af9a7ee5Smrg# find a file program which can recognize a shared library 4031af9a7ee5Smrgm4_defun([_LT_PATH_MAGIC], 4032af9a7ee5Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4033af9a7ee5Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 4034af9a7ee5Smrg if test -n "$ac_tool_prefix"; then 4035af9a7ee5Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4036af9a7ee5Smrg else 4037af9a7ee5Smrg MAGIC_CMD=: 4038af9a7ee5Smrg fi 4039af9a7ee5Smrgfi 4040af9a7ee5Smrg])# _LT_PATH_MAGIC 4041caade7ccSmrg 4042caade7ccSmrg 4043af9a7ee5Smrg# LT_PATH_LD 4044af9a7ee5Smrg# ---------- 4045af9a7ee5Smrg# find the pathname to the GNU or non-GNU linker 4046af9a7ee5SmrgAC_DEFUN([LT_PATH_LD], 4047af9a7ee5Smrg[AC_REQUIRE([AC_PROG_CC])dnl 4048af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 4049af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4050af9a7ee5Smrgm4_require([_LT_DECL_SED])dnl 4051af9a7ee5Smrgm4_require([_LT_DECL_EGREP])dnl 4052af9a7ee5Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4053a5602400Smrg 4054af9a7ee5SmrgAC_ARG_WITH([gnu-ld], 4055af9a7ee5Smrg [AS_HELP_STRING([--with-gnu-ld], 4056af9a7ee5Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4057af9a7ee5Smrg [test "$withval" = no || with_gnu_ld=yes], 4058af9a7ee5Smrg [with_gnu_ld=no])dnl 4059a5602400Smrg 4060af9a7ee5Smrgac_prog=ld 4061af9a7ee5Smrgif test "$GCC" = yes; then 4062af9a7ee5Smrg # Check if gcc -print-prog-name=ld gives a path. 4063af9a7ee5Smrg AC_MSG_CHECKING([for ld used by $CC]) 4064af9a7ee5Smrg case $host in 4065af9a7ee5Smrg *-*-mingw*) 4066af9a7ee5Smrg # gcc leaves a trailing carriage return which upsets mingw 4067af9a7ee5Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4068af9a7ee5Smrg *) 4069af9a7ee5Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4070af9a7ee5Smrg esac 4071af9a7ee5Smrg case $ac_prog in 4072af9a7ee5Smrg # Accept absolute paths. 4073af9a7ee5Smrg [[\\/]]* | ?:[[\\/]]*) 4074af9a7ee5Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 4075af9a7ee5Smrg # Canonicalize the pathname of ld 4076af9a7ee5Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4077af9a7ee5Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4078af9a7ee5Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4079a5602400Smrg done 4080af9a7ee5Smrg test -z "$LD" && LD="$ac_prog" 4081a5602400Smrg ;; 4082af9a7ee5Smrg "") 4083af9a7ee5Smrg # If it fails, then pretend we aren't using GCC. 4084af9a7ee5Smrg ac_prog=ld 4085b9b4fd27Smrg ;; 4086b9b4fd27Smrg *) 4087af9a7ee5Smrg # If it is relative, then search for the first ld in PATH. 4088af9a7ee5Smrg with_gnu_ld=unknown 4089b9b4fd27Smrg ;; 4090b9b4fd27Smrg esac 4091af9a7ee5Smrgelif test "$with_gnu_ld" = yes; then 4092af9a7ee5Smrg AC_MSG_CHECKING([for GNU ld]) 4093af9a7ee5Smrgelse 4094af9a7ee5Smrg AC_MSG_CHECKING([for non-GNU ld]) 4095af9a7ee5Smrgfi 4096af9a7ee5SmrgAC_CACHE_VAL(lt_cv_path_LD, 4097af9a7ee5Smrg[if test -z "$LD"; then 4098af9a7ee5Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4099af9a7ee5Smrg for ac_dir in $PATH; do 4100af9a7ee5Smrg IFS="$lt_save_ifs" 4101af9a7ee5Smrg test -z "$ac_dir" && ac_dir=. 4102af9a7ee5Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4103af9a7ee5Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 4104af9a7ee5Smrg # Check to see if the program is GNU ld. I'd rather use --version, 4105af9a7ee5Smrg # but apparently some variants of GNU ld only accept -v. 4106af9a7ee5Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 4107af9a7ee5Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4108af9a7ee5Smrg *GNU* | *'with BFD'*) 4109af9a7ee5Smrg test "$with_gnu_ld" != no && break 4110af9a7ee5Smrg ;; 4111af9a7ee5Smrg *) 4112af9a7ee5Smrg test "$with_gnu_ld" != yes && break 4113af9a7ee5Smrg ;; 4114af9a7ee5Smrg esac 4115af9a7ee5Smrg fi 4116af9a7ee5Smrg done 4117af9a7ee5Smrg IFS="$lt_save_ifs" 4118af9a7ee5Smrgelse 4119af9a7ee5Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 4120af9a7ee5Smrgfi]) 4121af9a7ee5SmrgLD="$lt_cv_path_LD" 4122af9a7ee5Smrgif test -n "$LD"; then 4123af9a7ee5Smrg AC_MSG_RESULT($LD) 4124af9a7ee5Smrgelse 4125af9a7ee5Smrg AC_MSG_RESULT(no) 4126af9a7ee5Smrgfi 4127af9a7ee5Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4128af9a7ee5Smrg_LT_PATH_LD_GNU 4129af9a7ee5SmrgAC_SUBST([LD]) 4130caade7ccSmrg 4131af9a7ee5Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4132af9a7ee5Smrg])# LT_PATH_LD 4133caade7ccSmrg 4134af9a7ee5Smrg# Old names: 4135af9a7ee5SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4136af9a7ee5SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4137af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 4138af9a7ee5Smrgdnl AC_DEFUN([AM_PROG_LD], []) 4139af9a7ee5Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4140485f0483Smrg 4141caade7ccSmrg 4142af9a7ee5Smrg# _LT_PATH_LD_GNU 4143af9a7ee5Smrg#- -------------- 4144af9a7ee5Smrgm4_defun([_LT_PATH_LD_GNU], 4145af9a7ee5Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4146af9a7ee5Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4147af9a7ee5Smrgcase `$LD -v 2>&1 </dev/null` in 4148af9a7ee5Smrg*GNU* | *'with BFD'*) 4149af9a7ee5Smrg lt_cv_prog_gnu_ld=yes 4150af9a7ee5Smrg ;; 4151af9a7ee5Smrg*) 4152af9a7ee5Smrg lt_cv_prog_gnu_ld=no 4153af9a7ee5Smrg ;; 4154af9a7ee5Smrgesac]) 4155af9a7ee5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4156af9a7ee5Smrg])# _LT_PATH_LD_GNU 4157af9a7ee5Smrg 4158af9a7ee5Smrg 4159af9a7ee5Smrg# _LT_CMD_RELOAD 4160af9a7ee5Smrg# -------------- 4161af9a7ee5Smrg# find reload flag for linker 4162af9a7ee5Smrg# -- PORTME Some linkers may need a different reload flag. 4163af9a7ee5Smrgm4_defun([_LT_CMD_RELOAD], 4164af9a7ee5Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 4165af9a7ee5Smrg lt_cv_ld_reload_flag, 4166af9a7ee5Smrg [lt_cv_ld_reload_flag='-r']) 4167af9a7ee5Smrgreload_flag=$lt_cv_ld_reload_flag 4168af9a7ee5Smrgcase $reload_flag in 4169af9a7ee5Smrg"" | " "*) ;; 4170af9a7ee5Smrg*) reload_flag=" $reload_flag" ;; 4171af9a7ee5Smrgesac 4172af9a7ee5Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 4173af9a7ee5Smrgcase $host_os in 4174af9a7ee5Smrg cygwin* | mingw* | pw32* | cegcc*) 4175af9a7ee5Smrg if test "$GCC" != yes; then 4176af9a7ee5Smrg reload_cmds=false 4177af9a7ee5Smrg fi 4178af9a7ee5Smrg ;; 4179af9a7ee5Smrg darwin*) 4180af9a7ee5Smrg if test "$GCC" = yes; then 4181af9a7ee5Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4182af9a7ee5Smrg else 4183af9a7ee5Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 4184af9a7ee5Smrg fi 4185af9a7ee5Smrg ;; 4186af9a7ee5Smrgesac 4187af9a7ee5Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4188af9a7ee5Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 4189af9a7ee5Smrg])# _LT_CMD_RELOAD 4190af9a7ee5Smrg 4191af9a7ee5Smrg 4192af9a7ee5Smrg# _LT_CHECK_MAGIC_METHOD 4193af9a7ee5Smrg# ---------------------- 4194af9a7ee5Smrg# how to check for library dependencies 4195af9a7ee5Smrg# -- PORTME fill in with the dynamic library characteristics 4196af9a7ee5Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 4197af9a7ee5Smrg[m4_require([_LT_DECL_EGREP]) 4198af9a7ee5Smrgm4_require([_LT_DECL_OBJDUMP]) 4199af9a7ee5SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 4200af9a7ee5Smrglt_cv_deplibs_check_method, 4201af9a7ee5Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 4202af9a7ee5Smrglt_cv_file_magic_test_file= 4203af9a7ee5Smrglt_cv_deplibs_check_method='unknown' 4204af9a7ee5Smrg# Need to set the preceding variable on all platforms that support 4205af9a7ee5Smrg# interlibrary dependencies. 4206af9a7ee5Smrg# 'none' -- dependencies not supported. 4207af9a7ee5Smrg# `unknown' -- same as none, but documents that we really don't know. 4208af9a7ee5Smrg# 'pass_all' -- all dependencies passed with no checks. 4209af9a7ee5Smrg# 'test_compile' -- check by making test program. 4210af9a7ee5Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 4211af9a7ee5Smrg# which responds to the $file_magic_cmd with a given extended regex. 4212af9a7ee5Smrg# If you have `file' or equivalent on your system and you're not sure 4213af9a7ee5Smrg# whether `pass_all' will *always* work, you probably want this one. 4214af9a7ee5Smrg 4215af9a7ee5Smrgcase $host_os in 4216af9a7ee5Smrgaix[[4-9]]*) 4217af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4218af9a7ee5Smrg ;; 4219af9a7ee5Smrg 4220af9a7ee5Smrgbeos*) 4221af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4222af9a7ee5Smrg ;; 4223af9a7ee5Smrg 4224af9a7ee5Smrgbsdi[[45]]*) 4225af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4226af9a7ee5Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 4227af9a7ee5Smrg lt_cv_file_magic_test_file=/shlib/libc.so 4228af9a7ee5Smrg ;; 4229af9a7ee5Smrg 4230af9a7ee5Smrgcygwin*) 4231af9a7ee5Smrg # func_win32_libid is a shell function defined in ltmain.sh 4232af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4233af9a7ee5Smrg lt_cv_file_magic_cmd='func_win32_libid' 4234af9a7ee5Smrg ;; 4235af9a7ee5Smrg 4236af9a7ee5Smrgmingw* | pw32*) 4237af9a7ee5Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 4238af9a7ee5Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 4239af9a7ee5Smrg # unless we find 'file', for example because we are cross-compiling. 4240af9a7ee5Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4241af9a7ee5Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4242af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4243af9a7ee5Smrg lt_cv_file_magic_cmd='func_win32_libid' 4244af9a7ee5Smrg else 4245af9a7ee5Smrg # Keep this pattern in sync with the one in func_win32_libid. 4246af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4247af9a7ee5Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4248af9a7ee5Smrg fi 4249af9a7ee5Smrg ;; 4250af9a7ee5Smrg 4251af9a7ee5Smrgcegcc*) 4252af9a7ee5Smrg # use the weaker test based on 'objdump'. See mingw*. 4253af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4254af9a7ee5Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4255af9a7ee5Smrg ;; 4256af9a7ee5Smrg 4257af9a7ee5Smrgdarwin* | rhapsody*) 4258af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4259af9a7ee5Smrg ;; 4260af9a7ee5Smrg 4261af9a7ee5Smrgfreebsd* | dragonfly*) 4262af9a7ee5Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4263af9a7ee5Smrg case $host_cpu in 4264af9a7ee5Smrg i*86 ) 4265af9a7ee5Smrg # Not sure whether the presence of OpenBSD here was a mistake. 4266af9a7ee5Smrg # Let's accept both of them until this is cleared up. 4267af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4268af9a7ee5Smrg lt_cv_file_magic_cmd=/usr/bin/file 4269af9a7ee5Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4270af9a7ee5Smrg ;; 4271af9a7ee5Smrg esac 4272af9a7ee5Smrg else 4273af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4274af9a7ee5Smrg fi 4275caade7ccSmrg ;; 4276caade7ccSmrg 4277b9b4fd27Smrggnu*) 4278af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4279caade7ccSmrg ;; 4280caade7ccSmrg 4281e8a5466aSmrghaiku*) 4282af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4283e8a5466aSmrg ;; 4284e8a5466aSmrg 4285af9a7ee5Smrghpux10.20* | hpux11*) 4286af9a7ee5Smrg lt_cv_file_magic_cmd=/usr/bin/file 4287b9b4fd27Smrg case $host_cpu in 4288b9b4fd27Smrg ia64*) 4289af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4290af9a7ee5Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4291b9b4fd27Smrg ;; 4292b9b4fd27Smrg hppa*64*) 4293af9a7ee5Smrg [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]'] 4294af9a7ee5Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4295b9b4fd27Smrg ;; 4296b9b4fd27Smrg *) 4297af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4298af9a7ee5Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4299b9b4fd27Smrg ;; 4300b9b4fd27Smrg esac 4301caade7ccSmrg ;; 4302caade7ccSmrg 4303b9b4fd27Smrginterix[[3-9]]*) 4304af9a7ee5Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4305af9a7ee5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4306b9b4fd27Smrg ;; 4307caade7ccSmrg 4308b9b4fd27Smrgirix5* | irix6* | nonstopux*) 4309af9a7ee5Smrg case $LD in 4310af9a7ee5Smrg *-32|*"-32 ") libmagic=32-bit;; 4311af9a7ee5Smrg *-n32|*"-n32 ") libmagic=N32;; 4312af9a7ee5Smrg *-64|*"-64 ") libmagic=64-bit;; 4313af9a7ee5Smrg *) libmagic=never-match;; 4314b9b4fd27Smrg esac 4315af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4316b9b4fd27Smrg ;; 4317caade7ccSmrg 4318af9a7ee5Smrg# This must be glibc/ELF. 4319af9a7ee5Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 4320af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4321b9b4fd27Smrg ;; 4322caade7ccSmrg 4323af9a7ee5Smrgnetbsd*) 4324af9a7ee5Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4325af9a7ee5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4326af9a7ee5Smrg else 4327af9a7ee5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4328af9a7ee5Smrg fi 4329af9a7ee5Smrg ;; 4330e8a5466aSmrg 4331af9a7ee5Smrgnewos6*) 4332af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4333af9a7ee5Smrg lt_cv_file_magic_cmd=/usr/bin/file 4334af9a7ee5Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 4335b9b4fd27Smrg ;; 4336caade7ccSmrg 4337b9b4fd27Smrg*nto* | *qnx*) 4338af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4339b9b4fd27Smrg ;; 4340caade7ccSmrg 4341b9b4fd27Smrgopenbsd*) 4342b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4343af9a7ee5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4344b9b4fd27Smrg else 4345af9a7ee5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4346b9b4fd27Smrg fi 4347b9b4fd27Smrg ;; 4348caade7ccSmrg 4349b9b4fd27Smrgosf3* | osf4* | osf5*) 4350af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4351b9b4fd27Smrg ;; 4352caade7ccSmrg 4353b9b4fd27Smrgrdos*) 4354af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4355b9b4fd27Smrg ;; 4356caade7ccSmrg 4357b9b4fd27Smrgsolaris*) 4358af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4359b9b4fd27Smrg ;; 4360caade7ccSmrg 4361af9a7ee5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4362af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4363b9b4fd27Smrg ;; 4364caade7ccSmrg 4365b9b4fd27Smrgsysv4 | sysv4.3*) 4366b9b4fd27Smrg case $host_vendor in 4367af9a7ee5Smrg motorola) 4368af9a7ee5Smrg 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]]' 4369af9a7ee5Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4370af9a7ee5Smrg ;; 4371af9a7ee5Smrg ncr) 4372af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4373af9a7ee5Smrg ;; 4374af9a7ee5Smrg sequent) 4375af9a7ee5Smrg lt_cv_file_magic_cmd='/bin/file' 4376af9a7ee5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4377af9a7ee5Smrg ;; 4378af9a7ee5Smrg sni) 4379af9a7ee5Smrg lt_cv_file_magic_cmd='/bin/file' 4380af9a7ee5Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4381af9a7ee5Smrg lt_cv_file_magic_test_file=/lib/libc.so 4382af9a7ee5Smrg ;; 4383af9a7ee5Smrg siemens) 4384af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4385af9a7ee5Smrg ;; 4386af9a7ee5Smrg pc) 4387af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4388af9a7ee5Smrg ;; 4389b9b4fd27Smrg esac 4390b9b4fd27Smrg ;; 4391caade7ccSmrg 4392b9b4fd27Smrgtpf*) 4393af9a7ee5Smrg lt_cv_deplibs_check_method=pass_all 4394b9b4fd27Smrg ;; 4395b9b4fd27Smrgesac 4396af9a7ee5Smrg]) 4397b9b4fd27Smrg 4398af9a7ee5Smrgfile_magic_glob= 4399af9a7ee5Smrgwant_nocaseglob=no 4400af9a7ee5Smrgif test "$build" = "$host"; then 4401af9a7ee5Smrg case $host_os in 4402af9a7ee5Smrg mingw* | pw32*) 4403af9a7ee5Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4404af9a7ee5Smrg want_nocaseglob=yes 4405af9a7ee5Smrg else 4406af9a7ee5Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4407af9a7ee5Smrg fi 4408af9a7ee5Smrg ;; 4409af9a7ee5Smrg esac 4410b9b4fd27Smrgfi 4411caade7ccSmrg 4412af9a7ee5Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 4413af9a7ee5Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 4414af9a7ee5Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4415caade7ccSmrg 4416af9a7ee5Smrg_LT_DECL([], [deplibs_check_method], [1], 4417af9a7ee5Smrg [Method to check whether dependent libraries are shared objects]) 4418af9a7ee5Smrg_LT_DECL([], [file_magic_cmd], [1], 4419af9a7ee5Smrg [Command to use when deplibs_check_method = "file_magic"]) 4420af9a7ee5Smrg_LT_DECL([], [file_magic_glob], [1], 4421af9a7ee5Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 4422af9a7ee5Smrg_LT_DECL([], [want_nocaseglob], [1], 4423af9a7ee5Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4424af9a7ee5Smrg])# _LT_CHECK_MAGIC_METHOD 4425caade7ccSmrg 4426caade7ccSmrg 4427af9a7ee5Smrg# LT_PATH_NM 4428af9a7ee5Smrg# ---------- 4429af9a7ee5Smrg# find the pathname to a BSD- or MS-compatible name lister 4430af9a7ee5SmrgAC_DEFUN([LT_PATH_NM], 4431af9a7ee5Smrg[AC_REQUIRE([AC_PROG_CC])dnl 4432af9a7ee5SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4433af9a7ee5Smrg[if test -n "$NM"; then 4434af9a7ee5Smrg # Let the user override the test. 4435af9a7ee5Smrg lt_cv_path_NM="$NM" 4436af9a7ee5Smrgelse 4437af9a7ee5Smrg lt_nm_to_check="${ac_tool_prefix}nm" 4438af9a7ee5Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4439af9a7ee5Smrg lt_nm_to_check="$lt_nm_to_check nm" 4440af9a7ee5Smrg fi 4441af9a7ee5Smrg for lt_tmp_nm in $lt_nm_to_check; do 4442af9a7ee5Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4443af9a7ee5Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4444af9a7ee5Smrg IFS="$lt_save_ifs" 4445af9a7ee5Smrg test -z "$ac_dir" && ac_dir=. 4446af9a7ee5Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 4447af9a7ee5Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4448af9a7ee5Smrg # Check to see if the nm accepts a BSD-compat flag. 4449af9a7ee5Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4450af9a7ee5Smrg # nm: unknown option "B" ignored 4451af9a7ee5Smrg # Tru64's nm complains that /dev/null is an invalid object file 4452af9a7ee5Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4453af9a7ee5Smrg */dev/null* | *'Invalid file or object type'*) 4454af9a7ee5Smrg lt_cv_path_NM="$tmp_nm -B" 4455af9a7ee5Smrg break 4456af9a7ee5Smrg ;; 4457af9a7ee5Smrg *) 4458af9a7ee5Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4459af9a7ee5Smrg */dev/null*) 4460af9a7ee5Smrg lt_cv_path_NM="$tmp_nm -p" 4461af9a7ee5Smrg break 4462af9a7ee5Smrg ;; 4463af9a7ee5Smrg *) 4464af9a7ee5Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4465af9a7ee5Smrg continue # so that we can try to find one that supports BSD flags 4466af9a7ee5Smrg ;; 4467af9a7ee5Smrg esac 4468af9a7ee5Smrg ;; 4469b9b4fd27Smrg esac 4470b9b4fd27Smrg fi 4471af9a7ee5Smrg done 4472af9a7ee5Smrg IFS="$lt_save_ifs" 4473b9b4fd27Smrg done 4474af9a7ee5Smrg : ${lt_cv_path_NM=no} 4475af9a7ee5Smrgfi]) 4476af9a7ee5Smrgif test "$lt_cv_path_NM" != "no"; then 4477af9a7ee5Smrg NM="$lt_cv_path_NM" 4478b9b4fd27Smrgelse 4479af9a7ee5Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 4480af9a7ee5Smrg if test -n "$DUMPBIN"; then : 4481af9a7ee5Smrg # Let the user override the test. 4482b9b4fd27Smrg else 4483af9a7ee5Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4484af9a7ee5Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4485af9a7ee5Smrg *COFF*) 4486af9a7ee5Smrg DUMPBIN="$DUMPBIN -symbols" 4487af9a7ee5Smrg ;; 4488af9a7ee5Smrg *) 4489af9a7ee5Smrg DUMPBIN=: 4490af9a7ee5Smrg ;; 4491af9a7ee5Smrg esac 4492af9a7ee5Smrg fi 4493af9a7ee5Smrg AC_SUBST([DUMPBIN]) 4494af9a7ee5Smrg if test "$DUMPBIN" != ":"; then 4495af9a7ee5Smrg NM="$DUMPBIN" 4496b9b4fd27Smrg fi 4497b9b4fd27Smrgfi 4498af9a7ee5Smrgtest -z "$NM" && NM=nm 4499af9a7ee5SmrgAC_SUBST([NM]) 4500af9a7ee5Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4501caade7ccSmrg 4502af9a7ee5SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4503af9a7ee5Smrg [lt_cv_nm_interface="BSD nm" 4504af9a7ee5Smrg echo "int some_variable = 0;" > conftest.$ac_ext 4505af9a7ee5Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4506af9a7ee5Smrg (eval "$ac_compile" 2>conftest.err) 4507af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4508af9a7ee5Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4509af9a7ee5Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4510af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4511af9a7ee5Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4512af9a7ee5Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 4513af9a7ee5Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4514af9a7ee5Smrg lt_cv_nm_interface="MS dumpbin" 4515af9a7ee5Smrg fi 4516af9a7ee5Smrg rm -f conftest*]) 4517af9a7ee5Smrg])# LT_PATH_NM 4518caade7ccSmrg 4519af9a7ee5Smrg# Old names: 4520af9a7ee5SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4521af9a7ee5SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4522af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 4523af9a7ee5Smrgdnl AC_DEFUN([AM_PROG_NM], []) 4524af9a7ee5Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4525caade7ccSmrg 4526af9a7ee5Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4527af9a7ee5Smrg# -------------------------------- 4528af9a7ee5Smrg# how to determine the name of the shared library 4529af9a7ee5Smrg# associated with a specific link library. 4530af9a7ee5Smrg# -- PORTME fill in with the dynamic library characteristics 4531af9a7ee5Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4532af9a7ee5Smrg[m4_require([_LT_DECL_EGREP]) 4533af9a7ee5Smrgm4_require([_LT_DECL_OBJDUMP]) 4534af9a7ee5Smrgm4_require([_LT_DECL_DLLTOOL]) 4535af9a7ee5SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 4536af9a7ee5Smrglt_cv_sharedlib_from_linklib_cmd, 4537af9a7ee5Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4538b9b4fd27Smrg 4539af9a7ee5Smrgcase $host_os in 4540af9a7ee5Smrgcygwin* | mingw* | pw32* | cegcc*) 4541af9a7ee5Smrg # two different shell functions defined in ltmain.sh 4542af9a7ee5Smrg # decide which to use based on capabilities of $DLLTOOL 4543af9a7ee5Smrg case `$DLLTOOL --help 2>&1` in 4544af9a7ee5Smrg *--identify-strict*) 4545af9a7ee5Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4546af9a7ee5Smrg ;; 4547b9b4fd27Smrg *) 4548af9a7ee5Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4549af9a7ee5Smrg ;; 4550b9b4fd27Smrg esac 4551b9b4fd27Smrg ;; 4552b9b4fd27Smrg*) 4553af9a7ee5Smrg # fallback: assume linklib IS sharedlib 4554af9a7ee5Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4555b9b4fd27Smrg ;; 4556b9b4fd27Smrgesac 4557af9a7ee5Smrg]) 4558af9a7ee5Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4559af9a7ee5Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4560caade7ccSmrg 4561af9a7ee5Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4562af9a7ee5Smrg [Command to associate shared and link libraries]) 4563af9a7ee5Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4564caade7ccSmrg 4565af9a7ee5Smrg 4566af9a7ee5Smrg# _LT_PATH_MANIFEST_TOOL 4567b9b4fd27Smrg# ---------------------- 4568af9a7ee5Smrg# locate the manifest tool 4569af9a7ee5Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 4570af9a7ee5Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4571af9a7ee5Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4572af9a7ee5SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4573af9a7ee5Smrg [lt_cv_path_mainfest_tool=no 4574af9a7ee5Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4575af9a7ee5Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4576af9a7ee5Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4577af9a7ee5Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4578af9a7ee5Smrg lt_cv_path_mainfest_tool=yes 4579af9a7ee5Smrg fi 4580af9a7ee5Smrg rm -f conftest*]) 4581af9a7ee5Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 4582af9a7ee5Smrg MANIFEST_TOOL=: 4583af9a7ee5Smrgfi 4584af9a7ee5Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4585af9a7ee5Smrg])# _LT_PATH_MANIFEST_TOOL 4586caade7ccSmrg 4587caade7ccSmrg 4588af9a7ee5Smrg# LT_LIB_M 4589af9a7ee5Smrg# -------- 4590af9a7ee5Smrg# check for math library 4591af9a7ee5SmrgAC_DEFUN([LT_LIB_M], 4592af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4593af9a7ee5SmrgLIBM= 4594af9a7ee5Smrgcase $host in 4595af9a7ee5Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4596af9a7ee5Smrg # These system don't have libm, or don't need it 4597b9b4fd27Smrg ;; 4598af9a7ee5Smrg*-ncr-sysv4.3*) 4599af9a7ee5Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4600af9a7ee5Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4601b9b4fd27Smrg ;; 4602af9a7ee5Smrg*) 4603af9a7ee5Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4604b9b4fd27Smrg ;; 4605af9a7ee5Smrgesac 4606af9a7ee5SmrgAC_SUBST([LIBM]) 4607af9a7ee5Smrg])# LT_LIB_M 4608caade7ccSmrg 4609af9a7ee5Smrg# Old name: 4610af9a7ee5SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4611af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 4612af9a7ee5Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4613caade7ccSmrg 4614caade7ccSmrg 4615af9a7ee5Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 4616af9a7ee5Smrg# ------------------------------- 4617af9a7ee5Smrgm4_defun([_LT_COMPILER_NO_RTTI], 4618af9a7ee5Smrg[m4_require([_LT_TAG_COMPILER])dnl 4619caade7ccSmrg 4620af9a7ee5Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4621caade7ccSmrg 4622af9a7ee5Smrgif test "$GCC" = yes; then 4623af9a7ee5Smrg case $cc_basename in 4624af9a7ee5Smrg nvcc*) 4625af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4626af9a7ee5Smrg *) 4627af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4628af9a7ee5Smrg esac 4629caade7ccSmrg 4630af9a7ee5Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4631af9a7ee5Smrg lt_cv_prog_compiler_rtti_exceptions, 4632af9a7ee5Smrg [-fno-rtti -fno-exceptions], [], 4633af9a7ee5Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4634af9a7ee5Smrgfi 4635af9a7ee5Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4636af9a7ee5Smrg [Compiler flag to turn off builtin functions]) 4637af9a7ee5Smrg])# _LT_COMPILER_NO_RTTI 4638e8a5466aSmrg 4639caade7ccSmrg 4640af9a7ee5Smrg# _LT_CMD_GLOBAL_SYMBOLS 4641af9a7ee5Smrg# ---------------------- 4642af9a7ee5Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4643af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4644af9a7ee5SmrgAC_REQUIRE([AC_PROG_CC])dnl 4645af9a7ee5SmrgAC_REQUIRE([AC_PROG_AWK])dnl 4646af9a7ee5SmrgAC_REQUIRE([LT_PATH_NM])dnl 4647af9a7ee5SmrgAC_REQUIRE([LT_PATH_LD])dnl 4648af9a7ee5Smrgm4_require([_LT_DECL_SED])dnl 4649af9a7ee5Smrgm4_require([_LT_DECL_EGREP])dnl 4650af9a7ee5Smrgm4_require([_LT_TAG_COMPILER])dnl 4651caade7ccSmrg 4652af9a7ee5Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4653af9a7ee5SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4654af9a7ee5SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4655af9a7ee5Smrg[ 4656af9a7ee5Smrg# These are sane defaults that work on at least a few old systems. 4657af9a7ee5Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4658caade7ccSmrg 4659af9a7ee5Smrg# Character class describing NM global symbol codes. 4660af9a7ee5Smrgsymcode='[[BCDEGRST]]' 4661caade7ccSmrg 4662af9a7ee5Smrg# Regexp to match symbols that can be accessed directly from C. 4663af9a7ee5Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4664caade7ccSmrg 4665af9a7ee5Smrg# Define system-specific variables. 4666af9a7ee5Smrgcase $host_os in 4667af9a7ee5Smrgaix*) 4668af9a7ee5Smrg symcode='[[BCDT]]' 4669b9b4fd27Smrg ;; 4670af9a7ee5Smrgcygwin* | mingw* | pw32* | cegcc*) 4671af9a7ee5Smrg symcode='[[ABCDGISTW]]' 4672b9b4fd27Smrg ;; 4673af9a7ee5Smrghpux*) 4674af9a7ee5Smrg if test "$host_cpu" = ia64; then 4675af9a7ee5Smrg symcode='[[ABCDEGRST]]' 4676b9b4fd27Smrg fi 4677b9b4fd27Smrg ;; 4678af9a7ee5Smrgirix* | nonstopux*) 4679af9a7ee5Smrg symcode='[[BCDEGRST]]' 4680b9b4fd27Smrg ;; 4681af9a7ee5Smrgosf*) 4682af9a7ee5Smrg symcode='[[BCDEGQRST]]' 4683b9b4fd27Smrg ;; 4684b9b4fd27Smrgsolaris*) 4685af9a7ee5Smrg symcode='[[BDRT]]' 4686b9b4fd27Smrg ;; 4687af9a7ee5Smrgsco3.2v5*) 4688af9a7ee5Smrg symcode='[[DT]]' 4689b9b4fd27Smrg ;; 4690af9a7ee5Smrgsysv4.2uw2*) 4691af9a7ee5Smrg symcode='[[DT]]' 4692b9b4fd27Smrg ;; 4693af9a7ee5Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4694af9a7ee5Smrg symcode='[[ABDT]]' 4695af9a7ee5Smrg ;; 4696af9a7ee5Smrgsysv4) 4697af9a7ee5Smrg symcode='[[DFNSTU]]' 4698b9b4fd27Smrg ;; 4699caade7ccSmrgesac 4700a5602400Smrg 4701af9a7ee5Smrg# If we're using GNU nm, then use its standard symbol codes. 4702af9a7ee5Smrgcase `$NM -V 2>&1` in 4703af9a7ee5Smrg*GNU* | *'with BFD'*) 4704af9a7ee5Smrg symcode='[[ABCDGIRSTW]]' ;; 4705af9a7ee5Smrgesac 4706a5602400Smrg 4707af9a7ee5Smrg# Transform an extracted symbol line into a proper C declaration. 4708af9a7ee5Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4709af9a7ee5Smrg# so use this general approach. 4710af9a7ee5Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4711caade7ccSmrg 4712af9a7ee5Smrg# Transform an extracted symbol line into symbol name and symbol address 4713af9a7ee5Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4714af9a7ee5Smrglt_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'" 4715caade7ccSmrg 4716af9a7ee5Smrg# Handle CRLF in mingw tool chain 4717af9a7ee5Smrgopt_cr= 4718af9a7ee5Smrgcase $build_os in 4719af9a7ee5Smrgmingw*) 4720af9a7ee5Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4721af9a7ee5Smrg ;; 4722af9a7ee5Smrgesac 4723caade7ccSmrg 4724af9a7ee5Smrg# Try without a prefix underscore, then with it. 4725af9a7ee5Smrgfor ac_symprfx in "" "_"; do 4726af9a7ee5Smrg 4727af9a7ee5Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4728af9a7ee5Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4729af9a7ee5Smrg 4730af9a7ee5Smrg # Write the raw and C identifiers. 4731af9a7ee5Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4732af9a7ee5Smrg # Fake it for dumpbin and say T for any non-static function 4733af9a7ee5Smrg # and D for any global variable. 4734af9a7ee5Smrg # Also find C++ and __fastcall symbols from MSVC++, 4735af9a7ee5Smrg # which start with @ or ?. 4736af9a7ee5Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4737af9a7ee5Smrg" {last_section=section; section=\$ 3};"\ 4738af9a7ee5Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4739af9a7ee5Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4740af9a7ee5Smrg" \$ 0!~/External *\|/{next};"\ 4741af9a7ee5Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4742af9a7ee5Smrg" {if(hide[section]) next};"\ 4743af9a7ee5Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4744af9a7ee5Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4745af9a7ee5Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4746af9a7ee5Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4747af9a7ee5Smrg" ' prfx=^$ac_symprfx]" 4748af9a7ee5Smrg else 4749af9a7ee5Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4750b9b4fd27Smrg fi 4751af9a7ee5Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4752caade7ccSmrg 4753af9a7ee5Smrg # Check to see that the pipe works correctly. 4754af9a7ee5Smrg pipe_works=no 4755caade7ccSmrg 4756af9a7ee5Smrg rm -f conftest* 4757af9a7ee5Smrg cat > conftest.$ac_ext <<_LT_EOF 4758af9a7ee5Smrg#ifdef __cplusplus 4759af9a7ee5Smrgextern "C" { 4760af9a7ee5Smrg#endif 4761af9a7ee5Smrgchar nm_test_var; 4762af9a7ee5Smrgvoid nm_test_func(void); 4763af9a7ee5Smrgvoid nm_test_func(void){} 4764af9a7ee5Smrg#ifdef __cplusplus 4765af9a7ee5Smrg} 4766af9a7ee5Smrg#endif 4767af9a7ee5Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4768af9a7ee5Smrg_LT_EOF 4769a5602400Smrg 4770af9a7ee5Smrg if AC_TRY_EVAL(ac_compile); then 4771af9a7ee5Smrg # Now try to grab the symbols. 4772af9a7ee5Smrg nlist=conftest.nm 4773af9a7ee5Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4774af9a7ee5Smrg # Try sorting and uniquifying the output. 4775af9a7ee5Smrg if sort "$nlist" | uniq > "$nlist"T; then 4776af9a7ee5Smrg mv -f "$nlist"T "$nlist" 4777af9a7ee5Smrg else 4778af9a7ee5Smrg rm -f "$nlist"T 4779af9a7ee5Smrg fi 4780a5602400Smrg 4781af9a7ee5Smrg # Make sure that we snagged all the symbols we need. 4782af9a7ee5Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4783af9a7ee5Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4784af9a7ee5Smrg cat <<_LT_EOF > conftest.$ac_ext 4785af9a7ee5Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4786af9a7ee5Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4787af9a7ee5Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 4788af9a7ee5Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4789af9a7ee5Smrg# define LT@&t@_DLSYM_CONST 4790af9a7ee5Smrg#elif defined(__osf__) 4791af9a7ee5Smrg/* This system does not cope well with relocations in const data. */ 4792af9a7ee5Smrg# define LT@&t@_DLSYM_CONST 4793af9a7ee5Smrg#else 4794af9a7ee5Smrg# define LT@&t@_DLSYM_CONST const 4795af9a7ee5Smrg#endif 4796a5602400Smrg 4797af9a7ee5Smrg#ifdef __cplusplus 4798af9a7ee5Smrgextern "C" { 4799af9a7ee5Smrg#endif 4800a5602400Smrg 4801af9a7ee5Smrg_LT_EOF 4802af9a7ee5Smrg # Now generate the symbol file. 4803af9a7ee5Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4804a5602400Smrg 4805af9a7ee5Smrg cat <<_LT_EOF >> conftest.$ac_ext 4806caade7ccSmrg 4807af9a7ee5Smrg/* The mapping between symbol names and symbols. */ 4808af9a7ee5SmrgLT@&t@_DLSYM_CONST struct { 4809af9a7ee5Smrg const char *name; 4810af9a7ee5Smrg void *address; 4811af9a7ee5Smrg} 4812af9a7ee5Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4813af9a7ee5Smrg{ 4814af9a7ee5Smrg { "@PROGRAM@", (void *) 0 }, 4815af9a7ee5Smrg_LT_EOF 4816af9a7ee5Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4817af9a7ee5Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4818af9a7ee5Smrg {0, (void *) 0} 4819af9a7ee5Smrg}; 4820caade7ccSmrg 4821af9a7ee5Smrg/* This works around a problem in FreeBSD linker */ 4822af9a7ee5Smrg#ifdef FREEBSD_WORKAROUND 4823af9a7ee5Smrgstatic const void *lt_preloaded_setup() { 4824af9a7ee5Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4825af9a7ee5Smrg} 4826af9a7ee5Smrg#endif 4827caade7ccSmrg 4828af9a7ee5Smrg#ifdef __cplusplus 4829af9a7ee5Smrg} 4830af9a7ee5Smrg#endif 4831af9a7ee5Smrg_LT_EOF 4832af9a7ee5Smrg # Now try linking the two files. 4833af9a7ee5Smrg mv conftest.$ac_objext conftstm.$ac_objext 4834af9a7ee5Smrg lt_globsym_save_LIBS=$LIBS 4835af9a7ee5Smrg lt_globsym_save_CFLAGS=$CFLAGS 4836af9a7ee5Smrg LIBS="conftstm.$ac_objext" 4837af9a7ee5Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4838af9a7ee5Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4839af9a7ee5Smrg pipe_works=yes 4840af9a7ee5Smrg fi 4841af9a7ee5Smrg LIBS=$lt_globsym_save_LIBS 4842af9a7ee5Smrg CFLAGS=$lt_globsym_save_CFLAGS 4843af9a7ee5Smrg else 4844af9a7ee5Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4845af9a7ee5Smrg fi 4846af9a7ee5Smrg else 4847af9a7ee5Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4848af9a7ee5Smrg fi 4849af9a7ee5Smrg else 4850af9a7ee5Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4851af9a7ee5Smrg fi 4852af9a7ee5Smrg else 4853af9a7ee5Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4854af9a7ee5Smrg cat conftest.$ac_ext >&5 4855af9a7ee5Smrg fi 4856af9a7ee5Smrg rm -rf conftest* conftst* 4857caade7ccSmrg 4858af9a7ee5Smrg # Do not use the global_symbol_pipe unless it works. 4859af9a7ee5Smrg if test "$pipe_works" = yes; then 4860af9a7ee5Smrg break 4861af9a7ee5Smrg else 4862af9a7ee5Smrg lt_cv_sys_global_symbol_pipe= 4863af9a7ee5Smrg fi 4864af9a7ee5Smrgdone 4865af9a7ee5Smrg]) 4866af9a7ee5Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4867af9a7ee5Smrg lt_cv_sys_global_symbol_to_cdecl= 4868af9a7ee5Smrgfi 4869af9a7ee5Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4870af9a7ee5Smrg AC_MSG_RESULT(failed) 4871af9a7ee5Smrgelse 4872af9a7ee5Smrg AC_MSG_RESULT(ok) 4873af9a7ee5Smrgfi 4874caade7ccSmrg 4875af9a7ee5Smrg# Response file support. 4876af9a7ee5Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4877af9a7ee5Smrg nm_file_list_spec='@' 4878af9a7ee5Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4879af9a7ee5Smrg nm_file_list_spec='@' 4880af9a7ee5Smrgfi 4881a5602400Smrg 4882b9b4fd27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4883b9b4fd27Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4884b9b4fd27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4885b9b4fd27Smrg [Transform the output of nm in a proper C declaration]) 4886b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address], 4887b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4888b9b4fd27Smrg [Transform the output of nm in a C name address pair]) 4889b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4890b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4891b9b4fd27Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4892a5602400Smrg_LT_DECL([], [nm_file_list_spec], [1], 4893a5602400Smrg [Specify filename containing input files for $NM]) 4894b9b4fd27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4895caade7ccSmrg 4896caade7ccSmrg 4897b9b4fd27Smrg# _LT_COMPILER_PIC([TAGNAME]) 4898b9b4fd27Smrg# --------------------------- 4899b9b4fd27Smrgm4_defun([_LT_COMPILER_PIC], 4900b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 4901b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4902b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4903b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4904caade7ccSmrg 4905b9b4fd27Smrgm4_if([$1], [CXX], [ 4906b9b4fd27Smrg # C++ specific cases for pic, static, wl, etc. 4907b9b4fd27Smrg if test "$GXX" = yes; then 4908b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4909b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4910caade7ccSmrg 4911b9b4fd27Smrg case $host_os in 4912b9b4fd27Smrg aix*) 4913b9b4fd27Smrg # All AIX code is PIC. 4914b9b4fd27Smrg if test "$host_cpu" = ia64; then 4915b9b4fd27Smrg # AIX 5 now supports IA64 processor 4916b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4917b9b4fd27Smrg fi 4918b9b4fd27Smrg ;; 4919caade7ccSmrg 4920b9b4fd27Smrg amigaos*) 4921b9b4fd27Smrg case $host_cpu in 4922b9b4fd27Smrg powerpc) 4923b9b4fd27Smrg # see comment about AmigaOS4 .so support 4924b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4925b9b4fd27Smrg ;; 4926b9b4fd27Smrg m68k) 4927b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4928b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4929b9b4fd27Smrg # like `-m68040'. 4930b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4931b9b4fd27Smrg ;; 4932b9b4fd27Smrg esac 4933b9b4fd27Smrg ;; 4934caade7ccSmrg 4935b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4936b9b4fd27Smrg # PIC is the default for these OSes. 4937b9b4fd27Smrg ;; 4938b9b4fd27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4939b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 4940b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 4941b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4942b9b4fd27Smrg # (--disable-auto-import) libraries 4943b9b4fd27Smrg m4_if([$1], [GCJ], [], 4944b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4945b9b4fd27Smrg ;; 4946b9b4fd27Smrg darwin* | rhapsody*) 4947b9b4fd27Smrg # PIC is the default on this platform 4948b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 4949b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4950b9b4fd27Smrg ;; 4951b9b4fd27Smrg *djgpp*) 4952b9b4fd27Smrg # DJGPP does not support shared libraries at all 4953b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4954b9b4fd27Smrg ;; 4955e8a5466aSmrg haiku*) 4956e8a5466aSmrg # PIC is the default for Haiku. 4957e8a5466aSmrg # The "-static" flag exists, but is broken. 4958e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4959e8a5466aSmrg ;; 4960b9b4fd27Smrg interix[[3-9]]*) 4961b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4962b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 4963b9b4fd27Smrg ;; 4964b9b4fd27Smrg sysv4*MP*) 4965b9b4fd27Smrg if test -d /usr/nec; then 4966b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4967b9b4fd27Smrg fi 4968b9b4fd27Smrg ;; 4969b9b4fd27Smrg hpux*) 4970b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4971b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4972b9b4fd27Smrg # sets the default TLS model and affects inlining. 4973b9b4fd27Smrg case $host_cpu in 4974b9b4fd27Smrg hppa*64*) 4975b9b4fd27Smrg ;; 4976b9b4fd27Smrg *) 4977b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4978b9b4fd27Smrg ;; 4979b9b4fd27Smrg esac 4980b9b4fd27Smrg ;; 4981b9b4fd27Smrg *qnx* | *nto*) 4982b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4983b9b4fd27Smrg # it will coredump. 4984b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4985caade7ccSmrg ;; 4986caade7ccSmrg *) 4987b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4988caade7ccSmrg ;; 4989caade7ccSmrg esac 4990b9b4fd27Smrg else 4991b9b4fd27Smrg case $host_os in 4992b9b4fd27Smrg aix[[4-9]]*) 4993b9b4fd27Smrg # All AIX code is PIC. 4994b9b4fd27Smrg if test "$host_cpu" = ia64; then 4995b9b4fd27Smrg # AIX 5 now supports IA64 processor 4996b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4997b9b4fd27Smrg else 4998b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4999b9b4fd27Smrg fi 5000b9b4fd27Smrg ;; 5001b9b4fd27Smrg chorus*) 5002b9b4fd27Smrg case $cc_basename in 5003b9b4fd27Smrg cxch68*) 5004b9b4fd27Smrg # Green Hills C++ Compiler 5005b9b4fd27Smrg # _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" 5006b9b4fd27Smrg ;; 5007b9b4fd27Smrg esac 5008b9b4fd27Smrg ;; 5009a5602400Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5010a5602400Smrg # This hack is so that the source file can tell whether it is being 5011a5602400Smrg # built for inclusion in a dll (and should export symbols for example). 5012a5602400Smrg m4_if([$1], [GCJ], [], 5013a5602400Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5014a5602400Smrg ;; 5015b9b4fd27Smrg dgux*) 5016b9b4fd27Smrg case $cc_basename in 5017b9b4fd27Smrg ec++*) 5018b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5019b9b4fd27Smrg ;; 5020b9b4fd27Smrg ghcx*) 5021b9b4fd27Smrg # Green Hills C++ Compiler 5022b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5023b9b4fd27Smrg ;; 5024b9b4fd27Smrg *) 5025b9b4fd27Smrg ;; 5026b9b4fd27Smrg esac 5027b9b4fd27Smrg ;; 5028b9b4fd27Smrg freebsd* | dragonfly*) 5029b9b4fd27Smrg # FreeBSD uses GNU C++ 5030b9b4fd27Smrg ;; 5031b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 5032b9b4fd27Smrg case $cc_basename in 5033b9b4fd27Smrg CC*) 5034b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5035b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5036b9b4fd27Smrg if test "$host_cpu" != ia64; then 5037b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5038b9b4fd27Smrg fi 5039b9b4fd27Smrg ;; 5040b9b4fd27Smrg aCC*) 5041b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5042b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5043b9b4fd27Smrg case $host_cpu in 5044b9b4fd27Smrg hppa*64*|ia64*) 5045b9b4fd27Smrg # +Z the default 5046b9b4fd27Smrg ;; 5047b9b4fd27Smrg *) 5048b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5049b9b4fd27Smrg ;; 5050b9b4fd27Smrg esac 5051b9b4fd27Smrg ;; 5052b9b4fd27Smrg *) 5053b9b4fd27Smrg ;; 5054b9b4fd27Smrg esac 5055b9b4fd27Smrg ;; 5056b9b4fd27Smrg interix*) 5057b9b4fd27Smrg # This is c89, which is MS Visual C++ (no shared libs) 5058b9b4fd27Smrg # Anyone wants to do a port? 5059b9b4fd27Smrg ;; 5060b9b4fd27Smrg irix5* | irix6* | nonstopux*) 5061b9b4fd27Smrg case $cc_basename in 5062b9b4fd27Smrg CC*) 5063b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5064b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5065b9b4fd27Smrg # CC pic flag -KPIC is the default. 5066b9b4fd27Smrg ;; 5067b9b4fd27Smrg *) 5068b9b4fd27Smrg ;; 5069b9b4fd27Smrg esac 5070b9b4fd27Smrg ;; 5071e8a5466aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5072b9b4fd27Smrg case $cc_basename in 5073b9b4fd27Smrg KCC*) 5074b9b4fd27Smrg # KAI C++ Compiler 5075b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5076b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5077b9b4fd27Smrg ;; 5078b9b4fd27Smrg ecpc* ) 5079b9b4fd27Smrg # old Intel C++ for x86_64 which still supported -KPIC. 5080b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5081b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5082b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5083b9b4fd27Smrg ;; 5084b9b4fd27Smrg icpc* ) 5085b9b4fd27Smrg # Intel C++, used to be incompatible with GCC. 5086b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 5087b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5088b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5089b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5090b9b4fd27Smrg ;; 5091b9b4fd27Smrg pgCC* | pgcpp*) 5092b9b4fd27Smrg # Portland Group C++ compiler 5093b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5094b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5095b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5096b9b4fd27Smrg ;; 5097b9b4fd27Smrg cxx*) 5098b9b4fd27Smrg # Compaq C++ 5099b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5100b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5101b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5102b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5103b9b4fd27Smrg ;; 5104e8a5466aSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5105e8a5466aSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 5106b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5107b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5108b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5109b9b4fd27Smrg ;; 5110b9b4fd27Smrg *) 5111b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 5112b9b4fd27Smrg *Sun\ C*) 5113b9b4fd27Smrg # Sun C++ 5.9 5114b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5115b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5116b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5117b9b4fd27Smrg ;; 5118b9b4fd27Smrg esac 5119b9b4fd27Smrg ;; 5120b9b4fd27Smrg esac 5121b9b4fd27Smrg ;; 5122b9b4fd27Smrg lynxos*) 5123b9b4fd27Smrg ;; 5124b9b4fd27Smrg m88k*) 5125b9b4fd27Smrg ;; 5126b9b4fd27Smrg mvs*) 5127b9b4fd27Smrg case $cc_basename in 5128b9b4fd27Smrg cxx*) 5129b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5130b9b4fd27Smrg ;; 5131b9b4fd27Smrg *) 5132b9b4fd27Smrg ;; 5133b9b4fd27Smrg esac 5134b9b4fd27Smrg ;; 5135b9b4fd27Smrg netbsd*) 5136b9b4fd27Smrg ;; 5137b9b4fd27Smrg *qnx* | *nto*) 5138b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5139b9b4fd27Smrg # it will coredump. 5140b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5141b9b4fd27Smrg ;; 5142b9b4fd27Smrg osf3* | osf4* | osf5*) 5143b9b4fd27Smrg case $cc_basename in 5144b9b4fd27Smrg KCC*) 5145b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5146b9b4fd27Smrg ;; 5147b9b4fd27Smrg RCC*) 5148b9b4fd27Smrg # Rational C++ 2.4.1 5149b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5150b9b4fd27Smrg ;; 5151b9b4fd27Smrg cxx*) 5152b9b4fd27Smrg # Digital/Compaq C++ 5153b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5154b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 5155b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 5156b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5157b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5158b9b4fd27Smrg ;; 5159b9b4fd27Smrg *) 5160b9b4fd27Smrg ;; 5161b9b4fd27Smrg esac 5162b9b4fd27Smrg ;; 5163b9b4fd27Smrg psos*) 5164b9b4fd27Smrg ;; 5165b9b4fd27Smrg solaris*) 5166b9b4fd27Smrg case $cc_basename in 5167e8a5466aSmrg CC* | sunCC*) 5168b9b4fd27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5169b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5170b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5171b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5172b9b4fd27Smrg ;; 5173b9b4fd27Smrg gcx*) 5174b9b4fd27Smrg # Green Hills C++ Compiler 5175b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5176b9b4fd27Smrg ;; 5177b9b4fd27Smrg *) 5178b9b4fd27Smrg ;; 5179b9b4fd27Smrg esac 5180b9b4fd27Smrg ;; 5181b9b4fd27Smrg sunos4*) 5182b9b4fd27Smrg case $cc_basename in 5183b9b4fd27Smrg CC*) 5184b9b4fd27Smrg # Sun C++ 4.x 5185b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5186b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5187b9b4fd27Smrg ;; 5188b9b4fd27Smrg lcc*) 5189b9b4fd27Smrg # Lucid 5190b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5191b9b4fd27Smrg ;; 5192b9b4fd27Smrg *) 5193b9b4fd27Smrg ;; 5194b9b4fd27Smrg esac 5195b9b4fd27Smrg ;; 5196b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5197b9b4fd27Smrg case $cc_basename in 5198b9b4fd27Smrg CC*) 5199b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5200b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5201b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5202b9b4fd27Smrg ;; 5203b9b4fd27Smrg esac 5204b9b4fd27Smrg ;; 5205b9b4fd27Smrg tandem*) 5206b9b4fd27Smrg case $cc_basename in 5207b9b4fd27Smrg NCC*) 5208b9b4fd27Smrg # NonStop-UX NCC 3.20 5209b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5210b9b4fd27Smrg ;; 5211b9b4fd27Smrg *) 5212b9b4fd27Smrg ;; 5213b9b4fd27Smrg esac 5214b9b4fd27Smrg ;; 5215b9b4fd27Smrg vxworks*) 5216b9b4fd27Smrg ;; 5217b9b4fd27Smrg *) 5218b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5219b9b4fd27Smrg ;; 5220b9b4fd27Smrg esac 5221b9b4fd27Smrg fi 5222b9b4fd27Smrg], 5223b9b4fd27Smrg[ 5224b9b4fd27Smrg if test "$GCC" = yes; then 5225b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5226b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5227caade7ccSmrg 5228b9b4fd27Smrg case $host_os in 5229b9b4fd27Smrg aix*) 5230b9b4fd27Smrg # All AIX code is PIC. 5231b9b4fd27Smrg if test "$host_cpu" = ia64; then 5232b9b4fd27Smrg # AIX 5 now supports IA64 processor 5233b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5234b9b4fd27Smrg fi 5235b9b4fd27Smrg ;; 5236caade7ccSmrg 5237b9b4fd27Smrg amigaos*) 5238b9b4fd27Smrg case $host_cpu in 5239b9b4fd27Smrg powerpc) 5240b9b4fd27Smrg # see comment about AmigaOS4 .so support 5241b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5242b9b4fd27Smrg ;; 5243b9b4fd27Smrg m68k) 5244b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5245b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5246b9b4fd27Smrg # like `-m68040'. 5247b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5248b9b4fd27Smrg ;; 5249b9b4fd27Smrg esac 5250b9b4fd27Smrg ;; 5251caade7ccSmrg 5252b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5253b9b4fd27Smrg # PIC is the default for these OSes. 5254b9b4fd27Smrg ;; 5255caade7ccSmrg 5256b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5257b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 5258b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 5259b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5260b9b4fd27Smrg # (--disable-auto-import) libraries 5261b9b4fd27Smrg m4_if([$1], [GCJ], [], 5262b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5263b9b4fd27Smrg ;; 5264caade7ccSmrg 5265b9b4fd27Smrg darwin* | rhapsody*) 5266b9b4fd27Smrg # PIC is the default on this platform 5267b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 5268b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5269b9b4fd27Smrg ;; 5270caade7ccSmrg 5271e8a5466aSmrg haiku*) 5272e8a5466aSmrg # PIC is the default for Haiku. 5273e8a5466aSmrg # The "-static" flag exists, but is broken. 5274e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5275e8a5466aSmrg ;; 5276e8a5466aSmrg 5277b9b4fd27Smrg hpux*) 5278b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5279b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5280b9b4fd27Smrg # sets the default TLS model and affects inlining. 5281b9b4fd27Smrg case $host_cpu in 5282b9b4fd27Smrg hppa*64*) 5283b9b4fd27Smrg # +Z the default 5284b9b4fd27Smrg ;; 5285b9b4fd27Smrg *) 5286b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5287b9b4fd27Smrg ;; 5288b9b4fd27Smrg esac 5289b9b4fd27Smrg ;; 5290caade7ccSmrg 5291b9b4fd27Smrg interix[[3-9]]*) 5292b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5293b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 5294b9b4fd27Smrg ;; 5295caade7ccSmrg 5296b9b4fd27Smrg msdosdjgpp*) 5297b9b4fd27Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5298b9b4fd27Smrg # on systems that don't support them. 5299b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5300b9b4fd27Smrg enable_shared=no 5301b9b4fd27Smrg ;; 5302caade7ccSmrg 5303b9b4fd27Smrg *nto* | *qnx*) 5304b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5305b9b4fd27Smrg # it will coredump. 5306b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5307b9b4fd27Smrg ;; 5308caade7ccSmrg 5309b9b4fd27Smrg sysv4*MP*) 5310b9b4fd27Smrg if test -d /usr/nec; then 5311b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5312b9b4fd27Smrg fi 5313b9b4fd27Smrg ;; 5314caade7ccSmrg 5315b9b4fd27Smrg *) 5316b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5317b9b4fd27Smrg ;; 5318b9b4fd27Smrg esac 5319e8a5466aSmrg 5320e8a5466aSmrg case $cc_basename in 5321e8a5466aSmrg nvcc*) # Cuda Compiler Driver 2.2 5322e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5323af9a7ee5Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5324af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5325af9a7ee5Smrg fi 5326e8a5466aSmrg ;; 5327e8a5466aSmrg esac 5328b9b4fd27Smrg else 5329b9b4fd27Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5330b9b4fd27Smrg case $host_os in 5331b9b4fd27Smrg aix*) 5332b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5333b9b4fd27Smrg if test "$host_cpu" = ia64; then 5334b9b4fd27Smrg # AIX 5 now supports IA64 processor 5335b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5336b9b4fd27Smrg else 5337b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5338b9b4fd27Smrg fi 5339b9b4fd27Smrg ;; 5340caade7ccSmrg 5341b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5342b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 5343b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 5344b9b4fd27Smrg m4_if([$1], [GCJ], [], 5345b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5346b9b4fd27Smrg ;; 5347caade7ccSmrg 5348b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 5349b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5350b9b4fd27Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5351b9b4fd27Smrg # not for PA HP-UX. 5352b9b4fd27Smrg case $host_cpu in 5353b9b4fd27Smrg hppa*64*|ia64*) 5354b9b4fd27Smrg # +Z the default 5355b9b4fd27Smrg ;; 5356b9b4fd27Smrg *) 5357b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5358b9b4fd27Smrg ;; 5359b9b4fd27Smrg esac 5360b9b4fd27Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5361b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5362b9b4fd27Smrg ;; 5363caade7ccSmrg 5364b9b4fd27Smrg irix5* | irix6* | nonstopux*) 5365b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5366b9b4fd27Smrg # PIC (with -KPIC) is the default. 5367b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5368b9b4fd27Smrg ;; 5369caade7ccSmrg 5370e8a5466aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5371b9b4fd27Smrg case $cc_basename in 5372b9b4fd27Smrg # old Intel for x86_64 which still supported -KPIC. 5373b9b4fd27Smrg ecc*) 5374b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5375b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5376b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5377b9b4fd27Smrg ;; 5378b9b4fd27Smrg # icc used to be incompatible with GCC. 5379b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 5380b9b4fd27Smrg icc* | ifort*) 5381b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5382b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5383b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5384b9b4fd27Smrg ;; 5385b9b4fd27Smrg # Lahey Fortran 8.1. 5386b9b4fd27Smrg lf95*) 5387b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5388b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5389b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5390b9b4fd27Smrg ;; 5391a5602400Smrg nagfor*) 5392a5602400Smrg # NAG Fortran compiler 5393a5602400Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5394a5602400Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5395a5602400Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5396a5602400Smrg ;; 5397e8a5466aSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5398b9b4fd27Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 5399b9b4fd27Smrg # which looks to be a dead project) 5400b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5401b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5402b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5403b9b4fd27Smrg ;; 5404b9b4fd27Smrg ccc*) 5405b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5406b9b4fd27Smrg # All Alpha code is PIC. 5407b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5408b9b4fd27Smrg ;; 5409e8a5466aSmrg xl* | bgxl* | bgf* | mpixl*) 5410e8a5466aSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5411b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5412b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5413b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5414b9b4fd27Smrg ;; 5415b9b4fd27Smrg *) 5416b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 5417af9a7ee5Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5418e8a5466aSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5419b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5420b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5421e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5422b9b4fd27Smrg ;; 5423af9a7ee5Smrg *Sun\ F* | *Sun*Fortran*) 5424af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5425af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5426af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5427af9a7ee5Smrg ;; 5428af9a7ee5Smrg *Sun\ C*) 5429e8a5466aSmrg # Sun C 5.9 5430b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5431b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5432e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5433b9b4fd27Smrg ;; 5434af9a7ee5Smrg *Intel*\ [[CF]]*Compiler*) 5435af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5436af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5437af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5438af9a7ee5Smrg ;; 5439af9a7ee5Smrg *Portland\ Group*) 5440af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5441af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5442af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5443af9a7ee5Smrg ;; 5444b9b4fd27Smrg esac 5445b9b4fd27Smrg ;; 5446b9b4fd27Smrg esac 5447b9b4fd27Smrg ;; 5448caade7ccSmrg 5449b9b4fd27Smrg newsos6) 5450b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5451b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5452b9b4fd27Smrg ;; 5453caade7ccSmrg 5454b9b4fd27Smrg *nto* | *qnx*) 5455b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5456b9b4fd27Smrg # it will coredump. 5457b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5458b9b4fd27Smrg ;; 5459caade7ccSmrg 5460b9b4fd27Smrg osf3* | osf4* | osf5*) 5461b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5462b9b4fd27Smrg # All OSF/1 code is PIC. 5463b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5464b9b4fd27Smrg ;; 5465caade7ccSmrg 5466b9b4fd27Smrg rdos*) 5467b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5468b9b4fd27Smrg ;; 5469caade7ccSmrg 5470b9b4fd27Smrg solaris*) 5471b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5472b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5473b9b4fd27Smrg case $cc_basename in 5474e8a5466aSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5475b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5476b9b4fd27Smrg *) 5477b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5478b9b4fd27Smrg esac 5479b9b4fd27Smrg ;; 5480caade7ccSmrg 5481b9b4fd27Smrg sunos4*) 5482b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5483b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5484b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5485b9b4fd27Smrg ;; 5486caade7ccSmrg 5487b9b4fd27Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 5488b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5489b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5490b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5491b9b4fd27Smrg ;; 5492caade7ccSmrg 5493b9b4fd27Smrg sysv4*MP*) 5494b9b4fd27Smrg if test -d /usr/nec ;then 5495b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5496b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5497b9b4fd27Smrg fi 5498b9b4fd27Smrg ;; 5499caade7ccSmrg 5500b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5501b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5502b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5503b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5504b9b4fd27Smrg ;; 5505caade7ccSmrg 5506b9b4fd27Smrg unicos*) 5507b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5508b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5509b9b4fd27Smrg ;; 5510caade7ccSmrg 5511b9b4fd27Smrg uts4*) 5512b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5513b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5514b9b4fd27Smrg ;; 5515caade7ccSmrg 5516b9b4fd27Smrg *) 5517b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5518b9b4fd27Smrg ;; 5519b9b4fd27Smrg esac 5520b9b4fd27Smrg fi 5521b9b4fd27Smrg]) 5522b9b4fd27Smrgcase $host_os in 5523b9b4fd27Smrg # For platforms which do not support PIC, -DPIC is meaningless: 5524b9b4fd27Smrg *djgpp*) 5525b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5526b9b4fd27Smrg ;; 5527b9b4fd27Smrg *) 5528b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5529b9b4fd27Smrg ;; 5530b9b4fd27Smrgesac 5531a5602400Smrg 5532a5602400SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 5533a5602400Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5534a5602400Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5535a5602400Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5536caade7ccSmrg 5537b9b4fd27Smrg# 5538b9b4fd27Smrg# Check to make sure the PIC flag actually works. 5539b9b4fd27Smrg# 5540b9b4fd27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5541b9b4fd27Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5542b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5543b9b4fd27Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5544b9b4fd27Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5545b9b4fd27Smrg "" | " "*) ;; 5546b9b4fd27Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5547b9b4fd27Smrg esac], 5548b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5549b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5550b9b4fd27Smrgfi 5551b9b4fd27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5552b9b4fd27Smrg [Additional compiler flags for building library objects]) 5553caade7ccSmrg 5554a5602400Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5555a5602400Smrg [How to pass a linker flag through the compiler]) 5556b9b4fd27Smrg# 5557b9b4fd27Smrg# Check to make sure the static flag actually works. 5558b9b4fd27Smrg# 5559b9b4fd27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5560b9b4fd27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5561b9b4fd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5562b9b4fd27Smrg $lt_tmp_static_flag, 5563b9b4fd27Smrg [], 5564b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5565b9b4fd27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5566b9b4fd27Smrg [Compiler flag to prevent dynamic linking]) 5567b9b4fd27Smrg])# _LT_COMPILER_PIC 5568caade7ccSmrg 5569caade7ccSmrg 5570b9b4fd27Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 5571b9b4fd27Smrg# ---------------------------- 5572b9b4fd27Smrg# See if the linker supports building shared libraries. 5573b9b4fd27Smrgm4_defun([_LT_LINKER_SHLIBS], 5574b9b4fd27Smrg[AC_REQUIRE([LT_PATH_LD])dnl 5575b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 5576a5602400Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5577b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5578b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 5579b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 5580b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5581b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 5582b9b4fd27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5583b9b4fd27Smrgm4_if([$1], [CXX], [ 5584b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5585a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5586b9b4fd27Smrg case $host_os in 5587b9b4fd27Smrg aix[[4-9]]*) 5588b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 5589b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5590e8a5466aSmrg # Also, AIX nm treats weak defined symbols like other global defined 5591e8a5466aSmrg # symbols, whereas GNU nm marks them as "W". 5592b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5593e8a5466aSmrg _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' 5594b9b4fd27Smrg else 5595b9b4fd27Smrg _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' 5596b9b4fd27Smrg fi 5597b9b4fd27Smrg ;; 5598b9b4fd27Smrg pw32*) 5599b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5600a5602400Smrg ;; 5601b9b4fd27Smrg cygwin* | mingw* | cegcc*) 5602a5602400Smrg case $cc_basename in 5603af9a7ee5Smrg cl*) 5604af9a7ee5Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5605af9a7ee5Smrg ;; 5606a5602400Smrg *) 5607a5602400Smrg _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' 5608a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5609a5602400Smrg ;; 5610a5602400Smrg esac 5611a5602400Smrg ;; 5612b9b4fd27Smrg *) 5613b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5614a5602400Smrg ;; 5615b9b4fd27Smrg esac 5616b9b4fd27Smrg], [ 5617b9b4fd27Smrg runpath_var= 5618b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5619b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5620b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)= 5621b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 5622b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 5623b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5624b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5625b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5626b9b4fd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 5627b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5628b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5629b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5630b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5631b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 5632b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5633b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=no 5634b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 5635b9b4fd27Smrg _LT_TAGVAR(module_cmds, $1)= 5636b9b4fd27Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 5637b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5638b9b4fd27Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5639b9b4fd27Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5640b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5641b9b4fd27Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5642b9b4fd27Smrg # included in the symbol list 5643b9b4fd27Smrg _LT_TAGVAR(include_expsyms, $1)= 5644b9b4fd27Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5645b9b4fd27Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5646b9b4fd27Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5647b9b4fd27Smrg # as well as any symbol that contains `d'. 5648b9b4fd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5649b9b4fd27Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5650b9b4fd27Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5651b9b4fd27Smrg # the symbol is explicitly referenced. Since portable code cannot 5652b9b4fd27Smrg # rely on this symbol name, it's probably fine to never include it in 5653b9b4fd27Smrg # preloaded symbol tables. 5654b9b4fd27Smrg # Exclude shared library initialization/finalization symbols. 5655b9b4fd27Smrgdnl Note also adjust exclude_expsyms for C++ above. 5656b9b4fd27Smrg extract_expsyms_cmds= 5657caade7ccSmrg 5658b9b4fd27Smrg case $host_os in 5659b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 5660b9b4fd27Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5661b9b4fd27Smrg # When not using gcc, we currently assume that we are using 5662b9b4fd27Smrg # Microsoft Visual C++. 5663b9b4fd27Smrg if test "$GCC" != yes; then 5664b9b4fd27Smrg with_gnu_ld=no 5665b9b4fd27Smrg fi 5666b9b4fd27Smrg ;; 5667b9b4fd27Smrg interix*) 5668b9b4fd27Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5669b9b4fd27Smrg with_gnu_ld=yes 5670b9b4fd27Smrg ;; 5671b9b4fd27Smrg openbsd*) 5672b9b4fd27Smrg with_gnu_ld=no 5673b9b4fd27Smrg ;; 5674b9b4fd27Smrg esac 5675caade7ccSmrg 5676b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5677e8a5466aSmrg 5678e8a5466aSmrg # On some targets, GNU ld is compatible enough with the native linker 5679e8a5466aSmrg # that we're better off using the native interface for both. 5680e8a5466aSmrg lt_use_gnu_ld_interface=no 5681b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 5682e8a5466aSmrg case $host_os in 5683e8a5466aSmrg aix*) 5684e8a5466aSmrg # The AIX port of GNU ld has always aspired to compatibility 5685e8a5466aSmrg # with the native linker. However, as the warning in the GNU ld 5686e8a5466aSmrg # block says, versions before 2.19.5* couldn't really create working 5687e8a5466aSmrg # shared libraries, regardless of the interface used. 5688e8a5466aSmrg case `$LD -v 2>&1` in 5689e8a5466aSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5690e8a5466aSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5691e8a5466aSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5692e8a5466aSmrg *) 5693e8a5466aSmrg lt_use_gnu_ld_interface=yes 5694e8a5466aSmrg ;; 5695e8a5466aSmrg esac 5696e8a5466aSmrg ;; 5697e8a5466aSmrg *) 5698e8a5466aSmrg lt_use_gnu_ld_interface=yes 5699e8a5466aSmrg ;; 5700e8a5466aSmrg esac 5701e8a5466aSmrg fi 5702e8a5466aSmrg 5703e8a5466aSmrg if test "$lt_use_gnu_ld_interface" = yes; then 5704b9b4fd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5705b9b4fd27Smrg wlarc='${wl}' 5706caade7ccSmrg 5707b9b4fd27Smrg # Set some defaults for GNU ld with shared library support. These 5708b9b4fd27Smrg # are reset later if shared libraries are not supported. Putting them 5709b9b4fd27Smrg # here allows them to be overridden if necessary. 5710b9b4fd27Smrg runpath_var=LD_RUN_PATH 5711b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5712b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5713b9b4fd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 5714b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5715b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5716b9b4fd27Smrg else 5717b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5718b9b4fd27Smrg fi 5719b9b4fd27Smrg supports_anon_versioning=no 5720b9b4fd27Smrg case `$LD -v 2>&1` in 5721e8a5466aSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5722b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5723b9b4fd27Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5724b9b4fd27Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5725b9b4fd27Smrg *\ 2.11.*) ;; # other 2.11 versions 5726b9b4fd27Smrg *) supports_anon_versioning=yes ;; 5727b9b4fd27Smrg esac 5728caade7ccSmrg 5729b9b4fd27Smrg # See if GNU ld supports shared libraries. 5730b9b4fd27Smrg case $host_os in 5731b9b4fd27Smrg aix[[3-9]]*) 5732b9b4fd27Smrg # On AIX/PPC, the GNU linker is very broken 5733b9b4fd27Smrg if test "$host_cpu" != ia64; then 5734b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5735b9b4fd27Smrg cat <<_LT_EOF 1>&2 5736caade7ccSmrg 5737e8a5466aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5738b9b4fd27Smrg*** to be unable to reliably create shared libraries on AIX. 5739b9b4fd27Smrg*** Therefore, libtool is disabling shared libraries support. If you 5740e8a5466aSmrg*** really care for shared libraries, you may want to install binutils 5741e8a5466aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5742e8a5466aSmrg*** You will then need to restart the configuration process. 5743caade7ccSmrg 5744b9b4fd27Smrg_LT_EOF 5745b9b4fd27Smrg fi 5746b9b4fd27Smrg ;; 5747caade7ccSmrg 5748b9b4fd27Smrg amigaos*) 5749b9b4fd27Smrg case $host_cpu in 5750b9b4fd27Smrg powerpc) 5751b9b4fd27Smrg # see comment about AmigaOS4 .so support 5752b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5753b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5754b9b4fd27Smrg ;; 5755b9b4fd27Smrg m68k) 5756b9b4fd27Smrg _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)' 5757b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5758b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5759b9b4fd27Smrg ;; 5760b9b4fd27Smrg esac 5761b9b4fd27Smrg ;; 5762caade7ccSmrg 5763b9b4fd27Smrg beos*) 5764b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5765b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5766b9b4fd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5767b9b4fd27Smrg # support --undefined. This deserves some investigation. FIXME 5768b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5769b9b4fd27Smrg else 5770b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5771b9b4fd27Smrg fi 5772b9b4fd27Smrg ;; 5773caade7ccSmrg 5774b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 5775b9b4fd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5776b9b4fd27Smrg # as there is no search path for DLLs. 5777b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5778e8a5466aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5779b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5780b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5781b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5782a5602400Smrg _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' 5783a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5784b9b4fd27Smrg 5785b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5786b9b4fd27Smrg _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' 5787b9b4fd27Smrg # If the export-symbols file already is a .def file (1st line 5788b9b4fd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 5789b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5790b9b4fd27Smrg cp $export_symbols $output_objdir/$soname.def; 5791b9b4fd27Smrg else 5792b9b4fd27Smrg echo EXPORTS > $output_objdir/$soname.def; 5793b9b4fd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 5794b9b4fd27Smrg fi~ 5795b9b4fd27Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5796b9b4fd27Smrg else 5797b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5798b9b4fd27Smrg fi 5799b9b4fd27Smrg ;; 5800caade7ccSmrg 5801e8a5466aSmrg haiku*) 5802e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5803e8a5466aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5804e8a5466aSmrg ;; 5805e8a5466aSmrg 5806b9b4fd27Smrg interix[[3-9]]*) 5807b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5808b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5809b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5810b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5811b9b4fd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5812b9b4fd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5813b9b4fd27Smrg # default) and relocated if they conflict, which is a slow very memory 5814b9b4fd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5815b9b4fd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5816b9b4fd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5817b9b4fd27Smrg _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' 5818b9b4fd27Smrg _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' 5819b9b4fd27Smrg ;; 5820caade7ccSmrg 5821e8a5466aSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5822b9b4fd27Smrg tmp_diet=no 5823b9b4fd27Smrg if test "$host_os" = linux-dietlibc; then 5824b9b4fd27Smrg case $cc_basename in 5825b9b4fd27Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5826b9b4fd27Smrg esac 5827b9b4fd27Smrg fi 5828b9b4fd27Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5829b9b4fd27Smrg && test "$tmp_diet" = no 5830b9b4fd27Smrg then 5831a5602400Smrg tmp_addflag=' $pic_flag' 5832b9b4fd27Smrg tmp_sharedflag='-shared' 5833b9b4fd27Smrg case $cc_basename,$host_cpu in 5834b9b4fd27Smrg pgcc*) # Portland Group C compiler 5835e8a5466aSmrg _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' 5836b9b4fd27Smrg tmp_addflag=' $pic_flag' 5837b9b4fd27Smrg ;; 5838e8a5466aSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5839e8a5466aSmrg # Portland Group f77 and f90 compilers 5840e8a5466aSmrg _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' 5841b9b4fd27Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5842b9b4fd27Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5843b9b4fd27Smrg tmp_addflag=' -i_dynamic' ;; 5844b9b4fd27Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5845b9b4fd27Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5846b9b4fd27Smrg ifc* | ifort*) # Intel Fortran compiler 5847b9b4fd27Smrg tmp_addflag=' -nofor_main' ;; 5848b9b4fd27Smrg lf95*) # Lahey Fortran 8.1 5849b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5850b9b4fd27Smrg tmp_sharedflag='--shared' ;; 5851e8a5466aSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5852b9b4fd27Smrg tmp_sharedflag='-qmkshrobj' 5853b9b4fd27Smrg tmp_addflag= ;; 5854e8a5466aSmrg nvcc*) # Cuda Compiler Driver 2.2 5855e8a5466aSmrg _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' 5856e8a5466aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5857e8a5466aSmrg ;; 5858b9b4fd27Smrg esac 5859b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 5860b9b4fd27Smrg *Sun\ C*) # Sun C 5.9 5861e8a5466aSmrg _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' 5862b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5863b9b4fd27Smrg tmp_sharedflag='-G' ;; 5864b9b4fd27Smrg *Sun\ F*) # Sun Fortran 8.3 5865b9b4fd27Smrg tmp_sharedflag='-G' ;; 5866b9b4fd27Smrg esac 5867b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5868caade7ccSmrg 5869b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 5870b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5871b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5872b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5873b9b4fd27Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5874b9b4fd27Smrg fi 5875caade7ccSmrg 5876b9b4fd27Smrg case $cc_basename in 5877e8a5466aSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5878b9b4fd27Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5879b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5880af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5881e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5882b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 5883b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5884b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5885b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5886e8a5466aSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5887b9b4fd27Smrg fi 5888b9b4fd27Smrg ;; 5889b9b4fd27Smrg esac 5890b9b4fd27Smrg else 5891b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5892b9b4fd27Smrg fi 5893b9b4fd27Smrg ;; 5894caade7ccSmrg 5895b9b4fd27Smrg netbsd*) 5896b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5897b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5898b9b4fd27Smrg wlarc= 5899b9b4fd27Smrg else 5900a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5901a5602400Smrg _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' 5902b9b4fd27Smrg fi 5903b9b4fd27Smrg ;; 5904caade7ccSmrg 5905b9b4fd27Smrg solaris*) 5906b9b4fd27Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5907b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5908b9b4fd27Smrg cat <<_LT_EOF 1>&2 5909caade7ccSmrg 5910b9b4fd27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5911b9b4fd27Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5912b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5913b9b4fd27Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5914b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 5915b9b4fd27Smrg*** used, and then restart. 5916caade7ccSmrg 5917b9b4fd27Smrg_LT_EOF 5918b9b4fd27Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5919a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5920a5602400Smrg _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' 5921b9b4fd27Smrg else 5922b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5923b9b4fd27Smrg fi 5924b9b4fd27Smrg ;; 5925caade7ccSmrg 5926b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5927b9b4fd27Smrg case `$LD -v 2>&1` in 5928b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5929b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5930b9b4fd27Smrg cat <<_LT_EOF 1>&2 5931caade7ccSmrg 5932b9b4fd27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5933b9b4fd27Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5934b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5935b9b4fd27Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5936b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 5937b9b4fd27Smrg*** used, and then restart. 5938caade7ccSmrg 5939b9b4fd27Smrg_LT_EOF 5940b9b4fd27Smrg ;; 5941b9b4fd27Smrg *) 5942b9b4fd27Smrg # For security reasons, it is highly recommended that you always 5943b9b4fd27Smrg # use absolute paths for naming shared libraries, and exclude the 5944b9b4fd27Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5945b9b4fd27Smrg # requires that you compile everything twice, which is a pain. 5946b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5947b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5948b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5949b9b4fd27Smrg _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' 5950b9b4fd27Smrg else 5951b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5952b9b4fd27Smrg fi 5953b9b4fd27Smrg ;; 5954b9b4fd27Smrg esac 5955b9b4fd27Smrg ;; 5956caade7ccSmrg 5957b9b4fd27Smrg sunos4*) 5958b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5959b9b4fd27Smrg wlarc= 5960b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5961b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5962b9b4fd27Smrg ;; 5963caade7ccSmrg 5964b9b4fd27Smrg *) 5965b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5966a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5967a5602400Smrg _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' 5968b9b4fd27Smrg else 5969b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5970b9b4fd27Smrg fi 5971b9b4fd27Smrg ;; 5972b9b4fd27Smrg esac 5973caade7ccSmrg 5974b9b4fd27Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 5975b9b4fd27Smrg runpath_var= 5976b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5977b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5978b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5979b9b4fd27Smrg fi 5980b9b4fd27Smrg else 5981b9b4fd27Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5982b9b4fd27Smrg case $host_os in 5983b9b4fd27Smrg aix3*) 5984b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5985b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5986b9b4fd27Smrg _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' 5987b9b4fd27Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5988b9b4fd27Smrg # are no directories specified by -L. 5989b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5990b9b4fd27Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 5991b9b4fd27Smrg # Neither direct hardcoding nor static linking is supported with a 5992b9b4fd27Smrg # broken collect2. 5993b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5994b9b4fd27Smrg fi 5995b9b4fd27Smrg ;; 5996caade7ccSmrg 5997b9b4fd27Smrg aix[[4-9]]*) 5998b9b4fd27Smrg if test "$host_cpu" = ia64; then 5999b9b4fd27Smrg # On IA64, the linker does run time linking by default, so we don't 6000b9b4fd27Smrg # have to do anything special. 6001b9b4fd27Smrg aix_use_runtimelinking=no 6002b9b4fd27Smrg exp_sym_flag='-Bexport' 6003b9b4fd27Smrg no_entry_flag="" 6004b9b4fd27Smrg else 6005b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 6006b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6007e8a5466aSmrg # Also, AIX nm treats weak defined symbols like other global 6008e8a5466aSmrg # defined symbols, whereas GNU nm marks them as "W". 6009b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6010e8a5466aSmrg _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' 6011b9b4fd27Smrg else 6012b9b4fd27Smrg _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' 6013b9b4fd27Smrg fi 6014b9b4fd27Smrg aix_use_runtimelinking=no 6015caade7ccSmrg 6016b9b4fd27Smrg # Test if we are trying to use run time linking or normal 6017b9b4fd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6018b9b4fd27Smrg # need to do runtime linking. 6019b9b4fd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6020b9b4fd27Smrg for ld_flag in $LDFLAGS; do 6021b9b4fd27Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6022b9b4fd27Smrg aix_use_runtimelinking=yes 6023b9b4fd27Smrg break 6024b9b4fd27Smrg fi 6025b9b4fd27Smrg done 6026b9b4fd27Smrg ;; 6027b9b4fd27Smrg esac 6028caade7ccSmrg 6029b9b4fd27Smrg exp_sym_flag='-bexport' 6030b9b4fd27Smrg no_entry_flag='-bnoentry' 6031b9b4fd27Smrg fi 6032caade7ccSmrg 6033b9b4fd27Smrg # When large executables or shared objects are built, AIX ld can 6034b9b4fd27Smrg # have problems creating the table of contents. If linking a library 6035b9b4fd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6036b9b4fd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6037b9b4fd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6038caade7ccSmrg 6039b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 6040b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6041b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6042b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6043b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6044b9b4fd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6045485f0483Smrg 6046b9b4fd27Smrg if test "$GCC" = yes; then 6047b9b4fd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6048b9b4fd27Smrg # We only want to do this on AIX 4.2 and lower, the check 6049b9b4fd27Smrg # below for broken collect2 doesn't work under 4.3+ 6050b9b4fd27Smrg collect2name=`${CC} -print-prog-name=collect2` 6051b9b4fd27Smrg if test -f "$collect2name" && 6052b9b4fd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6053b9b4fd27Smrg then 6054b9b4fd27Smrg # We have reworked collect2 6055b9b4fd27Smrg : 6056b9b4fd27Smrg else 6057b9b4fd27Smrg # We have old collect2 6058b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6059b9b4fd27Smrg # It fails to find uninstalled libraries when the uninstalled 6060b9b4fd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6061b9b4fd27Smrg # to unsupported forces relinking 6062b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6063b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6064b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6065b9b4fd27Smrg fi 6066b9b4fd27Smrg ;; 6067b9b4fd27Smrg esac 6068b9b4fd27Smrg shared_flag='-shared' 6069b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6070b9b4fd27Smrg shared_flag="$shared_flag "'${wl}-G' 6071b9b4fd27Smrg fi 6072b9b4fd27Smrg else 6073b9b4fd27Smrg # not using gcc 6074b9b4fd27Smrg if test "$host_cpu" = ia64; then 6075b9b4fd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6076b9b4fd27Smrg # chokes on -Wl,-G. The following line is correct: 6077b9b4fd27Smrg shared_flag='-G' 6078b9b4fd27Smrg else 6079b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6080b9b4fd27Smrg shared_flag='${wl}-G' 6081b9b4fd27Smrg else 6082b9b4fd27Smrg shared_flag='${wl}-bM:SRE' 6083b9b4fd27Smrg fi 6084b9b4fd27Smrg fi 6085b9b4fd27Smrg fi 6086caade7ccSmrg 6087b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6088b9b4fd27Smrg # It seems that -bexpall does not export symbols beginning with 6089b9b4fd27Smrg # underscore (_), so it is better to generate a list of symbols to export. 6090b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6091b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6092b9b4fd27Smrg # Warning - without using the other runtime loading flags (-brtl), 6093b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 6094b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6095b9b4fd27Smrg # Determine the default libpath from the value encoded in an 6096b9b4fd27Smrg # empty executable. 6097a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6098b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6099e8a5466aSmrg _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" 6100b9b4fd27Smrg else 6101b9b4fd27Smrg if test "$host_cpu" = ia64; then 6102b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6103b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6104b9b4fd27Smrg _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" 6105b9b4fd27Smrg else 6106b9b4fd27Smrg # Determine the default libpath from the value encoded in an 6107b9b4fd27Smrg # empty executable. 6108a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6109b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6110b9b4fd27Smrg # Warning - without using the other run time loading flags, 6111b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 6112b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6113b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6114e8a5466aSmrg if test "$with_gnu_ld" = yes; then 6115e8a5466aSmrg # We only use this code for GNU lds that support --whole-archive. 6116e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6117e8a5466aSmrg else 6118e8a5466aSmrg # Exported symbols can be pulled into shared objects from archives 6119e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6120e8a5466aSmrg fi 6121b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6122b9b4fd27Smrg # This is similar to how AIX traditionally builds its shared libraries. 6123b9b4fd27Smrg _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' 6124b9b4fd27Smrg fi 6125b9b4fd27Smrg fi 6126b9b4fd27Smrg ;; 6127caade7ccSmrg 6128b9b4fd27Smrg amigaos*) 6129b9b4fd27Smrg case $host_cpu in 6130b9b4fd27Smrg powerpc) 6131b9b4fd27Smrg # see comment about AmigaOS4 .so support 6132b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6133b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6134b9b4fd27Smrg ;; 6135b9b4fd27Smrg m68k) 6136b9b4fd27Smrg _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)' 6137b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6138b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6139b9b4fd27Smrg ;; 6140b9b4fd27Smrg esac 6141b9b4fd27Smrg ;; 6142caade7ccSmrg 6143b9b4fd27Smrg bsdi[[45]]*) 6144b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6145b9b4fd27Smrg ;; 6146caade7ccSmrg 6147b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6148b9b4fd27Smrg # When not using gcc, we currently assume that we are using 6149b9b4fd27Smrg # Microsoft Visual C++. 6150b9b4fd27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6151b9b4fd27Smrg # no search path for DLLs. 6152a5602400Smrg case $cc_basename in 6153a5602400Smrg cl*) 6154a5602400Smrg # Native MSVC 6155a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6156a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6157a5602400Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6158a5602400Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6159a5602400Smrg # Tell ltmain to make .lib files, not .a files. 6160a5602400Smrg libext=lib 6161a5602400Smrg # Tell ltmain to make .dll files, not .so files. 6162a5602400Smrg shrext_cmds=".dll" 6163a5602400Smrg # FIXME: Setting linknames here is a bad hack. 6164a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6165a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6166a5602400Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6167a5602400Smrg else 6168a5602400Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6169a5602400Smrg fi~ 6170a5602400Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6171a5602400Smrg linknames=' 6172a5602400Smrg # The linker will not automatically build a static lib if we build a DLL. 6173a5602400Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6174a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6175af9a7ee5Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6176a5602400Smrg _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' 6177a5602400Smrg # Don't use ranlib 6178a5602400Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6179a5602400Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6180a5602400Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6181a5602400Smrg case $lt_outputfile in 6182a5602400Smrg *.exe|*.EXE) ;; 6183a5602400Smrg *) 6184a5602400Smrg lt_outputfile="$lt_outputfile.exe" 6185a5602400Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6186a5602400Smrg ;; 6187a5602400Smrg esac~ 6188a5602400Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6189a5602400Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6190a5602400Smrg $RM "$lt_outputfile.manifest"; 6191a5602400Smrg fi' 6192a5602400Smrg ;; 6193a5602400Smrg *) 6194a5602400Smrg # Assume MSVC wrapper 6195a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6196a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6197a5602400Smrg # Tell ltmain to make .lib files, not .a files. 6198a5602400Smrg libext=lib 6199a5602400Smrg # Tell ltmain to make .dll files, not .so files. 6200a5602400Smrg shrext_cmds=".dll" 6201a5602400Smrg # FIXME: Setting linknames here is a bad hack. 6202a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6203a5602400Smrg # The linker will automatically build a .lib file if we build a DLL. 6204a5602400Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6205a5602400Smrg # FIXME: Should let the user specify the lib program. 6206a5602400Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6207a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6208a5602400Smrg ;; 6209af9a7ee5Smrg esac 6210af9a7ee5Smrg ;; 6211af9a7ee5Smrg 6212af9a7ee5Smrg darwin* | rhapsody*) 6213af9a7ee5Smrg _LT_DARWIN_LINKER_FEATURES($1) 6214af9a7ee5Smrg ;; 6215af9a7ee5Smrg 6216af9a7ee5Smrg dgux*) 6217af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6218af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6219af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6220af9a7ee5Smrg ;; 6221af9a7ee5Smrg 6222af9a7ee5Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6223af9a7ee5Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 6224af9a7ee5Smrg # does not break anything, and helps significantly (at the cost of a little 6225af9a7ee5Smrg # extra space). 6226af9a7ee5Smrg freebsd2.2*) 6227af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6228af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6229af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6230af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6231af9a7ee5Smrg ;; 6232af9a7ee5Smrg 6233af9a7ee5Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6234af9a7ee5Smrg freebsd2.*) 6235af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6236af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6237af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6238af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6239af9a7ee5Smrg ;; 6240af9a7ee5Smrg 6241af9a7ee5Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6242af9a7ee5Smrg freebsd* | dragonfly*) 6243af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6244af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6245af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6246af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6247af9a7ee5Smrg ;; 6248af9a7ee5Smrg 6249af9a7ee5Smrg hpux9*) 6250af9a7ee5Smrg if test "$GCC" = yes; then 6251af9a7ee5Smrg _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' 6252af9a7ee5Smrg else 6253af9a7ee5Smrg _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' 6254af9a7ee5Smrg fi 6255af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6256af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6257af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6258af9a7ee5Smrg 6259af9a7ee5Smrg # hardcode_minus_L: Not really in the search PATH, 6260af9a7ee5Smrg # but as the default location of the library. 6261af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6262af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6263af9a7ee5Smrg ;; 6264af9a7ee5Smrg 6265af9a7ee5Smrg hpux10*) 6266af9a7ee5Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6267af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6268af9a7ee5Smrg else 6269af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6270af9a7ee5Smrg fi 6271af9a7ee5Smrg if test "$with_gnu_ld" = no; then 6272af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6273af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6274af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6275af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6276af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6277af9a7ee5Smrg # hardcode_minus_L: Not really in the search PATH, 6278af9a7ee5Smrg # but as the default location of the library. 6279af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6280af9a7ee5Smrg fi 6281af9a7ee5Smrg ;; 6282af9a7ee5Smrg 6283af9a7ee5Smrg hpux11*) 6284af9a7ee5Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6285af9a7ee5Smrg case $host_cpu in 6286af9a7ee5Smrg hppa*64*) 6287af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6288af9a7ee5Smrg ;; 6289af9a7ee5Smrg ia64*) 6290af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6291af9a7ee5Smrg ;; 6292af9a7ee5Smrg *) 6293af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6294af9a7ee5Smrg ;; 6295af9a7ee5Smrg esac 6296af9a7ee5Smrg else 6297af9a7ee5Smrg case $host_cpu in 6298af9a7ee5Smrg hppa*64*) 6299af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6300af9a7ee5Smrg ;; 6301af9a7ee5Smrg ia64*) 6302af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6303af9a7ee5Smrg ;; 6304af9a7ee5Smrg *) 6305af9a7ee5Smrg m4_if($1, [], [ 6306af9a7ee5Smrg # Older versions of the 11.00 compiler do not understand -b yet 6307af9a7ee5Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6308af9a7ee5Smrg _LT_LINKER_OPTION([if $CC understands -b], 6309af9a7ee5Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6310af9a7ee5Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6311af9a7ee5Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6312af9a7ee5Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6313af9a7ee5Smrg ;; 6314af9a7ee5Smrg esac 6315af9a7ee5Smrg fi 6316af9a7ee5Smrg if test "$with_gnu_ld" = no; then 6317af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6318af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6319af9a7ee5Smrg 6320af9a7ee5Smrg case $host_cpu in 6321af9a7ee5Smrg hppa*64*|ia64*) 6322af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6323af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6324af9a7ee5Smrg ;; 6325af9a7ee5Smrg *) 6326af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6327af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6328af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6329af9a7ee5Smrg 6330af9a7ee5Smrg # hardcode_minus_L: Not really in the search PATH, 6331af9a7ee5Smrg # but as the default location of the library. 6332af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6333af9a7ee5Smrg ;; 6334af9a7ee5Smrg esac 6335af9a7ee5Smrg fi 6336af9a7ee5Smrg ;; 6337af9a7ee5Smrg 6338af9a7ee5Smrg irix5* | irix6* | nonstopux*) 6339af9a7ee5Smrg if test "$GCC" = yes; then 6340af9a7ee5Smrg _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' 6341af9a7ee5Smrg # Try to use the -exported_symbol ld option, if it does not 6342af9a7ee5Smrg # work, assume that -exports_file does not work either and 6343af9a7ee5Smrg # implicitly export all symbols. 6344af9a7ee5Smrg # This should be the same for all languages, so no per-tag cache variable. 6345af9a7ee5Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6346af9a7ee5Smrg [lt_cv_irix_exported_symbol], 6347af9a7ee5Smrg [save_LDFLAGS="$LDFLAGS" 6348af9a7ee5Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6349af9a7ee5Smrg AC_LINK_IFELSE( 6350af9a7ee5Smrg [AC_LANG_SOURCE( 6351af9a7ee5Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6352af9a7ee5Smrg [C++], [[int foo (void) { return 0; }]], 6353af9a7ee5Smrg [Fortran 77], [[ 6354af9a7ee5Smrg subroutine foo 6355af9a7ee5Smrg end]], 6356af9a7ee5Smrg [Fortran], [[ 6357af9a7ee5Smrg subroutine foo 6358af9a7ee5Smrg end]])])], 6359af9a7ee5Smrg [lt_cv_irix_exported_symbol=yes], 6360af9a7ee5Smrg [lt_cv_irix_exported_symbol=no]) 6361af9a7ee5Smrg LDFLAGS="$save_LDFLAGS"]) 6362af9a7ee5Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 6363af9a7ee5Smrg _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' 6364af9a7ee5Smrg fi 6365af9a7ee5Smrg else 6366af9a7ee5Smrg _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' 6367af9a7ee5Smrg _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' 6368af9a7ee5Smrg fi 6369af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6370af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6371af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6372af9a7ee5Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6373af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6374af9a7ee5Smrg ;; 6375af9a7ee5Smrg 6376af9a7ee5Smrg netbsd*) 6377af9a7ee5Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6378af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6379af9a7ee5Smrg else 6380af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6381af9a7ee5Smrg fi 6382af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6383af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6384af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6385af9a7ee5Smrg ;; 6386af9a7ee5Smrg 6387af9a7ee5Smrg newsos6) 6388af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6389af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6390af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6391af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6392af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6393af9a7ee5Smrg ;; 6394af9a7ee5Smrg 6395af9a7ee5Smrg *nto* | *qnx*) 6396af9a7ee5Smrg ;; 6397af9a7ee5Smrg 6398af9a7ee5Smrg openbsd*) 6399af9a7ee5Smrg if test -f /usr/libexec/ld.so; then 6400af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6401af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6402af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6403af9a7ee5Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6404af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6405af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6406af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6407af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6408af9a7ee5Smrg else 6409af9a7ee5Smrg case $host_os in 6410af9a7ee5Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6411af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6412af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6413af9a7ee5Smrg ;; 6414af9a7ee5Smrg *) 6415af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6416af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6417af9a7ee5Smrg ;; 6418af9a7ee5Smrg esac 6419af9a7ee5Smrg fi 6420af9a7ee5Smrg else 6421af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6422af9a7ee5Smrg fi 6423af9a7ee5Smrg ;; 6424af9a7ee5Smrg 6425af9a7ee5Smrg os2*) 6426af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6427af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6428af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6429af9a7ee5Smrg _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' 6430af9a7ee5Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6431af9a7ee5Smrg ;; 6432af9a7ee5Smrg 6433af9a7ee5Smrg osf3*) 6434af9a7ee5Smrg if test "$GCC" = yes; then 6435af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6436af9a7ee5Smrg _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' 6437af9a7ee5Smrg else 6438af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6439af9a7ee5Smrg _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' 6440af9a7ee5Smrg fi 6441af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6442af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6443af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6444af9a7ee5Smrg ;; 6445af9a7ee5Smrg 6446af9a7ee5Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6447af9a7ee5Smrg if test "$GCC" = yes; then 6448af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6449af9a7ee5Smrg _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' 6450af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6451af9a7ee5Smrg else 6452af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6453af9a7ee5Smrg _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' 6454af9a7ee5Smrg _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~ 6455af9a7ee5Smrg $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' 6456af9a7ee5Smrg 6457af9a7ee5Smrg # Both c and cxx compiler support -rpath directly 6458af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6459af9a7ee5Smrg fi 6460af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6461af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6462af9a7ee5Smrg ;; 6463af9a7ee5Smrg 6464af9a7ee5Smrg solaris*) 6465af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6466af9a7ee5Smrg if test "$GCC" = yes; then 6467af9a7ee5Smrg wlarc='${wl}' 6468af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6469af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6470af9a7ee5Smrg $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' 6471af9a7ee5Smrg else 6472af9a7ee5Smrg case `$CC -V 2>&1` in 6473af9a7ee5Smrg *"Compilers 5.0"*) 6474af9a7ee5Smrg wlarc='' 6475af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6476af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6477af9a7ee5Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6478af9a7ee5Smrg ;; 6479af9a7ee5Smrg *) 6480af9a7ee5Smrg wlarc='${wl}' 6481af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6482af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6483af9a7ee5Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6484af9a7ee5Smrg ;; 6485af9a7ee5Smrg esac 6486af9a7ee5Smrg fi 6487af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6488af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6489af9a7ee5Smrg case $host_os in 6490af9a7ee5Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6491af9a7ee5Smrg *) 6492af9a7ee5Smrg # The compiler driver will combine and reorder linker options, 6493af9a7ee5Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6494af9a7ee5Smrg # but is careful enough not to reorder. 6495af9a7ee5Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6496af9a7ee5Smrg if test "$GCC" = yes; then 6497af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6498af9a7ee5Smrg else 6499af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6500af9a7ee5Smrg fi 6501af9a7ee5Smrg ;; 6502af9a7ee5Smrg esac 6503af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6504af9a7ee5Smrg ;; 6505af9a7ee5Smrg 6506af9a7ee5Smrg sunos4*) 6507af9a7ee5Smrg if test "x$host_vendor" = xsequent; then 6508af9a7ee5Smrg # Use $CC to link under sequent, because it throws in some extra .o 6509af9a7ee5Smrg # files that make .init and .fini sections work. 6510af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6511af9a7ee5Smrg else 6512af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6513af9a7ee5Smrg fi 6514af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6515af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6516af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6517af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6518af9a7ee5Smrg ;; 6519af9a7ee5Smrg 6520af9a7ee5Smrg sysv4) 6521af9a7ee5Smrg case $host_vendor in 6522af9a7ee5Smrg sni) 6523af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6524af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6525af9a7ee5Smrg ;; 6526af9a7ee5Smrg siemens) 6527af9a7ee5Smrg ## LD is ld it makes a PLAMLIB 6528af9a7ee5Smrg ## CC just makes a GrossModule. 6529af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6530af9a7ee5Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6531af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6532af9a7ee5Smrg ;; 6533af9a7ee5Smrg motorola) 6534af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6535af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6536af9a7ee5Smrg ;; 6537af9a7ee5Smrg esac 6538af9a7ee5Smrg runpath_var='LD_RUN_PATH' 6539af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6540af9a7ee5Smrg ;; 6541af9a7ee5Smrg 6542af9a7ee5Smrg sysv4.3*) 6543af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6544af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6545af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6546af9a7ee5Smrg ;; 6547af9a7ee5Smrg 6548af9a7ee5Smrg sysv4*MP*) 6549af9a7ee5Smrg if test -d /usr/nec; then 6550af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6551af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6552af9a7ee5Smrg runpath_var=LD_RUN_PATH 6553af9a7ee5Smrg hardcode_runpath_var=yes 6554af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6555af9a7ee5Smrg fi 6556af9a7ee5Smrg ;; 6557af9a7ee5Smrg 6558af9a7ee5Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6559af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6560af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6561af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6562af9a7ee5Smrg runpath_var='LD_RUN_PATH' 6563af9a7ee5Smrg 6564af9a7ee5Smrg if test "$GCC" = yes; then 6565af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6566af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6567af9a7ee5Smrg else 6568af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6569af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6570af9a7ee5Smrg fi 6571af9a7ee5Smrg ;; 6572af9a7ee5Smrg 6573af9a7ee5Smrg sysv5* | sco3.2v5* | sco5v6*) 6574af9a7ee5Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6575af9a7ee5Smrg # link with -lc, and that would cause any symbols used from libc to 6576af9a7ee5Smrg # always be unresolved, which means just about no library would 6577af9a7ee5Smrg # ever link correctly. If we're not using GNU ld we use -z text 6578af9a7ee5Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6579af9a7ee5Smrg # as -z defs. 6580af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6581af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6582af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6583af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6584af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6585af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6586af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6587af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6588af9a7ee5Smrg runpath_var='LD_RUN_PATH' 6589af9a7ee5Smrg 6590af9a7ee5Smrg if test "$GCC" = yes; then 6591af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6592af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6593af9a7ee5Smrg else 6594af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6595af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6596af9a7ee5Smrg fi 6597af9a7ee5Smrg ;; 6598af9a7ee5Smrg 6599af9a7ee5Smrg uts4*) 6600af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6601af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6602af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6603af9a7ee5Smrg ;; 6604af9a7ee5Smrg 6605af9a7ee5Smrg *) 6606af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6607af9a7ee5Smrg ;; 6608af9a7ee5Smrg esac 6609af9a7ee5Smrg 6610af9a7ee5Smrg if test x$host_vendor = xsni; then 6611af9a7ee5Smrg case $host in 6612af9a7ee5Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6613af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6614af9a7ee5Smrg ;; 6615af9a7ee5Smrg esac 6616af9a7ee5Smrg fi 6617af9a7ee5Smrg fi 6618af9a7ee5Smrg]) 6619af9a7ee5SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6620af9a7ee5Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6621af9a7ee5Smrg 6622af9a7ee5Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6623af9a7ee5Smrg 6624af9a7ee5Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6625af9a7ee5Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6626af9a7ee5Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6627af9a7ee5Smrg [The commands to extract the exported symbol list from a shared archive]) 6628af9a7ee5Smrg 6629af9a7ee5Smrg# 6630af9a7ee5Smrg# Do we need to explicitly link libc? 6631af9a7ee5Smrg# 6632af9a7ee5Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6633af9a7ee5Smrgx|xyes) 6634af9a7ee5Smrg # Assume -lc should be added 6635af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6636af9a7ee5Smrg 6637af9a7ee5Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6638af9a7ee5Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6639af9a7ee5Smrg *'~'*) 6640af9a7ee5Smrg # FIXME: we may have to deal with multi-command sequences. 6641af9a7ee5Smrg ;; 6642af9a7ee5Smrg '$CC '*) 6643af9a7ee5Smrg # Test whether the compiler implicitly links with -lc since on some 6644af9a7ee5Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6645af9a7ee5Smrg # to ld, don't add -lc before -lgcc. 6646af9a7ee5Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6647af9a7ee5Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6648af9a7ee5Smrg [$RM conftest* 6649af9a7ee5Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6650af9a7ee5Smrg 6651af9a7ee5Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6652af9a7ee5Smrg soname=conftest 6653af9a7ee5Smrg lib=conftest 6654af9a7ee5Smrg libobjs=conftest.$ac_objext 6655af9a7ee5Smrg deplibs= 6656af9a7ee5Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6657af9a7ee5Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6658af9a7ee5Smrg compiler_flags=-v 6659af9a7ee5Smrg linker_flags=-v 6660af9a7ee5Smrg verstring= 6661af9a7ee5Smrg output_objdir=. 6662af9a7ee5Smrg libname=conftest 6663af9a7ee5Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6664af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6665af9a7ee5Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6666af9a7ee5Smrg then 6667af9a7ee5Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6668af9a7ee5Smrg else 6669af9a7ee5Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6670af9a7ee5Smrg fi 6671af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6672af9a7ee5Smrg else 6673af9a7ee5Smrg cat conftest.err 1>&5 6674af9a7ee5Smrg fi 6675af9a7ee5Smrg $RM conftest* 6676af9a7ee5Smrg ]) 6677af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6678af9a7ee5Smrg ;; 6679af9a7ee5Smrg esac 6680af9a7ee5Smrg fi 6681af9a7ee5Smrg ;; 6682af9a7ee5Smrgesac 6683af9a7ee5Smrg 6684af9a7ee5Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6685af9a7ee5Smrg [Whether or not to add -lc for building shared libraries]) 6686af9a7ee5Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6687af9a7ee5Smrg [enable_shared_with_static_runtimes], [0], 6688af9a7ee5Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6689af9a7ee5Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6690af9a7ee5Smrg [Compiler flag to allow reflexive dlopens]) 6691af9a7ee5Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6692af9a7ee5Smrg [Compiler flag to generate shared objects directly from archives]) 6693af9a7ee5Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6694af9a7ee5Smrg [Whether the compiler copes with passing no objects directly]) 6695af9a7ee5Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6696af9a7ee5Smrg [Create an old-style archive from a shared archive]) 6697af9a7ee5Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6698af9a7ee5Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6699af9a7ee5Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6700af9a7ee5Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6701af9a7ee5Smrg_LT_TAGDECL([], [module_cmds], [2], 6702af9a7ee5Smrg [Commands used to build a loadable module if different from building 6703af9a7ee5Smrg a shared archive.]) 6704af9a7ee5Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6705af9a7ee5Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6706af9a7ee5Smrg [Whether we are building with GNU ld or not]) 6707af9a7ee5Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6708af9a7ee5Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6709af9a7ee5Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6710af9a7ee5Smrg [Flag that enforces no undefined symbols]) 6711af9a7ee5Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6712af9a7ee5Smrg [Flag to hardcode $libdir into a binary during linking. 6713af9a7ee5Smrg This must work even if $libdir does not exist]) 6714af9a7ee5Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6715af9a7ee5Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6716af9a7ee5Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6717af9a7ee5Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6718af9a7ee5Smrg DIR into the resulting binary]) 6719af9a7ee5Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6720af9a7ee5Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6721af9a7ee5Smrg DIR into the resulting binary and the resulting library dependency is 6722af9a7ee5Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6723af9a7ee5Smrg library is relocated]) 6724af9a7ee5Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6725af9a7ee5Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6726af9a7ee5Smrg into the resulting binary]) 6727af9a7ee5Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6728af9a7ee5Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6729af9a7ee5Smrg into the resulting binary]) 6730af9a7ee5Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6731af9a7ee5Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6732af9a7ee5Smrg into the library and all subsequent libraries and executables linked 6733af9a7ee5Smrg against it]) 6734af9a7ee5Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6735af9a7ee5Smrg [Set to yes if linker adds runtime paths of dependent libraries 6736af9a7ee5Smrg to runtime path list]) 6737af9a7ee5Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6738af9a7ee5Smrg [Whether libtool must link a program against all its dependency libraries]) 6739af9a7ee5Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6740af9a7ee5Smrg [Set to "yes" if exported symbols are required]) 6741af9a7ee5Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6742af9a7ee5Smrg [The commands to list exported symbols]) 6743af9a7ee5Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6744af9a7ee5Smrg [Symbols that should not be listed in the preloaded symbols]) 6745af9a7ee5Smrg_LT_TAGDECL([], [include_expsyms], [1], 6746af9a7ee5Smrg [Symbols that must always be exported]) 6747af9a7ee5Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6748af9a7ee5Smrg [Commands necessary for linking programs (against libraries) with templates]) 6749af9a7ee5Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6750af9a7ee5Smrg [Commands necessary for finishing linking programs]) 6751af9a7ee5Smrg_LT_TAGDECL([], [file_list_spec], [1], 6752af9a7ee5Smrg [Specify filename containing input files]) 6753af9a7ee5Smrgdnl FIXME: Not yet implemented 6754af9a7ee5Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6755af9a7ee5Smrgdnl [Compiler flag to generate thread safe objects]) 6756af9a7ee5Smrg])# _LT_LINKER_SHLIBS 6757af9a7ee5Smrg 6758af9a7ee5Smrg 6759af9a7ee5Smrg# _LT_LANG_C_CONFIG([TAG]) 6760af9a7ee5Smrg# ------------------------ 6761af9a7ee5Smrg# Ensure that the configuration variables for a C compiler are suitably 6762af9a7ee5Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6763af9a7ee5Smrg# the compiler configuration to `libtool'. 6764af9a7ee5Smrgm4_defun([_LT_LANG_C_CONFIG], 6765af9a7ee5Smrg[m4_require([_LT_DECL_EGREP])dnl 6766af9a7ee5Smrglt_save_CC="$CC" 6767af9a7ee5SmrgAC_LANG_PUSH(C) 6768af9a7ee5Smrg 6769af9a7ee5Smrg# Source file extension for C test sources. 6770af9a7ee5Smrgac_ext=c 6771af9a7ee5Smrg 6772af9a7ee5Smrg# Object file extension for compiled C test sources. 6773af9a7ee5Smrgobjext=o 6774af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 6775af9a7ee5Smrg 6776af9a7ee5Smrg# Code to be used in simple compile tests 6777af9a7ee5Smrglt_simple_compile_test_code="int some_variable = 0;" 6778af9a7ee5Smrg 6779af9a7ee5Smrg# Code to be used in simple link tests 6780af9a7ee5Smrglt_simple_link_test_code='int main(){return(0);}' 6781af9a7ee5Smrg 6782af9a7ee5Smrg_LT_TAG_COMPILER 6783af9a7ee5Smrg# Save the default compiler, since it gets overwritten when the other 6784af9a7ee5Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6785af9a7ee5Smrgcompiler_DEFAULT=$CC 6786af9a7ee5Smrg 6787af9a7ee5Smrg# save warnings/boilerplate of simple test code 6788af9a7ee5Smrg_LT_COMPILER_BOILERPLATE 6789af9a7ee5Smrg_LT_LINKER_BOILERPLATE 6790af9a7ee5Smrg 6791af9a7ee5Smrgif test -n "$compiler"; then 6792af9a7ee5Smrg _LT_COMPILER_NO_RTTI($1) 6793af9a7ee5Smrg _LT_COMPILER_PIC($1) 6794af9a7ee5Smrg _LT_COMPILER_C_O($1) 6795af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 6796af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 6797af9a7ee5Smrg _LT_SYS_DYNAMIC_LINKER($1) 6798af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6799af9a7ee5Smrg LT_SYS_DLOPEN_SELF 6800af9a7ee5Smrg _LT_CMD_STRIPLIB 6801af9a7ee5Smrg 6802af9a7ee5Smrg # Report which library types will actually be built 6803af9a7ee5Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6804af9a7ee5Smrg AC_MSG_RESULT([$can_build_shared]) 6805af9a7ee5Smrg 6806af9a7ee5Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6807af9a7ee5Smrg test "$can_build_shared" = "no" && enable_shared=no 6808af9a7ee5Smrg 6809af9a7ee5Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6810af9a7ee5Smrg # are all built from PIC. 6811af9a7ee5Smrg case $host_os in 6812af9a7ee5Smrg aix3*) 6813af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 6814af9a7ee5Smrg if test -n "$RANLIB"; then 6815af9a7ee5Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6816af9a7ee5Smrg postinstall_cmds='$RANLIB $lib' 6817af9a7ee5Smrg fi 6818af9a7ee5Smrg ;; 6819af9a7ee5Smrg 6820af9a7ee5Smrg aix[[4-9]]*) 6821af9a7ee5Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6822af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 6823af9a7ee5Smrg fi 6824af9a7ee5Smrg ;; 6825af9a7ee5Smrg esac 6826af9a7ee5Smrg AC_MSG_RESULT([$enable_shared]) 6827af9a7ee5Smrg 6828af9a7ee5Smrg AC_MSG_CHECKING([whether to build static libraries]) 6829af9a7ee5Smrg # Make sure either enable_shared or enable_static is yes. 6830af9a7ee5Smrg test "$enable_shared" = yes || enable_static=yes 6831af9a7ee5Smrg AC_MSG_RESULT([$enable_static]) 6832af9a7ee5Smrg 6833af9a7ee5Smrg _LT_CONFIG($1) 6834af9a7ee5Smrgfi 6835af9a7ee5SmrgAC_LANG_POP 6836af9a7ee5SmrgCC="$lt_save_CC" 6837af9a7ee5Smrg])# _LT_LANG_C_CONFIG 6838af9a7ee5Smrg 6839af9a7ee5Smrg 6840af9a7ee5Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6841af9a7ee5Smrg# -------------------------- 6842af9a7ee5Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6843af9a7ee5Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6844af9a7ee5Smrg# the compiler configuration to `libtool'. 6845af9a7ee5Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6846af9a7ee5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6847af9a7ee5Smrgm4_require([_LT_DECL_EGREP])dnl 6848af9a7ee5Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6849af9a7ee5Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 6850af9a7ee5Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6851af9a7ee5Smrg (test "X$CXX" != "Xg++"))) ; then 6852af9a7ee5Smrg AC_PROG_CXXCPP 6853af9a7ee5Smrgelse 6854af9a7ee5Smrg _lt_caught_CXX_error=yes 6855af9a7ee5Smrgfi 6856af9a7ee5Smrg 6857af9a7ee5SmrgAC_LANG_PUSH(C++) 6858af9a7ee5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6859af9a7ee5Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6860af9a7ee5Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6861af9a7ee5Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6862af9a7ee5Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6863af9a7ee5Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6864af9a7ee5Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6865af9a7ee5Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6866af9a7ee5Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6867af9a7ee5Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6868af9a7ee5Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6869af9a7ee5Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6870af9a7ee5Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6871af9a7ee5Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6872af9a7ee5Smrg_LT_TAGVAR(module_cmds, $1)= 6873af9a7ee5Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6874af9a7ee5Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6875af9a7ee5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6876af9a7ee5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6877af9a7ee5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6878af9a7ee5Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6879af9a7ee5Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6880af9a7ee5Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6881af9a7ee5Smrg 6882af9a7ee5Smrg# Source file extension for C++ test sources. 6883af9a7ee5Smrgac_ext=cpp 6884af9a7ee5Smrg 6885af9a7ee5Smrg# Object file extension for compiled C++ test sources. 6886af9a7ee5Smrgobjext=o 6887af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 6888af9a7ee5Smrg 6889af9a7ee5Smrg# No sense in running all these tests if we already determined that 6890af9a7ee5Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6891af9a7ee5Smrg# are currently assumed to apply to all compilers on this platform, 6892af9a7ee5Smrg# and will be corrupted by setting them based on a non-working compiler. 6893af9a7ee5Smrgif test "$_lt_caught_CXX_error" != yes; then 6894af9a7ee5Smrg # Code to be used in simple compile tests 6895af9a7ee5Smrg lt_simple_compile_test_code="int some_variable = 0;" 6896af9a7ee5Smrg 6897af9a7ee5Smrg # Code to be used in simple link tests 6898af9a7ee5Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6899af9a7ee5Smrg 6900af9a7ee5Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6901af9a7ee5Smrg _LT_TAG_COMPILER 6902af9a7ee5Smrg 6903af9a7ee5Smrg # save warnings/boilerplate of simple test code 6904af9a7ee5Smrg _LT_COMPILER_BOILERPLATE 6905af9a7ee5Smrg _LT_LINKER_BOILERPLATE 6906af9a7ee5Smrg 6907af9a7ee5Smrg # Allow CC to be a program name with arguments. 6908af9a7ee5Smrg lt_save_CC=$CC 6909af9a7ee5Smrg lt_save_CFLAGS=$CFLAGS 6910af9a7ee5Smrg lt_save_LD=$LD 6911af9a7ee5Smrg lt_save_GCC=$GCC 6912af9a7ee5Smrg GCC=$GXX 6913af9a7ee5Smrg lt_save_with_gnu_ld=$with_gnu_ld 6914af9a7ee5Smrg lt_save_path_LD=$lt_cv_path_LD 6915af9a7ee5Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6916af9a7ee5Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6917af9a7ee5Smrg else 6918af9a7ee5Smrg $as_unset lt_cv_prog_gnu_ld 6919af9a7ee5Smrg fi 6920af9a7ee5Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6921af9a7ee5Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6922af9a7ee5Smrg else 6923af9a7ee5Smrg $as_unset lt_cv_path_LD 6924af9a7ee5Smrg fi 6925af9a7ee5Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6926af9a7ee5Smrg CC=${CXX-"c++"} 6927af9a7ee5Smrg CFLAGS=$CXXFLAGS 6928af9a7ee5Smrg compiler=$CC 6929af9a7ee5Smrg _LT_TAGVAR(compiler, $1)=$CC 6930af9a7ee5Smrg _LT_CC_BASENAME([$compiler]) 6931af9a7ee5Smrg 6932af9a7ee5Smrg if test -n "$compiler"; then 6933af9a7ee5Smrg # We don't want -fno-exception when compiling C++ code, so set the 6934af9a7ee5Smrg # no_builtin_flag separately 6935af9a7ee5Smrg if test "$GXX" = yes; then 6936af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6937af9a7ee5Smrg else 6938af9a7ee5Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6939af9a7ee5Smrg fi 6940af9a7ee5Smrg 6941af9a7ee5Smrg if test "$GXX" = yes; then 6942af9a7ee5Smrg # Set up default GNU C++ configuration 6943af9a7ee5Smrg 6944af9a7ee5Smrg LT_PATH_LD 6945af9a7ee5Smrg 6946af9a7ee5Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6947af9a7ee5Smrg # archiving commands below assume that GNU ld is being used. 6948af9a7ee5Smrg if test "$with_gnu_ld" = yes; then 6949af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6950af9a7ee5Smrg _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' 6951af9a7ee5Smrg 6952af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6953af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6954af9a7ee5Smrg 6955af9a7ee5Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6956af9a7ee5Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6957af9a7ee5Smrg # investigate it a little bit more. (MM) 6958af9a7ee5Smrg wlarc='${wl}' 6959af9a7ee5Smrg 6960af9a7ee5Smrg # ancient GNU ld didn't support --whole-archive et. al. 6961af9a7ee5Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6962af9a7ee5Smrg $GREP 'no-whole-archive' > /dev/null; then 6963af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6964af9a7ee5Smrg else 6965af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6966af9a7ee5Smrg fi 6967af9a7ee5Smrg else 6968af9a7ee5Smrg with_gnu_ld=no 6969af9a7ee5Smrg wlarc= 6970af9a7ee5Smrg 6971af9a7ee5Smrg # A generic and very simple default shared library creation 6972af9a7ee5Smrg # command for GNU C++ for the case where it uses the native 6973af9a7ee5Smrg # linker, instead of GNU ld. If possible, this setting should 6974af9a7ee5Smrg # overridden to take advantage of the native linker features on 6975af9a7ee5Smrg # the platform it is being used on. 6976af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6977af9a7ee5Smrg fi 6978af9a7ee5Smrg 6979af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 6980af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 6981af9a7ee5Smrg # linking a shared library. 6982af9a7ee5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6983af9a7ee5Smrg 6984af9a7ee5Smrg else 6985af9a7ee5Smrg GXX=no 6986af9a7ee5Smrg with_gnu_ld=no 6987af9a7ee5Smrg wlarc= 6988af9a7ee5Smrg fi 6989af9a7ee5Smrg 6990af9a7ee5Smrg # PORTME: fill in a description of your system's C++ link characteristics 6991af9a7ee5Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6992af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6993af9a7ee5Smrg case $host_os in 6994af9a7ee5Smrg aix3*) 6995af9a7ee5Smrg # FIXME: insert proper C++ library support 6996af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6997af9a7ee5Smrg ;; 6998af9a7ee5Smrg aix[[4-9]]*) 6999af9a7ee5Smrg if test "$host_cpu" = ia64; then 7000af9a7ee5Smrg # On IA64, the linker does run time linking by default, so we don't 7001af9a7ee5Smrg # have to do anything special. 7002af9a7ee5Smrg aix_use_runtimelinking=no 7003af9a7ee5Smrg exp_sym_flag='-Bexport' 7004af9a7ee5Smrg no_entry_flag="" 7005af9a7ee5Smrg else 7006af9a7ee5Smrg aix_use_runtimelinking=no 7007af9a7ee5Smrg 7008af9a7ee5Smrg # Test if we are trying to use run time linking or normal 7009af9a7ee5Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7010af9a7ee5Smrg # need to do runtime linking. 7011af9a7ee5Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7012af9a7ee5Smrg for ld_flag in $LDFLAGS; do 7013af9a7ee5Smrg case $ld_flag in 7014af9a7ee5Smrg *-brtl*) 7015af9a7ee5Smrg aix_use_runtimelinking=yes 7016af9a7ee5Smrg break 7017af9a7ee5Smrg ;; 7018af9a7ee5Smrg esac 7019af9a7ee5Smrg done 7020af9a7ee5Smrg ;; 7021af9a7ee5Smrg esac 7022af9a7ee5Smrg 7023af9a7ee5Smrg exp_sym_flag='-bexport' 7024af9a7ee5Smrg no_entry_flag='-bnoentry' 7025af9a7ee5Smrg fi 7026af9a7ee5Smrg 7027af9a7ee5Smrg # When large executables or shared objects are built, AIX ld can 7028af9a7ee5Smrg # have problems creating the table of contents. If linking a library 7029af9a7ee5Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7030af9a7ee5Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7031af9a7ee5Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7032af9a7ee5Smrg 7033af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='' 7034af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7035af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7036af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7037af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7038af9a7ee5Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7039af9a7ee5Smrg 7040af9a7ee5Smrg if test "$GXX" = yes; then 7041af9a7ee5Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7042af9a7ee5Smrg # We only want to do this on AIX 4.2 and lower, the check 7043af9a7ee5Smrg # below for broken collect2 doesn't work under 4.3+ 7044af9a7ee5Smrg collect2name=`${CC} -print-prog-name=collect2` 7045af9a7ee5Smrg if test -f "$collect2name" && 7046af9a7ee5Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7047af9a7ee5Smrg then 7048af9a7ee5Smrg # We have reworked collect2 7049af9a7ee5Smrg : 7050af9a7ee5Smrg else 7051af9a7ee5Smrg # We have old collect2 7052af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7053af9a7ee5Smrg # It fails to find uninstalled libraries when the uninstalled 7054af9a7ee5Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7055af9a7ee5Smrg # to unsupported forces relinking 7056af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7057af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7058af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7059af9a7ee5Smrg fi 7060af9a7ee5Smrg esac 7061af9a7ee5Smrg shared_flag='-shared' 7062af9a7ee5Smrg if test "$aix_use_runtimelinking" = yes; then 7063af9a7ee5Smrg shared_flag="$shared_flag "'${wl}-G' 7064af9a7ee5Smrg fi 7065af9a7ee5Smrg else 7066af9a7ee5Smrg # not using gcc 7067af9a7ee5Smrg if test "$host_cpu" = ia64; then 7068af9a7ee5Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7069af9a7ee5Smrg # chokes on -Wl,-G. The following line is correct: 7070af9a7ee5Smrg shared_flag='-G' 7071af9a7ee5Smrg else 7072af9a7ee5Smrg if test "$aix_use_runtimelinking" = yes; then 7073af9a7ee5Smrg shared_flag='${wl}-G' 7074af9a7ee5Smrg else 7075af9a7ee5Smrg shared_flag='${wl}-bM:SRE' 7076af9a7ee5Smrg fi 7077af9a7ee5Smrg fi 7078af9a7ee5Smrg fi 7079af9a7ee5Smrg 7080af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7081af9a7ee5Smrg # It seems that -bexpall does not export symbols beginning with 7082af9a7ee5Smrg # underscore (_), so it is better to generate a list of symbols to 7083af9a7ee5Smrg # export. 7084af9a7ee5Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7085af9a7ee5Smrg if test "$aix_use_runtimelinking" = yes; then 7086af9a7ee5Smrg # Warning - without using the other runtime loading flags (-brtl), 7087af9a7ee5Smrg # -berok will link without error, but may produce a broken library. 7088af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7089af9a7ee5Smrg # Determine the default libpath from the value encoded in an empty 7090af9a7ee5Smrg # executable. 7091af9a7ee5Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 7092af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7093af9a7ee5Smrg 7094af9a7ee5Smrg _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" 7095af9a7ee5Smrg else 7096af9a7ee5Smrg if test "$host_cpu" = ia64; then 7097af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7098af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7099af9a7ee5Smrg _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" 7100af9a7ee5Smrg else 7101af9a7ee5Smrg # Determine the default libpath from the value encoded in an 7102af9a7ee5Smrg # empty executable. 7103af9a7ee5Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 7104af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7105af9a7ee5Smrg # Warning - without using the other run time loading flags, 7106af9a7ee5Smrg # -berok will link without error, but may produce a broken library. 7107af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7108af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7109af9a7ee5Smrg if test "$with_gnu_ld" = yes; then 7110af9a7ee5Smrg # We only use this code for GNU lds that support --whole-archive. 7111af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7112af9a7ee5Smrg else 7113af9a7ee5Smrg # Exported symbols can be pulled into shared objects from archives 7114af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7115af9a7ee5Smrg fi 7116af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7117af9a7ee5Smrg # This is similar to how AIX traditionally builds its shared 7118af9a7ee5Smrg # libraries. 7119af9a7ee5Smrg _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' 7120af9a7ee5Smrg fi 7121af9a7ee5Smrg fi 7122af9a7ee5Smrg ;; 7123af9a7ee5Smrg 7124af9a7ee5Smrg beos*) 7125af9a7ee5Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7126af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7127af9a7ee5Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7128af9a7ee5Smrg # support --undefined. This deserves some investigation. FIXME 7129af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7130af9a7ee5Smrg else 7131af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7132af9a7ee5Smrg fi 7133af9a7ee5Smrg ;; 7134af9a7ee5Smrg 7135af9a7ee5Smrg chorus*) 7136af9a7ee5Smrg case $cc_basename in 7137af9a7ee5Smrg *) 7138af9a7ee5Smrg # FIXME: insert proper C++ library support 7139af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7140af9a7ee5Smrg ;; 7141af9a7ee5Smrg esac 7142af9a7ee5Smrg ;; 7143af9a7ee5Smrg 7144af9a7ee5Smrg cygwin* | mingw* | pw32* | cegcc*) 7145af9a7ee5Smrg case $GXX,$cc_basename in 7146af9a7ee5Smrg ,cl* | no,cl*) 7147af9a7ee5Smrg # Native MSVC 7148af9a7ee5Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7149af9a7ee5Smrg # no search path for DLLs. 7150af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7151af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7152af9a7ee5Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7153af9a7ee5Smrg _LT_TAGVAR(file_list_spec, $1)='@' 7154af9a7ee5Smrg # Tell ltmain to make .lib files, not .a files. 7155af9a7ee5Smrg libext=lib 7156af9a7ee5Smrg # Tell ltmain to make .dll files, not .so files. 7157af9a7ee5Smrg shrext_cmds=".dll" 7158af9a7ee5Smrg # FIXME: Setting linknames here is a bad hack. 7159af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7160af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7161af9a7ee5Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7162af9a7ee5Smrg else 7163af9a7ee5Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7164af9a7ee5Smrg fi~ 7165af9a7ee5Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7166af9a7ee5Smrg linknames=' 7167af9a7ee5Smrg # The linker will not automatically build a static lib if we build a DLL. 7168af9a7ee5Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7169af9a7ee5Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7170af9a7ee5Smrg # Don't use ranlib 7171af9a7ee5Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7172af9a7ee5Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7173af9a7ee5Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 7174af9a7ee5Smrg case $lt_outputfile in 7175af9a7ee5Smrg *.exe|*.EXE) ;; 7176af9a7ee5Smrg *) 7177af9a7ee5Smrg lt_outputfile="$lt_outputfile.exe" 7178af9a7ee5Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 7179af9a7ee5Smrg ;; 7180af9a7ee5Smrg esac~ 7181af9a7ee5Smrg func_to_tool_file "$lt_outputfile"~ 7182af9a7ee5Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7183af9a7ee5Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7184af9a7ee5Smrg $RM "$lt_outputfile.manifest"; 7185af9a7ee5Smrg fi' 7186af9a7ee5Smrg ;; 7187af9a7ee5Smrg *) 7188af9a7ee5Smrg # g++ 7189af9a7ee5Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7190af9a7ee5Smrg # as there is no search path for DLLs. 7191af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7192af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7193af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7194af9a7ee5Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7195af9a7ee5Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7196af9a7ee5Smrg 7197af9a7ee5Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7198af9a7ee5Smrg _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' 7199af9a7ee5Smrg # If the export-symbols file already is a .def file (1st line 7200af9a7ee5Smrg # is EXPORTS), use it as is; otherwise, prepend... 7201af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7202af9a7ee5Smrg cp $export_symbols $output_objdir/$soname.def; 7203af9a7ee5Smrg else 7204af9a7ee5Smrg echo EXPORTS > $output_objdir/$soname.def; 7205af9a7ee5Smrg cat $export_symbols >> $output_objdir/$soname.def; 7206af9a7ee5Smrg fi~ 7207af9a7ee5Smrg $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' 7208af9a7ee5Smrg else 7209af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7210af9a7ee5Smrg fi 7211af9a7ee5Smrg ;; 7212af9a7ee5Smrg esac 7213af9a7ee5Smrg ;; 7214af9a7ee5Smrg darwin* | rhapsody*) 7215af9a7ee5Smrg _LT_DARWIN_LINKER_FEATURES($1) 7216af9a7ee5Smrg ;; 7217af9a7ee5Smrg 7218af9a7ee5Smrg dgux*) 7219af9a7ee5Smrg case $cc_basename in 7220af9a7ee5Smrg ec++*) 7221af9a7ee5Smrg # FIXME: insert proper C++ library support 7222af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7223af9a7ee5Smrg ;; 7224af9a7ee5Smrg ghcx*) 7225af9a7ee5Smrg # Green Hills C++ Compiler 7226af9a7ee5Smrg # FIXME: insert proper C++ library support 7227af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7228af9a7ee5Smrg ;; 7229af9a7ee5Smrg *) 7230af9a7ee5Smrg # FIXME: insert proper C++ library support 7231af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7232af9a7ee5Smrg ;; 7233af9a7ee5Smrg esac 7234af9a7ee5Smrg ;; 7235af9a7ee5Smrg 7236af9a7ee5Smrg freebsd2.*) 7237af9a7ee5Smrg # C++ shared libraries reported to be fairly broken before 7238af9a7ee5Smrg # switch to ELF 7239af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7240af9a7ee5Smrg ;; 7241af9a7ee5Smrg 7242af9a7ee5Smrg freebsd-elf*) 7243af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7244af9a7ee5Smrg ;; 7245af9a7ee5Smrg 7246af9a7ee5Smrg freebsd* | dragonfly*) 7247af9a7ee5Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7248af9a7ee5Smrg # conventions 7249af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7250af9a7ee5Smrg ;; 7251af9a7ee5Smrg 7252af9a7ee5Smrg gnu*) 7253af9a7ee5Smrg ;; 7254af9a7ee5Smrg 7255af9a7ee5Smrg haiku*) 7256af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7257af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7258af9a7ee5Smrg ;; 7259af9a7ee5Smrg 7260af9a7ee5Smrg hpux9*) 7261af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7262af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7263af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7264af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7265af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7266af9a7ee5Smrg # but as the default 7267af9a7ee5Smrg # location of the library. 7268af9a7ee5Smrg 7269af9a7ee5Smrg case $cc_basename in 7270af9a7ee5Smrg CC*) 7271af9a7ee5Smrg # FIXME: insert proper C++ library support 7272af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7273af9a7ee5Smrg ;; 7274af9a7ee5Smrg aCC*) 7275af9a7ee5Smrg _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' 7276af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7277af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7278af9a7ee5Smrg # linking a shared library. 7279af9a7ee5Smrg # 7280af9a7ee5Smrg # There doesn't appear to be a way to prevent this compiler from 7281af9a7ee5Smrg # explicitly linking system object files so we need to strip them 7282af9a7ee5Smrg # from the output so that they don't get included in the library 7283af9a7ee5Smrg # dependencies. 7284af9a7ee5Smrg 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"' 7285af9a7ee5Smrg ;; 7286af9a7ee5Smrg *) 7287af9a7ee5Smrg if test "$GXX" = yes; then 7288af9a7ee5Smrg _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' 7289af9a7ee5Smrg else 7290af9a7ee5Smrg # FIXME: insert proper C++ library support 7291af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7292af9a7ee5Smrg fi 7293af9a7ee5Smrg ;; 7294af9a7ee5Smrg esac 7295af9a7ee5Smrg ;; 7296af9a7ee5Smrg 7297af9a7ee5Smrg hpux10*|hpux11*) 7298af9a7ee5Smrg if test $with_gnu_ld = no; then 7299af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7300af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7301af9a7ee5Smrg 7302af9a7ee5Smrg case $host_cpu in 7303af9a7ee5Smrg hppa*64*|ia64*) 7304af9a7ee5Smrg ;; 7305af9a7ee5Smrg *) 7306af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7307af9a7ee5Smrg ;; 7308af9a7ee5Smrg esac 7309af9a7ee5Smrg fi 7310af9a7ee5Smrg case $host_cpu in 7311af9a7ee5Smrg hppa*64*|ia64*) 7312af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7313af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7314af9a7ee5Smrg ;; 7315af9a7ee5Smrg *) 7316af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7317af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7318af9a7ee5Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7319af9a7ee5Smrg # but as the default 7320af9a7ee5Smrg # location of the library. 7321af9a7ee5Smrg ;; 7322af9a7ee5Smrg esac 7323af9a7ee5Smrg 7324af9a7ee5Smrg case $cc_basename in 7325af9a7ee5Smrg CC*) 7326af9a7ee5Smrg # FIXME: insert proper C++ library support 7327af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7328af9a7ee5Smrg ;; 7329af9a7ee5Smrg aCC*) 7330af9a7ee5Smrg case $host_cpu in 7331af9a7ee5Smrg hppa*64*) 7332af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7333af9a7ee5Smrg ;; 7334af9a7ee5Smrg ia64*) 7335af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7336af9a7ee5Smrg ;; 7337af9a7ee5Smrg *) 7338af9a7ee5Smrg _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' 7339af9a7ee5Smrg ;; 7340af9a7ee5Smrg esac 7341af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7342af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7343af9a7ee5Smrg # linking a shared library. 7344af9a7ee5Smrg # 7345af9a7ee5Smrg # There doesn't appear to be a way to prevent this compiler from 7346af9a7ee5Smrg # explicitly linking system object files so we need to strip them 7347af9a7ee5Smrg # from the output so that they don't get included in the library 7348af9a7ee5Smrg # dependencies. 7349af9a7ee5Smrg 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"' 7350af9a7ee5Smrg ;; 7351af9a7ee5Smrg *) 7352af9a7ee5Smrg if test "$GXX" = yes; then 7353af9a7ee5Smrg if test $with_gnu_ld = no; then 7354af9a7ee5Smrg case $host_cpu in 7355af9a7ee5Smrg hppa*64*) 7356af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7357af9a7ee5Smrg ;; 7358af9a7ee5Smrg ia64*) 7359af9a7ee5Smrg _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' 7360af9a7ee5Smrg ;; 7361af9a7ee5Smrg *) 7362af9a7ee5Smrg _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' 7363af9a7ee5Smrg ;; 7364af9a7ee5Smrg esac 7365af9a7ee5Smrg fi 7366af9a7ee5Smrg else 7367af9a7ee5Smrg # FIXME: insert proper C++ library support 7368af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7369af9a7ee5Smrg fi 7370af9a7ee5Smrg ;; 7371af9a7ee5Smrg esac 7372af9a7ee5Smrg ;; 7373af9a7ee5Smrg 7374af9a7ee5Smrg interix[[3-9]]*) 7375af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7376af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7377af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7378af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7379af9a7ee5Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7380af9a7ee5Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7381af9a7ee5Smrg # default) and relocated if they conflict, which is a slow very memory 7382af9a7ee5Smrg # consuming and fragmenting process. To avoid this, we pick a random, 7383af9a7ee5Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7384af9a7ee5Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7385af9a7ee5Smrg _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' 7386af9a7ee5Smrg _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' 7387af9a7ee5Smrg ;; 7388af9a7ee5Smrg irix5* | irix6*) 7389af9a7ee5Smrg case $cc_basename in 7390af9a7ee5Smrg CC*) 7391af9a7ee5Smrg # SGI C++ 7392af9a7ee5Smrg _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' 7393af9a7ee5Smrg 7394af9a7ee5Smrg # Archives containing C++ object files must be created using 7395af9a7ee5Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7396af9a7ee5Smrg # necessary to make sure instantiated templates are included 7397af9a7ee5Smrg # in the archive. 7398af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7399af9a7ee5Smrg ;; 7400af9a7ee5Smrg *) 7401af9a7ee5Smrg if test "$GXX" = yes; then 7402af9a7ee5Smrg if test "$with_gnu_ld" = no; then 7403af9a7ee5Smrg _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' 7404af9a7ee5Smrg else 7405af9a7ee5Smrg _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' 7406af9a7ee5Smrg fi 7407af9a7ee5Smrg fi 7408af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7409af9a7ee5Smrg ;; 7410af9a7ee5Smrg esac 7411af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7412af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7413af9a7ee5Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7414af9a7ee5Smrg ;; 7415af9a7ee5Smrg 7416af9a7ee5Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 7417af9a7ee5Smrg case $cc_basename in 7418af9a7ee5Smrg KCC*) 7419af9a7ee5Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7420af9a7ee5Smrg 7421af9a7ee5Smrg # KCC will only create a shared library if the output file 7422af9a7ee5Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7423af9a7ee5Smrg # to its proper name (with version) after linking. 7424af9a7ee5Smrg _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' 7425af9a7ee5Smrg _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' 7426af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7427af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7428af9a7ee5Smrg # linking a shared library. 7429af9a7ee5Smrg # 7430af9a7ee5Smrg # There doesn't appear to be a way to prevent this compiler from 7431af9a7ee5Smrg # explicitly linking system object files so we need to strip them 7432af9a7ee5Smrg # from the output so that they don't get included in the library 7433af9a7ee5Smrg # dependencies. 7434af9a7ee5Smrg 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"' 7435af9a7ee5Smrg 7436af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7437af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7438af9a7ee5Smrg 7439af9a7ee5Smrg # Archives containing C++ object files must be created using 7440af9a7ee5Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7441af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7442af9a7ee5Smrg ;; 7443af9a7ee5Smrg icpc* | ecpc* ) 7444af9a7ee5Smrg # Intel C++ 7445af9a7ee5Smrg with_gnu_ld=yes 7446af9a7ee5Smrg # version 8.0 and above of icpc choke on multiply defined symbols 7447af9a7ee5Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 7448af9a7ee5Smrg # earlier do not add the objects themselves. 7449af9a7ee5Smrg case `$CC -V 2>&1` in 7450af9a7ee5Smrg *"Version 7."*) 7451af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7452af9a7ee5Smrg _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' 7453af9a7ee5Smrg ;; 7454af9a7ee5Smrg *) # Version 8.0 or newer 7455af9a7ee5Smrg tmp_idyn= 7456af9a7ee5Smrg case $host_cpu in 7457af9a7ee5Smrg ia64*) tmp_idyn=' -i_dynamic';; 7458af9a7ee5Smrg esac 7459af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7460af9a7ee5Smrg _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' 7461af9a7ee5Smrg ;; 7462af9a7ee5Smrg esac 7463af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7464af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7465af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7466af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7467af9a7ee5Smrg ;; 7468af9a7ee5Smrg pgCC* | pgcpp*) 7469af9a7ee5Smrg # Portland Group C++ compiler 7470af9a7ee5Smrg case `$CC -V` in 7471af9a7ee5Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7472af9a7ee5Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7473af9a7ee5Smrg rm -rf $tpldir~ 7474af9a7ee5Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7475af9a7ee5Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7476af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7477af9a7ee5Smrg rm -rf $tpldir~ 7478af9a7ee5Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7479af9a7ee5Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7480af9a7ee5Smrg $RANLIB $oldlib' 7481af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7482af9a7ee5Smrg rm -rf $tpldir~ 7483af9a7ee5Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7484af9a7ee5Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7485af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7486af9a7ee5Smrg rm -rf $tpldir~ 7487af9a7ee5Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7488af9a7ee5Smrg $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' 7489af9a7ee5Smrg ;; 7490af9a7ee5Smrg *) # Version 6 and above use weak symbols 7491af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7492af9a7ee5Smrg _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' 7493af9a7ee5Smrg ;; 7494af9a7ee5Smrg esac 7495af9a7ee5Smrg 7496af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7497af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7498af9a7ee5Smrg _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' 7499af9a7ee5Smrg ;; 7500af9a7ee5Smrg cxx*) 7501af9a7ee5Smrg # Compaq C++ 7502af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7503af9a7ee5Smrg _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' 7504af9a7ee5Smrg 7505af9a7ee5Smrg runpath_var=LD_RUN_PATH 7506af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7507af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7508af9a7ee5Smrg 7509af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7510af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7511af9a7ee5Smrg # linking a shared library. 7512af9a7ee5Smrg # 7513af9a7ee5Smrg # There doesn't appear to be a way to prevent this compiler from 7514af9a7ee5Smrg # explicitly linking system object files so we need to strip them 7515af9a7ee5Smrg # from the output so that they don't get included in the library 7516af9a7ee5Smrg # dependencies. 7517af9a7ee5Smrg 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' 7518af9a7ee5Smrg ;; 7519af9a7ee5Smrg xl* | mpixl* | bgxl*) 7520af9a7ee5Smrg # IBM XL 8.0 on PPC, with GNU ld 7521af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7522af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7523af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7524af9a7ee5Smrg if test "x$supports_anon_versioning" = xyes; then 7525af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7526af9a7ee5Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7527af9a7ee5Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7528af9a7ee5Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7529af9a7ee5Smrg fi 7530af9a7ee5Smrg ;; 7531af9a7ee5Smrg *) 7532af9a7ee5Smrg case `$CC -V 2>&1 | sed 5q` in 7533af9a7ee5Smrg *Sun\ C*) 7534af9a7ee5Smrg # Sun C++ 5.9 7535af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7536af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7537af9a7ee5Smrg _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' 7538af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7539af9a7ee5Smrg _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' 7540af9a7ee5Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7541af9a7ee5Smrg 7542af9a7ee5Smrg # Not sure whether something based on 7543af9a7ee5Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7544af9a7ee5Smrg # would be better. 7545af9a7ee5Smrg output_verbose_link_cmd='func_echo_all' 7546af9a7ee5Smrg 7547af9a7ee5Smrg # Archives containing C++ object files must be created using 7548af9a7ee5Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7549af9a7ee5Smrg # necessary to make sure instantiated templates are included 7550af9a7ee5Smrg # in the archive. 7551af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7552af9a7ee5Smrg ;; 7553af9a7ee5Smrg esac 7554af9a7ee5Smrg ;; 7555af9a7ee5Smrg esac 7556af9a7ee5Smrg ;; 7557caade7ccSmrg 7558af9a7ee5Smrg lynxos*) 7559af9a7ee5Smrg # FIXME: insert proper C++ library support 7560af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7561af9a7ee5Smrg ;; 7562caade7ccSmrg 7563af9a7ee5Smrg m88k*) 7564af9a7ee5Smrg # FIXME: insert proper C++ library support 7565af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7566af9a7ee5Smrg ;; 7567caade7ccSmrg 7568af9a7ee5Smrg mvs*) 7569af9a7ee5Smrg case $cc_basename in 7570af9a7ee5Smrg cxx*) 7571af9a7ee5Smrg # FIXME: insert proper C++ library support 7572af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7573af9a7ee5Smrg ;; 7574af9a7ee5Smrg *) 7575af9a7ee5Smrg # FIXME: insert proper C++ library support 7576af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7577af9a7ee5Smrg ;; 7578af9a7ee5Smrg esac 7579af9a7ee5Smrg ;; 7580caade7ccSmrg 7581af9a7ee5Smrg netbsd*) 7582af9a7ee5Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7583af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7584af9a7ee5Smrg wlarc= 7585af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7586af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7587af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7588af9a7ee5Smrg fi 7589af9a7ee5Smrg # Workaround some broken pre-1.5 toolchains 7590af9a7ee5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7591af9a7ee5Smrg ;; 7592caade7ccSmrg 7593af9a7ee5Smrg *nto* | *qnx*) 7594af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7595af9a7ee5Smrg ;; 7596caade7ccSmrg 7597af9a7ee5Smrg openbsd2*) 7598af9a7ee5Smrg # C++ shared libraries are fairly broken 7599af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7600af9a7ee5Smrg ;; 7601caade7ccSmrg 7602af9a7ee5Smrg openbsd*) 7603af9a7ee5Smrg if test -f /usr/libexec/ld.so; then 7604af9a7ee5Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7605af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7606af9a7ee5Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7607af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7608af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7609af9a7ee5Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7610af9a7ee5Smrg _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' 7611af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7612af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7613af9a7ee5Smrg fi 7614af9a7ee5Smrg output_verbose_link_cmd=func_echo_all 7615af9a7ee5Smrg else 7616af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7617af9a7ee5Smrg fi 7618af9a7ee5Smrg ;; 7619caade7ccSmrg 7620af9a7ee5Smrg osf3* | osf4* | osf5*) 7621af9a7ee5Smrg case $cc_basename in 7622af9a7ee5Smrg KCC*) 7623af9a7ee5Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7624caade7ccSmrg 7625af9a7ee5Smrg # KCC will only create a shared library if the output file 7626af9a7ee5Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7627af9a7ee5Smrg # to its proper name (with version) after linking. 7628af9a7ee5Smrg _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' 7629caade7ccSmrg 7630af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7631af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7632caade7ccSmrg 7633af9a7ee5Smrg # Archives containing C++ object files must be created using 7634af9a7ee5Smrg # the KAI C++ compiler. 7635af9a7ee5Smrg case $host in 7636af9a7ee5Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7637af9a7ee5Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7638af9a7ee5Smrg esac 7639af9a7ee5Smrg ;; 7640af9a7ee5Smrg RCC*) 7641af9a7ee5Smrg # Rational C++ 2.4.1 7642af9a7ee5Smrg # FIXME: insert proper C++ library support 7643af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7644af9a7ee5Smrg ;; 7645af9a7ee5Smrg cxx*) 7646af9a7ee5Smrg case $host in 7647af9a7ee5Smrg osf3*) 7648af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7649af9a7ee5Smrg _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' 7650af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7651af9a7ee5Smrg ;; 7652af9a7ee5Smrg *) 7653af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7654af9a7ee5Smrg _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' 7655af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7656af9a7ee5Smrg echo "-hidden">> $lib.exp~ 7657af9a7ee5Smrg $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~ 7658af9a7ee5Smrg $RM $lib.exp' 7659af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7660af9a7ee5Smrg ;; 7661af9a7ee5Smrg esac 7662caade7ccSmrg 7663af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7664caade7ccSmrg 7665af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7666af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7667af9a7ee5Smrg # linking a shared library. 7668af9a7ee5Smrg # 7669af9a7ee5Smrg # There doesn't appear to be a way to prevent this compiler from 7670af9a7ee5Smrg # explicitly linking system object files so we need to strip them 7671af9a7ee5Smrg # from the output so that they don't get included in the library 7672af9a7ee5Smrg # dependencies. 7673af9a7ee5Smrg 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"' 7674af9a7ee5Smrg ;; 7675af9a7ee5Smrg *) 7676af9a7ee5Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7677af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7678af9a7ee5Smrg case $host in 7679af9a7ee5Smrg osf3*) 7680af9a7ee5Smrg _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' 7681af9a7ee5Smrg ;; 7682af9a7ee5Smrg *) 7683af9a7ee5Smrg _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' 7684af9a7ee5Smrg ;; 7685af9a7ee5Smrg esac 7686caade7ccSmrg 7687af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7688af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7689caade7ccSmrg 7690af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7691af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7692af9a7ee5Smrg # linking a shared library. 7693af9a7ee5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7694caade7ccSmrg 7695af9a7ee5Smrg else 7696af9a7ee5Smrg # FIXME: insert proper C++ library support 7697af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7698af9a7ee5Smrg fi 7699af9a7ee5Smrg ;; 7700af9a7ee5Smrg esac 7701af9a7ee5Smrg ;; 7702caade7ccSmrg 7703af9a7ee5Smrg psos*) 7704af9a7ee5Smrg # FIXME: insert proper C++ library support 7705af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7706af9a7ee5Smrg ;; 7707caade7ccSmrg 7708af9a7ee5Smrg sunos4*) 7709af9a7ee5Smrg case $cc_basename in 7710af9a7ee5Smrg CC*) 7711af9a7ee5Smrg # Sun C++ 4.x 7712af9a7ee5Smrg # FIXME: insert proper C++ library support 7713af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7714af9a7ee5Smrg ;; 7715af9a7ee5Smrg lcc*) 7716af9a7ee5Smrg # Lucid 7717af9a7ee5Smrg # FIXME: insert proper C++ library support 7718af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7719af9a7ee5Smrg ;; 7720af9a7ee5Smrg *) 7721af9a7ee5Smrg # FIXME: insert proper C++ library support 7722af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7723af9a7ee5Smrg ;; 7724af9a7ee5Smrg esac 7725af9a7ee5Smrg ;; 7726caade7ccSmrg 7727af9a7ee5Smrg solaris*) 7728af9a7ee5Smrg case $cc_basename in 7729af9a7ee5Smrg CC* | sunCC*) 7730af9a7ee5Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7731af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7732af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7733af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7734af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7735af9a7ee5Smrg $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' 7736caade7ccSmrg 7737af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7738af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7739af9a7ee5Smrg case $host_os in 7740af9a7ee5Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7741af9a7ee5Smrg *) 7742af9a7ee5Smrg # The compiler driver will combine and reorder linker options, 7743af9a7ee5Smrg # but understands `-z linker_flag'. 7744af9a7ee5Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7745af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7746af9a7ee5Smrg ;; 7747af9a7ee5Smrg esac 7748af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7749caade7ccSmrg 7750af9a7ee5Smrg output_verbose_link_cmd='func_echo_all' 7751caade7ccSmrg 7752af9a7ee5Smrg # Archives containing C++ object files must be created using 7753af9a7ee5Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7754af9a7ee5Smrg # necessary to make sure instantiated templates are included 7755af9a7ee5Smrg # in the archive. 7756af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7757af9a7ee5Smrg ;; 7758af9a7ee5Smrg gcx*) 7759af9a7ee5Smrg # Green Hills C++ Compiler 7760af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7761caade7ccSmrg 7762af9a7ee5Smrg # The C++ compiler must be used to create the archive. 7763af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7764af9a7ee5Smrg ;; 7765af9a7ee5Smrg *) 7766af9a7ee5Smrg # GNU C++ compiler with Solaris linker 7767af9a7ee5Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7768af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7769af9a7ee5Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7770af9a7ee5Smrg _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' 7771af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7772af9a7ee5Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7773caade7ccSmrg 7774af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7775af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7776af9a7ee5Smrg # linking a shared library. 7777af9a7ee5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7778af9a7ee5Smrg else 7779af9a7ee5Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 7780af9a7ee5Smrg # platform. 7781af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7782af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7783af9a7ee5Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7784caade7ccSmrg 7785af9a7ee5Smrg # Commands to make compiler produce verbose output that lists 7786af9a7ee5Smrg # what "hidden" libraries, object files and flags are used when 7787af9a7ee5Smrg # linking a shared library. 7788af9a7ee5Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7789af9a7ee5Smrg fi 7790caade7ccSmrg 7791af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7792af9a7ee5Smrg case $host_os in 7793af9a7ee5Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7794af9a7ee5Smrg *) 7795af9a7ee5Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7796af9a7ee5Smrg ;; 7797af9a7ee5Smrg esac 7798af9a7ee5Smrg fi 7799af9a7ee5Smrg ;; 7800af9a7ee5Smrg esac 7801af9a7ee5Smrg ;; 7802caade7ccSmrg 7803b9b4fd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7804b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7805b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7806b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7807b9b4fd27Smrg runpath_var='LD_RUN_PATH' 7808caade7ccSmrg 7809af9a7ee5Smrg case $cc_basename in 7810af9a7ee5Smrg CC*) 7811af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7812af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7813af9a7ee5Smrg ;; 7814af9a7ee5Smrg *) 7815af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7816af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7817af9a7ee5Smrg ;; 7818af9a7ee5Smrg esac 7819b9b4fd27Smrg ;; 7820caade7ccSmrg 7821af9a7ee5Smrg sysv5* | sco3.2v5* | sco5v6*) 7822af9a7ee5Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7823af9a7ee5Smrg # link with -lc, and that would cause any symbols used from libc to 7824af9a7ee5Smrg # always be unresolved, which means just about no library would 7825af9a7ee5Smrg # ever link correctly. If we're not using GNU ld we use -z text 7826af9a7ee5Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7827af9a7ee5Smrg # as -z defs. 7828af9a7ee5Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7829af9a7ee5Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7830af9a7ee5Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7831af9a7ee5Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7832af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7833af9a7ee5Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7834af9a7ee5Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7835af9a7ee5Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7836af9a7ee5Smrg runpath_var='LD_RUN_PATH' 7837caade7ccSmrg 7838af9a7ee5Smrg case $cc_basename in 7839af9a7ee5Smrg CC*) 7840af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7841af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7842af9a7ee5Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7843af9a7ee5Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7844af9a7ee5Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7845af9a7ee5Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7846af9a7ee5Smrg ;; 7847af9a7ee5Smrg *) 7848af9a7ee5Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7849af9a7ee5Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7850af9a7ee5Smrg ;; 7851af9a7ee5Smrg esac 7852b9b4fd27Smrg ;; 7853caade7ccSmrg 7854af9a7ee5Smrg tandem*) 7855af9a7ee5Smrg case $cc_basename in 7856af9a7ee5Smrg NCC*) 7857af9a7ee5Smrg # NonStop-UX NCC 3.20 7858af9a7ee5Smrg # FIXME: insert proper C++ library support 7859af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7860af9a7ee5Smrg ;; 7861af9a7ee5Smrg *) 7862af9a7ee5Smrg # FIXME: insert proper C++ library support 7863af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7864af9a7ee5Smrg ;; 7865af9a7ee5Smrg esac 7866af9a7ee5Smrg ;; 7867caade7ccSmrg 7868af9a7ee5Smrg vxworks*) 7869af9a7ee5Smrg # FIXME: insert proper C++ library support 7870af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7871af9a7ee5Smrg ;; 7872af9a7ee5Smrg 7873af9a7ee5Smrg *) 7874af9a7ee5Smrg # FIXME: insert proper C++ library support 7875af9a7ee5Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7876af9a7ee5Smrg ;; 7877b9b4fd27Smrg esac 7878caade7ccSmrg 7879af9a7ee5Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7880af9a7ee5Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7881caade7ccSmrg 7882af9a7ee5Smrg _LT_TAGVAR(GCC, $1)="$GXX" 7883af9a7ee5Smrg _LT_TAGVAR(LD, $1)="$LD" 7884caade7ccSmrg 7885af9a7ee5Smrg ## CAVEAT EMPTOR: 7886af9a7ee5Smrg ## There is no encapsulation within the following macros, do not change 7887af9a7ee5Smrg ## the running order or otherwise move them around unless you know exactly 7888af9a7ee5Smrg ## what you are doing... 7889af9a7ee5Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7890af9a7ee5Smrg _LT_COMPILER_PIC($1) 7891af9a7ee5Smrg _LT_COMPILER_C_O($1) 7892af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 7893af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 7894af9a7ee5Smrg _LT_SYS_DYNAMIC_LINKER($1) 7895af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7896caade7ccSmrg 7897af9a7ee5Smrg _LT_CONFIG($1) 7898af9a7ee5Smrg fi # test -n "$compiler" 7899af9a7ee5Smrg 7900af9a7ee5Smrg CC=$lt_save_CC 7901af9a7ee5Smrg CFLAGS=$lt_save_CFLAGS 7902af9a7ee5Smrg LDCXX=$LD 7903af9a7ee5Smrg LD=$lt_save_LD 7904af9a7ee5Smrg GCC=$lt_save_GCC 7905af9a7ee5Smrg with_gnu_ld=$lt_save_with_gnu_ld 7906af9a7ee5Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7907af9a7ee5Smrg lt_cv_path_LD=$lt_save_path_LD 7908af9a7ee5Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7909af9a7ee5Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7910af9a7ee5Smrgfi # test "$_lt_caught_CXX_error" != yes 7911af9a7ee5Smrg 7912af9a7ee5SmrgAC_LANG_POP 7913af9a7ee5Smrg])# _LT_LANG_CXX_CONFIG 7914af9a7ee5Smrg 7915af9a7ee5Smrg 7916af9a7ee5Smrg# _LT_FUNC_STRIPNAME_CNF 7917af9a7ee5Smrg# ---------------------- 7918af9a7ee5Smrg# func_stripname_cnf prefix suffix name 7919af9a7ee5Smrg# strip PREFIX and SUFFIX off of NAME. 7920af9a7ee5Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7921af9a7ee5Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7922af9a7ee5Smrg# dot (in which case that matches only a dot). 7923b9b4fd27Smrg# 7924af9a7ee5Smrg# This function is identical to the (non-XSI) version of func_stripname, 7925af9a7ee5Smrg# except this one can be used by m4 code that may be executed by configure, 7926af9a7ee5Smrg# rather than the libtool script. 7927af9a7ee5Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7928af9a7ee5SmrgAC_REQUIRE([_LT_DECL_SED]) 7929af9a7ee5SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7930af9a7ee5Smrgfunc_stripname_cnf () 7931af9a7ee5Smrg{ 7932af9a7ee5Smrg case ${2} in 7933af9a7ee5Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 7934af9a7ee5Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7935af9a7ee5Smrg esac 7936af9a7ee5Smrg} # func_stripname_cnf 7937af9a7ee5Smrg])# _LT_FUNC_STRIPNAME_CNF 7938caade7ccSmrg 7939af9a7ee5Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7940af9a7ee5Smrg# --------------------------------- 7941af9a7ee5Smrg# Figure out "hidden" library dependencies from verbose 7942af9a7ee5Smrg# compiler output when linking a shared library. 7943af9a7ee5Smrg# Parse the compiler output and extract the necessary 7944af9a7ee5Smrg# objects, libraries and library flags. 7945af9a7ee5Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7946af9a7ee5Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7947af9a7ee5SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7948af9a7ee5Smrg# Dependencies to place before and after the object being linked: 7949af9a7ee5Smrg_LT_TAGVAR(predep_objects, $1)= 7950af9a7ee5Smrg_LT_TAGVAR(postdep_objects, $1)= 7951af9a7ee5Smrg_LT_TAGVAR(predeps, $1)= 7952af9a7ee5Smrg_LT_TAGVAR(postdeps, $1)= 7953af9a7ee5Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7954af9a7ee5Smrg 7955af9a7ee5Smrgdnl we can't use the lt_simple_compile_test_code here, 7956af9a7ee5Smrgdnl because it contains code intended for an executable, 7957af9a7ee5Smrgdnl not a library. It's possible we should let each 7958af9a7ee5Smrgdnl tag define a new lt_????_link_test_code variable, 7959af9a7ee5Smrgdnl but it's only used here... 7960af9a7ee5Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7961af9a7ee5Smrgint a; 7962af9a7ee5Smrgvoid foo (void) { a = 0; } 7963af9a7ee5Smrg_LT_EOF 7964af9a7ee5Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7965af9a7ee5Smrgclass Foo 7966af9a7ee5Smrg{ 7967af9a7ee5Smrgpublic: 7968af9a7ee5Smrg Foo (void) { a = 0; } 7969af9a7ee5Smrgprivate: 7970af9a7ee5Smrg int a; 7971af9a7ee5Smrg}; 7972af9a7ee5Smrg_LT_EOF 7973af9a7ee5Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7974af9a7ee5Smrg subroutine foo 7975af9a7ee5Smrg implicit none 7976af9a7ee5Smrg integer*4 a 7977af9a7ee5Smrg a=0 7978af9a7ee5Smrg return 7979af9a7ee5Smrg end 7980af9a7ee5Smrg_LT_EOF 7981af9a7ee5Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7982af9a7ee5Smrg subroutine foo 7983af9a7ee5Smrg implicit none 7984af9a7ee5Smrg integer a 7985af9a7ee5Smrg a=0 7986af9a7ee5Smrg return 7987af9a7ee5Smrg end 7988af9a7ee5Smrg_LT_EOF 7989af9a7ee5Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7990af9a7ee5Smrgpublic class foo { 7991af9a7ee5Smrg private int a; 7992af9a7ee5Smrg public void bar (void) { 7993af9a7ee5Smrg a = 0; 7994af9a7ee5Smrg } 7995af9a7ee5Smrg}; 7996af9a7ee5Smrg_LT_EOF 7997af9a7ee5Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7998af9a7ee5Smrgpackage foo 7999af9a7ee5Smrgfunc foo() { 8000af9a7ee5Smrg} 8001af9a7ee5Smrg_LT_EOF 8002af9a7ee5Smrg]) 8003e8a5466aSmrg 8004af9a7ee5Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 8005af9a7ee5Smrgcase "$CC $CFLAGS " in #( 8006af9a7ee5Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8007af9a7ee5Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8008af9a7ee5Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8009caade7ccSmrgesac 8010caade7ccSmrg 8011af9a7ee5Smrgdnl Parse the compiler output and extract the necessary 8012af9a7ee5Smrgdnl objects, libraries and library flags. 8013af9a7ee5Smrgif AC_TRY_EVAL(ac_compile); then 8014af9a7ee5Smrg # Parse the compiler output and extract the necessary 8015af9a7ee5Smrg # objects, libraries and library flags. 8016b9b4fd27Smrg 8017af9a7ee5Smrg # Sentinel used to keep track of whether or not we are before 8018af9a7ee5Smrg # the conftest object file. 8019af9a7ee5Smrg pre_test_object_deps_done=no 8020b9b4fd27Smrg 8021af9a7ee5Smrg for p in `eval "$output_verbose_link_cmd"`; do 8022af9a7ee5Smrg case ${prev}${p} in 8023b9b4fd27Smrg 8024af9a7ee5Smrg -L* | -R* | -l*) 8025af9a7ee5Smrg # Some compilers place space between "-{L,R}" and the path. 8026af9a7ee5Smrg # Remove the space. 8027af9a7ee5Smrg if test $p = "-L" || 8028af9a7ee5Smrg test $p = "-R"; then 8029af9a7ee5Smrg prev=$p 8030af9a7ee5Smrg continue 8031af9a7ee5Smrg fi 8032b9b4fd27Smrg 8033af9a7ee5Smrg # Expand the sysroot to ease extracting the directories later. 8034af9a7ee5Smrg if test -z "$prev"; then 8035af9a7ee5Smrg case $p in 8036af9a7ee5Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8037af9a7ee5Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8038af9a7ee5Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8039af9a7ee5Smrg esac 8040af9a7ee5Smrg fi 8041af9a7ee5Smrg case $p in 8042af9a7ee5Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8043af9a7ee5Smrg esac 8044af9a7ee5Smrg if test "$pre_test_object_deps_done" = no; then 8045af9a7ee5Smrg case ${prev} in 8046af9a7ee5Smrg -L | -R) 8047af9a7ee5Smrg # Internal compiler library paths should come after those 8048af9a7ee5Smrg # provided the user. The postdeps already come after the 8049af9a7ee5Smrg # user supplied libs so there is no need to process them. 8050af9a7ee5Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8051af9a7ee5Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8052af9a7ee5Smrg else 8053af9a7ee5Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8054af9a7ee5Smrg fi 8055af9a7ee5Smrg ;; 8056af9a7ee5Smrg # The "-l" case would never come before the object being 8057af9a7ee5Smrg # linked, so don't bother handling this case. 8058af9a7ee5Smrg esac 8059af9a7ee5Smrg else 8060af9a7ee5Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8061af9a7ee5Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8062af9a7ee5Smrg else 8063af9a7ee5Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8064af9a7ee5Smrg fi 8065af9a7ee5Smrg fi 8066af9a7ee5Smrg prev= 8067af9a7ee5Smrg ;; 8068caade7ccSmrg 8069af9a7ee5Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 8070af9a7ee5Smrg *.$objext) 8071af9a7ee5Smrg # This assumes that the test object file only shows up 8072af9a7ee5Smrg # once in the compiler output. 8073af9a7ee5Smrg if test "$p" = "conftest.$objext"; then 8074af9a7ee5Smrg pre_test_object_deps_done=yes 8075af9a7ee5Smrg continue 8076af9a7ee5Smrg fi 8077caade7ccSmrg 8078af9a7ee5Smrg if test "$pre_test_object_deps_done" = no; then 8079af9a7ee5Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8080af9a7ee5Smrg _LT_TAGVAR(predep_objects, $1)="$p" 8081af9a7ee5Smrg else 8082af9a7ee5Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8083af9a7ee5Smrg fi 8084af9a7ee5Smrg else 8085af9a7ee5Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8086af9a7ee5Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 8087af9a7ee5Smrg else 8088af9a7ee5Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8089af9a7ee5Smrg fi 8090af9a7ee5Smrg fi 8091af9a7ee5Smrg ;; 8092caade7ccSmrg 8093af9a7ee5Smrg *) ;; # Ignore the rest. 8094caade7ccSmrg 8095af9a7ee5Smrg esac 8096af9a7ee5Smrg done 8097caade7ccSmrg 8098af9a7ee5Smrg # Clean up. 8099af9a7ee5Smrg rm -f a.out a.exe 8100af9a7ee5Smrgelse 8101af9a7ee5Smrg echo "libtool.m4: error: problem compiling $1 test program" 8102af9a7ee5Smrgfi 8103af9a7ee5Smrg 8104af9a7ee5Smrg$RM -f confest.$objext 8105af9a7ee5SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8106b9b4fd27Smrg 8107af9a7ee5Smrg# PORTME: override above test on systems where it is broken 8108af9a7ee5Smrgm4_if([$1], [CXX], 8109af9a7ee5Smrg[case $host_os in 8110af9a7ee5Smrginterix[[3-9]]*) 8111af9a7ee5Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8112af9a7ee5Smrg # hack all around it, let's just trust "g++" to DTRT. 8113af9a7ee5Smrg _LT_TAGVAR(predep_objects,$1)= 8114af9a7ee5Smrg _LT_TAGVAR(postdep_objects,$1)= 8115af9a7ee5Smrg _LT_TAGVAR(postdeps,$1)= 8116af9a7ee5Smrg ;; 8117b9b4fd27Smrg 8118af9a7ee5Smrglinux*) 8119af9a7ee5Smrg case `$CC -V 2>&1 | sed 5q` in 8120af9a7ee5Smrg *Sun\ C*) 8121af9a7ee5Smrg # Sun C++ 5.9 8122b9b4fd27Smrg 8123af9a7ee5Smrg # The more standards-conforming stlport4 library is 8124af9a7ee5Smrg # incompatible with the Cstd library. Avoid specifying 8125af9a7ee5Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8126af9a7ee5Smrg # -library=stlport4 depends on it. 8127af9a7ee5Smrg case " $CXX $CXXFLAGS " in 8128af9a7ee5Smrg *" -library=stlport4 "*) 8129af9a7ee5Smrg solaris_use_stlport4=yes 8130af9a7ee5Smrg ;; 8131af9a7ee5Smrg esac 8132af9a7ee5Smrg 8133af9a7ee5Smrg if test "$solaris_use_stlport4" != yes; then 8134af9a7ee5Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8135b9b4fd27Smrg fi 8136b9b4fd27Smrg ;; 8137af9a7ee5Smrg esac 8138af9a7ee5Smrg ;; 8139caade7ccSmrg 8140af9a7ee5Smrgsolaris*) 8141af9a7ee5Smrg case $cc_basename in 8142af9a7ee5Smrg CC* | sunCC*) 8143af9a7ee5Smrg # The more standards-conforming stlport4 library is 8144af9a7ee5Smrg # incompatible with the Cstd library. Avoid specifying 8145af9a7ee5Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8146af9a7ee5Smrg # -library=stlport4 depends on it. 8147af9a7ee5Smrg case " $CXX $CXXFLAGS " in 8148af9a7ee5Smrg *" -library=stlport4 "*) 8149af9a7ee5Smrg solaris_use_stlport4=yes 8150af9a7ee5Smrg ;; 8151af9a7ee5Smrg esac 8152af9a7ee5Smrg 8153af9a7ee5Smrg # Adding this requires a known-good setup of shared libraries for 8154af9a7ee5Smrg # Sun compiler versions before 5.6, else PIC objects from an old 8155af9a7ee5Smrg # archive will be linked into the output, leading to subtle bugs. 8156af9a7ee5Smrg if test "$solaris_use_stlport4" != yes; then 8157af9a7ee5Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8158b9b4fd27Smrg fi 8159b9b4fd27Smrg ;; 8160b9b4fd27Smrg esac 8161af9a7ee5Smrg ;; 8162af9a7ee5Smrgesac 8163af9a7ee5Smrg]) 8164caade7ccSmrg 8165af9a7ee5Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 8166af9a7ee5Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8167af9a7ee5Smrgesac 8168af9a7ee5Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8169af9a7ee5Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8170af9a7ee5Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8171b9b4fd27Smrgfi 8172af9a7ee5Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8173af9a7ee5Smrg [The directories searched by this compiler when creating a shared library]) 8174af9a7ee5Smrg_LT_TAGDECL([], [predep_objects], [1], 8175af9a7ee5Smrg [Dependencies to place before and after the objects being linked to 8176af9a7ee5Smrg create a shared library]) 8177af9a7ee5Smrg_LT_TAGDECL([], [postdep_objects], [1]) 8178af9a7ee5Smrg_LT_TAGDECL([], [predeps], [1]) 8179af9a7ee5Smrg_LT_TAGDECL([], [postdeps], [1]) 8180af9a7ee5Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8181af9a7ee5Smrg [The library search path used internally by the compiler when linking 8182af9a7ee5Smrg a shared library]) 8183af9a7ee5Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8184caade7ccSmrg 8185caade7ccSmrg 8186af9a7ee5Smrg# _LT_LANG_F77_CONFIG([TAG]) 8187b9b4fd27Smrg# -------------------------- 8188af9a7ee5Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 8189af9a7ee5Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8190af9a7ee5Smrg# to write the compiler configuration to `libtool'. 8191af9a7ee5Smrgm4_defun([_LT_LANG_F77_CONFIG], 8192af9a7ee5Smrg[AC_LANG_PUSH(Fortran 77) 8193af9a7ee5Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 8194af9a7ee5Smrg _lt_disable_F77=yes 8195e8a5466aSmrgfi 8196b9b4fd27Smrg 8197b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8198b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8199b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8200b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8201b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8202b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8203b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8204b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8205b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8206b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8207b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8208b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8209b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 8210b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8211b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8212b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8213e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8214e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8215b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8216b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8217b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8218b9b4fd27Smrg 8219af9a7ee5Smrg# Source file extension for f77 test sources. 8220af9a7ee5Smrgac_ext=f 8221b9b4fd27Smrg 8222af9a7ee5Smrg# Object file extension for compiled f77 test sources. 8223b9b4fd27Smrgobjext=o 8224b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 8225b9b4fd27Smrg 8226b9b4fd27Smrg# No sense in running all these tests if we already determined that 8227af9a7ee5Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8228b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 8229b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 8230af9a7ee5Smrgif test "$_lt_disable_F77" != yes; then 8231b9b4fd27Smrg # Code to be used in simple compile tests 8232af9a7ee5Smrg lt_simple_compile_test_code="\ 8233af9a7ee5Smrg subroutine t 8234af9a7ee5Smrg return 8235af9a7ee5Smrg end 8236af9a7ee5Smrg" 8237b9b4fd27Smrg 8238b9b4fd27Smrg # Code to be used in simple link tests 8239af9a7ee5Smrg lt_simple_link_test_code="\ 8240af9a7ee5Smrg program t 8241af9a7ee5Smrg end 8242af9a7ee5Smrg" 8243b9b4fd27Smrg 8244b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8245b9b4fd27Smrg _LT_TAG_COMPILER 8246b9b4fd27Smrg 8247b9b4fd27Smrg # save warnings/boilerplate of simple test code 8248b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 8249b9b4fd27Smrg _LT_LINKER_BOILERPLATE 8250b9b4fd27Smrg 8251b9b4fd27Smrg # Allow CC to be a program name with arguments. 8252af9a7ee5Smrg lt_save_CC="$CC" 8253b9b4fd27Smrg lt_save_GCC=$GCC 8254af9a7ee5Smrg lt_save_CFLAGS=$CFLAGS 8255af9a7ee5Smrg CC=${F77-"f77"} 8256af9a7ee5Smrg CFLAGS=$FFLAGS 8257b9b4fd27Smrg compiler=$CC 8258b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 8259b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 8260af9a7ee5Smrg GCC=$G77 8261b9b4fd27Smrg if test -n "$compiler"; then 8262af9a7ee5Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8263af9a7ee5Smrg AC_MSG_RESULT([$can_build_shared]) 8264b9b4fd27Smrg 8265af9a7ee5Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8266af9a7ee5Smrg test "$can_build_shared" = "no" && enable_shared=no 8267af9a7ee5Smrg 8268af9a7ee5Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8269af9a7ee5Smrg # are all built from PIC. 8270af9a7ee5Smrg case $host_os in 8271af9a7ee5Smrg aix3*) 8272af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 8273af9a7ee5Smrg if test -n "$RANLIB"; then 8274af9a7ee5Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8275af9a7ee5Smrg postinstall_cmds='$RANLIB $lib' 8276b9b4fd27Smrg fi 8277af9a7ee5Smrg ;; 8278af9a7ee5Smrg aix[[4-9]]*) 8279af9a7ee5Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8280af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 8281af9a7ee5Smrg fi 8282af9a7ee5Smrg ;; 8283af9a7ee5Smrg esac 8284af9a7ee5Smrg AC_MSG_RESULT([$enable_shared]) 8285b9b4fd27Smrg 8286af9a7ee5Smrg AC_MSG_CHECKING([whether to build static libraries]) 8287af9a7ee5Smrg # Make sure either enable_shared or enable_static is yes. 8288af9a7ee5Smrg test "$enable_shared" = yes || enable_static=yes 8289af9a7ee5Smrg AC_MSG_RESULT([$enable_static]) 8290b9b4fd27Smrg 8291af9a7ee5Smrg _LT_TAGVAR(GCC, $1)="$G77" 8292af9a7ee5Smrg _LT_TAGVAR(LD, $1)="$LD" 8293b9b4fd27Smrg 8294af9a7ee5Smrg ## CAVEAT EMPTOR: 8295af9a7ee5Smrg ## There is no encapsulation within the following macros, do not change 8296af9a7ee5Smrg ## the running order or otherwise move them around unless you know exactly 8297af9a7ee5Smrg ## what you are doing... 8298af9a7ee5Smrg _LT_COMPILER_PIC($1) 8299af9a7ee5Smrg _LT_COMPILER_C_O($1) 8300af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 8301af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 8302af9a7ee5Smrg _LT_SYS_DYNAMIC_LINKER($1) 8303af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8304b9b4fd27Smrg 8305af9a7ee5Smrg _LT_CONFIG($1) 8306af9a7ee5Smrg fi # test -n "$compiler" 8307b9b4fd27Smrg 8308af9a7ee5Smrg GCC=$lt_save_GCC 8309af9a7ee5Smrg CC="$lt_save_CC" 8310af9a7ee5Smrg CFLAGS="$lt_save_CFLAGS" 8311af9a7ee5Smrgfi # test "$_lt_disable_F77" != yes 8312b9b4fd27Smrg 8313af9a7ee5SmrgAC_LANG_POP 8314af9a7ee5Smrg])# _LT_LANG_F77_CONFIG 8315b9b4fd27Smrg 8316b9b4fd27Smrg 8317af9a7ee5Smrg# _LT_LANG_FC_CONFIG([TAG]) 8318af9a7ee5Smrg# ------------------------- 8319af9a7ee5Smrg# Ensure that the configuration variables for a Fortran compiler are 8320af9a7ee5Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8321af9a7ee5Smrg# to write the compiler configuration to `libtool'. 8322af9a7ee5Smrgm4_defun([_LT_LANG_FC_CONFIG], 8323af9a7ee5Smrg[AC_LANG_PUSH(Fortran) 8324af9a7ee5Smrg 8325af9a7ee5Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 8326af9a7ee5Smrg _lt_disable_FC=yes 8327af9a7ee5Smrgfi 8328af9a7ee5Smrg 8329af9a7ee5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8330af9a7ee5Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8331af9a7ee5Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8332af9a7ee5Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8333af9a7ee5Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8334af9a7ee5Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8335af9a7ee5Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8336af9a7ee5Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8337af9a7ee5Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8338af9a7ee5Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8339af9a7ee5Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8340af9a7ee5Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8341af9a7ee5Smrg_LT_TAGVAR(module_cmds, $1)= 8342af9a7ee5Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8343af9a7ee5Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8344af9a7ee5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8345af9a7ee5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8346af9a7ee5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8347af9a7ee5Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8348af9a7ee5Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8349af9a7ee5Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8350af9a7ee5Smrg 8351af9a7ee5Smrg# Source file extension for fc test sources. 8352af9a7ee5Smrgac_ext=${ac_fc_srcext-f} 8353af9a7ee5Smrg 8354af9a7ee5Smrg# Object file extension for compiled fc test sources. 8355af9a7ee5Smrgobjext=o 8356af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 8357af9a7ee5Smrg 8358af9a7ee5Smrg# No sense in running all these tests if we already determined that 8359af9a7ee5Smrg# the FC compiler isn't working. Some variables (like enable_shared) 8360af9a7ee5Smrg# are currently assumed to apply to all compilers on this platform, 8361af9a7ee5Smrg# and will be corrupted by setting them based on a non-working compiler. 8362af9a7ee5Smrgif test "$_lt_disable_FC" != yes; then 8363af9a7ee5Smrg # Code to be used in simple compile tests 8364af9a7ee5Smrg lt_simple_compile_test_code="\ 8365af9a7ee5Smrg subroutine t 8366af9a7ee5Smrg return 8367af9a7ee5Smrg end 8368af9a7ee5Smrg" 8369a5602400Smrg 8370af9a7ee5Smrg # Code to be used in simple link tests 8371af9a7ee5Smrg lt_simple_link_test_code="\ 8372af9a7ee5Smrg program t 8373af9a7ee5Smrg end 8374af9a7ee5Smrg" 8375b9b4fd27Smrg 8376af9a7ee5Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8377af9a7ee5Smrg _LT_TAG_COMPILER 8378b9b4fd27Smrg 8379af9a7ee5Smrg # save warnings/boilerplate of simple test code 8380af9a7ee5Smrg _LT_COMPILER_BOILERPLATE 8381af9a7ee5Smrg _LT_LINKER_BOILERPLATE 8382b9b4fd27Smrg 8383af9a7ee5Smrg # Allow CC to be a program name with arguments. 8384af9a7ee5Smrg lt_save_CC="$CC" 8385af9a7ee5Smrg lt_save_GCC=$GCC 8386af9a7ee5Smrg lt_save_CFLAGS=$CFLAGS 8387af9a7ee5Smrg CC=${FC-"f95"} 8388af9a7ee5Smrg CFLAGS=$FCFLAGS 8389af9a7ee5Smrg compiler=$CC 8390af9a7ee5Smrg GCC=$ac_cv_fc_compiler_gnu 8391b9b4fd27Smrg 8392af9a7ee5Smrg _LT_TAGVAR(compiler, $1)=$CC 8393af9a7ee5Smrg _LT_CC_BASENAME([$compiler]) 8394b9b4fd27Smrg 8395af9a7ee5Smrg if test -n "$compiler"; then 8396af9a7ee5Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8397af9a7ee5Smrg AC_MSG_RESULT([$can_build_shared]) 8398b9b4fd27Smrg 8399af9a7ee5Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8400af9a7ee5Smrg test "$can_build_shared" = "no" && enable_shared=no 8401af9a7ee5Smrg 8402af9a7ee5Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8403af9a7ee5Smrg # are all built from PIC. 8404af9a7ee5Smrg case $host_os in 8405af9a7ee5Smrg aix3*) 8406af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 8407af9a7ee5Smrg if test -n "$RANLIB"; then 8408af9a7ee5Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8409af9a7ee5Smrg postinstall_cmds='$RANLIB $lib' 8410af9a7ee5Smrg fi 8411af9a7ee5Smrg ;; 8412af9a7ee5Smrg aix[[4-9]]*) 8413af9a7ee5Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8414af9a7ee5Smrg test "$enable_shared" = yes && enable_static=no 8415af9a7ee5Smrg fi 8416e8a5466aSmrg ;; 8417af9a7ee5Smrg esac 8418af9a7ee5Smrg AC_MSG_RESULT([$enable_shared]) 8419e8a5466aSmrg 8420af9a7ee5Smrg AC_MSG_CHECKING([whether to build static libraries]) 8421af9a7ee5Smrg # Make sure either enable_shared or enable_static is yes. 8422af9a7ee5Smrg test "$enable_shared" = yes || enable_static=yes 8423af9a7ee5Smrg AC_MSG_RESULT([$enable_static]) 8424b9b4fd27Smrg 8425af9a7ee5Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8426af9a7ee5Smrg _LT_TAGVAR(LD, $1)="$LD" 8427b9b4fd27Smrg 8428af9a7ee5Smrg ## CAVEAT EMPTOR: 8429af9a7ee5Smrg ## There is no encapsulation within the following macros, do not change 8430af9a7ee5Smrg ## the running order or otherwise move them around unless you know exactly 8431af9a7ee5Smrg ## what you are doing... 8432af9a7ee5Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8433af9a7ee5Smrg _LT_COMPILER_PIC($1) 8434af9a7ee5Smrg _LT_COMPILER_C_O($1) 8435af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 8436af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 8437af9a7ee5Smrg _LT_SYS_DYNAMIC_LINKER($1) 8438af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8439b9b4fd27Smrg 8440af9a7ee5Smrg _LT_CONFIG($1) 8441af9a7ee5Smrg fi # test -n "$compiler" 8442b9b4fd27Smrg 8443af9a7ee5Smrg GCC=$lt_save_GCC 8444af9a7ee5Smrg CC=$lt_save_CC 8445af9a7ee5Smrg CFLAGS=$lt_save_CFLAGS 8446af9a7ee5Smrgfi # test "$_lt_disable_FC" != yes 8447af9a7ee5Smrg 8448af9a7ee5SmrgAC_LANG_POP 8449af9a7ee5Smrg])# _LT_LANG_FC_CONFIG 8450af9a7ee5Smrg 8451af9a7ee5Smrg 8452af9a7ee5Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 8453af9a7ee5Smrg# -------------------------- 8454af9a7ee5Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8455af9a7ee5Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8456af9a7ee5Smrg# to write the compiler configuration to `libtool'. 8457af9a7ee5Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 8458af9a7ee5Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8459af9a7ee5SmrgAC_LANG_SAVE 8460af9a7ee5Smrg 8461af9a7ee5Smrg# Source file extension for Java test sources. 8462af9a7ee5Smrgac_ext=java 8463af9a7ee5Smrg 8464af9a7ee5Smrg# Object file extension for compiled Java test sources. 8465af9a7ee5Smrgobjext=o 8466af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 8467af9a7ee5Smrg 8468af9a7ee5Smrg# Code to be used in simple compile tests 8469af9a7ee5Smrglt_simple_compile_test_code="class foo {}" 8470af9a7ee5Smrg 8471af9a7ee5Smrg# Code to be used in simple link tests 8472af9a7ee5Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8473b9b4fd27Smrg 8474af9a7ee5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8475af9a7ee5Smrg_LT_TAG_COMPILER 8476b9b4fd27Smrg 8477af9a7ee5Smrg# save warnings/boilerplate of simple test code 8478af9a7ee5Smrg_LT_COMPILER_BOILERPLATE 8479af9a7ee5Smrg_LT_LINKER_BOILERPLATE 8480b9b4fd27Smrg 8481af9a7ee5Smrg# Allow CC to be a program name with arguments. 8482af9a7ee5Smrglt_save_CC=$CC 8483af9a7ee5Smrglt_save_CFLAGS=$CFLAGS 8484af9a7ee5Smrglt_save_GCC=$GCC 8485af9a7ee5SmrgGCC=yes 8486af9a7ee5SmrgCC=${GCJ-"gcj"} 8487af9a7ee5SmrgCFLAGS=$GCJFLAGS 8488af9a7ee5Smrgcompiler=$CC 8489af9a7ee5Smrg_LT_TAGVAR(compiler, $1)=$CC 8490af9a7ee5Smrg_LT_TAGVAR(LD, $1)="$LD" 8491af9a7ee5Smrg_LT_CC_BASENAME([$compiler]) 8492b9b4fd27Smrg 8493af9a7ee5Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8494af9a7ee5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8495b9b4fd27Smrg 8496af9a7ee5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8497af9a7ee5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8498af9a7ee5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8499b9b4fd27Smrg 8500af9a7ee5Smrgif test -n "$compiler"; then 8501af9a7ee5Smrg _LT_COMPILER_NO_RTTI($1) 8502af9a7ee5Smrg _LT_COMPILER_PIC($1) 8503af9a7ee5Smrg _LT_COMPILER_C_O($1) 8504af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 8505af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 8506af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8507b9b4fd27Smrg 8508af9a7ee5Smrg _LT_CONFIG($1) 8509af9a7ee5Smrgfi 8510b9b4fd27Smrg 8511af9a7ee5SmrgAC_LANG_RESTORE 8512b9b4fd27Smrg 8513af9a7ee5SmrgGCC=$lt_save_GCC 8514af9a7ee5SmrgCC=$lt_save_CC 8515af9a7ee5SmrgCFLAGS=$lt_save_CFLAGS 8516af9a7ee5Smrg])# _LT_LANG_GCJ_CONFIG 8517b9b4fd27Smrg 8518b9b4fd27Smrg 8519af9a7ee5Smrg# _LT_LANG_GO_CONFIG([TAG]) 8520af9a7ee5Smrg# -------------------------- 8521af9a7ee5Smrg# Ensure that the configuration variables for the GNU Go compiler 8522af9a7ee5Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8523af9a7ee5Smrg# to write the compiler configuration to `libtool'. 8524af9a7ee5Smrgm4_defun([_LT_LANG_GO_CONFIG], 8525af9a7ee5Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8526af9a7ee5SmrgAC_LANG_SAVE 8527b9b4fd27Smrg 8528af9a7ee5Smrg# Source file extension for Go test sources. 8529af9a7ee5Smrgac_ext=go 8530b9b4fd27Smrg 8531af9a7ee5Smrg# Object file extension for compiled Go test sources. 8532af9a7ee5Smrgobjext=o 8533af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 8534af9a7ee5Smrg 8535af9a7ee5Smrg# Code to be used in simple compile tests 8536af9a7ee5Smrglt_simple_compile_test_code="package main; func main() { }" 8537af9a7ee5Smrg 8538af9a7ee5Smrg# Code to be used in simple link tests 8539af9a7ee5Smrglt_simple_link_test_code='package main; func main() { }' 8540af9a7ee5Smrg 8541af9a7ee5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8542af9a7ee5Smrg_LT_TAG_COMPILER 8543af9a7ee5Smrg 8544af9a7ee5Smrg# save warnings/boilerplate of simple test code 8545af9a7ee5Smrg_LT_COMPILER_BOILERPLATE 8546af9a7ee5Smrg_LT_LINKER_BOILERPLATE 8547af9a7ee5Smrg 8548af9a7ee5Smrg# Allow CC to be a program name with arguments. 8549af9a7ee5Smrglt_save_CC=$CC 8550af9a7ee5Smrglt_save_CFLAGS=$CFLAGS 8551af9a7ee5Smrglt_save_GCC=$GCC 8552af9a7ee5SmrgGCC=yes 8553af9a7ee5SmrgCC=${GOC-"gccgo"} 8554af9a7ee5SmrgCFLAGS=$GOFLAGS 8555af9a7ee5Smrgcompiler=$CC 8556af9a7ee5Smrg_LT_TAGVAR(compiler, $1)=$CC 8557af9a7ee5Smrg_LT_TAGVAR(LD, $1)="$LD" 8558af9a7ee5Smrg_LT_CC_BASENAME([$compiler]) 8559af9a7ee5Smrg 8560af9a7ee5Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8561af9a7ee5Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8562af9a7ee5Smrg 8563af9a7ee5Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8564af9a7ee5Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8565af9a7ee5Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8566af9a7ee5Smrg 8567af9a7ee5Smrgif test -n "$compiler"; then 8568af9a7ee5Smrg _LT_COMPILER_NO_RTTI($1) 8569af9a7ee5Smrg _LT_COMPILER_PIC($1) 8570af9a7ee5Smrg _LT_COMPILER_C_O($1) 8571af9a7ee5Smrg _LT_COMPILER_FILE_LOCKS($1) 8572af9a7ee5Smrg _LT_LINKER_SHLIBS($1) 8573af9a7ee5Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8574b9b4fd27Smrg 8575af9a7ee5Smrg _LT_CONFIG($1) 8576af9a7ee5Smrgfi 8577b9b4fd27Smrg 8578af9a7ee5SmrgAC_LANG_RESTORE 8579b9b4fd27Smrg 8580af9a7ee5SmrgGCC=$lt_save_GCC 8581af9a7ee5SmrgCC=$lt_save_CC 8582af9a7ee5SmrgCFLAGS=$lt_save_CFLAGS 8583af9a7ee5Smrg])# _LT_LANG_GO_CONFIG 8584b9b4fd27Smrg 8585b9b4fd27Smrg 8586af9a7ee5Smrg# _LT_LANG_RC_CONFIG([TAG]) 8587af9a7ee5Smrg# ------------------------- 8588af9a7ee5Smrg# Ensure that the configuration variables for the Windows resource compiler 8589af9a7ee5Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8590af9a7ee5Smrg# to write the compiler configuration to `libtool'. 8591af9a7ee5Smrgm4_defun([_LT_LANG_RC_CONFIG], 8592af9a7ee5Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8593af9a7ee5SmrgAC_LANG_SAVE 8594b9b4fd27Smrg 8595af9a7ee5Smrg# Source file extension for RC test sources. 8596af9a7ee5Smrgac_ext=rc 8597b9b4fd27Smrg 8598af9a7ee5Smrg# Object file extension for compiled RC test sources. 8599af9a7ee5Smrgobjext=o 8600af9a7ee5Smrg_LT_TAGVAR(objext, $1)=$objext 8601b9b4fd27Smrg 8602af9a7ee5Smrg# Code to be used in simple compile tests 8603af9a7ee5Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8604b9b4fd27Smrg 8605af9a7ee5Smrg# Code to be used in simple link tests 8606af9a7ee5Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8607b9b4fd27Smrg 8608af9a7ee5Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8609af9a7ee5Smrg_LT_TAG_COMPILER 8610b9b4fd27Smrg 8611af9a7ee5Smrg# save warnings/boilerplate of simple test code 8612af9a7ee5Smrg_LT_COMPILER_BOILERPLATE 8613af9a7ee5Smrg_LT_LINKER_BOILERPLATE 8614b9b4fd27Smrg 8615af9a7ee5Smrg# Allow CC to be a program name with arguments. 8616af9a7ee5Smrglt_save_CC="$CC" 8617af9a7ee5Smrglt_save_CFLAGS=$CFLAGS 8618af9a7ee5Smrglt_save_GCC=$GCC 8619af9a7ee5SmrgGCC= 8620af9a7ee5SmrgCC=${RC-"windres"} 8621af9a7ee5SmrgCFLAGS= 8622af9a7ee5Smrgcompiler=$CC 8623af9a7ee5Smrg_LT_TAGVAR(compiler, $1)=$CC 8624af9a7ee5Smrg_LT_CC_BASENAME([$compiler]) 8625af9a7ee5Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8626b9b4fd27Smrg 8627af9a7ee5Smrgif test -n "$compiler"; then 8628af9a7ee5Smrg : 8629af9a7ee5Smrg _LT_CONFIG($1) 8630af9a7ee5Smrgfi 8631b9b4fd27Smrg 8632af9a7ee5SmrgGCC=$lt_save_GCC 8633af9a7ee5SmrgAC_LANG_RESTORE 8634af9a7ee5SmrgCC=$lt_save_CC 8635af9a7ee5SmrgCFLAGS=$lt_save_CFLAGS 8636af9a7ee5Smrg])# _LT_LANG_RC_CONFIG 8637b9b4fd27Smrg 8638b9b4fd27Smrg 8639af9a7ee5Smrg# LT_PROG_GCJ 8640af9a7ee5Smrg# ----------- 8641af9a7ee5SmrgAC_DEFUN([LT_PROG_GCJ], 8642af9a7ee5Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8643af9a7ee5Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8644af9a7ee5Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8645af9a7ee5Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8646af9a7ee5Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8647af9a7ee5Smrg]) 8648b9b4fd27Smrg 8649af9a7ee5Smrg# Old name: 8650af9a7ee5SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8651af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 8652af9a7ee5Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8653b9b4fd27Smrg 8654b9b4fd27Smrg 8655af9a7ee5Smrg# LT_PROG_GO 8656af9a7ee5Smrg# ---------- 8657af9a7ee5SmrgAC_DEFUN([LT_PROG_GO], 8658af9a7ee5Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8659af9a7ee5Smrg]) 8660b9b4fd27Smrg 8661b9b4fd27Smrg 8662af9a7ee5Smrg# LT_PROG_RC 8663af9a7ee5Smrg# ---------- 8664af9a7ee5SmrgAC_DEFUN([LT_PROG_RC], 8665af9a7ee5Smrg[AC_CHECK_TOOL(RC, windres,) 8666af9a7ee5Smrg]) 8667b9b4fd27Smrg 8668af9a7ee5Smrg# Old name: 8669af9a7ee5SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8670af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 8671af9a7ee5Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8672b9b4fd27Smrg 8673b9b4fd27Smrg 8674af9a7ee5Smrg# _LT_DECL_EGREP 8675af9a7ee5Smrg# -------------- 8676af9a7ee5Smrg# If we don't have a new enough Autoconf to choose the best grep 8677af9a7ee5Smrg# available, choose the one first in the user's PATH. 8678af9a7ee5Smrgm4_defun([_LT_DECL_EGREP], 8679af9a7ee5Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8680af9a7ee5SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8681af9a7ee5Smrgtest -z "$GREP" && GREP=grep 8682af9a7ee5Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8683af9a7ee5Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8684af9a7ee5Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8685af9a7ee5Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8686af9a7ee5SmrgAC_SUBST([GREP]) 8687af9a7ee5Smrg]) 8688b9b4fd27Smrg 8689b9b4fd27Smrg 8690af9a7ee5Smrg# _LT_DECL_OBJDUMP 8691af9a7ee5Smrg# -------------- 8692af9a7ee5Smrg# If we don't have a new enough Autoconf to choose the best objdump 8693af9a7ee5Smrg# available, choose the one first in the user's PATH. 8694af9a7ee5Smrgm4_defun([_LT_DECL_OBJDUMP], 8695af9a7ee5Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8696af9a7ee5Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8697af9a7ee5Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8698af9a7ee5SmrgAC_SUBST([OBJDUMP]) 8699af9a7ee5Smrg]) 8700b9b4fd27Smrg 8701af9a7ee5Smrg# _LT_DECL_DLLTOOL 8702af9a7ee5Smrg# ---------------- 8703af9a7ee5Smrg# Ensure DLLTOOL variable is set. 8704af9a7ee5Smrgm4_defun([_LT_DECL_DLLTOOL], 8705af9a7ee5Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8706af9a7ee5Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8707af9a7ee5Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8708af9a7ee5SmrgAC_SUBST([DLLTOOL]) 8709af9a7ee5Smrg]) 8710b9b4fd27Smrg 8711af9a7ee5Smrg# _LT_DECL_SED 8712af9a7ee5Smrg# ------------ 8713af9a7ee5Smrg# Check for a fully-functional sed program, that truncates 8714af9a7ee5Smrg# as few characters as possible. Prefer GNU sed if found. 8715af9a7ee5Smrgm4_defun([_LT_DECL_SED], 8716af9a7ee5Smrg[AC_PROG_SED 8717af9a7ee5Smrgtest -z "$SED" && SED=sed 8718af9a7ee5SmrgXsed="$SED -e 1s/^X//" 8719af9a7ee5Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8720af9a7ee5Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8721af9a7ee5Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8722af9a7ee5Smrg])# _LT_DECL_SED 8723b9b4fd27Smrg 8724af9a7ee5Smrgm4_ifndef([AC_PROG_SED], [ 8725af9a7ee5Smrg# NOTE: This macro has been submitted for inclusion into # 8726af9a7ee5Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8727af9a7ee5Smrg# a released version of Autoconf we should remove this # 8728af9a7ee5Smrg# macro and use it instead. # 8729b9b4fd27Smrg 8730af9a7ee5Smrgm4_defun([AC_PROG_SED], 8731af9a7ee5Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8732af9a7ee5SmrgAC_CACHE_VAL(lt_cv_path_SED, 8733af9a7ee5Smrg[# Loop through the user's path and test for sed and gsed. 8734af9a7ee5Smrg# Then use that list of sed's as ones to test for truncation. 8735af9a7ee5Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8736af9a7ee5Smrgfor as_dir in $PATH 8737af9a7ee5Smrgdo 8738af9a7ee5Smrg IFS=$as_save_IFS 8739af9a7ee5Smrg test -z "$as_dir" && as_dir=. 8740af9a7ee5Smrg for lt_ac_prog in sed gsed; do 8741af9a7ee5Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8742af9a7ee5Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8743af9a7ee5Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8744af9a7ee5Smrg fi 8745af9a7ee5Smrg done 8746af9a7ee5Smrg done 8747af9a7ee5Smrgdone 8748af9a7ee5SmrgIFS=$as_save_IFS 8749af9a7ee5Smrglt_ac_max=0 8750af9a7ee5Smrglt_ac_count=0 8751af9a7ee5Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8752af9a7ee5Smrg# along with /bin/sed that truncates output. 8753af9a7ee5Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8754af9a7ee5Smrg test ! -f $lt_ac_sed && continue 8755af9a7ee5Smrg cat /dev/null > conftest.in 8756af9a7ee5Smrg lt_ac_count=0 8757af9a7ee5Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8758af9a7ee5Smrg # Check for GNU sed and select it if it is found. 8759af9a7ee5Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8760af9a7ee5Smrg lt_cv_path_SED=$lt_ac_sed 8761af9a7ee5Smrg break 8762af9a7ee5Smrg fi 8763af9a7ee5Smrg while true; do 8764af9a7ee5Smrg cat conftest.in conftest.in >conftest.tmp 8765af9a7ee5Smrg mv conftest.tmp conftest.in 8766af9a7ee5Smrg cp conftest.in conftest.nl 8767af9a7ee5Smrg echo >>conftest.nl 8768af9a7ee5Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8769af9a7ee5Smrg cmp -s conftest.out conftest.nl || break 8770af9a7ee5Smrg # 10000 chars as input seems more than enough 8771af9a7ee5Smrg test $lt_ac_count -gt 10 && break 8772af9a7ee5Smrg lt_ac_count=`expr $lt_ac_count + 1` 8773af9a7ee5Smrg if test $lt_ac_count -gt $lt_ac_max; then 8774af9a7ee5Smrg lt_ac_max=$lt_ac_count 8775af9a7ee5Smrg lt_cv_path_SED=$lt_ac_sed 8776af9a7ee5Smrg fi 8777af9a7ee5Smrg done 8778af9a7ee5Smrgdone 8779af9a7ee5Smrg]) 8780af9a7ee5SmrgSED=$lt_cv_path_SED 8781af9a7ee5SmrgAC_SUBST([SED]) 8782af9a7ee5SmrgAC_MSG_RESULT([$SED]) 8783af9a7ee5Smrg])#AC_PROG_SED 8784af9a7ee5Smrg])#m4_ifndef 8785b9b4fd27Smrg 8786af9a7ee5Smrg# Old name: 8787af9a7ee5SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8788af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 8789af9a7ee5Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8790caade7ccSmrg 8791b9b4fd27Smrg 8792af9a7ee5Smrg# _LT_CHECK_SHELL_FEATURES 8793af9a7ee5Smrg# ------------------------ 8794af9a7ee5Smrg# Find out whether the shell is Bourne or XSI compatible, 8795af9a7ee5Smrg# or has some other useful features. 8796af9a7ee5Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8797af9a7ee5Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8798af9a7ee5Smrg# Try some XSI features 8799af9a7ee5Smrgxsi_shell=no 8800af9a7ee5Smrg( _lt_dummy="a/b/c" 8801af9a7ee5Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8802af9a7ee5Smrg = c,a/b,b/c, \ 8803af9a7ee5Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 8804af9a7ee5Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8805af9a7ee5Smrg && xsi_shell=yes 8806af9a7ee5SmrgAC_MSG_RESULT([$xsi_shell]) 8807af9a7ee5Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8808af9a7ee5Smrg 8809af9a7ee5SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 8810af9a7ee5Smrglt_shell_append=no 8811af9a7ee5Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8812af9a7ee5Smrg >/dev/null 2>&1 \ 8813af9a7ee5Smrg && lt_shell_append=yes 8814af9a7ee5SmrgAC_MSG_RESULT([$lt_shell_append]) 8815af9a7ee5Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8816af9a7ee5Smrg 8817af9a7ee5Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8818af9a7ee5Smrg lt_unset=unset 8819af9a7ee5Smrgelse 8820af9a7ee5Smrg lt_unset=false 8821af9a7ee5Smrgfi 8822af9a7ee5Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8823af9a7ee5Smrg 8824af9a7ee5Smrg# test EBCDIC or ASCII 8825af9a7ee5Smrgcase `echo X|tr X '\101'` in 8826af9a7ee5Smrg A) # ASCII based system 8827af9a7ee5Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8828af9a7ee5Smrg lt_SP2NL='tr \040 \012' 8829af9a7ee5Smrg lt_NL2SP='tr \015\012 \040\040' 8830af9a7ee5Smrg ;; 8831af9a7ee5Smrg *) # EBCDIC based system 8832af9a7ee5Smrg lt_SP2NL='tr \100 \n' 8833af9a7ee5Smrg lt_NL2SP='tr \r\n \100\100' 8834af9a7ee5Smrg ;; 8835af9a7ee5Smrgesac 8836af9a7ee5Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8837af9a7ee5Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8838af9a7ee5Smrg])# _LT_CHECK_SHELL_FEATURES 8839b9b4fd27Smrg 8840b9b4fd27Smrg 8841af9a7ee5Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8842af9a7ee5Smrg# ------------------------------------------------------ 8843af9a7ee5Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8844af9a7ee5Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8845af9a7ee5Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 8846af9a7ee5Smrg[dnl { 8847af9a7ee5Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 8848af9a7ee5Smrg$1 ()\ 8849af9a7ee5Smrg{\ 8850af9a7ee5Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8851af9a7ee5Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8852af9a7ee5Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 8853af9a7ee5Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8854af9a7ee5Smrgtest 0 -eq $? || _lt_function_replace_fail=: 8855af9a7ee5Smrg]) 8856b9b4fd27Smrg 8857b9b4fd27Smrg 8858af9a7ee5Smrg# _LT_PROG_REPLACE_SHELLFNS 8859af9a7ee5Smrg# ------------------------- 8860af9a7ee5Smrg# Replace existing portable implementations of several shell functions with 8861af9a7ee5Smrg# equivalent extended shell implementations where those features are available.. 8862af9a7ee5Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 8863af9a7ee5Smrg[if test x"$xsi_shell" = xyes; then 8864af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8865af9a7ee5Smrg case ${1} in 8866af9a7ee5Smrg */*) func_dirname_result="${1%/*}${2}" ;; 8867af9a7ee5Smrg * ) func_dirname_result="${3}" ;; 8868af9a7ee5Smrg esac]) 8869b9b4fd27Smrg 8870af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8871af9a7ee5Smrg func_basename_result="${1##*/}"]) 8872b9b4fd27Smrg 8873af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8874af9a7ee5Smrg case ${1} in 8875af9a7ee5Smrg */*) func_dirname_result="${1%/*}${2}" ;; 8876af9a7ee5Smrg * ) func_dirname_result="${3}" ;; 8877af9a7ee5Smrg esac 8878af9a7ee5Smrg func_basename_result="${1##*/}"]) 8879a5602400Smrg 8880af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8881af9a7ee5Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8882af9a7ee5Smrg # positional parameters, so assign one to ordinary parameter first. 8883af9a7ee5Smrg func_stripname_result=${3} 8884af9a7ee5Smrg func_stripname_result=${func_stripname_result#"${1}"} 8885af9a7ee5Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 8886b9b4fd27Smrg 8887af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 8888af9a7ee5Smrg func_split_long_opt_name=${1%%=*} 8889af9a7ee5Smrg func_split_long_opt_arg=${1#*=}]) 8890a5602400Smrg 8891af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 8892af9a7ee5Smrg func_split_short_opt_arg=${1#??} 8893af9a7ee5Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8894a5602400Smrg 8895af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 8896af9a7ee5Smrg case ${1} in 8897af9a7ee5Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 8898af9a7ee5Smrg *) func_lo2o_result=${1} ;; 8899af9a7ee5Smrg esac]) 8900b9b4fd27Smrg 8901af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8902b9b4fd27Smrg 8903af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8904b9b4fd27Smrg 8905af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8906af9a7ee5Smrgfi 8907b9b4fd27Smrg 8908af9a7ee5Smrgif test x"$lt_shell_append" = xyes; then 8909af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8910b9b4fd27Smrg 8911af9a7ee5Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 8912af9a7ee5Smrg func_quote_for_eval "${2}" 8913af9a7ee5Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 8914af9a7ee5Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8915b9b4fd27Smrg 8916af9a7ee5Smrg # Save a `func_append' function call where possible by direct use of '+=' 8917af9a7ee5Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 8918af9a7ee5Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 8919af9a7ee5Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8920af9a7ee5Smrg test 0 -eq $? || _lt_function_replace_fail=: 8921af9a7ee5Smrgelse 8922af9a7ee5Smrg # Save a `func_append' function call even when '+=' is not available 8923af9a7ee5Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 8924af9a7ee5Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 8925af9a7ee5Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8926af9a7ee5Smrg test 0 -eq $? || _lt_function_replace_fail=: 8927af9a7ee5Smrgfi 8928caade7ccSmrg 8929af9a7ee5Smrgif test x"$_lt_function_replace_fail" = x":"; then 8930af9a7ee5Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 8931af9a7ee5Smrgfi 8932af9a7ee5Smrg]) 8933caade7ccSmrg 8934af9a7ee5Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8935af9a7ee5Smrg# ----------------------------- 8936af9a7ee5Smrg# Determine which file name conversion functions should be used by 8937af9a7ee5Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8938af9a7ee5Smrg# for certain cross-compile configurations and native mingw. 8939af9a7ee5Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8940af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8941af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8942af9a7ee5SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8943af9a7ee5SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8944af9a7ee5Smrg[case $host in 8945af9a7ee5Smrg *-*-mingw* ) 8946af9a7ee5Smrg case $build in 8947af9a7ee5Smrg *-*-mingw* ) # actually msys 8948af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8949af9a7ee5Smrg ;; 8950af9a7ee5Smrg *-*-cygwin* ) 8951af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8952af9a7ee5Smrg ;; 8953af9a7ee5Smrg * ) # otherwise, assume *nix 8954af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8955af9a7ee5Smrg ;; 8956b9b4fd27Smrg esac 8957af9a7ee5Smrg ;; 8958af9a7ee5Smrg *-*-cygwin* ) 8959af9a7ee5Smrg case $build in 8960af9a7ee5Smrg *-*-mingw* ) # actually msys 8961af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8962af9a7ee5Smrg ;; 8963af9a7ee5Smrg *-*-cygwin* ) 8964af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8965af9a7ee5Smrg ;; 8966af9a7ee5Smrg * ) # otherwise, assume *nix 8967af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8968af9a7ee5Smrg ;; 8969af9a7ee5Smrg esac 8970af9a7ee5Smrg ;; 8971af9a7ee5Smrg * ) # unhandled hosts (and "normal" native builds) 8972af9a7ee5Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8973af9a7ee5Smrg ;; 8974af9a7ee5Smrgesac 8975af9a7ee5Smrg]) 8976af9a7ee5Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8977af9a7ee5SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8978af9a7ee5Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8979af9a7ee5Smrg [0], [convert $build file names to $host format])dnl 8980caade7ccSmrg 8981af9a7ee5SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8982af9a7ee5SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8983af9a7ee5Smrg[#assume ordinary cross tools, or native build. 8984af9a7ee5Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8985af9a7ee5Smrgcase $host in 8986af9a7ee5Smrg *-*-mingw* ) 8987af9a7ee5Smrg case $build in 8988af9a7ee5Smrg *-*-mingw* ) # actually msys 8989af9a7ee5Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8990af9a7ee5Smrg ;; 8991af9a7ee5Smrg esac 8992af9a7ee5Smrg ;; 8993af9a7ee5Smrgesac 8994af9a7ee5Smrg]) 8995af9a7ee5Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8996af9a7ee5SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8997af9a7ee5Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8998af9a7ee5Smrg [0], [convert $build files to toolchain format])dnl 8999af9a7ee5Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 9000caade7ccSmrg 9001af9a7ee5Smrg# Helper functions for option handling. -*- Autoconf -*- 9002af9a7ee5Smrg# 9003af9a7ee5Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9004af9a7ee5Smrg# Inc. 9005af9a7ee5Smrg# Written by Gary V. Vaughan, 2004 9006af9a7ee5Smrg# 9007af9a7ee5Smrg# This file is free software; the Free Software Foundation gives 9008af9a7ee5Smrg# unlimited permission to copy and/or distribute it, with or without 9009af9a7ee5Smrg# modifications, as long as this notice is preserved. 9010caade7ccSmrg 9011af9a7ee5Smrg# serial 7 ltoptions.m4 9012caade7ccSmrg 9013af9a7ee5Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9014af9a7ee5SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9015caade7ccSmrg 9016caade7ccSmrg 9017af9a7ee5Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9018af9a7ee5Smrg# ------------------------------------------ 9019af9a7ee5Smrgm4_define([_LT_MANGLE_OPTION], 9020af9a7ee5Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9021caade7ccSmrg 9022caade7ccSmrg 9023af9a7ee5Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9024af9a7ee5Smrg# --------------------------------------- 9025af9a7ee5Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9026af9a7ee5Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9027af9a7ee5Smrg# saved as a flag. 9028af9a7ee5Smrgm4_define([_LT_SET_OPTION], 9029af9a7ee5Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9030af9a7ee5Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9031af9a7ee5Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9032af9a7ee5Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9033b9b4fd27Smrg]) 9034caade7ccSmrg 9035b9b4fd27Smrg 9036af9a7ee5Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9037af9a7ee5Smrg# ------------------------------------------------------------ 9038af9a7ee5Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9039af9a7ee5Smrgm4_define([_LT_IF_OPTION], 9040af9a7ee5Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9041b9b4fd27Smrg 9042b9b4fd27Smrg 9043af9a7ee5Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9044af9a7ee5Smrg# ------------------------------------------------------- 9045af9a7ee5Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9046af9a7ee5Smrg# are set. 9047af9a7ee5Smrgm4_define([_LT_UNLESS_OPTIONS], 9048af9a7ee5Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9049af9a7ee5Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9050af9a7ee5Smrg [m4_define([$0_found])])])[]dnl 9051af9a7ee5Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9052af9a7ee5Smrg])[]dnl 9053af9a7ee5Smrg]) 9054af9a7ee5Smrg 9055af9a7ee5Smrg 9056af9a7ee5Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9057af9a7ee5Smrg# ---------------------------------------- 9058af9a7ee5Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9059af9a7ee5Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9060af9a7ee5Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9061af9a7ee5Smrg# the unknown option and exit. 9062af9a7ee5Smrgm4_defun([_LT_SET_OPTIONS], 9063af9a7ee5Smrg[# Set options 9064af9a7ee5Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9065af9a7ee5Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9066af9a7ee5Smrg 9067af9a7ee5Smrgm4_if([$1],[LT_INIT],[ 9068af9a7ee5Smrg dnl 9069af9a7ee5Smrg dnl Simply set some default values (i.e off) if boolean options were not 9070af9a7ee5Smrg dnl specified: 9071af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9072af9a7ee5Smrg ]) 9073af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9074af9a7ee5Smrg ]) 9075af9a7ee5Smrg dnl 9076af9a7ee5Smrg dnl If no reference was made to various pairs of opposing options, then 9077af9a7ee5Smrg dnl we run the default mode handler for the pair. For example, if neither 9078af9a7ee5Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9079af9a7ee5Smrg dnl archives by default: 9080af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9081af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9082af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9083af9a7ee5Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9084af9a7ee5Smrg [_LT_ENABLE_FAST_INSTALL]) 9085af9a7ee5Smrg ]) 9086af9a7ee5Smrg])# _LT_SET_OPTIONS 9087b9b4fd27Smrg 9088b9b4fd27Smrg 9089b9b4fd27Smrg 9090af9a7ee5Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9091af9a7ee5Smrg# ----------------------------------------- 9092af9a7ee5Smrgm4_define([_LT_MANGLE_DEFUN], 9093af9a7ee5Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9094b9b4fd27Smrg 9095b9b4fd27Smrg 9096af9a7ee5Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9097af9a7ee5Smrg# ----------------------------------------------- 9098af9a7ee5Smrgm4_define([LT_OPTION_DEFINE], 9099af9a7ee5Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9100af9a7ee5Smrg])# LT_OPTION_DEFINE 9101b9b4fd27Smrg 9102b9b4fd27Smrg 9103af9a7ee5Smrg# dlopen 9104af9a7ee5Smrg# ------ 9105af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9106af9a7ee5Smrg]) 9107b9b4fd27Smrg 9108af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9109af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9110af9a7ee5SmrgAC_DIAGNOSE([obsolete], 9111af9a7ee5Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9112af9a7ee5Smrgput the `dlopen' option into LT_INIT's first parameter.]) 9113af9a7ee5Smrg]) 9114b9b4fd27Smrg 9115af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9116af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9117b9b4fd27Smrg 9118b9b4fd27Smrg 9119af9a7ee5Smrg# win32-dll 9120af9a7ee5Smrg# --------- 9121af9a7ee5Smrg# Declare package support for building win32 dll's. 9122af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9123af9a7ee5Smrg[enable_win32_dll=yes 9124b9b4fd27Smrg 9125af9a7ee5Smrgcase $host in 9126af9a7ee5Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9127af9a7ee5Smrg AC_CHECK_TOOL(AS, as, false) 9128af9a7ee5Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9129af9a7ee5Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9130af9a7ee5Smrg ;; 9131af9a7ee5Smrgesac 9132b9b4fd27Smrg 9133af9a7ee5Smrgtest -z "$AS" && AS=as 9134af9a7ee5Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9135b9b4fd27Smrg 9136af9a7ee5Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9137af9a7ee5Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9138b9b4fd27Smrg 9139af9a7ee5Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9140af9a7ee5Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9141af9a7ee5Smrg])# win32-dll 9142af9a7ee5Smrg 9143af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9144af9a7ee5Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9145af9a7ee5Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9146af9a7ee5SmrgAC_DIAGNOSE([obsolete], 9147af9a7ee5Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9148af9a7ee5Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 9149af9a7ee5Smrg]) 9150b9b4fd27Smrg 9151af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9152af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9153b9b4fd27Smrg 9154e8a5466aSmrg 9155af9a7ee5Smrg# _LT_ENABLE_SHARED([DEFAULT]) 9156af9a7ee5Smrg# ---------------------------- 9157af9a7ee5Smrg# implement the --enable-shared flag, and supports the `shared' and 9158af9a7ee5Smrg# `disable-shared' LT_INIT options. 9159af9a7ee5Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9160af9a7ee5Smrgm4_define([_LT_ENABLE_SHARED], 9161af9a7ee5Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9162af9a7ee5SmrgAC_ARG_ENABLE([shared], 9163af9a7ee5Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9164af9a7ee5Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9165af9a7ee5Smrg [p=${PACKAGE-default} 9166af9a7ee5Smrg case $enableval in 9167af9a7ee5Smrg yes) enable_shared=yes ;; 9168af9a7ee5Smrg no) enable_shared=no ;; 9169af9a7ee5Smrg *) 9170af9a7ee5Smrg enable_shared=no 9171af9a7ee5Smrg # Look at the argument we got. We use all the common list separators. 9172af9a7ee5Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9173af9a7ee5Smrg for pkg in $enableval; do 9174af9a7ee5Smrg IFS="$lt_save_ifs" 9175af9a7ee5Smrg if test "X$pkg" = "X$p"; then 9176af9a7ee5Smrg enable_shared=yes 9177af9a7ee5Smrg fi 9178af9a7ee5Smrg done 9179af9a7ee5Smrg IFS="$lt_save_ifs" 9180af9a7ee5Smrg ;; 9181af9a7ee5Smrg esac], 9182af9a7ee5Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9183b9b4fd27Smrg 9184af9a7ee5Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9185af9a7ee5Smrg [Whether or not to build shared libraries]) 9186af9a7ee5Smrg])# _LT_ENABLE_SHARED 9187b9b4fd27Smrg 9188af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9189af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9190b9b4fd27Smrg 9191af9a7ee5Smrg# Old names: 9192af9a7ee5SmrgAC_DEFUN([AC_ENABLE_SHARED], 9193af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9194af9a7ee5Smrg]) 9195b9b4fd27Smrg 9196af9a7ee5SmrgAC_DEFUN([AC_DISABLE_SHARED], 9197af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9198af9a7ee5Smrg]) 9199b9b4fd27Smrg 9200af9a7ee5SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9201af9a7ee5SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9202b9b4fd27Smrg 9203af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9204af9a7ee5Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9205af9a7ee5Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9206af9a7ee5Smrg 9207af9a7ee5Smrg 9208af9a7ee5Smrg 9209af9a7ee5Smrg# _LT_ENABLE_STATIC([DEFAULT]) 9210af9a7ee5Smrg# ---------------------------- 9211af9a7ee5Smrg# implement the --enable-static flag, and support the `static' and 9212af9a7ee5Smrg# `disable-static' LT_INIT options. 9213af9a7ee5Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9214af9a7ee5Smrgm4_define([_LT_ENABLE_STATIC], 9215af9a7ee5Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9216af9a7ee5SmrgAC_ARG_ENABLE([static], 9217af9a7ee5Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9218af9a7ee5Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9219af9a7ee5Smrg [p=${PACKAGE-default} 9220af9a7ee5Smrg case $enableval in 9221af9a7ee5Smrg yes) enable_static=yes ;; 9222af9a7ee5Smrg no) enable_static=no ;; 9223af9a7ee5Smrg *) 9224af9a7ee5Smrg enable_static=no 9225af9a7ee5Smrg # Look at the argument we got. We use all the common list separators. 9226af9a7ee5Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9227af9a7ee5Smrg for pkg in $enableval; do 9228af9a7ee5Smrg IFS="$lt_save_ifs" 9229af9a7ee5Smrg if test "X$pkg" = "X$p"; then 9230af9a7ee5Smrg enable_static=yes 9231af9a7ee5Smrg fi 9232af9a7ee5Smrg done 9233af9a7ee5Smrg IFS="$lt_save_ifs" 9234af9a7ee5Smrg ;; 9235af9a7ee5Smrg esac], 9236af9a7ee5Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9237b9b4fd27Smrg 9238af9a7ee5Smrg _LT_DECL([build_old_libs], [enable_static], [0], 9239af9a7ee5Smrg [Whether or not to build static libraries]) 9240af9a7ee5Smrg])# _LT_ENABLE_STATIC 9241b9b4fd27Smrg 9242af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9243af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9244b9b4fd27Smrg 9245af9a7ee5Smrg# Old names: 9246af9a7ee5SmrgAC_DEFUN([AC_ENABLE_STATIC], 9247af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9248af9a7ee5Smrg]) 9249b9b4fd27Smrg 9250af9a7ee5SmrgAC_DEFUN([AC_DISABLE_STATIC], 9251af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9252af9a7ee5Smrg]) 9253b9b4fd27Smrg 9254af9a7ee5SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9255af9a7ee5SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9256b9b4fd27Smrg 9257af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9258af9a7ee5Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9259af9a7ee5Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9260b9b4fd27Smrg 9261b9b4fd27Smrg 9262b9b4fd27Smrg 9263af9a7ee5Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9264af9a7ee5Smrg# ---------------------------------- 9265af9a7ee5Smrg# implement the --enable-fast-install flag, and support the `fast-install' 9266af9a7ee5Smrg# and `disable-fast-install' LT_INIT options. 9267af9a7ee5Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9268af9a7ee5Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 9269af9a7ee5Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9270af9a7ee5SmrgAC_ARG_ENABLE([fast-install], 9271af9a7ee5Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9272af9a7ee5Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9273af9a7ee5Smrg [p=${PACKAGE-default} 9274af9a7ee5Smrg case $enableval in 9275af9a7ee5Smrg yes) enable_fast_install=yes ;; 9276af9a7ee5Smrg no) enable_fast_install=no ;; 9277af9a7ee5Smrg *) 9278af9a7ee5Smrg enable_fast_install=no 9279af9a7ee5Smrg # Look at the argument we got. We use all the common list separators. 9280af9a7ee5Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9281af9a7ee5Smrg for pkg in $enableval; do 9282af9a7ee5Smrg IFS="$lt_save_ifs" 9283af9a7ee5Smrg if test "X$pkg" = "X$p"; then 9284af9a7ee5Smrg enable_fast_install=yes 9285af9a7ee5Smrg fi 9286af9a7ee5Smrg done 9287af9a7ee5Smrg IFS="$lt_save_ifs" 9288af9a7ee5Smrg ;; 9289af9a7ee5Smrg esac], 9290af9a7ee5Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9291b9b4fd27Smrg 9292af9a7ee5Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 9293af9a7ee5Smrg [Whether or not to optimize for fast installation])dnl 9294af9a7ee5Smrg])# _LT_ENABLE_FAST_INSTALL 9295b9b4fd27Smrg 9296af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9297af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9298b9b4fd27Smrg 9299af9a7ee5Smrg# Old names: 9300af9a7ee5SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9301af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9302af9a7ee5SmrgAC_DIAGNOSE([obsolete], 9303af9a7ee5Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9304af9a7ee5Smrgthe `fast-install' option into LT_INIT's first parameter.]) 9305af9a7ee5Smrg]) 9306b9b4fd27Smrg 9307af9a7ee5SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9308af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9309af9a7ee5SmrgAC_DIAGNOSE([obsolete], 9310af9a7ee5Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9311af9a7ee5Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 9312af9a7ee5Smrg]) 9313b9b4fd27Smrg 9314af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9315af9a7ee5Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9316af9a7ee5Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9317b9b4fd27Smrg 9318b9b4fd27Smrg 9319af9a7ee5Smrg# _LT_WITH_PIC([MODE]) 9320af9a7ee5Smrg# -------------------- 9321af9a7ee5Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9322af9a7ee5Smrg# LT_INIT options. 9323af9a7ee5Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9324af9a7ee5Smrgm4_define([_LT_WITH_PIC], 9325af9a7ee5Smrg[AC_ARG_WITH([pic], 9326af9a7ee5Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9327af9a7ee5Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9328af9a7ee5Smrg [lt_p=${PACKAGE-default} 9329af9a7ee5Smrg case $withval in 9330af9a7ee5Smrg yes|no) pic_mode=$withval ;; 9331af9a7ee5Smrg *) 9332af9a7ee5Smrg pic_mode=default 9333af9a7ee5Smrg # Look at the argument we got. We use all the common list separators. 9334af9a7ee5Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9335af9a7ee5Smrg for lt_pkg in $withval; do 9336af9a7ee5Smrg IFS="$lt_save_ifs" 9337af9a7ee5Smrg if test "X$lt_pkg" = "X$lt_p"; then 9338af9a7ee5Smrg pic_mode=yes 9339af9a7ee5Smrg fi 9340af9a7ee5Smrg done 9341af9a7ee5Smrg IFS="$lt_save_ifs" 9342af9a7ee5Smrg ;; 9343af9a7ee5Smrg esac], 9344af9a7ee5Smrg [pic_mode=default]) 9345b9b4fd27Smrg 9346af9a7ee5Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9347b9b4fd27Smrg 9348af9a7ee5Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9349af9a7ee5Smrg])# _LT_WITH_PIC 9350b9b4fd27Smrg 9351af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9352af9a7ee5SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9353b9b4fd27Smrg 9354af9a7ee5Smrg# Old name: 9355af9a7ee5SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 9356af9a7ee5Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 9357af9a7ee5SmrgAC_DIAGNOSE([obsolete], 9358af9a7ee5Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9359af9a7ee5Smrgput the `pic-only' option into LT_INIT's first parameter.]) 9360af9a7ee5Smrg]) 9361b9b4fd27Smrg 9362af9a7ee5Smrgdnl aclocal-1.4 backwards compatibility: 9363af9a7ee5Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9364caade7ccSmrg 9365caade7ccSmrg 9366af9a7ee5Smrgm4_define([_LTDL_MODE], []) 9367af9a7ee5SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9368af9a7ee5Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 9369af9a7ee5SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 9370af9a7ee5Smrg [m4_define([_LTDL_MODE], [recursive])]) 9371af9a7ee5SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 9372af9a7ee5Smrg [m4_define([_LTDL_MODE], [subproject])]) 9373485f0483Smrg 9374af9a7ee5Smrgm4_define([_LTDL_TYPE], []) 9375af9a7ee5SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 9376af9a7ee5Smrg [m4_define([_LTDL_TYPE], [installable])]) 9377af9a7ee5SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 9378af9a7ee5Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9379caade7ccSmrg 9380af9a7ee5Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9381af9a7ee5Smrg# 9382af9a7ee5Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9383af9a7ee5Smrg# Written by Gary V. Vaughan, 2004 9384af9a7ee5Smrg# 9385af9a7ee5Smrg# This file is free software; the Free Software Foundation gives 9386af9a7ee5Smrg# unlimited permission to copy and/or distribute it, with or without 9387af9a7ee5Smrg# modifications, as long as this notice is preserved. 9388caade7ccSmrg 9389af9a7ee5Smrg# serial 6 ltsugar.m4 9390caade7ccSmrg 9391af9a7ee5Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9392af9a7ee5SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9393caade7ccSmrg 9394caade7ccSmrg 9395af9a7ee5Smrg# lt_join(SEP, ARG1, [ARG2...]) 9396af9a7ee5Smrg# ----------------------------- 9397af9a7ee5Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9398af9a7ee5Smrg# associated separator. 9399af9a7ee5Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9400af9a7ee5Smrg# versions in m4sugar had bugs. 9401af9a7ee5Smrgm4_define([lt_join], 9402af9a7ee5Smrg[m4_if([$#], [1], [], 9403af9a7ee5Smrg [$#], [2], [[$2]], 9404af9a7ee5Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9405af9a7ee5Smrgm4_define([_lt_join], 9406af9a7ee5Smrg[m4_if([$#$2], [2], [], 9407af9a7ee5Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9408caade7ccSmrg 9409caade7ccSmrg 9410af9a7ee5Smrg# lt_car(LIST) 9411af9a7ee5Smrg# lt_cdr(LIST) 9412af9a7ee5Smrg# ------------ 9413af9a7ee5Smrg# Manipulate m4 lists. 9414af9a7ee5Smrg# These macros are necessary as long as will still need to support 9415af9a7ee5Smrg# Autoconf-2.59 which quotes differently. 9416af9a7ee5Smrgm4_define([lt_car], [[$1]]) 9417af9a7ee5Smrgm4_define([lt_cdr], 9418af9a7ee5Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9419af9a7ee5Smrg [$#], 1, [], 9420af9a7ee5Smrg [m4_dquote(m4_shift($@))])]) 9421af9a7ee5Smrgm4_define([lt_unquote], $1) 9422caade7ccSmrg 9423b9b4fd27Smrg 9424af9a7ee5Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9425af9a7ee5Smrg# ------------------------------------------ 9426af9a7ee5Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9427af9a7ee5Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 9428af9a7ee5Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9429af9a7ee5Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9430af9a7ee5Smrg# than defined and empty). 9431af9a7ee5Smrg# 9432af9a7ee5Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 9433af9a7ee5Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9434af9a7ee5Smrgm4_define([lt_append], 9435af9a7ee5Smrg[m4_define([$1], 9436af9a7ee5Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9437b9b4fd27Smrg 9438b9b4fd27Smrg 9439b9b4fd27Smrg 9440af9a7ee5Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9441af9a7ee5Smrg# ---------------------------------------------------------- 9442af9a7ee5Smrg# Produce a SEP delimited list of all paired combinations of elements of 9443af9a7ee5Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9444af9a7ee5Smrg# has the form PREFIXmINFIXSUFFIXn. 9445af9a7ee5Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 9446af9a7ee5Smrgm4_define([lt_combine], 9447af9a7ee5Smrg[m4_if(m4_eval([$# > 3]), [1], 9448af9a7ee5Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9449af9a7ee5Smrg[[m4_foreach([_Lt_prefix], [$2], 9450af9a7ee5Smrg [m4_foreach([_Lt_suffix], 9451af9a7ee5Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9452af9a7ee5Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9453b9b4fd27Smrg 9454caade7ccSmrg 9455af9a7ee5Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9456af9a7ee5Smrg# ----------------------------------------------------------------------- 9457af9a7ee5Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9458af9a7ee5Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9459af9a7ee5Smrgm4_define([lt_if_append_uniq], 9460af9a7ee5Smrg[m4_ifdef([$1], 9461af9a7ee5Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9462af9a7ee5Smrg [lt_append([$1], [$2], [$3])$4], 9463af9a7ee5Smrg [$5])], 9464af9a7ee5Smrg [lt_append([$1], [$2], [$3])$4])]) 9465b9b4fd27Smrg 9466b9b4fd27Smrg 9467af9a7ee5Smrg# lt_dict_add(DICT, KEY, VALUE) 9468af9a7ee5Smrg# ----------------------------- 9469af9a7ee5Smrgm4_define([lt_dict_add], 9470af9a7ee5Smrg[m4_define([$1($2)], [$3])]) 9471caade7ccSmrg 9472caade7ccSmrg 9473af9a7ee5Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9474af9a7ee5Smrg# -------------------------------------------- 9475af9a7ee5Smrgm4_define([lt_dict_add_subkey], 9476af9a7ee5Smrg[m4_define([$1($2:$3)], [$4])]) 9477caade7ccSmrg 9478caade7ccSmrg 9479af9a7ee5Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9480af9a7ee5Smrg# ---------------------------------- 9481af9a7ee5Smrgm4_define([lt_dict_fetch], 9482af9a7ee5Smrg[m4_ifval([$3], 9483af9a7ee5Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9484af9a7ee5Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9485caade7ccSmrg 9486caade7ccSmrg 9487af9a7ee5Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9488af9a7ee5Smrg# ----------------------------------------------------------------- 9489af9a7ee5Smrgm4_define([lt_if_dict_fetch], 9490af9a7ee5Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9491af9a7ee5Smrg [$5], 9492af9a7ee5Smrg [$6])]) 9493caade7ccSmrg 9494caade7ccSmrg 9495af9a7ee5Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9496af9a7ee5Smrg# -------------------------------------------------------------- 9497af9a7ee5Smrgm4_define([lt_dict_filter], 9498af9a7ee5Smrg[m4_if([$5], [], [], 9499af9a7ee5Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 9500af9a7ee5Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9501af9a7ee5Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9502b9b4fd27Smrg]) 9503caade7ccSmrg 9504af9a7ee5Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9505af9a7ee5Smrg# 9506af9a7ee5Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 9507af9a7ee5Smrg# Written by Scott James Remnant, 2004 9508af9a7ee5Smrg# 9509af9a7ee5Smrg# This file is free software; the Free Software Foundation gives 9510af9a7ee5Smrg# unlimited permission to copy and/or distribute it, with or without 9511af9a7ee5Smrg# modifications, as long as this notice is preserved. 9512caade7ccSmrg 9513af9a7ee5Smrg# @configure_input@ 9514b9b4fd27Smrg 9515af9a7ee5Smrg# serial 3337 ltversion.m4 9516af9a7ee5Smrg# This file is part of GNU Libtool 9517b9b4fd27Smrg 9518af9a7ee5Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9519af9a7ee5Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 9520af9a7ee5Smrg 9521af9a7ee5SmrgAC_DEFUN([LTVERSION_VERSION], 9522af9a7ee5Smrg[macro_version='2.4.2' 9523af9a7ee5Smrgmacro_revision='1.3337' 9524af9a7ee5Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9525af9a7ee5Smrg_LT_DECL(, macro_revision, 0) 9526af9a7ee5Smrg]) 9527b9b4fd27Smrg 9528af9a7ee5Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9529af9a7ee5Smrg# 9530af9a7ee5Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9531af9a7ee5Smrg# Written by Scott James Remnant, 2004. 9532af9a7ee5Smrg# 9533af9a7ee5Smrg# This file is free software; the Free Software Foundation gives 9534af9a7ee5Smrg# unlimited permission to copy and/or distribute it, with or without 9535af9a7ee5Smrg# modifications, as long as this notice is preserved. 9536b9b4fd27Smrg 9537af9a7ee5Smrg# serial 5 lt~obsolete.m4 9538b9b4fd27Smrg 9539af9a7ee5Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 9540af9a7ee5Smrg# 9541af9a7ee5Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9542af9a7ee5Smrg# which have later been changed to m4_define as they aren't part of the 9543af9a7ee5Smrg# exported API, or moved to Autoconf or Automake where they belong. 9544af9a7ee5Smrg# 9545af9a7ee5Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9546af9a7ee5Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9547af9a7ee5Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 9548af9a7ee5Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9549af9a7ee5Smrg# and doesn't know about Autoconf macros at all.) 9550af9a7ee5Smrg# 9551af9a7ee5Smrg# So we provide this file, which has a silly filename so it's always 9552af9a7ee5Smrg# included after everything else. This provides aclocal with the 9553af9a7ee5Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9554af9a7ee5Smrg# because those macros already exist, or will be overwritten later. 9555af9a7ee5Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9556af9a7ee5Smrg# 9557af9a7ee5Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9558af9a7ee5Smrg# Yes, that means every name once taken will need to remain here until 9559af9a7ee5Smrg# we give up compatibility with versions before 1.7, at which point 9560af9a7ee5Smrg# we need to keep only those names which we still refer to. 9561b9b4fd27Smrg 9562af9a7ee5Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9563af9a7ee5SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9564b9b4fd27Smrg 9565af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9566af9a7ee5Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9567af9a7ee5Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9568af9a7ee5Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9569af9a7ee5Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9570af9a7ee5Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9571af9a7ee5Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9572af9a7ee5Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9573af9a7ee5Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9574af9a7ee5Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9575af9a7ee5Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9576af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9577af9a7ee5Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9578af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9579af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9580af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9581af9a7ee5Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9582af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9583af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9584af9a7ee5Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9585af9a7ee5Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9586af9a7ee5Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9587af9a7ee5Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9588af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9589af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9590af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9591af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9592af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9593af9a7ee5Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9594af9a7ee5Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9595af9a7ee5Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9596af9a7ee5Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9597af9a7ee5Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9598af9a7ee5Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9599af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9600af9a7ee5Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9601af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9602af9a7ee5Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9603af9a7ee5Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9604af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9605af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9606af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9607af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9608af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9609af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9610af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9611af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9612af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9613af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9614af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9615af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9616af9a7ee5Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9617af9a7ee5Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9618af9a7ee5Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9619af9a7ee5Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9620af9a7ee5Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9621af9a7ee5Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9622af9a7ee5Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9623af9a7ee5Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9624af9a7ee5Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9625af9a7ee5Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9626af9a7ee5Smrg 9627af9a7ee5Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9628af9a7ee5Smrg# 9629af9a7ee5Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9630af9a7ee5Smrg# 9631af9a7ee5Smrg# This program is free software; you can redistribute it and/or modify 9632af9a7ee5Smrg# it under the terms of the GNU General Public License as published by 9633af9a7ee5Smrg# the Free Software Foundation; either version 2 of the License, or 9634af9a7ee5Smrg# (at your option) any later version. 9635af9a7ee5Smrg# 9636af9a7ee5Smrg# This program is distributed in the hope that it will be useful, but 9637af9a7ee5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9638af9a7ee5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9639af9a7ee5Smrg# General Public License for more details. 9640af9a7ee5Smrg# 9641af9a7ee5Smrg# You should have received a copy of the GNU General Public License 9642af9a7ee5Smrg# along with this program; if not, write to the Free Software 9643af9a7ee5Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9644af9a7ee5Smrg# 9645af9a7ee5Smrg# As a special exception to the GNU General Public License, if you 9646af9a7ee5Smrg# distribute this file as part of a program that contains a 9647af9a7ee5Smrg# configuration script generated by Autoconf, you may include it under 9648af9a7ee5Smrg# the same distribution terms that you use for the rest of that program. 9649af9a7ee5Smrg 9650af9a7ee5Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9651af9a7ee5Smrg# ---------------------------------- 9652af9a7ee5SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9653af9a7ee5Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9654af9a7ee5Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9655af9a7ee5SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9656af9a7ee5Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9657af9a7ee5Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9658b9b4fd27Smrgfi 9659af9a7ee5Smrgif test -n "$PKG_CONFIG"; then 9660af9a7ee5Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9661af9a7ee5Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9662af9a7ee5Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9663af9a7ee5Smrg AC_MSG_RESULT([yes]) 9664af9a7ee5Smrg else 9665af9a7ee5Smrg AC_MSG_RESULT([no]) 9666af9a7ee5Smrg PKG_CONFIG="" 9667af9a7ee5Smrg fi 9668af9a7ee5Smrg 9669af9a7ee5Smrgfi[]dnl 9670af9a7ee5Smrg])# PKG_PROG_PKG_CONFIG 9671b9b4fd27Smrg 9672af9a7ee5Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9673af9a7ee5Smrg# 9674af9a7ee5Smrg# Check to see whether a particular set of modules exists. Similar 9675af9a7ee5Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9676af9a7ee5Smrg# 9677af9a7ee5Smrg# 9678af9a7ee5Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9679af9a7ee5Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9680af9a7ee5Smrg# PKG_CHECK_EXISTS manually 9681af9a7ee5Smrg# -------------------------------------------------------------- 9682af9a7ee5SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9683af9a7ee5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9684af9a7ee5Smrgif test -n "$PKG_CONFIG" && \ 9685af9a7ee5Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9686af9a7ee5Smrg m4_ifval([$2], [$2], [:]) 9687af9a7ee5Smrgm4_ifvaln([$3], [else 9688af9a7ee5Smrg $3])dnl 9689af9a7ee5Smrgfi]) 9690caade7ccSmrg 9691caade7ccSmrg 9692af9a7ee5Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9693af9a7ee5Smrg# --------------------------------------------- 9694af9a7ee5Smrgm4_define([_PKG_CONFIG], 9695af9a7ee5Smrg[if test -n "$$1"; then 9696af9a7ee5Smrg pkg_cv_[]$1="$$1" 9697af9a7ee5Smrg elif test -n "$PKG_CONFIG"; then 9698af9a7ee5Smrg PKG_CHECK_EXISTS([$3], 9699af9a7ee5Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9700af9a7ee5Smrg [pkg_failed=yes]) 9701af9a7ee5Smrg else 9702af9a7ee5Smrg pkg_failed=untried 9703af9a7ee5Smrgfi[]dnl 9704af9a7ee5Smrg])# _PKG_CONFIG 9705af9a7ee5Smrg 9706af9a7ee5Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9707af9a7ee5Smrg# ----------------------------- 9708af9a7ee5SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9709af9a7ee5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9710af9a7ee5Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9711af9a7ee5Smrg _pkg_short_errors_supported=yes 9712af9a7ee5Smrgelse 9713af9a7ee5Smrg _pkg_short_errors_supported=no 9714af9a7ee5Smrgfi[]dnl 9715af9a7ee5Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9716af9a7ee5Smrg 9717af9a7ee5Smrg 9718af9a7ee5Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9719af9a7ee5Smrg# [ACTION-IF-NOT-FOUND]) 9720af9a7ee5Smrg# 9721af9a7ee5Smrg# 9722af9a7ee5Smrg# Note that if there is a possibility the first call to 9723af9a7ee5Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9724af9a7ee5Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9725af9a7ee5Smrg# 9726af9a7ee5Smrg# 9727af9a7ee5Smrg# -------------------------------------------------------------- 9728af9a7ee5SmrgAC_DEFUN([PKG_CHECK_MODULES], 9729af9a7ee5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9730af9a7ee5SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9731af9a7ee5SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9732caade7ccSmrg 9733af9a7ee5Smrgpkg_failed=no 9734af9a7ee5SmrgAC_MSG_CHECKING([for $1]) 9735caade7ccSmrg 9736af9a7ee5Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9737af9a7ee5Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9738a5602400Smrg 9739af9a7ee5Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9740af9a7ee5Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9741af9a7ee5SmrgSee the pkg-config man page for more details.]) 9742a5602400Smrg 9743af9a7ee5Smrgif test $pkg_failed = yes; then 9744af9a7ee5Smrg _PKG_SHORT_ERRORS_SUPPORTED 9745af9a7ee5Smrg if test $_pkg_short_errors_supported = yes; then 9746af9a7ee5Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9747af9a7ee5Smrg else 9748af9a7ee5Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9749af9a7ee5Smrg fi 9750af9a7ee5Smrg # Put the nasty error message in config.log where it belongs 9751af9a7ee5Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9752caade7ccSmrg 9753af9a7ee5Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 9754af9a7ee5Smrg[Package requirements ($2) were not met: 9755caade7ccSmrg 9756af9a7ee5Smrg$$1_PKG_ERRORS 9757b9b4fd27Smrg 9758af9a7ee5SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9759af9a7ee5Smrginstalled software in a non-standard prefix. 9760caade7ccSmrg 9761af9a7ee5Smrg_PKG_TEXT 9762af9a7ee5Smrg])], 9763af9a7ee5Smrg [AC_MSG_RESULT([no]) 9764af9a7ee5Smrg $4]) 9765af9a7ee5Smrgelif test $pkg_failed = untried; then 9766af9a7ee5Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9767af9a7ee5Smrg[The pkg-config script could not be found or is too old. Make sure it 9768af9a7ee5Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9769af9a7ee5Smrgpath to pkg-config. 9770caade7ccSmrg 9771af9a7ee5Smrg_PKG_TEXT 9772caade7ccSmrg 9773af9a7ee5SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9774af9a7ee5Smrg [$4]) 9775af9a7ee5Smrgelse 9776af9a7ee5Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9777af9a7ee5Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9778af9a7ee5Smrg AC_MSG_RESULT([yes]) 9779af9a7ee5Smrg ifelse([$3], , :, [$3]) 9780af9a7ee5Smrgfi[]dnl 9781af9a7ee5Smrg])# PKG_CHECK_MODULES 9782caade7ccSmrg 9783af9a7ee5Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9784af9a7ee5Smrgdnl 9785af9a7ee5Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9786af9a7ee5Smrgdnl 9787af9a7ee5Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9788af9a7ee5Smrgdnl copy of this software and associated documentation files (the "Software"), 9789af9a7ee5Smrgdnl to deal in the Software without restriction, including without limitation 9790af9a7ee5Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9791af9a7ee5Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9792af9a7ee5Smrgdnl Software is furnished to do so, subject to the following conditions: 9793af9a7ee5Smrgdnl 9794af9a7ee5Smrgdnl The above copyright notice and this permission notice (including the next 9795af9a7ee5Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9796af9a7ee5Smrgdnl Software. 9797af9a7ee5Smrgdnl 9798af9a7ee5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9799af9a7ee5Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9800af9a7ee5Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9801af9a7ee5Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9802af9a7ee5Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9803af9a7ee5Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9804af9a7ee5Smrgdnl DEALINGS IN THE SOFTWARE. 9805caade7ccSmrg 9806af9a7ee5Smrg# XORG_MACROS_VERSION(required-version) 9807af9a7ee5Smrg# ------------------------------------- 9808af9a7ee5Smrg# Minimum version: 1.1.0 9809af9a7ee5Smrg# 9810af9a7ee5Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9811af9a7ee5Smrg# your configure.ac with the minimum required version, such as: 9812af9a7ee5Smrg# XORG_MACROS_VERSION(1.1) 9813af9a7ee5Smrg# 9814af9a7ee5Smrg# To ensure that this macro is defined, also add: 9815af9a7ee5Smrg# m4_ifndef([XORG_MACROS_VERSION], 9816af9a7ee5Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9817af9a7ee5Smrg# 9818af9a7ee5Smrg# 9819af9a7ee5Smrg# See the "minimum version" comment for each macro you use to see what 9820af9a7ee5Smrg# version you require. 9821af9a7ee5Smrgm4_defun([XORG_MACROS_VERSION],[ 9822af9a7ee5Smrgm4_define([vers_have], [1.17]) 9823af9a7ee5Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9824af9a7ee5Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9825af9a7ee5Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9826af9a7ee5Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9827af9a7ee5Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9828af9a7ee5Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9829af9a7ee5Smrgm4_undefine([vers_have]) 9830af9a7ee5Smrgm4_undefine([maj_have]) 9831af9a7ee5Smrgm4_undefine([maj_needed]) 9832af9a7ee5Smrg]) # XORG_MACROS_VERSION 9833caade7ccSmrg 9834af9a7ee5Smrg# XORG_PROG_RAWCPP() 9835af9a7ee5Smrg# ------------------ 9836af9a7ee5Smrg# Minimum version: 1.0.0 9837af9a7ee5Smrg# 9838af9a7ee5Smrg# Find cpp program and necessary flags for use in pre-processing text files 9839af9a7ee5Smrg# such as man pages and config files 9840af9a7ee5SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9841af9a7ee5SmrgAC_REQUIRE([AC_PROG_CPP]) 9842af9a7ee5SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9843af9a7ee5Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9844caade7ccSmrg 9845af9a7ee5Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9846af9a7ee5Smrg# which is not the best choice for supporting other OS'es, but covers most 9847af9a7ee5Smrg# of the ones we need for now. 9848af9a7ee5SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9849af9a7ee5SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9850af9a7ee5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9851af9a7ee5Smrg AC_MSG_RESULT([no]) 9852a5602400Smrgelse 9853af9a7ee5Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9854af9a7ee5Smrg RAWCPPFLAGS=-undef 9855af9a7ee5Smrg AC_MSG_RESULT([yes]) 9856af9a7ee5Smrg # under Cygwin unix is still defined even with -undef 9857af9a7ee5Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9858af9a7ee5Smrg RAWCPPFLAGS="-undef -ansi" 9859af9a7ee5Smrg AC_MSG_RESULT([yes, with -ansi]) 9860af9a7ee5Smrg else 9861af9a7ee5Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9862af9a7ee5Smrg fi 9863a5602400Smrgfi 9864af9a7ee5Smrgrm -f conftest.$ac_ext 9865caade7ccSmrg 9866af9a7ee5SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9867af9a7ee5SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9868af9a7ee5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9869af9a7ee5Smrg AC_MSG_RESULT([no]) 9870af9a7ee5Smrgelse 9871af9a7ee5Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9872af9a7ee5Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9873af9a7ee5Smrg AC_MSG_RESULT([yes]) 9874af9a7ee5Smrg else 9875af9a7ee5Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9876af9a7ee5Smrg fi 9877a5602400Smrgfi 9878af9a7ee5Smrgrm -f conftest.$ac_ext 9879af9a7ee5SmrgAC_SUBST(RAWCPPFLAGS) 9880af9a7ee5Smrg]) # XORG_PROG_RAWCPP 9881caade7ccSmrg 9882af9a7ee5Smrg# XORG_MANPAGE_SECTIONS() 9883af9a7ee5Smrg# ----------------------- 9884af9a7ee5Smrg# Minimum version: 1.0.0 9885af9a7ee5Smrg# 9886af9a7ee5Smrg# Determine which sections man pages go in for the different man page types 9887af9a7ee5Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9888af9a7ee5Smrg# Not sure if there's any better way than just hardcoding by OS name. 9889af9a7ee5Smrg# Override default settings by setting environment variables 9890af9a7ee5Smrg# Added MAN_SUBSTS in version 1.8 9891af9a7ee5Smrg# Added AC_PROG_SED in version 1.8 9892af9a7ee5Smrg 9893af9a7ee5SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9894af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9895af9a7ee5SmrgAC_REQUIRE([AC_PROG_SED]) 9896af9a7ee5Smrg 9897af9a7ee5Smrgif test x$APP_MAN_SUFFIX = x ; then 9898af9a7ee5Smrg APP_MAN_SUFFIX=1 9899af9a7ee5Smrgfi 9900af9a7ee5Smrgif test x$APP_MAN_DIR = x ; then 9901af9a7ee5Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9902af9a7ee5Smrgfi 9903af9a7ee5Smrg 9904af9a7ee5Smrgif test x$LIB_MAN_SUFFIX = x ; then 9905af9a7ee5Smrg LIB_MAN_SUFFIX=3 9906af9a7ee5Smrgfi 9907af9a7ee5Smrgif test x$LIB_MAN_DIR = x ; then 9908af9a7ee5Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9909af9a7ee5Smrgfi 9910af9a7ee5Smrg 9911af9a7ee5Smrgif test x$FILE_MAN_SUFFIX = x ; then 9912af9a7ee5Smrg case $host_os in 9913af9a7ee5Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9914af9a7ee5Smrg *) FILE_MAN_SUFFIX=5 ;; 9915a5602400Smrg esac 9916af9a7ee5Smrgfi 9917af9a7ee5Smrgif test x$FILE_MAN_DIR = x ; then 9918af9a7ee5Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9919af9a7ee5Smrgfi 9920a5602400Smrg 9921af9a7ee5Smrgif test x$MISC_MAN_SUFFIX = x ; then 9922af9a7ee5Smrg case $host_os in 9923af9a7ee5Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9924af9a7ee5Smrg *) MISC_MAN_SUFFIX=7 ;; 9925a5602400Smrg esac 9926af9a7ee5Smrgfi 9927af9a7ee5Smrgif test x$MISC_MAN_DIR = x ; then 9928af9a7ee5Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9929af9a7ee5Smrgfi 9930caade7ccSmrg 9931af9a7ee5Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9932af9a7ee5Smrg case $host_os in 9933af9a7ee5Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9934af9a7ee5Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9935af9a7ee5Smrg esac 9936af9a7ee5Smrgfi 9937af9a7ee5Smrgif test x$DRIVER_MAN_DIR = x ; then 9938af9a7ee5Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9939af9a7ee5Smrgfi 9940caade7ccSmrg 9941af9a7ee5Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9942af9a7ee5Smrg case $host_os in 9943af9a7ee5Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9944af9a7ee5Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9945af9a7ee5Smrg esac 9946af9a7ee5Smrgfi 9947af9a7ee5Smrgif test x$ADMIN_MAN_DIR = x ; then 9948af9a7ee5Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9949af9a7ee5Smrgfi 9950caade7ccSmrg 9951b9b4fd27Smrg 9952af9a7ee5SmrgAC_SUBST([APP_MAN_SUFFIX]) 9953af9a7ee5SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9954af9a7ee5SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9955af9a7ee5SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9956af9a7ee5SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9957af9a7ee5SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9958af9a7ee5SmrgAC_SUBST([APP_MAN_DIR]) 9959af9a7ee5SmrgAC_SUBST([LIB_MAN_DIR]) 9960af9a7ee5SmrgAC_SUBST([FILE_MAN_DIR]) 9961af9a7ee5SmrgAC_SUBST([MISC_MAN_DIR]) 9962af9a7ee5SmrgAC_SUBST([DRIVER_MAN_DIR]) 9963af9a7ee5SmrgAC_SUBST([ADMIN_MAN_DIR]) 9964b9b4fd27Smrg 9965af9a7ee5SmrgXORG_MAN_PAGE="X Version 11" 9966af9a7ee5SmrgAC_SUBST([XORG_MAN_PAGE]) 9967af9a7ee5SmrgMAN_SUBSTS="\ 9968af9a7ee5Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9969af9a7ee5Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9970af9a7ee5Smrg -e 's|__xservername__|Xorg|g' \ 9971af9a7ee5Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9972af9a7ee5Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9973af9a7ee5Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9974af9a7ee5Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9975af9a7ee5Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9976af9a7ee5Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9977af9a7ee5Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9978af9a7ee5Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9979af9a7ee5Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9980af9a7ee5SmrgAC_SUBST([MAN_SUBSTS]) 9981b9b4fd27Smrg 9982af9a7ee5Smrg]) # XORG_MANPAGE_SECTIONS 9983b9b4fd27Smrg 9984af9a7ee5Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9985af9a7ee5Smrg# ------------------------ 9986af9a7ee5Smrg# Minimum version: 1.7.0 9987af9a7ee5Smrg# 9988af9a7ee5Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9989af9a7ee5Smrg# provided by xorg-sgml-doctools, if installed. 9990af9a7ee5SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9991af9a7ee5SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9992af9a7ee5SmrgXORG_SGML_PATH= 9993af9a7ee5SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9994af9a7ee5Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9995af9a7ee5Smrg [m4_ifval([$1],[:], 9996af9a7ee5Smrg [if test x"$cross_compiling" != x"yes" ; then 9997af9a7ee5Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9998af9a7ee5Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9999af9a7ee5Smrg fi]) 10000af9a7ee5Smrg ]) 10001b9b4fd27Smrg 10002af9a7ee5Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10003af9a7ee5Smrg# the path and the name of the doc stylesheet 10004af9a7ee5Smrgif test "x$XORG_SGML_PATH" != "x" ; then 10005af9a7ee5Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10006af9a7ee5Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10007af9a7ee5Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10008af9a7ee5Smrgelse 10009af9a7ee5Smrg AC_MSG_RESULT([no]) 10010af9a7ee5Smrgfi 10011b9b4fd27Smrg 10012af9a7ee5SmrgAC_SUBST(XORG_SGML_PATH) 10013af9a7ee5SmrgAC_SUBST(STYLESHEET_SRCDIR) 10014af9a7ee5SmrgAC_SUBST(XSL_STYLESHEET) 10015af9a7ee5SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10016af9a7ee5Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10017b9b4fd27Smrg 10018af9a7ee5Smrg# XORG_CHECK_LINUXDOC 10019af9a7ee5Smrg# ------------------- 10020af9a7ee5Smrg# Minimum version: 1.0.0 10021af9a7ee5Smrg# 10022af9a7ee5Smrg# Defines the variable MAKE_TEXT if the necessary tools and 10023af9a7ee5Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10024af9a7ee5Smrg# Whether or not the necessary tools and files are found can be checked 10025af9a7ee5Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10026af9a7ee5SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10027af9a7ee5SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10028af9a7ee5SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10029b9b4fd27Smrg 10030af9a7ee5SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10031caade7ccSmrg 10032af9a7ee5SmrgAC_MSG_CHECKING([whether to build documentation]) 10033caade7ccSmrg 10034af9a7ee5Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10035af9a7ee5Smrg BUILDDOC=yes 10036af9a7ee5Smrgelse 10037af9a7ee5Smrg BUILDDOC=no 10038af9a7ee5Smrgfi 10039b9b4fd27Smrg 10040af9a7ee5SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10041caade7ccSmrg 10042af9a7ee5SmrgAC_MSG_RESULT([$BUILDDOC]) 10043caade7ccSmrg 10044af9a7ee5SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10045caade7ccSmrg 10046af9a7ee5Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10047af9a7ee5Smrg BUILDPDFDOC=yes 10048af9a7ee5Smrgelse 10049af9a7ee5Smrg BUILDPDFDOC=no 10050af9a7ee5Smrgfi 10051caade7ccSmrg 10052af9a7ee5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10053caade7ccSmrg 10054af9a7ee5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10055caade7ccSmrg 10056af9a7ee5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10057af9a7ee5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10058af9a7ee5SmrgMAKE_PDF="$PS2PDF" 10059af9a7ee5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10060caade7ccSmrg 10061af9a7ee5SmrgAC_SUBST(MAKE_TEXT) 10062af9a7ee5SmrgAC_SUBST(MAKE_PS) 10063af9a7ee5SmrgAC_SUBST(MAKE_PDF) 10064af9a7ee5SmrgAC_SUBST(MAKE_HTML) 10065af9a7ee5Smrg]) # XORG_CHECK_LINUXDOC 10066caade7ccSmrg 10067af9a7ee5Smrg# XORG_CHECK_DOCBOOK 10068af9a7ee5Smrg# ------------------- 10069af9a7ee5Smrg# Minimum version: 1.0.0 10070af9a7ee5Smrg# 10071af9a7ee5Smrg# Checks for the ability to build output formats from SGML DocBook source. 10072af9a7ee5Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10073af9a7ee5Smrg# indicates whether the necessary tools and files are found and, if set, 10074af9a7ee5Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10075af9a7ee5SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10076af9a7ee5SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10077caade7ccSmrg 10078af9a7ee5SmrgBUILDTXTDOC=no 10079af9a7ee5SmrgBUILDPDFDOC=no 10080af9a7ee5SmrgBUILDPSDOC=no 10081af9a7ee5SmrgBUILDHTMLDOC=no 10082caade7ccSmrg 10083af9a7ee5SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10084af9a7ee5SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10085af9a7ee5SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10086af9a7ee5SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10087caade7ccSmrg 10088af9a7ee5SmrgAC_MSG_CHECKING([whether to build text documentation]) 10089af9a7ee5Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10090af9a7ee5Smrg test x$BUILD_TXTDOC != xno; then 10091af9a7ee5Smrg BUILDTXTDOC=yes 10092af9a7ee5Smrgfi 10093af9a7ee5SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10094af9a7ee5SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10095caade7ccSmrg 10096af9a7ee5SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10097af9a7ee5Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10098af9a7ee5Smrg test x$BUILD_PDFDOC != xno; then 10099af9a7ee5Smrg BUILDPDFDOC=yes 10100af9a7ee5Smrgfi 10101af9a7ee5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10102af9a7ee5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10103caade7ccSmrg 10104af9a7ee5SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10105af9a7ee5Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10106af9a7ee5Smrg test x$BUILD_PSDOC != xno; then 10107af9a7ee5Smrg BUILDPSDOC=yes 10108af9a7ee5Smrgfi 10109af9a7ee5SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10110af9a7ee5SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10111caade7ccSmrg 10112af9a7ee5SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10113af9a7ee5Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10114af9a7ee5Smrg test x$BUILD_HTMLDOC != xno; then 10115af9a7ee5Smrg BUILDHTMLDOC=yes 10116af9a7ee5Smrgfi 10117af9a7ee5SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10118af9a7ee5SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10119caade7ccSmrg 10120af9a7ee5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10121af9a7ee5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10122af9a7ee5SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10123af9a7ee5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10124caade7ccSmrg 10125af9a7ee5SmrgAC_SUBST(MAKE_TEXT) 10126af9a7ee5SmrgAC_SUBST(MAKE_PS) 10127af9a7ee5SmrgAC_SUBST(MAKE_PDF) 10128af9a7ee5SmrgAC_SUBST(MAKE_HTML) 10129af9a7ee5Smrg]) # XORG_CHECK_DOCBOOK 10130caade7ccSmrg 10131af9a7ee5Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10132af9a7ee5Smrg# ---------------- 10133af9a7ee5Smrg# Minimum version: 1.5.0 10134af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10135af9a7ee5Smrg# 10136af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10137af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10138af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10139af9a7ee5Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 10140af9a7ee5Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 10141af9a7ee5Smrg# --with-xmlto assumes 'auto'. 10142af9a7ee5Smrg# 10143af9a7ee5Smrg# Interface to module: 10144af9a7ee5Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10145af9a7ee5Smrg# XMLTO: returns the path of the xmlto program found 10146af9a7ee5Smrg# returns the path set by the user in the environment 10147af9a7ee5Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10148af9a7ee5Smrg# 'no' user instructs the module not to use xmlto 10149af9a7ee5Smrg# 10150af9a7ee5Smrg# Added in version 1.10.0 10151af9a7ee5Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10152af9a7ee5Smrg# xmlto for text output requires either lynx, links, or w3m browsers 10153af9a7ee5Smrg# 10154af9a7ee5Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10155af9a7ee5Smrg# 10156af9a7ee5SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10157af9a7ee5SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 10158af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10159af9a7ee5SmrgAC_ARG_WITH(xmlto, 10160af9a7ee5Smrg AS_HELP_STRING([--with-xmlto], 10161af9a7ee5Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10162af9a7ee5Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 10163af9a7ee5Smrgm4_undefine([_defopt]) 10164af9a7ee5Smrg 10165af9a7ee5Smrgif test "x$use_xmlto" = x"auto"; then 10166af9a7ee5Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10167af9a7ee5Smrg if test "x$XMLTO" = "x"; then 10168af9a7ee5Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10169af9a7ee5Smrg have_xmlto=no 10170af9a7ee5Smrg else 10171af9a7ee5Smrg have_xmlto=yes 10172af9a7ee5Smrg fi 10173af9a7ee5Smrgelif test "x$use_xmlto" = x"yes" ; then 10174af9a7ee5Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10175af9a7ee5Smrg if test "x$XMLTO" = "x"; then 10176af9a7ee5Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10177af9a7ee5Smrg fi 10178af9a7ee5Smrg have_xmlto=yes 10179af9a7ee5Smrgelif test "x$use_xmlto" = x"no" ; then 10180af9a7ee5Smrg if test "x$XMLTO" != "x"; then 10181af9a7ee5Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10182af9a7ee5Smrg fi 10183af9a7ee5Smrg have_xmlto=no 10184af9a7ee5Smrgelse 10185af9a7ee5Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10186af9a7ee5Smrgfi 10187caade7ccSmrg 10188af9a7ee5Smrg# Test for a minimum version of xmlto, if provided. 10189af9a7ee5Smrgm4_ifval([$1], 10190af9a7ee5Smrg[if test "$have_xmlto" = yes; then 10191af9a7ee5Smrg # scrape the xmlto version 10192af9a7ee5Smrg AC_MSG_CHECKING([the xmlto version]) 10193af9a7ee5Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10194af9a7ee5Smrg AC_MSG_RESULT([$xmlto_version]) 10195af9a7ee5Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10196af9a7ee5Smrg [if test "x$use_xmlto" = xauto; then 10197af9a7ee5Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10198af9a7ee5Smrg have_xmlto=no 10199af9a7ee5Smrg else 10200af9a7ee5Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10201af9a7ee5Smrg fi]) 10202af9a7ee5Smrgfi]) 10203caade7ccSmrg 10204af9a7ee5Smrg# Test for the ability of xmlto to generate a text target 10205af9a7ee5Smrghave_xmlto_text=no 10206af9a7ee5Smrgcat > conftest.xml << "EOF" 10207af9a7ee5SmrgEOF 10208af9a7ee5SmrgAS_IF([test "$have_xmlto" = yes], 10209af9a7ee5Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10210af9a7ee5Smrg [have_xmlto_text=yes], 10211af9a7ee5Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10212af9a7ee5Smrgrm -f conftest.xml 10213af9a7ee5SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10214af9a7ee5SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10215af9a7ee5Smrg]) # XORG_WITH_XMLTO 10216caade7ccSmrg 10217af9a7ee5Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10218af9a7ee5Smrg# -------------------------------------------- 10219af9a7ee5Smrg# Minimum version: 1.12.0 10220af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10221af9a7ee5Smrg# 10222af9a7ee5Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10223af9a7ee5Smrg# XML-based language used for the transformation of XML documents. 10224af9a7ee5Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10225af9a7ee5Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10226af9a7ee5Smrg# The XSLT processor is often used as a standalone tool for transformations. 10227af9a7ee5Smrg# It should not be assumed that this tool is used only to work with documnetation. 10228af9a7ee5Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10229af9a7ee5Smrg# 10230af9a7ee5Smrg# Interface to module: 10231af9a7ee5Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10232af9a7ee5Smrg# XSLTPROC: returns the path of the xsltproc program found 10233af9a7ee5Smrg# returns the path set by the user in the environment 10234af9a7ee5Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10235af9a7ee5Smrg# 'no' user instructs the module not to use xsltproc 10236af9a7ee5Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10237af9a7ee5Smrg# 10238af9a7ee5Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10239af9a7ee5Smrg# 10240af9a7ee5SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10241af9a7ee5SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10242af9a7ee5Smrg# Preserves the interface, should it be implemented later 10243af9a7ee5Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10244af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10245af9a7ee5SmrgAC_ARG_WITH(xsltproc, 10246af9a7ee5Smrg AS_HELP_STRING([--with-xsltproc], 10247af9a7ee5Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10248af9a7ee5Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10249af9a7ee5Smrgm4_undefine([_defopt]) 10250caade7ccSmrg 10251af9a7ee5Smrgif test "x$use_xsltproc" = x"auto"; then 10252af9a7ee5Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10253af9a7ee5Smrg if test "x$XSLTPROC" = "x"; then 10254af9a7ee5Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10255af9a7ee5Smrg have_xsltproc=no 10256af9a7ee5Smrg else 10257af9a7ee5Smrg have_xsltproc=yes 10258af9a7ee5Smrg fi 10259af9a7ee5Smrgelif test "x$use_xsltproc" = x"yes" ; then 10260af9a7ee5Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10261af9a7ee5Smrg if test "x$XSLTPROC" = "x"; then 10262af9a7ee5Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10263af9a7ee5Smrg fi 10264af9a7ee5Smrg have_xsltproc=yes 10265af9a7ee5Smrgelif test "x$use_xsltproc" = x"no" ; then 10266af9a7ee5Smrg if test "x$XSLTPROC" != "x"; then 10267af9a7ee5Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10268af9a7ee5Smrg fi 10269af9a7ee5Smrg have_xsltproc=no 10270af9a7ee5Smrgelse 10271af9a7ee5Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10272af9a7ee5Smrgfi 10273caade7ccSmrg 10274af9a7ee5SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10275af9a7ee5Smrg]) # XORG_WITH_XSLTPROC 10276caade7ccSmrg 10277af9a7ee5Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10278af9a7ee5Smrg# ---------------------------------------- 10279af9a7ee5Smrg# Minimum version: 1.15.0 10280af9a7ee5Smrg# 10281af9a7ee5Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 10282af9a7ee5Smrg# scanning arbitrary text files, extracting information from those text files, 10283af9a7ee5Smrg# and printing reports based on that information. 10284af9a7ee5Smrg# 10285af9a7ee5Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10286af9a7ee5Smrg# 10287af9a7ee5Smrg# Interface to module: 10288af9a7ee5Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 10289af9a7ee5Smrg# PERL: returns the path of the perl program found 10290af9a7ee5Smrg# returns the path set by the user in the environment 10291af9a7ee5Smrg# --with-perl: 'yes' user instructs the module to use perl 10292af9a7ee5Smrg# 'no' user instructs the module not to use perl 10293af9a7ee5Smrg# have_perl: returns yes if perl found in PATH or no 10294af9a7ee5Smrg# 10295af9a7ee5Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10296af9a7ee5Smrg# 10297af9a7ee5SmrgAC_DEFUN([XORG_WITH_PERL],[ 10298af9a7ee5SmrgAC_ARG_VAR([PERL], [Path to perl command]) 10299af9a7ee5Smrg# Preserves the interface, should it be implemented later 10300af9a7ee5Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10301af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10302af9a7ee5SmrgAC_ARG_WITH(perl, 10303af9a7ee5Smrg AS_HELP_STRING([--with-perl], 10304af9a7ee5Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 10305af9a7ee5Smrg [use_perl=$withval], [use_perl=]_defopt) 10306af9a7ee5Smrgm4_undefine([_defopt]) 10307caade7ccSmrg 10308af9a7ee5Smrgif test "x$use_perl" = x"auto"; then 10309af9a7ee5Smrg AC_PATH_PROG([PERL], [perl]) 10310af9a7ee5Smrg if test "x$PERL" = "x"; then 10311af9a7ee5Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 10312af9a7ee5Smrg have_perl=no 10313af9a7ee5Smrg else 10314af9a7ee5Smrg have_perl=yes 10315af9a7ee5Smrg fi 10316af9a7ee5Smrgelif test "x$use_perl" = x"yes" ; then 10317af9a7ee5Smrg AC_PATH_PROG([PERL], [perl]) 10318af9a7ee5Smrg if test "x$PERL" = "x"; then 10319af9a7ee5Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10320af9a7ee5Smrg fi 10321af9a7ee5Smrg have_perl=yes 10322af9a7ee5Smrgelif test "x$use_perl" = x"no" ; then 10323af9a7ee5Smrg if test "x$PERL" != "x"; then 10324af9a7ee5Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10325af9a7ee5Smrg fi 10326af9a7ee5Smrg have_perl=no 10327af9a7ee5Smrgelse 10328af9a7ee5Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10329af9a7ee5Smrgfi 10330b9b4fd27Smrg 10331af9a7ee5SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10332af9a7ee5Smrg]) # XORG_WITH_PERL 10333caade7ccSmrg 10334af9a7ee5Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10335af9a7ee5Smrg# ---------------- 10336af9a7ee5Smrg# Minimum version: 1.5.0 10337af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10338af9a7ee5Smrg# 10339af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10340af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10341af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10342af9a7ee5Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10343af9a7ee5Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10344af9a7ee5Smrg# --with-asciidoc assumes 'auto'. 10345af9a7ee5Smrg# 10346af9a7ee5Smrg# Interface to module: 10347af9a7ee5Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10348af9a7ee5Smrg# ASCIIDOC: returns the path of the asciidoc program found 10349af9a7ee5Smrg# returns the path set by the user in the environment 10350af9a7ee5Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10351af9a7ee5Smrg# 'no' user instructs the module not to use asciidoc 10352af9a7ee5Smrg# 10353af9a7ee5Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10354af9a7ee5Smrg# 10355af9a7ee5SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10356af9a7ee5SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10357af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10358af9a7ee5SmrgAC_ARG_WITH(asciidoc, 10359af9a7ee5Smrg AS_HELP_STRING([--with-asciidoc], 10360af9a7ee5Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10361af9a7ee5Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10362af9a7ee5Smrgm4_undefine([_defopt]) 10363caade7ccSmrg 10364af9a7ee5Smrgif test "x$use_asciidoc" = x"auto"; then 10365af9a7ee5Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10366af9a7ee5Smrg if test "x$ASCIIDOC" = "x"; then 10367af9a7ee5Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10368af9a7ee5Smrg have_asciidoc=no 10369af9a7ee5Smrg else 10370af9a7ee5Smrg have_asciidoc=yes 10371af9a7ee5Smrg fi 10372af9a7ee5Smrgelif test "x$use_asciidoc" = x"yes" ; then 10373af9a7ee5Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10374af9a7ee5Smrg if test "x$ASCIIDOC" = "x"; then 10375af9a7ee5Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10376af9a7ee5Smrg fi 10377af9a7ee5Smrg have_asciidoc=yes 10378af9a7ee5Smrgelif test "x$use_asciidoc" = x"no" ; then 10379af9a7ee5Smrg if test "x$ASCIIDOC" != "x"; then 10380af9a7ee5Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10381af9a7ee5Smrg fi 10382af9a7ee5Smrg have_asciidoc=no 10383af9a7ee5Smrgelse 10384af9a7ee5Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10385af9a7ee5Smrgfi 10386af9a7ee5Smrgm4_ifval([$1], 10387af9a7ee5Smrg[if test "$have_asciidoc" = yes; then 10388af9a7ee5Smrg # scrape the asciidoc version 10389af9a7ee5Smrg AC_MSG_CHECKING([the asciidoc version]) 10390af9a7ee5Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10391af9a7ee5Smrg AC_MSG_RESULT([$asciidoc_version]) 10392af9a7ee5Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10393af9a7ee5Smrg [if test "x$use_asciidoc" = xauto; then 10394af9a7ee5Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10395af9a7ee5Smrg have_asciidoc=no 10396af9a7ee5Smrg else 10397af9a7ee5Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10398af9a7ee5Smrg fi]) 10399af9a7ee5Smrgfi]) 10400af9a7ee5SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10401af9a7ee5Smrg]) # XORG_WITH_ASCIIDOC 10402caade7ccSmrg 10403af9a7ee5Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10404af9a7ee5Smrg# -------------------------------- 10405af9a7ee5Smrg# Minimum version: 1.5.0 10406af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10407af9a7ee5Smrg# 10408af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10409af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10410af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10411af9a7ee5Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10412af9a7ee5Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10413af9a7ee5Smrg# --with-doxygen assumes 'auto'. 10414af9a7ee5Smrg# 10415af9a7ee5Smrg# Interface to module: 10416af9a7ee5Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10417af9a7ee5Smrg# DOXYGEN: returns the path of the doxygen program found 10418af9a7ee5Smrg# returns the path set by the user in the environment 10419af9a7ee5Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10420af9a7ee5Smrg# 'no' user instructs the module not to use doxygen 10421af9a7ee5Smrg# 10422af9a7ee5Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10423af9a7ee5Smrg# 10424af9a7ee5SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10425af9a7ee5SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10426af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10427af9a7ee5SmrgAC_ARG_WITH(doxygen, 10428af9a7ee5Smrg AS_HELP_STRING([--with-doxygen], 10429af9a7ee5Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10430af9a7ee5Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10431af9a7ee5Smrgm4_undefine([_defopt]) 10432caade7ccSmrg 10433af9a7ee5Smrgif test "x$use_doxygen" = x"auto"; then 10434af9a7ee5Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10435af9a7ee5Smrg if test "x$DOXYGEN" = "x"; then 10436af9a7ee5Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10437af9a7ee5Smrg have_doxygen=no 10438af9a7ee5Smrg else 10439af9a7ee5Smrg have_doxygen=yes 10440af9a7ee5Smrg fi 10441af9a7ee5Smrgelif test "x$use_doxygen" = x"yes" ; then 10442af9a7ee5Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10443af9a7ee5Smrg if test "x$DOXYGEN" = "x"; then 10444af9a7ee5Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10445af9a7ee5Smrg fi 10446af9a7ee5Smrg have_doxygen=yes 10447af9a7ee5Smrgelif test "x$use_doxygen" = x"no" ; then 10448af9a7ee5Smrg if test "x$DOXYGEN" != "x"; then 10449af9a7ee5Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10450af9a7ee5Smrg fi 10451af9a7ee5Smrg have_doxygen=no 10452af9a7ee5Smrgelse 10453af9a7ee5Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10454af9a7ee5Smrgfi 10455af9a7ee5Smrgm4_ifval([$1], 10456af9a7ee5Smrg[if test "$have_doxygen" = yes; then 10457af9a7ee5Smrg # scrape the doxygen version 10458af9a7ee5Smrg AC_MSG_CHECKING([the doxygen version]) 10459af9a7ee5Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10460af9a7ee5Smrg AC_MSG_RESULT([$doxygen_version]) 10461af9a7ee5Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10462af9a7ee5Smrg [if test "x$use_doxygen" = xauto; then 10463af9a7ee5Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10464af9a7ee5Smrg have_doxygen=no 10465af9a7ee5Smrg else 10466af9a7ee5Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10467af9a7ee5Smrg fi]) 10468af9a7ee5Smrgfi]) 10469af9a7ee5SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10470af9a7ee5Smrg]) # XORG_WITH_DOXYGEN 10471caade7ccSmrg 10472af9a7ee5Smrg# XORG_WITH_GROFF([DEFAULT]) 10473af9a7ee5Smrg# ---------------- 10474af9a7ee5Smrg# Minimum version: 1.6.0 10475af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10476af9a7ee5Smrg# 10477af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10478af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10479af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10480af9a7ee5Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10481af9a7ee5Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 10482af9a7ee5Smrg# --with-groff assumes 'auto'. 10483af9a7ee5Smrg# 10484af9a7ee5Smrg# Interface to module: 10485af9a7ee5Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10486af9a7ee5Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10487af9a7ee5Smrg# HAVE_GROFF_MS: the -ms macros package 10488af9a7ee5Smrg# GROFF: returns the path of the groff program found 10489af9a7ee5Smrg# returns the path set by the user in the environment 10490af9a7ee5Smrg# --with-groff: 'yes' user instructs the module to use groff 10491af9a7ee5Smrg# 'no' user instructs the module not to use groff 10492af9a7ee5Smrg# 10493af9a7ee5Smrg# Added in version 1.9.0: 10494af9a7ee5Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10495af9a7ee5Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10496af9a7ee5Smrg# psselect from the psutils package. 10497af9a7ee5Smrg# the ghostcript package. Refer to the grohtml man pages 10498af9a7ee5Smrg# 10499af9a7ee5Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10500af9a7ee5Smrg# 10501af9a7ee5Smrg# OS and distros often splits groff in a basic and full package, the former 10502af9a7ee5Smrg# having the groff program and the later having devices, fonts and macros 10503af9a7ee5Smrg# Checking for the groff executable is not enough. 10504af9a7ee5Smrg# 10505af9a7ee5Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10506af9a7ee5Smrg# unset HAVE_GROFF or GROFF env variables. 10507af9a7ee5Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10508af9a7ee5Smrg# 10509af9a7ee5SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10510af9a7ee5SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10511af9a7ee5Smrgm4_define([_defopt], m4_default([$1], [auto])) 10512af9a7ee5SmrgAC_ARG_WITH(groff, 10513af9a7ee5Smrg AS_HELP_STRING([--with-groff], 10514af9a7ee5Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10515af9a7ee5Smrg [use_groff=$withval], [use_groff=]_defopt) 10516af9a7ee5Smrgm4_undefine([_defopt]) 10517caade7ccSmrg 10518af9a7ee5Smrgif test "x$use_groff" = x"auto"; then 10519af9a7ee5Smrg AC_PATH_PROG([GROFF], [groff]) 10520af9a7ee5Smrg if test "x$GROFF" = "x"; then 10521af9a7ee5Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10522af9a7ee5Smrg have_groff=no 10523af9a7ee5Smrg else 10524af9a7ee5Smrg have_groff=yes 10525af9a7ee5Smrg fi 10526af9a7ee5Smrgelif test "x$use_groff" = x"yes" ; then 10527af9a7ee5Smrg AC_PATH_PROG([GROFF], [groff]) 10528af9a7ee5Smrg if test "x$GROFF" = "x"; then 10529af9a7ee5Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10530af9a7ee5Smrg fi 10531af9a7ee5Smrg have_groff=yes 10532af9a7ee5Smrgelif test "x$use_groff" = x"no" ; then 10533af9a7ee5Smrg if test "x$GROFF" != "x"; then 10534af9a7ee5Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10535af9a7ee5Smrg fi 10536af9a7ee5Smrg have_groff=no 10537af9a7ee5Smrgelse 10538af9a7ee5Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10539af9a7ee5Smrgfi 10540caade7ccSmrg 10541af9a7ee5Smrg# We have groff, test for the presence of the macro packages 10542af9a7ee5Smrgif test "x$have_groff" = x"yes"; then 10543af9a7ee5Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10544af9a7ee5Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10545af9a7ee5Smrg groff_ms_works=yes 10546af9a7ee5Smrg else 10547af9a7ee5Smrg groff_ms_works=no 10548af9a7ee5Smrg fi 10549af9a7ee5Smrg AC_MSG_RESULT([$groff_ms_works]) 10550af9a7ee5Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10551af9a7ee5Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10552af9a7ee5Smrg groff_mm_works=yes 10553af9a7ee5Smrg else 10554af9a7ee5Smrg groff_mm_works=no 10555af9a7ee5Smrg fi 10556af9a7ee5Smrg AC_MSG_RESULT([$groff_mm_works]) 10557af9a7ee5Smrgfi 10558caade7ccSmrg 10559af9a7ee5Smrg# We have groff, test for HTML dependencies, one command per package 10560af9a7ee5Smrgif test "x$have_groff" = x"yes"; then 10561af9a7ee5Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10562af9a7ee5Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10563af9a7ee5Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10564af9a7ee5Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10565af9a7ee5Smrg have_groff_html=yes 10566af9a7ee5Smrg else 10567af9a7ee5Smrg have_groff_html=no 10568af9a7ee5Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10569af9a7ee5Smrg fi 10570af9a7ee5Smrgfi 10571b9b4fd27Smrg 10572af9a7ee5Smrg# Set Automake conditionals for Makefiles 10573af9a7ee5SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10574af9a7ee5SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10575af9a7ee5SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10576af9a7ee5SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10577af9a7ee5Smrg]) # XORG_WITH_GROFF 10578caade7ccSmrg 10579af9a7ee5Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10580af9a7ee5Smrg# --------------------------------------- 10581af9a7ee5Smrg# Minimum version: 1.6.0 10582af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10583af9a7ee5Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10584af9a7ee5Smrg# 10585af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10586af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10587af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10588af9a7ee5Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10589af9a7ee5Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10590af9a7ee5Smrg# --with-fop assumes 'auto'. 10591af9a7ee5Smrg# 10592af9a7ee5Smrg# Interface to module: 10593af9a7ee5Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10594af9a7ee5Smrg# FOP: returns the path of the fop program found 10595af9a7ee5Smrg# returns the path set by the user in the environment 10596af9a7ee5Smrg# --with-fop: 'yes' user instructs the module to use fop 10597af9a7ee5Smrg# 'no' user instructs the module not to use fop 10598af9a7ee5Smrg# 10599af9a7ee5Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10600af9a7ee5Smrg# 10601af9a7ee5SmrgAC_DEFUN([XORG_WITH_FOP],[ 10602af9a7ee5SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10603af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10604af9a7ee5SmrgAC_ARG_WITH(fop, 10605af9a7ee5Smrg AS_HELP_STRING([--with-fop], 10606af9a7ee5Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10607af9a7ee5Smrg [use_fop=$withval], [use_fop=]_defopt) 10608af9a7ee5Smrgm4_undefine([_defopt]) 10609caade7ccSmrg 10610af9a7ee5Smrgif test "x$use_fop" = x"auto"; then 10611af9a7ee5Smrg AC_PATH_PROG([FOP], [fop]) 10612af9a7ee5Smrg if test "x$FOP" = "x"; then 10613af9a7ee5Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10614af9a7ee5Smrg have_fop=no 10615af9a7ee5Smrg else 10616af9a7ee5Smrg have_fop=yes 10617af9a7ee5Smrg fi 10618af9a7ee5Smrgelif test "x$use_fop" = x"yes" ; then 10619af9a7ee5Smrg AC_PATH_PROG([FOP], [fop]) 10620af9a7ee5Smrg if test "x$FOP" = "x"; then 10621af9a7ee5Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10622af9a7ee5Smrg fi 10623af9a7ee5Smrg have_fop=yes 10624af9a7ee5Smrgelif test "x$use_fop" = x"no" ; then 10625af9a7ee5Smrg if test "x$FOP" != "x"; then 10626af9a7ee5Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10627af9a7ee5Smrg fi 10628af9a7ee5Smrg have_fop=no 10629af9a7ee5Smrgelse 10630af9a7ee5Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10631af9a7ee5Smrgfi 10632caade7ccSmrg 10633af9a7ee5Smrg# Test for a minimum version of fop, if provided. 10634af9a7ee5Smrgm4_ifval([$1], 10635af9a7ee5Smrg[if test "$have_fop" = yes; then 10636af9a7ee5Smrg # scrape the fop version 10637af9a7ee5Smrg AC_MSG_CHECKING([for fop minimum version]) 10638af9a7ee5Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10639af9a7ee5Smrg AC_MSG_RESULT([$fop_version]) 10640af9a7ee5Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10641af9a7ee5Smrg [if test "x$use_fop" = xauto; then 10642af9a7ee5Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10643af9a7ee5Smrg have_fop=no 10644af9a7ee5Smrg else 10645af9a7ee5Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10646af9a7ee5Smrg fi]) 10647af9a7ee5Smrgfi]) 10648af9a7ee5SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10649af9a7ee5Smrg]) # XORG_WITH_FOP 10650caade7ccSmrg 10651af9a7ee5Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10652af9a7ee5Smrg# ---------------- 10653af9a7ee5Smrg# Minimum version: 1.6.0 10654af9a7ee5Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10655af9a7ee5Smrg# 10656af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10657af9a7ee5Smrg# not at the appropriate level. This macro enables a module to test for the 10658af9a7ee5Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10659af9a7ee5Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10660af9a7ee5Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10661af9a7ee5Smrg# --with-ps2pdf assumes 'auto'. 10662af9a7ee5Smrg# 10663af9a7ee5Smrg# Interface to module: 10664af9a7ee5Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10665af9a7ee5Smrg# PS2PDF: returns the path of the ps2pdf program found 10666af9a7ee5Smrg# returns the path set by the user in the environment 10667af9a7ee5Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10668af9a7ee5Smrg# 'no' user instructs the module not to use ps2pdf 10669af9a7ee5Smrg# 10670af9a7ee5Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10671af9a7ee5Smrg# 10672af9a7ee5SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10673af9a7ee5SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10674af9a7ee5Smrgm4_define([_defopt], m4_default([$1], [auto])) 10675af9a7ee5SmrgAC_ARG_WITH(ps2pdf, 10676af9a7ee5Smrg AS_HELP_STRING([--with-ps2pdf], 10677af9a7ee5Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10678af9a7ee5Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10679af9a7ee5Smrgm4_undefine([_defopt]) 10680caade7ccSmrg 10681af9a7ee5Smrgif test "x$use_ps2pdf" = x"auto"; then 10682af9a7ee5Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10683af9a7ee5Smrg if test "x$PS2PDF" = "x"; then 10684af9a7ee5Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10685af9a7ee5Smrg have_ps2pdf=no 10686af9a7ee5Smrg else 10687af9a7ee5Smrg have_ps2pdf=yes 10688af9a7ee5Smrg fi 10689af9a7ee5Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10690af9a7ee5Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10691af9a7ee5Smrg if test "x$PS2PDF" = "x"; then 10692af9a7ee5Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10693af9a7ee5Smrg fi 10694af9a7ee5Smrg have_ps2pdf=yes 10695af9a7ee5Smrgelif test "x$use_ps2pdf" = x"no" ; then 10696af9a7ee5Smrg if test "x$PS2PDF" != "x"; then 10697af9a7ee5Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10698af9a7ee5Smrg fi 10699af9a7ee5Smrg have_ps2pdf=no 10700af9a7ee5Smrgelse 10701af9a7ee5Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10702af9a7ee5Smrgfi 10703af9a7ee5SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10704af9a7ee5Smrg]) # XORG_WITH_PS2PDF 10705caade7ccSmrg 10706af9a7ee5Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10707af9a7ee5Smrg# ---------------- 10708af9a7ee5Smrg# Minimum version: 1.6.0 10709af9a7ee5Smrg# 10710af9a7ee5Smrg# Documentation tools are not always available on all platforms and sometimes 10711af9a7ee5Smrg# not at the appropriate level. This macro enables a builder to skip all 10712af9a7ee5Smrg# documentation targets except traditional man pages. 10713af9a7ee5Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10714af9a7ee5Smrg# maximum flexibilty in controlling documentation building. 10715af9a7ee5Smrg# Refer to: 10716af9a7ee5Smrg# XORG_WITH_XMLTO --with-xmlto 10717af9a7ee5Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10718af9a7ee5Smrg# XORG_WITH_DOXYGEN --with-doxygen 10719af9a7ee5Smrg# XORG_WITH_FOP --with-fop 10720af9a7ee5Smrg# XORG_WITH_GROFF --with-groff 10721af9a7ee5Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10722af9a7ee5Smrg# 10723af9a7ee5Smrg# Interface to module: 10724af9a7ee5Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10725af9a7ee5Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10726af9a7ee5Smrg# 'no' user instructs the module not to generate docs 10727af9a7ee5Smrg# parm1: specify the default value, yes or no. 10728af9a7ee5Smrg# 10729af9a7ee5SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10730af9a7ee5Smrgm4_define([docs_default], m4_default([$1], [yes])) 10731af9a7ee5SmrgAC_ARG_ENABLE(docs, 10732af9a7ee5Smrg AS_HELP_STRING([--enable-docs], 10733af9a7ee5Smrg [Enable building the documentation (default: ]docs_default[)]), 10734af9a7ee5Smrg [build_docs=$enableval], [build_docs=]docs_default) 10735af9a7ee5Smrgm4_undefine([docs_default]) 10736af9a7ee5SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10737af9a7ee5SmrgAC_MSG_CHECKING([whether to build documentation]) 10738af9a7ee5SmrgAC_MSG_RESULT([$build_docs]) 10739af9a7ee5Smrg]) # XORG_ENABLE_DOCS 10740caade7ccSmrg 10741af9a7ee5Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10742af9a7ee5Smrg# ---------------- 10743af9a7ee5Smrg# Minimum version: 1.6.0 10744af9a7ee5Smrg# 10745af9a7ee5Smrg# This macro enables a builder to skip all developer documentation. 10746af9a7ee5Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10747af9a7ee5Smrg# maximum flexibilty in controlling documentation building. 10748af9a7ee5Smrg# Refer to: 10749af9a7ee5Smrg# XORG_WITH_XMLTO --with-xmlto 10750af9a7ee5Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10751af9a7ee5Smrg# XORG_WITH_DOXYGEN --with-doxygen 10752af9a7ee5Smrg# XORG_WITH_FOP --with-fop 10753af9a7ee5Smrg# XORG_WITH_GROFF --with-groff 10754af9a7ee5Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10755af9a7ee5Smrg# 10756af9a7ee5Smrg# Interface to module: 10757af9a7ee5Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10758af9a7ee5Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10759af9a7ee5Smrg# 'no' user instructs the module not to generate developer docs 10760af9a7ee5Smrg# parm1: specify the default value, yes or no. 10761af9a7ee5Smrg# 10762af9a7ee5SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10763af9a7ee5Smrgm4_define([devel_default], m4_default([$1], [yes])) 10764af9a7ee5SmrgAC_ARG_ENABLE(devel-docs, 10765af9a7ee5Smrg AS_HELP_STRING([--enable-devel-docs], 10766af9a7ee5Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10767af9a7ee5Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10768af9a7ee5Smrgm4_undefine([devel_default]) 10769af9a7ee5SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10770af9a7ee5SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10771af9a7ee5SmrgAC_MSG_RESULT([$build_devel_docs]) 10772af9a7ee5Smrg]) # XORG_ENABLE_DEVEL_DOCS 10773caade7ccSmrg 10774af9a7ee5Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10775af9a7ee5Smrg# ---------------- 10776af9a7ee5Smrg# Minimum version: 1.6.0 10777af9a7ee5Smrg# 10778af9a7ee5Smrg# This macro enables a builder to skip all functional specification targets. 10779af9a7ee5Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10780af9a7ee5Smrg# maximum flexibilty in controlling documentation building. 10781af9a7ee5Smrg# Refer to: 10782af9a7ee5Smrg# XORG_WITH_XMLTO --with-xmlto 10783af9a7ee5Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10784af9a7ee5Smrg# XORG_WITH_DOXYGEN --with-doxygen 10785af9a7ee5Smrg# XORG_WITH_FOP --with-fop 10786af9a7ee5Smrg# XORG_WITH_GROFF --with-groff 10787af9a7ee5Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10788af9a7ee5Smrg# 10789af9a7ee5Smrg# Interface to module: 10790af9a7ee5Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10791af9a7ee5Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10792af9a7ee5Smrg# 'no' user instructs the module not to generate specs 10793af9a7ee5Smrg# parm1: specify the default value, yes or no. 10794af9a7ee5Smrg# 10795af9a7ee5SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10796af9a7ee5Smrgm4_define([spec_default], m4_default([$1], [yes])) 10797af9a7ee5SmrgAC_ARG_ENABLE(specs, 10798af9a7ee5Smrg AS_HELP_STRING([--enable-specs], 10799af9a7ee5Smrg [Enable building the specs (default: ]spec_default[)]), 10800af9a7ee5Smrg [build_specs=$enableval], [build_specs=]spec_default) 10801af9a7ee5Smrgm4_undefine([spec_default]) 10802af9a7ee5SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10803af9a7ee5SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10804af9a7ee5SmrgAC_MSG_RESULT([$build_specs]) 10805af9a7ee5Smrg]) # XORG_ENABLE_SPECS 10806485f0483Smrg 10807af9a7ee5Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10808af9a7ee5Smrg# ---------------------------------------------- 10809af9a7ee5Smrg# Minimum version: 1.13.0 10810af9a7ee5Smrg# 10811af9a7ee5Smrg# This macro enables a builder to enable/disable unit testing 10812af9a7ee5Smrg# It makes no assumption about the test cases implementation 10813af9a7ee5Smrg# Test cases may or may not use Automake "Support for test suites" 10814af9a7ee5Smrg# They may or may not use the software utility library GLib 10815af9a7ee5Smrg# 10816af9a7ee5Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10817af9a7ee5Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10818af9a7ee5Smrg# The variable enable_unit_tests is used by other macros in this file. 10819af9a7ee5Smrg# 10820af9a7ee5Smrg# Interface to module: 10821af9a7ee5Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10822af9a7ee5Smrg# enable_unit_tests: used in configure.ac for additional configuration 10823af9a7ee5Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10824af9a7ee5Smrg# 'no' user instructs the module not to build tests 10825af9a7ee5Smrg# parm1: specify the default value, yes or no. 10826af9a7ee5Smrg# 10827af9a7ee5SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10828af9a7ee5SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10829af9a7ee5SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10830af9a7ee5SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10831af9a7ee5Smrgm4_define([_defopt], m4_default([$1], [auto])) 10832af9a7ee5SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10833af9a7ee5Smrg [Enable building unit test cases (default: ]_defopt[)]), 10834af9a7ee5Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10835af9a7ee5Smrgm4_undefine([_defopt]) 10836af9a7ee5SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10837af9a7ee5SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10838af9a7ee5SmrgAC_MSG_RESULT([$enable_unit_tests]) 10839af9a7ee5Smrg]) # XORG_ENABLE_UNIT_TESTS 10840485f0483Smrg 10841af9a7ee5Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10842af9a7ee5Smrg# ------------------------------------------------------ 10843af9a7ee5Smrg# Minimum version: 1.17.0 10844af9a7ee5Smrg# 10845af9a7ee5Smrg# This macro enables a builder to enable/disable integration testing 10846af9a7ee5Smrg# It makes no assumption about the test cases' implementation 10847af9a7ee5Smrg# Test cases may or may not use Automake "Support for test suites" 10848af9a7ee5Smrg# 10849af9a7ee5Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10850af9a7ee5Smrg# usually requires less dependencies and may be built and run under less 10851af9a7ee5Smrg# stringent environments than integration tests. 10852af9a7ee5Smrg# 10853af9a7ee5Smrg# Interface to module: 10854af9a7ee5Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10855af9a7ee5Smrg# enable_integration_tests: used in configure.ac for additional configuration 10856af9a7ee5Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10857af9a7ee5Smrg# 'no' user instructs the module not to build tests 10858af9a7ee5Smrg# parm1: specify the default value, yes or no. 10859af9a7ee5Smrg# 10860af9a7ee5SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10861af9a7ee5SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10862af9a7ee5Smrgm4_define([_defopt], m4_default([$1], [auto])) 10863af9a7ee5SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10864af9a7ee5Smrg [Enable building integration test cases (default: ]_defopt[)]), 10865af9a7ee5Smrg [enable_integration_tests=$enableval], 10866af9a7ee5Smrg [enable_integration_tests=]_defopt) 10867af9a7ee5Smrgm4_undefine([_defopt]) 10868af9a7ee5SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10869af9a7ee5Smrg [test "x$enable_integration_tests" != xno]) 10870af9a7ee5SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10871af9a7ee5SmrgAC_MSG_RESULT([$enable_integration_tests]) 10872af9a7ee5Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10873485f0483Smrg 10874af9a7ee5Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10875af9a7ee5Smrg# ---------------------------------------- 10876af9a7ee5Smrg# Minimum version: 1.13.0 10877af9a7ee5Smrg# 10878af9a7ee5Smrg# GLib is a library which provides advanced data structures and functions. 10879af9a7ee5Smrg# This macro enables a module to test for the presence of Glib. 10880af9a7ee5Smrg# 10881af9a7ee5Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10882af9a7ee5Smrg# Otherwise the value of $enable_unit_tests is blank. 10883af9a7ee5Smrg# 10884af9a7ee5Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10885af9a7ee5Smrg# test support usually requires less dependencies and may be built and run under 10886af9a7ee5Smrg# less stringent environments than integration tests. 10887af9a7ee5Smrg# 10888af9a7ee5Smrg# Interface to module: 10889af9a7ee5Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10890af9a7ee5Smrg# with_glib: used in configure.ac to know if GLib has been found 10891af9a7ee5Smrg# --with-glib: 'yes' user instructs the module to use glib 10892af9a7ee5Smrg# 'no' user instructs the module not to use glib 10893af9a7ee5Smrg# 10894af9a7ee5SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10895af9a7ee5SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10896af9a7ee5Smrgm4_define([_defopt], m4_default([$2], [auto])) 10897af9a7ee5SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10898af9a7ee5Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10899af9a7ee5Smrg [with_glib=$withval], [with_glib=]_defopt) 10900af9a7ee5Smrgm4_undefine([_defopt]) 10901485f0483Smrg 10902af9a7ee5Smrghave_glib=no 10903af9a7ee5Smrg# Do not probe GLib if user explicitly disabled unit testing 10904af9a7ee5Smrgif test "x$enable_unit_tests" != x"no"; then 10905af9a7ee5Smrg # Do not probe GLib if user explicitly disabled it 10906af9a7ee5Smrg if test "x$with_glib" != x"no"; then 10907af9a7ee5Smrg m4_ifval( 10908af9a7ee5Smrg [$1], 10909af9a7ee5Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10910af9a7ee5Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10911af9a7ee5Smrg ) 10912af9a7ee5Smrg fi 10913af9a7ee5Smrgfi 10914b9b4fd27Smrg 10915af9a7ee5Smrg# Not having GLib when unit testing has been explicitly requested is an error 10916af9a7ee5Smrgif test "x$enable_unit_tests" = x"yes"; then 10917af9a7ee5Smrg if test "x$have_glib" = x"no"; then 10918af9a7ee5Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10919af9a7ee5Smrg fi 10920af9a7ee5Smrgfi 10921b9b4fd27Smrg 10922af9a7ee5Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10923af9a7ee5Smrgif test "x$enable_unit_tests" = x"no"; then 10924af9a7ee5Smrg if test "x$with_glib" = x"yes"; then 10925af9a7ee5Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10926af9a7ee5Smrg fi 10927af9a7ee5Smrgfi 10928caade7ccSmrg 10929af9a7ee5Smrg# Not having GLib when it has been explicitly requested is an error 10930af9a7ee5Smrgif test "x$with_glib" = x"yes"; then 10931af9a7ee5Smrg if test "x$have_glib" = x"no"; then 10932af9a7ee5Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10933af9a7ee5Smrg fi 10934af9a7ee5Smrgfi 10935caade7ccSmrg 10936af9a7ee5SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10937af9a7ee5Smrg]) # XORG_WITH_GLIB 10938caade7ccSmrg 10939af9a7ee5Smrg# XORG_LD_WRAP([required|optional]) 10940af9a7ee5Smrg# --------------------------------- 10941af9a7ee5Smrg# Minimum version: 1.13.0 10942af9a7ee5Smrg# 10943af9a7ee5Smrg# Check if linker supports -wrap, passed via compiler flags 10944af9a7ee5Smrg# 10945af9a7ee5Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10946af9a7ee5Smrg# Otherwise the value of $enable_unit_tests is blank. 10947af9a7ee5Smrg# 10948af9a7ee5Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10949af9a7ee5Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10950af9a7ee5Smrg# available, an argument of "optional" allows use when some unit tests require 10951af9a7ee5Smrg# ld -wrap and others do not. 10952af9a7ee5Smrg# 10953af9a7ee5SmrgAC_DEFUN([XORG_LD_WRAP],[ 10954af9a7ee5SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10955af9a7ee5Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10956af9a7ee5Smrg void __wrap_exit(int status) { return; }], 10957af9a7ee5Smrg [exit(0);])]) 10958af9a7ee5Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10959af9a7ee5Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10960af9a7ee5Smrg if test "x$have_ld_wrap" = x"no"; then 10961af9a7ee5Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10962af9a7ee5Smrg fi 10963af9a7ee5Smrgfi 10964af9a7ee5SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10965af9a7ee5Smrg# 10966af9a7ee5Smrg]) # XORG_LD_WRAP 10967b9b4fd27Smrg 10968af9a7ee5Smrg# XORG_CHECK_LINKER_FLAGS 10969af9a7ee5Smrg# ----------------------- 10970af9a7ee5Smrg# SYNOPSIS 10971af9a7ee5Smrg# 10972af9a7ee5Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10973af9a7ee5Smrg# 10974af9a7ee5Smrg# DESCRIPTION 10975af9a7ee5Smrg# 10976af9a7ee5Smrg# Check whether the given linker FLAGS work with the current language's 10977af9a7ee5Smrg# linker, or whether they give an error. 10978af9a7ee5Smrg# 10979af9a7ee5Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10980af9a7ee5Smrg# success/failure. 10981af9a7ee5Smrg# 10982af9a7ee5Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10983af9a7ee5Smrg# 10984af9a7ee5Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10985af9a7ee5Smrg# 10986af9a7ee5Smrg# LICENSE 10987af9a7ee5Smrg# 10988af9a7ee5Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10989af9a7ee5Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10990af9a7ee5Smrg# Copyright (c) 2009 Matteo Frigo 10991af9a7ee5Smrg# 10992af9a7ee5Smrg# This program is free software: you can redistribute it and/or modify it 10993af9a7ee5Smrg# under the terms of the GNU General Public License as published by the 10994af9a7ee5Smrg# Free Software Foundation, either version 3 of the License, or (at your 10995af9a7ee5Smrg# option) any later version. 10996af9a7ee5Smrg# 10997af9a7ee5Smrg# This program is distributed in the hope that it will be useful, but 10998af9a7ee5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10999af9a7ee5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11000af9a7ee5Smrg# Public License for more details. 11001af9a7ee5Smrg# 11002af9a7ee5Smrg# You should have received a copy of the GNU General Public License along 11003af9a7ee5Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 11004af9a7ee5Smrg# 11005af9a7ee5Smrg# As a special exception, the respective Autoconf Macro's copyright owner 11006af9a7ee5Smrg# gives unlimited permission to copy, distribute and modify the configure 11007af9a7ee5Smrg# scripts that are the output of Autoconf when processing the Macro. You 11008af9a7ee5Smrg# need not follow the terms of the GNU General Public License when using 11009af9a7ee5Smrg# or distributing such scripts, even though portions of the text of the 11010af9a7ee5Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 11011af9a7ee5Smrg# all other use of the material that constitutes the Autoconf Macro. 11012af9a7ee5Smrg# 11013af9a7ee5Smrg# This special exception to the GPL applies to versions of the Autoconf 11014af9a7ee5Smrg# Macro released by the Autoconf Archive. When you make and distribute a 11015af9a7ee5Smrg# modified version of the Autoconf Macro, you may extend this special 11016af9a7ee5Smrg# exception to the GPL to apply to your modified version as well.# 11017af9a7ee5SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11018af9a7ee5Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 11019af9a7ee5Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11020af9a7ee5SmrgAS_LITERAL_IF([$1], 11021af9a7ee5Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11022af9a7ee5Smrg ax_save_FLAGS=$LDFLAGS 11023af9a7ee5Smrg LDFLAGS="$1" 11024af9a7ee5Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11025af9a7ee5Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11026af9a7ee5Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11027af9a7ee5Smrg LDFLAGS=$ax_save_FLAGS])], 11028af9a7ee5Smrg [ax_save_FLAGS=$LDFLAGS 11029af9a7ee5Smrg LDFLAGS="$1" 11030af9a7ee5Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11031af9a7ee5Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11032af9a7ee5Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11033af9a7ee5Smrg LDFLAGS=$ax_save_FLAGS]) 11034af9a7ee5Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11035af9a7ee5SmrgAC_MSG_RESULT($xorg_check_linker_flags) 11036af9a7ee5Smrgif test "x$xorg_check_linker_flags" = xyes; then 11037af9a7ee5Smrg m4_default([$2], :) 11038af9a7ee5Smrgelse 11039af9a7ee5Smrg m4_default([$3], :) 11040af9a7ee5Smrgfi 11041af9a7ee5Smrg]) # XORG_CHECK_LINKER_FLAGS 11042b9b4fd27Smrg 11043af9a7ee5Smrg# XORG_MEMORY_CHECK_FLAGS 11044af9a7ee5Smrg# ----------------------- 11045af9a7ee5Smrg# Minimum version: 1.16.0 11046caade7ccSmrg# 11047af9a7ee5Smrg# This macro attempts to find appropriate memory checking functionality 11048af9a7ee5Smrg# for various platforms which unit testing code may use to catch various 11049af9a7ee5Smrg# forms of memory allocation and access errors in testing. 11050caade7ccSmrg# 11051af9a7ee5Smrg# Interface to module: 11052af9a7ee5Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11053af9a7ee5Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 11054af9a7ee5Smrg# 11055af9a7ee5Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11056af9a7ee5Smrg# 11057af9a7ee5SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11058caade7ccSmrg 11059af9a7ee5SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11060af9a7ee5SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11061af9a7ee5Smrg [Environment variables to enable memory checking in tests]) 11062caade7ccSmrg 11063af9a7ee5Smrg# Check for different types of support on different platforms 11064af9a7ee5Smrgcase $host_os in 11065af9a7ee5Smrg solaris*) 11066af9a7ee5Smrg AC_CHECK_LIB([umem], [umem_alloc], 11067af9a7ee5Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11068af9a7ee5Smrg ;; 11069af9a7ee5Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11070af9a7ee5Smrg # both directly and inverted, so should not be 0 or 255. 11071af9a7ee5Smrg malloc_debug_env='MALLOC_PERTURB_=15' 11072af9a7ee5Smrg ;; 11073af9a7ee5Smrg darwin*) 11074af9a7ee5Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11075af9a7ee5Smrg ;; 11076af9a7ee5Smrg *bsd*) 11077af9a7ee5Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11078af9a7ee5Smrg ;; 11079af9a7ee5Smrgesac 11080caade7ccSmrg 11081af9a7ee5Smrg# User supplied flags override default flags 11082af9a7ee5Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11083af9a7ee5Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11084af9a7ee5Smrgfi 11085b9b4fd27Smrg 11086af9a7ee5SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11087af9a7ee5Smrg]) # XORG_WITH_LINT 11088b9b4fd27Smrg 11089af9a7ee5Smrg# XORG_CHECK_MALLOC_ZERO 11090af9a7ee5Smrg# ---------------------- 11091af9a7ee5Smrg# Minimum version: 1.0.0 11092af9a7ee5Smrg# 11093af9a7ee5Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11094af9a7ee5Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 11095af9a7ee5Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11096af9a7ee5SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11097af9a7ee5SmrgAC_ARG_ENABLE(malloc0returnsnull, 11098af9a7ee5Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 11099af9a7ee5Smrg [malloc(0) returns NULL (default: auto)]), 11100af9a7ee5Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11101af9a7ee5Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11102b9b4fd27Smrg 11103af9a7ee5SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11104af9a7ee5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11105af9a7ee5Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11106af9a7ee5Smrg#include <stdlib.h> 11107af9a7ee5Smrg],[ 11108af9a7ee5Smrg char *m0, *r0, *c0, *p; 11109af9a7ee5Smrg m0 = malloc(0); 11110af9a7ee5Smrg p = malloc(10); 11111af9a7ee5Smrg r0 = realloc(p,0); 11112af9a7ee5Smrg c0 = calloc(0,10); 11113af9a7ee5Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11114af9a7ee5Smrg])], 11115af9a7ee5Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 11116af9a7ee5Smrg [MALLOC_ZERO_RETURNS_NULL=no], 11117af9a7ee5Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 11118af9a7ee5Smrgfi 11119af9a7ee5SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11120af9a7ee5Smrg 11121af9a7ee5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11122af9a7ee5Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11123af9a7ee5Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11124af9a7ee5Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11125af9a7ee5Smrgelse 11126af9a7ee5Smrg MALLOC_ZERO_CFLAGS="" 11127af9a7ee5Smrg XMALLOC_ZERO_CFLAGS="" 11128af9a7ee5Smrg XTMALLOC_ZERO_CFLAGS="" 11129af9a7ee5Smrgfi 11130b9b4fd27Smrg 11131af9a7ee5SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11132af9a7ee5SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11133af9a7ee5SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11134af9a7ee5Smrg]) # XORG_CHECK_MALLOC_ZERO 11135b9b4fd27Smrg 11136af9a7ee5Smrg# XORG_WITH_LINT() 11137af9a7ee5Smrg# ---------------- 11138af9a7ee5Smrg# Minimum version: 1.1.0 11139b9b4fd27Smrg# 11140af9a7ee5Smrg# This macro enables the use of a tool that flags some suspicious and 11141af9a7ee5Smrg# non-portable constructs (likely to be bugs) in C language source code. 11142af9a7ee5Smrg# It will attempt to locate the tool and use appropriate options. 11143af9a7ee5Smrg# There are various lint type tools on different platforms. 11144af9a7ee5Smrg# 11145af9a7ee5Smrg# Interface to module: 11146af9a7ee5Smrg# LINT: returns the path to the tool found on the platform 11147af9a7ee5Smrg# or the value set to LINT on the configure cmd line 11148af9a7ee5Smrg# also an Automake conditional 11149af9a7ee5Smrg# LINT_FLAGS: an Automake variable with appropriate flags 11150af9a7ee5Smrg# 11151af9a7ee5Smrg# --with-lint: 'yes' user instructs the module to use lint 11152af9a7ee5Smrg# 'no' user instructs the module not to use lint (default) 11153af9a7ee5Smrg# 11154af9a7ee5Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11155af9a7ee5Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11156af9a7ee5Smrg# 11157af9a7ee5SmrgAC_DEFUN([XORG_WITH_LINT],[ 11158b9b4fd27Smrg 11159af9a7ee5SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11160af9a7ee5SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11161af9a7ee5SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11162af9a7ee5Smrg [Use a lint-style source code checker (default: disabled)])], 11163af9a7ee5Smrg [use_lint=$withval], [use_lint=no]) 11164b9b4fd27Smrg 11165af9a7ee5Smrg# Obtain platform specific info like program name and options 11166af9a7ee5Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11167af9a7ee5Smrgcase $host_os in 11168af9a7ee5Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11169af9a7ee5Smrg lint_name=splint 11170af9a7ee5Smrg lint_options="-badflag" 11171af9a7ee5Smrg ;; 11172af9a7ee5Smrg *freebsd* | *netbsd*) 11173af9a7ee5Smrg lint_name=lint 11174af9a7ee5Smrg lint_options="-u -b" 11175af9a7ee5Smrg ;; 11176af9a7ee5Smrg *solaris*) 11177af9a7ee5Smrg lint_name=lint 11178af9a7ee5Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11179af9a7ee5Smrg ;; 11180af9a7ee5Smrgesac 11181b9b4fd27Smrg 11182af9a7ee5Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11183af9a7ee5Smrgif test "x$use_lint" = x"yes" ; then 11184af9a7ee5Smrg AC_PATH_PROG([LINT], [$lint_name]) 11185af9a7ee5Smrg if test "x$LINT" = "x"; then 11186af9a7ee5Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11187af9a7ee5Smrg fi 11188af9a7ee5Smrgelif test "x$use_lint" = x"no" ; then 11189af9a7ee5Smrg if test "x$LINT" != "x"; then 11190af9a7ee5Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11191af9a7ee5Smrg fi 11192af9a7ee5Smrgelse 11193af9a7ee5Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11194af9a7ee5Smrgfi 11195b9b4fd27Smrg 11196af9a7ee5Smrg# User supplied flags override default flags 11197af9a7ee5Smrgif test "x$LINT_FLAGS" != "x"; then 11198af9a7ee5Smrg lint_options=$LINT_FLAGS 11199af9a7ee5Smrgfi 11200b9b4fd27Smrg 11201af9a7ee5SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11202af9a7ee5SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11203b9b4fd27Smrg 11204af9a7ee5Smrg]) # XORG_WITH_LINT 11205b9b4fd27Smrg 11206af9a7ee5Smrg# XORG_LINT_LIBRARY(LIBNAME) 11207af9a7ee5Smrg# -------------------------- 11208af9a7ee5Smrg# Minimum version: 1.1.0 11209af9a7ee5Smrg# 11210af9a7ee5Smrg# Sets up flags for building lint libraries for checking programs that call 11211af9a7ee5Smrg# functions in the library. 11212af9a7ee5Smrg# 11213af9a7ee5Smrg# Interface to module: 11214af9a7ee5Smrg# LINTLIB - Automake variable with the name of lint library file to make 11215af9a7ee5Smrg# MAKE_LINT_LIB - Automake conditional 11216af9a7ee5Smrg# 11217af9a7ee5Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11218af9a7ee5Smrg# - 'no' user instructs the module not to create a lint library (default) 11219485f0483Smrg 11220af9a7ee5SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11221af9a7ee5SmrgAC_REQUIRE([XORG_WITH_LINT]) 11222af9a7ee5SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11223af9a7ee5Smrg [Create lint library (default: disabled)])], 11224af9a7ee5Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11225485f0483Smrg 11226af9a7ee5Smrgif test "x$make_lint_lib" = x"yes" ; then 11227af9a7ee5Smrg LINTLIB=llib-l$1.ln 11228af9a7ee5Smrg if test "x$LINT" = "x"; then 11229af9a7ee5Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11230af9a7ee5Smrg fi 11231af9a7ee5Smrgelif test "x$make_lint_lib" != x"no" ; then 11232af9a7ee5Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11233af9a7ee5Smrgfi 11234caade7ccSmrg 11235af9a7ee5SmrgAC_SUBST(LINTLIB) 11236af9a7ee5SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11237caade7ccSmrg 11238af9a7ee5Smrg]) # XORG_LINT_LIBRARY 11239af9a7ee5Smrg 11240af9a7ee5Smrg# XORG_COMPILER_BRAND 11241af9a7ee5Smrg# ------------------- 11242af9a7ee5Smrg# Minimum version: 1.14.0 11243af9a7ee5Smrg# 11244af9a7ee5Smrg# Checks for various brands of compilers and sets flags as appropriate: 11245af9a7ee5Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11246af9a7ee5Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11247af9a7ee5Smrg# clang compiler - sets CLANGCC to "yes" 11248af9a7ee5Smrg# Intel compiler - sets INTELCC to "yes" 11249af9a7ee5Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11250af9a7ee5Smrg# 11251af9a7ee5SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 11252af9a7ee5SmrgAC_LANG_CASE( 11253af9a7ee5Smrg [C], [ 11254af9a7ee5Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11255af9a7ee5Smrg ], 11256af9a7ee5Smrg [C++], [ 11257af9a7ee5Smrg AC_REQUIRE([AC_PROG_CXX]) 11258af9a7ee5Smrg ] 11259af9a7ee5Smrg) 11260af9a7ee5SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11261af9a7ee5SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11262af9a7ee5SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11263af9a7ee5Smrg]) # XORG_COMPILER_BRAND 11264caade7ccSmrg 11265af9a7ee5Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11266af9a7ee5Smrg# --------------- 11267af9a7ee5Smrg# Minimum version: 1.16.0 11268af9a7ee5Smrg# 11269af9a7ee5Smrg# Test if the compiler works when passed the given flag as a command line argument. 11270af9a7ee5Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11271af9a7ee5Smrg# next flag in the list until there are no more options. 11272af9a7ee5Smrg# 11273af9a7ee5Smrg# Note that this does not guarantee that the compiler supports the flag as some 11274af9a7ee5Smrg# compilers will simply ignore arguments that they do not understand, but we do 11275af9a7ee5Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 11276af9a7ee5Smrg# -Werror=unused-command-line-argument 11277af9a7ee5Smrg# 11278af9a7ee5SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 11279af9a7ee5Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11280af9a7ee5Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11281af9a7ee5Smrg 11282af9a7ee5SmrgAC_LANG_COMPILER_REQUIRE 11283af9a7ee5Smrg 11284af9a7ee5SmrgAC_LANG_CASE( 11285af9a7ee5Smrg [C], [ 11286af9a7ee5Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11287af9a7ee5Smrg define([PREFIX], [C]) 11288af9a7ee5Smrg define([CACHE_PREFIX], [cc]) 11289af9a7ee5Smrg define([COMPILER], [$CC]) 11290af9a7ee5Smrg ], 11291af9a7ee5Smrg [C++], [ 11292af9a7ee5Smrg define([PREFIX], [CXX]) 11293af9a7ee5Smrg define([CACHE_PREFIX], [cxx]) 11294af9a7ee5Smrg define([COMPILER], [$CXX]) 11295af9a7ee5Smrg ] 11296af9a7ee5Smrg) 11297485f0483Smrg 11298af9a7ee5Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11299af9a7ee5Smrg 11300af9a7ee5Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11301af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11302af9a7ee5Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11303af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11304af9a7ee5Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11305af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11306af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11307af9a7ee5Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11308af9a7ee5Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11309af9a7ee5Smrgfi 11310caade7ccSmrg 11311af9a7ee5Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11312af9a7ee5Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11313af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11314af9a7ee5Smrg fi 11315af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11316af9a7ee5Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11317af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11318af9a7ee5Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11319af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11320af9a7ee5Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11321af9a7ee5Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11322af9a7ee5Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11323af9a7ee5Smrgfi 11324485f0483Smrg 11325af9a7ee5Smrgfound="no" 11326af9a7ee5Smrgm4_foreach([flag], m4_cdr($@), [ 11327af9a7ee5Smrg if test $found = "no" ; then 11328af9a7ee5Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 11329af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11330af9a7ee5Smrg fi 11331af9a7ee5Smrg 11332af9a7ee5Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 11333af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11334af9a7ee5Smrg fi 11335af9a7ee5Smrg 11336af9a7ee5Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11337af9a7ee5Smrg 11338af9a7ee5Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11339af9a7ee5Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11340af9a7ee5Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11341af9a7ee5Smrg AC_CACHE_VAL($cacheid, 11342af9a7ee5Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11343af9a7ee5Smrg [eval $cacheid=yes], 11344af9a7ee5Smrg [eval $cacheid=no])]) 11345af9a7ee5Smrg 11346af9a7ee5Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11347af9a7ee5Smrg 11348af9a7ee5Smrg eval supported=\$$cacheid 11349af9a7ee5Smrg AC_MSG_RESULT([$supported]) 11350af9a7ee5Smrg if test "$supported" = "yes" ; then 11351af9a7ee5Smrg $1="$$1 ]flag[" 11352af9a7ee5Smrg found="yes" 11353af9a7ee5Smrg fi 11354af9a7ee5Smrg fi 11355b9b4fd27Smrg]) 11356af9a7ee5Smrg]) # XORG_TESTSET_CFLAG 11357485f0483Smrg 11358af9a7ee5Smrg# XORG_COMPILER_FLAGS 11359af9a7ee5Smrg# --------------- 11360af9a7ee5Smrg# Minimum version: 1.16.0 11361b9b4fd27Smrg# 11362af9a7ee5Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11363af9a7ee5Smrg# arguments supported by the selected compiler which do NOT alter the generated 11364af9a7ee5Smrg# code. These arguments will cause the compiler to print various warnings 11365af9a7ee5Smrg# during compilation AND turn a conservative set of warnings into errors. 11366b9b4fd27Smrg# 11367af9a7ee5Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11368af9a7ee5Smrg# future versions of util-macros as options are added to new compilers. 11369af9a7ee5Smrg# 11370af9a7ee5SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 11371af9a7ee5SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11372caade7ccSmrg 11373af9a7ee5SmrgAC_ARG_ENABLE(selective-werror, 11374af9a7ee5Smrg AS_HELP_STRING([--disable-selective-werror], 11375af9a7ee5Smrg [Turn off selective compiler errors. (default: enabled)]), 11376af9a7ee5Smrg [SELECTIVE_WERROR=$enableval], 11377af9a7ee5Smrg [SELECTIVE_WERROR=yes]) 11378af9a7ee5Smrg 11379af9a7ee5SmrgAC_LANG_CASE( 11380af9a7ee5Smrg [C], [ 11381af9a7ee5Smrg define([PREFIX], [C]) 11382af9a7ee5Smrg ], 11383af9a7ee5Smrg [C++], [ 11384af9a7ee5Smrg define([PREFIX], [CXX]) 11385af9a7ee5Smrg ] 11386af9a7ee5Smrg) 11387af9a7ee5Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 11388af9a7ee5Smrgif test "x$SUNCC" = "xyes"; then 11389af9a7ee5Smrg [BASE_]PREFIX[FLAGS]="-v" 11390af9a7ee5Smrgelse 11391af9a7ee5Smrg [BASE_]PREFIX[FLAGS]="" 11392af9a7ee5Smrgfi 11393caade7ccSmrg 11394af9a7ee5Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11395af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11396af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11397af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11398af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11399af9a7ee5Smrg 11400af9a7ee5SmrgAC_LANG_CASE( 11401af9a7ee5Smrg [C], [ 11402af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11403af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11404af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11405af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11406af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 11407af9a7ee5Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11408af9a7ee5Smrg ] 11409af9a7ee5Smrg) 11410caade7ccSmrg 11411af9a7ee5Smrg# This chunk adds additional warnings that could catch undesired effects. 11412af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11413af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11414af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11415af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11416af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11417af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11418af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11419af9a7ee5Smrg 11420af9a7ee5Smrg# These are currently disabled because they are noisy. They will be enabled 11421af9a7ee5Smrg# in the future once the codebase is sufficiently modernized to silence 11422af9a7ee5Smrg# them. For now, I don't want them to drown out the other warnings. 11423af9a7ee5Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11424af9a7ee5Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11425af9a7ee5Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11426af9a7ee5Smrg 11427af9a7ee5Smrg# Turn some warnings into errors, so we don't accidently get successful builds 11428af9a7ee5Smrg# when there are problems that should be fixed. 11429af9a7ee5Smrg 11430af9a7ee5Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11431af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11432af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11433af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11434af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11435af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11436af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11437af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11438af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11439af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11440af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11441af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11442af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11443af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11444af9a7ee5Smrgelse 11445af9a7ee5SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 11446af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11447af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11448af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11449af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11450af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11451af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11452af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11453af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11454af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11455af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11456af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11457af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11458af9a7ee5SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11459af9a7ee5Smrgfi 11460b9b4fd27Smrg 11461af9a7ee5SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11462af9a7ee5Smrg]) # XORG_COMPILER_FLAGS 11463b9b4fd27Smrg 11464af9a7ee5Smrg# XORG_CWARNFLAGS 11465af9a7ee5Smrg# --------------- 11466af9a7ee5Smrg# Minimum version: 1.2.0 11467af9a7ee5Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11468b9b4fd27Smrg# 11469af9a7ee5Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11470b9b4fd27Smrg# 11471af9a7ee5Smrg# This function is deprecated because it defines -fno-strict-aliasing 11472af9a7ee5Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11473af9a7ee5Smrg# is needed, then it should be added explicitly in the module when 11474af9a7ee5Smrg# it is updated to use BASE_CFLAGS. 11475af9a7ee5Smrg# 11476af9a7ee5SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11477af9a7ee5SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11478af9a7ee5SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11479af9a7ee5SmrgAC_LANG_CASE( 11480af9a7ee5Smrg [C], [ 11481af9a7ee5Smrg CWARNFLAGS="$BASE_CFLAGS" 11482af9a7ee5Smrg if test "x$GCC" = xyes ; then 11483af9a7ee5Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11484af9a7ee5Smrg fi 11485af9a7ee5Smrg AC_SUBST(CWARNFLAGS) 11486af9a7ee5Smrg ] 11487af9a7ee5Smrg) 11488af9a7ee5Smrg]) # XORG_CWARNFLAGS 11489b9b4fd27Smrg 11490af9a7ee5Smrg# XORG_STRICT_OPTION 11491af9a7ee5Smrg# ----------------------- 11492af9a7ee5Smrg# Minimum version: 1.3.0 11493af9a7ee5Smrg# 11494af9a7ee5Smrg# Add configure option to enable strict compilation flags, such as treating 11495af9a7ee5Smrg# warnings as fatal errors. 11496af9a7ee5Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11497af9a7ee5Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11498af9a7ee5Smrg# 11499af9a7ee5Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11500af9a7ee5Smrg# when strict compilation is unconditionally desired. 11501af9a7ee5SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11502af9a7ee5SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11503af9a7ee5SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11504b9b4fd27Smrg 11505af9a7ee5SmrgAC_ARG_ENABLE(strict-compilation, 11506af9a7ee5Smrg AS_HELP_STRING([--enable-strict-compilation], 11507af9a7ee5Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11508af9a7ee5Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11509af9a7ee5Smrg 11510af9a7ee5SmrgAC_LANG_CASE( 11511af9a7ee5Smrg [C], [ 11512af9a7ee5Smrg define([PREFIX], [C]) 11513af9a7ee5Smrg ], 11514af9a7ee5Smrg [C++], [ 11515af9a7ee5Smrg define([PREFIX], [CXX]) 11516af9a7ee5Smrg ] 11517af9a7ee5Smrg) 11518af9a7ee5Smrg 11519af9a7ee5Smrg[STRICT_]PREFIX[FLAGS]="" 11520af9a7ee5SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11521af9a7ee5SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11522af9a7ee5Smrg 11523af9a7ee5Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11524af9a7ee5Smrg# activate it with -Werror, so we add it here explicitly. 11525af9a7ee5SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11526af9a7ee5Smrg 11527af9a7ee5Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11528af9a7ee5Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11529af9a7ee5Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11530af9a7ee5Smrgfi 11531af9a7ee5SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11532af9a7ee5SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11533af9a7ee5SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11534af9a7ee5Smrg]) # XORG_STRICT_OPTION 11535af9a7ee5Smrg 11536af9a7ee5Smrg# XORG_DEFAULT_OPTIONS 11537af9a7ee5Smrg# -------------------- 11538af9a7ee5Smrg# Minimum version: 1.3.0 11539b9b4fd27Smrg# 11540af9a7ee5Smrg# Defines default options for X.Org modules. 11541b9b4fd27Smrg# 11542af9a7ee5SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11543af9a7ee5SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11544af9a7ee5SmrgXORG_COMPILER_FLAGS 11545af9a7ee5SmrgXORG_CWARNFLAGS 11546af9a7ee5SmrgXORG_STRICT_OPTION 11547af9a7ee5SmrgXORG_RELEASE_VERSION 11548af9a7ee5SmrgXORG_CHANGELOG 11549af9a7ee5SmrgXORG_INSTALL 11550af9a7ee5SmrgXORG_MANPAGE_SECTIONS 11551af9a7ee5Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11552af9a7ee5Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11553af9a7ee5Smrg]) # XORG_DEFAULT_OPTIONS 11554af9a7ee5Smrg 11555af9a7ee5Smrg# XORG_INSTALL() 11556af9a7ee5Smrg# ---------------- 11557af9a7ee5Smrg# Minimum version: 1.4.0 11558b9b4fd27Smrg# 11559af9a7ee5Smrg# Defines the variable INSTALL_CMD as the command to copy 11560af9a7ee5Smrg# INSTALL from $prefix/share/util-macros. 11561b9b4fd27Smrg# 11562af9a7ee5SmrgAC_DEFUN([XORG_INSTALL], [ 11563af9a7ee5SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11564af9a7ee5Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11565af9a7ee5SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11566af9a7ee5Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11567af9a7ee5Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11568af9a7ee5Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11569af9a7ee5SmrgAC_SUBST([INSTALL_CMD]) 11570af9a7ee5Smrg]) # XORG_INSTALL 11571af9a7ee5Smrgdnl Copyright 2005 Red Hat, Inc 11572af9a7ee5Smrgdnl 11573af9a7ee5Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11574af9a7ee5Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11575af9a7ee5Smrgdnl the above copyright notice appear in all copies and that both that 11576af9a7ee5Smrgdnl copyright notice and this permission notice appear in supporting 11577af9a7ee5Smrgdnl documentation. 11578af9a7ee5Smrgdnl 11579af9a7ee5Smrgdnl The above copyright notice and this permission notice shall be included 11580af9a7ee5Smrgdnl in all copies or substantial portions of the Software. 11581af9a7ee5Smrgdnl 11582af9a7ee5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11583af9a7ee5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11584af9a7ee5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11585af9a7ee5Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11586af9a7ee5Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11587af9a7ee5Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11588af9a7ee5Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11589af9a7ee5Smrgdnl 11590af9a7ee5Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11591af9a7ee5Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11592af9a7ee5Smrgdnl other dealings in this Software without prior written authorization 11593af9a7ee5Smrgdnl from the copyright holders. 11594af9a7ee5Smrgdnl 11595b9b4fd27Smrg 11596af9a7ee5Smrg# XORG_RELEASE_VERSION 11597af9a7ee5Smrg# -------------------- 11598af9a7ee5Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11599af9a7ee5Smrg 11600af9a7ee5SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11601af9a7ee5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11602af9a7ee5Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11603af9a7ee5Smrg [Major version of this package]) 11604af9a7ee5Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11605af9a7ee5Smrg if test "x$PVM" = "x"; then 11606af9a7ee5Smrg PVM="0" 11607af9a7ee5Smrg fi 11608af9a7ee5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11609af9a7ee5Smrg [$PVM], 11610af9a7ee5Smrg [Minor version of this package]) 11611af9a7ee5Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11612af9a7ee5Smrg if test "x$PVP" = "x"; then 11613af9a7ee5Smrg PVP="0" 11614af9a7ee5Smrg fi 11615af9a7ee5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11616af9a7ee5Smrg [$PVP], 11617af9a7ee5Smrg [Patch version of this package]) 11618af9a7ee5Smrg]) 11619b9b4fd27Smrg 11620af9a7ee5Smrg# XORG_CHANGELOG() 11621af9a7ee5Smrg# ---------------- 11622af9a7ee5Smrg# Minimum version: 1.2.0 11623af9a7ee5Smrg# 11624af9a7ee5Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11625af9a7ee5Smrg# ChangeLog from git. 11626af9a7ee5Smrg# 11627af9a7ee5Smrg# 11628af9a7ee5SmrgAC_DEFUN([XORG_CHANGELOG], [ 11629af9a7ee5SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11630af9a7ee5Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11631af9a7ee5Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11632af9a7ee5Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11633af9a7ee5SmrgAC_SUBST([CHANGELOG_CMD]) 11634af9a7ee5Smrg]) # XORG_CHANGELOG 11635caade7ccSmrg 11636