aclocal.m4 revision 14330f12
12378475aSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 295b296d0Smrg 395b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4e6f085baSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 595b296d0Smrg# This file is free software; the Free Software Foundation 695b296d0Smrg# gives unlimited permission to copy and/or distribute it, 795b296d0Smrg# with or without modifications, as long as this notice is preserved. 895b296d0Smrg 995b296d0Smrg# This program is distributed in the hope that it will be useful, 1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1295b296d0Smrg# PARTICULAR PURPOSE. 1395b296d0Smrg 14ff89ac2bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15ff89ac2bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1614330f12Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1714330f12Smrg[m4_warning([this file was generated for autoconf 2.68. 18ff89ac2bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ff89ac2bSmrgIf you have problems, you may need to regenerate the build system entirely. 20ff89ac2bSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21ff89ac2bSmrg 2214330f12Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 232378475aSmrg# 2414330f12Smrg# This file is free software; the Free Software Foundation 2514330f12Smrg# gives unlimited permission to copy and/or distribute it, 2614330f12Smrg# with or without modifications, as long as this notice is preserved. 2714330f12Smrg 2814330f12Smrg# AM_AUTOMAKE_VERSION(VERSION) 2914330f12Smrg# ---------------------------- 3014330f12Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3114330f12Smrg# generated from the m4 files accompanying Automake X.Y. 3214330f12Smrg# (This private macro should not be called outside this file.) 3314330f12SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3414330f12Smrg[am__api_version='1.11' 3514330f12Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3614330f12Smrgdnl require some minimum version. Point them to the right macro. 3714330f12Smrgm4_if([$1], [1.11.1], [], 3814330f12Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3914330f12Smrg]) 4014330f12Smrg 4114330f12Smrg# _AM_AUTOCONF_VERSION(VERSION) 4214330f12Smrg# ----------------------------- 4314330f12Smrg# aclocal traces this macro to find the Autoconf version. 4414330f12Smrg# This is a private macro too. Using m4_define simplifies 4514330f12Smrg# the logic in aclocal, which can simply ignore this definition. 4614330f12Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4714330f12Smrg 4814330f12Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4914330f12Smrg# ------------------------------- 5014330f12Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5114330f12Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5214330f12SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5314330f12Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5414330f12Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5514330f12Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5614330f12Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5714330f12Smrg 5814330f12Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5914330f12Smrg 6014330f12Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 612378475aSmrg# 6214330f12Smrg# This file is free software; the Free Software Foundation 6314330f12Smrg# gives unlimited permission to copy and/or distribute it, 6414330f12Smrg# with or without modifications, as long as this notice is preserved. 652378475aSmrg 6614330f12Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6714330f12Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6814330f12Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 692378475aSmrg# 7014330f12Smrg# Of course, Automake must honor this variable whenever it calls a 7114330f12Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7214330f12Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7314330f12Smrg# depending on how configure is run. This is pretty annoying, since 7414330f12Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7514330f12Smrg# source directory, any form will work fine, but in subdirectories a 7614330f12Smrg# relative path needs to be adjusted first. 772378475aSmrg# 7814330f12Smrg# $ac_aux_dir/missing 7914330f12Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8014330f12Smrg# $top_srcdir/$ac_aux_dir/missing 8114330f12Smrg# fails if $ac_aux_dir is absolute, 8214330f12Smrg# fails when called from a subdirectory in a VPATH build with 8314330f12Smrg# a relative $ac_aux_dir 842378475aSmrg# 8514330f12Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8614330f12Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8714330f12Smrg# harmless because $srcdir is `.', but things will broke when you 8814330f12Smrg# start a VPATH build or use an absolute $srcdir. 892378475aSmrg# 9014330f12Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9114330f12Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9214330f12Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9314330f12Smrg# and then we would define $MISSING as 9414330f12Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9514330f12Smrg# This will work as long as MISSING is not called from configure, because 9614330f12Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9714330f12Smrg# However there are other variables, like CC, which are often used in 9814330f12Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 992378475aSmrg# 10014330f12Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10114330f12Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10214330f12Smrg# configured tree to be moved without reconfiguration. 10339713583Smrg 10414330f12SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10514330f12Smrg[dnl Rely on autoconf to set up CDPATH properly. 10614330f12SmrgAC_PREREQ([2.50])dnl 10714330f12Smrg# expand $ac_aux_dir to an absolute path 10814330f12Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1092378475aSmrg]) 1102378475aSmrg 11114330f12Smrg# AM_CONDITIONAL -*- Autoconf -*- 1122378475aSmrg 11314330f12Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11414330f12Smrg# Free Software Foundation, Inc. 11514330f12Smrg# 11614330f12Smrg# This file is free software; the Free Software Foundation 11714330f12Smrg# gives unlimited permission to copy and/or distribute it, 11814330f12Smrg# with or without modifications, as long as this notice is preserved. 11995b296d0Smrg 12014330f12Smrg# serial 9 12139713583Smrg 12214330f12Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12314330f12Smrg# ------------------------------------- 12414330f12Smrg# Define a conditional. 12514330f12SmrgAC_DEFUN([AM_CONDITIONAL], 12614330f12Smrg[AC_PREREQ(2.52)dnl 12714330f12Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12814330f12Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12914330f12SmrgAC_SUBST([$1_TRUE])dnl 13014330f12SmrgAC_SUBST([$1_FALSE])dnl 13114330f12Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13214330f12Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13314330f12Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13414330f12Smrgif $2; then 13514330f12Smrg $1_TRUE= 13614330f12Smrg $1_FALSE='#' 13714330f12Smrgelse 13814330f12Smrg $1_TRUE='#' 13914330f12Smrg $1_FALSE= 14014330f12Smrgfi 14114330f12SmrgAC_CONFIG_COMMANDS_PRE( 14214330f12Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14314330f12Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14414330f12SmrgUsually this means the macro was only invoked conditionally.]]) 14514330f12Smrgfi])]) 14639713583Smrg 14714330f12Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14814330f12Smrg# Free Software Foundation, Inc. 14914330f12Smrg# 15014330f12Smrg# This file is free software; the Free Software Foundation 15114330f12Smrg# gives unlimited permission to copy and/or distribute it, 15214330f12Smrg# with or without modifications, as long as this notice is preserved. 1532378475aSmrg 15414330f12Smrg# serial 10 1552378475aSmrg 15614330f12Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15714330f12Smrg# written in clear, in which case automake, when reading aclocal.m4, 15814330f12Smrg# will think it sees a *use*, and therefore will trigger all it's 15914330f12Smrg# C support machinery. Also note that it means that autoscan, seeing 16014330f12Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1612378475aSmrg 1622378475aSmrg 16314330f12Smrg# _AM_DEPENDENCIES(NAME) 1642378475aSmrg# ---------------------- 16514330f12Smrg# See how the compiler implements dependency checking. 16614330f12Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16714330f12Smrg# We try a few techniques and use that to set a single cache variable. 16814330f12Smrg# 16914330f12Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17014330f12Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17114330f12Smrg# dependency, and given that the user is not expected to run this macro, 17214330f12Smrg# just rely on AC_PROG_CC. 17314330f12SmrgAC_DEFUN([_AM_DEPENDENCIES], 17414330f12Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17514330f12SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17614330f12SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17714330f12SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1782378475aSmrg 17914330f12Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18014330f12Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18114330f12Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18214330f12Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18314330f12Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18414330f12Smrg [depcc="$$1" am_compiler_list=]) 1852378475aSmrg 18614330f12SmrgAC_CACHE_CHECK([dependency style of $depcc], 18714330f12Smrg [am_cv_$1_dependencies_compiler_type], 18814330f12Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18914330f12Smrg # We make a subdir and do the tests there. Otherwise we can end up 19014330f12Smrg # making bogus files that we don't know about and never remove. For 19114330f12Smrg # instance it was reported that on HP-UX the gcc test will end up 19214330f12Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19314330f12Smrg # in D'. 19414330f12Smrg mkdir conftest.dir 19514330f12Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19614330f12Smrg # using a relative directory. 19714330f12Smrg cp "$am_depcomp" conftest.dir 19814330f12Smrg cd conftest.dir 19914330f12Smrg # We will build objects and dependencies in a subdirectory because 20014330f12Smrg # it helps to detect inapplicable dependency modes. For instance 20114330f12Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20214330f12Smrg # side effect of compilation, but ICC will put the dependencies in 20314330f12Smrg # the current directory while Tru64 will put them in the object 20414330f12Smrg # directory. 20514330f12Smrg mkdir sub 20695b296d0Smrg 20714330f12Smrg am_cv_$1_dependencies_compiler_type=none 20814330f12Smrg if test "$am_compiler_list" = ""; then 20914330f12Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21095b296d0Smrg fi 21114330f12Smrg am__universal=false 21214330f12Smrg m4_case([$1], [CC], 21314330f12Smrg [case " $depcc " in #( 21414330f12Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21514330f12Smrg esac], 21614330f12Smrg [CXX], 21714330f12Smrg [case " $depcc " in #( 21814330f12Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21914330f12Smrg esac]) 220e6f085baSmrg 22114330f12Smrg for depmode in $am_compiler_list; do 22214330f12Smrg # Setup a source with many dependencies, because some compilers 22314330f12Smrg # like to wrap large dependency lists on column 80 (with \), and 22414330f12Smrg # we should not choose a depcomp mode which is confused by this. 22514330f12Smrg # 22614330f12Smrg # We need to recreate these files for each test, as the compiler may 22714330f12Smrg # overwrite some of them when testing with obscure command lines. 22814330f12Smrg # This happens at least with the AIX C compiler. 22914330f12Smrg : > sub/conftest.c 23014330f12Smrg for i in 1 2 3 4 5 6; do 23114330f12Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23214330f12Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23314330f12Smrg # Solaris 8's {/usr,}/bin/sh. 23414330f12Smrg touch sub/conftst$i.h 23514330f12Smrg done 23614330f12Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 23795b296d0Smrg 23814330f12Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23914330f12Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24014330f12Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24114330f12Smrg # versions had trouble with output in subdirs 24214330f12Smrg am__obj=sub/conftest.${OBJEXT-o} 24314330f12Smrg am__minus_obj="-o $am__obj" 24414330f12Smrg case $depmode in 24514330f12Smrg gcc) 24614330f12Smrg # This depmode causes a compiler race in universal mode. 24714330f12Smrg test "$am__universal" = false || continue 24814330f12Smrg ;; 24914330f12Smrg nosideeffect) 25014330f12Smrg # after this tag, mechanisms are not by side-effect, so they'll 25114330f12Smrg # only be used when explicitly requested 25214330f12Smrg if test "x$enable_dependency_tracking" = xyes; then 25314330f12Smrg continue 25414330f12Smrg else 25514330f12Smrg break 25614330f12Smrg fi 25714330f12Smrg ;; 25814330f12Smrg msvisualcpp | msvcmsys) 25914330f12Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26014330f12Smrg # not run yet. These depmodes are late enough in the game, and 26114330f12Smrg # so weak that their functioning should not be impacted. 26214330f12Smrg am__obj=conftest.${OBJEXT-o} 26314330f12Smrg am__minus_obj= 26414330f12Smrg ;; 26514330f12Smrg none) break ;; 26614330f12Smrg esac 26714330f12Smrg if depmode=$depmode \ 26814330f12Smrg source=sub/conftest.c object=$am__obj \ 26914330f12Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27014330f12Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27114330f12Smrg >/dev/null 2>conftest.err && 27214330f12Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27314330f12Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27414330f12Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27514330f12Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27614330f12Smrg # icc doesn't choke on unknown options, it will just issue warnings 27714330f12Smrg # or remarks (even with -Werror). So we grep stderr for any message 27814330f12Smrg # that says an option was ignored or not supported. 27914330f12Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28014330f12Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28114330f12Smrg # The diagnosis changed in icc 8.0: 28214330f12Smrg # icc: Command line remark: option '-MP' not supported 28314330f12Smrg if (grep 'ignoring option' conftest.err || 28414330f12Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28514330f12Smrg am_cv_$1_dependencies_compiler_type=$depmode 28614330f12Smrg break 28714330f12Smrg fi 28814330f12Smrg fi 28914330f12Smrg done 29095b296d0Smrg 29114330f12Smrg cd .. 29214330f12Smrg rm -rf conftest.dir 29314330f12Smrgelse 29414330f12Smrg am_cv_$1_dependencies_compiler_type=none 29514330f12Smrgfi 29614330f12Smrg]) 29714330f12SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29814330f12SmrgAM_CONDITIONAL([am__fastdep$1], [ 29914330f12Smrg test "x$enable_dependency_tracking" != xno \ 30014330f12Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30114330f12Smrg]) 30295b296d0Smrg 30395b296d0Smrg 30414330f12Smrg# AM_SET_DEPDIR 30514330f12Smrg# ------------- 30614330f12Smrg# Choose a directory name for dependency files. 30714330f12Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30814330f12SmrgAC_DEFUN([AM_SET_DEPDIR], 30914330f12Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31014330f12SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31114330f12Smrg]) 31239713583Smrg 31339713583Smrg 31414330f12Smrg# AM_DEP_TRACK 31514330f12Smrg# ------------ 31614330f12SmrgAC_DEFUN([AM_DEP_TRACK], 31714330f12Smrg[AC_ARG_ENABLE(dependency-tracking, 31814330f12Smrg[ --disable-dependency-tracking speeds up one-time build 31914330f12Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32014330f12Smrgif test "x$enable_dependency_tracking" != xno; then 32114330f12Smrg am_depcomp="$ac_aux_dir/depcomp" 32214330f12Smrg AMDEPBACKSLASH='\' 32314330f12Smrgfi 32414330f12SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32514330f12SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32614330f12Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32714330f12Smrg]) 32839713583Smrg 32914330f12Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33039713583Smrg 33114330f12Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33214330f12Smrg# Free Software Foundation, Inc. 33314330f12Smrg# 33414330f12Smrg# This file is free software; the Free Software Foundation 33514330f12Smrg# gives unlimited permission to copy and/or distribute it, 33614330f12Smrg# with or without modifications, as long as this notice is preserved. 3372378475aSmrg 33814330f12Smrg#serial 5 3392378475aSmrg 34014330f12Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3412378475aSmrg# ------------------------------ 34214330f12SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34314330f12Smrg[{ 34414330f12Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34514330f12Smrg # are listed without --file. Let's play safe and only enable the eval 34614330f12Smrg # if we detect the quoting. 34714330f12Smrg case $CONFIG_FILES in 34814330f12Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34914330f12Smrg *) set x $CONFIG_FILES ;; 35014330f12Smrg esac 35114330f12Smrg shift 35214330f12Smrg for mf 35314330f12Smrg do 35414330f12Smrg # Strip MF so we end up with the name of the file. 35514330f12Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35614330f12Smrg # Check whether this is an Automake generated Makefile or not. 35714330f12Smrg # We used to match only the files named `Makefile.in', but 35814330f12Smrg # some people rename them; so instead we look at the file content. 35914330f12Smrg # Grep'ing the first line is not enough: some people post-process 36014330f12Smrg # each Makefile.in and add a new line on top of each file to say so. 36114330f12Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36214330f12Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36314330f12Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36414330f12Smrg dirpart=`AS_DIRNAME("$mf")` 36514330f12Smrg else 36614330f12Smrg continue 36714330f12Smrg fi 36814330f12Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36914330f12Smrg # from the Makefile without running `make'. 37014330f12Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37114330f12Smrg test -z "$DEPDIR" && continue 37214330f12Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37314330f12Smrg test -z "am__include" && continue 37414330f12Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37514330f12Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37614330f12Smrg U=`sed -n 's/^U = //p' < "$mf"` 37714330f12Smrg # Find all dependency output files, they are included files with 37814330f12Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37914330f12Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38014330f12Smrg # expansion. 38114330f12Smrg for file in `sed -n " 38214330f12Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38314330f12Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38414330f12Smrg # Make sure the directory exists. 38514330f12Smrg test -f "$dirpart/$file" && continue 38614330f12Smrg fdir=`AS_DIRNAME(["$file"])` 38714330f12Smrg AS_MKDIR_P([$dirpart/$fdir]) 38814330f12Smrg # echo "creating $dirpart/$file" 38914330f12Smrg echo '# dummy' > "$dirpart/$file" 39014330f12Smrg done 39114330f12Smrg done 39214330f12Smrg} 39314330f12Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3942378475aSmrg 3952378475aSmrg 39614330f12Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3972378475aSmrg# ----------------------------- 39814330f12Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39914330f12Smrg# 40014330f12Smrg# This code is only required when automatic dependency tracking 40114330f12Smrg# is enabled. FIXME. This creates each `.P' file that we will 40214330f12Smrg# need in order to bootstrap the dependency handling code. 40314330f12SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40414330f12Smrg[AC_CONFIG_COMMANDS([depfiles], 40514330f12Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40614330f12Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 40714330f12Smrg]) 4082378475aSmrg 40914330f12Smrg# Do all the work for Automake. -*- Autoconf -*- 4102378475aSmrg 41114330f12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 41214330f12Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 41314330f12Smrg# 41414330f12Smrg# This file is free software; the Free Software Foundation 41514330f12Smrg# gives unlimited permission to copy and/or distribute it, 41614330f12Smrg# with or without modifications, as long as this notice is preserved. 4172378475aSmrg 41814330f12Smrg# serial 16 4192378475aSmrg 42014330f12Smrg# This macro actually does too much. Some checks are only needed if 42114330f12Smrg# your package does certain things. But this isn't really a big deal. 4222378475aSmrg 42314330f12Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42414330f12Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42514330f12Smrg# ----------------------------------------------- 42614330f12Smrg# The call with PACKAGE and VERSION arguments is the old style 42714330f12Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42814330f12Smrg# and VERSION should now be passed to AC_INIT and removed from 42914330f12Smrg# the call to AM_INIT_AUTOMAKE. 43014330f12Smrg# We support both call styles for the transition. After 43114330f12Smrg# the next Automake release, Autoconf can make the AC_INIT 43214330f12Smrg# arguments mandatory, and then we can depend on a new Autoconf 43314330f12Smrg# release and drop the old call support. 43414330f12SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43514330f12Smrg[AC_PREREQ([2.62])dnl 43614330f12Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43714330f12Smrgdnl the ones we care about. 43814330f12Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43914330f12SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44014330f12SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44114330f12Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44214330f12Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44314330f12Smrg # is not polluted with repeated "-I." 44414330f12Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44514330f12Smrg # test to see if srcdir already configured 44614330f12Smrg if test -f $srcdir/config.status; then 44714330f12Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44814330f12Smrg fi 44914330f12Smrgfi 4502378475aSmrg 45114330f12Smrg# test whether we have cygpath 45214330f12Smrgif test -z "$CYGPATH_W"; then 45314330f12Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45414330f12Smrg CYGPATH_W='cygpath -w' 45514330f12Smrg else 45614330f12Smrg CYGPATH_W=echo 45714330f12Smrg fi 45814330f12Smrgfi 45914330f12SmrgAC_SUBST([CYGPATH_W]) 4602378475aSmrg 46114330f12Smrg# Define the identity of the package. 46214330f12Smrgdnl Distinguish between old-style and new-style calls. 46314330f12Smrgm4_ifval([$2], 46414330f12Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46514330f12Smrg AC_SUBST([PACKAGE], [$1])dnl 46614330f12Smrg AC_SUBST([VERSION], [$2])], 46714330f12Smrg[_AM_SET_OPTIONS([$1])dnl 46814330f12Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46914330f12Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 47014330f12Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47114330f12Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47214330f12Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4732378475aSmrg 47414330f12Smrg_AM_IF_OPTION([no-define],, 47514330f12Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 47614330f12Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4772378475aSmrg 47814330f12Smrg# Some tools Automake needs. 47914330f12SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48014330f12SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48114330f12SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 48214330f12SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 48314330f12SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 48414330f12SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 48514330f12SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 48614330f12SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48714330f12SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 48814330f12SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 48914330f12Smrg# We need awk for the "check" target. The system "awk" is bad on 49014330f12Smrg# some platforms. 49114330f12SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49214330f12SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 49314330f12SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 49414330f12Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 49514330f12Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 49614330f12Smrg [_AM_PROG_TAR([v7])])]) 49714330f12Smrg_AM_IF_OPTION([no-dependencies],, 49814330f12Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 49914330f12Smrg [_AM_DEPENDENCIES(CC)], 50014330f12Smrg [define([AC_PROG_CC], 50114330f12Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 50214330f12SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 50314330f12Smrg [_AM_DEPENDENCIES(CXX)], 50414330f12Smrg [define([AC_PROG_CXX], 50514330f12Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 50614330f12SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 50714330f12Smrg [_AM_DEPENDENCIES(OBJC)], 50814330f12Smrg [define([AC_PROG_OBJC], 50914330f12Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 51014330f12Smrg]) 51114330f12Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 51214330f12Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 51314330f12Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 51414330f12Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 51514330f12SmrgAC_CONFIG_COMMANDS_PRE(dnl 51614330f12Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 51714330f12Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5182378475aSmrg]) 5192378475aSmrg 52014330f12Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 52114330f12Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 52214330f12Smrgdnl mangled by Autoconf and run in a shell conditional statement. 52314330f12Smrgm4_define([_AC_COMPILER_EXEEXT], 52414330f12Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5252378475aSmrg 5262378475aSmrg 52714330f12Smrg# When config.status generates a header, we must update the stamp-h file. 52814330f12Smrg# This file resides in the same directory as the config header 52914330f12Smrg# that is generated. The stamp files are numbered to have different names. 5302378475aSmrg 53114330f12Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 53214330f12Smrg# loop where config.status creates the headers, so we can generate 53314330f12Smrg# our stamp files there. 53414330f12SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 53514330f12Smrg[# Compute $1's index in $config_headers. 53614330f12Smrg_am_arg=$1 53714330f12Smrg_am_stamp_count=1 53814330f12Smrgfor _am_header in $config_headers :; do 53914330f12Smrg case $_am_header in 54014330f12Smrg $_am_arg | $_am_arg:* ) 54114330f12Smrg break ;; 54214330f12Smrg * ) 54314330f12Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 54414330f12Smrg esac 54514330f12Smrgdone 54614330f12Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5472378475aSmrg 54814330f12Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 54914330f12Smrg# 55014330f12Smrg# This file is free software; the Free Software Foundation 55114330f12Smrg# gives unlimited permission to copy and/or distribute it, 55214330f12Smrg# with or without modifications, as long as this notice is preserved. 5532378475aSmrg 55414330f12Smrg# AM_PROG_INSTALL_SH 55514330f12Smrg# ------------------ 55614330f12Smrg# Define $install_sh. 55714330f12SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 55814330f12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 55914330f12Smrgif test x"${install_sh}" != xset; then 56014330f12Smrg case $am_aux_dir in 56114330f12Smrg *\ * | *\ *) 56214330f12Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 56314330f12Smrg *) 56414330f12Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 56514330f12Smrg esac 56614330f12Smrgfi 56714330f12SmrgAC_SUBST(install_sh)]) 5682378475aSmrg 56914330f12Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 57014330f12Smrg# 57114330f12Smrg# This file is free software; the Free Software Foundation 57214330f12Smrg# gives unlimited permission to copy and/or distribute it, 57314330f12Smrg# with or without modifications, as long as this notice is preserved. 5742378475aSmrg 57514330f12Smrg# serial 2 5762378475aSmrg 57714330f12Smrg# Check whether the underlying file-system supports filenames 57814330f12Smrg# with a leading dot. For instance MS-DOS doesn't. 57914330f12SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58014330f12Smrg[rm -rf .tst 2>/dev/null 58114330f12Smrgmkdir .tst 2>/dev/null 58214330f12Smrgif test -d .tst; then 58314330f12Smrg am__leading_dot=. 58414330f12Smrgelse 58514330f12Smrg am__leading_dot=_ 58614330f12Smrgfi 58714330f12Smrgrmdir .tst 2>/dev/null 58814330f12SmrgAC_SUBST([am__leading_dot])]) 5892378475aSmrg 59014330f12Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 59114330f12Smrg# From Jim Meyering 5922378475aSmrg 59314330f12Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 59414330f12Smrg# Free Software Foundation, Inc. 5952378475aSmrg# 59614330f12Smrg# This file is free software; the Free Software Foundation 59714330f12Smrg# gives unlimited permission to copy and/or distribute it, 59814330f12Smrg# with or without modifications, as long as this notice is preserved. 5992378475aSmrg 60014330f12Smrg# serial 5 6012378475aSmrg 60214330f12Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 60314330f12Smrg# ---------------------------------- 60414330f12Smrg# Control maintainer-specific portions of Makefiles. 60514330f12Smrg# Default is to disable them, unless `enable' is passed literally. 60614330f12Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 60714330f12Smrg# can override the default with the --enable/--disable switch. 60814330f12SmrgAC_DEFUN([AM_MAINTAINER_MODE], 60914330f12Smrg[m4_case(m4_default([$1], [disable]), 61014330f12Smrg [enable], [m4_define([am_maintainer_other], [disable])], 61114330f12Smrg [disable], [m4_define([am_maintainer_other], [enable])], 61214330f12Smrg [m4_define([am_maintainer_other], [enable]) 61314330f12Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 61414330f12SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 61514330f12Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 61614330f12Smrg AC_ARG_ENABLE([maintainer-mode], 61714330f12Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 61814330f12Smrg (and sometimes confusing) to the casual installer], 61914330f12Smrg [USE_MAINTAINER_MODE=$enableval], 62014330f12Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 62114330f12Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 62214330f12Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 62314330f12Smrg MAINT=$MAINTAINER_MODE_TRUE 62414330f12Smrg AC_SUBST([MAINT])dnl 62514330f12Smrg] 62614330f12Smrg) 6272378475aSmrg 62814330f12SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6292378475aSmrg 63014330f12Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 63114330f12Smrg 63214330f12Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6332378475aSmrg# 63414330f12Smrg# This file is free software; the Free Software Foundation 63514330f12Smrg# gives unlimited permission to copy and/or distribute it, 63614330f12Smrg# with or without modifications, as long as this notice is preserved. 6372378475aSmrg 63814330f12Smrg# serial 4 6392378475aSmrg 64014330f12Smrg# AM_MAKE_INCLUDE() 64114330f12Smrg# ----------------- 64214330f12Smrg# Check to see how make treats includes. 64314330f12SmrgAC_DEFUN([AM_MAKE_INCLUDE], 64414330f12Smrg[am_make=${MAKE-make} 64514330f12Smrgcat > confinc << 'END' 64614330f12Smrgam__doit: 64714330f12Smrg @echo this is the am__doit target 64814330f12Smrg.PHONY: am__doit 64914330f12SmrgEND 65014330f12Smrg# If we don't find an include directive, just comment out the code. 65114330f12SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 65214330f12Smrgam__include="#" 65314330f12Smrgam__quote= 65414330f12Smrg_am_result=none 65514330f12Smrg# First try GNU make style include. 65614330f12Smrgecho "include confinc" > confmf 65714330f12Smrg# Ignore all kinds of additional output from `make'. 65814330f12Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 65914330f12Smrg*the\ am__doit\ target*) 66014330f12Smrg am__include=include 66114330f12Smrg am__quote= 66214330f12Smrg _am_result=GNU 66314330f12Smrg ;; 66414330f12Smrgesac 66514330f12Smrg# Now try BSD make style include. 66614330f12Smrgif test "$am__include" = "#"; then 66714330f12Smrg echo '.include "confinc"' > confmf 66814330f12Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 66914330f12Smrg *the\ am__doit\ target*) 67014330f12Smrg am__include=.include 67114330f12Smrg am__quote="\"" 67214330f12Smrg _am_result=BSD 67314330f12Smrg ;; 67414330f12Smrg esac 67514330f12Smrgfi 67614330f12SmrgAC_SUBST([am__include]) 67714330f12SmrgAC_SUBST([am__quote]) 67814330f12SmrgAC_MSG_RESULT([$_am_result]) 67914330f12Smrgrm -f confinc confmf 68014330f12Smrg]) 6812378475aSmrg 68214330f12Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6832378475aSmrg 68414330f12Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 68514330f12Smrg# Free Software Foundation, Inc. 68614330f12Smrg# 68714330f12Smrg# This file is free software; the Free Software Foundation 68814330f12Smrg# gives unlimited permission to copy and/or distribute it, 68914330f12Smrg# with or without modifications, as long as this notice is preserved. 69039713583Smrg 69114330f12Smrg# serial 6 69239713583Smrg 69314330f12Smrg# AM_MISSING_PROG(NAME, PROGRAM) 6942378475aSmrg# ------------------------------ 69514330f12SmrgAC_DEFUN([AM_MISSING_PROG], 69614330f12Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 69714330f12Smrg$1=${$1-"${am_missing_run}$2"} 69814330f12SmrgAC_SUBST($1)]) 6992378475aSmrg 7002378475aSmrg 70114330f12Smrg# AM_MISSING_HAS_RUN 70214330f12Smrg# ------------------ 70314330f12Smrg# Define MISSING if not defined so far and test if it supports --run. 70414330f12Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 70514330f12SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 70614330f12Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 70714330f12SmrgAC_REQUIRE_AUX_FILE([missing])dnl 70814330f12Smrgif test x"${MISSING+set}" != xset; then 70914330f12Smrg case $am_aux_dir in 71014330f12Smrg *\ * | *\ *) 71114330f12Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 71214330f12Smrg *) 71314330f12Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 71414330f12Smrg esac 71514330f12Smrgfi 71614330f12Smrg# Use eval to expand $SHELL 71714330f12Smrgif eval "$MISSING --run true"; then 71814330f12Smrg am_missing_run="$MISSING --run " 71914330f12Smrgelse 72014330f12Smrg am_missing_run= 72114330f12Smrg AC_MSG_WARN([`missing' script is too old or missing]) 72214330f12Smrgfi 72314330f12Smrg]) 7242378475aSmrg 72514330f12Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 72614330f12Smrg# 72714330f12Smrg# This file is free software; the Free Software Foundation 72814330f12Smrg# gives unlimited permission to copy and/or distribute it, 72914330f12Smrg# with or without modifications, as long as this notice is preserved. 7302378475aSmrg 73114330f12Smrg# AM_PROG_MKDIR_P 73214330f12Smrg# --------------- 73314330f12Smrg# Check for `mkdir -p'. 73414330f12SmrgAC_DEFUN([AM_PROG_MKDIR_P], 73514330f12Smrg[AC_PREREQ([2.60])dnl 73614330f12SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 73714330f12Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 73814330f12Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 73914330f12Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 74014330f12Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 74114330f12Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 74214330f12Smrgdnl adjustment using top_builddir (which is defined more often than 74314330f12Smrgdnl MKDIR_P). 74414330f12SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 74514330f12Smrgcase $mkdir_p in 74614330f12Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 74714330f12Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7482378475aSmrgesac 7492378475aSmrg]) 7502378475aSmrg 75114330f12Smrg# Helper functions for option handling. -*- Autoconf -*- 7522378475aSmrg 75314330f12Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 75414330f12Smrg# 75514330f12Smrg# This file is free software; the Free Software Foundation 75614330f12Smrg# gives unlimited permission to copy and/or distribute it, 75714330f12Smrg# with or without modifications, as long as this notice is preserved. 7582378475aSmrg 75914330f12Smrg# serial 4 7602378475aSmrg 76114330f12Smrg# _AM_MANGLE_OPTION(NAME) 76214330f12Smrg# ----------------------- 76314330f12SmrgAC_DEFUN([_AM_MANGLE_OPTION], 76414330f12Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7652378475aSmrg 76614330f12Smrg# _AM_SET_OPTION(NAME) 76714330f12Smrg# ------------------------------ 76814330f12Smrg# Set option NAME. Presently that only means defining a flag for this option. 76914330f12SmrgAC_DEFUN([_AM_SET_OPTION], 77014330f12Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7712378475aSmrg 77214330f12Smrg# _AM_SET_OPTIONS(OPTIONS) 77314330f12Smrg# ---------------------------------- 77414330f12Smrg# OPTIONS is a space-separated list of Automake options. 77514330f12SmrgAC_DEFUN([_AM_SET_OPTIONS], 77614330f12Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7772378475aSmrg 77814330f12Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 77914330f12Smrg# ------------------------------------------- 78014330f12Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 78114330f12SmrgAC_DEFUN([_AM_IF_OPTION], 78214330f12Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7832378475aSmrg 78414330f12Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7852378475aSmrg 78614330f12Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 78714330f12Smrg# Free Software Foundation, Inc. 78814330f12Smrg# 78914330f12Smrg# This file is free software; the Free Software Foundation 79014330f12Smrg# gives unlimited permission to copy and/or distribute it, 79114330f12Smrg# with or without modifications, as long as this notice is preserved. 7922378475aSmrg 79314330f12Smrg# serial 5 7942378475aSmrg 79514330f12Smrg# AM_SANITY_CHECK 79614330f12Smrg# --------------- 79714330f12SmrgAC_DEFUN([AM_SANITY_CHECK], 79814330f12Smrg[AC_MSG_CHECKING([whether build environment is sane]) 79914330f12Smrg# Just in case 80014330f12Smrgsleep 1 80114330f12Smrgecho timestamp > conftest.file 80214330f12Smrg# Reject unsafe characters in $srcdir or the absolute working directory 80314330f12Smrg# name. Accept space and tab only in the latter. 80414330f12Smrgam_lf=' 80514330f12Smrg' 80614330f12Smrgcase `pwd` in 80714330f12Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 80814330f12Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 80914330f12Smrgesac 81014330f12Smrgcase $srcdir in 81114330f12Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 81214330f12Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 81314330f12Smrgesac 8142378475aSmrg 81514330f12Smrg# Do `set' in a subshell so we don't clobber the current shell's 81614330f12Smrg# arguments. Must try -L first in case configure is actually a 81714330f12Smrg# symlink; some systems play weird games with the mod time of symlinks 81814330f12Smrg# (eg FreeBSD returns the mod time of the symlink's containing 81914330f12Smrg# directory). 82014330f12Smrgif ( 82114330f12Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 82214330f12Smrg if test "$[*]" = "X"; then 82314330f12Smrg # -L didn't work. 82414330f12Smrg set X `ls -t "$srcdir/configure" conftest.file` 82514330f12Smrg fi 82614330f12Smrg rm -f conftest.file 82714330f12Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 82814330f12Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8292378475aSmrg 83014330f12Smrg # If neither matched, then we have a broken ls. This can happen 83114330f12Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 83214330f12Smrg # broken ls alias from the environment. This has actually 83314330f12Smrg # happened. Such a system could not be considered "sane". 83414330f12Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 83514330f12Smrgalias in your environment]) 83614330f12Smrg fi 8372378475aSmrg 83814330f12Smrg test "$[2]" = conftest.file 83914330f12Smrg ) 84014330f12Smrgthen 84114330f12Smrg # Ok. 84214330f12Smrg : 84314330f12Smrgelse 84414330f12Smrg AC_MSG_ERROR([newly created file is older than distributed files! 84514330f12SmrgCheck your system clock]) 8462378475aSmrgfi 84714330f12SmrgAC_MSG_RESULT(yes)]) 8482378475aSmrg 84914330f12Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 85014330f12Smrg# 85114330f12Smrg# This file is free software; the Free Software Foundation 85214330f12Smrg# gives unlimited permission to copy and/or distribute it, 85314330f12Smrg# with or without modifications, as long as this notice is preserved. 8542378475aSmrg 85514330f12Smrg# serial 1 8562378475aSmrg 85714330f12Smrg# AM_SILENT_RULES([DEFAULT]) 85814330f12Smrg# -------------------------- 85914330f12Smrg# Enable less verbose build rules; with the default set to DEFAULT 86014330f12Smrg# (`yes' being less verbose, `no' or empty being verbose). 86114330f12SmrgAC_DEFUN([AM_SILENT_RULES], 86214330f12Smrg[AC_ARG_ENABLE([silent-rules], 86314330f12Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 86414330f12Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 86514330f12Smrgcase $enable_silent_rules in 86614330f12Smrgyes) AM_DEFAULT_VERBOSITY=0;; 86714330f12Smrgno) AM_DEFAULT_VERBOSITY=1;; 86814330f12Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 86914330f12Smrgesac 87014330f12SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 87114330f12SmrgAM_BACKSLASH='\' 87214330f12SmrgAC_SUBST([AM_BACKSLASH])dnl 87314330f12Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 87414330f12Smrg]) 8752378475aSmrg 87614330f12Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8772378475aSmrg# 87814330f12Smrg# This file is free software; the Free Software Foundation 87914330f12Smrg# gives unlimited permission to copy and/or distribute it, 88014330f12Smrg# with or without modifications, as long as this notice is preserved. 8812378475aSmrg 88214330f12Smrg# AM_PROG_INSTALL_STRIP 88314330f12Smrg# --------------------- 88414330f12Smrg# One issue with vendor `install' (even GNU) is that you can't 88514330f12Smrg# specify the program used to strip binaries. This is especially 88614330f12Smrg# annoying in cross-compiling environments, where the build's strip 88714330f12Smrg# is unlikely to handle the host's binaries. 88814330f12Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 88914330f12Smrg# always use install-sh in `make install-strip', and initialize 89014330f12Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 89114330f12SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 89214330f12Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 89314330f12Smrg# Installed binaries are usually stripped using `strip' when the user 89414330f12Smrg# run `make install-strip'. However `strip' might not be the right 89514330f12Smrg# tool to use in cross-compilation environments, therefore Automake 89614330f12Smrg# will honor the `STRIP' environment variable to overrule this program. 89714330f12Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 89814330f12Smrgif test "$cross_compiling" != no; then 89914330f12Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9002378475aSmrgfi 90114330f12SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 90214330f12SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9032378475aSmrg 90414330f12Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 90514330f12Smrg# 90614330f12Smrg# This file is free software; the Free Software Foundation 90714330f12Smrg# gives unlimited permission to copy and/or distribute it, 90814330f12Smrg# with or without modifications, as long as this notice is preserved. 9092378475aSmrg 91014330f12Smrg# serial 2 9112378475aSmrg 91214330f12Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 91314330f12Smrg# --------------------------- 91414330f12Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 91514330f12Smrg# This macro is traced by Automake. 91614330f12SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9172378475aSmrg 91814330f12Smrg# AM_SUBST_NOTMAKE(VARIABLE) 91914330f12Smrg# --------------------------- 92014330f12Smrg# Public sister of _AM_SUBST_NOTMAKE. 92114330f12SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9222378475aSmrg 92314330f12Smrg# Check how to create a tarball. -*- Autoconf -*- 9242378475aSmrg 92514330f12Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 92614330f12Smrg# 92714330f12Smrg# This file is free software; the Free Software Foundation 92814330f12Smrg# gives unlimited permission to copy and/or distribute it, 92914330f12Smrg# with or without modifications, as long as this notice is preserved. 9302378475aSmrg 93114330f12Smrg# serial 2 9322378475aSmrg 93314330f12Smrg# _AM_PROG_TAR(FORMAT) 93414330f12Smrg# -------------------- 93514330f12Smrg# Check how to create a tarball in format FORMAT. 93614330f12Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 93714330f12Smrg# 93814330f12Smrg# Substitute a variable $(am__tar) that is a command 93914330f12Smrg# writing to stdout a FORMAT-tarball containing the directory 94014330f12Smrg# $tardir. 94114330f12Smrg# tardir=directory && $(am__tar) > result.tar 94214330f12Smrg# 94314330f12Smrg# Substitute a variable $(am__untar) that extract such 94414330f12Smrg# a tarball read from stdin. 94514330f12Smrg# $(am__untar) < result.tar 94614330f12SmrgAC_DEFUN([_AM_PROG_TAR], 94714330f12Smrg[# Always define AMTAR for backward compatibility. 94814330f12SmrgAM_MISSING_PROG([AMTAR], [tar]) 94914330f12Smrgm4_if([$1], [v7], 95014330f12Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95114330f12Smrg [m4_case([$1], [ustar],, [pax],, 95214330f12Smrg [m4_fatal([Unknown tar format])]) 95314330f12SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 95414330f12Smrg# Loop over all known methods to create a tar archive until one works. 95514330f12Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95614330f12Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95714330f12Smrg# Do not fold the above two line into one, because Tru64 sh and 95814330f12Smrg# Solaris sh will not grok spaces in the rhs of `-'. 95914330f12Smrgfor _am_tool in $_am_tools 96014330f12Smrgdo 96114330f12Smrg case $_am_tool in 96214330f12Smrg gnutar) 96314330f12Smrg for _am_tar in tar gnutar gtar; 96414330f12Smrg do 96514330f12Smrg AM_RUN_LOG([$_am_tar --version]) && break 96614330f12Smrg done 96714330f12Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 96814330f12Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 96914330f12Smrg am__untar="$_am_tar -xf -" 97014330f12Smrg ;; 97114330f12Smrg plaintar) 97214330f12Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 97314330f12Smrg # ustar tarball either. 97414330f12Smrg (tar --version) >/dev/null 2>&1 && continue 97514330f12Smrg am__tar='tar chf - "$$tardir"' 97614330f12Smrg am__tar_='tar chf - "$tardir"' 97714330f12Smrg am__untar='tar xf -' 97814330f12Smrg ;; 97914330f12Smrg pax) 98014330f12Smrg am__tar='pax -L -x $1 -w "$$tardir"' 98114330f12Smrg am__tar_='pax -L -x $1 -w "$tardir"' 98214330f12Smrg am__untar='pax -r' 98314330f12Smrg ;; 98414330f12Smrg cpio) 98514330f12Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 98614330f12Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 98714330f12Smrg am__untar='cpio -i -H $1 -d' 98814330f12Smrg ;; 98914330f12Smrg none) 99014330f12Smrg am__tar=false 99114330f12Smrg am__tar_=false 99214330f12Smrg am__untar=false 99314330f12Smrg ;; 99414330f12Smrg esac 9952378475aSmrg 99614330f12Smrg # If the value was cached, stop now. We just wanted to have am__tar 99714330f12Smrg # and am__untar set. 99814330f12Smrg test -n "${am_cv_prog_tar_$1}" && break 9992378475aSmrg 100014330f12Smrg # tar/untar a dummy directory, and stop if the command works 100114330f12Smrg rm -rf conftest.dir 100214330f12Smrg mkdir conftest.dir 100314330f12Smrg echo GrepMe > conftest.dir/file 100414330f12Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 100514330f12Smrg rm -rf conftest.dir 100614330f12Smrg if test -s conftest.tar; then 100714330f12Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 100814330f12Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 100914330f12Smrg fi 101014330f12Smrgdone 101114330f12Smrgrm -rf conftest.dir 10122378475aSmrg 101314330f12SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 101414330f12SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 101514330f12SmrgAC_SUBST([am__tar]) 101614330f12SmrgAC_SUBST([am__untar]) 101714330f12Smrg]) # _AM_PROG_TAR 10182378475aSmrg 101914330f12Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 102014330f12Smrg# 102114330f12Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 102214330f12Smrg# 102314330f12Smrg# This program is free software; you can redistribute it and/or modify 102414330f12Smrg# it under the terms of the GNU General Public License as published by 102514330f12Smrg# the Free Software Foundation; either version 2 of the License, or 102614330f12Smrg# (at your option) any later version. 102714330f12Smrg# 102814330f12Smrg# This program is distributed in the hope that it will be useful, but 102914330f12Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 103014330f12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 103114330f12Smrg# General Public License for more details. 103214330f12Smrg# 103314330f12Smrg# You should have received a copy of the GNU General Public License 103414330f12Smrg# along with this program; if not, write to the Free Software 103514330f12Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 103614330f12Smrg# 103714330f12Smrg# As a special exception to the GNU General Public License, if you 103814330f12Smrg# distribute this file as part of a program that contains a 103914330f12Smrg# configuration script generated by Autoconf, you may include it under 104014330f12Smrg# the same distribution terms that you use for the rest of that program. 10412378475aSmrg 104214330f12Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 104314330f12Smrg# ---------------------------------- 104414330f12SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 104514330f12Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 104614330f12Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 104714330f12SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 104814330f12Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 104914330f12Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 105014330f12Smrgfi 105114330f12Smrgif test -n "$PKG_CONFIG"; then 105214330f12Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 105314330f12Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 105414330f12Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 105514330f12Smrg AC_MSG_RESULT([yes]) 105614330f12Smrg else 105714330f12Smrg AC_MSG_RESULT([no]) 105814330f12Smrg PKG_CONFIG="" 105914330f12Smrg fi 106014330f12Smrg 106114330f12Smrgfi[]dnl 106214330f12Smrg])# PKG_PROG_PKG_CONFIG 10632378475aSmrg 106414330f12Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 106514330f12Smrg# 106614330f12Smrg# Check to see whether a particular set of modules exists. Similar 106714330f12Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 106814330f12Smrg# 106914330f12Smrg# 107014330f12Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 107114330f12Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 107214330f12Smrg# PKG_CHECK_EXISTS manually 107314330f12Smrg# -------------------------------------------------------------- 107414330f12SmrgAC_DEFUN([PKG_CHECK_EXISTS], 107514330f12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 107614330f12Smrgif test -n "$PKG_CONFIG" && \ 107714330f12Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 107814330f12Smrg m4_ifval([$2], [$2], [:]) 107914330f12Smrgm4_ifvaln([$3], [else 108014330f12Smrg $3])dnl 108114330f12Smrgfi]) 10822378475aSmrg 10832378475aSmrg 108414330f12Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 108514330f12Smrg# --------------------------------------------- 108614330f12Smrgm4_define([_PKG_CONFIG], 108714330f12Smrg[if test -n "$$1"; then 108814330f12Smrg pkg_cv_[]$1="$$1" 108914330f12Smrg elif test -n "$PKG_CONFIG"; then 109014330f12Smrg PKG_CHECK_EXISTS([$3], 109114330f12Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 109214330f12Smrg [pkg_failed=yes]) 109314330f12Smrg else 109414330f12Smrg pkg_failed=untried 109514330f12Smrgfi[]dnl 109614330f12Smrg])# _PKG_CONFIG 10972378475aSmrg 109814330f12Smrg# _PKG_SHORT_ERRORS_SUPPORTED 109914330f12Smrg# ----------------------------- 110014330f12SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 110114330f12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110214330f12Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 110314330f12Smrg _pkg_short_errors_supported=yes 110414330f12Smrgelse 110514330f12Smrg _pkg_short_errors_supported=no 110614330f12Smrgfi[]dnl 110714330f12Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 11082378475aSmrg 11092378475aSmrg 111014330f12Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 111114330f12Smrg# [ACTION-IF-NOT-FOUND]) 111214330f12Smrg# 111314330f12Smrg# 111414330f12Smrg# Note that if there is a possibility the first call to 111514330f12Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 111614330f12Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 111714330f12Smrg# 111814330f12Smrg# 111914330f12Smrg# -------------------------------------------------------------- 112014330f12SmrgAC_DEFUN([PKG_CHECK_MODULES], 112114330f12Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 112214330f12SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 112314330f12SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 11242378475aSmrg 112514330f12Smrgpkg_failed=no 112614330f12SmrgAC_MSG_CHECKING([for $1]) 11272378475aSmrg 112814330f12Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 112914330f12Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 113095b296d0Smrg 113114330f12Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 113214330f12Smrgand $1[]_LIBS to avoid the need to call pkg-config. 113314330f12SmrgSee the pkg-config man page for more details.]) 11342378475aSmrg 113514330f12Smrgif test $pkg_failed = yes; then 113614330f12Smrg _PKG_SHORT_ERRORS_SUPPORTED 113714330f12Smrg if test $_pkg_short_errors_supported = yes; then 113814330f12Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 113914330f12Smrg else 114014330f12Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 114114330f12Smrg fi 114214330f12Smrg # Put the nasty error message in config.log where it belongs 114314330f12Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 114495b296d0Smrg 114514330f12Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 114614330f12Smrg[Package requirements ($2) were not met: 114795b296d0Smrg 114814330f12Smrg$$1_PKG_ERRORS 114995b296d0Smrg 115014330f12SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 115114330f12Smrginstalled software in a non-standard prefix. 115295b296d0Smrg 115314330f12Smrg_PKG_TEXT 115414330f12Smrg])], 115514330f12Smrg [AC_MSG_RESULT([no]) 115614330f12Smrg $4]) 115714330f12Smrgelif test $pkg_failed = untried; then 115814330f12Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 115914330f12Smrg[The pkg-config script could not be found or is too old. Make sure it 116014330f12Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 116114330f12Smrgpath to pkg-config. 116295b296d0Smrg 116314330f12Smrg_PKG_TEXT 116495b296d0Smrg 116514330f12SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 116614330f12Smrg [$4]) 116714330f12Smrgelse 116814330f12Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 116914330f12Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 117014330f12Smrg AC_MSG_RESULT([yes]) 117114330f12Smrg ifelse([$3], , :, [$3]) 117214330f12Smrgfi[]dnl 117314330f12Smrg])# PKG_CHECK_MODULES 117495b296d0Smrg 117514330f12Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 117614330f12Smrg# 117714330f12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 117814330f12Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 117914330f12Smrg# Inc. 118014330f12Smrg# Written by Gordon Matzigkeit, 1996 118114330f12Smrg# 118214330f12Smrg# This file is free software; the Free Software Foundation gives 118314330f12Smrg# unlimited permission to copy and/or distribute it, with or without 118414330f12Smrg# modifications, as long as this notice is preserved. 1185ff89ac2bSmrg 118614330f12Smrgm4_define([_LT_COPYING], [dnl 118714330f12Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 118814330f12Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 118914330f12Smrg# Inc. 119014330f12Smrg# Written by Gordon Matzigkeit, 1996 119114330f12Smrg# 119214330f12Smrg# This file is part of GNU Libtool. 119314330f12Smrg# 119414330f12Smrg# GNU Libtool is free software; you can redistribute it and/or 119514330f12Smrg# modify it under the terms of the GNU General Public License as 119614330f12Smrg# published by the Free Software Foundation; either version 2 of 119714330f12Smrg# the License, or (at your option) any later version. 119814330f12Smrg# 119914330f12Smrg# As a special exception to the GNU General Public License, 120014330f12Smrg# if you distribute this file as part of a program or library that 120114330f12Smrg# is built using GNU Libtool, you may include this file under the 120214330f12Smrg# same distribution terms that you use for the rest of that program. 120314330f12Smrg# 120414330f12Smrg# GNU Libtool is distributed in the hope that it will be useful, 120514330f12Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 120614330f12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 120714330f12Smrg# GNU General Public License for more details. 120814330f12Smrg# 120914330f12Smrg# You should have received a copy of the GNU General Public License 121014330f12Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 121114330f12Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 121214330f12Smrg# obtained by writing to the Free Software Foundation, Inc., 121314330f12Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 12142378475aSmrg]) 12152378475aSmrg 121614330f12Smrg# serial 57 LT_INIT 121795b296d0Smrg 121895b296d0Smrg 121914330f12Smrg# LT_PREREQ(VERSION) 122014330f12Smrg# ------------------ 122114330f12Smrg# Complain and exit if this libtool version is less that VERSION. 122214330f12Smrgm4_defun([LT_PREREQ], 122314330f12Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 122414330f12Smrg [m4_default([$3], 122514330f12Smrg [m4_fatal([Libtool version $1 or higher is required], 122614330f12Smrg 63)])], 122714330f12Smrg [$2])]) 122895b296d0Smrg 122995b296d0Smrg 123014330f12Smrg# _LT_CHECK_BUILDDIR 123114330f12Smrg# ------------------ 123214330f12Smrg# Complain if the absolute build directory name contains unusual characters 123314330f12Smrgm4_defun([_LT_CHECK_BUILDDIR], 123414330f12Smrg[case `pwd` in 123514330f12Smrg *\ * | *\ *) 123614330f12Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 123795b296d0Smrgesac 123814330f12Smrg]) 123995b296d0Smrg 124095b296d0Smrg 124114330f12Smrg# LT_INIT([OPTIONS]) 124214330f12Smrg# ------------------ 124314330f12SmrgAC_DEFUN([LT_INIT], 124414330f12Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 124514330f12SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 124614330f12SmrgAC_BEFORE([$0], [LT_LANG])dnl 124714330f12SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 124814330f12SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 124914330f12Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 125095b296d0Smrg 125114330f12Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 125214330f12Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 125314330f12Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 125414330f12Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 125514330f12Smrgdnl unless we require an AC_DEFUNed macro: 125614330f12SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 125714330f12SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 125814330f12SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 125914330f12SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 126014330f12Smrgm4_require([_LT_PROG_LTMAIN])dnl 126195b296d0Smrg 126214330f12Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 126395b296d0Smrg 126414330f12Smrgdnl Parse OPTIONS 126514330f12Smrg_LT_SET_OPTIONS([$0], [$1]) 126695b296d0Smrg 126714330f12Smrg# This can be used to rebuild libtool when needed 126814330f12SmrgLIBTOOL_DEPS="$ltmain" 126995b296d0Smrg 127014330f12Smrg# Always use our own libtool. 127114330f12SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 127214330f12SmrgAC_SUBST(LIBTOOL)dnl 127395b296d0Smrg 127414330f12Smrg_LT_SETUP 1275e6f085baSmrg 127614330f12Smrg# Only expand once: 127714330f12Smrgm4_define([LT_INIT]) 127814330f12Smrg])# LT_INIT 127914330f12Smrg 128014330f12Smrg# Old names: 128114330f12SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 128214330f12SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 128314330f12Smrgdnl aclocal-1.4 backwards compatibility: 128414330f12Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 128514330f12Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128695b296d0Smrg 128795b296d0Smrg 128814330f12Smrg# _LT_CC_BASENAME(CC) 128914330f12Smrg# ------------------- 129014330f12Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 129114330f12Smrgm4_defun([_LT_CC_BASENAME], 129214330f12Smrg[for cc_temp in $1""; do 129314330f12Smrg case $cc_temp in 129414330f12Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 129514330f12Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 129614330f12Smrg \-*) ;; 129714330f12Smrg *) break;; 129814330f12Smrg esac 129914330f12Smrgdone 130014330f12Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 13012378475aSmrg]) 130295b296d0Smrg 130395b296d0Smrg 130414330f12Smrg# _LT_FILEUTILS_DEFAULTS 130514330f12Smrg# ---------------------- 130614330f12Smrg# It is okay to use these file commands and assume they have been set 130714330f12Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 130814330f12Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 130914330f12Smrg[: ${CP="cp -f"} 131014330f12Smrg: ${MV="mv -f"} 131114330f12Smrg: ${RM="rm -f"} 131214330f12Smrg])# _LT_FILEUTILS_DEFAULTS 131395b296d0Smrg 131495b296d0Smrg 131514330f12Smrg# _LT_SETUP 131614330f12Smrg# --------- 131714330f12Smrgm4_defun([_LT_SETUP], 131814330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 131914330f12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 132014330f12SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 132114330f12SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 132295b296d0Smrg 132314330f12Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 132414330f12Smrg_LT_DECL([], [host], [0])dnl 132514330f12Smrg_LT_DECL([], [host_os], [0])dnl 132614330f12Smrgdnl 132714330f12Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 132814330f12Smrg_LT_DECL([], [build], [0])dnl 132914330f12Smrg_LT_DECL([], [build_os], [0])dnl 133014330f12Smrgdnl 133114330f12SmrgAC_REQUIRE([AC_PROG_CC])dnl 133214330f12SmrgAC_REQUIRE([LT_PATH_LD])dnl 133314330f12SmrgAC_REQUIRE([LT_PATH_NM])dnl 133414330f12Smrgdnl 133514330f12SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 133614330f12Smrgtest -z "$LN_S" && LN_S="ln -s" 133714330f12Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 133814330f12Smrgdnl 133914330f12SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 134014330f12Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 134114330f12Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 134214330f12Smrgdnl 134314330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 134414330f12Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 134514330f12Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 134614330f12Smrgm4_require([_LT_CMD_RELOAD])dnl 134714330f12Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 134814330f12Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 134914330f12Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 135014330f12Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 135114330f12Smrgm4_require([_LT_WITH_SYSROOT])dnl 135214330f12Smrg 135314330f12Smrg_LT_CONFIG_LIBTOOL_INIT([ 135414330f12Smrg# See if we are running on zsh, and set the options which allow our 135514330f12Smrg# commands through without removal of \ escapes INIT. 135614330f12Smrgif test -n "\${ZSH_VERSION+set}" ; then 135714330f12Smrg setopt NO_GLOB_SUBST 135814330f12Smrgfi 135914330f12Smrg]) 136014330f12Smrgif test -n "${ZSH_VERSION+set}" ; then 136114330f12Smrg setopt NO_GLOB_SUBST 136214330f12Smrgfi 136314330f12Smrg 136414330f12Smrg_LT_CHECK_OBJDIR 136514330f12Smrg 136614330f12Smrgm4_require([_LT_TAG_COMPILER])dnl 136714330f12Smrg 136814330f12Smrgcase $host_os in 136914330f12Smrgaix3*) 137014330f12Smrg # AIX sometimes has problems with the GCC collect2 program. For some 137114330f12Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 137214330f12Smrg # vanish in a puff of smoke. 137314330f12Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 137414330f12Smrg COLLECT_NAMES= 137514330f12Smrg export COLLECT_NAMES 137695b296d0Smrg fi 137795b296d0Smrg ;; 137814330f12Smrgesac 137914330f12Smrg 138014330f12Smrg# Global variables: 138114330f12Smrgofile=libtool 138214330f12Smrgcan_build_shared=yes 138314330f12Smrg 138414330f12Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 138514330f12Smrg# which needs '.lib'). 138614330f12Smrglibext=a 138714330f12Smrg 138814330f12Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 138914330f12Smrg 139014330f12Smrgold_CC="$CC" 139114330f12Smrgold_CFLAGS="$CFLAGS" 139214330f12Smrg 139314330f12Smrg# Set sane defaults for various variables 139414330f12Smrgtest -z "$CC" && CC=cc 139514330f12Smrgtest -z "$LTCC" && LTCC=$CC 139614330f12Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 139714330f12Smrgtest -z "$LD" && LD=ld 139814330f12Smrgtest -z "$ac_objext" && ac_objext=o 139914330f12Smrg 140014330f12Smrg_LT_CC_BASENAME([$compiler]) 140114330f12Smrg 140214330f12Smrg# Only perform the check for file, if the check method requires it 140314330f12Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 140414330f12Smrgcase $deplibs_check_method in 140514330f12Smrgfile_magic*) 140614330f12Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 140714330f12Smrg _LT_PATH_MAGIC 140895b296d0Smrg fi 140995b296d0Smrg ;; 141095b296d0Smrgesac 141195b296d0Smrg 141214330f12Smrg# Use C for the default configuration in the libtool script 141314330f12SmrgLT_SUPPORTED_TAG([CC]) 141414330f12Smrg_LT_LANG_C_CONFIG 141514330f12Smrg_LT_LANG_DEFAULT_CONFIG 141614330f12Smrg_LT_CONFIG_COMMANDS 141714330f12Smrg])# _LT_SETUP 14182378475aSmrg 14192378475aSmrg 142014330f12Smrg# _LT_PREPARE_SED_QUOTE_VARS 142114330f12Smrg# -------------------------- 142214330f12Smrg# Define a few sed substitution that help us do robust quoting. 142314330f12Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 142414330f12Smrg[# Backslashify metacharacters that are still active within 142514330f12Smrg# double-quoted strings. 142614330f12Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 14272378475aSmrg 142814330f12Smrg# Same as above, but do not quote variable references. 142914330f12Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 14302378475aSmrg 143114330f12Smrg# Sed substitution to delay expansion of an escaped shell variable in a 143214330f12Smrg# double_quote_subst'ed string. 143314330f12Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14342378475aSmrg 143514330f12Smrg# Sed substitution to delay expansion of an escaped single quote. 143614330f12Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 143739713583Smrg 143814330f12Smrg# Sed substitution to avoid accidental globbing in evaled expressions 143914330f12Smrgno_glob_subst='s/\*/\\\*/g' 144014330f12Smrg]) 144195b296d0Smrg 144214330f12Smrg# _LT_PROG_LTMAIN 144314330f12Smrg# --------------- 144414330f12Smrg# Note that this code is called both from `configure', and `config.status' 144514330f12Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 144614330f12Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 144714330f12Smrg# so we pass a copy along to make sure it has a sensible value anyway. 144814330f12Smrgm4_defun([_LT_PROG_LTMAIN], 144914330f12Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 145014330f12Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 145114330f12Smrgltmain="$ac_aux_dir/ltmain.sh" 145214330f12Smrg])# _LT_PROG_LTMAIN 145395b296d0Smrg 145495b296d0Smrg 145595b296d0Smrg 145614330f12Smrg# So that we can recreate a full libtool script including additional 145714330f12Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 145814330f12Smrg# in macros and then make a single call at the end using the `libtool' 145914330f12Smrg# label. 146095b296d0Smrg 146195b296d0Smrg 146214330f12Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 146314330f12Smrg# ---------------------------------------- 146414330f12Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 146514330f12Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 146614330f12Smrg[m4_ifval([$1], 146714330f12Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 146814330f12Smrg [$1 146914330f12Smrg])])]) 14702378475aSmrg 147114330f12Smrg# Initialize. 147214330f12Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 147395b296d0Smrg 147495b296d0Smrg 147514330f12Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 147614330f12Smrg# ------------------------------ 147714330f12Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 147814330f12Smrgm4_define([_LT_CONFIG_LIBTOOL], 147914330f12Smrg[m4_ifval([$1], 148014330f12Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 148114330f12Smrg [$1 148214330f12Smrg])])]) 148395b296d0Smrg 148414330f12Smrg# Initialize. 148514330f12Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 148695b296d0Smrg 148795b296d0Smrg 148814330f12Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 148914330f12Smrg# ----------------------------------------------------- 149014330f12Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 149114330f12Smrg[_LT_CONFIG_LIBTOOL([$1]) 149214330f12Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 149314330f12Smrg]) 149495b296d0Smrg 149595b296d0Smrg 149614330f12Smrg# _LT_FORMAT_COMMENT([COMMENT]) 149714330f12Smrg# ----------------------------- 149814330f12Smrg# Add leading comment marks to the start of each line, and a trailing 149914330f12Smrg# full-stop to the whole comment if one is not present already. 150014330f12Smrgm4_define([_LT_FORMAT_COMMENT], 150114330f12Smrg[m4_ifval([$1], [ 150214330f12Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 150314330f12Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 150414330f12Smrg)]) 150595b296d0Smrg 150695b296d0Smrg 15072378475aSmrg 150895b296d0Smrg 150995b296d0Smrg 151014330f12Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 151114330f12Smrg# ------------------------------------------------------------------- 151214330f12Smrg# CONFIGNAME is the name given to the value in the libtool script. 151314330f12Smrg# VARNAME is the (base) name used in the configure script. 151414330f12Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 151514330f12Smrg# VARNAME. Any other value will be used directly. 151614330f12Smrgm4_define([_LT_DECL], 151714330f12Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 151814330f12Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 151914330f12Smrg [m4_ifval([$1], [$1], [$2])]) 152014330f12Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 152114330f12Smrg m4_ifval([$4], 152214330f12Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 152314330f12Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 152414330f12Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 152514330f12Smrg]) 152695b296d0Smrg 152795b296d0Smrg 152814330f12Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 152914330f12Smrg# -------------------------------------------------------- 153014330f12Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 153195b296d0Smrg 153295b296d0Smrg 153314330f12Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 153414330f12Smrg# ------------------------------------------------ 153514330f12Smrgm4_define([lt_decl_tag_varnames], 153614330f12Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 153795b296d0Smrg 153895b296d0Smrg 153914330f12Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 154014330f12Smrg# --------------------------------------------------------- 154114330f12Smrgm4_define([_lt_decl_filter], 154214330f12Smrg[m4_case([$#], 154314330f12Smrg [0], [m4_fatal([$0: too few arguments: $#])], 154414330f12Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 154514330f12Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 154614330f12Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 154714330f12Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 154814330f12Smrg]) 154995b296d0Smrg 155095b296d0Smrg 155114330f12Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 155214330f12Smrg# -------------------------------------------------- 155314330f12Smrgm4_define([lt_decl_quote_varnames], 155414330f12Smrg[_lt_decl_filter([value], [1], $@)]) 155595b296d0Smrg 155695b296d0Smrg 155714330f12Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 155814330f12Smrg# --------------------------------------------------- 155914330f12Smrgm4_define([lt_decl_dquote_varnames], 156014330f12Smrg[_lt_decl_filter([value], [2], $@)]) 156195b296d0Smrg 156295b296d0Smrg 156314330f12Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 156414330f12Smrg# --------------------------------------------------- 156514330f12Smrgm4_define([lt_decl_varnames_tagged], 156614330f12Smrg[m4_assert([$# <= 2])dnl 156714330f12Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 156814330f12Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 156914330f12Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 157014330f12Smrgm4_define([_lt_decl_varnames_tagged], 157114330f12Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 157295b296d0Smrg 157395b296d0Smrg 157414330f12Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 157514330f12Smrg# ------------------------------------------------ 157614330f12Smrgm4_define([lt_decl_all_varnames], 157714330f12Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 157814330f12Smrg m4_if([$2], [], 157914330f12Smrg m4_quote(lt_decl_varnames), 158014330f12Smrg m4_quote(m4_shift($@))))[]dnl 158114330f12Smrg]) 158214330f12Smrgm4_define([_lt_decl_all_varnames], 158314330f12Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 158414330f12Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 158514330f12Smrg]) 158695b296d0Smrg 158795b296d0Smrg 158814330f12Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 158914330f12Smrg# ------------------------------------ 159014330f12Smrg# Quote a variable value, and forward it to `config.status' so that its 159114330f12Smrg# declaration there will have the same value as in `configure'. VARNAME 159214330f12Smrg# must have a single quote delimited value for this to work. 159314330f12Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 159414330f12Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 159595b296d0Smrg 159695b296d0Smrg 159714330f12Smrg# _LT_CONFIG_STATUS_DECLARATIONS 159814330f12Smrg# ------------------------------ 159914330f12Smrg# We delimit libtool config variables with single quotes, so when 160014330f12Smrg# we write them to config.status, we have to be sure to quote all 160114330f12Smrg# embedded single quotes properly. In configure, this macro expands 160214330f12Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 160314330f12Smrg# 160414330f12Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 160514330f12Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 160614330f12Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 160714330f12Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 160895b296d0Smrg 160995b296d0Smrg 161014330f12Smrg# _LT_LIBTOOL_TAGS 161114330f12Smrg# ---------------- 161214330f12Smrg# Output comment and list of tags supported by the script 161314330f12Smrgm4_defun([_LT_LIBTOOL_TAGS], 161414330f12Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 161514330f12Smrgavailable_tags="_LT_TAGS"dnl 161614330f12Smrg]) 161795b296d0Smrg 161895b296d0Smrg 161914330f12Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 162014330f12Smrg# ----------------------------------- 162114330f12Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 162214330f12Smrg# expand to a commented shell variable setting: 162314330f12Smrg# 162414330f12Smrg# # Some comment about what VAR is for. 162514330f12Smrg# visible_name=$lt_internal_name 162614330f12Smrgm4_define([_LT_LIBTOOL_DECLARE], 162714330f12Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 162814330f12Smrg [description])))[]dnl 162914330f12Smrgm4_pushdef([_libtool_name], 163014330f12Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 163114330f12Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 163214330f12Smrg [0], [_libtool_name=[$]$1], 163314330f12Smrg [1], [_libtool_name=$lt_[]$1], 163414330f12Smrg [2], [_libtool_name=$lt_[]$1], 163514330f12Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 163614330f12Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 163714330f12Smrg]) 163895b296d0Smrg 163939713583Smrg 164014330f12Smrg# _LT_LIBTOOL_CONFIG_VARS 164114330f12Smrg# ----------------------- 164214330f12Smrg# Produce commented declarations of non-tagged libtool config variables 164314330f12Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 164414330f12Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 164514330f12Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 164614330f12Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 164714330f12Smrg[m4_foreach([_lt_var], 164814330f12Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 164914330f12Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16502378475aSmrg 165195b296d0Smrg 165214330f12Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 165314330f12Smrg# ------------------------- 165414330f12Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 165514330f12Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 165614330f12Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 165795b296d0Smrg 165895b296d0Smrg 165914330f12Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 166014330f12Smrg# ------------------------------ 166114330f12Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 166295b296d0Smrg 166395b296d0Smrg 166414330f12Smrg# _LT_CONFIG_COMMANDS 166514330f12Smrg# ------------------- 166614330f12Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 166714330f12Smrg# variables for single and double quote escaping we saved from calls 166814330f12Smrg# to _LT_DECL, we can put quote escaped variables declarations 166914330f12Smrg# into `config.status', and then the shell code to quote escape them in 167014330f12Smrg# for loops in `config.status'. Finally, any additional code accumulated 167114330f12Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 167214330f12Smrgm4_defun([_LT_CONFIG_COMMANDS], 167314330f12Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 167414330f12Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 167514330f12Smrg dnl instead of duplicating it all over again into config.status, 167614330f12Smrg dnl then we will have config.status run $CONFIG_LT later, so it 167714330f12Smrg dnl needs to know what name is stored there: 167814330f12Smrg [AC_CONFIG_COMMANDS([libtool], 167914330f12Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 168014330f12Smrg dnl If the libtool generation code is destined for config.status, 168114330f12Smrg dnl expand the accumulated commands and init code now: 168214330f12Smrg [AC_CONFIG_COMMANDS([libtool], 168314330f12Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 168414330f12Smrg])#_LT_CONFIG_COMMANDS 168595b296d0Smrg 168695b296d0Smrg 168714330f12Smrg# Initialize. 168814330f12Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 168914330f12Smrg[ 169095b296d0Smrg 169114330f12Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 169214330f12Smrg# if CDPATH is set. 169314330f12Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 169495b296d0Smrg 169514330f12Smrgsed_quote_subst='$sed_quote_subst' 169614330f12Smrgdouble_quote_subst='$double_quote_subst' 169714330f12Smrgdelay_variable_subst='$delay_variable_subst' 169814330f12Smrg_LT_CONFIG_STATUS_DECLARATIONS 169914330f12SmrgLTCC='$LTCC' 170014330f12SmrgLTCFLAGS='$LTCFLAGS' 170114330f12Smrgcompiler='$compiler_DEFAULT' 170295b296d0Smrg 170314330f12Smrg# A function that is used when there is no print builtin or printf. 170414330f12Smrgfunc_fallback_echo () 170514330f12Smrg{ 170614330f12Smrg eval 'cat <<_LTECHO_EOF 170714330f12Smrg\$[]1 170814330f12Smrg_LTECHO_EOF' 170914330f12Smrg} 171095b296d0Smrg 171114330f12Smrg# Quote evaled strings. 171214330f12Smrgfor var in lt_decl_all_varnames([[ \ 171314330f12Smrg]], lt_decl_quote_varnames); do 171414330f12Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 171514330f12Smrg *[[\\\\\\\`\\"\\\$]]*) 171614330f12Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 171714330f12Smrg ;; 171814330f12Smrg *) 171914330f12Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 172014330f12Smrg ;; 172114330f12Smrg esac 172214330f12Smrgdone 172395b296d0Smrg 172414330f12Smrg# Double-quote double-evaled strings. 172514330f12Smrgfor var in lt_decl_all_varnames([[ \ 172614330f12Smrg]], lt_decl_dquote_varnames); do 172714330f12Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 172814330f12Smrg *[[\\\\\\\`\\"\\\$]]*) 172914330f12Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 173014330f12Smrg ;; 173114330f12Smrg *) 173214330f12Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 173314330f12Smrg ;; 173414330f12Smrg esac 173514330f12Smrgdone 173695b296d0Smrg 173714330f12Smrg_LT_OUTPUT_LIBTOOL_INIT 173814330f12Smrg]) 173995b296d0Smrg 174014330f12Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 174114330f12Smrg# ------------------------------------ 174214330f12Smrg# Generate a child script FILE with all initialization necessary to 174314330f12Smrg# reuse the environment learned by the parent script, and make the 174414330f12Smrg# file executable. If COMMENT is supplied, it is inserted after the 174514330f12Smrg# `#!' sequence but before initialization text begins. After this 174614330f12Smrg# macro, additional text can be appended to FILE to form the body of 174714330f12Smrg# the child script. The macro ends with non-zero status if the 174814330f12Smrg# file could not be fully written (such as if the disk is full). 174914330f12Smrgm4_ifdef([AS_INIT_GENERATED], 175014330f12Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 175114330f12Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 175214330f12Smrg[m4_require([AS_PREPARE])]dnl 175314330f12Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 175414330f12Smrg[lt_write_fail=0 175514330f12Smrgcat >$1 <<_ASEOF || lt_write_fail=1 175614330f12Smrg#! $SHELL 175714330f12Smrg# Generated by $as_me. 175814330f12Smrg$2 175914330f12SmrgSHELL=\${CONFIG_SHELL-$SHELL} 176014330f12Smrgexport SHELL 176114330f12Smrg_ASEOF 176214330f12Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 176314330f12SmrgAS_SHELL_SANITIZE 176414330f12Smrg_AS_PREPARE 176514330f12Smrgexec AS_MESSAGE_FD>&1 176614330f12Smrg_ASEOF 176714330f12Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 176814330f12Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 176995b296d0Smrg 177014330f12Smrg# LT_OUTPUT 177114330f12Smrg# --------- 177214330f12Smrg# This macro allows early generation of the libtool script (before 177314330f12Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 177414330f12Smrg# tests. 177514330f12SmrgAC_DEFUN([LT_OUTPUT], 177614330f12Smrg[: ${CONFIG_LT=./config.lt} 177714330f12SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 177814330f12Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 177914330f12Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 178095b296d0Smrg 178114330f12Smrgcat >>"$CONFIG_LT" <<\_LTEOF 178214330f12Smrglt_cl_silent=false 178314330f12Smrgexec AS_MESSAGE_LOG_FD>>config.log 178414330f12Smrg{ 178514330f12Smrg echo 178614330f12Smrg AS_BOX([Running $as_me.]) 178714330f12Smrg} >&AS_MESSAGE_LOG_FD 178895b296d0Smrg 178914330f12Smrglt_cl_help="\ 179014330f12Smrg\`$as_me' creates a local libtool stub from the current configuration, 179114330f12Smrgfor use in further configure time tests before the real libtool is 179214330f12Smrggenerated. 179395b296d0Smrg 179414330f12SmrgUsage: $[0] [[OPTIONS]] 179595b296d0Smrg 179614330f12Smrg -h, --help print this help, then exit 179714330f12Smrg -V, --version print version number, then exit 179814330f12Smrg -q, --quiet do not print progress messages 179914330f12Smrg -d, --debug don't remove temporary files 180095b296d0Smrg 180114330f12SmrgReport bugs to <bug-libtool@gnu.org>." 180295b296d0Smrg 180314330f12Smrglt_cl_version="\ 180414330f12Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 180514330f12Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 180614330f12Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 180795b296d0Smrg 180814330f12SmrgCopyright (C) 2010 Free Software Foundation, Inc. 180914330f12SmrgThis config.lt script is free software; the Free Software Foundation 181014330f12Smrggives unlimited permision to copy, distribute and modify it." 181195b296d0Smrg 181214330f12Smrgwhile test $[#] != 0 181314330f12Smrgdo 181414330f12Smrg case $[1] in 181514330f12Smrg --version | --v* | -V ) 181614330f12Smrg echo "$lt_cl_version"; exit 0 ;; 181714330f12Smrg --help | --h* | -h ) 181814330f12Smrg echo "$lt_cl_help"; exit 0 ;; 181914330f12Smrg --debug | --d* | -d ) 182014330f12Smrg debug=: ;; 182114330f12Smrg --quiet | --q* | --silent | --s* | -q ) 182214330f12Smrg lt_cl_silent=: ;; 182395b296d0Smrg 182414330f12Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 182514330f12SmrgTry \`$[0] --help' for more information.]) ;; 182695b296d0Smrg 182714330f12Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 182814330f12SmrgTry \`$[0] --help' for more information.]) ;; 182995b296d0Smrg esac 183014330f12Smrg shift 183114330f12Smrgdone 183295b296d0Smrg 183314330f12Smrgif $lt_cl_silent; then 183414330f12Smrg exec AS_MESSAGE_FD>/dev/null 183514330f12Smrgfi 183614330f12Smrg_LTEOF 183795b296d0Smrg 183814330f12Smrgcat >>"$CONFIG_LT" <<_LTEOF 183914330f12Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 184014330f12Smrg_LTEOF 184195b296d0Smrg 184214330f12Smrgcat >>"$CONFIG_LT" <<\_LTEOF 184314330f12SmrgAC_MSG_NOTICE([creating $ofile]) 184414330f12Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 184514330f12SmrgAS_EXIT(0) 184614330f12Smrg_LTEOF 184714330f12Smrgchmod +x "$CONFIG_LT" 184895b296d0Smrg 184914330f12Smrg# configure is writing to config.log, but config.lt does its own redirection, 185014330f12Smrg# appending to config.log, which fails on DOS, as config.log is still kept 185114330f12Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 185214330f12Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 185314330f12Smrglt_cl_success=: 185414330f12Smrgtest "$silent" = yes && 185514330f12Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 185614330f12Smrgexec AS_MESSAGE_LOG_FD>/dev/null 185714330f12Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 185814330f12Smrgexec AS_MESSAGE_LOG_FD>>config.log 185914330f12Smrg$lt_cl_success || AS_EXIT(1) 186014330f12Smrg])# LT_OUTPUT 186195b296d0Smrg 186295b296d0Smrg 186314330f12Smrg# _LT_CONFIG(TAG) 186414330f12Smrg# --------------- 186514330f12Smrg# If TAG is the built-in tag, create an initial libtool script with a 186614330f12Smrg# default configuration from the untagged config vars. Otherwise add code 186714330f12Smrg# to config.status for appending the configuration named by TAG from the 186814330f12Smrg# matching tagged config vars. 186914330f12Smrgm4_defun([_LT_CONFIG], 187014330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 187114330f12Smrg_LT_CONFIG_SAVE_COMMANDS([ 187214330f12Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 187314330f12Smrg m4_if(_LT_TAG, [C], [ 187414330f12Smrg # See if we are running on zsh, and set the options which allow our 187514330f12Smrg # commands through without removal of \ escapes. 187614330f12Smrg if test -n "${ZSH_VERSION+set}" ; then 187714330f12Smrg setopt NO_GLOB_SUBST 187895b296d0Smrg fi 187995b296d0Smrg 188014330f12Smrg cfgfile="${ofile}T" 188114330f12Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 188214330f12Smrg $RM "$cfgfile" 188314330f12Smrg 188414330f12Smrg cat <<_LT_EOF >> "$cfgfile" 188514330f12Smrg#! $SHELL 188614330f12Smrg 188714330f12Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 188814330f12Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 188914330f12Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 189014330f12Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 189114330f12Smrg# 189214330f12Smrg_LT_COPYING 189314330f12Smrg_LT_LIBTOOL_TAGS 189414330f12Smrg 189514330f12Smrg# ### BEGIN LIBTOOL CONFIG 189614330f12Smrg_LT_LIBTOOL_CONFIG_VARS 189714330f12Smrg_LT_LIBTOOL_TAG_VARS 189814330f12Smrg# ### END LIBTOOL CONFIG 189914330f12Smrg 190014330f12Smrg_LT_EOF 190195b296d0Smrg 190295b296d0Smrg case $host_os in 190314330f12Smrg aix3*) 190414330f12Smrg cat <<\_LT_EOF >> "$cfgfile" 190514330f12Smrg# AIX sometimes has problems with the GCC collect2 program. For some 190614330f12Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 190714330f12Smrg# vanish in a puff of smoke. 190814330f12Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 190914330f12Smrg COLLECT_NAMES= 191014330f12Smrg export COLLECT_NAMES 191114330f12Smrgfi 191214330f12Smrg_LT_EOF 191395b296d0Smrg ;; 191495b296d0Smrg esac 191595b296d0Smrg 191614330f12Smrg _LT_PROG_LTMAIN 191795b296d0Smrg 191814330f12Smrg # We use sed instead of cat because bash on DJGPP gets confused if 191914330f12Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 192014330f12Smrg # text mode, it properly converts lines to CR/LF. This bash problem 192114330f12Smrg # is reportedly fixed, but why not run on old versions too? 192214330f12Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 192314330f12Smrg || (rm -f "$cfgfile"; exit 1) 19242378475aSmrg 192514330f12Smrg _LT_PROG_REPLACE_SHELLFNS 19262378475aSmrg 192714330f12Smrg mv -f "$cfgfile" "$ofile" || 192814330f12Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 192914330f12Smrg chmod +x "$ofile" 193014330f12Smrg], 193114330f12Smrg[cat <<_LT_EOF >> "$ofile" 193295b296d0Smrg 193314330f12Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 193414330f12Smrgdnl in a comment (ie after a #). 193514330f12Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 193614330f12Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 193714330f12Smrg# ### END LIBTOOL TAG CONFIG: $1 193814330f12Smrg_LT_EOF 193914330f12Smrg])dnl /m4_if 194014330f12Smrg], 194114330f12Smrg[m4_if([$1], [], [ 194214330f12Smrg PACKAGE='$PACKAGE' 194314330f12Smrg VERSION='$VERSION' 194414330f12Smrg TIMESTAMP='$TIMESTAMP' 194514330f12Smrg RM='$RM' 194614330f12Smrg ofile='$ofile'], []) 194714330f12Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 194814330f12Smrg])# _LT_CONFIG 194995b296d0Smrg 195095b296d0Smrg 195114330f12Smrg# LT_SUPPORTED_TAG(TAG) 195214330f12Smrg# --------------------- 195314330f12Smrg# Trace this macro to discover what tags are supported by the libtool 195414330f12Smrg# --tag option, using: 195514330f12Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 195614330f12SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 195795b296d0Smrg 195895b296d0Smrg 195914330f12Smrg# C support is built-in for now 196014330f12Smrgm4_define([_LT_LANG_C_enabled], []) 196114330f12Smrgm4_define([_LT_TAGS], []) 196295b296d0Smrg 196395b296d0Smrg 196414330f12Smrg# LT_LANG(LANG) 196514330f12Smrg# ------------- 196614330f12Smrg# Enable libtool support for the given language if not already enabled. 196714330f12SmrgAC_DEFUN([LT_LANG], 196814330f12Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 196914330f12Smrgm4_case([$1], 197014330f12Smrg [C], [_LT_LANG(C)], 197114330f12Smrg [C++], [_LT_LANG(CXX)], 197214330f12Smrg [Java], [_LT_LANG(GCJ)], 197314330f12Smrg [Fortran 77], [_LT_LANG(F77)], 197414330f12Smrg [Fortran], [_LT_LANG(FC)], 197514330f12Smrg [Windows Resource], [_LT_LANG(RC)], 197614330f12Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 197714330f12Smrg [_LT_LANG($1)], 197814330f12Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 197914330f12Smrg])# LT_LANG 198095b296d0Smrg 198195b296d0Smrg 198214330f12Smrg# _LT_LANG(LANGNAME) 198314330f12Smrg# ------------------ 198414330f12Smrgm4_defun([_LT_LANG], 198514330f12Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 198614330f12Smrg [LT_SUPPORTED_TAG([$1])dnl 198714330f12Smrg m4_append([_LT_TAGS], [$1 ])dnl 198814330f12Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 198914330f12Smrg _LT_LANG_$1_CONFIG($1)])dnl 199014330f12Smrg])# _LT_LANG 1991ff89ac2bSmrg 199295b296d0Smrg 199314330f12Smrg# _LT_LANG_DEFAULT_CONFIG 199414330f12Smrg# ----------------------- 199514330f12Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 199614330f12Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 199714330f12Smrg [LT_LANG(CXX)], 199814330f12Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 199995b296d0Smrg 200014330f12SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 200114330f12Smrg [LT_LANG(F77)], 200214330f12Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 200395b296d0Smrg 200414330f12SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 200514330f12Smrg [LT_LANG(FC)], 200614330f12Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 200795b296d0Smrg 200814330f12Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 200914330f12Smrgdnl pulling things in needlessly. 201014330f12SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 201114330f12Smrg [LT_LANG(GCJ)], 201214330f12Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 201314330f12Smrg [LT_LANG(GCJ)], 201414330f12Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 201514330f12Smrg [LT_LANG(GCJ)], 201614330f12Smrg [m4_ifdef([AC_PROG_GCJ], 201714330f12Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 201814330f12Smrg m4_ifdef([A][M_PROG_GCJ], 201914330f12Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 202014330f12Smrg m4_ifdef([LT_PROG_GCJ], 202114330f12Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 202295b296d0Smrg 202314330f12SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 202414330f12Smrg [LT_LANG(RC)], 202514330f12Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 202614330f12Smrg])# _LT_LANG_DEFAULT_CONFIG 202795b296d0Smrg 202814330f12Smrg# Obsolete macros: 202914330f12SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 203014330f12SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 203114330f12SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 203214330f12SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 203314330f12SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 203414330f12Smrgdnl aclocal-1.4 backwards compatibility: 203514330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 203614330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 203714330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 203814330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 203914330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2040e6f085baSmrg 20412378475aSmrg 204214330f12Smrg# _LT_TAG_COMPILER 204314330f12Smrg# ---------------- 204414330f12Smrgm4_defun([_LT_TAG_COMPILER], 204514330f12Smrg[AC_REQUIRE([AC_PROG_CC])dnl 20462378475aSmrg 204714330f12Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 204814330f12Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 204914330f12Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 205014330f12Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 205195b296d0Smrg 205214330f12Smrg# If no C compiler was specified, use CC. 205314330f12SmrgLTCC=${LTCC-"$CC"} 205495b296d0Smrg 205514330f12Smrg# If no C compiler flags were specified, use CFLAGS. 205614330f12SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 205795b296d0Smrg 205814330f12Smrg# Allow CC to be a program name with arguments. 205914330f12Smrgcompiler=$CC 206014330f12Smrg])# _LT_TAG_COMPILER 206139713583Smrg 20622378475aSmrg 206314330f12Smrg# _LT_COMPILER_BOILERPLATE 206414330f12Smrg# ------------------------ 206514330f12Smrg# Check for compiler boilerplate output or warnings with 206614330f12Smrg# the simple compiler test code. 206714330f12Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 206814330f12Smrg[m4_require([_LT_DECL_SED])dnl 206914330f12Smrgac_outfile=conftest.$ac_objext 207014330f12Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 207114330f12Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 207214330f12Smrg_lt_compiler_boilerplate=`cat conftest.err` 207314330f12Smrg$RM conftest* 207414330f12Smrg])# _LT_COMPILER_BOILERPLATE 207595b296d0Smrg 207695b296d0Smrg 207714330f12Smrg# _LT_LINKER_BOILERPLATE 207814330f12Smrg# ---------------------- 207914330f12Smrg# Check for linker boilerplate output or warnings with 208014330f12Smrg# the simple link test code. 208114330f12Smrgm4_defun([_LT_LINKER_BOILERPLATE], 208214330f12Smrg[m4_require([_LT_DECL_SED])dnl 208314330f12Smrgac_outfile=conftest.$ac_objext 208414330f12Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 208514330f12Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 208614330f12Smrg_lt_linker_boilerplate=`cat conftest.err` 208714330f12Smrg$RM -r conftest* 208814330f12Smrg])# _LT_LINKER_BOILERPLATE 20892378475aSmrg 209014330f12Smrg# _LT_REQUIRED_DARWIN_CHECKS 209114330f12Smrg# ------------------------- 209214330f12Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 209314330f12Smrg case $host_os in 209414330f12Smrg rhapsody* | darwin*) 209514330f12Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 209614330f12Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 209714330f12Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 209814330f12Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 209914330f12Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 210014330f12Smrg _LT_DECL([], [DSYMUTIL], [1], 210114330f12Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 210214330f12Smrg _LT_DECL([], [NMEDIT], [1], 210314330f12Smrg [Tool to change global to local symbols on Mac OS X]) 210414330f12Smrg _LT_DECL([], [LIPO], [1], 210514330f12Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 210614330f12Smrg _LT_DECL([], [OTOOL], [1], 210714330f12Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 210814330f12Smrg _LT_DECL([], [OTOOL64], [1], 210914330f12Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 21102378475aSmrg 211114330f12Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 211214330f12Smrg [lt_cv_apple_cc_single_mod=no 211314330f12Smrg if test -z "${LT_MULTI_MODULE}"; then 211414330f12Smrg # By default we will add the -single_module flag. You can override 211514330f12Smrg # by either setting the environment variable LT_MULTI_MODULE 211614330f12Smrg # non-empty at configure time, or by adding -multi_module to the 211714330f12Smrg # link flags. 211814330f12Smrg rm -rf libconftest.dylib* 211914330f12Smrg echo "int foo(void){return 1;}" > conftest.c 212014330f12Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212114330f12Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 212214330f12Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212314330f12Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 212414330f12Smrg _lt_result=$? 212514330f12Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 212614330f12Smrg lt_cv_apple_cc_single_mod=yes 212714330f12Smrg else 212814330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 212914330f12Smrg fi 213014330f12Smrg rm -rf libconftest.dylib* 213114330f12Smrg rm -f conftest.* 213214330f12Smrg fi]) 213314330f12Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 213414330f12Smrg [lt_cv_ld_exported_symbols_list], 213514330f12Smrg [lt_cv_ld_exported_symbols_list=no 213614330f12Smrg save_LDFLAGS=$LDFLAGS 213714330f12Smrg echo "_main" > conftest.sym 213814330f12Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 213914330f12Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 214014330f12Smrg [lt_cv_ld_exported_symbols_list=yes], 214114330f12Smrg [lt_cv_ld_exported_symbols_list=no]) 214214330f12Smrg LDFLAGS="$save_LDFLAGS" 214314330f12Smrg ]) 214414330f12Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 214514330f12Smrg [lt_cv_ld_force_load=no 214614330f12Smrg cat > conftest.c << _LT_EOF 214714330f12Smrgint forced_loaded() { return 2;} 214814330f12Smrg_LT_EOF 214914330f12Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 215014330f12Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 215114330f12Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 215214330f12Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 215314330f12Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 215414330f12Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 215514330f12Smrg cat > conftest.c << _LT_EOF 215614330f12Smrgint main() { return 0;} 215714330f12Smrg_LT_EOF 215814330f12Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 215914330f12Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 216014330f12Smrg _lt_result=$? 216114330f12Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 216214330f12Smrg lt_cv_ld_force_load=yes 216314330f12Smrg else 216414330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 216514330f12Smrg fi 216614330f12Smrg rm -f conftest.err libconftest.a conftest conftest.c 216714330f12Smrg rm -rf conftest.dSYM 216814330f12Smrg ]) 216914330f12Smrg case $host_os in 217014330f12Smrg rhapsody* | darwin1.[[012]]) 217114330f12Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 217214330f12Smrg darwin1.*) 217314330f12Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 217414330f12Smrg darwin*) # darwin 5.x on 217514330f12Smrg # if running on 10.5 or later, the deployment target defaults 217614330f12Smrg # to the OS version, if on x86, and 10.4, the deployment 217714330f12Smrg # target defaults to 10.4. Don't you love it? 217814330f12Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 217914330f12Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 218014330f12Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218114330f12Smrg 10.[[012]]*) 218214330f12Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 218314330f12Smrg 10.*) 218414330f12Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218514330f12Smrg esac 218695b296d0Smrg ;; 218714330f12Smrg esac 218814330f12Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 218914330f12Smrg _lt_dar_single_mod='$single_module' 219014330f12Smrg fi 219114330f12Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 219214330f12Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 219314330f12Smrg else 219414330f12Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 219514330f12Smrg fi 219614330f12Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 219714330f12Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 219814330f12Smrg else 219914330f12Smrg _lt_dsymutil= 220014330f12Smrg fi 220195b296d0Smrg ;; 220295b296d0Smrg esac 220314330f12Smrg]) 220414330f12Smrg 220514330f12Smrg 220614330f12Smrg# _LT_DARWIN_LINKER_FEATURES 220714330f12Smrg# -------------------------- 220814330f12Smrg# Checks for linker and compiler features on darwin 220914330f12Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 221014330f12Smrg[ 221114330f12Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 221214330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 221314330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 221414330f12Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 221514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 221614330f12Smrg if test "$lt_cv_ld_force_load" = "yes"; then 221714330f12Smrg _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\"`' 221814330f12Smrg else 221914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 222014330f12Smrg fi 222114330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 222214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 222314330f12Smrg case $cc_basename in 222414330f12Smrg ifort*) _lt_dar_can_shared=yes ;; 222514330f12Smrg *) _lt_dar_can_shared=$GCC ;; 222614330f12Smrg esac 222714330f12Smrg if test "$_lt_dar_can_shared" = "yes"; then 222814330f12Smrg output_verbose_link_cmd=func_echo_all 222914330f12Smrg _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}" 223014330f12Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 223114330f12Smrg _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}" 223214330f12Smrg _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}" 223314330f12Smrg m4_if([$1], [CXX], 223414330f12Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 223514330f12Smrg _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}" 223614330f12Smrg _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}" 223795b296d0Smrg fi 223814330f12Smrg],[]) 223914330f12Smrg else 224014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 224114330f12Smrg fi 224214330f12Smrg]) 224314330f12Smrg 224414330f12Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 224514330f12Smrg# ---------------------------------- 224614330f12Smrg# Links a minimal program and checks the executable 224714330f12Smrg# for the system default hardcoded library path. In most cases, 224814330f12Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 224914330f12Smrg# the location of the communication and MPI libs are included too. 225014330f12Smrg# If we don't find anything, use the default library path according 225114330f12Smrg# to the aix ld manual. 225214330f12Smrg# Store the results from the different compilers for each TAGNAME. 225314330f12Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 225414330f12Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 225514330f12Smrg[m4_require([_LT_DECL_SED])dnl 225614330f12Smrgif test "${lt_cv_aix_libpath+set}" = set; then 225714330f12Smrg aix_libpath=$lt_cv_aix_libpath 225895b296d0Smrgelse 225914330f12Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 226014330f12Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 226114330f12Smrg lt_aix_libpath_sed='[ 226214330f12Smrg /Import File Strings/,/^$/ { 226314330f12Smrg /^0/ { 226414330f12Smrg s/^0 *\([^ ]*\) *$/\1/ 226514330f12Smrg p 226614330f12Smrg } 226714330f12Smrg }]' 226814330f12Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 226914330f12Smrg # Check for a 64-bit object if we didn't find anything. 227014330f12Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227114330f12Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 227214330f12Smrg fi],[]) 227314330f12Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227414330f12Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 227514330f12Smrg fi 227614330f12Smrg ]) 227714330f12Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 227895b296d0Smrgfi 227914330f12Smrg])# _LT_SYS_MODULE_PATH_AIX 228095b296d0Smrg 228195b296d0Smrg 228214330f12Smrg# _LT_SHELL_INIT(ARG) 228314330f12Smrg# ------------------- 228414330f12Smrgm4_define([_LT_SHELL_INIT], 228514330f12Smrg[m4_divert_text([M4SH-INIT], [$1 228614330f12Smrg])])# _LT_SHELL_INIT 22872378475aSmrg 22882378475aSmrg 228995b296d0Smrg 229014330f12Smrg# _LT_PROG_ECHO_BACKSLASH 229114330f12Smrg# ----------------------- 229214330f12Smrg# Find how we can fake an echo command that does not interpret backslash. 229314330f12Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 229414330f12Smrg# of the generated configure script which will find a shell with a builtin 229514330f12Smrg# printf (which we can use as an echo command). 229614330f12Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 229714330f12Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 229814330f12SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 229914330f12SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 230014330f12Smrg 230114330f12SmrgAC_MSG_CHECKING([how to print strings]) 230214330f12Smrg# Test print first, because it will be a builtin if present. 230314330f12Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 230414330f12Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 230514330f12Smrg ECHO='print -r --' 230614330f12Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 230714330f12Smrg ECHO='printf %s\n' 230814330f12Smrgelse 230914330f12Smrg # Use this function as a fallback that always works. 231014330f12Smrg func_fallback_echo () 231114330f12Smrg { 231214330f12Smrg eval 'cat <<_LTECHO_EOF 231314330f12Smrg$[]1 231414330f12Smrg_LTECHO_EOF' 231514330f12Smrg } 231614330f12Smrg ECHO='func_fallback_echo' 231714330f12Smrgfi 231895b296d0Smrg 231914330f12Smrg# func_echo_all arg... 232014330f12Smrg# Invoke $ECHO with all args, space-separated. 232114330f12Smrgfunc_echo_all () 232214330f12Smrg{ 232314330f12Smrg $ECHO "$*" 232414330f12Smrg} 232514330f12Smrg 232614330f12Smrgcase "$ECHO" in 232714330f12Smrg printf*) AC_MSG_RESULT([printf]) ;; 232814330f12Smrg print*) AC_MSG_RESULT([print -r]) ;; 232914330f12Smrg *) AC_MSG_RESULT([cat]) ;; 233095b296d0Smrgesac 233195b296d0Smrg 233214330f12Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 233314330f12Smrg[_AS_DETECT_SUGGESTED([ 233414330f12Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 233514330f12Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 233614330f12Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 233714330f12Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 233814330f12Smrg PATH=/empty FPATH=/empty; export PATH FPATH 233914330f12Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 234014330f12Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 234195b296d0Smrg 234214330f12Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 234314330f12Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 234414330f12Smrg])# _LT_PROG_ECHO_BACKSLASH 234595b296d0Smrg 234695b296d0Smrg 234714330f12Smrg# _LT_WITH_SYSROOT 234814330f12Smrg# ---------------- 234914330f12SmrgAC_DEFUN([_LT_WITH_SYSROOT], 235014330f12Smrg[AC_MSG_CHECKING([for sysroot]) 235114330f12SmrgAC_ARG_WITH([sysroot], 235214330f12Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 235314330f12Smrg (or the compiler's sysroot if not specified).], 235414330f12Smrg[], [with_sysroot=no]) 235514330f12Smrg 235614330f12Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 235714330f12Smrgdnl in case the user passed a directory name. 235814330f12Smrglt_sysroot= 235914330f12Smrgcase ${with_sysroot} in #( 236014330f12Smrg yes) 236114330f12Smrg if test "$GCC" = yes; then 236214330f12Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 236314330f12Smrg fi 236414330f12Smrg ;; #( 236514330f12Smrg /*) 236614330f12Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 236714330f12Smrg ;; #( 236814330f12Smrg no|'') 236914330f12Smrg ;; #( 237014330f12Smrg *) 237114330f12Smrg AC_MSG_RESULT([${with_sysroot}]) 237214330f12Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 237314330f12Smrg ;; 237414330f12Smrgesac 237595b296d0Smrg 237614330f12Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 237714330f12Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 237814330f12Smrg[dependent libraries, and in which our libraries should be installed.])]) 237995b296d0Smrg 238014330f12Smrg# _LT_ENABLE_LOCK 238114330f12Smrg# --------------- 238214330f12Smrgm4_defun([_LT_ENABLE_LOCK], 238314330f12Smrg[AC_ARG_ENABLE([libtool-lock], 238414330f12Smrg [AS_HELP_STRING([--disable-libtool-lock], 238514330f12Smrg [avoid locking (might break parallel builds)])]) 238614330f12Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 238795b296d0Smrg 238814330f12Smrg# Some flags need to be propagated to the compiler or linker for good 238914330f12Smrg# libtool support. 239014330f12Smrgcase $host in 239114330f12Smrgia64-*-hpux*) 239214330f12Smrg # Find out which ABI we are using. 239314330f12Smrg echo 'int i;' > conftest.$ac_ext 239414330f12Smrg if AC_TRY_EVAL(ac_compile); then 239514330f12Smrg case `/usr/bin/file conftest.$ac_objext` in 239614330f12Smrg *ELF-32*) 239714330f12Smrg HPUX_IA64_MODE="32" 239814330f12Smrg ;; 239914330f12Smrg *ELF-64*) 240014330f12Smrg HPUX_IA64_MODE="64" 240114330f12Smrg ;; 240214330f12Smrg esac 2403ff89ac2bSmrg fi 240414330f12Smrg rm -rf conftest* 240595b296d0Smrg ;; 240614330f12Smrg*-*-irix6*) 240714330f12Smrg # Find out which ABI we are using. 240814330f12Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 240914330f12Smrg if AC_TRY_EVAL(ac_compile); then 241014330f12Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 241114330f12Smrg case `/usr/bin/file conftest.$ac_objext` in 241214330f12Smrg *32-bit*) 241314330f12Smrg LD="${LD-ld} -melf32bsmip" 241414330f12Smrg ;; 241514330f12Smrg *N32*) 241614330f12Smrg LD="${LD-ld} -melf32bmipn32" 241714330f12Smrg ;; 241814330f12Smrg *64-bit*) 241914330f12Smrg LD="${LD-ld} -melf64bmip" 242014330f12Smrg ;; 242114330f12Smrg esac 242214330f12Smrg else 242314330f12Smrg case `/usr/bin/file conftest.$ac_objext` in 242414330f12Smrg *32-bit*) 242514330f12Smrg LD="${LD-ld} -32" 242614330f12Smrg ;; 242714330f12Smrg *N32*) 242814330f12Smrg LD="${LD-ld} -n32" 242914330f12Smrg ;; 243014330f12Smrg *64-bit*) 243114330f12Smrg LD="${LD-ld} -64" 243214330f12Smrg ;; 243314330f12Smrg esac 243414330f12Smrg fi 243514330f12Smrg fi 243614330f12Smrg rm -rf conftest* 24372378475aSmrg ;; 24382378475aSmrg 243914330f12Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 244014330f12Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 244114330f12Smrg # Find out which ABI we are using. 244214330f12Smrg echo 'int i;' > conftest.$ac_ext 244314330f12Smrg if AC_TRY_EVAL(ac_compile); then 244414330f12Smrg case `/usr/bin/file conftest.o` in 244514330f12Smrg *32-bit*) 244614330f12Smrg case $host in 244714330f12Smrg x86_64-*kfreebsd*-gnu) 244814330f12Smrg LD="${LD-ld} -m elf_i386_fbsd" 244914330f12Smrg ;; 245014330f12Smrg x86_64-*linux*) 245114330f12Smrg LD="${LD-ld} -m elf_i386" 245214330f12Smrg ;; 245314330f12Smrg ppc64-*linux*|powerpc64-*linux*) 245414330f12Smrg LD="${LD-ld} -m elf32ppclinux" 245514330f12Smrg ;; 245614330f12Smrg s390x-*linux*) 245714330f12Smrg LD="${LD-ld} -m elf_s390" 245814330f12Smrg ;; 245914330f12Smrg sparc64-*linux*) 246014330f12Smrg LD="${LD-ld} -m elf32_sparc" 246114330f12Smrg ;; 246214330f12Smrg esac 246314330f12Smrg ;; 246414330f12Smrg *64-bit*) 246514330f12Smrg case $host in 246614330f12Smrg x86_64-*kfreebsd*-gnu) 246714330f12Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 246814330f12Smrg ;; 246914330f12Smrg x86_64-*linux*) 247014330f12Smrg LD="${LD-ld} -m elf_x86_64" 247114330f12Smrg ;; 247214330f12Smrg ppc*-*linux*|powerpc*-*linux*) 247314330f12Smrg LD="${LD-ld} -m elf64ppc" 247414330f12Smrg ;; 247514330f12Smrg s390*-*linux*|s390*-*tpf*) 247614330f12Smrg LD="${LD-ld} -m elf64_s390" 247714330f12Smrg ;; 247814330f12Smrg sparc*-*linux*) 247914330f12Smrg LD="${LD-ld} -m elf64_sparc" 248014330f12Smrg ;; 248114330f12Smrg esac 248214330f12Smrg ;; 248314330f12Smrg esac 248414330f12Smrg fi 248514330f12Smrg rm -rf conftest* 248695b296d0Smrg ;; 248795b296d0Smrg 248814330f12Smrg*-*-sco3.2v5*) 248914330f12Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 249014330f12Smrg SAVE_CFLAGS="$CFLAGS" 249114330f12Smrg CFLAGS="$CFLAGS -belf" 249214330f12Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 249314330f12Smrg [AC_LANG_PUSH(C) 249414330f12Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 249514330f12Smrg AC_LANG_POP]) 249614330f12Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 249714330f12Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 249814330f12Smrg CFLAGS="$SAVE_CFLAGS" 249914330f12Smrg fi 250014330f12Smrg ;; 250114330f12Smrgsparc*-*solaris*) 250214330f12Smrg # Find out which ABI we are using. 250314330f12Smrg echo 'int i;' > conftest.$ac_ext 250414330f12Smrg if AC_TRY_EVAL(ac_compile); then 250514330f12Smrg case `/usr/bin/file conftest.o` in 250614330f12Smrg *64-bit*) 250714330f12Smrg case $lt_cv_prog_gnu_ld in 250814330f12Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 250914330f12Smrg *) 251014330f12Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 251114330f12Smrg LD="${LD-ld} -64" 251214330f12Smrg fi 251314330f12Smrg ;; 251414330f12Smrg esac 251595b296d0Smrg ;; 251695b296d0Smrg esac 251795b296d0Smrg fi 251814330f12Smrg rm -rf conftest* 251995b296d0Smrg ;; 252014330f12Smrgesac 252195b296d0Smrg 252214330f12Smrgneed_locks="$enable_libtool_lock" 252314330f12Smrg])# _LT_ENABLE_LOCK 252495b296d0Smrg 252595b296d0Smrg 252614330f12Smrg# _LT_PROG_AR 252714330f12Smrg# ----------- 252814330f12Smrgm4_defun([_LT_PROG_AR], 252914330f12Smrg[AC_CHECK_TOOLS(AR, [ar], false) 253014330f12Smrg: ${AR=ar} 253114330f12Smrg: ${AR_FLAGS=cru} 253214330f12Smrg_LT_DECL([], [AR], [1], [The archiver]) 253314330f12Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 253414330f12Smrg 253514330f12SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 253614330f12Smrg [lt_cv_ar_at_file=no 253714330f12Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 253814330f12Smrg [echo conftest.$ac_objext > conftest.lst 253914330f12Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 254014330f12Smrg AC_TRY_EVAL([lt_ar_try]) 254114330f12Smrg if test "$ac_status" -eq 0; then 254214330f12Smrg # Ensure the archiver fails upon bogus file names. 254314330f12Smrg rm -f conftest.$ac_objext libconftest.a 254414330f12Smrg AC_TRY_EVAL([lt_ar_try]) 254514330f12Smrg if test "$ac_status" -ne 0; then 254614330f12Smrg lt_cv_ar_at_file=@ 254714330f12Smrg fi 254814330f12Smrg fi 254914330f12Smrg rm -f conftest.* libconftest.a 255014330f12Smrg ]) 255114330f12Smrg ]) 255295b296d0Smrg 255314330f12Smrgif test "x$lt_cv_ar_at_file" = xno; then 255414330f12Smrg archiver_list_spec= 255514330f12Smrgelse 255614330f12Smrg archiver_list_spec=$lt_cv_ar_at_file 255714330f12Smrgfi 255814330f12Smrg_LT_DECL([], [archiver_list_spec], [1], 255914330f12Smrg [How to feed a file listing to the archiver]) 256014330f12Smrg])# _LT_PROG_AR 256195b296d0Smrg 256295b296d0Smrg 256314330f12Smrg# _LT_CMD_OLD_ARCHIVE 256414330f12Smrg# ------------------- 256514330f12Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 256614330f12Smrg[_LT_PROG_AR 256795b296d0Smrg 256814330f12SmrgAC_CHECK_TOOL(STRIP, strip, :) 256914330f12Smrgtest -z "$STRIP" && STRIP=: 257014330f12Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 257195b296d0Smrg 257214330f12SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 257314330f12Smrgtest -z "$RANLIB" && RANLIB=: 257414330f12Smrg_LT_DECL([], [RANLIB], [1], 257514330f12Smrg [Commands used to install an old-style archive]) 257695b296d0Smrg 257714330f12Smrg# Determine commands to create old-style static archives. 257814330f12Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 257914330f12Smrgold_postinstall_cmds='chmod 644 $oldlib' 258014330f12Smrgold_postuninstall_cmds= 258195b296d0Smrg 258214330f12Smrgif test -n "$RANLIB"; then 258314330f12Smrg case $host_os in 258414330f12Smrg openbsd*) 258514330f12Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 258614330f12Smrg ;; 258714330f12Smrg *) 258814330f12Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 258914330f12Smrg ;; 259014330f12Smrg esac 259114330f12Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 259214330f12Smrgfi 2593ff89ac2bSmrg 259414330f12Smrgcase $host_os in 259514330f12Smrg darwin*) 259614330f12Smrg lock_old_archive_extraction=yes ;; 259714330f12Smrg *) 259814330f12Smrg lock_old_archive_extraction=no ;; 259995b296d0Smrgesac 260014330f12Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 260114330f12Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 260214330f12Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 260314330f12Smrg [Commands used to build an old-style archive]) 260414330f12Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 260514330f12Smrg [Whether to use a lock for old archive extraction]) 260614330f12Smrg])# _LT_CMD_OLD_ARCHIVE 260795b296d0Smrg 260895b296d0Smrg 260914330f12Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 261014330f12Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 261114330f12Smrg# ---------------------------------------------------------------- 261214330f12Smrg# Check whether the given compiler option works 261314330f12SmrgAC_DEFUN([_LT_COMPILER_OPTION], 261414330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 261514330f12Smrgm4_require([_LT_DECL_SED])dnl 261614330f12SmrgAC_CACHE_CHECK([$1], [$2], 261714330f12Smrg [$2=no 261814330f12Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 261914330f12Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 262014330f12Smrg lt_compiler_flag="$3" 262114330f12Smrg # Insert the option either (1) after the last *FLAGS variable, or 262214330f12Smrg # (2) before a word containing "conftest.", or (3) at the end. 262314330f12Smrg # Note that $ac_compile itself does not contain backslashes and begins 262414330f12Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 262514330f12Smrg # The option is referenced via a variable to avoid confusing sed. 262614330f12Smrg lt_compile=`echo "$ac_compile" | $SED \ 262714330f12Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 262814330f12Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 262914330f12Smrg -e 's:$: $lt_compiler_flag:'` 263014330f12Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 263114330f12Smrg (eval "$lt_compile" 2>conftest.err) 263214330f12Smrg ac_status=$? 263314330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 263414330f12Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 263514330f12Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 263614330f12Smrg # The compiler can only warn and ignore the option if not recognized 263714330f12Smrg # So say no if there are warnings other than the usual output. 263814330f12Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 263914330f12Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 264014330f12Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 264114330f12Smrg $2=yes 264214330f12Smrg fi 264314330f12Smrg fi 264414330f12Smrg $RM conftest* 264514330f12Smrg]) 26462378475aSmrg 264714330f12Smrgif test x"[$]$2" = xyes; then 264814330f12Smrg m4_if([$5], , :, [$5]) 26492378475aSmrgelse 265014330f12Smrg m4_if([$6], , :, [$6]) 26512378475aSmrgfi 265214330f12Smrg])# _LT_COMPILER_OPTION 265395b296d0Smrg 265414330f12Smrg# Old name: 265514330f12SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 26562378475aSmrgdnl aclocal-1.4 backwards compatibility: 265714330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 265839713583Smrg 26592378475aSmrg 266014330f12Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 266114330f12Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 266214330f12Smrg# ---------------------------------------------------- 266314330f12Smrg# Check whether the given linker option works 266414330f12SmrgAC_DEFUN([_LT_LINKER_OPTION], 266514330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 266614330f12Smrgm4_require([_LT_DECL_SED])dnl 266714330f12SmrgAC_CACHE_CHECK([$1], [$2], 266814330f12Smrg [$2=no 266914330f12Smrg save_LDFLAGS="$LDFLAGS" 267014330f12Smrg LDFLAGS="$LDFLAGS $3" 267114330f12Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 267214330f12Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 267314330f12Smrg # The linker can only warn and ignore the option if not recognized 267414330f12Smrg # So say no if there are warnings 267514330f12Smrg if test -s conftest.err; then 267614330f12Smrg # Append any errors to the config.log. 267714330f12Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 267814330f12Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 267914330f12Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 268014330f12Smrg if diff conftest.exp conftest.er2 >/dev/null; then 268114330f12Smrg $2=yes 268214330f12Smrg fi 268314330f12Smrg else 268414330f12Smrg $2=yes 268514330f12Smrg fi 268614330f12Smrg fi 268714330f12Smrg $RM -r conftest* 268814330f12Smrg LDFLAGS="$save_LDFLAGS" 268914330f12Smrg]) 269014330f12Smrg 269114330f12Smrgif test x"[$]$2" = xyes; then 269214330f12Smrg m4_if([$4], , :, [$4]) 269314330f12Smrgelse 269414330f12Smrg m4_if([$5], , :, [$5]) 269514330f12Smrgfi 269614330f12Smrg])# _LT_LINKER_OPTION 269795b296d0Smrg 26982378475aSmrg# Old name: 269914330f12SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 27002378475aSmrgdnl aclocal-1.4 backwards compatibility: 270114330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 270295b296d0Smrg 270395b296d0Smrg 270414330f12Smrg# LT_CMD_MAX_LEN 270514330f12Smrg#--------------- 270614330f12SmrgAC_DEFUN([LT_CMD_MAX_LEN], 270714330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 270814330f12Smrg# find the maximum length of command line arguments 270914330f12SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 271014330f12SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 271114330f12Smrg i=0 271214330f12Smrg teststring="ABCD" 271395b296d0Smrg 271414330f12Smrg case $build_os in 271514330f12Smrg msdosdjgpp*) 271614330f12Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 271714330f12Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 271814330f12Smrg # during glob expansion). Even if it were fixed, the result of this 271914330f12Smrg # check would be larger than it should be. 272014330f12Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 272114330f12Smrg ;; 272295b296d0Smrg 272314330f12Smrg gnu*) 272414330f12Smrg # Under GNU Hurd, this test is not required because there is 272514330f12Smrg # no limit to the length of command line arguments. 272614330f12Smrg # Libtool will interpret -1 as no limit whatsoever 272714330f12Smrg lt_cv_sys_max_cmd_len=-1; 272814330f12Smrg ;; 272995b296d0Smrg 273014330f12Smrg cygwin* | mingw* | cegcc*) 273114330f12Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 273214330f12Smrg # about 5 minutes as the teststring grows exponentially. 273314330f12Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 273414330f12Smrg # you end up with a "frozen" computer, even though with patience 273514330f12Smrg # the test eventually succeeds (with a max line length of 256k). 273614330f12Smrg # Instead, let's just punt: use the minimum linelength reported by 273714330f12Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 273814330f12Smrg lt_cv_sys_max_cmd_len=8192; 273914330f12Smrg ;; 274095b296d0Smrg 274114330f12Smrg mint*) 274214330f12Smrg # On MiNT this can take a long time and run out of memory. 274314330f12Smrg lt_cv_sys_max_cmd_len=8192; 274414330f12Smrg ;; 274595b296d0Smrg 274614330f12Smrg amigaos*) 274714330f12Smrg # On AmigaOS with pdksh, this test takes hours, literally. 274814330f12Smrg # So we just punt and use a minimum line length of 8192. 274914330f12Smrg lt_cv_sys_max_cmd_len=8192; 275014330f12Smrg ;; 275195b296d0Smrg 275214330f12Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 275314330f12Smrg # This has been around since 386BSD, at least. Likely further. 275414330f12Smrg if test -x /sbin/sysctl; then 275514330f12Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 275614330f12Smrg elif test -x /usr/sbin/sysctl; then 275714330f12Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 275814330f12Smrg else 275914330f12Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 276014330f12Smrg fi 276114330f12Smrg # And add a safety zone 276214330f12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 276314330f12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 276414330f12Smrg ;; 276595b296d0Smrg 276614330f12Smrg interix*) 276714330f12Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 276814330f12Smrg lt_cv_sys_max_cmd_len=196608 276914330f12Smrg ;; 277095b296d0Smrg 277114330f12Smrg osf*) 277214330f12Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 277314330f12Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 277414330f12Smrg # nice to cause kernel panics so lets avoid the loop below. 277514330f12Smrg # First set a reasonable default. 277614330f12Smrg lt_cv_sys_max_cmd_len=16384 277714330f12Smrg # 277814330f12Smrg if test -x /sbin/sysconfig; then 277914330f12Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 278014330f12Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 278114330f12Smrg esac 278214330f12Smrg fi 278314330f12Smrg ;; 278414330f12Smrg sco3.2v5*) 278514330f12Smrg lt_cv_sys_max_cmd_len=102400 278614330f12Smrg ;; 278714330f12Smrg sysv5* | sco5v6* | sysv4.2uw2*) 278814330f12Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 278914330f12Smrg if test -n "$kargmax"; then 279014330f12Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 279114330f12Smrg else 279214330f12Smrg lt_cv_sys_max_cmd_len=32768 279314330f12Smrg fi 279414330f12Smrg ;; 279514330f12Smrg *) 279614330f12Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 279714330f12Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 279814330f12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 279914330f12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 280014330f12Smrg else 280114330f12Smrg # Make teststring a little bigger before we do anything with it. 280214330f12Smrg # a 1K string should be a reasonable start. 280314330f12Smrg for i in 1 2 3 4 5 6 7 8 ; do 280414330f12Smrg teststring=$teststring$teststring 280514330f12Smrg done 280614330f12Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 280714330f12Smrg # If test is not a shell built-in, we'll probably end up computing a 280814330f12Smrg # maximum length that is only half of the actual maximum length, but 280914330f12Smrg # we can't tell. 281014330f12Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 281114330f12Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 281214330f12Smrg test $i != 17 # 1/2 MB should be enough 281314330f12Smrg do 281414330f12Smrg i=`expr $i + 1` 281514330f12Smrg teststring=$teststring$teststring 281614330f12Smrg done 281714330f12Smrg # Only check the string length outside the loop. 281814330f12Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 281914330f12Smrg teststring= 282014330f12Smrg # Add a significant safety factor because C++ compilers can tack on 282114330f12Smrg # massive amounts of additional arguments before passing them to the 282214330f12Smrg # linker. It appears as though 1/2 is a usable value. 282314330f12Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 282414330f12Smrg fi 282514330f12Smrg ;; 282614330f12Smrg esac 282714330f12Smrg]) 282814330f12Smrgif test -n $lt_cv_sys_max_cmd_len ; then 282914330f12Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 283014330f12Smrgelse 283114330f12Smrg AC_MSG_RESULT(none) 283214330f12Smrgfi 283314330f12Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 283414330f12Smrg_LT_DECL([], [max_cmd_len], [0], 283514330f12Smrg [What is the maximum length of a command?]) 283614330f12Smrg])# LT_CMD_MAX_LEN 283795b296d0Smrg 283814330f12Smrg# Old name: 283914330f12SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 284014330f12Smrgdnl aclocal-1.4 backwards compatibility: 284114330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 284295b296d0Smrg 284395b296d0Smrg 284414330f12Smrg# _LT_HEADER_DLFCN 284514330f12Smrg# ---------------- 284614330f12Smrgm4_defun([_LT_HEADER_DLFCN], 284714330f12Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 284814330f12Smrg])# _LT_HEADER_DLFCN 284995b296d0Smrg 285095b296d0Smrg 285114330f12Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 285214330f12Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 285314330f12Smrg# ---------------------------------------------------------------- 285414330f12Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 285514330f12Smrg[m4_require([_LT_HEADER_DLFCN])dnl 285614330f12Smrgif test "$cross_compiling" = yes; then : 285714330f12Smrg [$4] 285814330f12Smrgelse 285914330f12Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 286014330f12Smrg lt_status=$lt_dlunknown 286114330f12Smrg cat > conftest.$ac_ext <<_LT_EOF 286214330f12Smrg[#line $LINENO "configure" 286314330f12Smrg#include "confdefs.h" 286495b296d0Smrg 286514330f12Smrg#if HAVE_DLFCN_H 286614330f12Smrg#include <dlfcn.h> 286714330f12Smrg#endif 2868e6f085baSmrg 286914330f12Smrg#include <stdio.h> 2870e6f085baSmrg 287114330f12Smrg#ifdef RTLD_GLOBAL 287214330f12Smrg# define LT_DLGLOBAL RTLD_GLOBAL 287314330f12Smrg#else 287414330f12Smrg# ifdef DL_GLOBAL 287514330f12Smrg# define LT_DLGLOBAL DL_GLOBAL 287614330f12Smrg# else 287714330f12Smrg# define LT_DLGLOBAL 0 287814330f12Smrg# endif 28792378475aSmrg#endif 2880e6f085baSmrg 288114330f12Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 288214330f12Smrg find out it does not work in some platform. */ 288314330f12Smrg#ifndef LT_DLLAZY_OR_NOW 288414330f12Smrg# ifdef RTLD_LAZY 288514330f12Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 288614330f12Smrg# else 288714330f12Smrg# ifdef DL_LAZY 288814330f12Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 288914330f12Smrg# else 289014330f12Smrg# ifdef RTLD_NOW 289114330f12Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 289214330f12Smrg# else 289314330f12Smrg# ifdef DL_NOW 289414330f12Smrg# define LT_DLLAZY_OR_NOW DL_NOW 289514330f12Smrg# else 289614330f12Smrg# define LT_DLLAZY_OR_NOW 0 289714330f12Smrg# endif 289814330f12Smrg# endif 289914330f12Smrg# endif 290014330f12Smrg# endif 29012378475aSmrg#endif 2902e6f085baSmrg 290314330f12Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 290414330f12Smrg correspondingly for the symbols needed. */ 290514330f12Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 290614330f12Smrgint fnord () __attribute__((visibility("default"))); 290714330f12Smrg#endif 2908e6f085baSmrg 290914330f12Smrgint fnord () { return 42; } 291014330f12Smrgint main () 29112378475aSmrg{ 291214330f12Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 291314330f12Smrg int status = $lt_dlunknown; 2914e6f085baSmrg 291514330f12Smrg if (self) 291614330f12Smrg { 291714330f12Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29182378475aSmrg else 291914330f12Smrg { 292014330f12Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 292114330f12Smrg else puts (dlerror ()); 292214330f12Smrg } 292314330f12Smrg /* dlclose (self); */ 292414330f12Smrg } 292595b296d0Smrg else 292614330f12Smrg puts (dlerror ()); 292795b296d0Smrg 292814330f12Smrg return status; 292914330f12Smrg}] 293014330f12Smrg_LT_EOF 293114330f12Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 293214330f12Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 293314330f12Smrg lt_status=$? 293414330f12Smrg case x$lt_status in 293514330f12Smrg x$lt_dlno_uscore) $1 ;; 293614330f12Smrg x$lt_dlneed_uscore) $2 ;; 293714330f12Smrg x$lt_dlunknown|x*) $3 ;; 293814330f12Smrg esac 293914330f12Smrg else : 294014330f12Smrg # compilation failed 294114330f12Smrg $3 29422378475aSmrg fi 29432378475aSmrgfi 294414330f12Smrgrm -fr conftest* 294514330f12Smrg])# _LT_TRY_DLOPEN_SELF 294614330f12Smrg 294714330f12Smrg 294814330f12Smrg# LT_SYS_DLOPEN_SELF 294914330f12Smrg# ------------------ 295014330f12SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 295114330f12Smrg[m4_require([_LT_HEADER_DLFCN])dnl 295214330f12Smrgif test "x$enable_dlopen" != xyes; then 295314330f12Smrg enable_dlopen=unknown 295414330f12Smrg enable_dlopen_self=unknown 295514330f12Smrg enable_dlopen_self_static=unknown 295695b296d0Smrgelse 295714330f12Smrg lt_cv_dlopen=no 295814330f12Smrg lt_cv_dlopen_libs= 295995b296d0Smrg 296014330f12Smrg case $host_os in 296114330f12Smrg beos*) 296214330f12Smrg lt_cv_dlopen="load_add_on" 296314330f12Smrg lt_cv_dlopen_libs= 296414330f12Smrg lt_cv_dlopen_self=yes 296514330f12Smrg ;; 296695b296d0Smrg 296714330f12Smrg mingw* | pw32* | cegcc*) 296814330f12Smrg lt_cv_dlopen="LoadLibrary" 296914330f12Smrg lt_cv_dlopen_libs= 297014330f12Smrg ;; 297195b296d0Smrg 297214330f12Smrg cygwin*) 297314330f12Smrg lt_cv_dlopen="dlopen" 297414330f12Smrg lt_cv_dlopen_libs= 297514330f12Smrg ;; 297695b296d0Smrg 297714330f12Smrg darwin*) 297814330f12Smrg # if libdl is installed we need to link against it 297914330f12Smrg AC_CHECK_LIB([dl], [dlopen], 298014330f12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 298114330f12Smrg lt_cv_dlopen="dyld" 298214330f12Smrg lt_cv_dlopen_libs= 298314330f12Smrg lt_cv_dlopen_self=yes 298414330f12Smrg ]) 298514330f12Smrg ;; 2986e6f085baSmrg 298714330f12Smrg *) 298814330f12Smrg AC_CHECK_FUNC([shl_load], 298914330f12Smrg [lt_cv_dlopen="shl_load"], 299014330f12Smrg [AC_CHECK_LIB([dld], [shl_load], 299114330f12Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 299214330f12Smrg [AC_CHECK_FUNC([dlopen], 299314330f12Smrg [lt_cv_dlopen="dlopen"], 299414330f12Smrg [AC_CHECK_LIB([dl], [dlopen], 299514330f12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 299614330f12Smrg [AC_CHECK_LIB([svld], [dlopen], 299714330f12Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 299814330f12Smrg [AC_CHECK_LIB([dld], [dld_link], 299914330f12Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 300014330f12Smrg ]) 300114330f12Smrg ]) 300214330f12Smrg ]) 300314330f12Smrg ]) 300414330f12Smrg ]) 300514330f12Smrg ;; 300614330f12Smrg esac 300795b296d0Smrg 300814330f12Smrg if test "x$lt_cv_dlopen" != xno; then 300914330f12Smrg enable_dlopen=yes 301014330f12Smrg else 301114330f12Smrg enable_dlopen=no 301214330f12Smrg fi 301395b296d0Smrg 301414330f12Smrg case $lt_cv_dlopen in 301514330f12Smrg dlopen) 301614330f12Smrg save_CPPFLAGS="$CPPFLAGS" 301714330f12Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 301814330f12Smrg 301914330f12Smrg save_LDFLAGS="$LDFLAGS" 302014330f12Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 302114330f12Smrg 302214330f12Smrg save_LIBS="$LIBS" 302314330f12Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 302414330f12Smrg 302514330f12Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 302614330f12Smrg lt_cv_dlopen_self, [dnl 302714330f12Smrg _LT_TRY_DLOPEN_SELF( 302814330f12Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 302914330f12Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 303014330f12Smrg ]) 303114330f12Smrg 303214330f12Smrg if test "x$lt_cv_dlopen_self" = xyes; then 303314330f12Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 303414330f12Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 303514330f12Smrg lt_cv_dlopen_self_static, [dnl 303614330f12Smrg _LT_TRY_DLOPEN_SELF( 303714330f12Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 303814330f12Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 303914330f12Smrg ]) 304014330f12Smrg fi 304114330f12Smrg 304214330f12Smrg CPPFLAGS="$save_CPPFLAGS" 304314330f12Smrg LDFLAGS="$save_LDFLAGS" 304414330f12Smrg LIBS="$save_LIBS" 304514330f12Smrg ;; 304614330f12Smrg esac 304714330f12Smrg 304814330f12Smrg case $lt_cv_dlopen_self in 304914330f12Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 305014330f12Smrg *) enable_dlopen_self=unknown ;; 305114330f12Smrg esac 305214330f12Smrg 305314330f12Smrg case $lt_cv_dlopen_self_static in 305414330f12Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 305514330f12Smrg *) enable_dlopen_self_static=unknown ;; 305614330f12Smrg esac 305714330f12Smrgfi 305814330f12Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 305914330f12Smrg [Whether dlopen is supported]) 306014330f12Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 306114330f12Smrg [Whether dlopen of programs is supported]) 306214330f12Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 306314330f12Smrg [Whether dlopen of statically linked programs is supported]) 306414330f12Smrg])# LT_SYS_DLOPEN_SELF 306514330f12Smrg 306614330f12Smrg# Old name: 306714330f12SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 306814330f12Smrgdnl aclocal-1.4 backwards compatibility: 306914330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 307014330f12Smrg 307114330f12Smrg 307214330f12Smrg# _LT_COMPILER_C_O([TAGNAME]) 307314330f12Smrg# --------------------------- 307414330f12Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 307514330f12Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 307614330f12Smrgm4_defun([_LT_COMPILER_C_O], 307714330f12Smrg[m4_require([_LT_DECL_SED])dnl 307814330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 307914330f12Smrgm4_require([_LT_TAG_COMPILER])dnl 308014330f12SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 308114330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 308214330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 308314330f12Smrg $RM -r conftest 2>/dev/null 308414330f12Smrg mkdir conftest 308514330f12Smrg cd conftest 308614330f12Smrg mkdir out 308714330f12Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 308814330f12Smrg 308914330f12Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 309014330f12Smrg # Insert the option either (1) after the last *FLAGS variable, or 309114330f12Smrg # (2) before a word containing "conftest.", or (3) at the end. 309214330f12Smrg # Note that $ac_compile itself does not contain backslashes and begins 309314330f12Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 309414330f12Smrg lt_compile=`echo "$ac_compile" | $SED \ 309514330f12Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 309614330f12Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 309714330f12Smrg -e 's:$: $lt_compiler_flag:'` 309814330f12Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 309914330f12Smrg (eval "$lt_compile" 2>out/conftest.err) 310014330f12Smrg ac_status=$? 310114330f12Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 310214330f12Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 310314330f12Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 310414330f12Smrg then 310514330f12Smrg # The compiler can only warn and ignore the option if not recognized 310614330f12Smrg # So say no if there are warnings 310714330f12Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 310814330f12Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 310914330f12Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 311014330f12Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 311114330f12Smrg fi 311214330f12Smrg fi 311314330f12Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 311414330f12Smrg $RM conftest* 311514330f12Smrg # SGI C++ compiler will create directory out/ii_files/ for 311614330f12Smrg # template instantiation 311714330f12Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 311814330f12Smrg $RM out/* && rmdir out 311914330f12Smrg cd .. 312014330f12Smrg $RM -r conftest 312114330f12Smrg $RM conftest* 312214330f12Smrg]) 312314330f12Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 312414330f12Smrg [Does compiler simultaneously support -c and -o options?]) 312514330f12Smrg])# _LT_COMPILER_C_O 312614330f12Smrg 312714330f12Smrg 312814330f12Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 312914330f12Smrg# ---------------------------------- 313014330f12Smrg# Check to see if we can do hard links to lock some files if needed 313114330f12Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 313214330f12Smrg[m4_require([_LT_ENABLE_LOCK])dnl 313314330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 313414330f12Smrg_LT_COMPILER_C_O([$1]) 313514330f12Smrg 313614330f12Smrghard_links="nottested" 313714330f12Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 313814330f12Smrg # do not overwrite the value of need_locks provided by the user 313914330f12Smrg AC_MSG_CHECKING([if we can lock with hard links]) 314014330f12Smrg hard_links=yes 314114330f12Smrg $RM conftest* 314214330f12Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314314330f12Smrg touch conftest.a 314414330f12Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 314514330f12Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314614330f12Smrg AC_MSG_RESULT([$hard_links]) 314714330f12Smrg if test "$hard_links" = no; then 314814330f12Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 314914330f12Smrg need_locks=warn 315014330f12Smrg fi 315114330f12Smrgelse 315214330f12Smrg need_locks=no 315314330f12Smrgfi 315414330f12Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 315514330f12Smrg])# _LT_COMPILER_FILE_LOCKS 315614330f12Smrg 315714330f12Smrg 315814330f12Smrg# _LT_CHECK_OBJDIR 315914330f12Smrg# ---------------- 316014330f12Smrgm4_defun([_LT_CHECK_OBJDIR], 316114330f12Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 316214330f12Smrg[rm -f .libs 2>/dev/null 316314330f12Smrgmkdir .libs 2>/dev/null 316414330f12Smrgif test -d .libs; then 316514330f12Smrg lt_cv_objdir=.libs 316614330f12Smrgelse 316714330f12Smrg # MS-DOS does not allow filenames that begin with a dot. 316814330f12Smrg lt_cv_objdir=_libs 316914330f12Smrgfi 317014330f12Smrgrmdir .libs 2>/dev/null]) 317114330f12Smrgobjdir=$lt_cv_objdir 317214330f12Smrg_LT_DECL([], [objdir], [0], 317314330f12Smrg [The name of the directory that contains temporary libtool files])dnl 317414330f12Smrgm4_pattern_allow([LT_OBJDIR])dnl 317514330f12SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 317614330f12Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 317714330f12Smrg])# _LT_CHECK_OBJDIR 317814330f12Smrg 317914330f12Smrg 318014330f12Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 318114330f12Smrg# -------------------------------------- 318214330f12Smrg# Check hardcoding attributes. 318314330f12Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 318414330f12Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 318514330f12Smrg_LT_TAGVAR(hardcode_action, $1)= 318614330f12Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 318714330f12Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 318814330f12Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 318914330f12Smrg 319014330f12Smrg # We can hardcode non-existent directories. 319114330f12Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 319214330f12Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 319314330f12Smrg # have to relink, otherwise we might link with an installed library 319414330f12Smrg # when we should be linking with a yet-to-be-installed one 319514330f12Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 319614330f12Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 319714330f12Smrg # Linking always hardcodes the temporary library directory. 319814330f12Smrg _LT_TAGVAR(hardcode_action, $1)=relink 319914330f12Smrg else 320014330f12Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 320114330f12Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 320214330f12Smrg fi 320314330f12Smrgelse 320414330f12Smrg # We cannot hardcode anything, or else we can only hardcode existing 320514330f12Smrg # directories. 320614330f12Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 320714330f12Smrgfi 320814330f12SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 320914330f12Smrg 321014330f12Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 321114330f12Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 321214330f12Smrg # Fast installation is not supported 321314330f12Smrg enable_fast_install=no 321414330f12Smrgelif test "$shlibpath_overrides_runpath" = yes || 321514330f12Smrg test "$enable_shared" = no; then 321614330f12Smrg # Fast installation is not necessary 321714330f12Smrg enable_fast_install=needless 321814330f12Smrgfi 321914330f12Smrg_LT_TAGDECL([], [hardcode_action], [0], 322014330f12Smrg [How to hardcode a shared library path into an executable]) 322114330f12Smrg])# _LT_LINKER_HARDCODE_LIBPATH 322214330f12Smrg 322314330f12Smrg 322414330f12Smrg# _LT_CMD_STRIPLIB 322514330f12Smrg# ---------------- 322614330f12Smrgm4_defun([_LT_CMD_STRIPLIB], 322714330f12Smrg[m4_require([_LT_DECL_EGREP]) 322814330f12Smrgstriplib= 322914330f12Smrgold_striplib= 323014330f12SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 323114330f12Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 323214330f12Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 323314330f12Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 323414330f12Smrg AC_MSG_RESULT([yes]) 323514330f12Smrgelse 323614330f12Smrg# FIXME - insert some real tests, host_os isn't really good enough 323714330f12Smrg case $host_os in 323814330f12Smrg darwin*) 323914330f12Smrg if test -n "$STRIP" ; then 324014330f12Smrg striplib="$STRIP -x" 324114330f12Smrg old_striplib="$STRIP -S" 324214330f12Smrg AC_MSG_RESULT([yes]) 324314330f12Smrg else 324414330f12Smrg AC_MSG_RESULT([no]) 324514330f12Smrg fi 324614330f12Smrg ;; 324714330f12Smrg *) 324814330f12Smrg AC_MSG_RESULT([no]) 324914330f12Smrg ;; 325014330f12Smrg esac 325114330f12Smrgfi 325214330f12Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 325314330f12Smrg_LT_DECL([], [striplib], [1]) 325414330f12Smrg])# _LT_CMD_STRIPLIB 325514330f12Smrg 325614330f12Smrg 325714330f12Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 325814330f12Smrg# ----------------------------- 325914330f12Smrg# PORTME Fill in your ld.so characteristics 326014330f12Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 326114330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 326214330f12Smrgm4_require([_LT_DECL_EGREP])dnl 326314330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 326414330f12Smrgm4_require([_LT_DECL_OBJDUMP])dnl 326514330f12Smrgm4_require([_LT_DECL_SED])dnl 326614330f12Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 326714330f12SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 326814330f12Smrgm4_if([$1], 326914330f12Smrg [], [ 327014330f12Smrgif test "$GCC" = yes; then 327114330f12Smrg case $host_os in 327214330f12Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 327314330f12Smrg *) lt_awk_arg="/^libraries:/" ;; 327414330f12Smrg esac 327514330f12Smrg case $host_os in 327614330f12Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 327714330f12Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 327814330f12Smrg esac 327914330f12Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 328014330f12Smrg case $lt_search_path_spec in 328114330f12Smrg *\;*) 328214330f12Smrg # if the path contains ";" then we assume it to be the separator 328314330f12Smrg # otherwise default to the standard path separator (i.e. ":") - it is 328414330f12Smrg # assumed that no part of a normal pathname contains ";" but that should 328514330f12Smrg # okay in the real world where ";" in dirpaths is itself problematic. 328614330f12Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 328714330f12Smrg ;; 328814330f12Smrg *) 328914330f12Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 329014330f12Smrg ;; 329114330f12Smrg esac 329214330f12Smrg # Ok, now we have the path, separated by spaces, we can step through it 329314330f12Smrg # and add multilib dir if necessary. 329414330f12Smrg lt_tmp_lt_search_path_spec= 329514330f12Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 329614330f12Smrg for lt_sys_path in $lt_search_path_spec; do 329714330f12Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 329814330f12Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 329914330f12Smrg else 330014330f12Smrg test -d "$lt_sys_path" && \ 330114330f12Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 330214330f12Smrg fi 330314330f12Smrg done 330414330f12Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 330514330f12SmrgBEGIN {RS=" "; FS="/|\n";} { 330614330f12Smrg lt_foo=""; 330714330f12Smrg lt_count=0; 330814330f12Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 330914330f12Smrg if ($lt_i != "" && $lt_i != ".") { 331014330f12Smrg if ($lt_i == "..") { 331114330f12Smrg lt_count++; 331214330f12Smrg } else { 331314330f12Smrg if (lt_count == 0) { 331414330f12Smrg lt_foo="/" $lt_i lt_foo; 331514330f12Smrg } else { 331614330f12Smrg lt_count--; 331714330f12Smrg } 331814330f12Smrg } 331914330f12Smrg } 332014330f12Smrg } 332114330f12Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 332214330f12Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 332314330f12Smrg}'` 332414330f12Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 332514330f12Smrg # for these hosts. 332614330f12Smrg case $host_os in 332714330f12Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 332814330f12Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 332914330f12Smrg esac 333014330f12Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 333114330f12Smrgelse 333214330f12Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 333314330f12Smrgfi]) 333414330f12Smrglibrary_names_spec= 333514330f12Smrglibname_spec='lib$name' 333614330f12Smrgsoname_spec= 333714330f12Smrgshrext_cmds=".so" 333814330f12Smrgpostinstall_cmds= 333914330f12Smrgpostuninstall_cmds= 334014330f12Smrgfinish_cmds= 334114330f12Smrgfinish_eval= 334214330f12Smrgshlibpath_var= 334314330f12Smrgshlibpath_overrides_runpath=unknown 334414330f12Smrgversion_type=none 334514330f12Smrgdynamic_linker="$host_os ld.so" 334614330f12Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 334714330f12Smrgneed_lib_prefix=unknown 334814330f12Smrghardcode_into_libs=no 334914330f12Smrg 335014330f12Smrg# when you set need_version to no, make sure it does not cause -set_version 335114330f12Smrg# flags to be left without arguments 335214330f12Smrgneed_version=unknown 335314330f12Smrg 335414330f12Smrgcase $host_os in 335514330f12Smrgaix3*) 335614330f12Smrg version_type=linux 335714330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 335814330f12Smrg shlibpath_var=LIBPATH 335914330f12Smrg 336014330f12Smrg # AIX 3 has no versioning support, so we append a major version to the name. 336114330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 336214330f12Smrg ;; 336314330f12Smrg 336414330f12Smrgaix[[4-9]]*) 336514330f12Smrg version_type=linux 336614330f12Smrg need_lib_prefix=no 336714330f12Smrg need_version=no 336814330f12Smrg hardcode_into_libs=yes 336914330f12Smrg if test "$host_cpu" = ia64; then 337014330f12Smrg # AIX 5 supports IA64 337114330f12Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 337214330f12Smrg shlibpath_var=LD_LIBRARY_PATH 337314330f12Smrg else 337414330f12Smrg # With GCC up to 2.95.x, collect2 would create an import file 337514330f12Smrg # for dependence libraries. The import file would start with 337614330f12Smrg # the line `#! .'. This would cause the generated library to 337714330f12Smrg # depend on `.', always an invalid library. This was fixed in 337814330f12Smrg # development snapshots of GCC prior to 3.0. 337914330f12Smrg case $host_os in 338014330f12Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 338114330f12Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 338214330f12Smrg echo ' yes ' 338314330f12Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 338414330f12Smrg : 338514330f12Smrg else 338614330f12Smrg can_build_shared=no 338714330f12Smrg fi 33882378475aSmrg ;; 338914330f12Smrg esac 339014330f12Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 339114330f12Smrg # soname into executable. Probably we can add versioning support to 339214330f12Smrg # collect2, so additional links can be useful in future. 339314330f12Smrg if test "$aix_use_runtimelinking" = yes; then 339414330f12Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 339514330f12Smrg # instead of lib<name>.a to let people know that these are not 339614330f12Smrg # typical AIX shared libraries. 339714330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 339814330f12Smrg else 339914330f12Smrg # We preserve .a as extension for shared libraries through AIX4.2 340014330f12Smrg # and later when we are not doing run time linking. 340114330f12Smrg library_names_spec='${libname}${release}.a $libname.a' 340214330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 340314330f12Smrg fi 340414330f12Smrg shlibpath_var=LIBPATH 340514330f12Smrg fi 340614330f12Smrg ;; 340714330f12Smrg 340814330f12Smrgamigaos*) 340914330f12Smrg case $host_cpu in 341014330f12Smrg powerpc) 341114330f12Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 341214330f12Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 341314330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 341414330f12Smrg ;; 341514330f12Smrg m68k) 341614330f12Smrg library_names_spec='$libname.ixlibrary $libname.a' 341714330f12Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 341814330f12Smrg 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' 341914330f12Smrg ;; 342014330f12Smrg esac 342114330f12Smrg ;; 342214330f12Smrg 342314330f12Smrgbeos*) 342414330f12Smrg library_names_spec='${libname}${shared_ext}' 342514330f12Smrg dynamic_linker="$host_os ld.so" 342614330f12Smrg shlibpath_var=LIBRARY_PATH 342714330f12Smrg ;; 342814330f12Smrg 342914330f12Smrgbsdi[[45]]*) 343014330f12Smrg version_type=linux 343114330f12Smrg need_version=no 343214330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 343314330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 343414330f12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 343514330f12Smrg shlibpath_var=LD_LIBRARY_PATH 343614330f12Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 343714330f12Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 343814330f12Smrg # the default ld.so.conf also contains /usr/contrib/lib and 343914330f12Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 344014330f12Smrg # libtool to hard-code these into programs 344114330f12Smrg ;; 344214330f12Smrg 344314330f12Smrgcygwin* | mingw* | pw32* | cegcc*) 344414330f12Smrg version_type=windows 344514330f12Smrg shrext_cmds=".dll" 344614330f12Smrg need_version=no 344714330f12Smrg need_lib_prefix=no 344814330f12Smrg 344914330f12Smrg case $GCC,$cc_basename in 345014330f12Smrg yes,*) 345114330f12Smrg # gcc 345214330f12Smrg library_names_spec='$libname.dll.a' 345314330f12Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345414330f12Smrg postinstall_cmds='base_file=`basename \${file}`~ 345514330f12Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345614330f12Smrg dldir=$destdir/`dirname \$dlpath`~ 345714330f12Smrg test -d \$dldir || mkdir -p \$dldir~ 345814330f12Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 345914330f12Smrg chmod a+x \$dldir/$dlname~ 346014330f12Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 346114330f12Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 346214330f12Smrg fi' 346314330f12Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346414330f12Smrg dlpath=$dir/\$dldll~ 346514330f12Smrg $RM \$dlpath' 346614330f12Smrg shlibpath_overrides_runpath=yes 346714330f12Smrg 346814330f12Smrg case $host_os in 346914330f12Smrg cygwin*) 347014330f12Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 347114330f12Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347214330f12Smrgm4_if([$1], [],[ 347314330f12Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 347414330f12Smrg ;; 347514330f12Smrg mingw* | cegcc*) 347614330f12Smrg # MinGW DLLs use traditional 'lib' prefix 347714330f12Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347814330f12Smrg ;; 347914330f12Smrg pw32*) 348014330f12Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 348114330f12Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 348214330f12Smrg ;; 348314330f12Smrg esac 348414330f12Smrg dynamic_linker='Win32 ld.exe' 348514330f12Smrg ;; 348614330f12Smrg 348714330f12Smrg *,cl*) 348814330f12Smrg # Native MSVC 348914330f12Smrg libname_spec='$name' 349014330f12Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 349114330f12Smrg library_names_spec='${libname}.dll.lib' 349214330f12Smrg 349314330f12Smrg case $build_os in 349414330f12Smrg mingw*) 349514330f12Smrg sys_lib_search_path_spec= 349614330f12Smrg lt_save_ifs=$IFS 349714330f12Smrg IFS=';' 349814330f12Smrg for lt_path in $LIB 349914330f12Smrg do 350014330f12Smrg IFS=$lt_save_ifs 350114330f12Smrg # Let DOS variable expansion print the short 8.3 style file name. 350214330f12Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 350314330f12Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 350414330f12Smrg done 350514330f12Smrg IFS=$lt_save_ifs 350614330f12Smrg # Convert to MSYS style. 350714330f12Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 350814330f12Smrg ;; 350914330f12Smrg cygwin*) 351014330f12Smrg # Convert to unix form, then to dos form, then back to unix form 351114330f12Smrg # but this time dos style (no spaces!) so that the unix form looks 351214330f12Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 351314330f12Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 351414330f12Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 351514330f12Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 351614330f12Smrg ;; 351714330f12Smrg *) 351814330f12Smrg sys_lib_search_path_spec="$LIB" 351914330f12Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 352014330f12Smrg # It is most probably a Windows format PATH. 352114330f12Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 352214330f12Smrg else 352314330f12Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 352414330f12Smrg fi 352514330f12Smrg # FIXME: find the short name or the path components, as spaces are 352614330f12Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 352714330f12Smrg ;; 352814330f12Smrg esac 352914330f12Smrg 353014330f12Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 353114330f12Smrg postinstall_cmds='base_file=`basename \${file}`~ 353214330f12Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 353314330f12Smrg dldir=$destdir/`dirname \$dlpath`~ 353414330f12Smrg test -d \$dldir || mkdir -p \$dldir~ 353514330f12Smrg $install_prog $dir/$dlname \$dldir/$dlname' 353614330f12Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 353714330f12Smrg dlpath=$dir/\$dldll~ 353814330f12Smrg $RM \$dlpath' 353914330f12Smrg shlibpath_overrides_runpath=yes 354014330f12Smrg dynamic_linker='Win32 link.exe' 354114330f12Smrg ;; 354214330f12Smrg 354314330f12Smrg *) 354414330f12Smrg # Assume MSVC wrapper 354514330f12Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 354614330f12Smrg dynamic_linker='Win32 ld.exe' 354714330f12Smrg ;; 354814330f12Smrg esac 354914330f12Smrg # FIXME: first we should search . and the directory the executable is in 355014330f12Smrg shlibpath_var=PATH 355114330f12Smrg ;; 355214330f12Smrg 355314330f12Smrgdarwin* | rhapsody*) 355414330f12Smrg dynamic_linker="$host_os dyld" 355514330f12Smrg version_type=darwin 355614330f12Smrg need_lib_prefix=no 355714330f12Smrg need_version=no 355814330f12Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 355914330f12Smrg soname_spec='${libname}${release}${major}$shared_ext' 356014330f12Smrg shlibpath_overrides_runpath=yes 356114330f12Smrg shlibpath_var=DYLD_LIBRARY_PATH 356214330f12Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 356314330f12Smrgm4_if([$1], [],[ 356414330f12Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 356514330f12Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 356614330f12Smrg ;; 356714330f12Smrg 356814330f12Smrgdgux*) 356914330f12Smrg version_type=linux 357014330f12Smrg need_lib_prefix=no 357114330f12Smrg need_version=no 357214330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 357314330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 357414330f12Smrg shlibpath_var=LD_LIBRARY_PATH 357514330f12Smrg ;; 357614330f12Smrg 357714330f12Smrgfreebsd1*) 357814330f12Smrg dynamic_linker=no 357914330f12Smrg ;; 358014330f12Smrg 358114330f12Smrgfreebsd* | dragonfly*) 358214330f12Smrg # DragonFly does not have aout. When/if they implement a new 358314330f12Smrg # versioning mechanism, adjust this. 358414330f12Smrg if test -x /usr/bin/objformat; then 358514330f12Smrg objformat=`/usr/bin/objformat` 358614330f12Smrg else 358714330f12Smrg case $host_os in 358814330f12Smrg freebsd[[123]]*) objformat=aout ;; 358914330f12Smrg *) objformat=elf ;; 359014330f12Smrg esac 359114330f12Smrg fi 359214330f12Smrg version_type=freebsd-$objformat 359314330f12Smrg case $version_type in 359414330f12Smrg freebsd-elf*) 359514330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 359614330f12Smrg need_version=no 359714330f12Smrg need_lib_prefix=no 359814330f12Smrg ;; 359914330f12Smrg freebsd-*) 360014330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 360114330f12Smrg need_version=yes 36022378475aSmrg ;; 360314330f12Smrg esac 360414330f12Smrg shlibpath_var=LD_LIBRARY_PATH 360514330f12Smrg case $host_os in 360614330f12Smrg freebsd2*) 360714330f12Smrg shlibpath_overrides_runpath=yes 360814330f12Smrg ;; 360914330f12Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 361014330f12Smrg shlibpath_overrides_runpath=yes 361114330f12Smrg hardcode_into_libs=yes 361214330f12Smrg ;; 361314330f12Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 361414330f12Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 361514330f12Smrg shlibpath_overrides_runpath=no 361614330f12Smrg hardcode_into_libs=yes 361714330f12Smrg ;; 361814330f12Smrg *) # from 4.6 on, and DragonFly 361914330f12Smrg shlibpath_overrides_runpath=yes 362014330f12Smrg hardcode_into_libs=yes 362114330f12Smrg ;; 362214330f12Smrg esac 362314330f12Smrg ;; 362414330f12Smrg 362514330f12Smrggnu*) 362614330f12Smrg version_type=linux 362714330f12Smrg need_lib_prefix=no 362814330f12Smrg need_version=no 362914330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 363014330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 363114330f12Smrg shlibpath_var=LD_LIBRARY_PATH 363214330f12Smrg hardcode_into_libs=yes 363314330f12Smrg ;; 363414330f12Smrg 363514330f12Smrghaiku*) 363614330f12Smrg version_type=linux 363714330f12Smrg need_lib_prefix=no 363814330f12Smrg need_version=no 363914330f12Smrg dynamic_linker="$host_os runtime_loader" 364014330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 364114330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 364214330f12Smrg shlibpath_var=LIBRARY_PATH 364314330f12Smrg shlibpath_overrides_runpath=yes 364414330f12Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 364514330f12Smrg hardcode_into_libs=yes 364614330f12Smrg ;; 364714330f12Smrg 364814330f12Smrghpux9* | hpux10* | hpux11*) 364914330f12Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 365014330f12Smrg # link against other versions. 365114330f12Smrg version_type=sunos 365214330f12Smrg need_lib_prefix=no 365314330f12Smrg need_version=no 365414330f12Smrg case $host_cpu in 365514330f12Smrg ia64*) 365614330f12Smrg shrext_cmds='.so' 365714330f12Smrg hardcode_into_libs=yes 365814330f12Smrg dynamic_linker="$host_os dld.so" 365914330f12Smrg shlibpath_var=LD_LIBRARY_PATH 366014330f12Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 366114330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 366214330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 366314330f12Smrg if test "X$HPUX_IA64_MODE" = X32; then 366414330f12Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 366514330f12Smrg else 366614330f12Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 366714330f12Smrg fi 366814330f12Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 366914330f12Smrg ;; 367014330f12Smrg hppa*64*) 367114330f12Smrg shrext_cmds='.sl' 367214330f12Smrg hardcode_into_libs=yes 367314330f12Smrg dynamic_linker="$host_os dld.sl" 367414330f12Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 367514330f12Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 367614330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367714330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 367814330f12Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 367914330f12Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 368014330f12Smrg ;; 368114330f12Smrg *) 368214330f12Smrg shrext_cmds='.sl' 368314330f12Smrg dynamic_linker="$host_os dld.sl" 368414330f12Smrg shlibpath_var=SHLIB_PATH 368514330f12Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 368614330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 368714330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 368814330f12Smrg ;; 368914330f12Smrg esac 369014330f12Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 369114330f12Smrg postinstall_cmds='chmod 555 $lib' 369214330f12Smrg # or fails outright, so override atomically: 369314330f12Smrg install_override_mode=555 369414330f12Smrg ;; 369514330f12Smrg 369614330f12Smrginterix[[3-9]]*) 369714330f12Smrg version_type=linux 369814330f12Smrg need_lib_prefix=no 369914330f12Smrg need_version=no 370014330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 370114330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 370214330f12Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 370314330f12Smrg shlibpath_var=LD_LIBRARY_PATH 370414330f12Smrg shlibpath_overrides_runpath=no 370514330f12Smrg hardcode_into_libs=yes 370614330f12Smrg ;; 370714330f12Smrg 370814330f12Smrgirix5* | irix6* | nonstopux*) 370914330f12Smrg case $host_os in 371014330f12Smrg nonstopux*) version_type=nonstopux ;; 37112378475aSmrg *) 371214330f12Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 371314330f12Smrg version_type=linux 371414330f12Smrg else 371514330f12Smrg version_type=irix 371614330f12Smrg fi ;; 371714330f12Smrg esac 371814330f12Smrg need_lib_prefix=no 371914330f12Smrg need_version=no 372014330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 372114330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 372214330f12Smrg case $host_os in 372314330f12Smrg irix5* | nonstopux*) 372414330f12Smrg libsuff= shlibsuff= 372514330f12Smrg ;; 372614330f12Smrg *) 372714330f12Smrg case $LD in # libtool.m4 will add one of these switches to LD 372814330f12Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 372914330f12Smrg libsuff= shlibsuff= libmagic=32-bit;; 373014330f12Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 373114330f12Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 373214330f12Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 373314330f12Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 373414330f12Smrg *) libsuff= shlibsuff= libmagic=never-match;; 373514330f12Smrg esac 373614330f12Smrg ;; 373714330f12Smrg esac 373814330f12Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 373914330f12Smrg shlibpath_overrides_runpath=no 374014330f12Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 374114330f12Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 374214330f12Smrg hardcode_into_libs=yes 374314330f12Smrg ;; 374414330f12Smrg 374514330f12Smrg# No shared lib support for Linux oldld, aout, or coff. 374614330f12Smrglinux*oldld* | linux*aout* | linux*coff*) 374714330f12Smrg dynamic_linker=no 374814330f12Smrg ;; 374914330f12Smrg 375014330f12Smrg# This must be Linux ELF. 375114330f12Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 375214330f12Smrg version_type=linux 375314330f12Smrg need_lib_prefix=no 375414330f12Smrg need_version=no 375514330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 375614330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 375714330f12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 375814330f12Smrg shlibpath_var=LD_LIBRARY_PATH 375914330f12Smrg shlibpath_overrides_runpath=no 376014330f12Smrg 376114330f12Smrg # Some binutils ld are patched to set DT_RUNPATH 376214330f12Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 376314330f12Smrg [lt_cv_shlibpath_overrides_runpath=no 376414330f12Smrg save_LDFLAGS=$LDFLAGS 376514330f12Smrg save_libdir=$libdir 376614330f12Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 376714330f12Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 376814330f12Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 376914330f12Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 377014330f12Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 377114330f12Smrg LDFLAGS=$save_LDFLAGS 377214330f12Smrg libdir=$save_libdir 377314330f12Smrg ]) 377414330f12Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 377514330f12Smrg 377614330f12Smrg # This implies no fast_install, which is unacceptable. 377714330f12Smrg # Some rework will be needed to allow for fast_install 377814330f12Smrg # before this can be enabled. 377914330f12Smrg hardcode_into_libs=yes 378014330f12Smrg 378114330f12Smrg # Append ld.so.conf contents to the search path 378214330f12Smrg if test -f /etc/ld.so.conf; then 378314330f12Smrg 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' ' '` 378414330f12Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 378514330f12Smrg fi 378614330f12Smrg 378714330f12Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 378814330f12Smrg # powerpc, because MkLinux only supported shared libraries with the 378914330f12Smrg # GNU dynamic linker. Since this was broken with cross compilers, 379014330f12Smrg # most powerpc-linux boxes support dynamic linking these days and 379114330f12Smrg # people can always --disable-shared, the test was removed, and we 379214330f12Smrg # assume the GNU/Linux dynamic linker is in use. 379314330f12Smrg dynamic_linker='GNU/Linux ld.so' 379414330f12Smrg ;; 379514330f12Smrg 379614330f12Smrgnetbsd*) 379714330f12Smrg version_type=sunos 379814330f12Smrg need_lib_prefix=no 379914330f12Smrg need_version=no 380014330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 380114330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 380214330f12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 380314330f12Smrg dynamic_linker='NetBSD (a.out) ld.so' 380414330f12Smrg else 380514330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 380614330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 380714330f12Smrg dynamic_linker='NetBSD ld.elf_so' 380814330f12Smrg fi 380914330f12Smrg shlibpath_var=LD_LIBRARY_PATH 381014330f12Smrg shlibpath_overrides_runpath=yes 381114330f12Smrg hardcode_into_libs=yes 381214330f12Smrg ;; 381314330f12Smrg 381414330f12Smrgnewsos6) 381514330f12Smrg version_type=linux 381614330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381714330f12Smrg shlibpath_var=LD_LIBRARY_PATH 381814330f12Smrg shlibpath_overrides_runpath=yes 381914330f12Smrg ;; 382014330f12Smrg 382114330f12Smrg*nto* | *qnx*) 382214330f12Smrg version_type=qnx 382314330f12Smrg need_lib_prefix=no 382414330f12Smrg need_version=no 382514330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 382614330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 382714330f12Smrg shlibpath_var=LD_LIBRARY_PATH 382814330f12Smrg shlibpath_overrides_runpath=no 382914330f12Smrg hardcode_into_libs=yes 383014330f12Smrg dynamic_linker='ldqnx.so' 383114330f12Smrg ;; 383214330f12Smrg 383314330f12Smrgopenbsd*) 383414330f12Smrg version_type=sunos 383514330f12Smrg sys_lib_dlsearch_path_spec="/usr/lib" 383614330f12Smrg need_lib_prefix=no 383714330f12Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 383814330f12Smrg case $host_os in 383914330f12Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 384014330f12Smrg *) need_version=no ;; 384114330f12Smrg esac 384214330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 384314330f12Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 384414330f12Smrg shlibpath_var=LD_LIBRARY_PATH 384514330f12Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 384614330f12Smrg case $host_os in 384714330f12Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 384814330f12Smrg shlibpath_overrides_runpath=no 384939713583Smrg ;; 385039713583Smrg *) 385114330f12Smrg shlibpath_overrides_runpath=yes 385239713583Smrg ;; 385314330f12Smrg esac 385414330f12Smrg else 385514330f12Smrg shlibpath_overrides_runpath=yes 38562378475aSmrg fi 385714330f12Smrg ;; 38582378475aSmrg 385914330f12Smrgos2*) 386014330f12Smrg libname_spec='$name' 386114330f12Smrg shrext_cmds=".dll" 386214330f12Smrg need_lib_prefix=no 386314330f12Smrg library_names_spec='$libname${shared_ext} $libname.a' 386414330f12Smrg dynamic_linker='OS/2 ld.exe' 386514330f12Smrg shlibpath_var=LIBPATH 386614330f12Smrg ;; 38672378475aSmrg 386814330f12Smrgosf3* | osf4* | osf5*) 386914330f12Smrg version_type=osf 387014330f12Smrg need_lib_prefix=no 387114330f12Smrg need_version=no 387214330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 387314330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 387414330f12Smrg shlibpath_var=LD_LIBRARY_PATH 387514330f12Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 387614330f12Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 387714330f12Smrg ;; 387814330f12Smrg 387914330f12Smrgrdos*) 388014330f12Smrg dynamic_linker=no 388114330f12Smrg ;; 388214330f12Smrg 388314330f12Smrgsolaris*) 388414330f12Smrg version_type=linux 388514330f12Smrg need_lib_prefix=no 388614330f12Smrg need_version=no 388714330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 388814330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 388914330f12Smrg shlibpath_var=LD_LIBRARY_PATH 389014330f12Smrg shlibpath_overrides_runpath=yes 389114330f12Smrg hardcode_into_libs=yes 389214330f12Smrg # ldd complains unless libraries are executable 389314330f12Smrg postinstall_cmds='chmod +x $lib' 389414330f12Smrg ;; 389514330f12Smrg 389614330f12Smrgsunos4*) 389714330f12Smrg version_type=sunos 389814330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 389914330f12Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 390014330f12Smrg shlibpath_var=LD_LIBRARY_PATH 390114330f12Smrg shlibpath_overrides_runpath=yes 390214330f12Smrg if test "$with_gnu_ld" = yes; then 390314330f12Smrg need_lib_prefix=no 390414330f12Smrg fi 390514330f12Smrg need_version=yes 390614330f12Smrg ;; 390714330f12Smrg 390814330f12Smrgsysv4 | sysv4.3*) 390914330f12Smrg version_type=linux 391014330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 391114330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 391214330f12Smrg shlibpath_var=LD_LIBRARY_PATH 391314330f12Smrg case $host_vendor in 391414330f12Smrg sni) 391514330f12Smrg shlibpath_overrides_runpath=no 391614330f12Smrg need_lib_prefix=no 391714330f12Smrg runpath_var=LD_RUN_PATH 391814330f12Smrg ;; 391914330f12Smrg siemens) 392014330f12Smrg need_lib_prefix=no 392114330f12Smrg ;; 392214330f12Smrg motorola) 392314330f12Smrg need_lib_prefix=no 392414330f12Smrg need_version=no 392514330f12Smrg shlibpath_overrides_runpath=no 392614330f12Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 39272378475aSmrg ;; 392814330f12Smrg esac 392914330f12Smrg ;; 393014330f12Smrg 393114330f12Smrgsysv4*MP*) 393214330f12Smrg if test -d /usr/nec ;then 393314330f12Smrg version_type=linux 393414330f12Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 393514330f12Smrg soname_spec='$libname${shared_ext}.$major' 393614330f12Smrg shlibpath_var=LD_LIBRARY_PATH 393714330f12Smrg fi 393814330f12Smrg ;; 393914330f12Smrg 394014330f12Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 394114330f12Smrg version_type=freebsd-elf 394214330f12Smrg need_lib_prefix=no 394314330f12Smrg need_version=no 394414330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 394514330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 394614330f12Smrg shlibpath_var=LD_LIBRARY_PATH 394714330f12Smrg shlibpath_overrides_runpath=yes 394814330f12Smrg hardcode_into_libs=yes 394914330f12Smrg if test "$with_gnu_ld" = yes; then 395014330f12Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 395114330f12Smrg else 395214330f12Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 395314330f12Smrg case $host_os in 395414330f12Smrg sco3.2v5*) 395514330f12Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 395614330f12Smrg ;; 395714330f12Smrg esac 395814330f12Smrg fi 395914330f12Smrg sys_lib_dlsearch_path_spec='/usr/lib' 396014330f12Smrg ;; 396114330f12Smrg 396214330f12Smrgtpf*) 396314330f12Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 396414330f12Smrg version_type=linux 396514330f12Smrg need_lib_prefix=no 396614330f12Smrg need_version=no 396714330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 396814330f12Smrg shlibpath_var=LD_LIBRARY_PATH 396914330f12Smrg shlibpath_overrides_runpath=no 397014330f12Smrg hardcode_into_libs=yes 397114330f12Smrg ;; 39722378475aSmrg 397314330f12Smrguts4*) 397414330f12Smrg version_type=linux 397514330f12Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 397614330f12Smrg soname_spec='${libname}${release}${shared_ext}$major' 397714330f12Smrg shlibpath_var=LD_LIBRARY_PATH 397814330f12Smrg ;; 39792378475aSmrg 398014330f12Smrg*) 398114330f12Smrg dynamic_linker=no 398214330f12Smrg ;; 398314330f12Smrgesac 398414330f12SmrgAC_MSG_RESULT([$dynamic_linker]) 398514330f12Smrgtest "$dynamic_linker" = no && can_build_shared=no 39862378475aSmrg 398714330f12Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 398814330f12Smrgif test "$GCC" = yes; then 398914330f12Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 399014330f12Smrgfi 39912378475aSmrg 399214330f12Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 399314330f12Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 399414330f12Smrgfi 399514330f12Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 399614330f12Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 399714330f12Smrgfi 39982378475aSmrg 399914330f12Smrg_LT_DECL([], [variables_saved_for_relink], [1], 400014330f12Smrg [Variables whose values should be saved in libtool wrapper scripts and 400114330f12Smrg restored at link time]) 400214330f12Smrg_LT_DECL([], [need_lib_prefix], [0], 400314330f12Smrg [Do we need the "lib" prefix for modules?]) 400414330f12Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 400514330f12Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 400614330f12Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 400714330f12Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 400814330f12Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 400914330f12Smrg [Is shlibpath searched before the hard-coded library search path?]) 401014330f12Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 401114330f12Smrg_LT_DECL([], [library_names_spec], [1], 401214330f12Smrg [[List of archive names. First name is the real one, the rest are links. 401314330f12Smrg The last name is the one that the linker finds with -lNAME]]) 401414330f12Smrg_LT_DECL([], [soname_spec], [1], 401514330f12Smrg [[The coded name of the library, if different from the real name]]) 401614330f12Smrg_LT_DECL([], [install_override_mode], [1], 401714330f12Smrg [Permission mode override for installation of shared libraries]) 401814330f12Smrg_LT_DECL([], [postinstall_cmds], [2], 401914330f12Smrg [Command to use after installation of a shared archive]) 402014330f12Smrg_LT_DECL([], [postuninstall_cmds], [2], 402114330f12Smrg [Command to use after uninstallation of a shared archive]) 402214330f12Smrg_LT_DECL([], [finish_cmds], [2], 402314330f12Smrg [Commands used to finish a libtool library installation in a directory]) 402414330f12Smrg_LT_DECL([], [finish_eval], [1], 402514330f12Smrg [[As "finish_cmds", except a single script fragment to be evaled but 402614330f12Smrg not shown]]) 402714330f12Smrg_LT_DECL([], [hardcode_into_libs], [0], 402814330f12Smrg [Whether we should hardcode library paths into libraries]) 402914330f12Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 403014330f12Smrg [Compile-time system search path for libraries]) 403114330f12Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 403214330f12Smrg [Run-time system search path for libraries]) 403314330f12Smrg])# _LT_SYS_DYNAMIC_LINKER 40342378475aSmrg 40352378475aSmrg 403614330f12Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 403714330f12Smrg# -------------------------- 403814330f12Smrg# find a file program which can recognize shared library 403914330f12SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 404014330f12Smrg[m4_require([_LT_DECL_EGREP])dnl 404114330f12SmrgAC_MSG_CHECKING([for $1]) 404214330f12SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 404314330f12Smrg[case $MAGIC_CMD in 404414330f12Smrg[[\\/*] | ?:[\\/]*]) 404514330f12Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 404614330f12Smrg ;; 404714330f12Smrg*) 404814330f12Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 404914330f12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 405014330f12Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 405114330f12Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 405214330f12Smrgdnl not every word. This closes a longstanding sh security hole. 405314330f12Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 405414330f12Smrg for ac_dir in $ac_dummy; do 405514330f12Smrg IFS="$lt_save_ifs" 405614330f12Smrg test -z "$ac_dir" && ac_dir=. 405714330f12Smrg if test -f $ac_dir/$1; then 405814330f12Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 405914330f12Smrg if test -n "$file_magic_test_file"; then 406014330f12Smrg case $deplibs_check_method in 406114330f12Smrg "file_magic "*) 406214330f12Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 406314330f12Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 406414330f12Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 406514330f12Smrg $EGREP "$file_magic_regex" > /dev/null; then 406614330f12Smrg : 406714330f12Smrg else 406814330f12Smrg cat <<_LT_EOF 1>&2 40692378475aSmrg 407014330f12Smrg*** Warning: the command libtool uses to detect shared libraries, 407114330f12Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 407214330f12Smrg*** The result is that libtool may fail to recognize shared libraries 407314330f12Smrg*** as such. This will affect the creation of libtool libraries that 407414330f12Smrg*** depend on shared libraries, but programs linked with such libtool 407514330f12Smrg*** libraries will work regardless of this problem. Nevertheless, you 407614330f12Smrg*** may want to report the problem to your system manager and/or to 407714330f12Smrg*** bug-libtool@gnu.org 407814330f12Smrg 407914330f12Smrg_LT_EOF 408014330f12Smrg fi ;; 408114330f12Smrg esac 40822378475aSmrg fi 408314330f12Smrg break 408414330f12Smrg fi 408514330f12Smrg done 408614330f12Smrg IFS="$lt_save_ifs" 408714330f12Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 408814330f12Smrg ;; 408914330f12Smrgesac]) 409014330f12SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 409114330f12Smrgif test -n "$MAGIC_CMD"; then 409214330f12Smrg AC_MSG_RESULT($MAGIC_CMD) 409314330f12Smrgelse 409414330f12Smrg AC_MSG_RESULT(no) 409514330f12Smrgfi 409614330f12Smrg_LT_DECL([], [MAGIC_CMD], [0], 409714330f12Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 409814330f12Smrg])# _LT_PATH_TOOL_PREFIX 40992378475aSmrg 410014330f12Smrg# Old name: 410114330f12SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 410214330f12Smrgdnl aclocal-1.4 backwards compatibility: 410314330f12Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 410414330f12Smrg 410514330f12Smrg 410614330f12Smrg# _LT_PATH_MAGIC 410714330f12Smrg# -------------- 410814330f12Smrg# find a file program which can recognize a shared library 410914330f12Smrgm4_defun([_LT_PATH_MAGIC], 411014330f12Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 411114330f12Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 411214330f12Smrg if test -n "$ac_tool_prefix"; then 411314330f12Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 41142378475aSmrg else 411514330f12Smrg MAGIC_CMD=: 411614330f12Smrg fi 411714330f12Smrgfi 411814330f12Smrg])# _LT_PATH_MAGIC 41192378475aSmrg 41202378475aSmrg 412114330f12Smrg# LT_PATH_LD 412214330f12Smrg# ---------- 412314330f12Smrg# find the pathname to the GNU or non-GNU linker 412414330f12SmrgAC_DEFUN([LT_PATH_LD], 412514330f12Smrg[AC_REQUIRE([AC_PROG_CC])dnl 412614330f12SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 412714330f12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 412814330f12Smrgm4_require([_LT_DECL_SED])dnl 412914330f12Smrgm4_require([_LT_DECL_EGREP])dnl 413014330f12Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 413114330f12Smrg 413214330f12SmrgAC_ARG_WITH([gnu-ld], 413314330f12Smrg [AS_HELP_STRING([--with-gnu-ld], 413414330f12Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 413514330f12Smrg [test "$withval" = no || with_gnu_ld=yes], 413614330f12Smrg [with_gnu_ld=no])dnl 413714330f12Smrg 413814330f12Smrgac_prog=ld 413914330f12Smrgif test "$GCC" = yes; then 414014330f12Smrg # Check if gcc -print-prog-name=ld gives a path. 414114330f12Smrg AC_MSG_CHECKING([for ld used by $CC]) 414214330f12Smrg case $host in 414314330f12Smrg *-*-mingw*) 414414330f12Smrg # gcc leaves a trailing carriage return which upsets mingw 414514330f12Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 414614330f12Smrg *) 414714330f12Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 414814330f12Smrg esac 414914330f12Smrg case $ac_prog in 415014330f12Smrg # Accept absolute paths. 415114330f12Smrg [[\\/]]* | ?:[[\\/]]*) 415214330f12Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 415314330f12Smrg # Canonicalize the pathname of ld 415414330f12Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 415514330f12Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 415614330f12Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 415714330f12Smrg done 415814330f12Smrg test -z "$LD" && LD="$ac_prog" 415914330f12Smrg ;; 416014330f12Smrg "") 416114330f12Smrg # If it fails, then pretend we aren't using GCC. 416214330f12Smrg ac_prog=ld 416314330f12Smrg ;; 416414330f12Smrg *) 416514330f12Smrg # If it is relative, then search for the first ld in PATH. 416614330f12Smrg with_gnu_ld=unknown 416714330f12Smrg ;; 416814330f12Smrg esac 416914330f12Smrgelif test "$with_gnu_ld" = yes; then 417014330f12Smrg AC_MSG_CHECKING([for GNU ld]) 417114330f12Smrgelse 417214330f12Smrg AC_MSG_CHECKING([for non-GNU ld]) 417314330f12Smrgfi 417414330f12SmrgAC_CACHE_VAL(lt_cv_path_LD, 417514330f12Smrg[if test -z "$LD"; then 417614330f12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 417714330f12Smrg for ac_dir in $PATH; do 417814330f12Smrg IFS="$lt_save_ifs" 417914330f12Smrg test -z "$ac_dir" && ac_dir=. 418014330f12Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 418114330f12Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 418214330f12Smrg # Check to see if the program is GNU ld. I'd rather use --version, 418314330f12Smrg # but apparently some variants of GNU ld only accept -v. 418414330f12Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 418514330f12Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 418614330f12Smrg *GNU* | *'with BFD'*) 418714330f12Smrg test "$with_gnu_ld" != no && break 418839713583Smrg ;; 418939713583Smrg *) 419014330f12Smrg test "$with_gnu_ld" != yes && break 419139713583Smrg ;; 41922378475aSmrg esac 419314330f12Smrg fi 419414330f12Smrg done 419514330f12Smrg IFS="$lt_save_ifs" 419614330f12Smrgelse 419714330f12Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 419814330f12Smrgfi]) 419914330f12SmrgLD="$lt_cv_path_LD" 420014330f12Smrgif test -n "$LD"; then 420114330f12Smrg AC_MSG_RESULT($LD) 420214330f12Smrgelse 420314330f12Smrg AC_MSG_RESULT(no) 420414330f12Smrgfi 420514330f12Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 420614330f12Smrg_LT_PATH_LD_GNU 420714330f12SmrgAC_SUBST([LD]) 4208ff89ac2bSmrg 420914330f12Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 421014330f12Smrg])# LT_PATH_LD 4211ff89ac2bSmrg 421214330f12Smrg# Old names: 421314330f12SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 421414330f12SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 421514330f12Smrgdnl aclocal-1.4 backwards compatibility: 421614330f12Smrgdnl AC_DEFUN([AM_PROG_LD], []) 421714330f12Smrgdnl AC_DEFUN([AC_PROG_LD], []) 421895b296d0Smrg 421995b296d0Smrg 422014330f12Smrg# _LT_PATH_LD_GNU 422114330f12Smrg#- -------------- 422214330f12Smrgm4_defun([_LT_PATH_LD_GNU], 422314330f12Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 422414330f12Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 422514330f12Smrgcase `$LD -v 2>&1 </dev/null` in 422614330f12Smrg*GNU* | *'with BFD'*) 422714330f12Smrg lt_cv_prog_gnu_ld=yes 422814330f12Smrg ;; 422914330f12Smrg*) 423014330f12Smrg lt_cv_prog_gnu_ld=no 423114330f12Smrg ;; 423214330f12Smrgesac]) 423314330f12Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 423414330f12Smrg])# _LT_PATH_LD_GNU 423595b296d0Smrg 423695b296d0Smrg 423714330f12Smrg# _LT_CMD_RELOAD 423814330f12Smrg# -------------- 423914330f12Smrg# find reload flag for linker 424014330f12Smrg# -- PORTME Some linkers may need a different reload flag. 424114330f12Smrgm4_defun([_LT_CMD_RELOAD], 424214330f12Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 424314330f12Smrg lt_cv_ld_reload_flag, 424414330f12Smrg [lt_cv_ld_reload_flag='-r']) 424514330f12Smrgreload_flag=$lt_cv_ld_reload_flag 424614330f12Smrgcase $reload_flag in 424714330f12Smrg"" | " "*) ;; 424814330f12Smrg*) reload_flag=" $reload_flag" ;; 424914330f12Smrgesac 425014330f12Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 425114330f12Smrgcase $host_os in 425214330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 425314330f12Smrg if test "$GCC" != yes; then 425414330f12Smrg reload_cmds=false 425514330f12Smrg fi 425614330f12Smrg ;; 425714330f12Smrg darwin*) 425814330f12Smrg if test "$GCC" = yes; then 425914330f12Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 426014330f12Smrg else 426114330f12Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 426214330f12Smrg fi 426314330f12Smrg ;; 426414330f12Smrgesac 426514330f12Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 426614330f12Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 426714330f12Smrg])# _LT_CMD_RELOAD 426895b296d0Smrg 426995b296d0Smrg 427014330f12Smrg# _LT_CHECK_MAGIC_METHOD 427114330f12Smrg# ---------------------- 427214330f12Smrg# how to check for library dependencies 427314330f12Smrg# -- PORTME fill in with the dynamic library characteristics 427414330f12Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 427514330f12Smrg[m4_require([_LT_DECL_EGREP]) 427614330f12Smrgm4_require([_LT_DECL_OBJDUMP]) 427714330f12SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 427814330f12Smrglt_cv_deplibs_check_method, 427914330f12Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 428014330f12Smrglt_cv_file_magic_test_file= 428114330f12Smrglt_cv_deplibs_check_method='unknown' 428214330f12Smrg# Need to set the preceding variable on all platforms that support 428314330f12Smrg# interlibrary dependencies. 428414330f12Smrg# 'none' -- dependencies not supported. 428514330f12Smrg# `unknown' -- same as none, but documents that we really don't know. 428614330f12Smrg# 'pass_all' -- all dependencies passed with no checks. 428714330f12Smrg# 'test_compile' -- check by making test program. 428814330f12Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 428914330f12Smrg# which responds to the $file_magic_cmd with a given extended regex. 429014330f12Smrg# If you have `file' or equivalent on your system and you're not sure 429114330f12Smrg# whether `pass_all' will *always* work, you probably want this one. 429295b296d0Smrg 429314330f12Smrgcase $host_os in 429414330f12Smrgaix[[4-9]]*) 429514330f12Smrg lt_cv_deplibs_check_method=pass_all 429614330f12Smrg ;; 429795b296d0Smrg 429814330f12Smrgbeos*) 429914330f12Smrg lt_cv_deplibs_check_method=pass_all 430014330f12Smrg ;; 4301e6f085baSmrg 430214330f12Smrgbsdi[[45]]*) 430314330f12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 430414330f12Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 430514330f12Smrg lt_cv_file_magic_test_file=/shlib/libc.so 430614330f12Smrg ;; 430795b296d0Smrg 430814330f12Smrgcygwin*) 430914330f12Smrg # func_win32_libid is a shell function defined in ltmain.sh 431014330f12Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 431114330f12Smrg lt_cv_file_magic_cmd='func_win32_libid' 431214330f12Smrg ;; 431314330f12Smrg 431414330f12Smrgmingw* | pw32*) 431514330f12Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 431614330f12Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 431714330f12Smrg # unless we find 'file', for example because we are cross-compiling. 431814330f12Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 431914330f12Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 432014330f12Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 432114330f12Smrg lt_cv_file_magic_cmd='func_win32_libid' 432214330f12Smrg else 432314330f12Smrg # Keep this pattern in sync with the one in func_win32_libid. 432414330f12Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 432514330f12Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 432614330f12Smrg fi 432714330f12Smrg ;; 432895b296d0Smrg 432914330f12Smrgcegcc*) 433014330f12Smrg # use the weaker test based on 'objdump'. See mingw*. 433114330f12Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 433214330f12Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 433314330f12Smrg ;; 433495b296d0Smrg 433514330f12Smrgdarwin* | rhapsody*) 433614330f12Smrg lt_cv_deplibs_check_method=pass_all 433714330f12Smrg ;; 433814330f12Smrg 433914330f12Smrgfreebsd* | dragonfly*) 434014330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 434114330f12Smrg case $host_cpu in 434214330f12Smrg i*86 ) 434314330f12Smrg # Not sure whether the presence of OpenBSD here was a mistake. 434414330f12Smrg # Let's accept both of them until this is cleared up. 434514330f12Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 434614330f12Smrg lt_cv_file_magic_cmd=/usr/bin/file 434714330f12Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43482378475aSmrg ;; 43492378475aSmrg esac 435014330f12Smrg else 435114330f12Smrg lt_cv_deplibs_check_method=pass_all 43522378475aSmrg fi 435314330f12Smrg ;; 435414330f12Smrg 435514330f12Smrggnu*) 435614330f12Smrg lt_cv_deplibs_check_method=pass_all 435714330f12Smrg ;; 435814330f12Smrg 435914330f12Smrghaiku*) 436014330f12Smrg lt_cv_deplibs_check_method=pass_all 436114330f12Smrg ;; 436214330f12Smrg 436314330f12Smrghpux10.20* | hpux11*) 436414330f12Smrg lt_cv_file_magic_cmd=/usr/bin/file 436514330f12Smrg case $host_cpu in 436614330f12Smrg ia64*) 436714330f12Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 436814330f12Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 436914330f12Smrg ;; 437014330f12Smrg hppa*64*) 437114330f12Smrg [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]'] 437214330f12Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 43732378475aSmrg ;; 43742378475aSmrg *) 437514330f12Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 437614330f12Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 43772378475aSmrg ;; 437814330f12Smrg esac 437914330f12Smrg ;; 4380e6f085baSmrg 438114330f12Smrginterix[[3-9]]*) 438214330f12Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 438314330f12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 438414330f12Smrg ;; 43852378475aSmrg 438614330f12Smrgirix5* | irix6* | nonstopux*) 438714330f12Smrg case $LD in 438814330f12Smrg *-32|*"-32 ") libmagic=32-bit;; 438914330f12Smrg *-n32|*"-n32 ") libmagic=N32;; 439014330f12Smrg *-64|*"-64 ") libmagic=64-bit;; 439114330f12Smrg *) libmagic=never-match;; 439214330f12Smrg esac 439314330f12Smrg lt_cv_deplibs_check_method=pass_all 4394e6f085baSmrg ;; 439514330f12Smrg 439614330f12Smrg# This must be Linux ELF. 439714330f12Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 439814330f12Smrg lt_cv_deplibs_check_method=pass_all 43992378475aSmrg ;; 440014330f12Smrg 440114330f12Smrgnetbsd*) 440214330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 440314330f12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 440414330f12Smrg else 440514330f12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 440614330f12Smrg fi 44072378475aSmrg ;; 440895b296d0Smrg 440914330f12Smrgnewos6*) 441014330f12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 441114330f12Smrg lt_cv_file_magic_cmd=/usr/bin/file 441214330f12Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 441314330f12Smrg ;; 441495b296d0Smrg 441514330f12Smrg*nto* | *qnx*) 441614330f12Smrg lt_cv_deplibs_check_method=pass_all 441714330f12Smrg ;; 441895b296d0Smrg 441914330f12Smrgopenbsd*) 442014330f12Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 442114330f12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 442214330f12Smrg else 442314330f12Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 442414330f12Smrg fi 442514330f12Smrg ;; 442695b296d0Smrg 442714330f12Smrgosf3* | osf4* | osf5*) 442814330f12Smrg lt_cv_deplibs_check_method=pass_all 442914330f12Smrg ;; 443095b296d0Smrg 443114330f12Smrgrdos*) 443214330f12Smrg lt_cv_deplibs_check_method=pass_all 443314330f12Smrg ;; 443495b296d0Smrg 443514330f12Smrgsolaris*) 443614330f12Smrg lt_cv_deplibs_check_method=pass_all 443714330f12Smrg ;; 443895b296d0Smrg 443914330f12Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 444014330f12Smrg lt_cv_deplibs_check_method=pass_all 444114330f12Smrg ;; 444295b296d0Smrg 444314330f12Smrgsysv4 | sysv4.3*) 444414330f12Smrg case $host_vendor in 444514330f12Smrg motorola) 444614330f12Smrg 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]]' 444714330f12Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 444814330f12Smrg ;; 444914330f12Smrg ncr) 445014330f12Smrg lt_cv_deplibs_check_method=pass_all 445114330f12Smrg ;; 445214330f12Smrg sequent) 445314330f12Smrg lt_cv_file_magic_cmd='/bin/file' 445414330f12Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 445514330f12Smrg ;; 445614330f12Smrg sni) 445714330f12Smrg lt_cv_file_magic_cmd='/bin/file' 445814330f12Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 445914330f12Smrg lt_cv_file_magic_test_file=/lib/libc.so 446014330f12Smrg ;; 446114330f12Smrg siemens) 446214330f12Smrg lt_cv_deplibs_check_method=pass_all 446314330f12Smrg ;; 446414330f12Smrg pc) 446514330f12Smrg lt_cv_deplibs_check_method=pass_all 446614330f12Smrg ;; 446714330f12Smrg esac 446814330f12Smrg ;; 446995b296d0Smrg 447014330f12Smrgtpf*) 447114330f12Smrg lt_cv_deplibs_check_method=pass_all 447214330f12Smrg ;; 447314330f12Smrgesac 447414330f12Smrg]) 44752378475aSmrg 447614330f12Smrgfile_magic_glob= 447714330f12Smrgwant_nocaseglob=no 447814330f12Smrgif test "$build" = "$host"; then 447914330f12Smrg case $host_os in 448014330f12Smrg mingw* | pw32*) 448114330f12Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 448214330f12Smrg want_nocaseglob=yes 448314330f12Smrg else 448414330f12Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 448514330f12Smrg fi 448614330f12Smrg ;; 448714330f12Smrg esac 448814330f12Smrgfi 448995b296d0Smrg 449014330f12Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 449114330f12Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 449214330f12Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 449395b296d0Smrg 449414330f12Smrg_LT_DECL([], [deplibs_check_method], [1], 449514330f12Smrg [Method to check whether dependent libraries are shared objects]) 449614330f12Smrg_LT_DECL([], [file_magic_cmd], [1], 449714330f12Smrg [Command to use when deplibs_check_method = "file_magic"]) 449814330f12Smrg_LT_DECL([], [file_magic_glob], [1], 449914330f12Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 450014330f12Smrg_LT_DECL([], [want_nocaseglob], [1], 450114330f12Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 450214330f12Smrg])# _LT_CHECK_MAGIC_METHOD 450395b296d0Smrg 450495b296d0Smrg 450514330f12Smrg# LT_PATH_NM 450614330f12Smrg# ---------- 450714330f12Smrg# find the pathname to a BSD- or MS-compatible name lister 450814330f12SmrgAC_DEFUN([LT_PATH_NM], 450914330f12Smrg[AC_REQUIRE([AC_PROG_CC])dnl 451014330f12SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 451114330f12Smrg[if test -n "$NM"; then 451214330f12Smrg # Let the user override the test. 451314330f12Smrg lt_cv_path_NM="$NM" 451414330f12Smrgelse 451514330f12Smrg lt_nm_to_check="${ac_tool_prefix}nm" 451614330f12Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 451714330f12Smrg lt_nm_to_check="$lt_nm_to_check nm" 451814330f12Smrg fi 451914330f12Smrg for lt_tmp_nm in $lt_nm_to_check; do 452014330f12Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 452114330f12Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 452214330f12Smrg IFS="$lt_save_ifs" 452314330f12Smrg test -z "$ac_dir" && ac_dir=. 452414330f12Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 452514330f12Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 452614330f12Smrg # Check to see if the nm accepts a BSD-compat flag. 452714330f12Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 452814330f12Smrg # nm: unknown option "B" ignored 452914330f12Smrg # Tru64's nm complains that /dev/null is an invalid object file 453014330f12Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 453114330f12Smrg */dev/null* | *'Invalid file or object type'*) 453214330f12Smrg lt_cv_path_NM="$tmp_nm -B" 453314330f12Smrg break 453414330f12Smrg ;; 453514330f12Smrg *) 453614330f12Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 453714330f12Smrg */dev/null*) 453814330f12Smrg lt_cv_path_NM="$tmp_nm -p" 453914330f12Smrg break 454014330f12Smrg ;; 454114330f12Smrg *) 454214330f12Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 454314330f12Smrg continue # so that we can try to find one that supports BSD flags 454414330f12Smrg ;; 454514330f12Smrg esac 45462378475aSmrg ;; 45472378475aSmrg esac 45482378475aSmrg fi 454914330f12Smrg done 455014330f12Smrg IFS="$lt_save_ifs" 455114330f12Smrg done 455214330f12Smrg : ${lt_cv_path_NM=no} 455314330f12Smrgfi]) 455414330f12Smrgif test "$lt_cv_path_NM" != "no"; then 455514330f12Smrg NM="$lt_cv_path_NM" 455614330f12Smrgelse 455714330f12Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 455814330f12Smrg if test -n "$DUMPBIN"; then : 455914330f12Smrg # Let the user override the test. 456014330f12Smrg else 456114330f12Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 456214330f12Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 456314330f12Smrg *COFF*) 456414330f12Smrg DUMPBIN="$DUMPBIN -symbols" 45652378475aSmrg ;; 456614330f12Smrg *) 456714330f12Smrg DUMPBIN=: 45682378475aSmrg ;; 456914330f12Smrg esac 457014330f12Smrg fi 457114330f12Smrg AC_SUBST([DUMPBIN]) 457214330f12Smrg if test "$DUMPBIN" != ":"; then 457314330f12Smrg NM="$DUMPBIN" 457414330f12Smrg fi 457514330f12Smrgfi 457614330f12Smrgtest -z "$NM" && NM=nm 457714330f12SmrgAC_SUBST([NM]) 457814330f12Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 457995b296d0Smrg 458014330f12SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 458114330f12Smrg [lt_cv_nm_interface="BSD nm" 458214330f12Smrg echo "int some_variable = 0;" > conftest.$ac_ext 458314330f12Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 458414330f12Smrg (eval "$ac_compile" 2>conftest.err) 458514330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 458614330f12Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 458714330f12Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 458814330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 458914330f12Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 459014330f12Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 459114330f12Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 459214330f12Smrg lt_cv_nm_interface="MS dumpbin" 459314330f12Smrg fi 459414330f12Smrg rm -f conftest*]) 459514330f12Smrg])# LT_PATH_NM 459695b296d0Smrg 459714330f12Smrg# Old names: 459814330f12SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 459914330f12SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 460014330f12Smrgdnl aclocal-1.4 backwards compatibility: 460114330f12Smrgdnl AC_DEFUN([AM_PROG_NM], []) 460214330f12Smrgdnl AC_DEFUN([AC_PROG_NM], []) 460339713583Smrg 460414330f12Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 460514330f12Smrg# -------------------------------- 460614330f12Smrg# how to determine the name of the shared library 460714330f12Smrg# associated with a specific link library. 460814330f12Smrg# -- PORTME fill in with the dynamic library characteristics 460914330f12Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 461014330f12Smrg[m4_require([_LT_DECL_EGREP]) 461114330f12Smrgm4_require([_LT_DECL_OBJDUMP]) 461214330f12Smrgm4_require([_LT_DECL_DLLTOOL]) 461314330f12SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 461414330f12Smrglt_cv_sharedlib_from_linklib_cmd, 461514330f12Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 461695b296d0Smrg 461714330f12Smrgcase $host_os in 461814330f12Smrgcygwin* | mingw* | pw32* | cegcc*) 461914330f12Smrg # two different shell functions defined in ltmain.sh 462014330f12Smrg # decide which to use based on capabilities of $DLLTOOL 462114330f12Smrg case `$DLLTOOL --help 2>&1` in 462214330f12Smrg *--identify-strict*) 462314330f12Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 462414330f12Smrg ;; 462514330f12Smrg *) 462614330f12Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 462714330f12Smrg ;; 462814330f12Smrg esac 462914330f12Smrg ;; 463014330f12Smrg*) 463114330f12Smrg # fallback: assume linklib IS sharedlib 463214330f12Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 463314330f12Smrg ;; 463414330f12Smrgesac 463514330f12Smrg]) 463614330f12Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 463714330f12Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 463895b296d0Smrg 463914330f12Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 464014330f12Smrg [Command to associate shared and link libraries]) 464114330f12Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 464295b296d0Smrg 464395b296d0Smrg 464414330f12Smrg# _LT_PATH_MANIFEST_TOOL 464514330f12Smrg# ---------------------- 464614330f12Smrg# locate the manifest tool 464714330f12Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 464814330f12Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 464914330f12Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 465014330f12SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 465114330f12Smrg [lt_cv_path_mainfest_tool=no 465214330f12Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 465314330f12Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 465414330f12Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 465514330f12Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 465614330f12Smrg lt_cv_path_mainfest_tool=yes 465714330f12Smrg fi 465814330f12Smrg rm -f conftest*]) 465914330f12Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 466014330f12Smrg MANIFEST_TOOL=: 466114330f12Smrgfi 466214330f12Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 466314330f12Smrg])# _LT_PATH_MANIFEST_TOOL 466495b296d0Smrg 466595b296d0Smrg 466614330f12Smrg# LT_LIB_M 466714330f12Smrg# -------- 466814330f12Smrg# check for math library 466914330f12SmrgAC_DEFUN([LT_LIB_M], 467014330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 467114330f12SmrgLIBM= 467214330f12Smrgcase $host in 467314330f12Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 467414330f12Smrg # These system don't have libm, or don't need it 467514330f12Smrg ;; 467614330f12Smrg*-ncr-sysv4.3*) 467714330f12Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 467814330f12Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 467914330f12Smrg ;; 468014330f12Smrg*) 468114330f12Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 468214330f12Smrg ;; 468314330f12Smrgesac 468414330f12SmrgAC_SUBST([LIBM]) 468514330f12Smrg])# LT_LIB_M 468695b296d0Smrg 468714330f12Smrg# Old name: 468814330f12SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 468914330f12Smrgdnl aclocal-1.4 backwards compatibility: 469014330f12Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 469195b296d0Smrg 469295b296d0Smrg 469314330f12Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 469414330f12Smrg# ------------------------------- 469514330f12Smrgm4_defun([_LT_COMPILER_NO_RTTI], 469614330f12Smrg[m4_require([_LT_TAG_COMPILER])dnl 469795b296d0Smrg 469814330f12Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 469995b296d0Smrg 470014330f12Smrgif test "$GCC" = yes; then 470114330f12Smrg case $cc_basename in 470214330f12Smrg nvcc*) 470314330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 470414330f12Smrg *) 470514330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 470614330f12Smrg esac 470795b296d0Smrg 470814330f12Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 470914330f12Smrg lt_cv_prog_compiler_rtti_exceptions, 471014330f12Smrg [-fno-rtti -fno-exceptions], [], 471114330f12Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 471214330f12Smrgfi 471314330f12Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 471414330f12Smrg [Compiler flag to turn off builtin functions]) 471514330f12Smrg])# _LT_COMPILER_NO_RTTI 471695b296d0Smrg 471795b296d0Smrg 471814330f12Smrg# _LT_CMD_GLOBAL_SYMBOLS 471914330f12Smrg# ---------------------- 472014330f12Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 472114330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 472214330f12SmrgAC_REQUIRE([AC_PROG_CC])dnl 472314330f12SmrgAC_REQUIRE([AC_PROG_AWK])dnl 472414330f12SmrgAC_REQUIRE([LT_PATH_NM])dnl 472514330f12SmrgAC_REQUIRE([LT_PATH_LD])dnl 472614330f12Smrgm4_require([_LT_DECL_SED])dnl 472714330f12Smrgm4_require([_LT_DECL_EGREP])dnl 472814330f12Smrgm4_require([_LT_TAG_COMPILER])dnl 472995b296d0Smrg 473014330f12Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 473114330f12SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 473214330f12SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 473314330f12Smrg[ 473414330f12Smrg# These are sane defaults that work on at least a few old systems. 473514330f12Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 473695b296d0Smrg 473714330f12Smrg# Character class describing NM global symbol codes. 473814330f12Smrgsymcode='[[BCDEGRST]]' 473995b296d0Smrg 474014330f12Smrg# Regexp to match symbols that can be accessed directly from C. 474114330f12Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 474295b296d0Smrg 474314330f12Smrg# Define system-specific variables. 474414330f12Smrgcase $host_os in 474514330f12Smrgaix*) 474614330f12Smrg symcode='[[BCDT]]' 474714330f12Smrg ;; 474814330f12Smrgcygwin* | mingw* | pw32* | cegcc*) 474914330f12Smrg symcode='[[ABCDGISTW]]' 475014330f12Smrg ;; 475114330f12Smrghpux*) 475214330f12Smrg if test "$host_cpu" = ia64; then 475314330f12Smrg symcode='[[ABCDEGRST]]' 475414330f12Smrg fi 475514330f12Smrg ;; 475614330f12Smrgirix* | nonstopux*) 475714330f12Smrg symcode='[[BCDEGRST]]' 475814330f12Smrg ;; 475914330f12Smrgosf*) 476014330f12Smrg symcode='[[BCDEGQRST]]' 476114330f12Smrg ;; 476214330f12Smrgsolaris*) 476314330f12Smrg symcode='[[BDRT]]' 476414330f12Smrg ;; 476514330f12Smrgsco3.2v5*) 476614330f12Smrg symcode='[[DT]]' 476714330f12Smrg ;; 476814330f12Smrgsysv4.2uw2*) 476914330f12Smrg symcode='[[DT]]' 477014330f12Smrg ;; 477114330f12Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 477214330f12Smrg symcode='[[ABDT]]' 477314330f12Smrg ;; 477414330f12Smrgsysv4) 477514330f12Smrg symcode='[[DFNSTU]]' 477614330f12Smrg ;; 477714330f12Smrgesac 477895b296d0Smrg 477914330f12Smrg# If we're using GNU nm, then use its standard symbol codes. 478014330f12Smrgcase `$NM -V 2>&1` in 478114330f12Smrg*GNU* | *'with BFD'*) 478214330f12Smrg symcode='[[ABCDGIRSTW]]' ;; 478314330f12Smrgesac 478495b296d0Smrg 478514330f12Smrg# Transform an extracted symbol line into a proper C declaration. 478614330f12Smrg# Some systems (esp. on ia64) link data and code symbols differently, 478714330f12Smrg# so use this general approach. 478814330f12Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 478995b296d0Smrg 479014330f12Smrg# Transform an extracted symbol line into symbol name and symbol address 479114330f12Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 479214330f12Smrglt_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'" 479395b296d0Smrg 479414330f12Smrg# Handle CRLF in mingw tool chain 479514330f12Smrgopt_cr= 479614330f12Smrgcase $build_os in 479714330f12Smrgmingw*) 479814330f12Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 479914330f12Smrg ;; 480014330f12Smrgesac 480195b296d0Smrg 480214330f12Smrg# Try without a prefix underscore, then with it. 480314330f12Smrgfor ac_symprfx in "" "_"; do 48042378475aSmrg 480514330f12Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 480614330f12Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48072378475aSmrg 480814330f12Smrg # Write the raw and C identifiers. 480914330f12Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 481014330f12Smrg # Fake it for dumpbin and say T for any non-static function 481114330f12Smrg # and D for any global variable. 481214330f12Smrg # Also find C++ and __fastcall symbols from MSVC++, 481314330f12Smrg # which start with @ or ?. 481414330f12Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 481514330f12Smrg" {last_section=section; section=\$ 3};"\ 481614330f12Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 481714330f12Smrg" \$ 0!~/External *\|/{next};"\ 481814330f12Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 481914330f12Smrg" {if(hide[section]) next};"\ 482014330f12Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 482114330f12Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 482214330f12Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 482314330f12Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 482414330f12Smrg" ' prfx=^$ac_symprfx]" 482514330f12Smrg else 482614330f12Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 482714330f12Smrg fi 482814330f12Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 48292378475aSmrg 483014330f12Smrg # Check to see that the pipe works correctly. 483114330f12Smrg pipe_works=no 483295b296d0Smrg 483314330f12Smrg rm -f conftest* 483414330f12Smrg cat > conftest.$ac_ext <<_LT_EOF 483514330f12Smrg#ifdef __cplusplus 483614330f12Smrgextern "C" { 483714330f12Smrg#endif 483814330f12Smrgchar nm_test_var; 483914330f12Smrgvoid nm_test_func(void); 484014330f12Smrgvoid nm_test_func(void){} 484114330f12Smrg#ifdef __cplusplus 484214330f12Smrg} 484314330f12Smrg#endif 484414330f12Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 484514330f12Smrg_LT_EOF 484614330f12Smrg 484714330f12Smrg if AC_TRY_EVAL(ac_compile); then 484814330f12Smrg # Now try to grab the symbols. 484914330f12Smrg nlist=conftest.nm 485014330f12Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 485114330f12Smrg # Try sorting and uniquifying the output. 485214330f12Smrg if sort "$nlist" | uniq > "$nlist"T; then 485314330f12Smrg mv -f "$nlist"T "$nlist" 48542378475aSmrg else 485514330f12Smrg rm -f "$nlist"T 48562378475aSmrg fi 485795b296d0Smrg 485814330f12Smrg # Make sure that we snagged all the symbols we need. 485914330f12Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 486014330f12Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 486114330f12Smrg cat <<_LT_EOF > conftest.$ac_ext 486214330f12Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 486314330f12Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 486414330f12Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 486514330f12Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 486614330f12Smrg# define LT@&t@_DLSYM_CONST 486714330f12Smrg#elif defined(__osf__) 486814330f12Smrg/* This system does not cope well with relocations in const data. */ 486914330f12Smrg# define LT@&t@_DLSYM_CONST 487014330f12Smrg#else 487114330f12Smrg# define LT@&t@_DLSYM_CONST const 487214330f12Smrg#endif 487314330f12Smrg 487414330f12Smrg#ifdef __cplusplus 487514330f12Smrgextern "C" { 487614330f12Smrg#endif 487795b296d0Smrg 487814330f12Smrg_LT_EOF 487914330f12Smrg # Now generate the symbol file. 488014330f12Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 488195b296d0Smrg 488214330f12Smrg cat <<_LT_EOF >> conftest.$ac_ext 488395b296d0Smrg 488414330f12Smrg/* The mapping between symbol names and symbols. */ 488514330f12SmrgLT@&t@_DLSYM_CONST struct { 488614330f12Smrg const char *name; 488714330f12Smrg void *address; 488814330f12Smrg} 488914330f12Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 489014330f12Smrg{ 489114330f12Smrg { "@PROGRAM@", (void *) 0 }, 489214330f12Smrg_LT_EOF 489314330f12Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 489414330f12Smrg cat <<\_LT_EOF >> conftest.$ac_ext 489514330f12Smrg {0, (void *) 0} 489614330f12Smrg}; 489714330f12Smrg 489814330f12Smrg/* This works around a problem in FreeBSD linker */ 489914330f12Smrg#ifdef FREEBSD_WORKAROUND 490014330f12Smrgstatic const void *lt_preloaded_setup() { 490114330f12Smrg return lt__PROGRAM__LTX_preloaded_symbols; 490214330f12Smrg} 490314330f12Smrg#endif 490414330f12Smrg 490514330f12Smrg#ifdef __cplusplus 490614330f12Smrg} 490714330f12Smrg#endif 490814330f12Smrg_LT_EOF 490914330f12Smrg # Now try linking the two files. 491014330f12Smrg mv conftest.$ac_objext conftstm.$ac_objext 491114330f12Smrg lt_globsym_save_LIBS=$LIBS 491214330f12Smrg lt_globsym_save_CFLAGS=$CFLAGS 491314330f12Smrg LIBS="conftstm.$ac_objext" 491414330f12Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 491514330f12Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 491614330f12Smrg pipe_works=yes 491714330f12Smrg fi 491814330f12Smrg LIBS=$lt_globsym_save_LIBS 491914330f12Smrg CFLAGS=$lt_globsym_save_CFLAGS 49202378475aSmrg else 492114330f12Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49222378475aSmrg fi 49232378475aSmrg else 492414330f12Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49252378475aSmrg fi 492614330f12Smrg else 492714330f12Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 492814330f12Smrg fi 492914330f12Smrg else 493014330f12Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 493114330f12Smrg cat conftest.$ac_ext >&5 493214330f12Smrg fi 493314330f12Smrg rm -rf conftest* conftst* 493495b296d0Smrg 493514330f12Smrg # Do not use the global_symbol_pipe unless it works. 493614330f12Smrg if test "$pipe_works" = yes; then 493714330f12Smrg break 493814330f12Smrg else 493914330f12Smrg lt_cv_sys_global_symbol_pipe= 494014330f12Smrg fi 494114330f12Smrgdone 494214330f12Smrg]) 494314330f12Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 494414330f12Smrg lt_cv_sys_global_symbol_to_cdecl= 494514330f12Smrgfi 494614330f12Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 494714330f12Smrg AC_MSG_RESULT(failed) 494814330f12Smrgelse 494914330f12Smrg AC_MSG_RESULT(ok) 495014330f12Smrgfi 495195b296d0Smrg 495214330f12Smrg# Response file support. 495314330f12Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 495414330f12Smrg nm_file_list_spec='@' 495514330f12Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 495614330f12Smrg nm_file_list_spec='@' 495714330f12Smrgfi 495895b296d0Smrg 495914330f12Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 496014330f12Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 496114330f12Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 496214330f12Smrg [Transform the output of nm in a proper C declaration]) 496314330f12Smrg_LT_DECL([global_symbol_to_c_name_address], 496414330f12Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 496514330f12Smrg [Transform the output of nm in a C name address pair]) 496614330f12Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 496714330f12Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 496814330f12Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 496914330f12Smrg_LT_DECL([], [nm_file_list_spec], [1], 497014330f12Smrg [Specify filename containing input files for $NM]) 497114330f12Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 497295b296d0Smrg 497395b296d0Smrg 497414330f12Smrg# _LT_COMPILER_PIC([TAGNAME]) 497514330f12Smrg# --------------------------- 497614330f12Smrgm4_defun([_LT_COMPILER_PIC], 497714330f12Smrg[m4_require([_LT_TAG_COMPILER])dnl 497814330f12Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 497914330f12Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 498014330f12Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 498195b296d0Smrg 498214330f12Smrgm4_if([$1], [CXX], [ 498314330f12Smrg # C++ specific cases for pic, static, wl, etc. 498414330f12Smrg if test "$GXX" = yes; then 498514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 498614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 498714330f12Smrg 498814330f12Smrg case $host_os in 498914330f12Smrg aix*) 499014330f12Smrg # All AIX code is PIC. 499114330f12Smrg if test "$host_cpu" = ia64; then 499214330f12Smrg # AIX 5 now supports IA64 processor 499314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49942378475aSmrg fi 49952378475aSmrg ;; 499695b296d0Smrg 499714330f12Smrg amigaos*) 499814330f12Smrg case $host_cpu in 499914330f12Smrg powerpc) 500014330f12Smrg # see comment about AmigaOS4 .so support 500114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 500214330f12Smrg ;; 500314330f12Smrg m68k) 500414330f12Smrg # FIXME: we need at least 68020 code to build shared libraries, but 500514330f12Smrg # adding the `-m68020' flag to GCC prevents building anything better, 500614330f12Smrg # like `-m68040'. 500714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50082378475aSmrg ;; 50092378475aSmrg esac 50102378475aSmrg ;; 501114330f12Smrg 501214330f12Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 501314330f12Smrg # PIC is the default for these OSes. 501414330f12Smrg ;; 501514330f12Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 501614330f12Smrg # This hack is so that the source file can tell whether it is being 501714330f12Smrg # built for inclusion in a dll (and should export symbols for example). 501814330f12Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 501914330f12Smrg # (--disable-auto-import) libraries 502014330f12Smrg m4_if([$1], [GCJ], [], 502114330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 502214330f12Smrg ;; 502314330f12Smrg darwin* | rhapsody*) 502414330f12Smrg # PIC is the default on this platform 502514330f12Smrg # Common symbols not allowed in MH_DYLIB files 502614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 502714330f12Smrg ;; 502814330f12Smrg *djgpp*) 502914330f12Smrg # DJGPP does not support shared libraries at all 503014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 503114330f12Smrg ;; 503214330f12Smrg haiku*) 503314330f12Smrg # PIC is the default for Haiku. 503414330f12Smrg # The "-static" flag exists, but is broken. 503514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 503614330f12Smrg ;; 503714330f12Smrg interix[[3-9]]*) 503814330f12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 503914330f12Smrg # Instead, we relocate shared libraries at runtime. 50402378475aSmrg ;; 50412378475aSmrg sysv4*MP*) 50422378475aSmrg if test -d /usr/nec; then 504314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50442378475aSmrg fi 50452378475aSmrg ;; 504614330f12Smrg hpux*) 504714330f12Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 504814330f12Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 504914330f12Smrg # sets the default TLS model and affects inlining. 505014330f12Smrg case $host_cpu in 505114330f12Smrg hppa*64*) 505214330f12Smrg ;; 505314330f12Smrg *) 505414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 505514330f12Smrg ;; 505614330f12Smrg esac 50572378475aSmrg ;; 505814330f12Smrg *qnx* | *nto*) 505914330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 506014330f12Smrg # it will coredump. 506114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 506214330f12Smrg ;; 506314330f12Smrg *) 506414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 506514330f12Smrg ;; 506614330f12Smrg esac 506714330f12Smrg else 506814330f12Smrg case $host_os in 506914330f12Smrg aix[[4-9]]*) 507014330f12Smrg # All AIX code is PIC. 507114330f12Smrg if test "$host_cpu" = ia64; then 507214330f12Smrg # AIX 5 now supports IA64 processor 507314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 507414330f12Smrg else 507514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 507614330f12Smrg fi 507714330f12Smrg ;; 507814330f12Smrg chorus*) 507914330f12Smrg case $cc_basename in 508014330f12Smrg cxch68*) 508114330f12Smrg # Green Hills C++ Compiler 508214330f12Smrg # _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" 508314330f12Smrg ;; 508414330f12Smrg esac 508514330f12Smrg ;; 508614330f12Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 508714330f12Smrg # This hack is so that the source file can tell whether it is being 508814330f12Smrg # built for inclusion in a dll (and should export symbols for example). 508914330f12Smrg m4_if([$1], [GCJ], [], 509014330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 509114330f12Smrg ;; 509214330f12Smrg dgux*) 509314330f12Smrg case $cc_basename in 509414330f12Smrg ec++*) 509514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 509614330f12Smrg ;; 509714330f12Smrg ghcx*) 509814330f12Smrg # Green Hills C++ Compiler 509914330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 510014330f12Smrg ;; 510114330f12Smrg *) 510214330f12Smrg ;; 510314330f12Smrg esac 510414330f12Smrg ;; 510514330f12Smrg freebsd* | dragonfly*) 510614330f12Smrg # FreeBSD uses GNU C++ 510714330f12Smrg ;; 510814330f12Smrg hpux9* | hpux10* | hpux11*) 510914330f12Smrg case $cc_basename in 511014330f12Smrg CC*) 511114330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 511214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 511314330f12Smrg if test "$host_cpu" != ia64; then 511414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 511514330f12Smrg fi 511614330f12Smrg ;; 511714330f12Smrg aCC*) 511814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 511914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 512014330f12Smrg case $host_cpu in 512114330f12Smrg hppa*64*|ia64*) 512214330f12Smrg # +Z the default 512314330f12Smrg ;; 512414330f12Smrg *) 512514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 512614330f12Smrg ;; 512714330f12Smrg esac 512814330f12Smrg ;; 512914330f12Smrg *) 513014330f12Smrg ;; 513114330f12Smrg esac 513214330f12Smrg ;; 513314330f12Smrg interix*) 513414330f12Smrg # This is c89, which is MS Visual C++ (no shared libs) 513514330f12Smrg # Anyone wants to do a port? 513614330f12Smrg ;; 513714330f12Smrg irix5* | irix6* | nonstopux*) 513814330f12Smrg case $cc_basename in 513914330f12Smrg CC*) 514014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 514114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 514214330f12Smrg # CC pic flag -KPIC is the default. 514314330f12Smrg ;; 514414330f12Smrg *) 514514330f12Smrg ;; 514614330f12Smrg esac 514714330f12Smrg ;; 514814330f12Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 514914330f12Smrg case $cc_basename in 515014330f12Smrg KCC*) 515114330f12Smrg # KAI C++ Compiler 515214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 515314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 515414330f12Smrg ;; 515514330f12Smrg ecpc* ) 515614330f12Smrg # old Intel C++ for x86_64 which still supported -KPIC. 515714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 515914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 516014330f12Smrg ;; 516114330f12Smrg icpc* ) 516214330f12Smrg # Intel C++, used to be incompatible with GCC. 516314330f12Smrg # ICC 10 doesn't accept -KPIC any more. 516414330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 516514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 516614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 516714330f12Smrg ;; 516814330f12Smrg pgCC* | pgcpp*) 516914330f12Smrg # Portland Group C++ compiler 517014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 517114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 517214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517314330f12Smrg ;; 517414330f12Smrg cxx*) 517514330f12Smrg # Compaq C++ 517614330f12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 517714330f12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 517814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 517914330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 518014330f12Smrg ;; 518114330f12Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 518214330f12Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 518314330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 518414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 518514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 518614330f12Smrg ;; 518714330f12Smrg *) 518814330f12Smrg case `$CC -V 2>&1 | sed 5q` in 518914330f12Smrg *Sun\ C*) 519014330f12Smrg # Sun C++ 5.9 519114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 519214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 519314330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 519414330f12Smrg ;; 519514330f12Smrg esac 519614330f12Smrg ;; 519714330f12Smrg esac 519814330f12Smrg ;; 519914330f12Smrg lynxos*) 520014330f12Smrg ;; 520114330f12Smrg m88k*) 520214330f12Smrg ;; 520314330f12Smrg mvs*) 520414330f12Smrg case $cc_basename in 520514330f12Smrg cxx*) 520614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 520714330f12Smrg ;; 520814330f12Smrg *) 520914330f12Smrg ;; 521014330f12Smrg esac 521114330f12Smrg ;; 521214330f12Smrg netbsd*) 521314330f12Smrg ;; 521414330f12Smrg *qnx* | *nto*) 521514330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 521614330f12Smrg # it will coredump. 521714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 521814330f12Smrg ;; 521914330f12Smrg osf3* | osf4* | osf5*) 522014330f12Smrg case $cc_basename in 522114330f12Smrg KCC*) 522214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 522314330f12Smrg ;; 522414330f12Smrg RCC*) 522514330f12Smrg # Rational C++ 2.4.1 522614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 522714330f12Smrg ;; 522814330f12Smrg cxx*) 522914330f12Smrg # Digital/Compaq C++ 523014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523114330f12Smrg # Make sure the PIC flag is empty. It appears that all Alpha 523214330f12Smrg # Linux and Compaq Tru64 Unix objects are PIC. 523314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 523414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 523514330f12Smrg ;; 523614330f12Smrg *) 523714330f12Smrg ;; 523814330f12Smrg esac 523914330f12Smrg ;; 524014330f12Smrg psos*) 524114330f12Smrg ;; 524214330f12Smrg solaris*) 524314330f12Smrg case $cc_basename in 524414330f12Smrg CC* | sunCC*) 524514330f12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 524614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 524714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 524814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 524914330f12Smrg ;; 525014330f12Smrg gcx*) 525114330f12Smrg # Green Hills C++ Compiler 525214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 525314330f12Smrg ;; 525414330f12Smrg *) 525514330f12Smrg ;; 525614330f12Smrg esac 525714330f12Smrg ;; 525814330f12Smrg sunos4*) 525914330f12Smrg case $cc_basename in 526014330f12Smrg CC*) 526114330f12Smrg # Sun C++ 4.x 526214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 526314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 526414330f12Smrg ;; 526514330f12Smrg lcc*) 526614330f12Smrg # Lucid 526714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 526814330f12Smrg ;; 526914330f12Smrg *) 527014330f12Smrg ;; 527114330f12Smrg esac 527214330f12Smrg ;; 527314330f12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 527414330f12Smrg case $cc_basename in 527514330f12Smrg CC*) 527614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 527714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 527814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527914330f12Smrg ;; 528014330f12Smrg esac 528114330f12Smrg ;; 528214330f12Smrg tandem*) 528314330f12Smrg case $cc_basename in 528414330f12Smrg NCC*) 528514330f12Smrg # NonStop-UX NCC 3.20 528614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528714330f12Smrg ;; 528814330f12Smrg *) 528914330f12Smrg ;; 529014330f12Smrg esac 529114330f12Smrg ;; 529214330f12Smrg vxworks*) 529314330f12Smrg ;; 529414330f12Smrg *) 529514330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529614330f12Smrg ;; 529714330f12Smrg esac 529814330f12Smrg fi 529914330f12Smrg], 530014330f12Smrg[ 530114330f12Smrg if test "$GCC" = yes; then 530214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 530314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 530495b296d0Smrg 530514330f12Smrg case $host_os in 530614330f12Smrg aix*) 530714330f12Smrg # All AIX code is PIC. 530814330f12Smrg if test "$host_cpu" = ia64; then 530914330f12Smrg # AIX 5 now supports IA64 processor 531014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53112378475aSmrg fi 53122378475aSmrg ;; 531395b296d0Smrg 531414330f12Smrg amigaos*) 531514330f12Smrg case $host_cpu in 531614330f12Smrg powerpc) 531714330f12Smrg # see comment about AmigaOS4 .so support 531814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 531914330f12Smrg ;; 532014330f12Smrg m68k) 532114330f12Smrg # FIXME: we need at least 68020 code to build shared libraries, but 532214330f12Smrg # adding the `-m68020' flag to GCC prevents building anything better, 532314330f12Smrg # like `-m68040'. 532414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 532514330f12Smrg ;; 532614330f12Smrg esac 53272378475aSmrg ;; 532895b296d0Smrg 532914330f12Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 533014330f12Smrg # PIC is the default for these OSes. 53312378475aSmrg ;; 533295b296d0Smrg 533314330f12Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 533414330f12Smrg # This hack is so that the source file can tell whether it is being 533514330f12Smrg # built for inclusion in a dll (and should export symbols for example). 533614330f12Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 533714330f12Smrg # (--disable-auto-import) libraries 533814330f12Smrg m4_if([$1], [GCJ], [], 533914330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53402378475aSmrg ;; 534195b296d0Smrg 534214330f12Smrg darwin* | rhapsody*) 534314330f12Smrg # PIC is the default on this platform 534414330f12Smrg # Common symbols not allowed in MH_DYLIB files 534514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 534614330f12Smrg ;; 53472378475aSmrg 534814330f12Smrg haiku*) 534914330f12Smrg # PIC is the default for Haiku. 535014330f12Smrg # The "-static" flag exists, but is broken. 535114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 535214330f12Smrg ;; 53532378475aSmrg 535414330f12Smrg hpux*) 535514330f12Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 535614330f12Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 535714330f12Smrg # sets the default TLS model and affects inlining. 535814330f12Smrg case $host_cpu in 535914330f12Smrg hppa*64*) 536014330f12Smrg # +Z the default 536114330f12Smrg ;; 536214330f12Smrg *) 536314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 536414330f12Smrg ;; 536514330f12Smrg esac 536614330f12Smrg ;; 53672378475aSmrg 536814330f12Smrg interix[[3-9]]*) 536914330f12Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 537014330f12Smrg # Instead, we relocate shared libraries at runtime. 537114330f12Smrg ;; 537295b296d0Smrg 537314330f12Smrg msdosdjgpp*) 537414330f12Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 537514330f12Smrg # on systems that don't support them. 537614330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 537714330f12Smrg enable_shared=no 537814330f12Smrg ;; 537995b296d0Smrg 538014330f12Smrg *nto* | *qnx*) 538114330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 538214330f12Smrg # it will coredump. 538314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 538414330f12Smrg ;; 538595b296d0Smrg 538614330f12Smrg sysv4*MP*) 538714330f12Smrg if test -d /usr/nec; then 538814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 538914330f12Smrg fi 539014330f12Smrg ;; 539195b296d0Smrg 539214330f12Smrg *) 539314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 539414330f12Smrg ;; 539514330f12Smrg esac 539695b296d0Smrg 539714330f12Smrg case $cc_basename in 539814330f12Smrg nvcc*) # Cuda Compiler Driver 2.2 539914330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 540014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 540114330f12Smrg ;; 540214330f12Smrg esac 540314330f12Smrg else 540414330f12Smrg # PORTME Check for flag to pass linker flags through the system compiler. 540514330f12Smrg case $host_os in 540614330f12Smrg aix*) 540714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540814330f12Smrg if test "$host_cpu" = ia64; then 540914330f12Smrg # AIX 5 now supports IA64 processor 541014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 541114330f12Smrg else 541214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 541314330f12Smrg fi 541414330f12Smrg ;; 5415ff89ac2bSmrg 541614330f12Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 541714330f12Smrg # This hack is so that the source file can tell whether it is being 541814330f12Smrg # built for inclusion in a dll (and should export symbols for example). 541914330f12Smrg m4_if([$1], [GCJ], [], 542014330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 542114330f12Smrg ;; 542295b296d0Smrg 542314330f12Smrg hpux9* | hpux10* | hpux11*) 542414330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 542514330f12Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 542614330f12Smrg # not for PA HP-UX. 542714330f12Smrg case $host_cpu in 542814330f12Smrg hppa*64*|ia64*) 542914330f12Smrg # +Z the default 543014330f12Smrg ;; 543114330f12Smrg *) 543214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 543314330f12Smrg ;; 543414330f12Smrg esac 543514330f12Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 543614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 543714330f12Smrg ;; 543895b296d0Smrg 543914330f12Smrg irix5* | irix6* | nonstopux*) 544014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544114330f12Smrg # PIC (with -KPIC) is the default. 544214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 544314330f12Smrg ;; 54442378475aSmrg 544514330f12Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 544614330f12Smrg case $cc_basename in 544714330f12Smrg # old Intel for x86_64 which still supported -KPIC. 544814330f12Smrg ecc*) 544914330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 545014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 545114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 545214330f12Smrg ;; 545314330f12Smrg # icc used to be incompatible with GCC. 545414330f12Smrg # ICC 10 doesn't accept -KPIC any more. 545514330f12Smrg icc* | ifort*) 545614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 545714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 545814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 545914330f12Smrg ;; 546014330f12Smrg # Lahey Fortran 8.1. 546114330f12Smrg lf95*) 546214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 546414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 546514330f12Smrg ;; 546614330f12Smrg nagfor*) 546714330f12Smrg # NAG Fortran compiler 546814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 546914330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 547014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547114330f12Smrg ;; 547214330f12Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 547314330f12Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 547414330f12Smrg # which looks to be a dead project) 547514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 547614330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 547714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547814330f12Smrg ;; 547914330f12Smrg ccc*) 548014330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548114330f12Smrg # All Alpha code is PIC. 548214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 548314330f12Smrg ;; 548414330f12Smrg xl* | bgxl* | bgf* | mpixl*) 548514330f12Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 548614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 548814330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 548914330f12Smrg ;; 549014330f12Smrg *) 549114330f12Smrg case `$CC -V 2>&1 | sed 5q` in 549214330f12Smrg *Sun\ F* | *Sun*Fortran*) 549314330f12Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 549414330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 549514330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549614330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 549714330f12Smrg ;; 549814330f12Smrg *Sun\ C*) 549914330f12Smrg # Sun C 5.9 550014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550314330f12Smrg ;; 550414330f12Smrg esac 550514330f12Smrg ;; 550614330f12Smrg esac 550714330f12Smrg ;; 550895b296d0Smrg 550914330f12Smrg newsos6) 551014330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 551114330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551214330f12Smrg ;; 551395b296d0Smrg 551414330f12Smrg *nto* | *qnx*) 551514330f12Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 551614330f12Smrg # it will coredump. 551714330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 551814330f12Smrg ;; 55192378475aSmrg 552014330f12Smrg osf3* | osf4* | osf5*) 552114330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 552214330f12Smrg # All OSF/1 code is PIC. 552314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 552414330f12Smrg ;; 55252378475aSmrg 552614330f12Smrg rdos*) 552714330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 552814330f12Smrg ;; 55292378475aSmrg 553014330f12Smrg solaris*) 553114330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 553214330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 553314330f12Smrg case $cc_basename in 553414330f12Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 553514330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 553614330f12Smrg *) 553714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 553814330f12Smrg esac 553914330f12Smrg ;; 55402378475aSmrg 554114330f12Smrg sunos4*) 554214330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 554314330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 554414330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 554514330f12Smrg ;; 55462378475aSmrg 554714330f12Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 554814330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 554914330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 555014330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 555114330f12Smrg ;; 555295b296d0Smrg 555314330f12Smrg sysv4*MP*) 555414330f12Smrg if test -d /usr/nec ;then 555514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 555614330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 555714330f12Smrg fi 555814330f12Smrg ;; 555995b296d0Smrg 556014330f12Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 556114330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 556214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 556314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 556414330f12Smrg ;; 556595b296d0Smrg 556614330f12Smrg unicos*) 556714330f12Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 556814330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 556914330f12Smrg ;; 557095b296d0Smrg 557114330f12Smrg uts4*) 557214330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 557314330f12Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 557414330f12Smrg ;; 557595b296d0Smrg 557614330f12Smrg *) 557714330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 557814330f12Smrg ;; 557914330f12Smrg esac 558014330f12Smrg fi 558114330f12Smrg]) 558214330f12Smrgcase $host_os in 558314330f12Smrg # For platforms which do not support PIC, -DPIC is meaningless: 558414330f12Smrg *djgpp*) 558514330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 558614330f12Smrg ;; 558714330f12Smrg *) 558814330f12Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 558914330f12Smrg ;; 559014330f12Smrgesac 559195b296d0Smrg 559214330f12SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 559314330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 559414330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 559514330f12Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 559695b296d0Smrg 559714330f12Smrg# 559814330f12Smrg# Check to make sure the PIC flag actually works. 559914330f12Smrg# 560014330f12Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 560114330f12Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 560214330f12Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 560314330f12Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 560414330f12Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 560514330f12Smrg "" | " "*) ;; 560614330f12Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 560714330f12Smrg esac], 560814330f12Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 560914330f12Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 561014330f12Smrgfi 561114330f12Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 561214330f12Smrg [Additional compiler flags for building library objects]) 56132378475aSmrg 561414330f12Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 561514330f12Smrg [How to pass a linker flag through the compiler]) 561614330f12Smrg# 561714330f12Smrg# Check to make sure the static flag actually works. 561814330f12Smrg# 561914330f12Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 562014330f12Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 562114330f12Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 562214330f12Smrg $lt_tmp_static_flag, 562314330f12Smrg [], 562414330f12Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 562514330f12Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 562614330f12Smrg [Compiler flag to prevent dynamic linking]) 562714330f12Smrg])# _LT_COMPILER_PIC 562895b296d0Smrg 562995b296d0Smrg 563014330f12Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 563114330f12Smrg# ---------------------------- 563214330f12Smrg# See if the linker supports building shared libraries. 563314330f12Smrgm4_defun([_LT_LINKER_SHLIBS], 563414330f12Smrg[AC_REQUIRE([LT_PATH_LD])dnl 563514330f12SmrgAC_REQUIRE([LT_PATH_NM])dnl 563614330f12Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 563714330f12Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 563814330f12Smrgm4_require([_LT_DECL_EGREP])dnl 563914330f12Smrgm4_require([_LT_DECL_SED])dnl 564014330f12Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 564114330f12Smrgm4_require([_LT_TAG_COMPILER])dnl 564214330f12SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 564314330f12Smrgm4_if([$1], [CXX], [ 564414330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 564514330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 564614330f12Smrg case $host_os in 564714330f12Smrg aix[[4-9]]*) 564814330f12Smrg # If we're using GNU nm, then we don't want the "-C" option. 564914330f12Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 565014330f12Smrg # Also, AIX nm treats weak defined symbols like other global defined 565114330f12Smrg # symbols, whereas GNU nm marks them as "W". 565214330f12Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 565314330f12Smrg _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' 56542378475aSmrg else 565514330f12Smrg _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' 56562378475aSmrg fi 565714330f12Smrg ;; 565814330f12Smrg pw32*) 565914330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 566014330f12Smrg ;; 566114330f12Smrg cygwin* | mingw* | cegcc*) 566214330f12Smrg case $cc_basename in 566314330f12Smrg cl*) ;; 566414330f12Smrg *) 566514330f12Smrg _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' 566614330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 566714330f12Smrg ;; 566814330f12Smrg esac 566914330f12Smrg ;; 567014330f12Smrg *) 567114330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 567214330f12Smrg ;; 567314330f12Smrg esac 567414330f12Smrg], [ 567514330f12Smrg runpath_var= 567614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 567714330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 567814330f12Smrg _LT_TAGVAR(archive_cmds, $1)= 567914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 568014330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 568114330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 568214330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 568314330f12Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 568414330f12Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 568514330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 568614330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 568714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 568814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 568914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 569014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 569114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 569214330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=no 569314330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 569414330f12Smrg _LT_TAGVAR(module_cmds, $1)= 569514330f12Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 569614330f12Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 569714330f12Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 569814330f12Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 569914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 570014330f12Smrg # include_expsyms should be a list of space-separated symbols to be *always* 570114330f12Smrg # included in the symbol list 570214330f12Smrg _LT_TAGVAR(include_expsyms, $1)= 570314330f12Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 570414330f12Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 570514330f12Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 570614330f12Smrg # as well as any symbol that contains `d'. 570714330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 570814330f12Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 570914330f12Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 571014330f12Smrg # the symbol is explicitly referenced. Since portable code cannot 571114330f12Smrg # rely on this symbol name, it's probably fine to never include it in 571214330f12Smrg # preloaded symbol tables. 571314330f12Smrg # Exclude shared library initialization/finalization symbols. 571414330f12Smrgdnl Note also adjust exclude_expsyms for C++ above. 571514330f12Smrg extract_expsyms_cmds= 571695b296d0Smrg 571714330f12Smrg case $host_os in 571814330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 571914330f12Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 572014330f12Smrg # When not using gcc, we currently assume that we are using 572114330f12Smrg # Microsoft Visual C++. 572214330f12Smrg if test "$GCC" != yes; then 572314330f12Smrg with_gnu_ld=no 572414330f12Smrg fi 572514330f12Smrg ;; 572614330f12Smrg interix*) 572714330f12Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 572814330f12Smrg with_gnu_ld=yes 572914330f12Smrg ;; 573014330f12Smrg openbsd*) 573114330f12Smrg with_gnu_ld=no 573214330f12Smrg ;; 573314330f12Smrg esac 57342378475aSmrg 573514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 573614330f12Smrg 573714330f12Smrg # On some targets, GNU ld is compatible enough with the native linker 573814330f12Smrg # that we're better off using the native interface for both. 573914330f12Smrg lt_use_gnu_ld_interface=no 574014330f12Smrg if test "$with_gnu_ld" = yes; then 574114330f12Smrg case $host_os in 574214330f12Smrg aix*) 574314330f12Smrg # The AIX port of GNU ld has always aspired to compatibility 574414330f12Smrg # with the native linker. However, as the warning in the GNU ld 574514330f12Smrg # block says, versions before 2.19.5* couldn't really create working 574614330f12Smrg # shared libraries, regardless of the interface used. 574714330f12Smrg case `$LD -v 2>&1` in 574814330f12Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 574914330f12Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 575014330f12Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 575114330f12Smrg *) 575214330f12Smrg lt_use_gnu_ld_interface=yes 57532378475aSmrg ;; 575414330f12Smrg esac 575514330f12Smrg ;; 575614330f12Smrg *) 575714330f12Smrg lt_use_gnu_ld_interface=yes 575814330f12Smrg ;; 575914330f12Smrg esac 576014330f12Smrg fi 576195b296d0Smrg 576214330f12Smrg if test "$lt_use_gnu_ld_interface" = yes; then 576314330f12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 576414330f12Smrg wlarc='${wl}' 576595b296d0Smrg 576614330f12Smrg # Set some defaults for GNU ld with shared library support. These 576714330f12Smrg # are reset later if shared libraries are not supported. Putting them 576814330f12Smrg # here allows them to be overridden if necessary. 576914330f12Smrg runpath_var=LD_RUN_PATH 577014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 577114330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 577214330f12Smrg # ancient GNU ld didn't support --whole-archive et. al. 577314330f12Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 577414330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 577514330f12Smrg else 577614330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 577714330f12Smrg fi 577814330f12Smrg supports_anon_versioning=no 577914330f12Smrg case `$LD -v 2>&1` in 578014330f12Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 578114330f12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 578214330f12Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 578314330f12Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 578414330f12Smrg *\ 2.11.*) ;; # other 2.11 versions 578514330f12Smrg *) supports_anon_versioning=yes ;; 578614330f12Smrg esac 57872378475aSmrg 578814330f12Smrg # See if GNU ld supports shared libraries. 578914330f12Smrg case $host_os in 579014330f12Smrg aix[[3-9]]*) 579114330f12Smrg # On AIX/PPC, the GNU linker is very broken 579214330f12Smrg if test "$host_cpu" != ia64; then 579314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 579414330f12Smrg cat <<_LT_EOF 1>&2 57952378475aSmrg 579614330f12Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 579714330f12Smrg*** to be unable to reliably create shared libraries on AIX. 579814330f12Smrg*** Therefore, libtool is disabling shared libraries support. If you 579914330f12Smrg*** really care for shared libraries, you may want to install binutils 580014330f12Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 580114330f12Smrg*** You will then need to restart the configuration process. 580295b296d0Smrg 580314330f12Smrg_LT_EOF 580414330f12Smrg fi 580514330f12Smrg ;; 58062378475aSmrg 580714330f12Smrg amigaos*) 580814330f12Smrg case $host_cpu in 580914330f12Smrg powerpc) 581014330f12Smrg # see comment about AmigaOS4 .so support 581114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 581214330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 581314330f12Smrg ;; 581414330f12Smrg m68k) 581514330f12Smrg _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)' 581614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 581714330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58182378475aSmrg ;; 581914330f12Smrg esac 582014330f12Smrg ;; 582195b296d0Smrg 582214330f12Smrg beos*) 582314330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 582414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 582514330f12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 582614330f12Smrg # support --undefined. This deserves some investigation. FIXME 582714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 582814330f12Smrg else 582914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 583014330f12Smrg fi 583114330f12Smrg ;; 583214330f12Smrg 583314330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 583414330f12Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 583514330f12Smrg # as there is no search path for DLLs. 583614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 583714330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 583814330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 583914330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 584014330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 584114330f12Smrg _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' 584214330f12Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 584314330f12Smrg 584414330f12Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 584514330f12Smrg _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' 584614330f12Smrg # If the export-symbols file already is a .def file (1st line 584714330f12Smrg # is EXPORTS), use it as is; otherwise, prepend... 584814330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 584914330f12Smrg cp $export_symbols $output_objdir/$soname.def; 58502378475aSmrg else 585114330f12Smrg echo EXPORTS > $output_objdir/$soname.def; 585214330f12Smrg cat $export_symbols >> $output_objdir/$soname.def; 585314330f12Smrg fi~ 585414330f12Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 585514330f12Smrg else 585614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 585714330f12Smrg fi 585814330f12Smrg ;; 585995b296d0Smrg 586014330f12Smrg haiku*) 586114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 586214330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 586314330f12Smrg ;; 586495b296d0Smrg 586514330f12Smrg interix[[3-9]]*) 586614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 586714330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 586814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 586914330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 587014330f12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 587114330f12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 587214330f12Smrg # default) and relocated if they conflict, which is a slow very memory 587314330f12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 587414330f12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 587514330f12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 587614330f12Smrg _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' 587714330f12Smrg _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' 587814330f12Smrg ;; 587914330f12Smrg 588014330f12Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 588114330f12Smrg tmp_diet=no 588214330f12Smrg if test "$host_os" = linux-dietlibc; then 588314330f12Smrg case $cc_basename in 588414330f12Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 588514330f12Smrg esac 588614330f12Smrg fi 588714330f12Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 588814330f12Smrg && test "$tmp_diet" = no 588914330f12Smrg then 589014330f12Smrg tmp_addflag=' $pic_flag' 589114330f12Smrg tmp_sharedflag='-shared' 589214330f12Smrg case $cc_basename,$host_cpu in 589314330f12Smrg pgcc*) # Portland Group C compiler 589414330f12Smrg _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' 589514330f12Smrg tmp_addflag=' $pic_flag' 589614330f12Smrg ;; 589714330f12Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 589814330f12Smrg # Portland Group f77 and f90 compilers 589914330f12Smrg _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' 590014330f12Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 590114330f12Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 590214330f12Smrg tmp_addflag=' -i_dynamic' ;; 590314330f12Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 590414330f12Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 590514330f12Smrg ifc* | ifort*) # Intel Fortran compiler 590614330f12Smrg tmp_addflag=' -nofor_main' ;; 590714330f12Smrg lf95*) # Lahey Fortran 8.1 590814330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 590914330f12Smrg tmp_sharedflag='--shared' ;; 591014330f12Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 591114330f12Smrg tmp_sharedflag='-qmkshrobj' 591214330f12Smrg tmp_addflag= ;; 591314330f12Smrg nvcc*) # Cuda Compiler Driver 2.2 591414330f12Smrg _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' 591514330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 591614330f12Smrg ;; 591714330f12Smrg esac 591814330f12Smrg case `$CC -V 2>&1 | sed 5q` in 591914330f12Smrg *Sun\ C*) # Sun C 5.9 592014330f12Smrg _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' 592114330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 592214330f12Smrg tmp_sharedflag='-G' ;; 592314330f12Smrg *Sun\ F*) # Sun Fortran 8.3 592414330f12Smrg tmp_sharedflag='-G' ;; 592514330f12Smrg esac 592614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 592795b296d0Smrg 592814330f12Smrg if test "x$supports_anon_versioning" = xyes; then 592914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 593014330f12Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 593114330f12Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 593214330f12Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 593314330f12Smrg fi 593495b296d0Smrg 593514330f12Smrg case $cc_basename in 593614330f12Smrg xlf* | bgf* | bgxlf* | mpixlf*) 593714330f12Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 593814330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 593914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 594014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 594114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 594214330f12Smrg if test "x$supports_anon_versioning" = xyes; then 594314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 594414330f12Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 594514330f12Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 594614330f12Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 594714330f12Smrg fi 594814330f12Smrg ;; 594914330f12Smrg esac 595014330f12Smrg else 59512378475aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 595214330f12Smrg fi 595314330f12Smrg ;; 595495b296d0Smrg 595514330f12Smrg netbsd*) 595614330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 595714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 595814330f12Smrg wlarc= 595914330f12Smrg else 596014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596114330f12Smrg _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' 596214330f12Smrg fi 596314330f12Smrg ;; 596495b296d0Smrg 596514330f12Smrg solaris*) 596614330f12Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 596714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 596814330f12Smrg cat <<_LT_EOF 1>&2 596995b296d0Smrg 597014330f12Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 597114330f12Smrg*** create shared libraries on Solaris systems. Therefore, libtool 597214330f12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 597314330f12Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 597414330f12Smrg*** your PATH or compiler configuration so that the native linker is 597514330f12Smrg*** used, and then restart. 59762378475aSmrg 597714330f12Smrg_LT_EOF 597814330f12Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 597914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 598014330f12Smrg _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' 598114330f12Smrg else 598214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 598314330f12Smrg fi 598414330f12Smrg ;; 598595b296d0Smrg 598614330f12Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 598714330f12Smrg case `$LD -v 2>&1` in 598814330f12Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 598914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 599014330f12Smrg cat <<_LT_EOF 1>&2 59912378475aSmrg 599214330f12Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 599314330f12Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 599414330f12Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 599514330f12Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 599614330f12Smrg*** your PATH or compiler configuration so that the native linker is 599714330f12Smrg*** used, and then restart. 59982378475aSmrg 599914330f12Smrg_LT_EOF 600014330f12Smrg ;; 600114330f12Smrg *) 600214330f12Smrg # For security reasons, it is highly recommended that you always 600314330f12Smrg # use absolute paths for naming shared libraries, and exclude the 600414330f12Smrg # DT_RUNPATH tag from executables and libraries. But doing so 600514330f12Smrg # requires that you compile everything twice, which is a pain. 600614330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 600714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 600814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 600914330f12Smrg _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' 601014330f12Smrg else 60112378475aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 601214330f12Smrg fi 60132378475aSmrg ;; 601414330f12Smrg esac 601514330f12Smrg ;; 601614330f12Smrg 601714330f12Smrg sunos4*) 601814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 601914330f12Smrg wlarc= 602014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 602114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 602214330f12Smrg ;; 602314330f12Smrg 602414330f12Smrg *) 602514330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 602614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 602714330f12Smrg _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' 602814330f12Smrg else 602914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 603014330f12Smrg fi 603114330f12Smrg ;; 603214330f12Smrg esac 603314330f12Smrg 603414330f12Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 603514330f12Smrg runpath_var= 603614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 603714330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 603814330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 603914330f12Smrg fi 604014330f12Smrg else 604114330f12Smrg # PORTME fill in a description of your system's linker (not GNU ld) 604214330f12Smrg case $host_os in 604314330f12Smrg aix3*) 604414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 604514330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 604614330f12Smrg _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' 604714330f12Smrg # Note: this linker hardcodes the directories in LIBPATH if there 604814330f12Smrg # are no directories specified by -L. 604914330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 605014330f12Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 605114330f12Smrg # Neither direct hardcoding nor static linking is supported with a 605214330f12Smrg # broken collect2. 605314330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 605414330f12Smrg fi 605514330f12Smrg ;; 60562378475aSmrg 605714330f12Smrg aix[[4-9]]*) 605814330f12Smrg if test "$host_cpu" = ia64; then 605914330f12Smrg # On IA64, the linker does run time linking by default, so we don't 606014330f12Smrg # have to do anything special. 606114330f12Smrg aix_use_runtimelinking=no 606214330f12Smrg exp_sym_flag='-Bexport' 606314330f12Smrg no_entry_flag="" 606414330f12Smrg else 606514330f12Smrg # If we're using GNU nm, then we don't want the "-C" option. 606614330f12Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 606714330f12Smrg # Also, AIX nm treats weak defined symbols like other global 606814330f12Smrg # defined symbols, whereas GNU nm marks them as "W". 606914330f12Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 607014330f12Smrg _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' 607114330f12Smrg else 607214330f12Smrg _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' 607314330f12Smrg fi 607414330f12Smrg aix_use_runtimelinking=no 607595b296d0Smrg 607614330f12Smrg # Test if we are trying to use run time linking or normal 607714330f12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 607814330f12Smrg # need to do runtime linking. 607914330f12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 608014330f12Smrg for ld_flag in $LDFLAGS; do 608114330f12Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 608214330f12Smrg aix_use_runtimelinking=yes 608314330f12Smrg break 608414330f12Smrg fi 608514330f12Smrg done 608614330f12Smrg ;; 608714330f12Smrg esac 60882378475aSmrg 608914330f12Smrg exp_sym_flag='-bexport' 609014330f12Smrg no_entry_flag='-bnoentry' 609114330f12Smrg fi 60922378475aSmrg 609314330f12Smrg # When large executables or shared objects are built, AIX ld can 609414330f12Smrg # have problems creating the table of contents. If linking a library 609514330f12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 609614330f12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 609714330f12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60982378475aSmrg 609914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='' 610014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 610114330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 610214330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 610314330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 610414330f12Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 610595b296d0Smrg 610614330f12Smrg if test "$GCC" = yes; then 610714330f12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 610814330f12Smrg # We only want to do this on AIX 4.2 and lower, the check 610914330f12Smrg # below for broken collect2 doesn't work under 4.3+ 611014330f12Smrg collect2name=`${CC} -print-prog-name=collect2` 611114330f12Smrg if test -f "$collect2name" && 611214330f12Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 611314330f12Smrg then 611414330f12Smrg # We have reworked collect2 611514330f12Smrg : 611614330f12Smrg else 611714330f12Smrg # We have old collect2 611814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 611914330f12Smrg # It fails to find uninstalled libraries when the uninstalled 612014330f12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 612114330f12Smrg # to unsupported forces relinking 612214330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 612314330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 612414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 612514330f12Smrg fi 612614330f12Smrg ;; 612714330f12Smrg esac 612814330f12Smrg shared_flag='-shared' 612914330f12Smrg if test "$aix_use_runtimelinking" = yes; then 613014330f12Smrg shared_flag="$shared_flag "'${wl}-G' 613114330f12Smrg fi 613214330f12Smrg else 613314330f12Smrg # not using gcc 613414330f12Smrg if test "$host_cpu" = ia64; then 613514330f12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 613614330f12Smrg # chokes on -Wl,-G. The following line is correct: 613714330f12Smrg shared_flag='-G' 613814330f12Smrg else 613914330f12Smrg if test "$aix_use_runtimelinking" = yes; then 614014330f12Smrg shared_flag='${wl}-G' 614114330f12Smrg else 614214330f12Smrg shared_flag='${wl}-bM:SRE' 614314330f12Smrg fi 614414330f12Smrg fi 614514330f12Smrg fi 614695b296d0Smrg 614714330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 614814330f12Smrg # It seems that -bexpall does not export symbols beginning with 614914330f12Smrg # underscore (_), so it is better to generate a list of symbols to export. 615014330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 615114330f12Smrg if test "$aix_use_runtimelinking" = yes; then 615214330f12Smrg # Warning - without using the other runtime loading flags (-brtl), 615314330f12Smrg # -berok will link without error, but may produce a broken library. 615414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 615514330f12Smrg # Determine the default libpath from the value encoded in an 615614330f12Smrg # empty executable. 615714330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 615814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 615914330f12Smrg _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" 616014330f12Smrg else 616114330f12Smrg if test "$host_cpu" = ia64; then 616214330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 616314330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 616414330f12Smrg _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" 616514330f12Smrg else 616614330f12Smrg # Determine the default libpath from the value encoded in an 616714330f12Smrg # empty executable. 616814330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 616914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 617014330f12Smrg # Warning - without using the other run time loading flags, 617114330f12Smrg # -berok will link without error, but may produce a broken library. 617214330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 617314330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 617414330f12Smrg if test "$with_gnu_ld" = yes; then 617514330f12Smrg # We only use this code for GNU lds that support --whole-archive. 617614330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 617714330f12Smrg else 617814330f12Smrg # Exported symbols can be pulled into shared objects from archives 617914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 618014330f12Smrg fi 618114330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 618214330f12Smrg # This is similar to how AIX traditionally builds its shared libraries. 618314330f12Smrg _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' 618414330f12Smrg fi 618514330f12Smrg fi 618614330f12Smrg ;; 618795b296d0Smrg 618814330f12Smrg amigaos*) 618914330f12Smrg case $host_cpu in 619014330f12Smrg powerpc) 619114330f12Smrg # see comment about AmigaOS4 .so support 619214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 619314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 619414330f12Smrg ;; 619514330f12Smrg m68k) 619614330f12Smrg _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)' 619714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 619814330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 619914330f12Smrg ;; 620014330f12Smrg esac 620114330f12Smrg ;; 62022378475aSmrg 620314330f12Smrg bsdi[[45]]*) 620414330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 620514330f12Smrg ;; 62062378475aSmrg 620714330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 620814330f12Smrg # When not using gcc, we currently assume that we are using 620914330f12Smrg # Microsoft Visual C++. 621014330f12Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 621114330f12Smrg # no search path for DLLs. 621214330f12Smrg case $cc_basename in 621314330f12Smrg cl*) 621414330f12Smrg # Native MSVC 621514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 621614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 621714330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 621814330f12Smrg _LT_TAGVAR(file_list_spec, $1)='@' 621914330f12Smrg # Tell ltmain to make .lib files, not .a files. 622014330f12Smrg libext=lib 622114330f12Smrg # Tell ltmain to make .dll files, not .so files. 622214330f12Smrg shrext_cmds=".dll" 622314330f12Smrg # FIXME: Setting linknames here is a bad hack. 622414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 622514330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 622614330f12Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 622714330f12Smrg else 622814330f12Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 622914330f12Smrg fi~ 623014330f12Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 623114330f12Smrg linknames=' 623214330f12Smrg # The linker will not automatically build a static lib if we build a DLL. 623314330f12Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 623414330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 623514330f12Smrg _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' 623614330f12Smrg # Don't use ranlib 623714330f12Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 623814330f12Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 623914330f12Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 624014330f12Smrg case $lt_outputfile in 624114330f12Smrg *.exe|*.EXE) ;; 624214330f12Smrg *) 624314330f12Smrg lt_outputfile="$lt_outputfile.exe" 624414330f12Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62452378475aSmrg ;; 624614330f12Smrg esac~ 624714330f12Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 624814330f12Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 624914330f12Smrg $RM "$lt_outputfile.manifest"; 625014330f12Smrg fi' 62512378475aSmrg ;; 625214330f12Smrg *) 625314330f12Smrg # Assume MSVC wrapper 625414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 625514330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 625614330f12Smrg # Tell ltmain to make .lib files, not .a files. 625714330f12Smrg libext=lib 625814330f12Smrg # Tell ltmain to make .dll files, not .so files. 625914330f12Smrg shrext_cmds=".dll" 626014330f12Smrg # FIXME: Setting linknames here is a bad hack. 626114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 626214330f12Smrg # The linker will automatically build a .lib file if we build a DLL. 626314330f12Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 626414330f12Smrg # FIXME: Should let the user specify the lib program. 626514330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 626614330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62672378475aSmrg ;; 626814330f12Smrg esac 626914330f12Smrg ;; 627095b296d0Smrg 627114330f12Smrg darwin* | rhapsody*) 627214330f12Smrg _LT_DARWIN_LINKER_FEATURES($1) 627314330f12Smrg ;; 627495b296d0Smrg 627514330f12Smrg dgux*) 627614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 627714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 627814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 627914330f12Smrg ;; 628095b296d0Smrg 628114330f12Smrg freebsd1*) 628214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 628314330f12Smrg ;; 628495b296d0Smrg 628514330f12Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 628614330f12Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 628714330f12Smrg # does not break anything, and helps significantly (at the cost of a little 628814330f12Smrg # extra space). 628914330f12Smrg freebsd2.2*) 629014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 629114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 629214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 629314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 629414330f12Smrg ;; 629595b296d0Smrg 629614330f12Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 629714330f12Smrg freebsd2*) 629814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 629914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 630014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 630114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 630214330f12Smrg ;; 630395b296d0Smrg 630414330f12Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 630514330f12Smrg freebsd* | dragonfly*) 630614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 630714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 630814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 630914330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 631014330f12Smrg ;; 63112378475aSmrg 631214330f12Smrg hpux9*) 631314330f12Smrg if test "$GCC" = yes; then 631414330f12Smrg _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' 631514330f12Smrg else 631614330f12Smrg _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' 631714330f12Smrg fi 631814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 631914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 632014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63212378475aSmrg 632214330f12Smrg # hardcode_minus_L: Not really in the search PATH, 632314330f12Smrg # but as the default location of the library. 632414330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 632514330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 632614330f12Smrg ;; 63272378475aSmrg 632814330f12Smrg hpux10*) 632914330f12Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 633014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 633114330f12Smrg else 633214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 633314330f12Smrg fi 633414330f12Smrg if test "$with_gnu_ld" = no; then 633514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 633614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 633714330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 633814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 633914330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 634014330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 634114330f12Smrg # hardcode_minus_L: Not really in the search PATH, 634214330f12Smrg # but as the default location of the library. 634314330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 634414330f12Smrg fi 634514330f12Smrg ;; 634695b296d0Smrg 634714330f12Smrg hpux11*) 634814330f12Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 634914330f12Smrg case $host_cpu in 635014330f12Smrg hppa*64*) 635114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 635214330f12Smrg ;; 635314330f12Smrg ia64*) 635414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 635514330f12Smrg ;; 635614330f12Smrg *) 635714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 635814330f12Smrg ;; 635914330f12Smrg esac 636014330f12Smrg else 636114330f12Smrg case $host_cpu in 636214330f12Smrg hppa*64*) 636314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 636414330f12Smrg ;; 636514330f12Smrg ia64*) 636614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 636714330f12Smrg ;; 636814330f12Smrg *) 636914330f12Smrg m4_if($1, [], [ 637014330f12Smrg # Older versions of the 11.00 compiler do not understand -b yet 637114330f12Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 637214330f12Smrg _LT_LINKER_OPTION([if $CC understands -b], 637314330f12Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 637414330f12Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 637514330f12Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 637614330f12Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 637714330f12Smrg ;; 637814330f12Smrg esac 637914330f12Smrg fi 638014330f12Smrg if test "$with_gnu_ld" = no; then 638114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 638214330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 638395b296d0Smrg 638414330f12Smrg case $host_cpu in 638514330f12Smrg hppa*64*|ia64*) 638614330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 638714330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 638814330f12Smrg ;; 638914330f12Smrg *) 639014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 639114330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 639214330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63932378475aSmrg 639414330f12Smrg # hardcode_minus_L: Not really in the search PATH, 639514330f12Smrg # but as the default location of the library. 639614330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 639714330f12Smrg ;; 639814330f12Smrg esac 639914330f12Smrg fi 640014330f12Smrg ;; 64012378475aSmrg 640214330f12Smrg irix5* | irix6* | nonstopux*) 640314330f12Smrg if test "$GCC" = yes; then 640414330f12Smrg _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' 640514330f12Smrg # Try to use the -exported_symbol ld option, if it does not 640614330f12Smrg # work, assume that -exports_file does not work either and 640714330f12Smrg # implicitly export all symbols. 640814330f12Smrg # This should be the same for all languages, so no per-tag cache variable. 640914330f12Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 641014330f12Smrg [lt_cv_irix_exported_symbol], 641114330f12Smrg [save_LDFLAGS="$LDFLAGS" 641214330f12Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 641314330f12Smrg AC_LINK_IFELSE( 641414330f12Smrg [AC_LANG_SOURCE( 641514330f12Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 641614330f12Smrg [C++], [[int foo (void) { return 0; }]], 641714330f12Smrg [Fortran 77], [[ 641814330f12Smrg subroutine foo 641914330f12Smrg end]], 642014330f12Smrg [Fortran], [[ 642114330f12Smrg subroutine foo 642214330f12Smrg end]])])], 642314330f12Smrg [lt_cv_irix_exported_symbol=yes], 642414330f12Smrg [lt_cv_irix_exported_symbol=no]) 642514330f12Smrg LDFLAGS="$save_LDFLAGS"]) 642614330f12Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 642714330f12Smrg _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' 642814330f12Smrg fi 642914330f12Smrg else 643014330f12Smrg _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' 643114330f12Smrg _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' 643214330f12Smrg fi 643314330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 643414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 643514330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 643614330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 643714330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 643814330f12Smrg ;; 64392378475aSmrg 644014330f12Smrg netbsd*) 644114330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 644214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 644314330f12Smrg else 644414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 644514330f12Smrg fi 644614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 644714330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 644814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 644914330f12Smrg ;; 645095b296d0Smrg 645114330f12Smrg newsos6) 645214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 645314330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 645414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 645514330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 645614330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 645714330f12Smrg ;; 645895b296d0Smrg 645914330f12Smrg *nto* | *qnx*) 646014330f12Smrg ;; 646195b296d0Smrg 646214330f12Smrg openbsd*) 646314330f12Smrg if test -f /usr/libexec/ld.so; then 646414330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 646514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 646614330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 646714330f12Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 646814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 646914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 647014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 647114330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 647214330f12Smrg else 647314330f12Smrg case $host_os in 647414330f12Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 647514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 647614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 647714330f12Smrg ;; 647814330f12Smrg *) 647914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 648014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 648114330f12Smrg ;; 648214330f12Smrg esac 648314330f12Smrg fi 648414330f12Smrg else 648514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 648614330f12Smrg fi 648714330f12Smrg ;; 64882378475aSmrg 648914330f12Smrg os2*) 649014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 649114330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 649214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 649314330f12Smrg _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' 649414330f12Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 649514330f12Smrg ;; 649695b296d0Smrg 649714330f12Smrg osf3*) 649814330f12Smrg if test "$GCC" = yes; then 649914330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 650014330f12Smrg _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' 650114330f12Smrg else 650214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 650314330f12Smrg _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' 650414330f12Smrg fi 650514330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 650614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 650714330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 650814330f12Smrg ;; 650995b296d0Smrg 651014330f12Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 651114330f12Smrg if test "$GCC" = yes; then 651214330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 651314330f12Smrg _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' 651414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 651514330f12Smrg else 651614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 651714330f12Smrg _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' 651814330f12Smrg _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~ 651914330f12Smrg $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' 652095b296d0Smrg 652114330f12Smrg # Both c and cxx compiler support -rpath directly 652214330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 652314330f12Smrg fi 652414330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 652514330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 652614330f12Smrg ;; 65272378475aSmrg 652814330f12Smrg solaris*) 652914330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 653014330f12Smrg if test "$GCC" = yes; then 653114330f12Smrg wlarc='${wl}' 653214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 653314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 653414330f12Smrg $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' 653514330f12Smrg else 653614330f12Smrg case `$CC -V 2>&1` in 653714330f12Smrg *"Compilers 5.0"*) 653814330f12Smrg wlarc='' 653914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 654014330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 654114330f12Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 654214330f12Smrg ;; 654314330f12Smrg *) 654414330f12Smrg wlarc='${wl}' 654514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 654614330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 654714330f12Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 654814330f12Smrg ;; 654914330f12Smrg esac 655014330f12Smrg fi 655114330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 655214330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655314330f12Smrg case $host_os in 655414330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 655514330f12Smrg *) 655614330f12Smrg # The compiler driver will combine and reorder linker options, 655714330f12Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 655814330f12Smrg # but is careful enough not to reorder. 655914330f12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 656014330f12Smrg if test "$GCC" = yes; then 656114330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 656214330f12Smrg else 656314330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 656414330f12Smrg fi 656514330f12Smrg ;; 656614330f12Smrg esac 656714330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 656814330f12Smrg ;; 65692378475aSmrg 657014330f12Smrg sunos4*) 657114330f12Smrg if test "x$host_vendor" = xsequent; then 657214330f12Smrg # Use $CC to link under sequent, because it throws in some extra .o 657314330f12Smrg # files that make .init and .fini sections work. 657414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 657514330f12Smrg else 657614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 657714330f12Smrg fi 657814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 657914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 658014330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 658114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658214330f12Smrg ;; 65832378475aSmrg 658414330f12Smrg sysv4) 658514330f12Smrg case $host_vendor in 658614330f12Smrg sni) 658714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 658814330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 658914330f12Smrg ;; 659014330f12Smrg siemens) 659114330f12Smrg ## LD is ld it makes a PLAMLIB 659214330f12Smrg ## CC just makes a GrossModule. 659314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 659414330f12Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 659514330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65962378475aSmrg ;; 659714330f12Smrg motorola) 659814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 659914330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 660014330f12Smrg ;; 660114330f12Smrg esac 660214330f12Smrg runpath_var='LD_RUN_PATH' 660314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660414330f12Smrg ;; 660514330f12Smrg 660614330f12Smrg sysv4.3*) 660714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 660814330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660914330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 661014330f12Smrg ;; 661114330f12Smrg 661214330f12Smrg sysv4*MP*) 661314330f12Smrg if test -d /usr/nec; then 661414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 661514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 661614330f12Smrg runpath_var=LD_RUN_PATH 661714330f12Smrg hardcode_runpath_var=yes 661814330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 661914330f12Smrg fi 662014330f12Smrg ;; 662195b296d0Smrg 66222378475aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66232378475aSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66242378475aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66252378475aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66262378475aSmrg runpath_var='LD_RUN_PATH' 662795b296d0Smrg 662814330f12Smrg if test "$GCC" = yes; then 662914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 663014330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 663114330f12Smrg else 663214330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 663314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 663414330f12Smrg fi 66352378475aSmrg ;; 663695b296d0Smrg 663714330f12Smrg sysv5* | sco3.2v5* | sco5v6*) 663814330f12Smrg # Note: We can NOT use -z defs as we might desire, because we do not 663914330f12Smrg # link with -lc, and that would cause any symbols used from libc to 664014330f12Smrg # always be unresolved, which means just about no library would 664114330f12Smrg # ever link correctly. If we're not using GNU ld we use -z text 664214330f12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 664314330f12Smrg # as -z defs. 664414330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 664514330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 664614330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 664714330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 664814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 664914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 665014330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 665114330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 665214330f12Smrg runpath_var='LD_RUN_PATH' 665395b296d0Smrg 665414330f12Smrg if test "$GCC" = yes; then 665514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 665614330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 665714330f12Smrg else 665814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 665914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 666014330f12Smrg fi 66612378475aSmrg ;; 666295b296d0Smrg 666314330f12Smrg uts4*) 666414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 666514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 666614330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 666714330f12Smrg ;; 666895b296d0Smrg 666914330f12Smrg *) 667014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 667114330f12Smrg ;; 66722378475aSmrg esac 667395b296d0Smrg 667414330f12Smrg if test x$host_vendor = xsni; then 667514330f12Smrg case $host in 667614330f12Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 667714330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 667814330f12Smrg ;; 667914330f12Smrg esac 668014330f12Smrg fi 668114330f12Smrg fi 668214330f12Smrg]) 668314330f12SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 668414330f12Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 668595b296d0Smrg 668614330f12Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 668795b296d0Smrg 668814330f12Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 668914330f12Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 669014330f12Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 669114330f12Smrg [The commands to extract the exported symbol list from a shared archive]) 669239713583Smrg 669314330f12Smrg# 669414330f12Smrg# Do we need to explicitly link libc? 669514330f12Smrg# 669614330f12Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 669714330f12Smrgx|xyes) 669814330f12Smrg # Assume -lc should be added 669914330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 670039713583Smrg 670114330f12Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 670214330f12Smrg case $_LT_TAGVAR(archive_cmds, $1) in 670314330f12Smrg *'~'*) 670414330f12Smrg # FIXME: we may have to deal with multi-command sequences. 670514330f12Smrg ;; 670614330f12Smrg '$CC '*) 670714330f12Smrg # Test whether the compiler implicitly links with -lc since on some 670814330f12Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 670914330f12Smrg # to ld, don't add -lc before -lgcc. 671014330f12Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 671114330f12Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 671214330f12Smrg [$RM conftest* 671314330f12Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 671414330f12Smrg 671514330f12Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 671614330f12Smrg soname=conftest 671714330f12Smrg lib=conftest 671814330f12Smrg libobjs=conftest.$ac_objext 671914330f12Smrg deplibs= 672014330f12Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 672114330f12Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 672214330f12Smrg compiler_flags=-v 672314330f12Smrg linker_flags=-v 672414330f12Smrg verstring= 672514330f12Smrg output_objdir=. 672614330f12Smrg libname=conftest 672714330f12Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 672814330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 672914330f12Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 673014330f12Smrg then 673114330f12Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 673214330f12Smrg else 673314330f12Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 673414330f12Smrg fi 673514330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 673614330f12Smrg else 673714330f12Smrg cat conftest.err 1>&5 673814330f12Smrg fi 673914330f12Smrg $RM conftest* 674014330f12Smrg ]) 674114330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 674214330f12Smrg ;; 674314330f12Smrg esac 674414330f12Smrg fi 674514330f12Smrg ;; 674614330f12Smrgesac 674739713583Smrg 674814330f12Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 674914330f12Smrg [Whether or not to add -lc for building shared libraries]) 675014330f12Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 675114330f12Smrg [enable_shared_with_static_runtimes], [0], 675214330f12Smrg [Whether or not to disallow shared libs when runtime libs are static]) 675314330f12Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 675414330f12Smrg [Compiler flag to allow reflexive dlopens]) 675514330f12Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 675614330f12Smrg [Compiler flag to generate shared objects directly from archives]) 675714330f12Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 675814330f12Smrg [Whether the compiler copes with passing no objects directly]) 675914330f12Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 676014330f12Smrg [Create an old-style archive from a shared archive]) 676114330f12Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 676214330f12Smrg [Create a temporary old-style archive to link instead of a shared archive]) 676314330f12Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 676414330f12Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 676514330f12Smrg_LT_TAGDECL([], [module_cmds], [2], 676614330f12Smrg [Commands used to build a loadable module if different from building 676714330f12Smrg a shared archive.]) 676814330f12Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 676914330f12Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 677014330f12Smrg [Whether we are building with GNU ld or not]) 677114330f12Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 677214330f12Smrg [Flag that allows shared libraries with undefined symbols to be built]) 677314330f12Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 677414330f12Smrg [Flag that enforces no undefined symbols]) 677514330f12Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 677614330f12Smrg [Flag to hardcode $libdir into a binary during linking. 677714330f12Smrg This must work even if $libdir does not exist]) 677814330f12Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 677914330f12Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 678014330f12Smrg during linking. This must work even if $libdir does not exist]]) 678114330f12Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 678214330f12Smrg [Whether we need a single "-rpath" flag with a separated argument]) 678314330f12Smrg_LT_TAGDECL([], [hardcode_direct], [0], 678414330f12Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 678514330f12Smrg DIR into the resulting binary]) 678614330f12Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 678714330f12Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 678814330f12Smrg DIR into the resulting binary and the resulting library dependency is 678914330f12Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 679014330f12Smrg library is relocated]) 679114330f12Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 679214330f12Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 679314330f12Smrg into the resulting binary]) 679414330f12Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 679514330f12Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 679614330f12Smrg into the resulting binary]) 679714330f12Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 679814330f12Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 679914330f12Smrg into the library and all subsequent libraries and executables linked 680014330f12Smrg against it]) 680114330f12Smrg_LT_TAGDECL([], [inherit_rpath], [0], 680214330f12Smrg [Set to yes if linker adds runtime paths of dependent libraries 680314330f12Smrg to runtime path list]) 680414330f12Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 680514330f12Smrg [Whether libtool must link a program against all its dependency libraries]) 680614330f12Smrg_LT_TAGDECL([], [always_export_symbols], [0], 680714330f12Smrg [Set to "yes" if exported symbols are required]) 680814330f12Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 680914330f12Smrg [The commands to list exported symbols]) 681014330f12Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 681114330f12Smrg [Symbols that should not be listed in the preloaded symbols]) 681214330f12Smrg_LT_TAGDECL([], [include_expsyms], [1], 681314330f12Smrg [Symbols that must always be exported]) 681414330f12Smrg_LT_TAGDECL([], [prelink_cmds], [2], 681514330f12Smrg [Commands necessary for linking programs (against libraries) with templates]) 681614330f12Smrg_LT_TAGDECL([], [postlink_cmds], [2], 681714330f12Smrg [Commands necessary for finishing linking programs]) 681814330f12Smrg_LT_TAGDECL([], [file_list_spec], [1], 681914330f12Smrg [Specify filename containing input files]) 682014330f12Smrgdnl FIXME: Not yet implemented 682114330f12Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 682214330f12Smrgdnl [Compiler flag to generate thread safe objects]) 682314330f12Smrg])# _LT_LINKER_SHLIBS 682439713583Smrg 682539713583Smrg 682614330f12Smrg# _LT_LANG_C_CONFIG([TAG]) 682714330f12Smrg# ------------------------ 682814330f12Smrg# Ensure that the configuration variables for a C compiler are suitably 682914330f12Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 683014330f12Smrg# the compiler configuration to `libtool'. 683114330f12Smrgm4_defun([_LT_LANG_C_CONFIG], 683214330f12Smrg[m4_require([_LT_DECL_EGREP])dnl 683314330f12Smrglt_save_CC="$CC" 683414330f12SmrgAC_LANG_PUSH(C) 683539713583Smrg 683614330f12Smrg# Source file extension for C test sources. 683714330f12Smrgac_ext=c 683839713583Smrg 683914330f12Smrg# Object file extension for compiled C test sources. 684014330f12Smrgobjext=o 684114330f12Smrg_LT_TAGVAR(objext, $1)=$objext 684295b296d0Smrg 684314330f12Smrg# Code to be used in simple compile tests 684414330f12Smrglt_simple_compile_test_code="int some_variable = 0;" 684595b296d0Smrg 684614330f12Smrg# Code to be used in simple link tests 684714330f12Smrglt_simple_link_test_code='int main(){return(0);}' 684839713583Smrg 684914330f12Smrg_LT_TAG_COMPILER 685014330f12Smrg# Save the default compiler, since it gets overwritten when the other 685114330f12Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 685214330f12Smrgcompiler_DEFAULT=$CC 685339713583Smrg 685414330f12Smrg# save warnings/boilerplate of simple test code 685514330f12Smrg_LT_COMPILER_BOILERPLATE 685614330f12Smrg_LT_LINKER_BOILERPLATE 685739713583Smrg 685814330f12Smrgif test -n "$compiler"; then 685914330f12Smrg _LT_COMPILER_NO_RTTI($1) 686014330f12Smrg _LT_COMPILER_PIC($1) 686114330f12Smrg _LT_COMPILER_C_O($1) 686214330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 686314330f12Smrg _LT_LINKER_SHLIBS($1) 686414330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 686514330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 686614330f12Smrg LT_SYS_DLOPEN_SELF 686714330f12Smrg _LT_CMD_STRIPLIB 686839713583Smrg 686914330f12Smrg # Report which library types will actually be built 687014330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 687114330f12Smrg AC_MSG_RESULT([$can_build_shared]) 687239713583Smrg 687314330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 687414330f12Smrg test "$can_build_shared" = "no" && enable_shared=no 687539713583Smrg 687614330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 687714330f12Smrg # are all built from PIC. 687814330f12Smrg case $host_os in 687914330f12Smrg aix3*) 688014330f12Smrg test "$enable_shared" = yes && enable_static=no 688114330f12Smrg if test -n "$RANLIB"; then 688214330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 688314330f12Smrg postinstall_cmds='$RANLIB $lib' 68842378475aSmrg fi 68852378475aSmrg ;; 688639713583Smrg 688714330f12Smrg aix[[4-9]]*) 688814330f12Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 688914330f12Smrg test "$enable_shared" = yes && enable_static=no 68902378475aSmrg fi 68912378475aSmrg ;; 68922378475aSmrg esac 689314330f12Smrg AC_MSG_RESULT([$enable_shared]) 68942378475aSmrg 689514330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 689614330f12Smrg # Make sure either enable_shared or enable_static is yes. 689714330f12Smrg test "$enable_shared" = yes || enable_static=yes 689814330f12Smrg AC_MSG_RESULT([$enable_static]) 68992378475aSmrg 690014330f12Smrg _LT_CONFIG($1) 69012378475aSmrgfi 690214330f12SmrgAC_LANG_POP 690314330f12SmrgCC="$lt_save_CC" 690414330f12Smrg])# _LT_LANG_C_CONFIG 690539713583Smrg 690639713583Smrg 690714330f12Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69082378475aSmrg# -------------------------- 690914330f12Smrg# Ensure that the configuration variables for a C++ compiler are suitably 691014330f12Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 691114330f12Smrg# the compiler configuration to `libtool'. 691214330f12Smrgm4_defun([_LT_LANG_CXX_CONFIG], 691314330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 691414330f12Smrgm4_require([_LT_DECL_EGREP])dnl 691514330f12Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 691614330f12Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 691714330f12Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 691814330f12Smrg (test "X$CXX" != "Xg++"))) ; then 691914330f12Smrg AC_PROG_CXXCPP 692014330f12Smrgelse 692114330f12Smrg _lt_caught_CXX_error=yes 692214330f12Smrgfi 692395b296d0Smrg 692414330f12SmrgAC_LANG_PUSH(C++) 69252378475aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69262378475aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 69272378475aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 69282378475aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 692914330f12Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69302378475aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69312378475aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 69322378475aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69332378475aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69342378475aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 69352378475aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69362378475aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 693714330f12Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69382378475aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 69392378475aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 69402378475aSmrg_LT_TAGVAR(module_cmds, $1)= 69412378475aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 69422378475aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69432378475aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 694414330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 694514330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69462378475aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 69472378475aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69482378475aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 694939713583Smrg 695014330f12Smrg# Source file extension for C++ test sources. 695114330f12Smrgac_ext=cpp 695239713583Smrg 695314330f12Smrg# Object file extension for compiled C++ test sources. 69542378475aSmrgobjext=o 69552378475aSmrg_LT_TAGVAR(objext, $1)=$objext 69562378475aSmrg 69572378475aSmrg# No sense in running all these tests if we already determined that 695814330f12Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 69592378475aSmrg# are currently assumed to apply to all compilers on this platform, 69602378475aSmrg# and will be corrupted by setting them based on a non-working compiler. 696114330f12Smrgif test "$_lt_caught_CXX_error" != yes; then 69622378475aSmrg # Code to be used in simple compile tests 696314330f12Smrg lt_simple_compile_test_code="int some_variable = 0;" 696439713583Smrg 69652378475aSmrg # Code to be used in simple link tests 696614330f12Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 696739713583Smrg 69682378475aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 69692378475aSmrg _LT_TAG_COMPILER 697039713583Smrg 69712378475aSmrg # save warnings/boilerplate of simple test code 69722378475aSmrg _LT_COMPILER_BOILERPLATE 69732378475aSmrg _LT_LINKER_BOILERPLATE 697439713583Smrg 69752378475aSmrg # Allow CC to be a program name with arguments. 697614330f12Smrg lt_save_CC=$CC 697714330f12Smrg lt_save_CFLAGS=$CFLAGS 697814330f12Smrg lt_save_LD=$LD 69792378475aSmrg lt_save_GCC=$GCC 698014330f12Smrg GCC=$GXX 698114330f12Smrg lt_save_with_gnu_ld=$with_gnu_ld 698214330f12Smrg lt_save_path_LD=$lt_cv_path_LD 698314330f12Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 698414330f12Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 698514330f12Smrg else 698614330f12Smrg $as_unset lt_cv_prog_gnu_ld 698714330f12Smrg fi 698814330f12Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 698914330f12Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 699014330f12Smrg else 699114330f12Smrg $as_unset lt_cv_path_LD 699214330f12Smrg fi 699314330f12Smrg test -z "${LDCXX+set}" || LD=$LDCXX 699414330f12Smrg CC=${CXX-"c++"} 699514330f12Smrg CFLAGS=$CXXFLAGS 69962378475aSmrg compiler=$CC 69972378475aSmrg _LT_TAGVAR(compiler, $1)=$CC 69982378475aSmrg _LT_CC_BASENAME([$compiler]) 699995b296d0Smrg 700014330f12Smrg if test -n "$compiler"; then 700114330f12Smrg # We don't want -fno-exception when compiling C++ code, so set the 700214330f12Smrg # no_builtin_flag separately 700314330f12Smrg if test "$GXX" = yes; then 700414330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 700514330f12Smrg else 700614330f12Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 700714330f12Smrg fi 70082378475aSmrg 700914330f12Smrg if test "$GXX" = yes; then 701014330f12Smrg # Set up default GNU C++ configuration 70112378475aSmrg 701214330f12Smrg LT_PATH_LD 701395b296d0Smrg 701414330f12Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 701514330f12Smrg # archiving commands below assume that GNU ld is being used. 701614330f12Smrg if test "$with_gnu_ld" = yes; then 701714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 701814330f12Smrg _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' 701995b296d0Smrg 702014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 702114330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 702295b296d0Smrg 702314330f12Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 702414330f12Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 702514330f12Smrg # investigate it a little bit more. (MM) 702614330f12Smrg wlarc='${wl}' 70272378475aSmrg 702814330f12Smrg # ancient GNU ld didn't support --whole-archive et. al. 702914330f12Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 703014330f12Smrg $GREP 'no-whole-archive' > /dev/null; then 703114330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 703214330f12Smrg else 703314330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 703414330f12Smrg fi 703514330f12Smrg else 703614330f12Smrg with_gnu_ld=no 703714330f12Smrg wlarc= 70382378475aSmrg 703914330f12Smrg # A generic and very simple default shared library creation 704014330f12Smrg # command for GNU C++ for the case where it uses the native 704114330f12Smrg # linker, instead of GNU ld. If possible, this setting should 704214330f12Smrg # overridden to take advantage of the native linker features on 704314330f12Smrg # the platform it is being used on. 704414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 704514330f12Smrg fi 70462378475aSmrg 704714330f12Smrg # Commands to make compiler produce verbose output that lists 704814330f12Smrg # what "hidden" libraries, object files and flags are used when 704914330f12Smrg # linking a shared library. 705014330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70512378475aSmrg 705214330f12Smrg else 705314330f12Smrg GXX=no 705414330f12Smrg with_gnu_ld=no 705514330f12Smrg wlarc= 705614330f12Smrg fi 70572378475aSmrg 705814330f12Smrg # PORTME: fill in a description of your system's C++ link characteristics 705914330f12Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 706014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 706114330f12Smrg case $host_os in 706214330f12Smrg aix3*) 706314330f12Smrg # FIXME: insert proper C++ library support 706414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 706514330f12Smrg ;; 706614330f12Smrg aix[[4-9]]*) 706714330f12Smrg if test "$host_cpu" = ia64; then 706814330f12Smrg # On IA64, the linker does run time linking by default, so we don't 706914330f12Smrg # have to do anything special. 707014330f12Smrg aix_use_runtimelinking=no 707114330f12Smrg exp_sym_flag='-Bexport' 707214330f12Smrg no_entry_flag="" 707314330f12Smrg else 707414330f12Smrg aix_use_runtimelinking=no 70752378475aSmrg 707614330f12Smrg # Test if we are trying to use run time linking or normal 707714330f12Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 707814330f12Smrg # need to do runtime linking. 707914330f12Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 708014330f12Smrg for ld_flag in $LDFLAGS; do 708114330f12Smrg case $ld_flag in 708214330f12Smrg *-brtl*) 708314330f12Smrg aix_use_runtimelinking=yes 708414330f12Smrg break 708514330f12Smrg ;; 708614330f12Smrg esac 708714330f12Smrg done 708814330f12Smrg ;; 708914330f12Smrg esac 709095b296d0Smrg 709114330f12Smrg exp_sym_flag='-bexport' 709214330f12Smrg no_entry_flag='-bnoentry' 709314330f12Smrg fi 70942378475aSmrg 709514330f12Smrg # When large executables or shared objects are built, AIX ld can 709614330f12Smrg # have problems creating the table of contents. If linking a library 709714330f12Smrg # or program results in "error TOC overflow" add -mminimal-toc to 709814330f12Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 709914330f12Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71002378475aSmrg 710114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='' 710214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 710314330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 710414330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 710514330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 710614330f12Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71072378475aSmrg 710814330f12Smrg if test "$GXX" = yes; then 710914330f12Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 711014330f12Smrg # We only want to do this on AIX 4.2 and lower, the check 711114330f12Smrg # below for broken collect2 doesn't work under 4.3+ 711214330f12Smrg collect2name=`${CC} -print-prog-name=collect2` 711314330f12Smrg if test -f "$collect2name" && 711414330f12Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 711514330f12Smrg then 711614330f12Smrg # We have reworked collect2 711714330f12Smrg : 711814330f12Smrg else 711914330f12Smrg # We have old collect2 712014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 712114330f12Smrg # It fails to find uninstalled libraries when the uninstalled 712214330f12Smrg # path is not listed in the libpath. Setting hardcode_minus_L 712314330f12Smrg # to unsupported forces relinking 712414330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 712514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 712614330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 712714330f12Smrg fi 712814330f12Smrg esac 712914330f12Smrg shared_flag='-shared' 713014330f12Smrg if test "$aix_use_runtimelinking" = yes; then 713114330f12Smrg shared_flag="$shared_flag "'${wl}-G' 713214330f12Smrg fi 713314330f12Smrg else 713414330f12Smrg # not using gcc 713514330f12Smrg if test "$host_cpu" = ia64; then 713614330f12Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 713714330f12Smrg # chokes on -Wl,-G. The following line is correct: 713814330f12Smrg shared_flag='-G' 713914330f12Smrg else 714014330f12Smrg if test "$aix_use_runtimelinking" = yes; then 714114330f12Smrg shared_flag='${wl}-G' 714214330f12Smrg else 714314330f12Smrg shared_flag='${wl}-bM:SRE' 714414330f12Smrg fi 714514330f12Smrg fi 714614330f12Smrg fi 71472378475aSmrg 714814330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 714914330f12Smrg # It seems that -bexpall does not export symbols beginning with 715014330f12Smrg # underscore (_), so it is better to generate a list of symbols to 715114330f12Smrg # export. 715214330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 715314330f12Smrg if test "$aix_use_runtimelinking" = yes; then 715414330f12Smrg # Warning - without using the other runtime loading flags (-brtl), 715514330f12Smrg # -berok will link without error, but may produce a broken library. 715614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 715714330f12Smrg # Determine the default libpath from the value encoded in an empty 715814330f12Smrg # executable. 715914330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 716014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71612378475aSmrg 716214330f12Smrg _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" 716314330f12Smrg else 716414330f12Smrg if test "$host_cpu" = ia64; then 716514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 716614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 716714330f12Smrg _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" 716814330f12Smrg else 716914330f12Smrg # Determine the default libpath from the value encoded in an 717014330f12Smrg # empty executable. 717114330f12Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 717214330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 717314330f12Smrg # Warning - without using the other run time loading flags, 717414330f12Smrg # -berok will link without error, but may produce a broken library. 717514330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 717614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 717714330f12Smrg if test "$with_gnu_ld" = yes; then 717814330f12Smrg # We only use this code for GNU lds that support --whole-archive. 717914330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 718014330f12Smrg else 718114330f12Smrg # Exported symbols can be pulled into shared objects from archives 718214330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 718314330f12Smrg fi 718414330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 718514330f12Smrg # This is similar to how AIX traditionally builds its shared 718614330f12Smrg # libraries. 718714330f12Smrg _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' 718814330f12Smrg fi 71892378475aSmrg fi 71902378475aSmrg ;; 71912378475aSmrg 719214330f12Smrg beos*) 719314330f12Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 719414330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 719514330f12Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 719614330f12Smrg # support --undefined. This deserves some investigation. FIXME 719714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 719814330f12Smrg else 719914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 720014330f12Smrg fi 720114330f12Smrg ;; 72022378475aSmrg 720314330f12Smrg chorus*) 720414330f12Smrg case $cc_basename in 720514330f12Smrg *) 720614330f12Smrg # FIXME: insert proper C++ library support 720714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 720814330f12Smrg ;; 720914330f12Smrg esac 721014330f12Smrg ;; 72112378475aSmrg 721214330f12Smrg cygwin* | mingw* | pw32* | cegcc*) 721314330f12Smrg case $GXX,$cc_basename in 721414330f12Smrg ,cl* | no,cl*) 721514330f12Smrg # Native MSVC 721614330f12Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 721714330f12Smrg # no search path for DLLs. 721814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 721914330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 722014330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 722114330f12Smrg _LT_TAGVAR(file_list_spec, $1)='@' 722214330f12Smrg # Tell ltmain to make .lib files, not .a files. 722314330f12Smrg libext=lib 722414330f12Smrg # Tell ltmain to make .dll files, not .so files. 722514330f12Smrg shrext_cmds=".dll" 722614330f12Smrg # FIXME: Setting linknames here is a bad hack. 722714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 722814330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 722914330f12Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 723014330f12Smrg else 723114330f12Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 723214330f12Smrg fi~ 723314330f12Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 723414330f12Smrg linknames=' 723514330f12Smrg # The linker will not automatically build a static lib if we build a DLL. 723614330f12Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 723714330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 723814330f12Smrg # Don't use ranlib 723914330f12Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 724014330f12Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 724114330f12Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 724214330f12Smrg case $lt_outputfile in 724314330f12Smrg *.exe|*.EXE) ;; 724414330f12Smrg *) 724514330f12Smrg lt_outputfile="$lt_outputfile.exe" 724614330f12Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 724714330f12Smrg ;; 724814330f12Smrg esac~ 724914330f12Smrg func_to_tool_file "$lt_outputfile"~ 725014330f12Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 725114330f12Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 725214330f12Smrg $RM "$lt_outputfile.manifest"; 725314330f12Smrg fi' 725414330f12Smrg ;; 725514330f12Smrg *) 725614330f12Smrg # g++ 725714330f12Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 725814330f12Smrg # as there is no search path for DLLs. 725914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 726014330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 726114330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 726214330f12Smrg _LT_TAGVAR(always_export_symbols, $1)=no 726314330f12Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 726414330f12Smrg 726514330f12Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 726614330f12Smrg _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' 726714330f12Smrg # If the export-symbols file already is a .def file (1st line 726814330f12Smrg # is EXPORTS), use it as is; otherwise, prepend... 726914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 727014330f12Smrg cp $export_symbols $output_objdir/$soname.def; 727114330f12Smrg else 727214330f12Smrg echo EXPORTS > $output_objdir/$soname.def; 727314330f12Smrg cat $export_symbols >> $output_objdir/$soname.def; 727414330f12Smrg fi~ 727514330f12Smrg $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' 727614330f12Smrg else 727714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 727814330f12Smrg fi 727914330f12Smrg ;; 728014330f12Smrg esac 728114330f12Smrg ;; 728214330f12Smrg darwin* | rhapsody*) 728314330f12Smrg _LT_DARWIN_LINKER_FEATURES($1) 728414330f12Smrg ;; 72852378475aSmrg 728614330f12Smrg dgux*) 728714330f12Smrg case $cc_basename in 728814330f12Smrg ec++*) 728914330f12Smrg # FIXME: insert proper C++ library support 729014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729114330f12Smrg ;; 729214330f12Smrg ghcx*) 729314330f12Smrg # Green Hills C++ Compiler 729414330f12Smrg # FIXME: insert proper C++ library support 729514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729614330f12Smrg ;; 729714330f12Smrg *) 729814330f12Smrg # FIXME: insert proper C++ library support 729914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 730014330f12Smrg ;; 730114330f12Smrg esac 730214330f12Smrg ;; 730339713583Smrg 730414330f12Smrg freebsd[[12]]*) 730514330f12Smrg # C++ shared libraries reported to be fairly broken before 730614330f12Smrg # switch to ELF 730714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 730814330f12Smrg ;; 730939713583Smrg 731014330f12Smrg freebsd-elf*) 731114330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 731214330f12Smrg ;; 731339713583Smrg 731414330f12Smrg freebsd* | dragonfly*) 731514330f12Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 731614330f12Smrg # conventions 731714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 731814330f12Smrg ;; 731939713583Smrg 732014330f12Smrg gnu*) 732114330f12Smrg ;; 732239713583Smrg 732314330f12Smrg haiku*) 732414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 732514330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 732614330f12Smrg ;; 732739713583Smrg 732814330f12Smrg hpux9*) 732914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 733014330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 733114330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 733214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 733314330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 733414330f12Smrg # but as the default 733514330f12Smrg # location of the library. 733639713583Smrg 733714330f12Smrg case $cc_basename in 733814330f12Smrg CC*) 733914330f12Smrg # FIXME: insert proper C++ library support 734014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 734114330f12Smrg ;; 734214330f12Smrg aCC*) 734314330f12Smrg _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' 734414330f12Smrg # Commands to make compiler produce verbose output that lists 734514330f12Smrg # what "hidden" libraries, object files and flags are used when 734614330f12Smrg # linking a shared library. 734714330f12Smrg # 734814330f12Smrg # There doesn't appear to be a way to prevent this compiler from 734914330f12Smrg # explicitly linking system object files so we need to strip them 735014330f12Smrg # from the output so that they don't get included in the library 735114330f12Smrg # dependencies. 735214330f12Smrg 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"' 735314330f12Smrg ;; 735414330f12Smrg *) 735514330f12Smrg if test "$GXX" = yes; then 735614330f12Smrg _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' 735714330f12Smrg else 735814330f12Smrg # FIXME: insert proper C++ library support 735914330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 736014330f12Smrg fi 736114330f12Smrg ;; 736214330f12Smrg esac 736314330f12Smrg ;; 736439713583Smrg 736514330f12Smrg hpux10*|hpux11*) 736614330f12Smrg if test $with_gnu_ld = no; then 736714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 736814330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 736939713583Smrg 737014330f12Smrg case $host_cpu in 737114330f12Smrg hppa*64*|ia64*) 737214330f12Smrg ;; 737314330f12Smrg *) 737414330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 737514330f12Smrg ;; 737614330f12Smrg esac 737714330f12Smrg fi 737814330f12Smrg case $host_cpu in 737914330f12Smrg hppa*64*|ia64*) 738014330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 738114330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 738214330f12Smrg ;; 738314330f12Smrg *) 738414330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 738514330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 738614330f12Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 738714330f12Smrg # but as the default 738814330f12Smrg # location of the library. 738914330f12Smrg ;; 739014330f12Smrg esac 739195b296d0Smrg 739214330f12Smrg case $cc_basename in 739314330f12Smrg CC*) 739414330f12Smrg # FIXME: insert proper C++ library support 739514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739614330f12Smrg ;; 739714330f12Smrg aCC*) 739814330f12Smrg case $host_cpu in 739914330f12Smrg hppa*64*) 740014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 740114330f12Smrg ;; 740214330f12Smrg ia64*) 740314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 740414330f12Smrg ;; 740514330f12Smrg *) 740614330f12Smrg _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' 740714330f12Smrg ;; 740814330f12Smrg esac 740914330f12Smrg # Commands to make compiler produce verbose output that lists 741014330f12Smrg # what "hidden" libraries, object files and flags are used when 741114330f12Smrg # linking a shared library. 741214330f12Smrg # 741314330f12Smrg # There doesn't appear to be a way to prevent this compiler from 741414330f12Smrg # explicitly linking system object files so we need to strip them 741514330f12Smrg # from the output so that they don't get included in the library 741614330f12Smrg # dependencies. 741714330f12Smrg 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"' 741814330f12Smrg ;; 741914330f12Smrg *) 742014330f12Smrg if test "$GXX" = yes; then 742114330f12Smrg if test $with_gnu_ld = no; then 742214330f12Smrg case $host_cpu in 742314330f12Smrg hppa*64*) 742414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 742514330f12Smrg ;; 742614330f12Smrg ia64*) 742714330f12Smrg _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' 742814330f12Smrg ;; 742914330f12Smrg *) 743014330f12Smrg _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' 743114330f12Smrg ;; 743214330f12Smrg esac 743314330f12Smrg fi 743414330f12Smrg else 743514330f12Smrg # FIXME: insert proper C++ library support 743614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 743714330f12Smrg fi 743814330f12Smrg ;; 743914330f12Smrg esac 744014330f12Smrg ;; 744195b296d0Smrg 744214330f12Smrg interix[[3-9]]*) 744314330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=no 744414330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 744514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 744614330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 744714330f12Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 744814330f12Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 744914330f12Smrg # default) and relocated if they conflict, which is a slow very memory 745014330f12Smrg # consuming and fragmenting process. To avoid this, we pick a random, 745114330f12Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 745214330f12Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 745314330f12Smrg _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' 745414330f12Smrg _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' 745514330f12Smrg ;; 745614330f12Smrg irix5* | irix6*) 745714330f12Smrg case $cc_basename in 745814330f12Smrg CC*) 745914330f12Smrg # SGI C++ 746014330f12Smrg _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' 746195b296d0Smrg 746214330f12Smrg # Archives containing C++ object files must be created using 746314330f12Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 746414330f12Smrg # necessary to make sure instantiated templates are included 746514330f12Smrg # in the archive. 746614330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 746714330f12Smrg ;; 746814330f12Smrg *) 746914330f12Smrg if test "$GXX" = yes; then 747014330f12Smrg if test "$with_gnu_ld" = no; then 747114330f12Smrg _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' 747214330f12Smrg else 747314330f12Smrg _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' 747414330f12Smrg fi 747514330f12Smrg fi 747614330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 747714330f12Smrg ;; 747814330f12Smrg esac 747914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 748014330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 748114330f12Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 748214330f12Smrg ;; 748395b296d0Smrg 748414330f12Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 748514330f12Smrg case $cc_basename in 748614330f12Smrg KCC*) 748714330f12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 748895b296d0Smrg 748914330f12Smrg # KCC will only create a shared library if the output file 749014330f12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 749114330f12Smrg # to its proper name (with version) after linking. 749214330f12Smrg _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' 749314330f12Smrg _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' 749414330f12Smrg # Commands to make compiler produce verbose output that lists 749514330f12Smrg # what "hidden" libraries, object files and flags are used when 749614330f12Smrg # linking a shared library. 749714330f12Smrg # 749814330f12Smrg # There doesn't appear to be a way to prevent this compiler from 749914330f12Smrg # explicitly linking system object files so we need to strip them 750014330f12Smrg # from the output so that they don't get included in the library 750114330f12Smrg # dependencies. 750214330f12Smrg 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"' 750395b296d0Smrg 750414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 750514330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 750695b296d0Smrg 750714330f12Smrg # Archives containing C++ object files must be created using 750814330f12Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 750914330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 751014330f12Smrg ;; 751114330f12Smrg icpc* | ecpc* ) 751214330f12Smrg # Intel C++ 751314330f12Smrg with_gnu_ld=yes 751414330f12Smrg # version 8.0 and above of icpc choke on multiply defined symbols 751514330f12Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 751614330f12Smrg # earlier do not add the objects themselves. 751714330f12Smrg case `$CC -V 2>&1` in 751814330f12Smrg *"Version 7."*) 751914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 752014330f12Smrg _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' 752114330f12Smrg ;; 752214330f12Smrg *) # Version 8.0 or newer 752314330f12Smrg tmp_idyn= 752414330f12Smrg case $host_cpu in 752514330f12Smrg ia64*) tmp_idyn=' -i_dynamic';; 752614330f12Smrg esac 752714330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 752814330f12Smrg _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' 752914330f12Smrg ;; 753014330f12Smrg esac 753114330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 753214330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 753314330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 753414330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 753514330f12Smrg ;; 753614330f12Smrg pgCC* | pgcpp*) 753714330f12Smrg # Portland Group C++ compiler 753814330f12Smrg case `$CC -V` in 753914330f12Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 754014330f12Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 754114330f12Smrg rm -rf $tpldir~ 754214330f12Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 754314330f12Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 754414330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 754514330f12Smrg rm -rf $tpldir~ 754614330f12Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 754714330f12Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 754814330f12Smrg $RANLIB $oldlib' 754914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 755014330f12Smrg rm -rf $tpldir~ 755114330f12Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 755214330f12Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 755314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 755414330f12Smrg rm -rf $tpldir~ 755514330f12Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 755614330f12Smrg $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' 755714330f12Smrg ;; 755814330f12Smrg *) # Version 6 and above use weak symbols 755914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 756014330f12Smrg _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' 756114330f12Smrg ;; 756214330f12Smrg esac 756395b296d0Smrg 756414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 756514330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 756614330f12Smrg _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' 756714330f12Smrg ;; 756814330f12Smrg cxx*) 756914330f12Smrg # Compaq C++ 757014330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 757114330f12Smrg _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' 7572ff89ac2bSmrg 757314330f12Smrg runpath_var=LD_RUN_PATH 757414330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 757514330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75762378475aSmrg 757714330f12Smrg # Commands to make compiler produce verbose output that lists 757814330f12Smrg # what "hidden" libraries, object files and flags are used when 757914330f12Smrg # linking a shared library. 758014330f12Smrg # 758114330f12Smrg # There doesn't appear to be a way to prevent this compiler from 758214330f12Smrg # explicitly linking system object files so we need to strip them 758314330f12Smrg # from the output so that they don't get included in the library 758414330f12Smrg # dependencies. 758514330f12Smrg 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' 758614330f12Smrg ;; 758714330f12Smrg xl* | mpixl* | bgxl*) 758814330f12Smrg # IBM XL 8.0 on PPC, with GNU ld 758914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 759014330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 759114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 759214330f12Smrg if test "x$supports_anon_versioning" = xyes; then 759314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 759414330f12Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 759514330f12Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 759614330f12Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 759714330f12Smrg fi 759814330f12Smrg ;; 759914330f12Smrg *) 760014330f12Smrg case `$CC -V 2>&1 | sed 5q` in 760114330f12Smrg *Sun\ C*) 760214330f12Smrg # Sun C++ 5.9 760314330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 760414330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 760514330f12Smrg _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' 760614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 760714330f12Smrg _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' 760814330f12Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76092378475aSmrg 761014330f12Smrg # Not sure whether something based on 761114330f12Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 761214330f12Smrg # would be better. 761314330f12Smrg output_verbose_link_cmd='func_echo_all' 76142378475aSmrg 761514330f12Smrg # Archives containing C++ object files must be created using 761614330f12Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 761714330f12Smrg # necessary to make sure instantiated templates are included 761814330f12Smrg # in the archive. 761914330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 762014330f12Smrg ;; 762114330f12Smrg esac 762214330f12Smrg ;; 762314330f12Smrg esac 762414330f12Smrg ;; 76252378475aSmrg 762614330f12Smrg lynxos*) 762714330f12Smrg # FIXME: insert proper C++ library support 762814330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 762914330f12Smrg ;; 76302378475aSmrg 763114330f12Smrg m88k*) 763214330f12Smrg # FIXME: insert proper C++ library support 763314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 763414330f12Smrg ;; 76352378475aSmrg 763614330f12Smrg mvs*) 763714330f12Smrg case $cc_basename in 763814330f12Smrg cxx*) 763914330f12Smrg # FIXME: insert proper C++ library support 764014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764114330f12Smrg ;; 764214330f12Smrg *) 764314330f12Smrg # FIXME: insert proper C++ library support 764414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764514330f12Smrg ;; 764614330f12Smrg esac 764714330f12Smrg ;; 76482378475aSmrg 764914330f12Smrg netbsd*) 765014330f12Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 765114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 765214330f12Smrg wlarc= 765314330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 765414330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 765514330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 765614330f12Smrg fi 765714330f12Smrg # Workaround some broken pre-1.5 toolchains 765814330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 765914330f12Smrg ;; 76602378475aSmrg 766114330f12Smrg *nto* | *qnx*) 766214330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 766314330f12Smrg ;; 76642378475aSmrg 766514330f12Smrg openbsd2*) 766614330f12Smrg # C++ shared libraries are fairly broken 766714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 766814330f12Smrg ;; 76692378475aSmrg 767014330f12Smrg openbsd*) 767114330f12Smrg if test -f /usr/libexec/ld.so; then 767214330f12Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 767314330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 767414330f12Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 767514330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 767614330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 767714330f12Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 767814330f12Smrg _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' 767914330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 768014330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 768114330f12Smrg fi 768214330f12Smrg output_verbose_link_cmd=func_echo_all 768314330f12Smrg else 768414330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 768514330f12Smrg fi 768614330f12Smrg ;; 76872378475aSmrg 768814330f12Smrg osf3* | osf4* | osf5*) 768914330f12Smrg case $cc_basename in 769014330f12Smrg KCC*) 769114330f12Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 76922378475aSmrg 769314330f12Smrg # KCC will only create a shared library if the output file 769414330f12Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 769514330f12Smrg # to its proper name (with version) after linking. 769614330f12Smrg _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' 76972378475aSmrg 769814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 769914330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77002378475aSmrg 770114330f12Smrg # Archives containing C++ object files must be created using 770214330f12Smrg # the KAI C++ compiler. 770314330f12Smrg case $host in 770414330f12Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 770514330f12Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 770614330f12Smrg esac 770714330f12Smrg ;; 770814330f12Smrg RCC*) 770914330f12Smrg # Rational C++ 2.4.1 771014330f12Smrg # FIXME: insert proper C++ library support 771114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771214330f12Smrg ;; 771314330f12Smrg cxx*) 771414330f12Smrg case $host in 771514330f12Smrg osf3*) 771614330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 771714330f12Smrg _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' 771814330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 771914330f12Smrg ;; 772014330f12Smrg *) 772114330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 772214330f12Smrg _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' 772314330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 772414330f12Smrg echo "-hidden">> $lib.exp~ 772514330f12Smrg $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~ 772614330f12Smrg $RM $lib.exp' 772714330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 772814330f12Smrg ;; 772914330f12Smrg esac 77302378475aSmrg 773114330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77322378475aSmrg 773314330f12Smrg # Commands to make compiler produce verbose output that lists 773414330f12Smrg # what "hidden" libraries, object files and flags are used when 773514330f12Smrg # linking a shared library. 773614330f12Smrg # 773714330f12Smrg # There doesn't appear to be a way to prevent this compiler from 773814330f12Smrg # explicitly linking system object files so we need to strip them 773914330f12Smrg # from the output so that they don't get included in the library 774014330f12Smrg # dependencies. 774114330f12Smrg 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"' 774214330f12Smrg ;; 774314330f12Smrg *) 774414330f12Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 774514330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 774614330f12Smrg case $host in 774714330f12Smrg osf3*) 774814330f12Smrg _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' 774914330f12Smrg ;; 775014330f12Smrg *) 775114330f12Smrg _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' 775214330f12Smrg ;; 775314330f12Smrg esac 77542378475aSmrg 775514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 775614330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77572378475aSmrg 775814330f12Smrg # Commands to make compiler produce verbose output that lists 775914330f12Smrg # what "hidden" libraries, object files and flags are used when 776014330f12Smrg # linking a shared library. 776114330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77622378475aSmrg 776314330f12Smrg else 776414330f12Smrg # FIXME: insert proper C++ library support 776514330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 776614330f12Smrg fi 776714330f12Smrg ;; 776814330f12Smrg esac 776914330f12Smrg ;; 77702378475aSmrg 777114330f12Smrg psos*) 777214330f12Smrg # FIXME: insert proper C++ library support 777314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 777414330f12Smrg ;; 77752378475aSmrg 777614330f12Smrg sunos4*) 777714330f12Smrg case $cc_basename in 777814330f12Smrg CC*) 777914330f12Smrg # Sun C++ 4.x 778014330f12Smrg # FIXME: insert proper C++ library support 778114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 778214330f12Smrg ;; 778314330f12Smrg lcc*) 778414330f12Smrg # Lucid 778514330f12Smrg # FIXME: insert proper C++ library support 778614330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 778714330f12Smrg ;; 778814330f12Smrg *) 778914330f12Smrg # FIXME: insert proper C++ library support 779014330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 779114330f12Smrg ;; 779214330f12Smrg esac 779314330f12Smrg ;; 77942378475aSmrg 779514330f12Smrg solaris*) 779614330f12Smrg case $cc_basename in 779714330f12Smrg CC* | sunCC*) 779814330f12Smrg # Sun C++ 4.2, 5.x and Centerline C++ 779914330f12Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 780014330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 780114330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 780214330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 780314330f12Smrg $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' 78042378475aSmrg 780514330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 780614330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 780714330f12Smrg case $host_os in 780814330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 780914330f12Smrg *) 781014330f12Smrg # The compiler driver will combine and reorder linker options, 781114330f12Smrg # but understands `-z linker_flag'. 781214330f12Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 781314330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 781414330f12Smrg ;; 781514330f12Smrg esac 781614330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78172378475aSmrg 781814330f12Smrg output_verbose_link_cmd='func_echo_all' 78192378475aSmrg 782014330f12Smrg # Archives containing C++ object files must be created using 782114330f12Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 782214330f12Smrg # necessary to make sure instantiated templates are included 782314330f12Smrg # in the archive. 782414330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 782514330f12Smrg ;; 782614330f12Smrg gcx*) 782714330f12Smrg # Green Hills C++ Compiler 782814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78292378475aSmrg 783014330f12Smrg # The C++ compiler must be used to create the archive. 783114330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 783214330f12Smrg ;; 783314330f12Smrg *) 783414330f12Smrg # GNU C++ compiler with Solaris linker 783514330f12Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 783614330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 783714330f12Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 783814330f12Smrg _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' 783914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 784014330f12Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78412378475aSmrg 784214330f12Smrg # Commands to make compiler produce verbose output that lists 784314330f12Smrg # what "hidden" libraries, object files and flags are used when 784414330f12Smrg # linking a shared library. 784514330f12Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 784614330f12Smrg else 784714330f12Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 784814330f12Smrg # platform. 784914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 785014330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 785114330f12Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78522378475aSmrg 785314330f12Smrg # Commands to make compiler produce verbose output that lists 785414330f12Smrg # what "hidden" libraries, object files and flags are used when 785514330f12Smrg # linking a shared library. 785614330f12Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 785714330f12Smrg fi 78582378475aSmrg 785914330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 786014330f12Smrg case $host_os in 786114330f12Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 786214330f12Smrg *) 786314330f12Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 786414330f12Smrg ;; 786514330f12Smrg esac 786614330f12Smrg fi 786714330f12Smrg ;; 786814330f12Smrg esac 786914330f12Smrg ;; 78702378475aSmrg 787114330f12Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 787214330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 787314330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 787414330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 787514330f12Smrg runpath_var='LD_RUN_PATH' 78762378475aSmrg 787714330f12Smrg case $cc_basename in 787814330f12Smrg CC*) 787914330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788014330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788114330f12Smrg ;; 788214330f12Smrg *) 788314330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788414330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788514330f12Smrg ;; 788614330f12Smrg esac 788714330f12Smrg ;; 78882378475aSmrg 788914330f12Smrg sysv5* | sco3.2v5* | sco5v6*) 789014330f12Smrg # Note: We can NOT use -z defs as we might desire, because we do not 789114330f12Smrg # link with -lc, and that would cause any symbols used from libc to 789214330f12Smrg # always be unresolved, which means just about no library would 789314330f12Smrg # ever link correctly. If we're not using GNU ld we use -z text 789414330f12Smrg # though, which does catch some bad symbols but isn't as heavy-handed 789514330f12Smrg # as -z defs. 789614330f12Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 789714330f12Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 789814330f12Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 789914330f12Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 790014330f12Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 790114330f12Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 790214330f12Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 790314330f12Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 790414330f12Smrg runpath_var='LD_RUN_PATH' 790595b296d0Smrg 790614330f12Smrg case $cc_basename in 790714330f12Smrg CC*) 790814330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 790914330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791014330f12Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 791114330f12Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 791214330f12Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 791314330f12Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 791414330f12Smrg ;; 791514330f12Smrg *) 791614330f12Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791714330f12Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791814330f12Smrg ;; 791914330f12Smrg esac 792014330f12Smrg ;; 792195b296d0Smrg 792214330f12Smrg tandem*) 792314330f12Smrg case $cc_basename in 792414330f12Smrg NCC*) 792514330f12Smrg # NonStop-UX NCC 3.20 792614330f12Smrg # FIXME: insert proper C++ library support 792714330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 792814330f12Smrg ;; 792914330f12Smrg *) 793014330f12Smrg # FIXME: insert proper C++ library support 793114330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 793214330f12Smrg ;; 793314330f12Smrg esac 793414330f12Smrg ;; 793595b296d0Smrg 793614330f12Smrg vxworks*) 793714330f12Smrg # FIXME: insert proper C++ library support 793814330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 793914330f12Smrg ;; 794095b296d0Smrg 794114330f12Smrg *) 794214330f12Smrg # FIXME: insert proper C++ library support 794314330f12Smrg _LT_TAGVAR(ld_shlibs, $1)=no 794414330f12Smrg ;; 794514330f12Smrg esac 794695b296d0Smrg 794714330f12Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 794814330f12Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 794995b296d0Smrg 795014330f12Smrg _LT_TAGVAR(GCC, $1)="$GXX" 795114330f12Smrg _LT_TAGVAR(LD, $1)="$LD" 795295b296d0Smrg 795314330f12Smrg ## CAVEAT EMPTOR: 795414330f12Smrg ## There is no encapsulation within the following macros, do not change 795514330f12Smrg ## the running order or otherwise move them around unless you know exactly 795614330f12Smrg ## what you are doing... 795714330f12Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 795814330f12Smrg _LT_COMPILER_PIC($1) 795914330f12Smrg _LT_COMPILER_C_O($1) 796014330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 796114330f12Smrg _LT_LINKER_SHLIBS($1) 796214330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 796314330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 796495b296d0Smrg 796514330f12Smrg _LT_CONFIG($1) 796614330f12Smrg fi # test -n "$compiler" 796795b296d0Smrg 796814330f12Smrg CC=$lt_save_CC 796914330f12Smrg CFLAGS=$lt_save_CFLAGS 797014330f12Smrg LDCXX=$LD 797114330f12Smrg LD=$lt_save_LD 797214330f12Smrg GCC=$lt_save_GCC 797314330f12Smrg with_gnu_ld=$lt_save_with_gnu_ld 797414330f12Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 797514330f12Smrg lt_cv_path_LD=$lt_save_path_LD 797614330f12Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 797714330f12Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 797814330f12Smrgfi # test "$_lt_caught_CXX_error" != yes 797939713583Smrg 798014330f12SmrgAC_LANG_POP 798114330f12Smrg])# _LT_LANG_CXX_CONFIG 798239713583Smrg 79832378475aSmrg 798414330f12Smrg# _LT_FUNC_STRIPNAME_CNF 798514330f12Smrg# ---------------------- 798614330f12Smrg# func_stripname_cnf prefix suffix name 79872378475aSmrg# strip PREFIX and SUFFIX off of NAME. 79882378475aSmrg# PREFIX and SUFFIX must not contain globbing or regex special 79892378475aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 79902378475aSmrg# dot (in which case that matches only a dot). 799114330f12Smrg# 799214330f12Smrg# This function is identical to the (non-XSI) version of func_stripname, 799314330f12Smrg# except this one can be used by m4 code that may be executed by configure, 799414330f12Smrg# rather than the libtool script. 799514330f12Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 799614330f12SmrgAC_REQUIRE([_LT_DECL_SED]) 799714330f12SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 799814330f12Smrgfunc_stripname_cnf () 79992378475aSmrg{ 80002378475aSmrg case ${2} in 800114330f12Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 800214330f12Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 800395b296d0Smrg esac 800414330f12Smrg} # func_stripname_cnf 800514330f12Smrg])# _LT_FUNC_STRIPNAME_CNF 800695b296d0Smrg 800714330f12Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 800814330f12Smrg# --------------------------------- 800914330f12Smrg# Figure out "hidden" library dependencies from verbose 801014330f12Smrg# compiler output when linking a shared library. 801114330f12Smrg# Parse the compiler output and extract the necessary 801214330f12Smrg# objects, libraries and library flags. 801314330f12Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 801414330f12Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 801514330f12SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 801614330f12Smrg# Dependencies to place before and after the object being linked: 801714330f12Smrg_LT_TAGVAR(predep_objects, $1)= 801814330f12Smrg_LT_TAGVAR(postdep_objects, $1)= 801914330f12Smrg_LT_TAGVAR(predeps, $1)= 802014330f12Smrg_LT_TAGVAR(postdeps, $1)= 802114330f12Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 802295b296d0Smrg 802314330f12Smrgdnl we can't use the lt_simple_compile_test_code here, 802414330f12Smrgdnl because it contains code intended for an executable, 802514330f12Smrgdnl not a library. It's possible we should let each 802614330f12Smrgdnl tag define a new lt_????_link_test_code variable, 802714330f12Smrgdnl but it's only used here... 802814330f12Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 802914330f12Smrgint a; 803014330f12Smrgvoid foo (void) { a = 0; } 80312378475aSmrg_LT_EOF 803214330f12Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 803314330f12Smrgclass Foo 80342378475aSmrg{ 803514330f12Smrgpublic: 803614330f12Smrg Foo (void) { a = 0; } 803714330f12Smrgprivate: 803814330f12Smrg int a; 803914330f12Smrg}; 80402378475aSmrg_LT_EOF 804114330f12Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 804214330f12Smrg subroutine foo 804314330f12Smrg implicit none 804414330f12Smrg integer*4 a 804514330f12Smrg a=0 804614330f12Smrg return 804714330f12Smrg end 804814330f12Smrg_LT_EOF 804914330f12Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 805014330f12Smrg subroutine foo 805114330f12Smrg implicit none 805214330f12Smrg integer a 805314330f12Smrg a=0 805414330f12Smrg return 805514330f12Smrg end 805614330f12Smrg_LT_EOF 805714330f12Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 805814330f12Smrgpublic class foo { 805914330f12Smrg private int a; 806014330f12Smrg public void bar (void) { 806114330f12Smrg a = 0; 806214330f12Smrg } 806314330f12Smrg}; 80642378475aSmrg_LT_EOF 80652378475aSmrg]) 806695b296d0Smrg 806714330f12Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 806814330f12Smrgcase "$CC $CFLAGS " in #( 806914330f12Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 807014330f12Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 807114330f12Smrgesac 807295b296d0Smrg 807314330f12Smrgdnl Parse the compiler output and extract the necessary 807414330f12Smrgdnl objects, libraries and library flags. 807514330f12Smrgif AC_TRY_EVAL(ac_compile); then 807614330f12Smrg # Parse the compiler output and extract the necessary 807714330f12Smrg # objects, libraries and library flags. 807895b296d0Smrg 807914330f12Smrg # Sentinel used to keep track of whether or not we are before 808014330f12Smrg # the conftest object file. 808114330f12Smrg pre_test_object_deps_done=no 808295b296d0Smrg 808314330f12Smrg for p in `eval "$output_verbose_link_cmd"`; do 808414330f12Smrg case ${prev}${p} in 80852378475aSmrg 808614330f12Smrg -L* | -R* | -l*) 808714330f12Smrg # Some compilers place space between "-{L,R}" and the path. 808814330f12Smrg # Remove the space. 808914330f12Smrg if test $p = "-L" || 809014330f12Smrg test $p = "-R"; then 809114330f12Smrg prev=$p 809214330f12Smrg continue 809314330f12Smrg fi 80942378475aSmrg 809514330f12Smrg # Expand the sysroot to ease extracting the directories later. 809614330f12Smrg if test -z "$prev"; then 809714330f12Smrg case $p in 809814330f12Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 809914330f12Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 810014330f12Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 810114330f12Smrg esac 810214330f12Smrg fi 810314330f12Smrg case $p in 810414330f12Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 810514330f12Smrg esac 810614330f12Smrg if test "$pre_test_object_deps_done" = no; then 810714330f12Smrg case ${prev} in 810814330f12Smrg -L | -R) 810914330f12Smrg # Internal compiler library paths should come after those 811014330f12Smrg # provided the user. The postdeps already come after the 811114330f12Smrg # user supplied libs so there is no need to process them. 811214330f12Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 811314330f12Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 811414330f12Smrg else 811514330f12Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 811614330f12Smrg fi 811714330f12Smrg ;; 811814330f12Smrg # The "-l" case would never come before the object being 811914330f12Smrg # linked, so don't bother handling this case. 812014330f12Smrg esac 812114330f12Smrg else 812214330f12Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 812314330f12Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 812414330f12Smrg else 812514330f12Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 812614330f12Smrg fi 812714330f12Smrg fi 812814330f12Smrg prev= 812914330f12Smrg ;; 81302378475aSmrg 813114330f12Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 813214330f12Smrg *.$objext) 813314330f12Smrg # This assumes that the test object file only shows up 813414330f12Smrg # once in the compiler output. 813514330f12Smrg if test "$p" = "conftest.$objext"; then 813614330f12Smrg pre_test_object_deps_done=yes 813714330f12Smrg continue 813814330f12Smrg fi 81392378475aSmrg 814014330f12Smrg if test "$pre_test_object_deps_done" = no; then 814114330f12Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 814214330f12Smrg _LT_TAGVAR(predep_objects, $1)="$p" 814314330f12Smrg else 814414330f12Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 814514330f12Smrg fi 814614330f12Smrg else 814714330f12Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 814814330f12Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 814914330f12Smrg else 815014330f12Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 815114330f12Smrg fi 815214330f12Smrg fi 815314330f12Smrg ;; 81542378475aSmrg 815514330f12Smrg *) ;; # Ignore the rest. 815695b296d0Smrg 815714330f12Smrg esac 815814330f12Smrg done 81592378475aSmrg 816014330f12Smrg # Clean up. 816114330f12Smrg rm -f a.out a.exe 816214330f12Smrgelse 816314330f12Smrg echo "libtool.m4: error: problem compiling $1 test program" 816414330f12Smrgfi 816595b296d0Smrg 816614330f12Smrg$RM -f confest.$objext 816714330f12SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 816895b296d0Smrg 816914330f12Smrg# PORTME: override above test on systems where it is broken 817014330f12Smrgm4_if([$1], [CXX], 817114330f12Smrg[case $host_os in 817214330f12Smrginterix[[3-9]]*) 817314330f12Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 817414330f12Smrg # hack all around it, let's just trust "g++" to DTRT. 817514330f12Smrg _LT_TAGVAR(predep_objects,$1)= 817614330f12Smrg _LT_TAGVAR(postdep_objects,$1)= 817714330f12Smrg _LT_TAGVAR(postdeps,$1)= 817814330f12Smrg ;; 817995b296d0Smrg 818014330f12Smrglinux*) 818114330f12Smrg case `$CC -V 2>&1 | sed 5q` in 818214330f12Smrg *Sun\ C*) 818314330f12Smrg # Sun C++ 5.9 818495b296d0Smrg 818514330f12Smrg # The more standards-conforming stlport4 library is 818614330f12Smrg # incompatible with the Cstd library. Avoid specifying 818714330f12Smrg # it if it's in CXXFLAGS. Ignore libCrun as 818814330f12Smrg # -library=stlport4 depends on it. 818914330f12Smrg case " $CXX $CXXFLAGS " in 819014330f12Smrg *" -library=stlport4 "*) 819114330f12Smrg solaris_use_stlport4=yes 819214330f12Smrg ;; 819314330f12Smrg esac 819495b296d0Smrg 819514330f12Smrg if test "$solaris_use_stlport4" != yes; then 819614330f12Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 819714330f12Smrg fi 819814330f12Smrg ;; 819914330f12Smrg esac 820014330f12Smrg ;; 820139713583Smrg 820214330f12Smrgsolaris*) 820314330f12Smrg case $cc_basename in 820414330f12Smrg CC* | sunCC*) 820514330f12Smrg # The more standards-conforming stlport4 library is 820614330f12Smrg # incompatible with the Cstd library. Avoid specifying 820714330f12Smrg # it if it's in CXXFLAGS. Ignore libCrun as 820814330f12Smrg # -library=stlport4 depends on it. 820914330f12Smrg case " $CXX $CXXFLAGS " in 821014330f12Smrg *" -library=stlport4 "*) 821114330f12Smrg solaris_use_stlport4=yes 821214330f12Smrg ;; 821314330f12Smrg esac 821439713583Smrg 821514330f12Smrg # Adding this requires a known-good setup of shared libraries for 821614330f12Smrg # Sun compiler versions before 5.6, else PIC objects from an old 821714330f12Smrg # archive will be linked into the output, leading to subtle bugs. 821814330f12Smrg if test "$solaris_use_stlport4" != yes; then 821914330f12Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 822014330f12Smrg fi 822114330f12Smrg ;; 822214330f12Smrg esac 822314330f12Smrg ;; 822414330f12Smrgesac 82252378475aSmrg]) 822639713583Smrg 822714330f12Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 822814330f12Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 822914330f12Smrgesac 823014330f12Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 823114330f12Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 823214330f12Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 823314330f12Smrgfi 823414330f12Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 823514330f12Smrg [The directories searched by this compiler when creating a shared library]) 823614330f12Smrg_LT_TAGDECL([], [predep_objects], [1], 823714330f12Smrg [Dependencies to place before and after the objects being linked to 823814330f12Smrg create a shared library]) 823914330f12Smrg_LT_TAGDECL([], [postdep_objects], [1]) 824014330f12Smrg_LT_TAGDECL([], [predeps], [1]) 824114330f12Smrg_LT_TAGDECL([], [postdeps], [1]) 824214330f12Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 824314330f12Smrg [The library search path used internally by the compiler when linking 824414330f12Smrg a shared library]) 824514330f12Smrg])# _LT_SYS_HIDDEN_LIBDEPS 824639713583Smrg 824795b296d0Smrg 824814330f12Smrg# _LT_LANG_F77_CONFIG([TAG]) 824914330f12Smrg# -------------------------- 825014330f12Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 825114330f12Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 825214330f12Smrg# to write the compiler configuration to `libtool'. 825314330f12Smrgm4_defun([_LT_LANG_F77_CONFIG], 825414330f12Smrg[AC_LANG_PUSH(Fortran 77) 825514330f12Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 825614330f12Smrg _lt_disable_F77=yes 825714330f12Smrgfi 825895b296d0Smrg 825914330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 826014330f12Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 826114330f12Smrg_LT_TAGVAR(always_export_symbols, $1)=no 826214330f12Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 826314330f12Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 826414330f12Smrg_LT_TAGVAR(hardcode_direct, $1)=no 826514330f12Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 826614330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 826714330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 826814330f12Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 826914330f12Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 827014330f12Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 827114330f12Smrg_LT_TAGVAR(inherit_rpath, $1)=no 827214330f12Smrg_LT_TAGVAR(module_cmds, $1)= 827314330f12Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 827414330f12Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 827514330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 827614330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 827714330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 827814330f12Smrg_LT_TAGVAR(no_undefined_flag, $1)= 827914330f12Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 828014330f12Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 828195b296d0Smrg 828214330f12Smrg# Source file extension for f77 test sources. 828314330f12Smrgac_ext=f 828495b296d0Smrg 828514330f12Smrg# Object file extension for compiled f77 test sources. 828614330f12Smrgobjext=o 828714330f12Smrg_LT_TAGVAR(objext, $1)=$objext 828895b296d0Smrg 828914330f12Smrg# No sense in running all these tests if we already determined that 829014330f12Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 829114330f12Smrg# are currently assumed to apply to all compilers on this platform, 829214330f12Smrg# and will be corrupted by setting them based on a non-working compiler. 829314330f12Smrgif test "$_lt_disable_F77" != yes; then 829414330f12Smrg # Code to be used in simple compile tests 829514330f12Smrg lt_simple_compile_test_code="\ 829614330f12Smrg subroutine t 829714330f12Smrg return 829814330f12Smrg end 829914330f12Smrg" 830095b296d0Smrg 830114330f12Smrg # Code to be used in simple link tests 830214330f12Smrg lt_simple_link_test_code="\ 830314330f12Smrg program t 830414330f12Smrg end 830514330f12Smrg" 830695b296d0Smrg 830714330f12Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 830814330f12Smrg _LT_TAG_COMPILER 830995b296d0Smrg 831014330f12Smrg # save warnings/boilerplate of simple test code 831114330f12Smrg _LT_COMPILER_BOILERPLATE 831214330f12Smrg _LT_LINKER_BOILERPLATE 831395b296d0Smrg 831414330f12Smrg # Allow CC to be a program name with arguments. 831514330f12Smrg lt_save_CC="$CC" 831614330f12Smrg lt_save_GCC=$GCC 831714330f12Smrg lt_save_CFLAGS=$CFLAGS 831814330f12Smrg CC=${F77-"f77"} 831914330f12Smrg CFLAGS=$FFLAGS 832014330f12Smrg compiler=$CC 832114330f12Smrg _LT_TAGVAR(compiler, $1)=$CC 832214330f12Smrg _LT_CC_BASENAME([$compiler]) 832314330f12Smrg GCC=$G77 832414330f12Smrg if test -n "$compiler"; then 832514330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 832614330f12Smrg AC_MSG_RESULT([$can_build_shared]) 83272378475aSmrg 832814330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 832914330f12Smrg test "$can_build_shared" = "no" && enable_shared=no 833014330f12Smrg 833114330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 833214330f12Smrg # are all built from PIC. 833314330f12Smrg case $host_os in 833414330f12Smrg aix3*) 833514330f12Smrg test "$enable_shared" = yes && enable_static=no 833614330f12Smrg if test -n "$RANLIB"; then 833714330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 833814330f12Smrg postinstall_cmds='$RANLIB $lib' 833914330f12Smrg fi 834014330f12Smrg ;; 834114330f12Smrg aix[[4-9]]*) 834214330f12Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 834314330f12Smrg test "$enable_shared" = yes && enable_static=no 83442378475aSmrg fi 834514330f12Smrg ;; 834614330f12Smrg esac 834714330f12Smrg AC_MSG_RESULT([$enable_shared]) 834895b296d0Smrg 834914330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 835014330f12Smrg # Make sure either enable_shared or enable_static is yes. 835114330f12Smrg test "$enable_shared" = yes || enable_static=yes 835214330f12Smrg AC_MSG_RESULT([$enable_static]) 835395b296d0Smrg 835414330f12Smrg _LT_TAGVAR(GCC, $1)="$G77" 835514330f12Smrg _LT_TAGVAR(LD, $1)="$LD" 835695b296d0Smrg 835714330f12Smrg ## CAVEAT EMPTOR: 835814330f12Smrg ## There is no encapsulation within the following macros, do not change 835914330f12Smrg ## the running order or otherwise move them around unless you know exactly 836014330f12Smrg ## what you are doing... 836114330f12Smrg _LT_COMPILER_PIC($1) 836214330f12Smrg _LT_COMPILER_C_O($1) 836314330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 836414330f12Smrg _LT_LINKER_SHLIBS($1) 836514330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 836614330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 836714330f12Smrg 836814330f12Smrg _LT_CONFIG($1) 836914330f12Smrg fi # test -n "$compiler" 837014330f12Smrg 837114330f12Smrg GCC=$lt_save_GCC 837214330f12Smrg CC="$lt_save_CC" 837314330f12Smrg CFLAGS="$lt_save_CFLAGS" 837414330f12Smrgfi # test "$_lt_disable_F77" != yes 837514330f12Smrg 837614330f12SmrgAC_LANG_POP 837714330f12Smrg])# _LT_LANG_F77_CONFIG 83782378475aSmrg 837995b296d0Smrg 838014330f12Smrg# _LT_LANG_FC_CONFIG([TAG]) 838114330f12Smrg# ------------------------- 838214330f12Smrg# Ensure that the configuration variables for a Fortran compiler are 838314330f12Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 838414330f12Smrg# to write the compiler configuration to `libtool'. 838514330f12Smrgm4_defun([_LT_LANG_FC_CONFIG], 838614330f12Smrg[AC_LANG_PUSH(Fortran) 838795b296d0Smrg 838814330f12Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 838914330f12Smrg _lt_disable_FC=yes 839014330f12Smrgfi 839195b296d0Smrg 839214330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 839314330f12Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 839414330f12Smrg_LT_TAGVAR(always_export_symbols, $1)=no 839514330f12Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 839614330f12Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 839714330f12Smrg_LT_TAGVAR(hardcode_direct, $1)=no 839814330f12Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 839914330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 840014330f12Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 840114330f12Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 840214330f12Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 840314330f12Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 840414330f12Smrg_LT_TAGVAR(inherit_rpath, $1)=no 840514330f12Smrg_LT_TAGVAR(module_cmds, $1)= 840614330f12Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 840714330f12Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 840814330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 840914330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 841014330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 841114330f12Smrg_LT_TAGVAR(no_undefined_flag, $1)= 841214330f12Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 841314330f12Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 841495b296d0Smrg 841514330f12Smrg# Source file extension for fc test sources. 841614330f12Smrgac_ext=${ac_fc_srcext-f} 841795b296d0Smrg 841814330f12Smrg# Object file extension for compiled fc test sources. 841914330f12Smrgobjext=o 842014330f12Smrg_LT_TAGVAR(objext, $1)=$objext 842195b296d0Smrg 842214330f12Smrg# No sense in running all these tests if we already determined that 842314330f12Smrg# the FC compiler isn't working. Some variables (like enable_shared) 842414330f12Smrg# are currently assumed to apply to all compilers on this platform, 842514330f12Smrg# and will be corrupted by setting them based on a non-working compiler. 842614330f12Smrgif test "$_lt_disable_FC" != yes; then 842714330f12Smrg # Code to be used in simple compile tests 842814330f12Smrg lt_simple_compile_test_code="\ 842914330f12Smrg subroutine t 843014330f12Smrg return 843114330f12Smrg end 843214330f12Smrg" 843395b296d0Smrg 843414330f12Smrg # Code to be used in simple link tests 843514330f12Smrg lt_simple_link_test_code="\ 843614330f12Smrg program t 843714330f12Smrg end 843814330f12Smrg" 843995b296d0Smrg 844014330f12Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 844114330f12Smrg _LT_TAG_COMPILER 844295b296d0Smrg 844314330f12Smrg # save warnings/boilerplate of simple test code 844414330f12Smrg _LT_COMPILER_BOILERPLATE 844514330f12Smrg _LT_LINKER_BOILERPLATE 844695b296d0Smrg 844714330f12Smrg # Allow CC to be a program name with arguments. 844814330f12Smrg lt_save_CC="$CC" 844914330f12Smrg lt_save_GCC=$GCC 845014330f12Smrg lt_save_CFLAGS=$CFLAGS 845114330f12Smrg CC=${FC-"f95"} 845214330f12Smrg CFLAGS=$FCFLAGS 845314330f12Smrg compiler=$CC 845414330f12Smrg GCC=$ac_cv_fc_compiler_gnu 845595b296d0Smrg 845614330f12Smrg _LT_TAGVAR(compiler, $1)=$CC 845714330f12Smrg _LT_CC_BASENAME([$compiler]) 845895b296d0Smrg 845914330f12Smrg if test -n "$compiler"; then 846014330f12Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 846114330f12Smrg AC_MSG_RESULT([$can_build_shared]) 846295b296d0Smrg 846314330f12Smrg AC_MSG_CHECKING([whether to build shared libraries]) 846414330f12Smrg test "$can_build_shared" = "no" && enable_shared=no 846539713583Smrg 846614330f12Smrg # On AIX, shared libraries and static libraries use the same namespace, and 846714330f12Smrg # are all built from PIC. 846814330f12Smrg case $host_os in 846914330f12Smrg aix3*) 847014330f12Smrg test "$enable_shared" = yes && enable_static=no 847114330f12Smrg if test -n "$RANLIB"; then 847214330f12Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 847314330f12Smrg postinstall_cmds='$RANLIB $lib' 847414330f12Smrg fi 847514330f12Smrg ;; 847614330f12Smrg aix[[4-9]]*) 847714330f12Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 847814330f12Smrg test "$enable_shared" = yes && enable_static=no 8479ff89ac2bSmrg fi 848014330f12Smrg ;; 848114330f12Smrg esac 848214330f12Smrg AC_MSG_RESULT([$enable_shared]) 848395b296d0Smrg 848414330f12Smrg AC_MSG_CHECKING([whether to build static libraries]) 848514330f12Smrg # Make sure either enable_shared or enable_static is yes. 848614330f12Smrg test "$enable_shared" = yes || enable_static=yes 848714330f12Smrg AC_MSG_RESULT([$enable_static]) 848895b296d0Smrg 848914330f12Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 849014330f12Smrg _LT_TAGVAR(LD, $1)="$LD" 849195b296d0Smrg 849214330f12Smrg ## CAVEAT EMPTOR: 849314330f12Smrg ## There is no encapsulation within the following macros, do not change 849414330f12Smrg ## the running order or otherwise move them around unless you know exactly 849514330f12Smrg ## what you are doing... 849614330f12Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 849714330f12Smrg _LT_COMPILER_PIC($1) 849814330f12Smrg _LT_COMPILER_C_O($1) 849914330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 850014330f12Smrg _LT_LINKER_SHLIBS($1) 850114330f12Smrg _LT_SYS_DYNAMIC_LINKER($1) 850214330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 850395b296d0Smrg 850414330f12Smrg _LT_CONFIG($1) 850514330f12Smrg fi # test -n "$compiler" 850695b296d0Smrg 850714330f12Smrg GCC=$lt_save_GCC 850814330f12Smrg CC=$lt_save_CC 850914330f12Smrg CFLAGS=$lt_save_CFLAGS 851014330f12Smrgfi # test "$_lt_disable_FC" != yes 851195b296d0Smrg 851214330f12SmrgAC_LANG_POP 851314330f12Smrg])# _LT_LANG_FC_CONFIG 851495b296d0Smrg 851595b296d0Smrg 851614330f12Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 851714330f12Smrg# -------------------------- 851814330f12Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 851914330f12Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 852014330f12Smrg# to write the compiler configuration to `libtool'. 852114330f12Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 852214330f12Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 852314330f12SmrgAC_LANG_SAVE 852495b296d0Smrg 852514330f12Smrg# Source file extension for Java test sources. 852614330f12Smrgac_ext=java 852739713583Smrg 852814330f12Smrg# Object file extension for compiled Java test sources. 852914330f12Smrgobjext=o 853014330f12Smrg_LT_TAGVAR(objext, $1)=$objext 85312378475aSmrg 853214330f12Smrg# Code to be used in simple compile tests 853314330f12Smrglt_simple_compile_test_code="class foo {}" 853495b296d0Smrg 853514330f12Smrg# Code to be used in simple link tests 853614330f12Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 853714330f12Smrg 853814330f12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 853914330f12Smrg_LT_TAG_COMPILER 85402378475aSmrg 854114330f12Smrg# save warnings/boilerplate of simple test code 854214330f12Smrg_LT_COMPILER_BOILERPLATE 854314330f12Smrg_LT_LINKER_BOILERPLATE 85442378475aSmrg 854514330f12Smrg# Allow CC to be a program name with arguments. 854614330f12Smrglt_save_CC=$CC 854714330f12Smrglt_save_CFLAGS=$CFLAGS 854814330f12Smrglt_save_GCC=$GCC 854914330f12SmrgGCC=yes 855014330f12SmrgCC=${GCJ-"gcj"} 855114330f12SmrgCFLAGS=$GCJFLAGS 855214330f12Smrgcompiler=$CC 855314330f12Smrg_LT_TAGVAR(compiler, $1)=$CC 855414330f12Smrg_LT_TAGVAR(LD, $1)="$LD" 855514330f12Smrg_LT_CC_BASENAME([$compiler]) 85562378475aSmrg 855714330f12Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 855814330f12Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 85592378475aSmrg 856014330f12Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 856114330f12Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 856214330f12Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 856395b296d0Smrg 856414330f12Smrgif test -n "$compiler"; then 856514330f12Smrg _LT_COMPILER_NO_RTTI($1) 856614330f12Smrg _LT_COMPILER_PIC($1) 856714330f12Smrg _LT_COMPILER_C_O($1) 856814330f12Smrg _LT_COMPILER_FILE_LOCKS($1) 856914330f12Smrg _LT_LINKER_SHLIBS($1) 857014330f12Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 857195b296d0Smrg 857214330f12Smrg _LT_CONFIG($1) 857314330f12Smrgfi 857495b296d0Smrg 857514330f12SmrgAC_LANG_RESTORE 857695b296d0Smrg 857714330f12SmrgGCC=$lt_save_GCC 857814330f12SmrgCC=$lt_save_CC 857914330f12SmrgCFLAGS=$lt_save_CFLAGS 858014330f12Smrg])# _LT_LANG_GCJ_CONFIG 85812378475aSmrg 85822378475aSmrg 858314330f12Smrg# _LT_LANG_RC_CONFIG([TAG]) 858414330f12Smrg# ------------------------- 858514330f12Smrg# Ensure that the configuration variables for the Windows resource compiler 858614330f12Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 858714330f12Smrg# to write the compiler configuration to `libtool'. 858814330f12Smrgm4_defun([_LT_LANG_RC_CONFIG], 858914330f12Smrg[AC_REQUIRE([LT_PROG_RC])dnl 859014330f12SmrgAC_LANG_SAVE 85912378475aSmrg 859214330f12Smrg# Source file extension for RC test sources. 859314330f12Smrgac_ext=rc 85942378475aSmrg 859514330f12Smrg# Object file extension for compiled RC test sources. 859614330f12Smrgobjext=o 859714330f12Smrg_LT_TAGVAR(objext, $1)=$objext 85982378475aSmrg 859914330f12Smrg# Code to be used in simple compile tests 860014330f12Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 86012378475aSmrg 860214330f12Smrg# Code to be used in simple link tests 860314330f12Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 86042378475aSmrg 860514330f12Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 860614330f12Smrg_LT_TAG_COMPILER 86072378475aSmrg 860814330f12Smrg# save warnings/boilerplate of simple test code 860914330f12Smrg_LT_COMPILER_BOILERPLATE 861014330f12Smrg_LT_LINKER_BOILERPLATE 86112378475aSmrg 861214330f12Smrg# Allow CC to be a program name with arguments. 861314330f12Smrglt_save_CC="$CC" 861414330f12Smrglt_save_CFLAGS=$CFLAGS 861514330f12Smrglt_save_GCC=$GCC 861614330f12SmrgGCC= 861714330f12SmrgCC=${RC-"windres"} 861814330f12SmrgCFLAGS= 861914330f12Smrgcompiler=$CC 862014330f12Smrg_LT_TAGVAR(compiler, $1)=$CC 862114330f12Smrg_LT_CC_BASENAME([$compiler]) 862214330f12Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 86232378475aSmrg 862414330f12Smrgif test -n "$compiler"; then 862514330f12Smrg : 862614330f12Smrg _LT_CONFIG($1) 862714330f12Smrgfi 86282378475aSmrg 862914330f12SmrgGCC=$lt_save_GCC 863014330f12SmrgAC_LANG_RESTORE 863114330f12SmrgCC=$lt_save_CC 863214330f12SmrgCFLAGS=$lt_save_CFLAGS 863314330f12Smrg])# _LT_LANG_RC_CONFIG 863495b296d0Smrg 863595b296d0Smrg 863614330f12Smrg# LT_PROG_GCJ 863714330f12Smrg# ----------- 863814330f12SmrgAC_DEFUN([LT_PROG_GCJ], 863914330f12Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864014330f12Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864114330f12Smrg [AC_CHECK_TOOL(GCJ, gcj,) 864214330f12Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 864314330f12Smrg AC_SUBST(GCJFLAGS)])])[]dnl 864414330f12Smrg]) 864595b296d0Smrg 864614330f12Smrg# Old name: 864714330f12SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 864814330f12Smrgdnl aclocal-1.4 backwards compatibility: 864914330f12Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 865095b296d0Smrg 86512378475aSmrg 865214330f12Smrg# LT_PROG_RC 865314330f12Smrg# ---------- 865414330f12SmrgAC_DEFUN([LT_PROG_RC], 865514330f12Smrg[AC_CHECK_TOOL(RC, windres,) 865614330f12Smrg]) 865795b296d0Smrg 865814330f12Smrg# Old name: 865914330f12SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 866014330f12Smrgdnl aclocal-1.4 backwards compatibility: 866114330f12Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 86622378475aSmrg 86632378475aSmrg 866414330f12Smrg# _LT_DECL_EGREP 866514330f12Smrg# -------------- 866614330f12Smrg# If we don't have a new enough Autoconf to choose the best grep 866714330f12Smrg# available, choose the one first in the user's PATH. 866814330f12Smrgm4_defun([_LT_DECL_EGREP], 866914330f12Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 867014330f12SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 867114330f12Smrgtest -z "$GREP" && GREP=grep 867214330f12Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 867314330f12Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 867414330f12Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 867514330f12Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 867614330f12SmrgAC_SUBST([GREP]) 867795b296d0Smrg]) 867895b296d0Smrg 8679ff89ac2bSmrg 868014330f12Smrg# _LT_DECL_OBJDUMP 868114330f12Smrg# -------------- 868214330f12Smrg# If we don't have a new enough Autoconf to choose the best objdump 868314330f12Smrg# available, choose the one first in the user's PATH. 868414330f12Smrgm4_defun([_LT_DECL_OBJDUMP], 868514330f12Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 868614330f12Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 868714330f12Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 868814330f12SmrgAC_SUBST([OBJDUMP]) 868914330f12Smrg]) 869014330f12Smrg 869114330f12Smrg# _LT_DECL_DLLTOOL 869214330f12Smrg# ---------------- 869314330f12Smrg# Ensure DLLTOOL variable is set. 869414330f12Smrgm4_defun([_LT_DECL_DLLTOOL], 869514330f12Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 869614330f12Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 869714330f12Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 869814330f12SmrgAC_SUBST([DLLTOOL]) 869914330f12Smrg]) 8700ff89ac2bSmrg 870114330f12Smrg# _LT_DECL_SED 870214330f12Smrg# ------------ 870314330f12Smrg# Check for a fully-functional sed program, that truncates 870414330f12Smrg# as few characters as possible. Prefer GNU sed if found. 870514330f12Smrgm4_defun([_LT_DECL_SED], 870614330f12Smrg[AC_PROG_SED 870714330f12Smrgtest -z "$SED" && SED=sed 870814330f12SmrgXsed="$SED -e 1s/^X//" 870914330f12Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 871014330f12Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 871114330f12Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 871214330f12Smrg])# _LT_DECL_SED 8713ff89ac2bSmrg 871414330f12Smrgm4_ifndef([AC_PROG_SED], [ 871514330f12Smrg# NOTE: This macro has been submitted for inclusion into # 871614330f12Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 871714330f12Smrg# a released version of Autoconf we should remove this # 871814330f12Smrg# macro and use it instead. # 8719ff89ac2bSmrg 872014330f12Smrgm4_defun([AC_PROG_SED], 872114330f12Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 872214330f12SmrgAC_CACHE_VAL(lt_cv_path_SED, 872314330f12Smrg[# Loop through the user's path and test for sed and gsed. 872414330f12Smrg# Then use that list of sed's as ones to test for truncation. 872514330f12Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 872614330f12Smrgfor as_dir in $PATH 872714330f12Smrgdo 872814330f12Smrg IFS=$as_save_IFS 872914330f12Smrg test -z "$as_dir" && as_dir=. 873014330f12Smrg for lt_ac_prog in sed gsed; do 873114330f12Smrg for ac_exec_ext in '' $ac_executable_extensions; do 873214330f12Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 873314330f12Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 873414330f12Smrg fi 873514330f12Smrg done 873614330f12Smrg done 873714330f12Smrgdone 873814330f12SmrgIFS=$as_save_IFS 873914330f12Smrglt_ac_max=0 874014330f12Smrglt_ac_count=0 874114330f12Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 874214330f12Smrg# along with /bin/sed that truncates output. 874314330f12Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 874414330f12Smrg test ! -f $lt_ac_sed && continue 874514330f12Smrg cat /dev/null > conftest.in 874614330f12Smrg lt_ac_count=0 874714330f12Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 874814330f12Smrg # Check for GNU sed and select it if it is found. 874914330f12Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 875014330f12Smrg lt_cv_path_SED=$lt_ac_sed 875114330f12Smrg break 875214330f12Smrg fi 875314330f12Smrg while true; do 875414330f12Smrg cat conftest.in conftest.in >conftest.tmp 875514330f12Smrg mv conftest.tmp conftest.in 875614330f12Smrg cp conftest.in conftest.nl 875714330f12Smrg echo >>conftest.nl 875814330f12Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 875914330f12Smrg cmp -s conftest.out conftest.nl || break 876014330f12Smrg # 10000 chars as input seems more than enough 876114330f12Smrg test $lt_ac_count -gt 10 && break 876214330f12Smrg lt_ac_count=`expr $lt_ac_count + 1` 876314330f12Smrg if test $lt_ac_count -gt $lt_ac_max; then 876414330f12Smrg lt_ac_max=$lt_ac_count 876514330f12Smrg lt_cv_path_SED=$lt_ac_sed 876614330f12Smrg fi 876714330f12Smrg done 876814330f12Smrgdone 876995b296d0Smrg]) 877014330f12SmrgSED=$lt_cv_path_SED 877114330f12SmrgAC_SUBST([SED]) 877214330f12SmrgAC_MSG_RESULT([$SED]) 877314330f12Smrg])#AC_PROG_SED 877414330f12Smrg])#m4_ifndef 877539713583Smrg 877614330f12Smrg# Old name: 877714330f12SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 877814330f12Smrgdnl aclocal-1.4 backwards compatibility: 877914330f12Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 87802378475aSmrg 87812378475aSmrg 878214330f12Smrg# _LT_CHECK_SHELL_FEATURES 878314330f12Smrg# ------------------------ 878414330f12Smrg# Find out whether the shell is Bourne or XSI compatible, 878514330f12Smrg# or has some other useful features. 878614330f12Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 878714330f12Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 878814330f12Smrg# Try some XSI features 878914330f12Smrgxsi_shell=no 879014330f12Smrg( _lt_dummy="a/b/c" 879114330f12Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 879214330f12Smrg = c,a/b,b/c, \ 879314330f12Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 879414330f12Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 879514330f12Smrg && xsi_shell=yes 879614330f12SmrgAC_MSG_RESULT([$xsi_shell]) 879714330f12Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 87982378475aSmrg 879914330f12SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 880014330f12Smrglt_shell_append=no 880114330f12Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 880214330f12Smrg >/dev/null 2>&1 \ 880314330f12Smrg && lt_shell_append=yes 880414330f12SmrgAC_MSG_RESULT([$lt_shell_append]) 880514330f12Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 88062378475aSmrg 880714330f12Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 880814330f12Smrg lt_unset=unset 880914330f12Smrgelse 881014330f12Smrg lt_unset=false 881114330f12Smrgfi 881214330f12Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 88132378475aSmrg 881414330f12Smrg# test EBCDIC or ASCII 881514330f12Smrgcase `echo X|tr X '\101'` in 881614330f12Smrg A) # ASCII based system 881714330f12Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 881814330f12Smrg lt_SP2NL='tr \040 \012' 881914330f12Smrg lt_NL2SP='tr \015\012 \040\040' 882014330f12Smrg ;; 882114330f12Smrg *) # EBCDIC based system 882214330f12Smrg lt_SP2NL='tr \100 \n' 882314330f12Smrg lt_NL2SP='tr \r\n \100\100' 882414330f12Smrg ;; 882514330f12Smrgesac 882614330f12Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 882714330f12Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 882814330f12Smrg])# _LT_CHECK_SHELL_FEATURES 882995b296d0Smrg 883095b296d0Smrg 883114330f12Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 883214330f12Smrg# ------------------------------------------------------ 883314330f12Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 883414330f12Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 883514330f12Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 883614330f12Smrg[dnl { 883714330f12Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 883814330f12Smrg$1 ()\ 883914330f12Smrg{\ 884014330f12Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 884114330f12Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 884214330f12Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 884314330f12Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 884414330f12Smrgtest 0 -eq $? || _lt_function_replace_fail=: 884514330f12Smrg]) 884695b296d0Smrg 884795b296d0Smrg 884814330f12Smrg# _LT_PROG_REPLACE_SHELLFNS 884914330f12Smrg# ------------------------- 885014330f12Smrg# Replace existing portable implementations of several shell functions with 885114330f12Smrg# equivalent extended shell implementations where those features are available.. 885214330f12Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 885314330f12Smrg[if test x"$xsi_shell" = xyes; then 885414330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 885514330f12Smrg case ${1} in 885614330f12Smrg */*) func_dirname_result="${1%/*}${2}" ;; 885714330f12Smrg * ) func_dirname_result="${3}" ;; 885814330f12Smrg esac]) 885914330f12Smrg 886014330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 886114330f12Smrg func_basename_result="${1##*/}"]) 886214330f12Smrg 886314330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 886414330f12Smrg case ${1} in 886514330f12Smrg */*) func_dirname_result="${1%/*}${2}" ;; 886614330f12Smrg * ) func_dirname_result="${3}" ;; 886714330f12Smrg esac 886814330f12Smrg func_basename_result="${1##*/}"]) 886995b296d0Smrg 887014330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 887114330f12Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 887214330f12Smrg # positional parameters, so assign one to ordinary parameter first. 887314330f12Smrg func_stripname_result=${3} 887414330f12Smrg func_stripname_result=${func_stripname_result#"${1}"} 887514330f12Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 887614330f12Smrg 887714330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 887814330f12Smrg func_split_long_opt_name=${1%%=*} 887914330f12Smrg func_split_long_opt_arg=${1#*=}]) 888014330f12Smrg 888114330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 888214330f12Smrg func_split_short_opt_arg=${1#??} 888314330f12Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 888414330f12Smrg 888514330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 888614330f12Smrg case ${1} in 888714330f12Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 888814330f12Smrg *) func_lo2o_result=${1} ;; 888914330f12Smrg esac]) 889014330f12Smrg 889114330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 889214330f12Smrg 889314330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 889414330f12Smrg 889514330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 889614330f12Smrgfi 889714330f12Smrg 889814330f12Smrgif test x"$lt_shell_append" = xyes; then 889914330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 890014330f12Smrg 890114330f12Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 890214330f12Smrg func_quote_for_eval "${2}" 890314330f12Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 890414330f12Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 890514330f12Smrg 890614330f12Smrg # Save a `func_append' function call where possible by direct use of '+=' 890714330f12Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 890814330f12Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 890914330f12Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891014330f12Smrg test 0 -eq $? || _lt_function_replace_fail=: 891195b296d0Smrgelse 891214330f12Smrg # Save a `func_append' function call even when '+=' is not available 891314330f12Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 891414330f12Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891514330f12Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891614330f12Smrg test 0 -eq $? || _lt_function_replace_fail=: 891714330f12Smrgfi 891895b296d0Smrg 891914330f12Smrgif test x"$_lt_function_replace_fail" = x":"; then 892014330f12Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 892114330f12Smrgfi 892214330f12Smrg]) 892395b296d0Smrg 892414330f12Smrg# _LT_PATH_CONVERSION_FUNCTIONS 892514330f12Smrg# ----------------------------- 892614330f12Smrg# Determine which file name conversion functions should be used by 892714330f12Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 892814330f12Smrg# for certain cross-compile configurations and native mingw. 892914330f12Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 893014330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 893114330f12SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 893214330f12SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 893314330f12SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 893414330f12Smrg[case $host in 893514330f12Smrg *-*-mingw* ) 893614330f12Smrg case $build in 893714330f12Smrg *-*-mingw* ) # actually msys 893814330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 893914330f12Smrg ;; 894014330f12Smrg *-*-cygwin* ) 894114330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 894214330f12Smrg ;; 894314330f12Smrg * ) # otherwise, assume *nix 894414330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 894514330f12Smrg ;; 894614330f12Smrg esac 894714330f12Smrg ;; 894814330f12Smrg *-*-cygwin* ) 894914330f12Smrg case $build in 895014330f12Smrg *-*-mingw* ) # actually msys 895114330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 895214330f12Smrg ;; 895314330f12Smrg *-*-cygwin* ) 895414330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 895514330f12Smrg ;; 895614330f12Smrg * ) # otherwise, assume *nix 895714330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 895814330f12Smrg ;; 895914330f12Smrg esac 896014330f12Smrg ;; 896114330f12Smrg * ) # unhandled hosts (and "normal" native builds) 896214330f12Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 896314330f12Smrg ;; 896414330f12Smrgesac 896514330f12Smrg]) 896614330f12Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 896714330f12SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 896814330f12Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 896914330f12Smrg [0], [convert $build file names to $host format])dnl 897014330f12Smrg 897114330f12SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 897214330f12SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 897314330f12Smrg[#assume ordinary cross tools, or native build. 897414330f12Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 897514330f12Smrgcase $host in 897614330f12Smrg *-*-mingw* ) 897714330f12Smrg case $build in 897814330f12Smrg *-*-mingw* ) # actually msys 897914330f12Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 898014330f12Smrg ;; 898114330f12Smrg esac 898214330f12Smrg ;; 898314330f12Smrgesac 898414330f12Smrg]) 898514330f12Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 898614330f12SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 898714330f12Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 898814330f12Smrg [0], [convert $build files to toolchain format])dnl 898914330f12Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 899014330f12Smrg 899114330f12Smrg# Helper functions for option handling. -*- Autoconf -*- 899295b296d0Smrg# 899314330f12Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 899414330f12Smrg# Inc. 899514330f12Smrg# Written by Gary V. Vaughan, 2004 899695b296d0Smrg# 899714330f12Smrg# This file is free software; the Free Software Foundation gives 899814330f12Smrg# unlimited permission to copy and/or distribute it, with or without 899914330f12Smrg# modifications, as long as this notice is preserved. 900095b296d0Smrg 900114330f12Smrg# serial 7 ltoptions.m4 900295b296d0Smrg 900314330f12Smrg# This is to help aclocal find these macros, as it can't see m4_define. 900414330f12SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 900595b296d0Smrg 900695b296d0Smrg 900714330f12Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 900814330f12Smrg# ------------------------------------------ 900914330f12Smrgm4_define([_LT_MANGLE_OPTION], 901014330f12Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 901195b296d0Smrg 901295b296d0Smrg 901314330f12Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 901414330f12Smrg# --------------------------------------- 901514330f12Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 901614330f12Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 901714330f12Smrg# saved as a flag. 901814330f12Smrgm4_define([_LT_SET_OPTION], 901914330f12Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 902014330f12Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 902114330f12Smrg _LT_MANGLE_DEFUN([$1], [$2]), 902214330f12Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 902314330f12Smrg]) 902495b296d0Smrg 902595b296d0Smrg 902614330f12Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 902714330f12Smrg# ------------------------------------------------------------ 902814330f12Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 902914330f12Smrgm4_define([_LT_IF_OPTION], 903014330f12Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 903195b296d0Smrg 903295b296d0Smrg 903314330f12Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 903414330f12Smrg# ------------------------------------------------------- 903514330f12Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 903614330f12Smrg# are set. 903714330f12Smrgm4_define([_LT_UNLESS_OPTIONS], 903814330f12Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 903914330f12Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 904014330f12Smrg [m4_define([$0_found])])])[]dnl 904114330f12Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 904214330f12Smrg])[]dnl 904314330f12Smrg]) 904495b296d0Smrg 904595b296d0Smrg 904614330f12Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 904714330f12Smrg# ---------------------------------------- 904814330f12Smrg# OPTION-LIST is a space-separated list of Libtool options associated 904914330f12Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 905014330f12Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 905114330f12Smrg# the unknown option and exit. 905214330f12Smrgm4_defun([_LT_SET_OPTIONS], 905314330f12Smrg[# Set options 905414330f12Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 905514330f12Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 905695b296d0Smrg 905714330f12Smrgm4_if([$1],[LT_INIT],[ 905814330f12Smrg dnl 905914330f12Smrg dnl Simply set some default values (i.e off) if boolean options were not 906014330f12Smrg dnl specified: 906114330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 906214330f12Smrg ]) 906314330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 906414330f12Smrg ]) 906514330f12Smrg dnl 906614330f12Smrg dnl If no reference was made to various pairs of opposing options, then 906714330f12Smrg dnl we run the default mode handler for the pair. For example, if neither 906814330f12Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 906914330f12Smrg dnl archives by default: 907014330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 907114330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 907214330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 907314330f12Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 907414330f12Smrg [_LT_ENABLE_FAST_INSTALL]) 907514330f12Smrg ]) 907614330f12Smrg])# _LT_SET_OPTIONS 907795b296d0Smrg 907895b296d0Smrg 907995b296d0Smrg 908014330f12Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 908114330f12Smrg# ----------------------------------------- 908214330f12Smrgm4_define([_LT_MANGLE_DEFUN], 908314330f12Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 908495b296d0Smrg 908595b296d0Smrg 908614330f12Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 908714330f12Smrg# ----------------------------------------------- 908814330f12Smrgm4_define([LT_OPTION_DEFINE], 908914330f12Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 909014330f12Smrg])# LT_OPTION_DEFINE 909195b296d0Smrg 909295b296d0Smrg 909314330f12Smrg# dlopen 909414330f12Smrg# ------ 909514330f12SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 909614330f12Smrg]) 909795b296d0Smrg 909814330f12SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 909914330f12Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 910014330f12SmrgAC_DIAGNOSE([obsolete], 910114330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 910214330f12Smrgput the `dlopen' option into LT_INIT's first parameter.]) 910314330f12Smrg]) 910495b296d0Smrg 910514330f12Smrgdnl aclocal-1.4 backwards compatibility: 910614330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 910795b296d0Smrg 910895b296d0Smrg 910914330f12Smrg# win32-dll 911014330f12Smrg# --------- 911114330f12Smrg# Declare package support for building win32 dll's. 911214330f12SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 911314330f12Smrg[enable_win32_dll=yes 911495b296d0Smrg 911514330f12Smrgcase $host in 911614330f12Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 911714330f12Smrg AC_CHECK_TOOL(AS, as, false) 911814330f12Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 911914330f12Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 912014330f12Smrg ;; 912114330f12Smrgesac 91222378475aSmrg 912314330f12Smrgtest -z "$AS" && AS=as 912414330f12Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 91252378475aSmrg 912614330f12Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 912714330f12Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 912895b296d0Smrg 912914330f12Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 913014330f12Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 913114330f12Smrg])# win32-dll 91322378475aSmrg 913314330f12SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 913414330f12Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 913514330f12Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 913614330f12SmrgAC_DIAGNOSE([obsolete], 913714330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 913814330f12Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 913914330f12Smrg]) 91402378475aSmrg 914114330f12Smrgdnl aclocal-1.4 backwards compatibility: 914214330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 91432378475aSmrg 914495b296d0Smrg 914514330f12Smrg# _LT_ENABLE_SHARED([DEFAULT]) 914614330f12Smrg# ---------------------------- 914714330f12Smrg# implement the --enable-shared flag, and supports the `shared' and 914814330f12Smrg# `disable-shared' LT_INIT options. 914914330f12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 915014330f12Smrgm4_define([_LT_ENABLE_SHARED], 915114330f12Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 915214330f12SmrgAC_ARG_ENABLE([shared], 915314330f12Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 915414330f12Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 915514330f12Smrg [p=${PACKAGE-default} 915614330f12Smrg case $enableval in 915714330f12Smrg yes) enable_shared=yes ;; 915814330f12Smrg no) enable_shared=no ;; 915914330f12Smrg *) 916014330f12Smrg enable_shared=no 916114330f12Smrg # Look at the argument we got. We use all the common list separators. 916214330f12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 916314330f12Smrg for pkg in $enableval; do 916414330f12Smrg IFS="$lt_save_ifs" 916514330f12Smrg if test "X$pkg" = "X$p"; then 916614330f12Smrg enable_shared=yes 916714330f12Smrg fi 916814330f12Smrg done 916914330f12Smrg IFS="$lt_save_ifs" 917014330f12Smrg ;; 917114330f12Smrg esac], 917214330f12Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 917395b296d0Smrg 917414330f12Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 917514330f12Smrg [Whether or not to build shared libraries]) 917614330f12Smrg])# _LT_ENABLE_SHARED 917795b296d0Smrg 917814330f12SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 917914330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 918095b296d0Smrg 918114330f12Smrg# Old names: 918214330f12SmrgAC_DEFUN([AC_ENABLE_SHARED], 918314330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 918414330f12Smrg]) 918595b296d0Smrg 918614330f12SmrgAC_DEFUN([AC_DISABLE_SHARED], 918714330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 918814330f12Smrg]) 918995b296d0Smrg 919014330f12SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 919114330f12SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 919295b296d0Smrg 919314330f12Smrgdnl aclocal-1.4 backwards compatibility: 919414330f12Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 919514330f12Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 919695b296d0Smrg 919795b296d0Smrg 919895b296d0Smrg 919914330f12Smrg# _LT_ENABLE_STATIC([DEFAULT]) 920014330f12Smrg# ---------------------------- 920114330f12Smrg# implement the --enable-static flag, and support the `static' and 920214330f12Smrg# `disable-static' LT_INIT options. 920314330f12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 920414330f12Smrgm4_define([_LT_ENABLE_STATIC], 920514330f12Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 920614330f12SmrgAC_ARG_ENABLE([static], 920714330f12Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 920814330f12Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 920914330f12Smrg [p=${PACKAGE-default} 921014330f12Smrg case $enableval in 921114330f12Smrg yes) enable_static=yes ;; 921214330f12Smrg no) enable_static=no ;; 921314330f12Smrg *) 921414330f12Smrg enable_static=no 921514330f12Smrg # Look at the argument we got. We use all the common list separators. 921614330f12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 921714330f12Smrg for pkg in $enableval; do 921814330f12Smrg IFS="$lt_save_ifs" 921914330f12Smrg if test "X$pkg" = "X$p"; then 922014330f12Smrg enable_static=yes 922114330f12Smrg fi 922214330f12Smrg done 922314330f12Smrg IFS="$lt_save_ifs" 922414330f12Smrg ;; 922514330f12Smrg esac], 922614330f12Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 922714330f12Smrg 922814330f12Smrg _LT_DECL([build_old_libs], [enable_static], [0], 922914330f12Smrg [Whether or not to build static libraries]) 923014330f12Smrg])# _LT_ENABLE_STATIC 923114330f12Smrg 923214330f12SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 923314330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 923495b296d0Smrg 923514330f12Smrg# Old names: 923614330f12SmrgAC_DEFUN([AC_ENABLE_STATIC], 923714330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 923814330f12Smrg]) 923995b296d0Smrg 924014330f12SmrgAC_DEFUN([AC_DISABLE_STATIC], 924114330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 924214330f12Smrg]) 92432378475aSmrg 924414330f12SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 924514330f12SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9246ff89ac2bSmrg 924714330f12Smrgdnl aclocal-1.4 backwards compatibility: 924814330f12Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 924914330f12Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9250ff89ac2bSmrg 9251ff89ac2bSmrg 9252ff89ac2bSmrg 925314330f12Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 925414330f12Smrg# ---------------------------------- 925514330f12Smrg# implement the --enable-fast-install flag, and support the `fast-install' 925614330f12Smrg# and `disable-fast-install' LT_INIT options. 925714330f12Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 925814330f12Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 925914330f12Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 926014330f12SmrgAC_ARG_ENABLE([fast-install], 926114330f12Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 926214330f12Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 926314330f12Smrg [p=${PACKAGE-default} 926414330f12Smrg case $enableval in 926514330f12Smrg yes) enable_fast_install=yes ;; 926614330f12Smrg no) enable_fast_install=no ;; 926714330f12Smrg *) 926814330f12Smrg enable_fast_install=no 926914330f12Smrg # Look at the argument we got. We use all the common list separators. 927014330f12Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 927114330f12Smrg for pkg in $enableval; do 927214330f12Smrg IFS="$lt_save_ifs" 927314330f12Smrg if test "X$pkg" = "X$p"; then 927414330f12Smrg enable_fast_install=yes 927514330f12Smrg fi 927614330f12Smrg done 927714330f12Smrg IFS="$lt_save_ifs" 927814330f12Smrg ;; 927914330f12Smrg esac], 928014330f12Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9281ff89ac2bSmrg 928214330f12Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 928314330f12Smrg [Whether or not to optimize for fast installation])dnl 928414330f12Smrg])# _LT_ENABLE_FAST_INSTALL 9285ff89ac2bSmrg 928614330f12SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 928714330f12SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9288ff89ac2bSmrg 928914330f12Smrg# Old names: 929014330f12SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 929114330f12Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 929214330f12SmrgAC_DIAGNOSE([obsolete], 929314330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 929414330f12Smrgthe `fast-install' option into LT_INIT's first parameter.]) 929514330f12Smrg]) 9296ff89ac2bSmrg 929714330f12SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 929814330f12Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 929914330f12SmrgAC_DIAGNOSE([obsolete], 930014330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 930114330f12Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 930214330f12Smrg]) 93032378475aSmrg 930414330f12Smrgdnl aclocal-1.4 backwards compatibility: 930514330f12Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 930614330f12Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93072378475aSmrg 93082378475aSmrg 930914330f12Smrg# _LT_WITH_PIC([MODE]) 931014330f12Smrg# -------------------- 931114330f12Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 931214330f12Smrg# LT_INIT options. 931314330f12Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 931414330f12Smrgm4_define([_LT_WITH_PIC], 931514330f12Smrg[AC_ARG_WITH([pic], 931614330f12Smrg [AS_HELP_STRING([--with-pic], 931714330f12Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 931814330f12Smrg [pic_mode="$withval"], 931914330f12Smrg [pic_mode=default]) 93202378475aSmrg 932114330f12Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93222378475aSmrg 932314330f12Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 932414330f12Smrg])# _LT_WITH_PIC 93252378475aSmrg 932614330f12SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 932714330f12SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 93282378475aSmrg 932914330f12Smrg# Old name: 933014330f12SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 933114330f12Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 933214330f12SmrgAC_DIAGNOSE([obsolete], 933314330f12Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 933414330f12Smrgput the `pic-only' option into LT_INIT's first parameter.]) 933514330f12Smrg]) 93362378475aSmrg 933714330f12Smrgdnl aclocal-1.4 backwards compatibility: 933814330f12Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 93392378475aSmrg 93402378475aSmrg 934114330f12Smrgm4_define([_LTDL_MODE], []) 934214330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 934314330f12Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 934414330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 934514330f12Smrg [m4_define([_LTDL_MODE], [recursive])]) 934614330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 934714330f12Smrg [m4_define([_LTDL_MODE], [subproject])]) 93482378475aSmrg 934914330f12Smrgm4_define([_LTDL_TYPE], []) 935014330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 935114330f12Smrg [m4_define([_LTDL_TYPE], [installable])]) 935214330f12SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 935314330f12Smrg [m4_define([_LTDL_TYPE], [convenience])]) 93542378475aSmrg 935514330f12Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 93562378475aSmrg# 935714330f12Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 935814330f12Smrg# Written by Gary V. Vaughan, 2004 93592378475aSmrg# 936014330f12Smrg# This file is free software; the Free Software Foundation gives 936114330f12Smrg# unlimited permission to copy and/or distribute it, with or without 936214330f12Smrg# modifications, as long as this notice is preserved. 93632378475aSmrg 936414330f12Smrg# serial 6 ltsugar.m4 93652378475aSmrg 936614330f12Smrg# This is to help aclocal find these macros, as it can't see m4_define. 936714330f12SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 93682378475aSmrg 936995b296d0Smrg 937014330f12Smrg# lt_join(SEP, ARG1, [ARG2...]) 937114330f12Smrg# ----------------------------- 937214330f12Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 937314330f12Smrg# associated separator. 937414330f12Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 937514330f12Smrg# versions in m4sugar had bugs. 937614330f12Smrgm4_define([lt_join], 937714330f12Smrg[m4_if([$#], [1], [], 937814330f12Smrg [$#], [2], [[$2]], 937914330f12Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 938014330f12Smrgm4_define([_lt_join], 938114330f12Smrg[m4_if([$#$2], [2], [], 938214330f12Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 938395b296d0Smrg 938495b296d0Smrg 938514330f12Smrg# lt_car(LIST) 938614330f12Smrg# lt_cdr(LIST) 938714330f12Smrg# ------------ 938814330f12Smrg# Manipulate m4 lists. 938914330f12Smrg# These macros are necessary as long as will still need to support 939014330f12Smrg# Autoconf-2.59 which quotes differently. 939114330f12Smrgm4_define([lt_car], [[$1]]) 939214330f12Smrgm4_define([lt_cdr], 939314330f12Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 939414330f12Smrg [$#], 1, [], 939514330f12Smrg [m4_dquote(m4_shift($@))])]) 939614330f12Smrgm4_define([lt_unquote], $1) 939795b296d0Smrg 939814330f12Smrg 939914330f12Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 940014330f12Smrg# ------------------------------------------ 940114330f12Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 940214330f12Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 940314330f12Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 940414330f12Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 940514330f12Smrg# than defined and empty). 940695b296d0Smrg# 940714330f12Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 940814330f12Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 940914330f12Smrgm4_define([lt_append], 941014330f12Smrg[m4_define([$1], 941114330f12Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 941295b296d0Smrg 94132378475aSmrg 94142378475aSmrg 941514330f12Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 941614330f12Smrg# ---------------------------------------------------------- 941714330f12Smrg# Produce a SEP delimited list of all paired combinations of elements of 941814330f12Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 941914330f12Smrg# has the form PREFIXmINFIXSUFFIXn. 942014330f12Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 942114330f12Smrgm4_define([lt_combine], 942214330f12Smrg[m4_if(m4_eval([$# > 3]), [1], 942314330f12Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 942414330f12Smrg[[m4_foreach([_Lt_prefix], [$2], 942514330f12Smrg [m4_foreach([_Lt_suffix], 942614330f12Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 942714330f12Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 942814330f12Smrg 942914330f12Smrg 943014330f12Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 943114330f12Smrg# ----------------------------------------------------------------------- 943214330f12Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 943314330f12Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 943414330f12Smrgm4_define([lt_if_append_uniq], 943514330f12Smrg[m4_ifdef([$1], 943614330f12Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 943714330f12Smrg [lt_append([$1], [$2], [$3])$4], 943814330f12Smrg [$5])], 943914330f12Smrg [lt_append([$1], [$2], [$3])$4])]) 944014330f12Smrg 944114330f12Smrg 944214330f12Smrg# lt_dict_add(DICT, KEY, VALUE) 944314330f12Smrg# ----------------------------- 944414330f12Smrgm4_define([lt_dict_add], 944514330f12Smrg[m4_define([$1($2)], [$3])]) 944614330f12Smrg 944714330f12Smrg 944814330f12Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 944914330f12Smrg# -------------------------------------------- 945014330f12Smrgm4_define([lt_dict_add_subkey], 945114330f12Smrg[m4_define([$1($2:$3)], [$4])]) 945214330f12Smrg 945314330f12Smrg 945414330f12Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 945514330f12Smrg# ---------------------------------- 945614330f12Smrgm4_define([lt_dict_fetch], 945714330f12Smrg[m4_ifval([$3], 945814330f12Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 945914330f12Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 946014330f12Smrg 94612378475aSmrg 946214330f12Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 946314330f12Smrg# ----------------------------------------------------------------- 946414330f12Smrgm4_define([lt_if_dict_fetch], 946514330f12Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 946614330f12Smrg [$5], 946714330f12Smrg [$6])]) 946895b296d0Smrg 946995b296d0Smrg 947014330f12Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 947114330f12Smrg# -------------------------------------------------------------- 947214330f12Smrgm4_define([lt_dict_filter], 947314330f12Smrg[m4_if([$5], [], [], 947414330f12Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 947514330f12Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 947614330f12Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 947714330f12Smrg]) 947895b296d0Smrg 947914330f12Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 948095b296d0Smrg# 948114330f12Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 948214330f12Smrg# Written by Scott James Remnant, 2004 94832378475aSmrg# 948414330f12Smrg# This file is free software; the Free Software Foundation gives 948514330f12Smrg# unlimited permission to copy and/or distribute it, with or without 948614330f12Smrg# modifications, as long as this notice is preserved. 948795b296d0Smrg 948814330f12Smrg# @configure_input@ 94892378475aSmrg 949014330f12Smrg# serial 3293 ltversion.m4 949114330f12Smrg# This file is part of GNU Libtool 94922378475aSmrg 949314330f12Smrgm4_define([LT_PACKAGE_VERSION], [2.4]) 949414330f12Smrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 949595b296d0Smrg 949614330f12SmrgAC_DEFUN([LTVERSION_VERSION], 949714330f12Smrg[macro_version='2.4' 949814330f12Smrgmacro_revision='1.3293' 949914330f12Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 950014330f12Smrg_LT_DECL(, macro_revision, 0) 950114330f12Smrg]) 950295b296d0Smrg 950314330f12Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 950439713583Smrg# 950514330f12Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 950614330f12Smrg# Written by Scott James Remnant, 2004. 95072378475aSmrg# 950814330f12Smrg# This file is free software; the Free Software Foundation gives 950914330f12Smrg# unlimited permission to copy and/or distribute it, with or without 951014330f12Smrg# modifications, as long as this notice is preserved. 95112378475aSmrg 951214330f12Smrg# serial 5 lt~obsolete.m4 95132378475aSmrg 951414330f12Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 95152378475aSmrg# 951614330f12Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 951714330f12Smrg# which have later been changed to m4_define as they aren't part of the 951814330f12Smrg# exported API, or moved to Autoconf or Automake where they belong. 95192378475aSmrg# 952014330f12Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 952114330f12Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 952214330f12Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 952314330f12Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 952414330f12Smrg# and doesn't know about Autoconf macros at all.) 95252378475aSmrg# 952614330f12Smrg# So we provide this file, which has a silly filename so it's always 952714330f12Smrg# included after everything else. This provides aclocal with the 952814330f12Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 952914330f12Smrg# because those macros already exist, or will be overwritten later. 953014330f12Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 95312378475aSmrg# 953214330f12Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 953314330f12Smrg# Yes, that means every name once taken will need to remain here until 953414330f12Smrg# we give up compatibility with versions before 1.7, at which point 953514330f12Smrg# we need to keep only those names which we still refer to. 953695b296d0Smrg 953714330f12Smrg# This is to help aclocal find these macros, as it can't see m4_define. 953814330f12SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 953914330f12Smrg 954014330f12Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 954114330f12Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 954214330f12Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 954314330f12Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 954414330f12Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 954514330f12Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 954614330f12Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 954714330f12Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 954814330f12Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 954914330f12Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 955014330f12Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 955114330f12Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 955214330f12Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 955314330f12Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 955414330f12Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 955514330f12Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 955614330f12Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 955714330f12Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 955814330f12Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 955914330f12Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 956014330f12Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 956114330f12Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 956214330f12Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 956314330f12Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 956414330f12Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 956514330f12Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 956614330f12Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 956714330f12Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 956814330f12Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 956914330f12Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 957014330f12Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 957114330f12Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 957214330f12Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 957314330f12Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 957414330f12Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 957514330f12Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 957614330f12Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 957714330f12Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 957814330f12Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 957914330f12Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 958014330f12Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 958114330f12Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 958214330f12Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 958314330f12Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 958414330f12Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 958514330f12Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 958614330f12Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 958714330f12Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 958814330f12Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 958914330f12Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 959014330f12Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 959114330f12Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 959214330f12Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 959314330f12Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 959414330f12Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 959514330f12Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 959614330f12Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 959714330f12Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 959814330f12Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 959914330f12Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 960014330f12Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 960195b296d0Smrg 960214330f12Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 960314330f12Smrgdnl 960414330f12Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 960514330f12Smrgdnl 960614330f12Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 960714330f12Smrgdnl copy of this software and associated documentation files (the "Software"), 960814330f12Smrgdnl to deal in the Software without restriction, including without limitation 960914330f12Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 961014330f12Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 961114330f12Smrgdnl Software is furnished to do so, subject to the following conditions: 961214330f12Smrgdnl 961314330f12Smrgdnl The above copyright notice and this permission notice (including the next 961414330f12Smrgdnl paragraph) shall be included in all copies or substantial portions of the 961514330f12Smrgdnl Software. 961614330f12Smrgdnl 961714330f12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 961814330f12Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 961914330f12Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 962014330f12Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 962114330f12Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 962214330f12Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 962314330f12Smrgdnl DEALINGS IN THE SOFTWARE. 962414330f12Smrg 962514330f12Smrg# XORG_MACROS_VERSION(required-version) 962614330f12Smrg# ------------------------------------- 962714330f12Smrg# Minimum version: 1.1.0 962839713583Smrg# 962914330f12Smrg# If you're using a macro added in Version 1.1 or newer, include this in 963014330f12Smrg# your configure.ac with the minimum required version, such as: 963114330f12Smrg# XORG_MACROS_VERSION(1.1) 963239713583Smrg# 963314330f12Smrg# To ensure that this macro is defined, also add: 963414330f12Smrg# m4_ifndef([XORG_MACROS_VERSION], 963514330f12Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 963639713583Smrg# 963714330f12Smrg# 963814330f12Smrg# See the "minimum version" comment for each macro you use to see what 963914330f12Smrg# version you require. 964014330f12Smrgm4_defun([XORG_MACROS_VERSION],[ 964114330f12Smrgm4_define([vers_have], [1.17]) 964214330f12Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 964314330f12Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 964414330f12Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 964514330f12Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 964614330f12Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 964714330f12Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 964814330f12Smrgm4_undefine([vers_have]) 964914330f12Smrgm4_undefine([maj_have]) 965014330f12Smrgm4_undefine([maj_needed]) 965114330f12Smrg]) # XORG_MACROS_VERSION 965239713583Smrg 965314330f12Smrg# XORG_PROG_RAWCPP() 965414330f12Smrg# ------------------ 965514330f12Smrg# Minimum version: 1.0.0 965614330f12Smrg# 965714330f12Smrg# Find cpp program and necessary flags for use in pre-processing text files 965814330f12Smrg# such as man pages and config files 965914330f12SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 966014330f12SmrgAC_REQUIRE([AC_PROG_CPP]) 966114330f12SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 966214330f12Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 96632378475aSmrg 966414330f12Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 966514330f12Smrg# which is not the best choice for supporting other OS'es, but covers most 966614330f12Smrg# of the ones we need for now. 966714330f12SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 966814330f12SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 966914330f12Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967014330f12Smrg AC_MSG_RESULT([no]) 967114330f12Smrgelse 967214330f12Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967314330f12Smrg RAWCPPFLAGS=-undef 967414330f12Smrg AC_MSG_RESULT([yes]) 967514330f12Smrg # under Cygwin unix is still defined even with -undef 967614330f12Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967714330f12Smrg RAWCPPFLAGS="-undef -ansi" 967814330f12Smrg AC_MSG_RESULT([yes, with -ansi]) 967914330f12Smrg else 968014330f12Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 968114330f12Smrg fi 968214330f12Smrgfi 968314330f12Smrgrm -f conftest.$ac_ext 96842378475aSmrg 968514330f12SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 968614330f12SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 968714330f12Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 968814330f12Smrg AC_MSG_RESULT([no]) 968914330f12Smrgelse 969014330f12Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 969114330f12Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 969214330f12Smrg AC_MSG_RESULT([yes]) 969314330f12Smrg else 969414330f12Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 96952378475aSmrg fi 969614330f12Smrgfi 969714330f12Smrgrm -f conftest.$ac_ext 969814330f12SmrgAC_SUBST(RAWCPPFLAGS) 969914330f12Smrg]) # XORG_PROG_RAWCPP 97002378475aSmrg 970114330f12Smrg# XORG_MANPAGE_SECTIONS() 970214330f12Smrg# ----------------------- 970314330f12Smrg# Minimum version: 1.0.0 970495b296d0Smrg# 970514330f12Smrg# Determine which sections man pages go in for the different man page types 970614330f12Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 970714330f12Smrg# Not sure if there's any better way than just hardcoding by OS name. 970814330f12Smrg# Override default settings by setting environment variables 970914330f12Smrg# Added MAN_SUBSTS in version 1.8 971014330f12Smrg# Added AC_PROG_SED in version 1.8 971195b296d0Smrg 971214330f12SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 971314330f12SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 971414330f12SmrgAC_REQUIRE([AC_PROG_SED]) 971595b296d0Smrg 971614330f12Smrgif test x$APP_MAN_SUFFIX = x ; then 971714330f12Smrg APP_MAN_SUFFIX=1 971814330f12Smrgfi 971914330f12Smrgif test x$APP_MAN_DIR = x ; then 972014330f12Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 972114330f12Smrgfi 972295b296d0Smrg 972314330f12Smrgif test x$LIB_MAN_SUFFIX = x ; then 972414330f12Smrg LIB_MAN_SUFFIX=3 972514330f12Smrgfi 972614330f12Smrgif test x$LIB_MAN_DIR = x ; then 972714330f12Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 972814330f12Smrgfi 972995b296d0Smrg 973014330f12Smrgif test x$FILE_MAN_SUFFIX = x ; then 973114330f12Smrg case $host_os in 973214330f12Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 973314330f12Smrg *) FILE_MAN_SUFFIX=5 ;; 973414330f12Smrg esac 973514330f12Smrgfi 973614330f12Smrgif test x$FILE_MAN_DIR = x ; then 973714330f12Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 973814330f12Smrgfi 973995b296d0Smrg 974014330f12Smrgif test x$MISC_MAN_SUFFIX = x ; then 974114330f12Smrg case $host_os in 974214330f12Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 974314330f12Smrg *) MISC_MAN_SUFFIX=7 ;; 974414330f12Smrg esac 974514330f12Smrgfi 974614330f12Smrgif test x$MISC_MAN_DIR = x ; then 974714330f12Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 974814330f12Smrgfi 974995b296d0Smrg 975014330f12Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 975114330f12Smrg case $host_os in 975214330f12Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 975314330f12Smrg *) DRIVER_MAN_SUFFIX=4 ;; 975414330f12Smrg esac 975514330f12Smrgfi 975614330f12Smrgif test x$DRIVER_MAN_DIR = x ; then 975714330f12Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 975814330f12Smrgfi 975995b296d0Smrg 976014330f12Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 976114330f12Smrg case $host_os in 976214330f12Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 976314330f12Smrg *) ADMIN_MAN_SUFFIX=8 ;; 976414330f12Smrg esac 976514330f12Smrgfi 976614330f12Smrgif test x$ADMIN_MAN_DIR = x ; then 976714330f12Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 976895b296d0Smrgfi 976995b296d0Smrg 977095b296d0Smrg 977114330f12SmrgAC_SUBST([APP_MAN_SUFFIX]) 977214330f12SmrgAC_SUBST([LIB_MAN_SUFFIX]) 977314330f12SmrgAC_SUBST([FILE_MAN_SUFFIX]) 977414330f12SmrgAC_SUBST([MISC_MAN_SUFFIX]) 977514330f12SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 977614330f12SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 977714330f12SmrgAC_SUBST([APP_MAN_DIR]) 977814330f12SmrgAC_SUBST([LIB_MAN_DIR]) 977914330f12SmrgAC_SUBST([FILE_MAN_DIR]) 978014330f12SmrgAC_SUBST([MISC_MAN_DIR]) 978114330f12SmrgAC_SUBST([DRIVER_MAN_DIR]) 978214330f12SmrgAC_SUBST([ADMIN_MAN_DIR]) 978395b296d0Smrg 978414330f12SmrgXORG_MAN_PAGE="X Version 11" 978514330f12SmrgAC_SUBST([XORG_MAN_PAGE]) 978614330f12SmrgMAN_SUBSTS="\ 978714330f12Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 978814330f12Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 978914330f12Smrg -e 's|__xservername__|Xorg|g' \ 979014330f12Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 979114330f12Smrg -e 's|__projectroot__|\$(prefix)|g' \ 979214330f12Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 979314330f12Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 979414330f12Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 979514330f12Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 979614330f12Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 979714330f12Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 979814330f12Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 979914330f12SmrgAC_SUBST([MAN_SUBSTS]) 980095b296d0Smrg 980114330f12Smrg]) # XORG_MANPAGE_SECTIONS 980295b296d0Smrg 980314330f12Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 980414330f12Smrg# ------------------------ 980514330f12Smrg# Minimum version: 1.7.0 980695b296d0Smrg# 980714330f12Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 980814330f12Smrg# provided by xorg-sgml-doctools, if installed. 980914330f12SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 981014330f12SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 981114330f12SmrgXORG_SGML_PATH= 981214330f12SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 981314330f12Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 981414330f12Smrg [m4_ifval([$1],[:], 981514330f12Smrg [if test x"$cross_compiling" != x"yes" ; then 981614330f12Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 981714330f12Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 981814330f12Smrg fi]) 981914330f12Smrg ]) 982095b296d0Smrg 982114330f12Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 982214330f12Smrg# the path and the name of the doc stylesheet 982314330f12Smrgif test "x$XORG_SGML_PATH" != "x" ; then 982414330f12Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 982514330f12Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 982614330f12Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 982714330f12Smrgelse 982814330f12Smrg AC_MSG_RESULT([no]) 982914330f12Smrgfi 9830e6f085baSmrg 983114330f12SmrgAC_SUBST(XORG_SGML_PATH) 983214330f12SmrgAC_SUBST(STYLESHEET_SRCDIR) 983314330f12SmrgAC_SUBST(XSL_STYLESHEET) 983414330f12SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 983514330f12Smrg]) # XORG_CHECK_SGML_DOCTOOLS 983695b296d0Smrg 983714330f12Smrg# XORG_CHECK_LINUXDOC 983814330f12Smrg# ------------------- 983914330f12Smrg# Minimum version: 1.0.0 984014330f12Smrg# 984114330f12Smrg# Defines the variable MAKE_TEXT if the necessary tools and 984214330f12Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 984314330f12Smrg# Whether or not the necessary tools and files are found can be checked 984414330f12Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 984514330f12SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 984614330f12SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 984714330f12SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 984895b296d0Smrg 984914330f12SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 985014330f12Smrg 985114330f12SmrgAC_MSG_CHECKING([whether to build documentation]) 985214330f12Smrg 985314330f12Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 985414330f12Smrg BUILDDOC=yes 985595b296d0Smrgelse 985614330f12Smrg BUILDDOC=no 985795b296d0Smrgfi 985895b296d0Smrg 985914330f12SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 986095b296d0Smrg 986114330f12SmrgAC_MSG_RESULT([$BUILDDOC]) 986295b296d0Smrg 986314330f12SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 986495b296d0Smrg 986514330f12Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 986614330f12Smrg BUILDPDFDOC=yes 986714330f12Smrgelse 986814330f12Smrg BUILDPDFDOC=no 986995b296d0Smrgfi 987095b296d0Smrg 987114330f12SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 987295b296d0Smrg 987314330f12SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 987414330f12Smrg 987514330f12SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 987614330f12SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 987714330f12SmrgMAKE_PDF="$PS2PDF" 987814330f12SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 987914330f12Smrg 988014330f12SmrgAC_SUBST(MAKE_TEXT) 988114330f12SmrgAC_SUBST(MAKE_PS) 988214330f12SmrgAC_SUBST(MAKE_PDF) 988314330f12SmrgAC_SUBST(MAKE_HTML) 988414330f12Smrg]) # XORG_CHECK_LINUXDOC 988514330f12Smrg 988614330f12Smrg# XORG_CHECK_DOCBOOK 988714330f12Smrg# ------------------- 988814330f12Smrg# Minimum version: 1.0.0 988995b296d0Smrg# 989014330f12Smrg# Checks for the ability to build output formats from SGML DocBook source. 989114330f12Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 989214330f12Smrg# indicates whether the necessary tools and files are found and, if set, 989314330f12Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 989414330f12SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 989514330f12SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 989695b296d0Smrg 989714330f12SmrgBUILDTXTDOC=no 989814330f12SmrgBUILDPDFDOC=no 989914330f12SmrgBUILDPSDOC=no 990014330f12SmrgBUILDHTMLDOC=no 990195b296d0Smrg 990214330f12SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 990314330f12SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 990414330f12SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 990514330f12SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 990614330f12Smrg 990714330f12SmrgAC_MSG_CHECKING([whether to build text documentation]) 990814330f12Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 990914330f12Smrg test x$BUILD_TXTDOC != xno; then 991014330f12Smrg BUILDTXTDOC=yes 991114330f12Smrgfi 991214330f12SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 991314330f12SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 991414330f12Smrg 991514330f12SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 991614330f12Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 991714330f12Smrg test x$BUILD_PDFDOC != xno; then 991814330f12Smrg BUILDPDFDOC=yes 991914330f12Smrgfi 992014330f12SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 992114330f12SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 992214330f12Smrg 992314330f12SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 992414330f12Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 992514330f12Smrg test x$BUILD_PSDOC != xno; then 992614330f12Smrg BUILDPSDOC=yes 992714330f12Smrgfi 992814330f12SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 992914330f12SmrgAC_MSG_RESULT([$BUILDPSDOC]) 993014330f12Smrg 993114330f12SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 993214330f12Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 993314330f12Smrg test x$BUILD_HTMLDOC != xno; then 993414330f12Smrg BUILDHTMLDOC=yes 993514330f12Smrgfi 993614330f12SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 993714330f12SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 993814330f12Smrg 993914330f12SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 994014330f12SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 994114330f12SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 994214330f12SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 994314330f12Smrg 994414330f12SmrgAC_SUBST(MAKE_TEXT) 994514330f12SmrgAC_SUBST(MAKE_PS) 994614330f12SmrgAC_SUBST(MAKE_PDF) 994714330f12SmrgAC_SUBST(MAKE_HTML) 994814330f12Smrg]) # XORG_CHECK_DOCBOOK 994914330f12Smrg 995014330f12Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 995114330f12Smrg# ---------------- 995214330f12Smrg# Minimum version: 1.5.0 995314330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 995414330f12Smrg# 995514330f12Smrg# Documentation tools are not always available on all platforms and sometimes 995614330f12Smrg# not at the appropriate level. This macro enables a module to test for the 995714330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 995814330f12Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 995914330f12Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 996014330f12Smrg# --with-xmlto assumes 'auto'. 996114330f12Smrg# 996214330f12Smrg# Interface to module: 996314330f12Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 996414330f12Smrg# XMLTO: returns the path of the xmlto program found 996514330f12Smrg# returns the path set by the user in the environment 996614330f12Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 996714330f12Smrg# 'no' user instructs the module not to use xmlto 996814330f12Smrg# 996914330f12Smrg# Added in version 1.10.0 997014330f12Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 997114330f12Smrg# xmlto for text output requires either lynx, links, or w3m browsers 997214330f12Smrg# 997314330f12Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 997414330f12Smrg# 997514330f12SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 997614330f12SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 997714330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 997814330f12SmrgAC_ARG_WITH(xmlto, 997914330f12Smrg AS_HELP_STRING([--with-xmlto], 998014330f12Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 998114330f12Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 998214330f12Smrgm4_undefine([_defopt]) 998314330f12Smrg 998414330f12Smrgif test "x$use_xmlto" = x"auto"; then 998514330f12Smrg AC_PATH_PROG([XMLTO], [xmlto]) 998614330f12Smrg if test "x$XMLTO" = "x"; then 998714330f12Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 998814330f12Smrg have_xmlto=no 998914330f12Smrg else 999014330f12Smrg have_xmlto=yes 999114330f12Smrg fi 999214330f12Smrgelif test "x$use_xmlto" = x"yes" ; then 999314330f12Smrg AC_PATH_PROG([XMLTO], [xmlto]) 999414330f12Smrg if test "x$XMLTO" = "x"; then 999514330f12Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 999614330f12Smrg fi 999714330f12Smrg have_xmlto=yes 999814330f12Smrgelif test "x$use_xmlto" = x"no" ; then 999914330f12Smrg if test "x$XMLTO" != "x"; then 1000014330f12Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1000114330f12Smrg fi 1000214330f12Smrg have_xmlto=no 1000314330f12Smrgelse 1000414330f12Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1000514330f12Smrgfi 1000614330f12Smrg 1000714330f12Smrg# Test for a minimum version of xmlto, if provided. 1000814330f12Smrgm4_ifval([$1], 1000914330f12Smrg[if test "$have_xmlto" = yes; then 1001014330f12Smrg # scrape the xmlto version 1001114330f12Smrg AC_MSG_CHECKING([the xmlto version]) 1001214330f12Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1001314330f12Smrg AC_MSG_RESULT([$xmlto_version]) 1001414330f12Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1001514330f12Smrg [if test "x$use_xmlto" = xauto; then 1001614330f12Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1001714330f12Smrg have_xmlto=no 1001814330f12Smrg else 1001914330f12Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1002014330f12Smrg fi]) 1002114330f12Smrgfi]) 1002214330f12Smrg 1002314330f12Smrg# Test for the ability of xmlto to generate a text target 1002414330f12Smrghave_xmlto_text=no 1002514330f12Smrgcat > conftest.xml << "EOF" 1002614330f12SmrgEOF 1002714330f12SmrgAS_IF([test "$have_xmlto" = yes], 1002814330f12Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1002914330f12Smrg [have_xmlto_text=yes], 1003014330f12Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1003114330f12Smrgrm -f conftest.xml 1003214330f12SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1003314330f12SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1003414330f12Smrg]) # XORG_WITH_XMLTO 1003514330f12Smrg 1003614330f12Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1003714330f12Smrg# -------------------------------------------- 1003814330f12Smrg# Minimum version: 1.12.0 1003914330f12Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1004014330f12Smrg# 1004114330f12Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1004214330f12Smrg# XML-based language used for the transformation of XML documents. 1004314330f12Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1004414330f12Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1004514330f12Smrg# The XSLT processor is often used as a standalone tool for transformations. 1004614330f12Smrg# It should not be assumed that this tool is used only to work with documnetation. 1004714330f12Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1004814330f12Smrg# 1004914330f12Smrg# Interface to module: 1005014330f12Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1005114330f12Smrg# XSLTPROC: returns the path of the xsltproc program found 1005214330f12Smrg# returns the path set by the user in the environment 1005314330f12Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1005414330f12Smrg# 'no' user instructs the module not to use xsltproc 1005514330f12Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1005614330f12Smrg# 1005714330f12Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1005814330f12Smrg# 1005914330f12SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1006014330f12SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1006114330f12Smrg# Preserves the interface, should it be implemented later 1006214330f12Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1006314330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1006414330f12SmrgAC_ARG_WITH(xsltproc, 1006514330f12Smrg AS_HELP_STRING([--with-xsltproc], 1006614330f12Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1006714330f12Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1006814330f12Smrgm4_undefine([_defopt]) 1006914330f12Smrg 1007014330f12Smrgif test "x$use_xsltproc" = x"auto"; then 1007114330f12Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1007214330f12Smrg if test "x$XSLTPROC" = "x"; then 1007314330f12Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1007414330f12Smrg have_xsltproc=no 1007514330f12Smrg else 1007614330f12Smrg have_xsltproc=yes 1007714330f12Smrg fi 1007814330f12Smrgelif test "x$use_xsltproc" = x"yes" ; then 1007914330f12Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1008014330f12Smrg if test "x$XSLTPROC" = "x"; then 1008114330f12Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1008214330f12Smrg fi 1008314330f12Smrg have_xsltproc=yes 1008414330f12Smrgelif test "x$use_xsltproc" = x"no" ; then 1008514330f12Smrg if test "x$XSLTPROC" != "x"; then 1008614330f12Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1008714330f12Smrg fi 1008814330f12Smrg have_xsltproc=no 1008914330f12Smrgelse 1009014330f12Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1009114330f12Smrgfi 1009295b296d0Smrg 1009314330f12SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1009414330f12Smrg]) # XORG_WITH_XSLTPROC 1009595b296d0Smrg 1009614330f12Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1009714330f12Smrg# ---------------------------------------- 1009814330f12Smrg# Minimum version: 1.15.0 1009995b296d0Smrg# 1010014330f12Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1010114330f12Smrg# scanning arbitrary text files, extracting information from those text files, 1010214330f12Smrg# and printing reports based on that information. 1010314330f12Smrg# 1010414330f12Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1010514330f12Smrg# 1010614330f12Smrg# Interface to module: 1010714330f12Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1010814330f12Smrg# PERL: returns the path of the perl program found 1010914330f12Smrg# returns the path set by the user in the environment 1011014330f12Smrg# --with-perl: 'yes' user instructs the module to use perl 1011114330f12Smrg# 'no' user instructs the module not to use perl 1011214330f12Smrg# have_perl: returns yes if perl found in PATH or no 1011314330f12Smrg# 1011414330f12Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1011514330f12Smrg# 1011614330f12SmrgAC_DEFUN([XORG_WITH_PERL],[ 1011714330f12SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1011814330f12Smrg# Preserves the interface, should it be implemented later 1011914330f12Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1012014330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1012114330f12SmrgAC_ARG_WITH(perl, 1012214330f12Smrg AS_HELP_STRING([--with-perl], 1012314330f12Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1012414330f12Smrg [use_perl=$withval], [use_perl=]_defopt) 1012514330f12Smrgm4_undefine([_defopt]) 1012614330f12Smrg 1012714330f12Smrgif test "x$use_perl" = x"auto"; then 1012814330f12Smrg AC_PATH_PROG([PERL], [perl]) 1012914330f12Smrg if test "x$PERL" = "x"; then 1013014330f12Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1013114330f12Smrg have_perl=no 1013214330f12Smrg else 1013314330f12Smrg have_perl=yes 1013414330f12Smrg fi 1013514330f12Smrgelif test "x$use_perl" = x"yes" ; then 1013614330f12Smrg AC_PATH_PROG([PERL], [perl]) 1013714330f12Smrg if test "x$PERL" = "x"; then 1013814330f12Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1013914330f12Smrg fi 1014014330f12Smrg have_perl=yes 1014114330f12Smrgelif test "x$use_perl" = x"no" ; then 1014214330f12Smrg if test "x$PERL" != "x"; then 1014314330f12Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1014414330f12Smrg fi 1014514330f12Smrg have_perl=no 1014614330f12Smrgelse 1014714330f12Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1014814330f12Smrgfi 1014995b296d0Smrg 1015014330f12SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1015114330f12Smrg]) # XORG_WITH_PERL 1015214330f12Smrg 1015314330f12Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1015414330f12Smrg# ---------------- 1015514330f12Smrg# Minimum version: 1.5.0 1015614330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1015795b296d0Smrg# 1015814330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1015914330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1016014330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1016114330f12Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1016214330f12Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1016314330f12Smrg# --with-asciidoc assumes 'auto'. 1016414330f12Smrg# 1016514330f12Smrg# Interface to module: 1016614330f12Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1016714330f12Smrg# ASCIIDOC: returns the path of the asciidoc program found 1016814330f12Smrg# returns the path set by the user in the environment 1016914330f12Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1017014330f12Smrg# 'no' user instructs the module not to use asciidoc 1017114330f12Smrg# 1017214330f12Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1017314330f12Smrg# 1017414330f12SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1017514330f12SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1017614330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1017714330f12SmrgAC_ARG_WITH(asciidoc, 1017814330f12Smrg AS_HELP_STRING([--with-asciidoc], 1017914330f12Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1018014330f12Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1018114330f12Smrgm4_undefine([_defopt]) 1018295b296d0Smrg 1018314330f12Smrgif test "x$use_asciidoc" = x"auto"; then 1018414330f12Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1018514330f12Smrg if test "x$ASCIIDOC" = "x"; then 1018614330f12Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1018714330f12Smrg have_asciidoc=no 1018814330f12Smrg else 1018914330f12Smrg have_asciidoc=yes 1019014330f12Smrg fi 1019114330f12Smrgelif test "x$use_asciidoc" = x"yes" ; then 1019214330f12Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1019314330f12Smrg if test "x$ASCIIDOC" = "x"; then 1019414330f12Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1019514330f12Smrg fi 1019614330f12Smrg have_asciidoc=yes 1019714330f12Smrgelif test "x$use_asciidoc" = x"no" ; then 1019814330f12Smrg if test "x$ASCIIDOC" != "x"; then 1019914330f12Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1020014330f12Smrg fi 1020114330f12Smrg have_asciidoc=no 1020214330f12Smrgelse 1020314330f12Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1020414330f12Smrgfi 1020514330f12Smrgm4_ifval([$1], 1020614330f12Smrg[if test "$have_asciidoc" = yes; then 1020714330f12Smrg # scrape the asciidoc version 1020814330f12Smrg AC_MSG_CHECKING([the asciidoc version]) 1020914330f12Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1021014330f12Smrg AC_MSG_RESULT([$asciidoc_version]) 1021114330f12Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1021214330f12Smrg [if test "x$use_asciidoc" = xauto; then 1021314330f12Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1021414330f12Smrg have_asciidoc=no 1021514330f12Smrg else 1021614330f12Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1021714330f12Smrg fi]) 1021814330f12Smrgfi]) 1021914330f12SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1022014330f12Smrg]) # XORG_WITH_ASCIIDOC 1022195b296d0Smrg 1022214330f12Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1022314330f12Smrg# -------------------------------- 1022414330f12Smrg# Minimum version: 1.5.0 1022514330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1022614330f12Smrg# 1022714330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1022814330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1022914330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1023014330f12Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1023114330f12Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1023214330f12Smrg# --with-doxygen assumes 'auto'. 1023314330f12Smrg# 1023414330f12Smrg# Interface to module: 1023514330f12Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1023614330f12Smrg# DOXYGEN: returns the path of the doxygen program found 1023714330f12Smrg# returns the path set by the user in the environment 1023814330f12Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1023914330f12Smrg# 'no' user instructs the module not to use doxygen 1024014330f12Smrg# 1024114330f12Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1024214330f12Smrg# 1024314330f12SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1024414330f12SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1024514330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1024614330f12SmrgAC_ARG_WITH(doxygen, 1024714330f12Smrg AS_HELP_STRING([--with-doxygen], 1024814330f12Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1024914330f12Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1025014330f12Smrgm4_undefine([_defopt]) 1025195b296d0Smrg 1025214330f12Smrgif test "x$use_doxygen" = x"auto"; then 1025314330f12Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1025414330f12Smrg if test "x$DOXYGEN" = "x"; then 1025514330f12Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1025614330f12Smrg have_doxygen=no 1025714330f12Smrg else 1025814330f12Smrg have_doxygen=yes 1025914330f12Smrg fi 1026014330f12Smrgelif test "x$use_doxygen" = x"yes" ; then 1026114330f12Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1026214330f12Smrg if test "x$DOXYGEN" = "x"; then 1026314330f12Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1026414330f12Smrg fi 1026514330f12Smrg have_doxygen=yes 1026614330f12Smrgelif test "x$use_doxygen" = x"no" ; then 1026714330f12Smrg if test "x$DOXYGEN" != "x"; then 1026814330f12Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1026914330f12Smrg fi 1027014330f12Smrg have_doxygen=no 1027114330f12Smrgelse 1027214330f12Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1027314330f12Smrgfi 1027414330f12Smrgm4_ifval([$1], 1027514330f12Smrg[if test "$have_doxygen" = yes; then 1027614330f12Smrg # scrape the doxygen version 1027714330f12Smrg AC_MSG_CHECKING([the doxygen version]) 1027814330f12Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1027914330f12Smrg AC_MSG_RESULT([$doxygen_version]) 1028014330f12Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1028114330f12Smrg [if test "x$use_doxygen" = xauto; then 1028214330f12Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1028314330f12Smrg have_doxygen=no 1028414330f12Smrg else 1028514330f12Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1028614330f12Smrg fi]) 1028714330f12Smrgfi]) 1028814330f12SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1028914330f12Smrg]) # XORG_WITH_DOXYGEN 1029095b296d0Smrg 1029114330f12Smrg# XORG_WITH_GROFF([DEFAULT]) 1029214330f12Smrg# ---------------- 1029314330f12Smrg# Minimum version: 1.6.0 1029414330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1029595b296d0Smrg# 1029614330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1029714330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1029814330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1029914330f12Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1030014330f12Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1030114330f12Smrg# --with-groff assumes 'auto'. 1030214330f12Smrg# 1030314330f12Smrg# Interface to module: 1030414330f12Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1030514330f12Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1030614330f12Smrg# HAVE_GROFF_MS: the -ms macros package 1030714330f12Smrg# GROFF: returns the path of the groff program found 1030814330f12Smrg# returns the path set by the user in the environment 1030914330f12Smrg# --with-groff: 'yes' user instructs the module to use groff 1031014330f12Smrg# 'no' user instructs the module not to use groff 1031114330f12Smrg# 1031214330f12Smrg# Added in version 1.9.0: 1031314330f12Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1031414330f12Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1031514330f12Smrg# psselect from the psutils package. 1031614330f12Smrg# the ghostcript package. Refer to the grohtml man pages 1031714330f12Smrg# 1031814330f12Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1031914330f12Smrg# 1032014330f12Smrg# OS and distros often splits groff in a basic and full package, the former 1032114330f12Smrg# having the groff program and the later having devices, fonts and macros 1032214330f12Smrg# Checking for the groff executable is not enough. 1032314330f12Smrg# 1032414330f12Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1032514330f12Smrg# unset HAVE_GROFF or GROFF env variables. 1032614330f12Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1032714330f12Smrg# 1032814330f12SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1032914330f12SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1033014330f12Smrgm4_define([_defopt], m4_default([$1], [auto])) 1033114330f12SmrgAC_ARG_WITH(groff, 1033214330f12Smrg AS_HELP_STRING([--with-groff], 1033314330f12Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1033414330f12Smrg [use_groff=$withval], [use_groff=]_defopt) 1033514330f12Smrgm4_undefine([_defopt]) 1033695b296d0Smrg 1033714330f12Smrgif test "x$use_groff" = x"auto"; then 1033814330f12Smrg AC_PATH_PROG([GROFF], [groff]) 1033914330f12Smrg if test "x$GROFF" = "x"; then 1034014330f12Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1034114330f12Smrg have_groff=no 1034214330f12Smrg else 1034314330f12Smrg have_groff=yes 1034414330f12Smrg fi 1034514330f12Smrgelif test "x$use_groff" = x"yes" ; then 1034614330f12Smrg AC_PATH_PROG([GROFF], [groff]) 1034714330f12Smrg if test "x$GROFF" = "x"; then 1034814330f12Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1034914330f12Smrg fi 1035014330f12Smrg have_groff=yes 1035114330f12Smrgelif test "x$use_groff" = x"no" ; then 1035214330f12Smrg if test "x$GROFF" != "x"; then 1035314330f12Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1035414330f12Smrg fi 1035514330f12Smrg have_groff=no 1035614330f12Smrgelse 1035714330f12Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1035814330f12Smrgfi 1035995b296d0Smrg 1036014330f12Smrg# We have groff, test for the presence of the macro packages 1036114330f12Smrgif test "x$have_groff" = x"yes"; then 1036214330f12Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1036314330f12Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1036414330f12Smrg groff_ms_works=yes 1036514330f12Smrg else 1036614330f12Smrg groff_ms_works=no 1036714330f12Smrg fi 1036814330f12Smrg AC_MSG_RESULT([$groff_ms_works]) 1036914330f12Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1037014330f12Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1037114330f12Smrg groff_mm_works=yes 1037214330f12Smrg else 1037314330f12Smrg groff_mm_works=no 1037414330f12Smrg fi 1037514330f12Smrg AC_MSG_RESULT([$groff_mm_works]) 1037614330f12Smrgfi 1037795b296d0Smrg 1037814330f12Smrg# We have groff, test for HTML dependencies, one command per package 1037914330f12Smrgif test "x$have_groff" = x"yes"; then 1038014330f12Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1038114330f12Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1038214330f12Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1038314330f12Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1038414330f12Smrg have_groff_html=yes 1038514330f12Smrg else 1038614330f12Smrg have_groff_html=no 1038714330f12Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1038814330f12Smrg fi 1038995b296d0Smrgfi 1039095b296d0Smrg 1039114330f12Smrg# Set Automake conditionals for Makefiles 1039214330f12SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1039314330f12SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1039414330f12SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1039514330f12SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1039614330f12Smrg]) # XORG_WITH_GROFF 1039795b296d0Smrg 1039814330f12Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1039914330f12Smrg# --------------------------------------- 1040014330f12Smrg# Minimum version: 1.6.0 1040114330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1040214330f12Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1040314330f12Smrg# 1040414330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1040514330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1040614330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1040714330f12Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1040814330f12Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1040914330f12Smrg# --with-fop assumes 'auto'. 1041014330f12Smrg# 1041114330f12Smrg# Interface to module: 1041214330f12Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1041314330f12Smrg# FOP: returns the path of the fop program found 1041414330f12Smrg# returns the path set by the user in the environment 1041514330f12Smrg# --with-fop: 'yes' user instructs the module to use fop 1041614330f12Smrg# 'no' user instructs the module not to use fop 1041714330f12Smrg# 1041814330f12Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1041914330f12Smrg# 1042014330f12SmrgAC_DEFUN([XORG_WITH_FOP],[ 1042114330f12SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1042214330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1042314330f12SmrgAC_ARG_WITH(fop, 1042414330f12Smrg AS_HELP_STRING([--with-fop], 1042514330f12Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1042614330f12Smrg [use_fop=$withval], [use_fop=]_defopt) 1042714330f12Smrgm4_undefine([_defopt]) 1042895b296d0Smrg 1042914330f12Smrgif test "x$use_fop" = x"auto"; then 1043014330f12Smrg AC_PATH_PROG([FOP], [fop]) 1043114330f12Smrg if test "x$FOP" = "x"; then 1043214330f12Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1043314330f12Smrg have_fop=no 1043414330f12Smrg else 1043514330f12Smrg have_fop=yes 1043614330f12Smrg fi 1043714330f12Smrgelif test "x$use_fop" = x"yes" ; then 1043814330f12Smrg AC_PATH_PROG([FOP], [fop]) 1043914330f12Smrg if test "x$FOP" = "x"; then 1044014330f12Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1044114330f12Smrg fi 1044214330f12Smrg have_fop=yes 1044314330f12Smrgelif test "x$use_fop" = x"no" ; then 1044414330f12Smrg if test "x$FOP" != "x"; then 1044514330f12Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1044614330f12Smrg fi 1044714330f12Smrg have_fop=no 1044814330f12Smrgelse 1044914330f12Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1045014330f12Smrgfi 1045195b296d0Smrg 1045214330f12Smrg# Test for a minimum version of fop, if provided. 1045314330f12Smrgm4_ifval([$1], 1045414330f12Smrg[if test "$have_fop" = yes; then 1045514330f12Smrg # scrape the fop version 1045614330f12Smrg AC_MSG_CHECKING([for fop minimum version]) 1045714330f12Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1045814330f12Smrg AC_MSG_RESULT([$fop_version]) 1045914330f12Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1046014330f12Smrg [if test "x$use_fop" = xauto; then 1046114330f12Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1046214330f12Smrg have_fop=no 1046314330f12Smrg else 1046414330f12Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1046514330f12Smrg fi]) 1046614330f12Smrgfi]) 1046714330f12SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1046814330f12Smrg]) # XORG_WITH_FOP 1046995b296d0Smrg 1047014330f12Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1047114330f12Smrg# ---------------- 1047214330f12Smrg# Minimum version: 1.6.0 1047314330f12Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1047414330f12Smrg# 1047514330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1047614330f12Smrg# not at the appropriate level. This macro enables a module to test for the 1047714330f12Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1047814330f12Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1047914330f12Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1048014330f12Smrg# --with-ps2pdf assumes 'auto'. 1048114330f12Smrg# 1048214330f12Smrg# Interface to module: 1048314330f12Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1048414330f12Smrg# PS2PDF: returns the path of the ps2pdf program found 1048514330f12Smrg# returns the path set by the user in the environment 1048614330f12Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1048714330f12Smrg# 'no' user instructs the module not to use ps2pdf 1048814330f12Smrg# 1048914330f12Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1049014330f12Smrg# 1049114330f12SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1049214330f12SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1049314330f12Smrgm4_define([_defopt], m4_default([$1], [auto])) 1049414330f12SmrgAC_ARG_WITH(ps2pdf, 1049514330f12Smrg AS_HELP_STRING([--with-ps2pdf], 1049614330f12Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1049714330f12Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1049814330f12Smrgm4_undefine([_defopt]) 10499e6f085baSmrg 1050014330f12Smrgif test "x$use_ps2pdf" = x"auto"; then 1050114330f12Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1050214330f12Smrg if test "x$PS2PDF" = "x"; then 1050314330f12Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1050414330f12Smrg have_ps2pdf=no 1050514330f12Smrg else 1050614330f12Smrg have_ps2pdf=yes 1050714330f12Smrg fi 1050814330f12Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1050914330f12Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1051014330f12Smrg if test "x$PS2PDF" = "x"; then 1051114330f12Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1051214330f12Smrg fi 1051314330f12Smrg have_ps2pdf=yes 1051414330f12Smrgelif test "x$use_ps2pdf" = x"no" ; then 1051514330f12Smrg if test "x$PS2PDF" != "x"; then 1051614330f12Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1051714330f12Smrg fi 1051814330f12Smrg have_ps2pdf=no 1051914330f12Smrgelse 1052014330f12Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1052114330f12Smrgfi 1052214330f12SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1052314330f12Smrg]) # XORG_WITH_PS2PDF 1052495b296d0Smrg 1052514330f12Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1052614330f12Smrg# ---------------- 1052714330f12Smrg# Minimum version: 1.6.0 1052814330f12Smrg# 1052914330f12Smrg# Documentation tools are not always available on all platforms and sometimes 1053014330f12Smrg# not at the appropriate level. This macro enables a builder to skip all 1053114330f12Smrg# documentation targets except traditional man pages. 1053214330f12Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1053314330f12Smrg# maximum flexibilty in controlling documentation building. 1053414330f12Smrg# Refer to: 1053514330f12Smrg# XORG_WITH_XMLTO --with-xmlto 1053614330f12Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1053714330f12Smrg# XORG_WITH_DOXYGEN --with-doxygen 1053814330f12Smrg# XORG_WITH_FOP --with-fop 1053914330f12Smrg# XORG_WITH_GROFF --with-groff 1054014330f12Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1054114330f12Smrg# 1054214330f12Smrg# Interface to module: 1054314330f12Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1054414330f12Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1054514330f12Smrg# 'no' user instructs the module not to generate docs 1054614330f12Smrg# parm1: specify the default value, yes or no. 1054714330f12Smrg# 1054814330f12SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1054914330f12Smrgm4_define([docs_default], m4_default([$1], [yes])) 1055014330f12SmrgAC_ARG_ENABLE(docs, 1055114330f12Smrg AS_HELP_STRING([--enable-docs], 1055214330f12Smrg [Enable building the documentation (default: ]docs_default[)]), 1055314330f12Smrg [build_docs=$enableval], [build_docs=]docs_default) 1055414330f12Smrgm4_undefine([docs_default]) 1055514330f12SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1055614330f12SmrgAC_MSG_CHECKING([whether to build documentation]) 1055714330f12SmrgAC_MSG_RESULT([$build_docs]) 1055814330f12Smrg]) # XORG_ENABLE_DOCS 1055995b296d0Smrg 1056014330f12Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1056114330f12Smrg# ---------------- 1056214330f12Smrg# Minimum version: 1.6.0 1056314330f12Smrg# 1056414330f12Smrg# This macro enables a builder to skip all developer documentation. 1056514330f12Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1056614330f12Smrg# maximum flexibilty in controlling documentation building. 1056714330f12Smrg# Refer to: 1056814330f12Smrg# XORG_WITH_XMLTO --with-xmlto 1056914330f12Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1057014330f12Smrg# XORG_WITH_DOXYGEN --with-doxygen 1057114330f12Smrg# XORG_WITH_FOP --with-fop 1057214330f12Smrg# XORG_WITH_GROFF --with-groff 1057314330f12Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1057414330f12Smrg# 1057514330f12Smrg# Interface to module: 1057614330f12Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1057714330f12Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1057814330f12Smrg# 'no' user instructs the module not to generate developer docs 1057914330f12Smrg# parm1: specify the default value, yes or no. 1058014330f12Smrg# 1058114330f12SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1058214330f12Smrgm4_define([devel_default], m4_default([$1], [yes])) 1058314330f12SmrgAC_ARG_ENABLE(devel-docs, 1058414330f12Smrg AS_HELP_STRING([--enable-devel-docs], 1058514330f12Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1058614330f12Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1058714330f12Smrgm4_undefine([devel_default]) 1058814330f12SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1058914330f12SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1059014330f12SmrgAC_MSG_RESULT([$build_devel_docs]) 1059114330f12Smrg]) # XORG_ENABLE_DEVEL_DOCS 1059295b296d0Smrg 1059314330f12Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1059414330f12Smrg# ---------------- 1059514330f12Smrg# Minimum version: 1.6.0 1059614330f12Smrg# 1059714330f12Smrg# This macro enables a builder to skip all functional specification targets. 1059814330f12Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1059914330f12Smrg# maximum flexibilty in controlling documentation building. 1060014330f12Smrg# Refer to: 1060114330f12Smrg# XORG_WITH_XMLTO --with-xmlto 1060214330f12Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1060314330f12Smrg# XORG_WITH_DOXYGEN --with-doxygen 1060414330f12Smrg# XORG_WITH_FOP --with-fop 1060514330f12Smrg# XORG_WITH_GROFF --with-groff 1060614330f12Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1060795b296d0Smrg# 1060814330f12Smrg# Interface to module: 1060914330f12Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1061014330f12Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1061114330f12Smrg# 'no' user instructs the module not to generate specs 1061214330f12Smrg# parm1: specify the default value, yes or no. 1061314330f12Smrg# 1061414330f12SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1061514330f12Smrgm4_define([spec_default], m4_default([$1], [yes])) 1061614330f12SmrgAC_ARG_ENABLE(specs, 1061714330f12Smrg AS_HELP_STRING([--enable-specs], 1061814330f12Smrg [Enable building the specs (default: ]spec_default[)]), 1061914330f12Smrg [build_specs=$enableval], [build_specs=]spec_default) 1062014330f12Smrgm4_undefine([spec_default]) 1062114330f12SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1062214330f12SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1062314330f12SmrgAC_MSG_RESULT([$build_specs]) 1062414330f12Smrg]) # XORG_ENABLE_SPECS 1062595b296d0Smrg 1062614330f12Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1062714330f12Smrg# ---------------------------------------------- 1062814330f12Smrg# Minimum version: 1.13.0 1062914330f12Smrg# 1063014330f12Smrg# This macro enables a builder to enable/disable unit testing 1063114330f12Smrg# It makes no assumption about the test cases implementation 1063214330f12Smrg# Test cases may or may not use Automake "Support for test suites" 1063314330f12Smrg# They may or may not use the software utility library GLib 1063414330f12Smrg# 1063514330f12Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1063614330f12Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1063714330f12Smrg# The variable enable_unit_tests is used by other macros in this file. 1063814330f12Smrg# 1063914330f12Smrg# Interface to module: 1064014330f12Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1064114330f12Smrg# enable_unit_tests: used in configure.ac for additional configuration 1064214330f12Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1064314330f12Smrg# 'no' user instructs the module not to build tests 1064414330f12Smrg# parm1: specify the default value, yes or no. 1064514330f12Smrg# 1064614330f12SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1064714330f12SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1064814330f12SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1064914330f12SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1065014330f12Smrgm4_define([_defopt], m4_default([$1], [auto])) 1065114330f12SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1065214330f12Smrg [Enable building unit test cases (default: ]_defopt[)]), 1065314330f12Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1065414330f12Smrgm4_undefine([_defopt]) 1065514330f12SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1065614330f12SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1065714330f12SmrgAC_MSG_RESULT([$enable_unit_tests]) 1065814330f12Smrg]) # XORG_ENABLE_UNIT_TESTS 1065914330f12Smrg 1066014330f12Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1066114330f12Smrg# ------------------------------------------------------ 1066214330f12Smrg# Minimum version: 1.17.0 1066314330f12Smrg# 1066414330f12Smrg# This macro enables a builder to enable/disable integration testing 1066514330f12Smrg# It makes no assumption about the test cases' implementation 1066614330f12Smrg# Test cases may or may not use Automake "Support for test suites" 1066714330f12Smrg# 1066814330f12Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1066914330f12Smrg# usually requires less dependencies and may be built and run under less 1067014330f12Smrg# stringent environments than integration tests. 1067114330f12Smrg# 1067214330f12Smrg# Interface to module: 1067314330f12Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1067414330f12Smrg# enable_integration_tests: used in configure.ac for additional configuration 1067514330f12Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1067614330f12Smrg# 'no' user instructs the module not to build tests 1067714330f12Smrg# parm1: specify the default value, yes or no. 1067814330f12Smrg# 1067914330f12SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1068014330f12SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1068114330f12Smrgm4_define([_defopt], m4_default([$1], [auto])) 1068214330f12SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1068314330f12Smrg [Enable building integration test cases (default: ]_defopt[)]), 1068414330f12Smrg [enable_integration_tests=$enableval], 1068514330f12Smrg [enable_integration_tests=]_defopt) 1068614330f12Smrgm4_undefine([_defopt]) 1068714330f12SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1068814330f12Smrg [test "x$enable_integration_tests" != xno]) 1068914330f12SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1069014330f12SmrgAC_MSG_RESULT([$enable_integration_tests]) 1069114330f12Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1069214330f12Smrg 1069314330f12Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1069414330f12Smrg# ---------------------------------------- 1069514330f12Smrg# Minimum version: 1.13.0 1069614330f12Smrg# 1069714330f12Smrg# GLib is a library which provides advanced data structures and functions. 1069814330f12Smrg# This macro enables a module to test for the presence of Glib. 1069914330f12Smrg# 1070014330f12Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1070114330f12Smrg# Otherwise the value of $enable_unit_tests is blank. 1070214330f12Smrg# 1070314330f12Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1070414330f12Smrg# test support usually requires less dependencies and may be built and run under 1070514330f12Smrg# less stringent environments than integration tests. 1070614330f12Smrg# 1070714330f12Smrg# Interface to module: 1070814330f12Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1070914330f12Smrg# with_glib: used in configure.ac to know if GLib has been found 1071014330f12Smrg# --with-glib: 'yes' user instructs the module to use glib 1071114330f12Smrg# 'no' user instructs the module not to use glib 1071214330f12Smrg# 1071314330f12SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1071414330f12SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1071514330f12Smrgm4_define([_defopt], m4_default([$2], [auto])) 1071614330f12SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1071714330f12Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1071814330f12Smrg [with_glib=$withval], [with_glib=]_defopt) 1071914330f12Smrgm4_undefine([_defopt]) 1072014330f12Smrg 1072114330f12Smrghave_glib=no 1072214330f12Smrg# Do not probe GLib if user explicitly disabled unit testing 1072314330f12Smrgif test "x$enable_unit_tests" != x"no"; then 1072414330f12Smrg # Do not probe GLib if user explicitly disabled it 1072514330f12Smrg if test "x$with_glib" != x"no"; then 1072614330f12Smrg m4_ifval( 1072714330f12Smrg [$1], 1072814330f12Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1072914330f12Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1073014330f12Smrg ) 1073114330f12Smrg fi 10732e6f085baSmrgfi 1073395b296d0Smrg 1073414330f12Smrg# Not having GLib when unit testing has been explicitly requested is an error 1073514330f12Smrgif test "x$enable_unit_tests" = x"yes"; then 1073614330f12Smrg if test "x$have_glib" = x"no"; then 1073714330f12Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1073814330f12Smrg fi 1073914330f12Smrgfi 1074095b296d0Smrg 1074114330f12Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1074214330f12Smrgif test "x$enable_unit_tests" = x"no"; then 1074314330f12Smrg if test "x$with_glib" = x"yes"; then 1074414330f12Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1074514330f12Smrg fi 1074614330f12Smrgfi 1074795b296d0Smrg 1074814330f12Smrg# Not having GLib when it has been explicitly requested is an error 1074914330f12Smrgif test "x$with_glib" = x"yes"; then 1075014330f12Smrg if test "x$have_glib" = x"no"; then 1075114330f12Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1075214330f12Smrg fi 1075395b296d0Smrgfi 1075495b296d0Smrg 1075514330f12SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1075614330f12Smrg]) # XORG_WITH_GLIB 1075795b296d0Smrg 1075814330f12Smrg# XORG_LD_WRAP([required|optional]) 1075914330f12Smrg# --------------------------------- 1076014330f12Smrg# Minimum version: 1.13.0 1076114330f12Smrg# 1076214330f12Smrg# Check if linker supports -wrap, passed via compiler flags 1076314330f12Smrg# 1076414330f12Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1076514330f12Smrg# Otherwise the value of $enable_unit_tests is blank. 1076614330f12Smrg# 1076714330f12Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1076814330f12Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1076914330f12Smrg# available, an argument of "optional" allows use when some unit tests require 1077014330f12Smrg# ld -wrap and others do not. 1077114330f12Smrg# 1077214330f12SmrgAC_DEFUN([XORG_LD_WRAP],[ 1077314330f12SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1077414330f12Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1077514330f12Smrg void __wrap_exit(int status) { return; }], 1077614330f12Smrg [exit(0);])]) 1077714330f12Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1077814330f12Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1077914330f12Smrg if test "x$have_ld_wrap" = x"no"; then 1078014330f12Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1078114330f12Smrg fi 1078214330f12Smrgfi 1078314330f12SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1078495b296d0Smrg# 1078514330f12Smrg]) # XORG_LD_WRAP 1078695b296d0Smrg 1078714330f12Smrg# XORG_CHECK_LINKER_FLAGS 1078814330f12Smrg# ----------------------- 1078914330f12Smrg# SYNOPSIS 1079014330f12Smrg# 1079114330f12Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1079214330f12Smrg# 1079314330f12Smrg# DESCRIPTION 1079414330f12Smrg# 1079514330f12Smrg# Check whether the given linker FLAGS work with the current language's 1079614330f12Smrg# linker, or whether they give an error. 1079714330f12Smrg# 1079814330f12Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1079914330f12Smrg# success/failure. 1080014330f12Smrg# 1080114330f12Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1080214330f12Smrg# 1080314330f12Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1080414330f12Smrg# 1080514330f12Smrg# LICENSE 1080614330f12Smrg# 1080714330f12Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1080814330f12Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1080914330f12Smrg# Copyright (c) 2009 Matteo Frigo 1081014330f12Smrg# 1081114330f12Smrg# This program is free software: you can redistribute it and/or modify it 1081214330f12Smrg# under the terms of the GNU General Public License as published by the 1081314330f12Smrg# Free Software Foundation, either version 3 of the License, or (at your 1081414330f12Smrg# option) any later version. 1081514330f12Smrg# 1081614330f12Smrg# This program is distributed in the hope that it will be useful, but 1081714330f12Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1081814330f12Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1081914330f12Smrg# Public License for more details. 1082014330f12Smrg# 1082114330f12Smrg# You should have received a copy of the GNU General Public License along 1082214330f12Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1082314330f12Smrg# 1082414330f12Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1082514330f12Smrg# gives unlimited permission to copy, distribute and modify the configure 1082614330f12Smrg# scripts that are the output of Autoconf when processing the Macro. You 1082714330f12Smrg# need not follow the terms of the GNU General Public License when using 1082814330f12Smrg# or distributing such scripts, even though portions of the text of the 1082914330f12Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1083014330f12Smrg# all other use of the material that constitutes the Autoconf Macro. 1083114330f12Smrg# 1083214330f12Smrg# This special exception to the GPL applies to versions of the Autoconf 1083314330f12Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1083414330f12Smrg# modified version of the Autoconf Macro, you may extend this special 1083514330f12Smrg# exception to the GPL to apply to your modified version as well.# 1083614330f12SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1083714330f12Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1083814330f12Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1083914330f12SmrgAS_LITERAL_IF([$1], 1084014330f12Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1084114330f12Smrg ax_save_FLAGS=$LDFLAGS 1084214330f12Smrg LDFLAGS="$1" 1084314330f12Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1084414330f12Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1084514330f12Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1084614330f12Smrg LDFLAGS=$ax_save_FLAGS])], 1084714330f12Smrg [ax_save_FLAGS=$LDFLAGS 1084814330f12Smrg LDFLAGS="$1" 1084914330f12Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1085014330f12Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1085114330f12Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1085214330f12Smrg LDFLAGS=$ax_save_FLAGS]) 1085314330f12Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1085414330f12SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1085514330f12Smrgif test "x$xorg_check_linker_flags" = xyes; then 1085614330f12Smrg m4_default([$2], :) 1085714330f12Smrgelse 1085814330f12Smrg m4_default([$3], :) 1085914330f12Smrgfi 1086014330f12Smrg]) # XORG_CHECK_LINKER_FLAGS 1086195b296d0Smrg 1086214330f12Smrg# XORG_MEMORY_CHECK_FLAGS 1086314330f12Smrg# ----------------------- 1086414330f12Smrg# Minimum version: 1.16.0 1086595b296d0Smrg# 1086614330f12Smrg# This macro attempts to find appropriate memory checking functionality 1086714330f12Smrg# for various platforms which unit testing code may use to catch various 1086814330f12Smrg# forms of memory allocation and access errors in testing. 1086914330f12Smrg# 1087014330f12Smrg# Interface to module: 1087114330f12Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1087214330f12Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1087314330f12Smrg# 1087414330f12Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1087514330f12Smrg# 1087614330f12SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1087795b296d0Smrg 1087814330f12SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1087914330f12SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1088014330f12Smrg [Environment variables to enable memory checking in tests]) 1088195b296d0Smrg 1088214330f12Smrg# Check for different types of support on different platforms 1088314330f12Smrgcase $host_os in 1088414330f12Smrg solaris*) 1088514330f12Smrg AC_CHECK_LIB([umem], [umem_alloc], 1088614330f12Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1088714330f12Smrg ;; 1088814330f12Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1088914330f12Smrg # both directly and inverted, so should not be 0 or 255. 1089014330f12Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1089114330f12Smrg ;; 1089214330f12Smrg darwin*) 1089314330f12Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1089414330f12Smrg ;; 1089514330f12Smrg *bsd*) 1089614330f12Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1089714330f12Smrg ;; 10898e6f085baSmrgesac 1089914330f12Smrg 1090014330f12Smrg# User supplied flags override default flags 1090114330f12Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1090214330f12Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1090395b296d0Smrgfi 1090495b296d0Smrg 1090514330f12SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1090614330f12Smrg]) # XORG_WITH_LINT 1090795b296d0Smrg 1090814330f12Smrg# XORG_CHECK_MALLOC_ZERO 1090914330f12Smrg# ---------------------- 1091014330f12Smrg# Minimum version: 1.0.0 1091195b296d0Smrg# 1091214330f12Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1091314330f12Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1091414330f12Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1091514330f12SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1091614330f12SmrgAC_ARG_ENABLE(malloc0returnsnull, 1091714330f12Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1091814330f12Smrg [malloc(0) returns NULL (default: auto)]), 1091914330f12Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1092014330f12Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1092195b296d0Smrg 1092214330f12SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1092314330f12Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1092414330f12Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1092514330f12Smrg#include <stdlib.h> 1092614330f12Smrg],[ 1092714330f12Smrg char *m0, *r0, *c0, *p; 1092814330f12Smrg m0 = malloc(0); 1092914330f12Smrg p = malloc(10); 1093014330f12Smrg r0 = realloc(p,0); 1093114330f12Smrg c0 = calloc(0,10); 1093214330f12Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1093314330f12Smrg])], 1093414330f12Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1093514330f12Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1093614330f12Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10937e6f085baSmrgfi 1093814330f12SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1093914330f12Smrg 1094014330f12Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1094114330f12Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1094214330f12Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1094314330f12Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1094495b296d0Smrgelse 1094514330f12Smrg MALLOC_ZERO_CFLAGS="" 1094614330f12Smrg XMALLOC_ZERO_CFLAGS="" 1094714330f12Smrg XTMALLOC_ZERO_CFLAGS="" 1094895b296d0Smrgfi 1094995b296d0Smrg 1095014330f12SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1095114330f12SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1095214330f12SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1095314330f12Smrg]) # XORG_CHECK_MALLOC_ZERO 1095414330f12Smrg 1095514330f12Smrg# XORG_WITH_LINT() 1095614330f12Smrg# ---------------- 1095714330f12Smrg# Minimum version: 1.1.0 1095814330f12Smrg# 1095914330f12Smrg# This macro enables the use of a tool that flags some suspicious and 1096014330f12Smrg# non-portable constructs (likely to be bugs) in C language source code. 1096114330f12Smrg# It will attempt to locate the tool and use appropriate options. 1096214330f12Smrg# There are various lint type tools on different platforms. 1096395b296d0Smrg# 1096414330f12Smrg# Interface to module: 1096514330f12Smrg# LINT: returns the path to the tool found on the platform 1096614330f12Smrg# or the value set to LINT on the configure cmd line 1096714330f12Smrg# also an Automake conditional 1096814330f12Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1096914330f12Smrg# 1097014330f12Smrg# --with-lint: 'yes' user instructs the module to use lint 1097114330f12Smrg# 'no' user instructs the module not to use lint (default) 1097214330f12Smrg# 1097314330f12Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1097414330f12Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1097514330f12Smrg# 1097614330f12SmrgAC_DEFUN([XORG_WITH_LINT],[ 1097795b296d0Smrg 1097814330f12SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1097914330f12SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1098014330f12SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1098114330f12Smrg [Use a lint-style source code checker (default: disabled)])], 1098214330f12Smrg [use_lint=$withval], [use_lint=no]) 1098314330f12Smrg 1098414330f12Smrg# Obtain platform specific info like program name and options 1098514330f12Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1098614330f12Smrgcase $host_os in 1098714330f12Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1098814330f12Smrg lint_name=splint 1098914330f12Smrg lint_options="-badflag" 1099014330f12Smrg ;; 1099114330f12Smrg *freebsd* | *netbsd*) 1099214330f12Smrg lint_name=lint 1099314330f12Smrg lint_options="-u -b" 1099414330f12Smrg ;; 1099514330f12Smrg *solaris*) 1099614330f12Smrg lint_name=lint 1099714330f12Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1099814330f12Smrg ;; 10999ff89ac2bSmrgesac 1100095b296d0Smrg 1100114330f12Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1100214330f12Smrgif test "x$use_lint" = x"yes" ; then 1100314330f12Smrg AC_PATH_PROG([LINT], [$lint_name]) 1100414330f12Smrg if test "x$LINT" = "x"; then 1100514330f12Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1100614330f12Smrg fi 1100714330f12Smrgelif test "x$use_lint" = x"no" ; then 1100814330f12Smrg if test "x$LINT" != "x"; then 1100914330f12Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1101014330f12Smrg fi 1101114330f12Smrgelse 1101214330f12Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1101314330f12Smrgfi 1101495b296d0Smrg 1101514330f12Smrg# User supplied flags override default flags 1101614330f12Smrgif test "x$LINT_FLAGS" != "x"; then 1101714330f12Smrg lint_options=$LINT_FLAGS 1101814330f12Smrgfi 1101995b296d0Smrg 1102014330f12SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1102114330f12SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1102295b296d0Smrg 1102314330f12Smrg]) # XORG_WITH_LINT 1102495b296d0Smrg 1102514330f12Smrg# XORG_LINT_LIBRARY(LIBNAME) 1102614330f12Smrg# -------------------------- 1102714330f12Smrg# Minimum version: 1.1.0 1102814330f12Smrg# 1102914330f12Smrg# Sets up flags for building lint libraries for checking programs that call 1103014330f12Smrg# functions in the library. 1103114330f12Smrg# 1103214330f12Smrg# Interface to module: 1103314330f12Smrg# LINTLIB - Automake variable with the name of lint library file to make 1103414330f12Smrg# MAKE_LINT_LIB - Automake conditional 1103514330f12Smrg# 1103614330f12Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1103714330f12Smrg# - 'no' user instructs the module not to create a lint library (default) 1103895b296d0Smrg 1103914330f12SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1104014330f12SmrgAC_REQUIRE([XORG_WITH_LINT]) 1104114330f12SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1104214330f12Smrg [Create lint library (default: disabled)])], 1104314330f12Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1104495b296d0Smrg 1104514330f12Smrgif test "x$make_lint_lib" = x"yes" ; then 1104614330f12Smrg LINTLIB=llib-l$1.ln 1104714330f12Smrg if test "x$LINT" = "x"; then 1104814330f12Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1104914330f12Smrg fi 1105014330f12Smrgelif test "x$make_lint_lib" != x"no" ; then 1105114330f12Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1105214330f12Smrgfi 1105395b296d0Smrg 1105414330f12SmrgAC_SUBST(LINTLIB) 1105514330f12SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1105695b296d0Smrg 1105714330f12Smrg]) # XORG_LINT_LIBRARY 1105895b296d0Smrg 1105914330f12Smrg# XORG_COMPILER_BRAND 1106014330f12Smrg# ------------------- 1106114330f12Smrg# Minimum version: 1.14.0 1106214330f12Smrg# 1106314330f12Smrg# Checks for various brands of compilers and sets flags as appropriate: 1106414330f12Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1106514330f12Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1106614330f12Smrg# clang compiler - sets CLANGCC to "yes" 1106714330f12Smrg# Intel compiler - sets INTELCC to "yes" 1106814330f12Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1106914330f12Smrg# 1107014330f12SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1107114330f12SmrgAC_LANG_CASE( 1107214330f12Smrg [C], [ 1107314330f12Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1107414330f12Smrg ], 1107514330f12Smrg [C++], [ 1107614330f12Smrg AC_REQUIRE([AC_PROG_CXX]) 1107714330f12Smrg ] 1107814330f12Smrg) 1107914330f12SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1108014330f12SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1108114330f12SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1108214330f12Smrg]) # XORG_COMPILER_BRAND 1108395b296d0Smrg 1108414330f12Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1108595b296d0Smrg# --------------- 1108614330f12Smrg# Minimum version: 1.16.0 1108714330f12Smrg# 1108814330f12Smrg# Test if the compiler works when passed the given flag as a command line argument. 1108914330f12Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1109014330f12Smrg# next flag in the list until there are no more options. 1109114330f12Smrg# 1109214330f12Smrg# Note that this does not guarantee that the compiler supports the flag as some 1109314330f12Smrg# compilers will simply ignore arguments that they do not understand, but we do 1109414330f12Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1109514330f12Smrg# -Werror=unused-command-line-argument 1109614330f12Smrg# 1109714330f12SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1109814330f12Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1109914330f12Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1110014330f12Smrg 1110114330f12SmrgAC_LANG_COMPILER_REQUIRE 1110214330f12Smrg 1110314330f12SmrgAC_LANG_CASE( 1110414330f12Smrg [C], [ 1110514330f12Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1110614330f12Smrg define([PREFIX], [C]) 1110714330f12Smrg define([CACHE_PREFIX], [cc]) 1110814330f12Smrg define([COMPILER], [$CC]) 1110914330f12Smrg ], 1111014330f12Smrg [C++], [ 1111114330f12Smrg define([PREFIX], [CXX]) 1111214330f12Smrg define([CACHE_PREFIX], [cxx]) 1111314330f12Smrg define([COMPILER], [$CXX]) 1111414330f12Smrg ] 1111514330f12Smrg) 11116e6f085baSmrg 1111714330f12Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1111814330f12Smrg 1111914330f12Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1112014330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1112114330f12Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1112214330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1112314330f12Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1112414330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1112514330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1112614330f12Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1112714330f12Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1112814330f12Smrgfi 1112995b296d0Smrg 1113014330f12Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1113114330f12Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1113214330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1113314330f12Smrg fi 1113414330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1113514330f12Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1113614330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1113714330f12Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1113814330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1113914330f12Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1114014330f12Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1114114330f12Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1114214330f12Smrgfi 1114395b296d0Smrg 1114414330f12Smrgfound="no" 1114514330f12Smrgm4_foreach([flag], m4_cdr($@), [ 1114614330f12Smrg if test $found = "no" ; then 1114714330f12Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1114814330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1114914330f12Smrg fi 1115014330f12Smrg 1115114330f12Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1115214330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1115314330f12Smrg fi 1115414330f12Smrg 1115514330f12Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1115614330f12Smrg 1115714330f12Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1115814330f12Smrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 1115914330f12Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1116014330f12Smrg AC_CACHE_VAL($cacheid, 1116114330f12Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1116214330f12Smrg [eval $cacheid=yes], 1116314330f12Smrg [eval $cacheid=no])]) 1116414330f12Smrg 1116514330f12Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1116614330f12Smrg 1116714330f12Smrg eval supported=\$$cacheid 1116814330f12Smrg AC_MSG_RESULT([$supported]) 1116914330f12Smrg if test "$supported" = "yes" ; then 1117014330f12Smrg $1="$$1 ]flag[" 1117114330f12Smrg found="yes" 1117214330f12Smrg fi 1117314330f12Smrg fi 1117414330f12Smrg]) 1117514330f12Smrg]) # XORG_TESTSET_CFLAG 1117614330f12Smrg 1117714330f12Smrg# XORG_COMPILER_FLAGS 1117814330f12Smrg# --------------- 1117914330f12Smrg# Minimum version: 1.16.0 1118014330f12Smrg# 1118114330f12Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1118214330f12Smrg# arguments supported by the selected compiler which do NOT alter the generated 1118314330f12Smrg# code. These arguments will cause the compiler to print various warnings 1118414330f12Smrg# during compilation AND turn a conservative set of warnings into errors. 1118514330f12Smrg# 1118614330f12Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1118714330f12Smrg# future versions of util-macros as options are added to new compilers. 1118814330f12Smrg# 1118914330f12SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1119014330f12SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1119114330f12Smrg 1119214330f12SmrgAC_ARG_ENABLE(selective-werror, 1119314330f12Smrg AS_HELP_STRING([--disable-selective-werror], 1119414330f12Smrg [Turn off selective compiler errors. (default: enabled)]), 1119514330f12Smrg [SELECTIVE_WERROR=$enableval], 1119614330f12Smrg [SELECTIVE_WERROR=yes]) 1119714330f12Smrg 1119814330f12SmrgAC_LANG_CASE( 1119914330f12Smrg [C], [ 1120014330f12Smrg define([PREFIX], [C]) 1120114330f12Smrg ], 1120214330f12Smrg [C++], [ 1120314330f12Smrg define([PREFIX], [CXX]) 1120414330f12Smrg ] 1120514330f12Smrg) 1120614330f12Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1120714330f12Smrgif test "x$SUNCC" = "xyes"; then 1120814330f12Smrg [BASE_]PREFIX[FLAGS]="-v" 1120995b296d0Smrgelse 1121014330f12Smrg [BASE_]PREFIX[FLAGS]="" 1121195b296d0Smrgfi 1121295b296d0Smrg 1121314330f12Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1121414330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1121514330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1121614330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1121714330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1121814330f12Smrg 1121914330f12SmrgAC_LANG_CASE( 1122014330f12Smrg [C], [ 1122114330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1122214330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1122314330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1122414330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1122514330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1122614330f12Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1122714330f12Smrg ] 1122814330f12Smrg) 112292378475aSmrg 1123014330f12Smrg# This chunk adds additional warnings that could catch undesired effects. 1123114330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1123214330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1123314330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1123414330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1123514330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1123614330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1123714330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1123814330f12Smrg 1123914330f12Smrg# These are currently disabled because they are noisy. They will be enabled 1124014330f12Smrg# in the future once the codebase is sufficiently modernized to silence 1124114330f12Smrg# them. For now, I don't want them to drown out the other warnings. 1124214330f12Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1124314330f12Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1124414330f12Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1124514330f12Smrg 1124614330f12Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1124714330f12Smrg# when there are problems that should be fixed. 1124814330f12Smrg 1124914330f12Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1125014330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1125114330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1125214330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1125314330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1125414330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1125514330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1125614330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1125714330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1125814330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1125914330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1126014330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1126114330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1126214330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1126314330f12Smrgelse 1126414330f12SmrgAC_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]) 1126514330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1126614330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1126714330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1126814330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1126914330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1127014330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1127114330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1127214330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1127314330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1127414330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1127514330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1127614330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1127714330f12SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1127814330f12Smrgfi 112792378475aSmrg 1128014330f12SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1128114330f12Smrg]) # XORG_COMPILER_FLAGS 112822378475aSmrg 1128314330f12Smrg# XORG_CWARNFLAGS 1128414330f12Smrg# --------------- 1128514330f12Smrg# Minimum version: 1.2.0 1128614330f12Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1128795b296d0Smrg# 1128814330f12Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1128914330f12Smrg# 1129014330f12Smrg# This function is deprecated because it defines -fno-strict-aliasing 1129114330f12Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1129214330f12Smrg# is needed, then it should be added explicitly in the module when 1129314330f12Smrg# it is updated to use BASE_CFLAGS. 1129414330f12Smrg# 1129514330f12SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1129614330f12SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1129714330f12SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1129814330f12SmrgAC_LANG_CASE( 1129914330f12Smrg [C], [ 1130014330f12Smrg CWARNFLAGS="$BASE_CFLAGS" 1130114330f12Smrg if test "x$GCC" = xyes ; then 1130214330f12Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1130314330f12Smrg fi 1130414330f12Smrg AC_SUBST(CWARNFLAGS) 1130514330f12Smrg ] 1130614330f12Smrg) 1130714330f12Smrg]) # XORG_CWARNFLAGS 1130895b296d0Smrg 1130914330f12Smrg# XORG_STRICT_OPTION 1131014330f12Smrg# ----------------------- 1131114330f12Smrg# Minimum version: 1.3.0 11312ff89ac2bSmrg# 1131314330f12Smrg# Add configure option to enable strict compilation flags, such as treating 1131414330f12Smrg# warnings as fatal errors. 1131514330f12Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1131614330f12Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1131714330f12Smrg# 1131814330f12Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1131914330f12Smrg# when strict compilation is unconditionally desired. 1132014330f12SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1132114330f12SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1132214330f12SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11323ff89ac2bSmrg 1132414330f12SmrgAC_ARG_ENABLE(strict-compilation, 1132514330f12Smrg AS_HELP_STRING([--enable-strict-compilation], 1132614330f12Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1132714330f12Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11328e6f085baSmrg 1132914330f12SmrgAC_LANG_CASE( 1133014330f12Smrg [C], [ 1133114330f12Smrg define([PREFIX], [C]) 1133214330f12Smrg ], 1133314330f12Smrg [C++], [ 1133414330f12Smrg define([PREFIX], [CXX]) 1133514330f12Smrg ] 1133614330f12Smrg) 11337ff89ac2bSmrg 1133814330f12Smrg[STRICT_]PREFIX[FLAGS]="" 1133914330f12SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1134014330f12SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11341e6f085baSmrg 1134214330f12Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1134314330f12Smrg# activate it with -Werror, so we add it here explicitly. 1134414330f12SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1134595b296d0Smrg 1134614330f12Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1134714330f12Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1134814330f12Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1134914330f12Smrgfi 1135014330f12SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1135114330f12SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1135214330f12SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1135314330f12Smrg]) # XORG_STRICT_OPTION 1135414330f12Smrg 1135514330f12Smrg# XORG_DEFAULT_OPTIONS 1135614330f12Smrg# -------------------- 1135714330f12Smrg# Minimum version: 1.3.0 1135895b296d0Smrg# 1135914330f12Smrg# Defines default options for X.Org modules. 1136014330f12Smrg# 1136114330f12SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1136214330f12SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1136314330f12SmrgXORG_COMPILER_FLAGS 1136414330f12SmrgXORG_CWARNFLAGS 1136514330f12SmrgXORG_STRICT_OPTION 1136614330f12SmrgXORG_RELEASE_VERSION 1136714330f12SmrgXORG_CHANGELOG 1136814330f12SmrgXORG_INSTALL 1136914330f12SmrgXORG_MANPAGE_SECTIONS 1137014330f12Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1137114330f12Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1137214330f12Smrg]) # XORG_DEFAULT_OPTIONS 1137395b296d0Smrg 1137414330f12Smrg# XORG_INSTALL() 1137514330f12Smrg# ---------------- 1137614330f12Smrg# Minimum version: 1.4.0 1137714330f12Smrg# 1137814330f12Smrg# Defines the variable INSTALL_CMD as the command to copy 1137914330f12Smrg# INSTALL from $prefix/share/util-macros. 1138014330f12Smrg# 1138114330f12SmrgAC_DEFUN([XORG_INSTALL], [ 1138214330f12SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1138314330f12Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1138414330f12SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1138514330f12Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1138614330f12Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1138714330f12Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1138814330f12SmrgAC_SUBST([INSTALL_CMD]) 1138914330f12Smrg]) # XORG_INSTALL 1139014330f12Smrgdnl Copyright 2005 Red Hat, Inc 1139114330f12Smrgdnl 1139214330f12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1139314330f12Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1139414330f12Smrgdnl the above copyright notice appear in all copies and that both that 1139514330f12Smrgdnl copyright notice and this permission notice appear in supporting 1139614330f12Smrgdnl documentation. 1139714330f12Smrgdnl 1139814330f12Smrgdnl The above copyright notice and this permission notice shall be included 1139914330f12Smrgdnl in all copies or substantial portions of the Software. 1140014330f12Smrgdnl 1140114330f12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1140214330f12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1140314330f12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1140414330f12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1140514330f12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1140614330f12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1140714330f12Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1140814330f12Smrgdnl 1140914330f12Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1141014330f12Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1141114330f12Smrgdnl other dealings in this Software without prior written authorization 1141214330f12Smrgdnl from the copyright holders. 1141314330f12Smrgdnl 1141495b296d0Smrg 1141514330f12Smrg# XORG_RELEASE_VERSION 1141695b296d0Smrg# -------------------- 1141714330f12Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1141814330f12Smrg 1141914330f12SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1142014330f12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1142114330f12Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1142214330f12Smrg [Major version of this package]) 1142314330f12Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1142414330f12Smrg if test "x$PVM" = "x"; then 1142514330f12Smrg PVM="0" 1142614330f12Smrg fi 1142714330f12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1142814330f12Smrg [$PVM], 1142914330f12Smrg [Minor version of this package]) 1143014330f12Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1143114330f12Smrg if test "x$PVP" = "x"; then 1143214330f12Smrg PVP="0" 1143314330f12Smrg fi 1143414330f12Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1143514330f12Smrg [$PVP], 1143614330f12Smrg [Patch version of this package]) 1143714330f12Smrg]) 1143814330f12Smrg 1143914330f12Smrg# XORG_CHANGELOG() 1144014330f12Smrg# ---------------- 1144114330f12Smrg# Minimum version: 1.2.0 1144295b296d0Smrg# 1144314330f12Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1144414330f12Smrg# ChangeLog from git. 1144595b296d0Smrg# 1144614330f12Smrg# 1144714330f12SmrgAC_DEFUN([XORG_CHANGELOG], [ 1144814330f12SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1144914330f12Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1145014330f12Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1145114330f12Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1145214330f12SmrgAC_SUBST([CHANGELOG_CMD]) 1145314330f12Smrg]) # XORG_CHANGELOG 1145495b296d0Smrg 1145514330f12Smrgdnl Copyright 2005 Red Hat, Inc 1145614330f12Smrgdnl 1145714330f12Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1145814330f12Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1145914330f12Smrgdnl the above copyright notice appear in all copies and that both that 1146014330f12Smrgdnl copyright notice and this permission notice appear in supporting 1146114330f12Smrgdnl documentation. 1146214330f12Smrgdnl 1146314330f12Smrgdnl The above copyright notice and this permission notice shall be included 1146414330f12Smrgdnl in all copies or substantial portions of the Software. 1146514330f12Smrgdnl 1146614330f12Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1146714330f12Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1146814330f12Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1146914330f12Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1147014330f12Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1147114330f12Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1147214330f12Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1147314330f12Smrgdnl 1147414330f12Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1147514330f12Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1147614330f12Smrgdnl other dealings in this Software without prior written authorization 1147714330f12Smrgdnl from the copyright holders. 1147814330f12Smrgdnl 1147995b296d0Smrg 1148014330f12Smrg# XORG_DRIVER_CHECK_EXT() 1148114330f12Smrg# -------------------------- 1148214330f12Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 1148314330f12Smrg# is defined, then add $1 to $REQUIRED_MODULES. 1148495b296d0Smrg 1148514330f12SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1148614330f12Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1148714330f12Smrg SAVE_CFLAGS="$CFLAGS" 1148814330f12Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1148914330f12Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1149014330f12Smrg#include "xorg-server.h" 1149114330f12Smrg#if !defined $1 1149214330f12Smrg#error $1 not defined 1149314330f12Smrg#endif 1149414330f12Smrg ]])], 1149514330f12Smrg [_EXT_CHECK=yes], 1149614330f12Smrg [_EXT_CHECK=no]) 1149714330f12Smrg CFLAGS="$SAVE_CFLAGS" 1149814330f12Smrg AC_MSG_CHECKING([if $1 is defined]) 1149914330f12Smrg AC_MSG_RESULT([$_EXT_CHECK]) 1150014330f12Smrg if test "$_EXT_CHECK" != no; then 1150114330f12Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1150214330f12Smrg fi 1150314330f12Smrg]) 1150495b296d0Smrg 11505