aclocal.m4 revision 521070a0
1521070a0Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 24456fccdSmrg 34456fccdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 442d69509Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 54456fccdSmrg# This file is free software; the Free Software Foundation 64456fccdSmrg# gives unlimited permission to copy and/or distribute it, 74456fccdSmrg# with or without modifications, as long as this notice is preserved. 84456fccdSmrg 94456fccdSmrg# This program is distributed in the hope that it will be useful, 104456fccdSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114456fccdSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124456fccdSmrg# PARTICULAR PURPOSE. 134456fccdSmrg 1442d69509Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1542d69509Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16521070a0Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17521070a0Smrg[m4_warning([this file was generated for autoconf 2.65. 1842d69509SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1942d69509SmrgIf you have problems, you may need to regenerate the build system entirely. 2042d69509SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214456fccdSmrg 2242d69509Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2342d69509Smrg# 2442d69509Smrg# This file is free software; the Free Software Foundation 2542d69509Smrg# gives unlimited permission to copy and/or distribute it, 2642d69509Smrg# with or without modifications, as long as this notice is preserved. 274456fccdSmrg 2842d69509Smrg# AM_AUTOMAKE_VERSION(VERSION) 2942d69509Smrg# ---------------------------- 3042d69509Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3142d69509Smrg# generated from the m4 files accompanying Automake X.Y. 3242d69509Smrg# (This private macro should not be called outside this file.) 3342d69509SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3442d69509Smrg[am__api_version='1.11' 3542d69509Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3642d69509Smrgdnl require some minimum version. Point them to the right macro. 37521070a0Smrgm4_if([$1], [1.11.1], [], 3842d69509Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3942d69509Smrg]) 404456fccdSmrg 4142d69509Smrg# _AM_AUTOCONF_VERSION(VERSION) 4242d69509Smrg# ----------------------------- 4342d69509Smrg# aclocal traces this macro to find the Autoconf version. 4442d69509Smrg# This is a private macro too. Using m4_define simplifies 4542d69509Smrg# the logic in aclocal, which can simply ignore this definition. 4642d69509Smrgm4_define([_AM_AUTOCONF_VERSION], []) 474456fccdSmrg 4842d69509Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4942d69509Smrg# ------------------------------- 5042d69509Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5142d69509Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5242d69509SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53521070a0Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5442d69509Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5542d69509Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5642d69509Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 574456fccdSmrg 5842d69509Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 594456fccdSmrg 6042d69509Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6142d69509Smrg# 6242d69509Smrg# This file is free software; the Free Software Foundation 6342d69509Smrg# gives unlimited permission to copy and/or distribute it, 6442d69509Smrg# with or without modifications, as long as this notice is preserved. 654456fccdSmrg 6642d69509Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6742d69509Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6842d69509Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6942d69509Smrg# 7042d69509Smrg# Of course, Automake must honor this variable whenever it calls a 7142d69509Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7242d69509Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7342d69509Smrg# depending on how configure is run. This is pretty annoying, since 7442d69509Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7542d69509Smrg# source directory, any form will work fine, but in subdirectories a 7642d69509Smrg# relative path needs to be adjusted first. 7742d69509Smrg# 7842d69509Smrg# $ac_aux_dir/missing 7942d69509Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8042d69509Smrg# $top_srcdir/$ac_aux_dir/missing 8142d69509Smrg# fails if $ac_aux_dir is absolute, 8242d69509Smrg# fails when called from a subdirectory in a VPATH build with 8342d69509Smrg# a relative $ac_aux_dir 8442d69509Smrg# 8542d69509Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8642d69509Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8742d69509Smrg# harmless because $srcdir is `.', but things will broke when you 8842d69509Smrg# start a VPATH build or use an absolute $srcdir. 8942d69509Smrg# 9042d69509Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9142d69509Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9242d69509Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9342d69509Smrg# and then we would define $MISSING as 9442d69509Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9542d69509Smrg# This will work as long as MISSING is not called from configure, because 9642d69509Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9742d69509Smrg# However there are other variables, like CC, which are often used in 9842d69509Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9942d69509Smrg# 10042d69509Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10142d69509Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10242d69509Smrg# configured tree to be moved without reconfiguration. 1034456fccdSmrg 10442d69509SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10542d69509Smrg[dnl Rely on autoconf to set up CDPATH properly. 10642d69509SmrgAC_PREREQ([2.50])dnl 10742d69509Smrg# expand $ac_aux_dir to an absolute path 10842d69509Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10942d69509Smrg]) 1104456fccdSmrg 11142d69509Smrg# AM_CONDITIONAL -*- Autoconf -*- 1124456fccdSmrg 11342d69509Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11442d69509Smrg# Free Software Foundation, Inc. 11542d69509Smrg# 11642d69509Smrg# This file is free software; the Free Software Foundation 11742d69509Smrg# gives unlimited permission to copy and/or distribute it, 11842d69509Smrg# with or without modifications, as long as this notice is preserved. 1194456fccdSmrg 12042d69509Smrg# serial 9 1214456fccdSmrg 12242d69509Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12342d69509Smrg# ------------------------------------- 12442d69509Smrg# Define a conditional. 12542d69509SmrgAC_DEFUN([AM_CONDITIONAL], 12642d69509Smrg[AC_PREREQ(2.52)dnl 12742d69509Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12842d69509Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12942d69509SmrgAC_SUBST([$1_TRUE])dnl 13042d69509SmrgAC_SUBST([$1_FALSE])dnl 13142d69509Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13242d69509Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13342d69509Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13442d69509Smrgif $2; then 13542d69509Smrg $1_TRUE= 13642d69509Smrg $1_FALSE='#' 13742d69509Smrgelse 13842d69509Smrg $1_TRUE='#' 13942d69509Smrg $1_FALSE= 14042d69509Smrgfi 14142d69509SmrgAC_CONFIG_COMMANDS_PRE( 14242d69509Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14342d69509Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14442d69509SmrgUsually this means the macro was only invoked conditionally.]]) 14542d69509Smrgfi])]) 1464456fccdSmrg 14742d69509Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14842d69509Smrg# Free Software Foundation, Inc. 14942d69509Smrg# 15042d69509Smrg# This file is free software; the Free Software Foundation 15142d69509Smrg# gives unlimited permission to copy and/or distribute it, 15242d69509Smrg# with or without modifications, as long as this notice is preserved. 1534456fccdSmrg 15442d69509Smrg# serial 10 1554456fccdSmrg 15642d69509Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15742d69509Smrg# written in clear, in which case automake, when reading aclocal.m4, 15842d69509Smrg# will think it sees a *use*, and therefore will trigger all it's 15942d69509Smrg# C support machinery. Also note that it means that autoscan, seeing 16042d69509Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1614456fccdSmrg 1624456fccdSmrg 16342d69509Smrg# _AM_DEPENDENCIES(NAME) 16442d69509Smrg# ---------------------- 16542d69509Smrg# See how the compiler implements dependency checking. 16642d69509Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16742d69509Smrg# We try a few techniques and use that to set a single cache variable. 16842d69509Smrg# 16942d69509Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17042d69509Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17142d69509Smrg# dependency, and given that the user is not expected to run this macro, 17242d69509Smrg# just rely on AC_PROG_CC. 17342d69509SmrgAC_DEFUN([_AM_DEPENDENCIES], 17442d69509Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17542d69509SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17642d69509SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17742d69509SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1784456fccdSmrg 17942d69509Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18042d69509Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18142d69509Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18242d69509Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18342d69509Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18442d69509Smrg [depcc="$$1" am_compiler_list=]) 1854456fccdSmrg 18642d69509SmrgAC_CACHE_CHECK([dependency style of $depcc], 18742d69509Smrg [am_cv_$1_dependencies_compiler_type], 18842d69509Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18942d69509Smrg # We make a subdir and do the tests there. Otherwise we can end up 19042d69509Smrg # making bogus files that we don't know about and never remove. For 19142d69509Smrg # instance it was reported that on HP-UX the gcc test will end up 19242d69509Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19342d69509Smrg # in D'. 19442d69509Smrg mkdir conftest.dir 19542d69509Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19642d69509Smrg # using a relative directory. 19742d69509Smrg cp "$am_depcomp" conftest.dir 19842d69509Smrg cd conftest.dir 19942d69509Smrg # We will build objects and dependencies in a subdirectory because 20042d69509Smrg # it helps to detect inapplicable dependency modes. For instance 20142d69509Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20242d69509Smrg # side effect of compilation, but ICC will put the dependencies in 20342d69509Smrg # the current directory while Tru64 will put them in the object 20442d69509Smrg # directory. 20542d69509Smrg mkdir sub 2064456fccdSmrg 20742d69509Smrg am_cv_$1_dependencies_compiler_type=none 20842d69509Smrg if test "$am_compiler_list" = ""; then 20942d69509Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21042d69509Smrg fi 21142d69509Smrg am__universal=false 21242d69509Smrg m4_case([$1], [CC], 21342d69509Smrg [case " $depcc " in #( 21442d69509Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21542d69509Smrg esac], 21642d69509Smrg [CXX], 21742d69509Smrg [case " $depcc " in #( 21842d69509Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21942d69509Smrg esac]) 2204456fccdSmrg 22142d69509Smrg for depmode in $am_compiler_list; do 22242d69509Smrg # Setup a source with many dependencies, because some compilers 22342d69509Smrg # like to wrap large dependency lists on column 80 (with \), and 22442d69509Smrg # we should not choose a depcomp mode which is confused by this. 22542d69509Smrg # 22642d69509Smrg # We need to recreate these files for each test, as the compiler may 22742d69509Smrg # overwrite some of them when testing with obscure command lines. 22842d69509Smrg # This happens at least with the AIX C compiler. 22942d69509Smrg : > sub/conftest.c 23042d69509Smrg for i in 1 2 3 4 5 6; do 23142d69509Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23242d69509Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23342d69509Smrg # Solaris 8's {/usr,}/bin/sh. 23442d69509Smrg touch sub/conftst$i.h 23542d69509Smrg done 23642d69509Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2374456fccdSmrg 23842d69509Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23942d69509Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24042d69509Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24142d69509Smrg # versions had trouble with output in subdirs 24242d69509Smrg am__obj=sub/conftest.${OBJEXT-o} 24342d69509Smrg am__minus_obj="-o $am__obj" 24442d69509Smrg case $depmode in 24542d69509Smrg gcc) 24642d69509Smrg # This depmode causes a compiler race in universal mode. 24742d69509Smrg test "$am__universal" = false || continue 24842d69509Smrg ;; 24942d69509Smrg nosideeffect) 25042d69509Smrg # after this tag, mechanisms are not by side-effect, so they'll 25142d69509Smrg # only be used when explicitly requested 25242d69509Smrg if test "x$enable_dependency_tracking" = xyes; then 25342d69509Smrg continue 25442d69509Smrg else 25542d69509Smrg break 25642d69509Smrg fi 25742d69509Smrg ;; 25842d69509Smrg msvisualcpp | msvcmsys) 25942d69509Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26042d69509Smrg # not run yet. These depmodes are late enough in the game, and 26142d69509Smrg # so weak that their functioning should not be impacted. 26242d69509Smrg am__obj=conftest.${OBJEXT-o} 26342d69509Smrg am__minus_obj= 26442d69509Smrg ;; 26542d69509Smrg none) break ;; 26642d69509Smrg esac 26742d69509Smrg if depmode=$depmode \ 26842d69509Smrg source=sub/conftest.c object=$am__obj \ 26942d69509Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27042d69509Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27142d69509Smrg >/dev/null 2>conftest.err && 27242d69509Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27342d69509Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27442d69509Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27542d69509Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27642d69509Smrg # icc doesn't choke on unknown options, it will just issue warnings 27742d69509Smrg # or remarks (even with -Werror). So we grep stderr for any message 27842d69509Smrg # that says an option was ignored or not supported. 27942d69509Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28042d69509Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28142d69509Smrg # The diagnosis changed in icc 8.0: 28242d69509Smrg # icc: Command line remark: option '-MP' not supported 28342d69509Smrg if (grep 'ignoring option' conftest.err || 28442d69509Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28542d69509Smrg am_cv_$1_dependencies_compiler_type=$depmode 28642d69509Smrg break 28742d69509Smrg fi 28842d69509Smrg fi 28942d69509Smrg done 2904456fccdSmrg 29142d69509Smrg cd .. 29242d69509Smrg rm -rf conftest.dir 29342d69509Smrgelse 29442d69509Smrg am_cv_$1_dependencies_compiler_type=none 2954456fccdSmrgfi 29642d69509Smrg]) 29742d69509SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29842d69509SmrgAM_CONDITIONAL([am__fastdep$1], [ 29942d69509Smrg test "x$enable_dependency_tracking" != xno \ 30042d69509Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30142d69509Smrg]) 3024456fccdSmrg 3034456fccdSmrg 30442d69509Smrg# AM_SET_DEPDIR 30542d69509Smrg# ------------- 30642d69509Smrg# Choose a directory name for dependency files. 30742d69509Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30842d69509SmrgAC_DEFUN([AM_SET_DEPDIR], 30942d69509Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31042d69509SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31142d69509Smrg]) 3124456fccdSmrg 3134456fccdSmrg 31442d69509Smrg# AM_DEP_TRACK 31542d69509Smrg# ------------ 31642d69509SmrgAC_DEFUN([AM_DEP_TRACK], 31742d69509Smrg[AC_ARG_ENABLE(dependency-tracking, 31842d69509Smrg[ --disable-dependency-tracking speeds up one-time build 31942d69509Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32042d69509Smrgif test "x$enable_dependency_tracking" != xno; then 32142d69509Smrg am_depcomp="$ac_aux_dir/depcomp" 32242d69509Smrg AMDEPBACKSLASH='\' 32342d69509Smrgfi 32442d69509SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32542d69509SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32642d69509Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32742d69509Smrg]) 3284456fccdSmrg 32942d69509Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3304456fccdSmrg 33142d69509Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33242d69509Smrg# Free Software Foundation, Inc. 33342d69509Smrg# 33442d69509Smrg# This file is free software; the Free Software Foundation 33542d69509Smrg# gives unlimited permission to copy and/or distribute it, 33642d69509Smrg# with or without modifications, as long as this notice is preserved. 3374456fccdSmrg 33842d69509Smrg#serial 5 3394456fccdSmrg 34042d69509Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34142d69509Smrg# ------------------------------ 34242d69509SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34342d69509Smrg[{ 34442d69509Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34542d69509Smrg # are listed without --file. Let's play safe and only enable the eval 34642d69509Smrg # if we detect the quoting. 34742d69509Smrg case $CONFIG_FILES in 34842d69509Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34942d69509Smrg *) set x $CONFIG_FILES ;; 35042d69509Smrg esac 35142d69509Smrg shift 35242d69509Smrg for mf 35342d69509Smrg do 35442d69509Smrg # Strip MF so we end up with the name of the file. 35542d69509Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35642d69509Smrg # Check whether this is an Automake generated Makefile or not. 35742d69509Smrg # We used to match only the files named `Makefile.in', but 35842d69509Smrg # some people rename them; so instead we look at the file content. 35942d69509Smrg # Grep'ing the first line is not enough: some people post-process 36042d69509Smrg # each Makefile.in and add a new line on top of each file to say so. 36142d69509Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36242d69509Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36342d69509Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36442d69509Smrg dirpart=`AS_DIRNAME("$mf")` 36542d69509Smrg else 36642d69509Smrg continue 36742d69509Smrg fi 36842d69509Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36942d69509Smrg # from the Makefile without running `make'. 37042d69509Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37142d69509Smrg test -z "$DEPDIR" && continue 37242d69509Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37342d69509Smrg test -z "am__include" && continue 37442d69509Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37542d69509Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37642d69509Smrg U=`sed -n 's/^U = //p' < "$mf"` 37742d69509Smrg # Find all dependency output files, they are included files with 37842d69509Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37942d69509Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38042d69509Smrg # expansion. 38142d69509Smrg for file in `sed -n " 38242d69509Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38342d69509Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38442d69509Smrg # Make sure the directory exists. 38542d69509Smrg test -f "$dirpart/$file" && continue 38642d69509Smrg fdir=`AS_DIRNAME(["$file"])` 38742d69509Smrg AS_MKDIR_P([$dirpart/$fdir]) 38842d69509Smrg # echo "creating $dirpart/$file" 38942d69509Smrg echo '# dummy' > "$dirpart/$file" 39042d69509Smrg done 39142d69509Smrg done 39242d69509Smrg} 39342d69509Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3944456fccdSmrg 3954456fccdSmrg 39642d69509Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39742d69509Smrg# ----------------------------- 39842d69509Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39942d69509Smrg# 40042d69509Smrg# This code is only required when automatic dependency tracking 40142d69509Smrg# is enabled. FIXME. This creates each `.P' file that we will 40242d69509Smrg# need in order to bootstrap the dependency handling code. 40342d69509SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40442d69509Smrg[AC_CONFIG_COMMANDS([depfiles], 40542d69509Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40642d69509Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4074456fccdSmrg]) 4084456fccdSmrg 40942d69509Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41042d69509Smrg# Free Software Foundation, Inc. 41142d69509Smrg# 41242d69509Smrg# This file is free software; the Free Software Foundation 41342d69509Smrg# gives unlimited permission to copy and/or distribute it, 41442d69509Smrg# with or without modifications, as long as this notice is preserved. 4154456fccdSmrg 41642d69509Smrg# serial 8 4174456fccdSmrg 41842d69509Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41942d69509SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4204456fccdSmrg 42142d69509Smrg# Do all the work for Automake. -*- Autoconf -*- 4224456fccdSmrg 42342d69509Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42442d69509Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42542d69509Smrg# 42642d69509Smrg# This file is free software; the Free Software Foundation 42742d69509Smrg# gives unlimited permission to copy and/or distribute it, 42842d69509Smrg# with or without modifications, as long as this notice is preserved. 4294456fccdSmrg 43042d69509Smrg# serial 16 4314456fccdSmrg 43242d69509Smrg# This macro actually does too much. Some checks are only needed if 43342d69509Smrg# your package does certain things. But this isn't really a big deal. 4344456fccdSmrg 43542d69509Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43642d69509Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 43742d69509Smrg# ----------------------------------------------- 43842d69509Smrg# The call with PACKAGE and VERSION arguments is the old style 43942d69509Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44042d69509Smrg# and VERSION should now be passed to AC_INIT and removed from 44142d69509Smrg# the call to AM_INIT_AUTOMAKE. 44242d69509Smrg# We support both call styles for the transition. After 44342d69509Smrg# the next Automake release, Autoconf can make the AC_INIT 44442d69509Smrg# arguments mandatory, and then we can depend on a new Autoconf 44542d69509Smrg# release and drop the old call support. 44642d69509SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44742d69509Smrg[AC_PREREQ([2.62])dnl 44842d69509Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44942d69509Smrgdnl the ones we care about. 45042d69509Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45142d69509SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45242d69509SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45342d69509Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45442d69509Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45542d69509Smrg # is not polluted with repeated "-I." 45642d69509Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45742d69509Smrg # test to see if srcdir already configured 45842d69509Smrg if test -f $srcdir/config.status; then 45942d69509Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46042d69509Smrg fi 46142d69509Smrgfi 4624456fccdSmrg 46342d69509Smrg# test whether we have cygpath 46442d69509Smrgif test -z "$CYGPATH_W"; then 46542d69509Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 46642d69509Smrg CYGPATH_W='cygpath -w' 46742d69509Smrg else 46842d69509Smrg CYGPATH_W=echo 46942d69509Smrg fi 47042d69509Smrgfi 47142d69509SmrgAC_SUBST([CYGPATH_W]) 4724456fccdSmrg 47342d69509Smrg# Define the identity of the package. 47442d69509Smrgdnl Distinguish between old-style and new-style calls. 47542d69509Smrgm4_ifval([$2], 47642d69509Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47742d69509Smrg AC_SUBST([PACKAGE], [$1])dnl 47842d69509Smrg AC_SUBST([VERSION], [$2])], 47942d69509Smrg[_AM_SET_OPTIONS([$1])dnl 48042d69509Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48142d69509Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48242d69509Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48342d69509Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48442d69509Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4854456fccdSmrg 48642d69509Smrg_AM_IF_OPTION([no-define],, 48742d69509Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48842d69509Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4894456fccdSmrg 49042d69509Smrg# Some tools Automake needs. 49142d69509SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49242d69509SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49342d69509SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49442d69509SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49542d69509SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49642d69509SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49742d69509SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49842d69509SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49942d69509SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50042d69509SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50142d69509Smrg# We need awk for the "check" target. The system "awk" is bad on 50242d69509Smrg# some platforms. 50342d69509SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50442d69509SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50542d69509SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50642d69509Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50742d69509Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50842d69509Smrg [_AM_PROG_TAR([v7])])]) 50942d69509Smrg_AM_IF_OPTION([no-dependencies],, 51042d69509Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51142d69509Smrg [_AM_DEPENDENCIES(CC)], 51242d69509Smrg [define([AC_PROG_CC], 51342d69509Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51442d69509SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51542d69509Smrg [_AM_DEPENDENCIES(CXX)], 51642d69509Smrg [define([AC_PROG_CXX], 51742d69509Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51842d69509SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51942d69509Smrg [_AM_DEPENDENCIES(OBJC)], 52042d69509Smrg [define([AC_PROG_OBJC], 52142d69509Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52242d69509Smrg]) 52342d69509Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52442d69509Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52542d69509Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52642d69509Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52742d69509SmrgAC_CONFIG_COMMANDS_PRE(dnl 52842d69509Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52942d69509Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53042d69509Smrg]) 5314456fccdSmrg 53242d69509Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53342d69509Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53442d69509Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53542d69509Smrgm4_define([_AC_COMPILER_EXEEXT], 53642d69509Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5374456fccdSmrg 5384456fccdSmrg 53942d69509Smrg# When config.status generates a header, we must update the stamp-h file. 54042d69509Smrg# This file resides in the same directory as the config header 54142d69509Smrg# that is generated. The stamp files are numbered to have different names. 5424456fccdSmrg 54342d69509Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54442d69509Smrg# loop where config.status creates the headers, so we can generate 54542d69509Smrg# our stamp files there. 54642d69509SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54742d69509Smrg[# Compute $1's index in $config_headers. 54842d69509Smrg_am_arg=$1 54942d69509Smrg_am_stamp_count=1 55042d69509Smrgfor _am_header in $config_headers :; do 55142d69509Smrg case $_am_header in 55242d69509Smrg $_am_arg | $_am_arg:* ) 55342d69509Smrg break ;; 55442d69509Smrg * ) 55542d69509Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55642d69509Smrg esac 55742d69509Smrgdone 55842d69509Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5594456fccdSmrg 56042d69509Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56142d69509Smrg# 56242d69509Smrg# This file is free software; the Free Software Foundation 56342d69509Smrg# gives unlimited permission to copy and/or distribute it, 56442d69509Smrg# with or without modifications, as long as this notice is preserved. 5654456fccdSmrg 56642d69509Smrg# AM_PROG_INSTALL_SH 56742d69509Smrg# ------------------ 56842d69509Smrg# Define $install_sh. 56942d69509SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57042d69509Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57142d69509Smrgif test x"${install_sh}" != xset; then 57242d69509Smrg case $am_aux_dir in 57342d69509Smrg *\ * | *\ *) 57442d69509Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57542d69509Smrg *) 57642d69509Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57742d69509Smrg esac 57842d69509Smrgfi 57942d69509SmrgAC_SUBST(install_sh)]) 5804456fccdSmrg 58142d69509Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58242d69509Smrg# 58342d69509Smrg# This file is free software; the Free Software Foundation 58442d69509Smrg# gives unlimited permission to copy and/or distribute it, 58542d69509Smrg# with or without modifications, as long as this notice is preserved. 5864456fccdSmrg 58742d69509Smrg# serial 2 5884456fccdSmrg 58942d69509Smrg# Check whether the underlying file-system supports filenames 59042d69509Smrg# with a leading dot. For instance MS-DOS doesn't. 59142d69509SmrgAC_DEFUN([AM_SET_LEADING_DOT], 59242d69509Smrg[rm -rf .tst 2>/dev/null 59342d69509Smrgmkdir .tst 2>/dev/null 59442d69509Smrgif test -d .tst; then 59542d69509Smrg am__leading_dot=. 59642d69509Smrgelse 59742d69509Smrg am__leading_dot=_ 5984456fccdSmrgfi 59942d69509Smrgrmdir .tst 2>/dev/null 60042d69509SmrgAC_SUBST([am__leading_dot])]) 6014456fccdSmrg 60242d69509Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60342d69509Smrg# From Jim Meyering 6044456fccdSmrg 60542d69509Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60642d69509Smrg# Free Software Foundation, Inc. 60742d69509Smrg# 60842d69509Smrg# This file is free software; the Free Software Foundation 60942d69509Smrg# gives unlimited permission to copy and/or distribute it, 61042d69509Smrg# with or without modifications, as long as this notice is preserved. 6114456fccdSmrg 61242d69509Smrg# serial 5 6134456fccdSmrg 61442d69509Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61542d69509Smrg# ---------------------------------- 61642d69509Smrg# Control maintainer-specific portions of Makefiles. 61742d69509Smrg# Default is to disable them, unless `enable' is passed literally. 61842d69509Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 61942d69509Smrg# can override the default with the --enable/--disable switch. 62042d69509SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62142d69509Smrg[m4_case(m4_default([$1], [disable]), 62242d69509Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62342d69509Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62442d69509Smrg [m4_define([am_maintainer_other], [enable]) 62542d69509Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62642d69509SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62742d69509Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62842d69509Smrg AC_ARG_ENABLE([maintainer-mode], 62942d69509Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63042d69509Smrg (and sometimes confusing) to the casual installer], 63142d69509Smrg [USE_MAINTAINER_MODE=$enableval], 63242d69509Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63342d69509Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63442d69509Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63542d69509Smrg MAINT=$MAINTAINER_MODE_TRUE 63642d69509Smrg AC_SUBST([MAINT])dnl 63742d69509Smrg] 63842d69509Smrg) 6394456fccdSmrg 64042d69509SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6414456fccdSmrg 64242d69509Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64342d69509Smrg 64442d69509Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 64542d69509Smrg# 64642d69509Smrg# This file is free software; the Free Software Foundation 64742d69509Smrg# gives unlimited permission to copy and/or distribute it, 64842d69509Smrg# with or without modifications, as long as this notice is preserved. 64942d69509Smrg 65042d69509Smrg# serial 4 65142d69509Smrg 65242d69509Smrg# AM_MAKE_INCLUDE() 65342d69509Smrg# ----------------- 65442d69509Smrg# Check to see how make treats includes. 65542d69509SmrgAC_DEFUN([AM_MAKE_INCLUDE], 65642d69509Smrg[am_make=${MAKE-make} 65742d69509Smrgcat > confinc << 'END' 65842d69509Smrgam__doit: 65942d69509Smrg @echo this is the am__doit target 66042d69509Smrg.PHONY: am__doit 66142d69509SmrgEND 66242d69509Smrg# If we don't find an include directive, just comment out the code. 66342d69509SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66442d69509Smrgam__include="#" 66542d69509Smrgam__quote= 66642d69509Smrg_am_result=none 66742d69509Smrg# First try GNU make style include. 66842d69509Smrgecho "include confinc" > confmf 66942d69509Smrg# Ignore all kinds of additional output from `make'. 67042d69509Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67142d69509Smrg*the\ am__doit\ target*) 67242d69509Smrg am__include=include 67342d69509Smrg am__quote= 67442d69509Smrg _am_result=GNU 6754456fccdSmrg ;; 6764456fccdSmrgesac 67742d69509Smrg# Now try BSD make style include. 67842d69509Smrgif test "$am__include" = "#"; then 67942d69509Smrg echo '.include "confinc"' > confmf 68042d69509Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68142d69509Smrg *the\ am__doit\ target*) 68242d69509Smrg am__include=.include 68342d69509Smrg am__quote="\"" 68442d69509Smrg _am_result=BSD 68542d69509Smrg ;; 68642d69509Smrg esac 68742d69509Smrgfi 68842d69509SmrgAC_SUBST([am__include]) 68942d69509SmrgAC_SUBST([am__quote]) 69042d69509SmrgAC_MSG_RESULT([$_am_result]) 69142d69509Smrgrm -f confinc confmf 69242d69509Smrg]) 6934456fccdSmrg 69442d69509Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6954456fccdSmrg 69642d69509Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69742d69509Smrg# Free Software Foundation, Inc. 69842d69509Smrg# 69942d69509Smrg# This file is free software; the Free Software Foundation 70042d69509Smrg# gives unlimited permission to copy and/or distribute it, 70142d69509Smrg# with or without modifications, as long as this notice is preserved. 7024456fccdSmrg 70342d69509Smrg# serial 6 7044456fccdSmrg 70542d69509Smrg# AM_MISSING_PROG(NAME, PROGRAM) 70642d69509Smrg# ------------------------------ 70742d69509SmrgAC_DEFUN([AM_MISSING_PROG], 70842d69509Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70942d69509Smrg$1=${$1-"${am_missing_run}$2"} 71042d69509SmrgAC_SUBST($1)]) 7114456fccdSmrg 71242d69509Smrg 71342d69509Smrg# AM_MISSING_HAS_RUN 71442d69509Smrg# ------------------ 71542d69509Smrg# Define MISSING if not defined so far and test if it supports --run. 71642d69509Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71742d69509SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71842d69509Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71942d69509SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72042d69509Smrgif test x"${MISSING+set}" != xset; then 72142d69509Smrg case $am_aux_dir in 72242d69509Smrg *\ * | *\ *) 72342d69509Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72442d69509Smrg *) 72542d69509Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72642d69509Smrg esac 72742d69509Smrgfi 72842d69509Smrg# Use eval to expand $SHELL 72942d69509Smrgif eval "$MISSING --run true"; then 73042d69509Smrg am_missing_run="$MISSING --run " 7314456fccdSmrgelse 73242d69509Smrg am_missing_run= 73342d69509Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7344456fccdSmrgfi 73542d69509Smrg]) 7364456fccdSmrg 73742d69509Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 73842d69509Smrg# 73942d69509Smrg# This file is free software; the Free Software Foundation 74042d69509Smrg# gives unlimited permission to copy and/or distribute it, 74142d69509Smrg# with or without modifications, as long as this notice is preserved. 7424456fccdSmrg 74342d69509Smrg# AM_PROG_MKDIR_P 74442d69509Smrg# --------------- 74542d69509Smrg# Check for `mkdir -p'. 74642d69509SmrgAC_DEFUN([AM_PROG_MKDIR_P], 74742d69509Smrg[AC_PREREQ([2.60])dnl 74842d69509SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74942d69509Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75042d69509Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 75142d69509Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75242d69509Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75342d69509Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75442d69509Smrgdnl adjustment using top_builddir (which is defined more often than 75542d69509Smrgdnl MKDIR_P). 75642d69509SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75742d69509Smrgcase $mkdir_p in 75842d69509Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 75942d69509Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 76042d69509Smrgesac 7614456fccdSmrg]) 7624456fccdSmrg 76342d69509Smrg# Helper functions for option handling. -*- Autoconf -*- 7644456fccdSmrg 76542d69509Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 76642d69509Smrg# 76742d69509Smrg# This file is free software; the Free Software Foundation 76842d69509Smrg# gives unlimited permission to copy and/or distribute it, 76942d69509Smrg# with or without modifications, as long as this notice is preserved. 7704456fccdSmrg 77142d69509Smrg# serial 4 7724456fccdSmrg 77342d69509Smrg# _AM_MANGLE_OPTION(NAME) 77442d69509Smrg# ----------------------- 77542d69509SmrgAC_DEFUN([_AM_MANGLE_OPTION], 77642d69509Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7774456fccdSmrg 77842d69509Smrg# _AM_SET_OPTION(NAME) 77942d69509Smrg# ------------------------------ 78042d69509Smrg# Set option NAME. Presently that only means defining a flag for this option. 78142d69509SmrgAC_DEFUN([_AM_SET_OPTION], 78242d69509Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7834456fccdSmrg 78442d69509Smrg# _AM_SET_OPTIONS(OPTIONS) 78542d69509Smrg# ---------------------------------- 78642d69509Smrg# OPTIONS is a space-separated list of Automake options. 78742d69509SmrgAC_DEFUN([_AM_SET_OPTIONS], 78842d69509Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7894456fccdSmrg 79042d69509Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79142d69509Smrg# ------------------------------------------- 79242d69509Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79342d69509SmrgAC_DEFUN([_AM_IF_OPTION], 79442d69509Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7954456fccdSmrg 79642d69509Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7974456fccdSmrg 79842d69509Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79942d69509Smrg# Free Software Foundation, Inc. 80042d69509Smrg# 80142d69509Smrg# This file is free software; the Free Software Foundation 80242d69509Smrg# gives unlimited permission to copy and/or distribute it, 80342d69509Smrg# with or without modifications, as long as this notice is preserved. 8044456fccdSmrg 80542d69509Smrg# serial 5 8064456fccdSmrg 80742d69509Smrg# AM_SANITY_CHECK 80842d69509Smrg# --------------- 80942d69509SmrgAC_DEFUN([AM_SANITY_CHECK], 81042d69509Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81142d69509Smrg# Just in case 81242d69509Smrgsleep 1 81342d69509Smrgecho timestamp > conftest.file 81442d69509Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81542d69509Smrg# name. Accept space and tab only in the latter. 81642d69509Smrgam_lf=' 81742d69509Smrg' 81842d69509Smrgcase `pwd` in 81942d69509Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82042d69509Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82142d69509Smrgesac 82242d69509Smrgcase $srcdir in 82342d69509Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82442d69509Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82542d69509Smrgesac 8264456fccdSmrg 82742d69509Smrg# Do `set' in a subshell so we don't clobber the current shell's 82842d69509Smrg# arguments. Must try -L first in case configure is actually a 82942d69509Smrg# symlink; some systems play weird games with the mod time of symlinks 83042d69509Smrg# (eg FreeBSD returns the mod time of the symlink's containing 83142d69509Smrg# directory). 83242d69509Smrgif ( 83342d69509Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83442d69509Smrg if test "$[*]" = "X"; then 83542d69509Smrg # -L didn't work. 83642d69509Smrg set X `ls -t "$srcdir/configure" conftest.file` 83742d69509Smrg fi 83842d69509Smrg rm -f conftest.file 83942d69509Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84042d69509Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8414456fccdSmrg 84242d69509Smrg # If neither matched, then we have a broken ls. This can happen 84342d69509Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84442d69509Smrg # broken ls alias from the environment. This has actually 84542d69509Smrg # happened. Such a system could not be considered "sane". 84642d69509Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84742d69509Smrgalias in your environment]) 84842d69509Smrg fi 8494456fccdSmrg 85042d69509Smrg test "$[2]" = conftest.file 85142d69509Smrg ) 85242d69509Smrgthen 85342d69509Smrg # Ok. 85442d69509Smrg : 8554456fccdSmrgelse 85642d69509Smrg AC_MSG_ERROR([newly created file is older than distributed files! 85742d69509SmrgCheck your system clock]) 85842d69509Smrgfi 85942d69509SmrgAC_MSG_RESULT(yes)]) 8604456fccdSmrg 86142d69509Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86242d69509Smrg# 86342d69509Smrg# This file is free software; the Free Software Foundation 86442d69509Smrg# gives unlimited permission to copy and/or distribute it, 86542d69509Smrg# with or without modifications, as long as this notice is preserved. 8664456fccdSmrg 86742d69509Smrg# serial 1 8684456fccdSmrg 86942d69509Smrg# AM_SILENT_RULES([DEFAULT]) 87042d69509Smrg# -------------------------- 87142d69509Smrg# Enable less verbose build rules; with the default set to DEFAULT 87242d69509Smrg# (`yes' being less verbose, `no' or empty being verbose). 87342d69509SmrgAC_DEFUN([AM_SILENT_RULES], 87442d69509Smrg[AC_ARG_ENABLE([silent-rules], 87542d69509Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87642d69509Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87742d69509Smrgcase $enable_silent_rules in 87842d69509Smrgyes) AM_DEFAULT_VERBOSITY=0;; 87942d69509Smrgno) AM_DEFAULT_VERBOSITY=1;; 88042d69509Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88142d69509Smrgesac 88242d69509SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88342d69509SmrgAM_BACKSLASH='\' 88442d69509SmrgAC_SUBST([AM_BACKSLASH])dnl 88542d69509Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88642d69509Smrg]) 8874456fccdSmrg 88842d69509Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 88942d69509Smrg# 89042d69509Smrg# This file is free software; the Free Software Foundation 89142d69509Smrg# gives unlimited permission to copy and/or distribute it, 89242d69509Smrg# with or without modifications, as long as this notice is preserved. 8934456fccdSmrg 89442d69509Smrg# AM_PROG_INSTALL_STRIP 89542d69509Smrg# --------------------- 89642d69509Smrg# One issue with vendor `install' (even GNU) is that you can't 89742d69509Smrg# specify the program used to strip binaries. This is especially 89842d69509Smrg# annoying in cross-compiling environments, where the build's strip 89942d69509Smrg# is unlikely to handle the host's binaries. 90042d69509Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90142d69509Smrg# always use install-sh in `make install-strip', and initialize 90242d69509Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 90342d69509SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90442d69509Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90542d69509Smrg# Installed binaries are usually stripped using `strip' when the user 90642d69509Smrg# run `make install-strip'. However `strip' might not be the right 90742d69509Smrg# tool to use in cross-compilation environments, therefore Automake 90842d69509Smrg# will honor the `STRIP' environment variable to overrule this program. 90942d69509Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91042d69509Smrgif test "$cross_compiling" != no; then 91142d69509Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9124456fccdSmrgfi 91342d69509SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91442d69509SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9154456fccdSmrg 91642d69509Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91742d69509Smrg# 91842d69509Smrg# This file is free software; the Free Software Foundation 91942d69509Smrg# gives unlimited permission to copy and/or distribute it, 92042d69509Smrg# with or without modifications, as long as this notice is preserved. 9214456fccdSmrg 92242d69509Smrg# serial 2 9234456fccdSmrg 92442d69509Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 92542d69509Smrg# --------------------------- 92642d69509Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92742d69509Smrg# This macro is traced by Automake. 92842d69509SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9294456fccdSmrg 93042d69509Smrg# AM_SUBST_NOTMAKE(VARIABLE) 93142d69509Smrg# --------------------------- 93242d69509Smrg# Public sister of _AM_SUBST_NOTMAKE. 93342d69509SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9344456fccdSmrg 93542d69509Smrg# Check how to create a tarball. -*- Autoconf -*- 9364456fccdSmrg 93742d69509Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93842d69509Smrg# 93942d69509Smrg# This file is free software; the Free Software Foundation 94042d69509Smrg# gives unlimited permission to copy and/or distribute it, 94142d69509Smrg# with or without modifications, as long as this notice is preserved. 9424456fccdSmrg 94342d69509Smrg# serial 2 94442d69509Smrg 94542d69509Smrg# _AM_PROG_TAR(FORMAT) 94642d69509Smrg# -------------------- 94742d69509Smrg# Check how to create a tarball in format FORMAT. 94842d69509Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 94942d69509Smrg# 95042d69509Smrg# Substitute a variable $(am__tar) that is a command 95142d69509Smrg# writing to stdout a FORMAT-tarball containing the directory 95242d69509Smrg# $tardir. 95342d69509Smrg# tardir=directory && $(am__tar) > result.tar 95442d69509Smrg# 95542d69509Smrg# Substitute a variable $(am__untar) that extract such 95642d69509Smrg# a tarball read from stdin. 95742d69509Smrg# $(am__untar) < result.tar 95842d69509SmrgAC_DEFUN([_AM_PROG_TAR], 95942d69509Smrg[# Always define AMTAR for backward compatibility. 96042d69509SmrgAM_MISSING_PROG([AMTAR], [tar]) 96142d69509Smrgm4_if([$1], [v7], 96242d69509Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96342d69509Smrg [m4_case([$1], [ustar],, [pax],, 96442d69509Smrg [m4_fatal([Unknown tar format])]) 96542d69509SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96642d69509Smrg# Loop over all known methods to create a tar archive until one works. 96742d69509Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96842d69509Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96942d69509Smrg# Do not fold the above two line into one, because Tru64 sh and 97042d69509Smrg# Solaris sh will not grok spaces in the rhs of `-'. 97142d69509Smrgfor _am_tool in $_am_tools 97242d69509Smrgdo 97342d69509Smrg case $_am_tool in 97442d69509Smrg gnutar) 97542d69509Smrg for _am_tar in tar gnutar gtar; 97642d69509Smrg do 97742d69509Smrg AM_RUN_LOG([$_am_tar --version]) && break 97842d69509Smrg done 97942d69509Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98042d69509Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98142d69509Smrg am__untar="$_am_tar -xf -" 98242d69509Smrg ;; 98342d69509Smrg plaintar) 98442d69509Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 98542d69509Smrg # ustar tarball either. 98642d69509Smrg (tar --version) >/dev/null 2>&1 && continue 98742d69509Smrg am__tar='tar chf - "$$tardir"' 98842d69509Smrg am__tar_='tar chf - "$tardir"' 98942d69509Smrg am__untar='tar xf -' 99042d69509Smrg ;; 99142d69509Smrg pax) 99242d69509Smrg am__tar='pax -L -x $1 -w "$$tardir"' 99342d69509Smrg am__tar_='pax -L -x $1 -w "$tardir"' 99442d69509Smrg am__untar='pax -r' 99542d69509Smrg ;; 99642d69509Smrg cpio) 99742d69509Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99842d69509Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99942d69509Smrg am__untar='cpio -i -H $1 -d' 100042d69509Smrg ;; 100142d69509Smrg none) 100242d69509Smrg am__tar=false 100342d69509Smrg am__tar_=false 100442d69509Smrg am__untar=false 10054456fccdSmrg ;; 10064456fccdSmrg esac 10074456fccdSmrg 100842d69509Smrg # If the value was cached, stop now. We just wanted to have am__tar 100942d69509Smrg # and am__untar set. 101042d69509Smrg test -n "${am_cv_prog_tar_$1}" && break 10114456fccdSmrg 101242d69509Smrg # tar/untar a dummy directory, and stop if the command works 101342d69509Smrg rm -rf conftest.dir 101442d69509Smrg mkdir conftest.dir 101542d69509Smrg echo GrepMe > conftest.dir/file 101642d69509Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101742d69509Smrg rm -rf conftest.dir 101842d69509Smrg if test -s conftest.tar; then 101942d69509Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102042d69509Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102142d69509Smrg fi 102242d69509Smrgdone 102342d69509Smrgrm -rf conftest.dir 10244456fccdSmrg 102542d69509SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102642d69509SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102742d69509SmrgAC_SUBST([am__tar]) 102842d69509SmrgAC_SUBST([am__untar]) 102942d69509Smrg]) # _AM_PROG_TAR 10304456fccdSmrg 103142d69509Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 103242d69509Smrgdnl 103342d69509Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 103442d69509Smrgdnl 103542d69509Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036521070a0Smrgdnl copy of this software and associated documentation files (the "Software"), 1037521070a0Smrgdnl to deal in the Software without restriction, including without limitation 1038521070a0Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039521070a0Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040521070a0Smrgdnl Software is furnished to do so, subject to the following conditions: 104142d69509Smrgdnl 1042521070a0Smrgdnl The above copyright notice and this permission notice (including the next 1043521070a0Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1044521070a0Smrgdnl Software. 104542d69509Smrgdnl 1046521070a0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047521070a0Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048521070a0Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049521070a0Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050521070a0Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051521070a0Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052521070a0Smrgdnl DEALINGS IN THE SOFTWARE. 10534456fccdSmrg 105442d69509Smrg# XORG_MACROS_VERSION(required-version) 105542d69509Smrg# ------------------------------------- 105642d69509Smrg# Minimum version: 1.1.0 105742d69509Smrg# 105842d69509Smrg# If you're using a macro added in Version 1.1 or newer, include this in 105942d69509Smrg# your configure.ac with the minimum required version, such as: 106042d69509Smrg# XORG_MACROS_VERSION(1.1) 106142d69509Smrg# 106242d69509Smrg# To ensure that this macro is defined, also add: 106342d69509Smrg# m4_ifndef([XORG_MACROS_VERSION], 106442d69509Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 106542d69509Smrg# 106642d69509Smrg# 106742d69509Smrg# See the "minimum version" comment for each macro you use to see what 106842d69509Smrg# version you require. 106942d69509Smrgm4_defun([XORG_MACROS_VERSION],[ 1070521070a0Smrgm4_define([vers_have], [1.8.0]) 107142d69509Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107242d69509Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107342d69509Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107442d69509Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107542d69509Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107642d69509Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107742d69509Smrgm4_undefine([vers_have]) 107842d69509Smrgm4_undefine([maj_have]) 107942d69509Smrgm4_undefine([maj_needed]) 108042d69509Smrg]) # XORG_MACROS_VERSION 10814456fccdSmrg 108242d69509Smrg# XORG_PROG_RAWCPP() 108342d69509Smrg# ------------------ 108442d69509Smrg# Minimum version: 1.0.0 108542d69509Smrg# 108642d69509Smrg# Find cpp program and necessary flags for use in pre-processing text files 108742d69509Smrg# such as man pages and config files 108842d69509SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 108942d69509SmrgAC_REQUIRE([AC_PROG_CPP]) 109042d69509SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 109142d69509Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10924456fccdSmrg 109342d69509Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 109442d69509Smrg# which is not the best choice for supporting other OS'es, but covers most 109542d69509Smrg# of the ones we need for now. 109642d69509SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 109742d69509SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 109842d69509Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 109942d69509Smrg AC_MSG_RESULT([no]) 110042d69509Smrgelse 110142d69509Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110242d69509Smrg RAWCPPFLAGS=-undef 110342d69509Smrg AC_MSG_RESULT([yes]) 110442d69509Smrg # under Cygwin unix is still defined even with -undef 110542d69509Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110642d69509Smrg RAWCPPFLAGS="-undef -ansi" 110742d69509Smrg AC_MSG_RESULT([yes, with -ansi]) 110842d69509Smrg else 110942d69509Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 111042d69509Smrg fi 11114456fccdSmrgfi 111242d69509Smrgrm -f conftest.$ac_ext 11134456fccdSmrg 111442d69509SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 111542d69509SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 111642d69509Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 111742d69509Smrg AC_MSG_RESULT([no]) 111842d69509Smrgelse 111942d69509Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 112042d69509Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 112142d69509Smrg AC_MSG_RESULT([yes]) 112242d69509Smrg else 112342d69509Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 112442d69509Smrg fi 112542d69509Smrgfi 112642d69509Smrgrm -f conftest.$ac_ext 112742d69509SmrgAC_SUBST(RAWCPPFLAGS) 112842d69509Smrg]) # XORG_PROG_RAWCPP 11294456fccdSmrg 113042d69509Smrg# XORG_MANPAGE_SECTIONS() 113142d69509Smrg# ----------------------- 113242d69509Smrg# Minimum version: 1.0.0 113342d69509Smrg# 113442d69509Smrg# Determine which sections man pages go in for the different man page types 113542d69509Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 113642d69509Smrg# Not sure if there's any better way than just hardcoding by OS name. 113742d69509Smrg# Override default settings by setting environment variables 1138521070a0Smrg# Added MAN_SUBSTS in version 1.8 1139521070a0Smrg# Added AC_PROG_SED in version 1.8 11404456fccdSmrg 114142d69509SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 114242d69509SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1143521070a0SmrgAC_REQUIRE([AC_PROG_SED]) 11444456fccdSmrg 114542d69509Smrgif test x$APP_MAN_SUFFIX = x ; then 114642d69509Smrg APP_MAN_SUFFIX=1 114742d69509Smrgfi 114842d69509Smrgif test x$APP_MAN_DIR = x ; then 114942d69509Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 115042d69509Smrgfi 11514456fccdSmrg 115242d69509Smrgif test x$LIB_MAN_SUFFIX = x ; then 115342d69509Smrg LIB_MAN_SUFFIX=3 115442d69509Smrgfi 115542d69509Smrgif test x$LIB_MAN_DIR = x ; then 115642d69509Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 115742d69509Smrgfi 11584456fccdSmrg 115942d69509Smrgif test x$FILE_MAN_SUFFIX = x ; then 116042d69509Smrg case $host_os in 116142d69509Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 116242d69509Smrg *) FILE_MAN_SUFFIX=5 ;; 116342d69509Smrg esac 116442d69509Smrgfi 116542d69509Smrgif test x$FILE_MAN_DIR = x ; then 116642d69509Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 116742d69509Smrgfi 116842d69509Smrg 116942d69509Smrgif test x$MISC_MAN_SUFFIX = x ; then 117042d69509Smrg case $host_os in 117142d69509Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 117242d69509Smrg *) MISC_MAN_SUFFIX=7 ;; 117342d69509Smrg esac 117442d69509Smrgfi 117542d69509Smrgif test x$MISC_MAN_DIR = x ; then 117642d69509Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11774456fccdSmrgfi 11784456fccdSmrg 117942d69509Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 118042d69509Smrg case $host_os in 118142d69509Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 118242d69509Smrg *) DRIVER_MAN_SUFFIX=4 ;; 118342d69509Smrg esac 118442d69509Smrgfi 118542d69509Smrgif test x$DRIVER_MAN_DIR = x ; then 118642d69509Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 118742d69509Smrgfi 11884456fccdSmrg 118942d69509Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 119042d69509Smrg case $host_os in 119142d69509Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 119242d69509Smrg *) ADMIN_MAN_SUFFIX=8 ;; 119342d69509Smrg esac 119442d69509Smrgfi 119542d69509Smrgif test x$ADMIN_MAN_DIR = x ; then 119642d69509Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 11974456fccdSmrgfi 11984456fccdSmrg 11994456fccdSmrg 120042d69509SmrgAC_SUBST([APP_MAN_SUFFIX]) 120142d69509SmrgAC_SUBST([LIB_MAN_SUFFIX]) 120242d69509SmrgAC_SUBST([FILE_MAN_SUFFIX]) 120342d69509SmrgAC_SUBST([MISC_MAN_SUFFIX]) 120442d69509SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 120542d69509SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 120642d69509SmrgAC_SUBST([APP_MAN_DIR]) 120742d69509SmrgAC_SUBST([LIB_MAN_DIR]) 120842d69509SmrgAC_SUBST([FILE_MAN_DIR]) 120942d69509SmrgAC_SUBST([MISC_MAN_DIR]) 121042d69509SmrgAC_SUBST([DRIVER_MAN_DIR]) 121142d69509SmrgAC_SUBST([ADMIN_MAN_DIR]) 1212521070a0Smrg 1213521070a0SmrgXORG_MAN_PAGE="X Version 11" 1214521070a0SmrgAC_SUBST([XORG_MAN_PAGE]) 1215521070a0SmrgMAN_SUBSTS="\ 1216521070a0Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1217521070a0Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1218521070a0Smrg -e 's|__xservername__|Xorg|g' \ 1219521070a0Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1220521070a0Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1221521070a0Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1222521070a0Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1223521070a0Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1224521070a0Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1225521070a0Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1226521070a0Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1227521070a0SmrgAC_SUBST([MAN_SUBSTS]) 1228521070a0Smrg 122942d69509Smrg]) # XORG_MANPAGE_SECTIONS 12304456fccdSmrg 1231521070a0Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1232521070a0Smrg# ------------------------ 1233521070a0Smrg# Minimum version: 1.7.0 1234521070a0Smrg# 1235521070a0Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1236521070a0Smrg# provided by xorg-sgml-doctools, if installed. 1237521070a0SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1238521070a0SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1239521070a0SmrgXORG_SGML_PATH= 1240521070a0SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1241521070a0Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1242521070a0Smrg [m4_ifval([$1],[:], 1243521070a0Smrg [if test x"$cross_compiling" != x"yes" ; then 1244521070a0Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1245521070a0Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1246521070a0Smrg fi]) 1247521070a0Smrg ]) 1248521070a0Smrg 1249521070a0Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1250521070a0Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1251521070a0Smrgelse 1252521070a0Smrg AC_MSG_RESULT([no]) 1253521070a0Smrgfi 1254521070a0Smrg 1255521070a0SmrgAC_SUBST(XORG_SGML_PATH) 1256521070a0Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1257521070a0Smrg 125842d69509Smrg# XORG_CHECK_LINUXDOC 125942d69509Smrg# ------------------- 126042d69509Smrg# Minimum version: 1.0.0 126142d69509Smrg# 126242d69509Smrg# Defines the variable MAKE_TEXT if the necessary tools and 126342d69509Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 126442d69509Smrg# Whether or not the necessary tools and files are found can be checked 126542d69509Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 126642d69509SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1267521070a0SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1268521070a0SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 12694456fccdSmrg 127042d69509SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 127142d69509Smrg 1272521070a0SmrgAC_MSG_CHECKING([whether to build documentation]) 12734456fccdSmrg 1274521070a0Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 127542d69509Smrg BUILDDOC=yes 12764456fccdSmrgelse 127742d69509Smrg BUILDDOC=no 12784456fccdSmrgfi 12794456fccdSmrg 128042d69509SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12814456fccdSmrg 128242d69509SmrgAC_MSG_RESULT([$BUILDDOC]) 128342d69509Smrg 1284521070a0SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 128542d69509Smrg 1286521070a0Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 128742d69509Smrg BUILDPDFDOC=yes 12884456fccdSmrgelse 128942d69509Smrg BUILDPDFDOC=no 12904456fccdSmrgfi 12914456fccdSmrg 129242d69509SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12934456fccdSmrg 129442d69509SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12954456fccdSmrg 1296521070a0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 129742d69509SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 129842d69509SmrgMAKE_PDF="$PS2PDF" 129942d69509SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 13004456fccdSmrg 130142d69509SmrgAC_SUBST(MAKE_TEXT) 130242d69509SmrgAC_SUBST(MAKE_PS) 130342d69509SmrgAC_SUBST(MAKE_PDF) 130442d69509SmrgAC_SUBST(MAKE_HTML) 130542d69509Smrg]) # XORG_CHECK_LINUXDOC 13064456fccdSmrg 130742d69509Smrg# XORG_CHECK_DOCBOOK 130842d69509Smrg# ------------------- 130942d69509Smrg# Minimum version: 1.0.0 131042d69509Smrg# 131142d69509Smrg# Checks for the ability to build output formats from SGML DocBook source. 131242d69509Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 131342d69509Smrg# indicates whether the necessary tools and files are found and, if set, 131442d69509Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 131542d69509SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1316521070a0SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1317521070a0Smrg 131842d69509SmrgBUILDTXTDOC=no 131942d69509SmrgBUILDPDFDOC=no 132042d69509SmrgBUILDPSDOC=no 132142d69509SmrgBUILDHTMLDOC=no 132242d69509Smrg 132342d69509SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 132442d69509SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 132542d69509SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 132642d69509SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 132742d69509Smrg 1328521070a0SmrgAC_MSG_CHECKING([whether to build text documentation]) 1329521070a0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 133042d69509Smrg test x$BUILD_TXTDOC != xno; then 133142d69509Smrg BUILDTXTDOC=yes 133242d69509Smrgfi 133342d69509SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 133442d69509SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13354456fccdSmrg 1336521070a0SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1337521070a0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 133842d69509Smrg test x$BUILD_PDFDOC != xno; then 133942d69509Smrg BUILDPDFDOC=yes 134042d69509Smrgfi 134142d69509SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 134242d69509SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13434456fccdSmrg 1344521070a0SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1345521070a0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 134642d69509Smrg test x$BUILD_PSDOC != xno; then 134742d69509Smrg BUILDPSDOC=yes 134842d69509Smrgfi 134942d69509SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 135042d69509SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13514456fccdSmrg 1352521070a0SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1353521070a0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 135442d69509Smrg test x$BUILD_HTMLDOC != xno; then 135542d69509Smrg BUILDHTMLDOC=yes 135642d69509Smrgfi 135742d69509SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 135842d69509SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13594456fccdSmrg 136042d69509SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 136142d69509SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 136242d69509SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 136342d69509SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13644456fccdSmrg 136542d69509SmrgAC_SUBST(MAKE_TEXT) 136642d69509SmrgAC_SUBST(MAKE_PS) 136742d69509SmrgAC_SUBST(MAKE_PDF) 136842d69509SmrgAC_SUBST(MAKE_HTML) 136942d69509Smrg]) # XORG_CHECK_DOCBOOK 13704456fccdSmrg 1371521070a0Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 1372521070a0Smrg# ---------------- 1373521070a0Smrg# Minimum version: 1.5.0 1374521070a0Smrg# 1375521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1376521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1377521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1378521070a0Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1379521070a0Smrg# as whether or not to use the xmlto package. 1380521070a0Smrg# 1381521070a0Smrg# Interface to module: 1382521070a0Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1383521070a0Smrg# XMLTO: returns the path of the xmlto program found 1384521070a0Smrg# returns the path set by the user in the environment 1385521070a0Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1386521070a0Smrg# 'no' user instructs the module not to use xmlto 1387521070a0Smrg# 1388521070a0Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1389521070a0Smrg# 1390521070a0SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1391521070a0SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1392521070a0SmrgAC_ARG_WITH(xmlto, 1393521070a0Smrg AS_HELP_STRING([--with-xmlto], 1394521070a0Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1395521070a0Smrg [use_xmlto=$withval], [use_xmlto=auto]) 1396521070a0Smrg 1397521070a0Smrgif test "x$use_xmlto" = x"auto"; then 1398521070a0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1399521070a0Smrg if test "x$XMLTO" = "x"; then 1400521070a0Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1401521070a0Smrg have_xmlto=no 1402521070a0Smrg else 1403521070a0Smrg have_xmlto=yes 1404521070a0Smrg fi 1405521070a0Smrgelif test "x$use_xmlto" = x"yes" ; then 1406521070a0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1407521070a0Smrg if test "x$XMLTO" = "x"; then 1408521070a0Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1409521070a0Smrg fi 1410521070a0Smrg have_xmlto=yes 1411521070a0Smrgelif test "x$use_xmlto" = x"no" ; then 1412521070a0Smrg if test "x$XMLTO" != "x"; then 1413521070a0Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1414521070a0Smrg fi 1415521070a0Smrg have_xmlto=no 1416521070a0Smrgelse 1417521070a0Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1418521070a0Smrgfi 1419521070a0Smrgm4_ifval([$1], 1420521070a0Smrg[if test "$have_xmlto" = yes; then 1421521070a0Smrg # scrape the xmlto version 1422521070a0Smrg AC_MSG_CHECKING([the xmlto version]) 1423521070a0Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1424521070a0Smrg AC_MSG_RESULT([$xmlto_version]) 1425521070a0Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1426521070a0Smrg [if test "x$use_xmlto" = xauto; then 1427521070a0Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1428521070a0Smrg have_xmlto=no 1429521070a0Smrg else 1430521070a0Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1431521070a0Smrg fi]) 1432521070a0Smrgfi]) 1433521070a0SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1434521070a0Smrg]) # XORG_WITH_XMLTO 1435521070a0Smrg 1436521070a0Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1437521070a0Smrg# ---------------- 1438521070a0Smrg# Minimum version: 1.5.0 1439521070a0Smrg# 1440521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1441521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1442521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1443521070a0Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1444521070a0Smrg# as whether or not to use the asciidoc package. 1445521070a0Smrg# 1446521070a0Smrg# Interface to module: 1447521070a0Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1448521070a0Smrg# ASCIIDOC: returns the path of the asciidoc program found 1449521070a0Smrg# returns the path set by the user in the environment 1450521070a0Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1451521070a0Smrg# 'no' user instructs the module not to use asciidoc 1452521070a0Smrg# 1453521070a0Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1454521070a0Smrg# 1455521070a0SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1456521070a0SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1457521070a0SmrgAC_ARG_WITH(asciidoc, 1458521070a0Smrg AS_HELP_STRING([--with-asciidoc], 1459521070a0Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1460521070a0Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1461521070a0Smrg 1462521070a0Smrgif test "x$use_asciidoc" = x"auto"; then 1463521070a0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1464521070a0Smrg if test "x$ASCIIDOC" = "x"; then 1465521070a0Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1466521070a0Smrg have_asciidoc=no 1467521070a0Smrg else 1468521070a0Smrg have_asciidoc=yes 1469521070a0Smrg fi 1470521070a0Smrgelif test "x$use_asciidoc" = x"yes" ; then 1471521070a0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1472521070a0Smrg if test "x$ASCIIDOC" = "x"; then 1473521070a0Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1474521070a0Smrg fi 1475521070a0Smrg have_asciidoc=yes 1476521070a0Smrgelif test "x$use_asciidoc" = x"no" ; then 1477521070a0Smrg if test "x$ASCIIDOC" != "x"; then 1478521070a0Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1479521070a0Smrg fi 1480521070a0Smrg have_asciidoc=no 1481521070a0Smrgelse 1482521070a0Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1483521070a0Smrgfi 1484521070a0Smrgm4_ifval([$1], 1485521070a0Smrg[if test "$have_asciidoc" = yes; then 1486521070a0Smrg # scrape the asciidoc version 1487521070a0Smrg AC_MSG_CHECKING([the asciidoc version]) 1488521070a0Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1489521070a0Smrg AC_MSG_RESULT([$asciidoc_version]) 1490521070a0Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1491521070a0Smrg [if test "x$use_asciidoc" = xauto; then 1492521070a0Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1493521070a0Smrg have_asciidoc=no 1494521070a0Smrg else 1495521070a0Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1496521070a0Smrg fi]) 1497521070a0Smrgfi]) 1498521070a0SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1499521070a0Smrg]) # XORG_WITH_ASCIIDOC 1500521070a0Smrg 1501521070a0Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1502521070a0Smrg# -------------------------------- 1503521070a0Smrg# Minimum version: 1.5.0 1504521070a0Smrg# 1505521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1506521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1507521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1508521070a0Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1509521070a0Smrg# as whether or not to use the doxygen package. 1510521070a0Smrg# 1511521070a0Smrg# Interface to module: 1512521070a0Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1513521070a0Smrg# DOXYGEN: returns the path of the doxygen program found 1514521070a0Smrg# returns the path set by the user in the environment 1515521070a0Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1516521070a0Smrg# 'no' user instructs the module not to use doxygen 1517521070a0Smrg# 1518521070a0Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1519521070a0Smrg# 1520521070a0SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1521521070a0SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1522521070a0SmrgAC_ARG_WITH(doxygen, 1523521070a0Smrg AS_HELP_STRING([--with-doxygen], 1524521070a0Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1525521070a0Smrg [use_doxygen=$withval], [use_doxygen=auto]) 1526521070a0Smrg 1527521070a0Smrgif test "x$use_doxygen" = x"auto"; then 1528521070a0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1529521070a0Smrg if test "x$DOXYGEN" = "x"; then 1530521070a0Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1531521070a0Smrg have_doxygen=no 1532521070a0Smrg else 1533521070a0Smrg have_doxygen=yes 1534521070a0Smrg fi 1535521070a0Smrgelif test "x$use_doxygen" = x"yes" ; then 1536521070a0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1537521070a0Smrg if test "x$DOXYGEN" = "x"; then 1538521070a0Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1539521070a0Smrg fi 1540521070a0Smrg have_doxygen=yes 1541521070a0Smrgelif test "x$use_doxygen" = x"no" ; then 1542521070a0Smrg if test "x$DOXYGEN" != "x"; then 1543521070a0Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1544521070a0Smrg fi 1545521070a0Smrg have_doxygen=no 1546521070a0Smrgelse 1547521070a0Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1548521070a0Smrgfi 1549521070a0Smrgm4_ifval([$1], 1550521070a0Smrg[if test "$have_doxygen" = yes; then 1551521070a0Smrg # scrape the doxygen version 1552521070a0Smrg AC_MSG_CHECKING([the doxygen version]) 1553521070a0Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1554521070a0Smrg AC_MSG_RESULT([$doxygen_version]) 1555521070a0Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1556521070a0Smrg [if test "x$use_doxygen" = xauto; then 1557521070a0Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1558521070a0Smrg have_doxygen=no 1559521070a0Smrg else 1560521070a0Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1561521070a0Smrg fi]) 1562521070a0Smrgfi]) 1563521070a0SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1564521070a0Smrg]) # XORG_WITH_DOXYGEN 1565521070a0Smrg 1566521070a0Smrg# XORG_WITH_GROFF 1567521070a0Smrg# ---------------- 1568521070a0Smrg# Minimum version: 1.6.0 1569521070a0Smrg# 1570521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1571521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1572521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1573521070a0Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1574521070a0Smrg# as whether or not to use the groff package. 1575521070a0Smrg# 1576521070a0Smrg# Interface to module: 1577521070a0Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1578521070a0Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1579521070a0Smrg# HAVE_GROFF_MS: the -ms macros package 1580521070a0Smrg# GROFF: returns the path of the groff program found 1581521070a0Smrg# returns the path set by the user in the environment 1582521070a0Smrg# --with-groff: 'yes' user instructs the module to use groff 1583521070a0Smrg# 'no' user instructs the module not to use groff 1584521070a0Smrg# 1585521070a0Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1586521070a0Smrg# 1587521070a0Smrg# OS and distros often splits groff in a basic and full package, the former 1588521070a0Smrg# having the groff program and the later having devices, fonts and macros 1589521070a0Smrg# Checking for the groff executable is not enough. 1590521070a0Smrg# 1591521070a0Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1592521070a0Smrg# unset HAVE_GROFF or GROFF env variables. 1593521070a0Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1594521070a0Smrg# 1595521070a0SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1596521070a0SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1597521070a0SmrgAC_ARG_WITH(groff, 1598521070a0Smrg AS_HELP_STRING([--with-groff], 1599521070a0Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 1600521070a0Smrg [use_groff=$withval], [use_groff=auto]) 1601521070a0Smrg 1602521070a0Smrgif test "x$use_groff" = x"auto"; then 1603521070a0Smrg AC_PATH_PROG([GROFF], [groff]) 1604521070a0Smrg if test "x$GROFF" = "x"; then 1605521070a0Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1606521070a0Smrg have_groff=no 1607521070a0Smrg else 1608521070a0Smrg have_groff=yes 1609521070a0Smrg fi 1610521070a0Smrgelif test "x$use_groff" = x"yes" ; then 1611521070a0Smrg AC_PATH_PROG([GROFF], [groff]) 1612521070a0Smrg if test "x$GROFF" = "x"; then 1613521070a0Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1614521070a0Smrg fi 1615521070a0Smrg have_groff=yes 1616521070a0Smrgelif test "x$use_groff" = x"no" ; then 1617521070a0Smrg if test "x$GROFF" != "x"; then 1618521070a0Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1619521070a0Smrg fi 1620521070a0Smrg have_groff=no 1621521070a0Smrgelse 1622521070a0Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1623521070a0Smrgfi 1624521070a0Smrg# We have groff, test for the presence of the macro packages 1625521070a0Smrgif test "x$have_groff" = x"yes"; then 1626521070a0Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1627521070a0Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1628521070a0Smrg groff_ms_works=yes 1629521070a0Smrg else 1630521070a0Smrg groff_ms_works=no 1631521070a0Smrg fi 1632521070a0Smrg AC_MSG_RESULT([$groff_ms_works]) 1633521070a0Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1634521070a0Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1635521070a0Smrg groff_mm_works=yes 1636521070a0Smrg else 1637521070a0Smrg groff_mm_works=no 1638521070a0Smrg fi 1639521070a0Smrg AC_MSG_RESULT([$groff_mm_works]) 1640521070a0Smrgfi 1641521070a0SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1642521070a0SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1643521070a0SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1644521070a0Smrg]) # XORG_WITH_GROFF 1645521070a0Smrg 1646521070a0Smrg# XORG_WITH_FOP 1647521070a0Smrg# ---------------- 1648521070a0Smrg# Minimum version: 1.6.0 1649521070a0Smrg# 1650521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1651521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1652521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1653521070a0Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1654521070a0Smrg# as whether or not to use the fop package. 1655521070a0Smrg# 1656521070a0Smrg# Interface to module: 1657521070a0Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1658521070a0Smrg# FOP: returns the path of the fop program found 1659521070a0Smrg# returns the path set by the user in the environment 1660521070a0Smrg# --with-fop: 'yes' user instructs the module to use fop 1661521070a0Smrg# 'no' user instructs the module not to use fop 1662521070a0Smrg# 1663521070a0Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1664521070a0Smrg# 1665521070a0SmrgAC_DEFUN([XORG_WITH_FOP],[ 1666521070a0SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1667521070a0SmrgAC_ARG_WITH(fop, 1668521070a0Smrg AS_HELP_STRING([--with-fop], 1669521070a0Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 1670521070a0Smrg [use_fop=$withval], [use_fop=auto]) 1671521070a0Smrg 1672521070a0Smrgif test "x$use_fop" = x"auto"; then 1673521070a0Smrg AC_PATH_PROG([FOP], [fop]) 1674521070a0Smrg if test "x$FOP" = "x"; then 1675521070a0Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1676521070a0Smrg have_fop=no 1677521070a0Smrg else 1678521070a0Smrg have_fop=yes 1679521070a0Smrg fi 1680521070a0Smrgelif test "x$use_fop" = x"yes" ; then 1681521070a0Smrg AC_PATH_PROG([FOP], [fop]) 1682521070a0Smrg if test "x$FOP" = "x"; then 1683521070a0Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1684521070a0Smrg fi 1685521070a0Smrg have_fop=yes 1686521070a0Smrgelif test "x$use_fop" = x"no" ; then 1687521070a0Smrg if test "x$FOP" != "x"; then 1688521070a0Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1689521070a0Smrg fi 1690521070a0Smrg have_fop=no 1691521070a0Smrgelse 1692521070a0Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1693521070a0Smrgfi 1694521070a0SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1695521070a0Smrg]) # XORG_WITH_FOP 1696521070a0Smrg 1697521070a0Smrg# XORG_WITH_PS2PDF 1698521070a0Smrg# ---------------- 1699521070a0Smrg# Minimum version: 1.6.0 1700521070a0Smrg# 1701521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1702521070a0Smrg# not at the appropriate level. This macro enables a module to test for the 1703521070a0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1704521070a0Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1705521070a0Smrg# as whether or not to use the ps2pdf package. 1706521070a0Smrg# 1707521070a0Smrg# Interface to module: 1708521070a0Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1709521070a0Smrg# PS2PDF: returns the path of the ps2pdf program found 1710521070a0Smrg# returns the path set by the user in the environment 1711521070a0Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1712521070a0Smrg# 'no' user instructs the module not to use ps2pdf 1713521070a0Smrg# 1714521070a0Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1715521070a0Smrg# 1716521070a0SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1717521070a0SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1718521070a0SmrgAC_ARG_WITH(ps2pdf, 1719521070a0Smrg AS_HELP_STRING([--with-ps2pdf], 1720521070a0Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1721521070a0Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1722521070a0Smrg 1723521070a0Smrgif test "x$use_ps2pdf" = x"auto"; then 1724521070a0Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1725521070a0Smrg if test "x$PS2PDF" = "x"; then 1726521070a0Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1727521070a0Smrg have_ps2pdf=no 1728521070a0Smrg else 1729521070a0Smrg have_ps2pdf=yes 1730521070a0Smrg fi 1731521070a0Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1732521070a0Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1733521070a0Smrg if test "x$PS2PDF" = "x"; then 1734521070a0Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1735521070a0Smrg fi 1736521070a0Smrg have_ps2pdf=yes 1737521070a0Smrgelif test "x$use_ps2pdf" = x"no" ; then 1738521070a0Smrg if test "x$PS2PDF" != "x"; then 1739521070a0Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1740521070a0Smrg fi 1741521070a0Smrg have_ps2pdf=no 1742521070a0Smrgelse 1743521070a0Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1744521070a0Smrgfi 1745521070a0SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1746521070a0Smrg]) # XORG_WITH_PS2PDF 1747521070a0Smrg 1748521070a0Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1749521070a0Smrg# ---------------- 1750521070a0Smrg# Minimum version: 1.6.0 1751521070a0Smrg# 1752521070a0Smrg# Documentation tools are not always available on all platforms and sometimes 1753521070a0Smrg# not at the appropriate level. This macro enables a builder to skip all 1754521070a0Smrg# documentation targets except traditional man pages. 1755521070a0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1756521070a0Smrg# maximum flexibilty in controlling documentation building. 1757521070a0Smrg# Refer to: 1758521070a0Smrg# XORG_WITH_XMLTO --with-xmlto 1759521070a0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1760521070a0Smrg# XORG_WITH_DOXYGEN --with-doxygen 1761521070a0Smrg# XORG_WITH_FOP --with-fop 1762521070a0Smrg# XORG_WITH_GROFF --with-groff 1763521070a0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1764521070a0Smrg# 1765521070a0Smrg# Interface to module: 1766521070a0Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1767521070a0Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1768521070a0Smrg# 'no' user instructs the module not to generate docs 1769521070a0Smrg# parm1: specify the default value, yes or no. 1770521070a0Smrg# 1771521070a0SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1772521070a0Smrgdefault=$1 1773521070a0Smrgif test "x$default" = x ; then 1774521070a0Smrg default="yes" 1775521070a0Smrgfi 1776521070a0SmrgAC_ARG_ENABLE(docs, 1777521070a0Smrg AS_HELP_STRING([--enable-docs], 1778521070a0Smrg [Enable building the documentation (default: yes)]), 1779521070a0Smrg [build_docs=$enableval], [build_docs=$default]) 1780521070a0SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1781521070a0SmrgAC_MSG_CHECKING([whether to build documentation]) 1782521070a0SmrgAC_MSG_RESULT([$build_docs]) 1783521070a0Smrg]) # XORG_ENABLE_DOCS 1784521070a0Smrg 1785521070a0Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1786521070a0Smrg# ---------------- 1787521070a0Smrg# Minimum version: 1.6.0 1788521070a0Smrg# 1789521070a0Smrg# This macro enables a builder to skip all developer documentation. 1790521070a0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1791521070a0Smrg# maximum flexibilty in controlling documentation building. 1792521070a0Smrg# Refer to: 1793521070a0Smrg# XORG_WITH_XMLTO --with-xmlto 1794521070a0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1795521070a0Smrg# XORG_WITH_DOXYGEN --with-doxygen 1796521070a0Smrg# XORG_WITH_FOP --with-fop 1797521070a0Smrg# XORG_WITH_GROFF --with-groff 1798521070a0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1799521070a0Smrg# 1800521070a0Smrg# Interface to module: 1801521070a0Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1802521070a0Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1803521070a0Smrg# 'no' user instructs the module not to generate developer docs 1804521070a0Smrg# parm1: specify the default value, yes or no. 1805521070a0Smrg# 1806521070a0SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1807521070a0Smrgdevel_default=$1 1808521070a0Smrgif test "x$devel_default" = x ; then 1809521070a0Smrg devel_default="yes" 1810521070a0Smrgfi 1811521070a0SmrgAC_ARG_ENABLE(devel-docs, 1812521070a0Smrg AS_HELP_STRING([--enable-devel-docs], 1813521070a0Smrg [Enable building the developer documentation (default: yes)]), 1814521070a0Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1815521070a0SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1816521070a0SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1817521070a0SmrgAC_MSG_RESULT([$build_devel_docs]) 1818521070a0Smrg]) # XORG_ENABLE_DEVEL_DOCS 1819521070a0Smrg 1820521070a0Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1821521070a0Smrg# ---------------- 1822521070a0Smrg# Minimum version: 1.6.0 1823521070a0Smrg# 1824521070a0Smrg# This macro enables a builder to skip all functional specification targets. 1825521070a0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1826521070a0Smrg# maximum flexibilty in controlling documentation building. 1827521070a0Smrg# Refer to: 1828521070a0Smrg# XORG_WITH_XMLTO --with-xmlto 1829521070a0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1830521070a0Smrg# XORG_WITH_DOXYGEN --with-doxygen 1831521070a0Smrg# XORG_WITH_FOP --with-fop 1832521070a0Smrg# XORG_WITH_GROFF --with-groff 1833521070a0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1834521070a0Smrg# 1835521070a0Smrg# Interface to module: 1836521070a0Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1837521070a0Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1838521070a0Smrg# 'no' user instructs the module not to generate specs 1839521070a0Smrg# parm1: specify the default value, yes or no. 1840521070a0Smrg# 1841521070a0SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1842521070a0Smrgspec_default=$1 1843521070a0Smrgif test "x$spec_default" = x ; then 1844521070a0Smrg spec_default="yes" 1845521070a0Smrgfi 1846521070a0SmrgAC_ARG_ENABLE(specs, 1847521070a0Smrg AS_HELP_STRING([--enable-specs], 1848521070a0Smrg [Enable building the specs (default: yes)]), 1849521070a0Smrg [build_specs=$enableval], [build_specs=$spec_default]) 1850521070a0SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1851521070a0SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1852521070a0SmrgAC_MSG_RESULT([$build_specs]) 1853521070a0Smrg]) # XORG_ENABLE_SPECS 1854521070a0Smrg 185542d69509Smrg# XORG_CHECK_MALLOC_ZERO 185642d69509Smrg# ---------------------- 185742d69509Smrg# Minimum version: 1.0.0 185842d69509Smrg# 185942d69509Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 186042d69509Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 186142d69509Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 186242d69509SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 186342d69509SmrgAC_ARG_ENABLE(malloc0returnsnull, 186442d69509Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 186542d69509Smrg [malloc(0) returns NULL (default: auto)]), 186642d69509Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 186742d69509Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 18684456fccdSmrg 186942d69509SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 187042d69509Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 187142d69509Smrg AC_RUN_IFELSE([ 187242d69509Smrgchar *malloc(); 187342d69509Smrgchar *realloc(); 187442d69509Smrgchar *calloc(); 187542d69509Smrgmain() { 187642d69509Smrg char *m0, *r0, *c0, *p; 187742d69509Smrg m0 = malloc(0); 187842d69509Smrg p = malloc(10); 187942d69509Smrg r0 = realloc(p,0); 188042d69509Smrg c0 = calloc(0); 188142d69509Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 188242d69509Smrg}], 188342d69509Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1884521070a0Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1885521070a0Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 188642d69509Smrgfi 188742d69509SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 18884456fccdSmrg 188942d69509Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 189042d69509Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 189142d69509Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 189242d69509Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 189342d69509Smrgelse 189442d69509Smrg MALLOC_ZERO_CFLAGS="" 189542d69509Smrg XMALLOC_ZERO_CFLAGS="" 189642d69509Smrg XTMALLOC_ZERO_CFLAGS="" 189742d69509Smrgfi 18984456fccdSmrg 189942d69509SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 190042d69509SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 190142d69509SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 190242d69509Smrg]) # XORG_CHECK_MALLOC_ZERO 19034456fccdSmrg 190442d69509Smrg# XORG_WITH_LINT() 190542d69509Smrg# ---------------- 190642d69509Smrg# Minimum version: 1.1.0 190742d69509Smrg# 1908521070a0Smrg# This macro enables the use of a tool that flags some suspicious and 1909521070a0Smrg# non-portable constructs (likely to be bugs) in C language source code. 1910521070a0Smrg# It will attempt to locate the tool and use appropriate options. 1911521070a0Smrg# There are various lint type tools on different platforms. 1912521070a0Smrg# 1913521070a0Smrg# Interface to module: 1914521070a0Smrg# LINT: returns the path to the tool found on the platform 1915521070a0Smrg# or the value set to LINT on the configure cmd line 1916521070a0Smrg# also an Automake conditional 1917521070a0Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1918521070a0Smrg# 1919521070a0Smrg# --with-lint: 'yes' user instructs the module to use lint 1920521070a0Smrg# 'no' user instructs the module not to use lint (default) 1921521070a0Smrg# 1922521070a0Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1923521070a0Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 192442d69509Smrg# 192542d69509SmrgAC_DEFUN([XORG_WITH_LINT],[ 192642d69509Smrg 1927521070a0SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1928521070a0SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 192942d69509SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 193042d69509Smrg [Use a lint-style source code checker (default: disabled)])], 193142d69509Smrg [use_lint=$withval], [use_lint=no]) 1932521070a0Smrg 1933521070a0Smrg# Obtain platform specific info like program name and options 1934521070a0Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1935521070a0Smrgcase $host_os in 1936521070a0Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1937521070a0Smrg lint_name=splint 1938521070a0Smrg lint_options="-badflag" 1939521070a0Smrg ;; 1940521070a0Smrg *freebsd* | *netbsd*) 1941521070a0Smrg lint_name=lint 1942521070a0Smrg lint_options="-u -b" 1943521070a0Smrg ;; 1944521070a0Smrg *solaris*) 1945521070a0Smrg lint_name=lint 1946521070a0Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1947521070a0Smrg ;; 1948521070a0Smrgesac 1949521070a0Smrg 1950521070a0Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1951521070a0Smrgif test "x$use_lint" = x"yes" ; then 1952521070a0Smrg AC_PATH_PROG([LINT], [$lint_name]) 1953521070a0Smrg if test "x$LINT" = "x"; then 1954521070a0Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1955521070a0Smrg fi 1956521070a0Smrgelif test "x$use_lint" = x"no" ; then 1957521070a0Smrg if test "x$LINT" != "x"; then 1958521070a0Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1959521070a0Smrg fi 196042d69509Smrgelse 1961521070a0Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 196242d69509Smrgfi 1963521070a0Smrg 1964521070a0Smrg# User supplied flags override default flags 1965521070a0Smrgif test "x$LINT_FLAGS" != "x"; then 1966521070a0Smrg lint_options=$LINT_FLAGS 196742d69509Smrgfi 19684456fccdSmrg 1969521070a0SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1970521070a0SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 19714456fccdSmrg 197242d69509Smrg]) # XORG_WITH_LINT 19734456fccdSmrg 197442d69509Smrg# XORG_LINT_LIBRARY(LIBNAME) 197542d69509Smrg# -------------------------- 197642d69509Smrg# Minimum version: 1.1.0 197742d69509Smrg# 197842d69509Smrg# Sets up flags for building lint libraries for checking programs that call 197942d69509Smrg# functions in the library. 198042d69509Smrg# 1981521070a0Smrg# Interface to module: 1982521070a0Smrg# LINTLIB - Automake variable with the name of lint library file to make 1983521070a0Smrg# MAKE_LINT_LIB - Automake conditional 1984521070a0Smrg# 1985521070a0Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1986521070a0Smrg# - 'no' user instructs the module not to create a lint library (default) 19874456fccdSmrg 198842d69509SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 198942d69509SmrgAC_REQUIRE([XORG_WITH_LINT]) 199042d69509SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 199142d69509Smrg [Create lint library (default: disabled)])], 199242d69509Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1993521070a0Smrg 1994521070a0Smrgif test "x$make_lint_lib" = x"yes" ; then 1995521070a0Smrg LINTLIB=llib-l$1.ln 1996521070a0Smrg if test "x$LINT" = "x"; then 1997521070a0Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1998521070a0Smrg fi 1999521070a0Smrgelif test "x$make_lint_lib" != x"no" ; then 2000521070a0Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 200142d69509Smrgfi 2002521070a0Smrg 200342d69509SmrgAC_SUBST(LINTLIB) 200442d69509SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 200542d69509Smrg 200642d69509Smrg]) # XORG_LINT_LIBRARY 200742d69509Smrg 200842d69509Smrg# XORG_CWARNFLAGS 200942d69509Smrg# --------------- 201042d69509Smrg# Minimum version: 1.2.0 201142d69509Smrg# 201242d69509Smrg# Defines CWARNFLAGS to enable C compiler warnings. 201342d69509Smrg# 201442d69509SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2015521070a0SmrgAC_REQUIRE([AC_PROG_CC_C99]) 201642d69509Smrgif test "x$GCC" = xyes ; then 201742d69509Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 201842d69509Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2019521070a0Smrg-Wbad-function-cast -Wformat=2" 202042d69509Smrg case `$CC -dumpversion` in 202142d69509Smrg 3.4.* | 4.*) 202242d69509Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 202342d69509Smrg ;; 20244456fccdSmrg esac 202542d69509Smrgelse 202642d69509Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 202742d69509Smrg if test "x$SUNCC" = "xyes"; then 202842d69509Smrg CWARNFLAGS="-v" 202942d69509Smrg fi 203042d69509Smrgfi 203142d69509SmrgAC_SUBST(CWARNFLAGS) 203242d69509Smrg]) # XORG_CWARNFLAGS 20334456fccdSmrg 203442d69509Smrg# XORG_STRICT_OPTION 203542d69509Smrg# ----------------------- 203642d69509Smrg# Minimum version: 1.3.0 203742d69509Smrg# 203842d69509Smrg# Add configure option to enable strict compilation 203942d69509SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2040521070a0Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 204142d69509SmrgAC_REQUIRE([AC_PROG_CC_C99]) 204242d69509SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 204342d69509Smrg 204442d69509SmrgAC_ARG_ENABLE(strict-compilation, 204542d69509Smrg AS_HELP_STRING([--enable-strict-compilation], 204642d69509Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 204742d69509Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 204842d69509Smrgif test "x$STRICT_COMPILE" = "xyes"; then 204942d69509Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 205042d69509Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 205142d69509Smrg if test "x$GCC" = xyes ; then 205242d69509Smrg STRICT_CFLAGS="-pedantic -Werror" 205342d69509Smrg elif test "x$SUNCC" = "xyes"; then 205442d69509Smrg STRICT_CFLAGS="-errwarn" 205542d69509Smrg elif test "x$INTELCC" = "xyes"; then 205642d69509Smrg STRICT_CFLAGS="-Werror" 205742d69509Smrg fi 205842d69509Smrgfi 205942d69509SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 206042d69509SmrgAC_SUBST([CWARNFLAGS]) 206142d69509Smrg]) # XORG_STRICT_OPTION 20624456fccdSmrg 206342d69509Smrg# XORG_DEFAULT_OPTIONS 206442d69509Smrg# -------------------- 206542d69509Smrg# Minimum version: 1.3.0 206642d69509Smrg# 206742d69509Smrg# Defines default options for X.Org modules. 206842d69509Smrg# 206942d69509SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2070521070a0SmrgAC_REQUIRE([AC_PROG_INSTALL]) 207142d69509SmrgXORG_CWARNFLAGS 207242d69509SmrgXORG_STRICT_OPTION 207342d69509SmrgXORG_RELEASE_VERSION 207442d69509SmrgXORG_CHANGELOG 2075521070a0SmrgXORG_INSTALL 207642d69509SmrgXORG_MANPAGE_SECTIONS 2077521070a0Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2078521070a0Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 207942d69509Smrg]) # XORG_DEFAULT_OPTIONS 2080521070a0Smrg 2081521070a0Smrg# XORG_INSTALL() 2082521070a0Smrg# ---------------- 2083521070a0Smrg# Minimum version: 1.4.0 2084521070a0Smrg# 2085521070a0Smrg# Defines the variable INSTALL_CMD as the command to copy 2086521070a0Smrg# INSTALL from $prefix/share/util-macros. 2087521070a0Smrg# 2088521070a0SmrgAC_DEFUN([XORG_INSTALL], [ 2089521070a0SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2090521070a0Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2091521070a0SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2092521070a0Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2093521070a0Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2094521070a0Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2095521070a0SmrgAC_SUBST([INSTALL_CMD]) 2096521070a0Smrg]) # XORG_INSTALL 209742d69509Smrgdnl Copyright 2005 Red Hat, Inc 209842d69509Smrgdnl 209942d69509Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 210042d69509Smrgdnl documentation for any purpose is hereby granted without fee, provided that 210142d69509Smrgdnl the above copyright notice appear in all copies and that both that 210242d69509Smrgdnl copyright notice and this permission notice appear in supporting 210342d69509Smrgdnl documentation. 210442d69509Smrgdnl 210542d69509Smrgdnl The above copyright notice and this permission notice shall be included 210642d69509Smrgdnl in all copies or substantial portions of the Software. 210742d69509Smrgdnl 210842d69509Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 210942d69509Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 211042d69509Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 211142d69509Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 211242d69509Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 211342d69509Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 211442d69509Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 211542d69509Smrgdnl 211642d69509Smrgdnl Except as contained in this notice, the name of the copyright holders shall 211742d69509Smrgdnl not be used in advertising or otherwise to promote the sale, use or 211842d69509Smrgdnl other dealings in this Software without prior written authorization 211942d69509Smrgdnl from the copyright holders. 212042d69509Smrgdnl 21214456fccdSmrg 212242d69509Smrg# XORG_RELEASE_VERSION 212342d69509Smrg# -------------------- 2124521070a0Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 212542d69509Smrg 212642d69509SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 212742d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 212842d69509Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 212942d69509Smrg [Major version of this package]) 213042d69509Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 213142d69509Smrg if test "x$PVM" = "x"; then 213242d69509Smrg PVM="0" 213342d69509Smrg fi 213442d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 213542d69509Smrg [$PVM], 213642d69509Smrg [Minor version of this package]) 213742d69509Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 213842d69509Smrg if test "x$PVP" = "x"; then 213942d69509Smrg PVP="0" 214042d69509Smrg fi 214142d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 214242d69509Smrg [$PVP], 214342d69509Smrg [Patch version of this package]) 214442d69509Smrg]) 21454456fccdSmrg 214642d69509Smrg# XORG_CHANGELOG() 214742d69509Smrg# ---------------- 214842d69509Smrg# Minimum version: 1.2.0 214942d69509Smrg# 215042d69509Smrg# Defines the variable CHANGELOG_CMD as the command to generate 215142d69509Smrg# ChangeLog from git. 215242d69509Smrg# 215342d69509Smrg# 215442d69509SmrgAC_DEFUN([XORG_CHANGELOG], [ 2155521070a0SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2156521070a0Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2157521070a0Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 215842d69509Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 215942d69509SmrgAC_SUBST([CHANGELOG_CMD]) 216042d69509Smrg]) # XORG_CHANGELOG 21614456fccdSmrg 2162521070a0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2163521070a0Smrg# 2164521070a0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2165521070a0Smrg# 2166521070a0Smrg# This program is free software; you can redistribute it and/or modify 2167521070a0Smrg# it under the terms of the GNU General Public License as published by 2168521070a0Smrg# the Free Software Foundation; either version 2 of the License, or 2169521070a0Smrg# (at your option) any later version. 2170521070a0Smrg# 2171521070a0Smrg# This program is distributed in the hope that it will be useful, but 2172521070a0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2173521070a0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2174521070a0Smrg# General Public License for more details. 2175521070a0Smrg# 2176521070a0Smrg# You should have received a copy of the GNU General Public License 2177521070a0Smrg# along with this program; if not, write to the Free Software 2178521070a0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2179521070a0Smrg# 2180521070a0Smrg# As a special exception to the GNU General Public License, if you 2181521070a0Smrg# distribute this file as part of a program that contains a 2182521070a0Smrg# configuration script generated by Autoconf, you may include it under 2183521070a0Smrg# the same distribution terms that you use for the rest of that program. 21844456fccdSmrg 2185521070a0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2186521070a0Smrg# ---------------------------------- 2187521070a0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2188521070a0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2189521070a0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2190521070a0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2191521070a0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2192521070a0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2193521070a0Smrgfi 2194521070a0Smrgif test -n "$PKG_CONFIG"; then 2195521070a0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2196521070a0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2197521070a0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2198521070a0Smrg AC_MSG_RESULT([yes]) 2199521070a0Smrg else 2200521070a0Smrg AC_MSG_RESULT([no]) 2201521070a0Smrg PKG_CONFIG="" 2202521070a0Smrg fi 2203521070a0Smrg 2204521070a0Smrgfi[]dnl 2205521070a0Smrg])# PKG_PROG_PKG_CONFIG 22064456fccdSmrg 2207521070a0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2208521070a0Smrg# 2209521070a0Smrg# Check to see whether a particular set of modules exists. Similar 2210521070a0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2211521070a0Smrg# 2212521070a0Smrg# 2213521070a0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2214521070a0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2215521070a0Smrg# PKG_CHECK_EXISTS manually 2216521070a0Smrg# -------------------------------------------------------------- 2217521070a0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2218521070a0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2219521070a0Smrgif test -n "$PKG_CONFIG" && \ 2220521070a0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2221521070a0Smrg m4_ifval([$2], [$2], [:]) 2222521070a0Smrgm4_ifvaln([$3], [else 2223521070a0Smrg $3])dnl 2224521070a0Smrgfi]) 22254456fccdSmrg 22264456fccdSmrg 2227521070a0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2228521070a0Smrg# --------------------------------------------- 2229521070a0Smrgm4_define([_PKG_CONFIG], 2230521070a0Smrg[if test -n "$$1"; then 2231521070a0Smrg pkg_cv_[]$1="$$1" 2232521070a0Smrg elif test -n "$PKG_CONFIG"; then 2233521070a0Smrg PKG_CHECK_EXISTS([$3], 2234521070a0Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2235521070a0Smrg [pkg_failed=yes]) 2236521070a0Smrg else 2237521070a0Smrg pkg_failed=untried 2238521070a0Smrgfi[]dnl 2239521070a0Smrg])# _PKG_CONFIG 22404456fccdSmrg 2241521070a0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 2242521070a0Smrg# ----------------------------- 2243521070a0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2244521070a0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2245521070a0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2246521070a0Smrg _pkg_short_errors_supported=yes 2247521070a0Smrgelse 2248521070a0Smrg _pkg_short_errors_supported=no 2249521070a0Smrgfi[]dnl 2250521070a0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 22514456fccdSmrg 22524456fccdSmrg 2253521070a0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2254521070a0Smrg# [ACTION-IF-NOT-FOUND]) 2255521070a0Smrg# 2256521070a0Smrg# 2257521070a0Smrg# Note that if there is a possibility the first call to 2258521070a0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2259521070a0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2260521070a0Smrg# 2261521070a0Smrg# 2262521070a0Smrg# -------------------------------------------------------------- 2263521070a0SmrgAC_DEFUN([PKG_CHECK_MODULES], 2264521070a0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2265521070a0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2266521070a0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 22674456fccdSmrg 2268521070a0Smrgpkg_failed=no 2269521070a0SmrgAC_MSG_CHECKING([for $1]) 22704456fccdSmrg 2271521070a0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2272521070a0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 22734456fccdSmrg 2274521070a0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2275521070a0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 2276521070a0SmrgSee the pkg-config man page for more details.]) 2277521070a0Smrg 2278521070a0Smrgif test $pkg_failed = yes; then 2279521070a0Smrg _PKG_SHORT_ERRORS_SUPPORTED 2280521070a0Smrg if test $_pkg_short_errors_supported = yes; then 2281521070a0Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2282521070a0Smrg else 2283521070a0Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2284521070a0Smrg fi 2285521070a0Smrg # Put the nasty error message in config.log where it belongs 2286521070a0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2287521070a0Smrg 2288521070a0Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 2289521070a0Smrg[Package requirements ($2) were not met: 2290521070a0Smrg 2291521070a0Smrg$$1_PKG_ERRORS 2292521070a0Smrg 2293521070a0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2294521070a0Smrginstalled software in a non-standard prefix. 2295521070a0Smrg 2296521070a0Smrg_PKG_TEXT 2297521070a0Smrg])], 2298521070a0Smrg [AC_MSG_RESULT([no]) 2299521070a0Smrg $4]) 2300521070a0Smrgelif test $pkg_failed = untried; then 2301521070a0Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2302521070a0Smrg[The pkg-config script could not be found or is too old. Make sure it 2303521070a0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2304521070a0Smrgpath to pkg-config. 2305521070a0Smrg 2306521070a0Smrg_PKG_TEXT 2307521070a0Smrg 2308521070a0SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2309521070a0Smrg [$4]) 2310521070a0Smrgelse 2311521070a0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2312521070a0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2313521070a0Smrg AC_MSG_RESULT([yes]) 2314521070a0Smrg ifelse([$3], , :, [$3]) 2315521070a0Smrgfi[]dnl 2316521070a0Smrg])# PKG_CHECK_MODULES 2317521070a0Smrg 2318521070a0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2319521070a0Smrg# 2320521070a0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2321521070a0Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2322521070a0Smrg# Written by Gordon Matzigkeit, 1996 2323521070a0Smrg# 2324521070a0Smrg# This file is free software; the Free Software Foundation gives 2325521070a0Smrg# unlimited permission to copy and/or distribute it, with or without 2326521070a0Smrg# modifications, as long as this notice is preserved. 2327521070a0Smrg 2328521070a0Smrgm4_define([_LT_COPYING], [dnl 2329521070a0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2330521070a0Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2331521070a0Smrg# Written by Gordon Matzigkeit, 1996 2332521070a0Smrg# 2333521070a0Smrg# This file is part of GNU Libtool. 2334521070a0Smrg# 2335521070a0Smrg# GNU Libtool is free software; you can redistribute it and/or 2336521070a0Smrg# modify it under the terms of the GNU General Public License as 2337521070a0Smrg# published by the Free Software Foundation; either version 2 of 2338521070a0Smrg# the License, or (at your option) any later version. 2339521070a0Smrg# 2340521070a0Smrg# As a special exception to the GNU General Public License, 2341521070a0Smrg# if you distribute this file as part of a program or library that 2342521070a0Smrg# is built using GNU Libtool, you may include this file under the 2343521070a0Smrg# same distribution terms that you use for the rest of that program. 2344521070a0Smrg# 2345521070a0Smrg# GNU Libtool is distributed in the hope that it will be useful, 2346521070a0Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2347521070a0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2348521070a0Smrg# GNU General Public License for more details. 2349521070a0Smrg# 2350521070a0Smrg# You should have received a copy of the GNU General Public License 2351521070a0Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 2352521070a0Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2353521070a0Smrg# obtained by writing to the Free Software Foundation, Inc., 2354521070a0Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2355521070a0Smrg]) 2356521070a0Smrg 2357521070a0Smrg# serial 56 LT_INIT 2358521070a0Smrg 2359521070a0Smrg 2360521070a0Smrg# LT_PREREQ(VERSION) 2361521070a0Smrg# ------------------ 2362521070a0Smrg# Complain and exit if this libtool version is less that VERSION. 2363521070a0Smrgm4_defun([LT_PREREQ], 2364521070a0Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2365521070a0Smrg [m4_default([$3], 2366521070a0Smrg [m4_fatal([Libtool version $1 or higher is required], 2367521070a0Smrg 63)])], 2368521070a0Smrg [$2])]) 2369521070a0Smrg 2370521070a0Smrg 2371521070a0Smrg# _LT_CHECK_BUILDDIR 2372521070a0Smrg# ------------------ 2373521070a0Smrg# Complain if the absolute build directory name contains unusual characters 2374521070a0Smrgm4_defun([_LT_CHECK_BUILDDIR], 2375521070a0Smrg[case `pwd` in 2376521070a0Smrg *\ * | *\ *) 2377521070a0Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2378521070a0Smrgesac 2379521070a0Smrg]) 2380521070a0Smrg 2381521070a0Smrg 2382521070a0Smrg# LT_INIT([OPTIONS]) 2383521070a0Smrg# ------------------ 2384521070a0SmrgAC_DEFUN([LT_INIT], 2385521070a0Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2386521070a0SmrgAC_BEFORE([$0], [LT_LANG])dnl 2387521070a0SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2388521070a0SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2389521070a0Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2390521070a0Smrg 2391521070a0Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2392521070a0Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2393521070a0Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2394521070a0Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2395521070a0Smrgdnl unless we require an AC_DEFUNed macro: 2396521070a0SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2397521070a0SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2398521070a0SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2399521070a0SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2400521070a0Smrgm4_require([_LT_PROG_LTMAIN])dnl 2401521070a0Smrg 2402521070a0Smrgdnl Parse OPTIONS 2403521070a0Smrg_LT_SET_OPTIONS([$0], [$1]) 2404521070a0Smrg 2405521070a0Smrg# This can be used to rebuild libtool when needed 2406521070a0SmrgLIBTOOL_DEPS="$ltmain" 2407521070a0Smrg 2408521070a0Smrg# Always use our own libtool. 2409521070a0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2410521070a0SmrgAC_SUBST(LIBTOOL)dnl 2411521070a0Smrg 2412521070a0Smrg_LT_SETUP 2413521070a0Smrg 2414521070a0Smrg# Only expand once: 2415521070a0Smrgm4_define([LT_INIT]) 2416521070a0Smrg])# LT_INIT 2417521070a0Smrg 2418521070a0Smrg# Old names: 2419521070a0SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2420521070a0SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2421521070a0Smrgdnl aclocal-1.4 backwards compatibility: 2422521070a0Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2423521070a0Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2424521070a0Smrg 2425521070a0Smrg 2426521070a0Smrg# _LT_CC_BASENAME(CC) 2427521070a0Smrg# ------------------- 2428521070a0Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2429521070a0Smrgm4_defun([_LT_CC_BASENAME], 2430521070a0Smrg[for cc_temp in $1""; do 2431521070a0Smrg case $cc_temp in 2432521070a0Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2433521070a0Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2434521070a0Smrg \-*) ;; 2435521070a0Smrg *) break;; 2436521070a0Smrg esac 2437521070a0Smrgdone 2438521070a0Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2439521070a0Smrg]) 2440521070a0Smrg 2441521070a0Smrg 2442521070a0Smrg# _LT_FILEUTILS_DEFAULTS 2443521070a0Smrg# ---------------------- 2444521070a0Smrg# It is okay to use these file commands and assume they have been set 2445521070a0Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2446521070a0Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2447521070a0Smrg[: ${CP="cp -f"} 2448521070a0Smrg: ${MV="mv -f"} 2449521070a0Smrg: ${RM="rm -f"} 2450521070a0Smrg])# _LT_FILEUTILS_DEFAULTS 2451521070a0Smrg 2452521070a0Smrg 2453521070a0Smrg# _LT_SETUP 2454521070a0Smrg# --------- 2455521070a0Smrgm4_defun([_LT_SETUP], 2456521070a0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 245742d69509SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2458521070a0Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2459521070a0Smrg_LT_DECL([], [host], [0])dnl 2460521070a0Smrg_LT_DECL([], [host_os], [0])dnl 2461521070a0Smrgdnl 2462521070a0Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2463521070a0Smrg_LT_DECL([], [build], [0])dnl 2464521070a0Smrg_LT_DECL([], [build_os], [0])dnl 2465521070a0Smrgdnl 246642d69509SmrgAC_REQUIRE([AC_PROG_CC])dnl 2467521070a0SmrgAC_REQUIRE([LT_PATH_LD])dnl 2468521070a0SmrgAC_REQUIRE([LT_PATH_NM])dnl 2469521070a0Smrgdnl 247042d69509SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2471521070a0Smrgtest -z "$LN_S" && LN_S="ln -s" 2472521070a0Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2473521070a0Smrgdnl 2474521070a0SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2475521070a0Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2476521070a0Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 247742d69509Smrgdnl 2478521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2479521070a0Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2480521070a0Smrgm4_require([_LT_CMD_RELOAD])dnl 2481521070a0Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2482521070a0Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2483521070a0Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2484521070a0Smrg 2485521070a0Smrg_LT_CONFIG_LIBTOOL_INIT([ 2486521070a0Smrg# See if we are running on zsh, and set the options which allow our 2487521070a0Smrg# commands through without removal of \ escapes INIT. 2488521070a0Smrgif test -n "\${ZSH_VERSION+set}" ; then 2489521070a0Smrg setopt NO_GLOB_SUBST 2490521070a0Smrgfi 2491521070a0Smrg]) 2492521070a0Smrgif test -n "${ZSH_VERSION+set}" ; then 2493521070a0Smrg setopt NO_GLOB_SUBST 2494521070a0Smrgfi 2495521070a0Smrg 2496521070a0Smrg_LT_CHECK_OBJDIR 249742d69509Smrg 2498521070a0Smrgm4_require([_LT_TAG_COMPILER])dnl 2499521070a0Smrg_LT_PROG_ECHO_BACKSLASH 250042d69509Smrg 250142d69509Smrgcase $host_os in 250242d69509Smrgaix3*) 250342d69509Smrg # AIX sometimes has problems with the GCC collect2 program. For some 250442d69509Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 250542d69509Smrg # vanish in a puff of smoke. 250642d69509Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 250742d69509Smrg COLLECT_NAMES= 250842d69509Smrg export COLLECT_NAMES 250942d69509Smrg fi 25104456fccdSmrg ;; 25114456fccdSmrgesac 25124456fccdSmrg 251342d69509Smrg# Sed substitution that helps us do robust quoting. It backslashifies 251442d69509Smrg# metacharacters that are still active within double-quoted strings. 2515521070a0Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 25164456fccdSmrg 251742d69509Smrg# Same as above, but do not quote variable references. 2518521070a0Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 25194456fccdSmrg 252042d69509Smrg# Sed substitution to delay expansion of an escaped shell variable in a 252142d69509Smrg# double_quote_subst'ed string. 252242d69509Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 25234456fccdSmrg 2524521070a0Smrg# Sed substitution to delay expansion of an escaped single quote. 2525521070a0Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2526521070a0Smrg 252742d69509Smrg# Sed substitution to avoid accidental globbing in evaled expressions 252842d69509Smrgno_glob_subst='s/\*/\\\*/g' 25294456fccdSmrg 253042d69509Smrg# Global variables: 2531521070a0Smrgofile=libtool 253242d69509Smrgcan_build_shared=yes 25334456fccdSmrg 253442d69509Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 253542d69509Smrg# which needs '.lib'). 253642d69509Smrglibext=a 25374456fccdSmrg 2538521070a0Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 25394456fccdSmrg 254042d69509Smrgold_CC="$CC" 254142d69509Smrgold_CFLAGS="$CFLAGS" 25424456fccdSmrg 254342d69509Smrg# Set sane defaults for various variables 254442d69509Smrgtest -z "$CC" && CC=cc 254542d69509Smrgtest -z "$LTCC" && LTCC=$CC 254642d69509Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 254742d69509Smrgtest -z "$LD" && LD=ld 254842d69509Smrgtest -z "$ac_objext" && ac_objext=o 25494456fccdSmrg 255042d69509Smrg_LT_CC_BASENAME([$compiler]) 25514456fccdSmrg 255242d69509Smrg# Only perform the check for file, if the check method requires it 2553521070a0Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 255442d69509Smrgcase $deplibs_check_method in 255542d69509Smrgfile_magic*) 255642d69509Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2557521070a0Smrg _LT_PATH_MAGIC 25584456fccdSmrg fi 255942d69509Smrg ;; 256042d69509Smrgesac 25614456fccdSmrg 2562521070a0Smrg# Use C for the default configuration in the libtool script 2563521070a0SmrgLT_SUPPORTED_TAG([CC]) 2564521070a0Smrg_LT_LANG_C_CONFIG 2565521070a0Smrg_LT_LANG_DEFAULT_CONFIG 2566521070a0Smrg_LT_CONFIG_COMMANDS 2567521070a0Smrg])# _LT_SETUP 25684456fccdSmrg 25694456fccdSmrg 2570521070a0Smrg# _LT_PROG_LTMAIN 2571521070a0Smrg# --------------- 2572521070a0Smrg# Note that this code is called both from `configure', and `config.status' 2573521070a0Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2574521070a0Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2575521070a0Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2576521070a0Smrgm4_defun([_LT_PROG_LTMAIN], 2577521070a0Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2578521070a0Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2579521070a0Smrgltmain="$ac_aux_dir/ltmain.sh" 2580521070a0Smrg])# _LT_PROG_LTMAIN 25814456fccdSmrg 25824456fccdSmrg 25834456fccdSmrg 2584521070a0Smrg# So that we can recreate a full libtool script including additional 2585521070a0Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2586521070a0Smrg# in macros and then make a single call at the end using the `libtool' 2587521070a0Smrg# label. 25884456fccdSmrg 25894456fccdSmrg 2590521070a0Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2591521070a0Smrg# ---------------------------------------- 2592521070a0Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2593521070a0Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2594521070a0Smrg[m4_ifval([$1], 2595521070a0Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2596521070a0Smrg [$1 2597521070a0Smrg])])]) 25984456fccdSmrg 2599521070a0Smrg# Initialize. 2600521070a0Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 26014456fccdSmrg 26024456fccdSmrg 2603521070a0Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2604521070a0Smrg# ------------------------------ 2605521070a0Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2606521070a0Smrgm4_define([_LT_CONFIG_LIBTOOL], 2607521070a0Smrg[m4_ifval([$1], 2608521070a0Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2609521070a0Smrg [$1 2610521070a0Smrg])])]) 2611521070a0Smrg 2612521070a0Smrg# Initialize. 2613521070a0Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2614521070a0Smrg 2615521070a0Smrg 2616521070a0Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2617521070a0Smrg# ----------------------------------------------------- 2618521070a0Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2619521070a0Smrg[_LT_CONFIG_LIBTOOL([$1]) 2620521070a0Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2621521070a0Smrg]) 26224456fccdSmrg 2623521070a0Smrg 2624521070a0Smrg# _LT_FORMAT_COMMENT([COMMENT]) 2625521070a0Smrg# ----------------------------- 2626521070a0Smrg# Add leading comment marks to the start of each line, and a trailing 2627521070a0Smrg# full-stop to the whole comment if one is not present already. 2628521070a0Smrgm4_define([_LT_FORMAT_COMMENT], 2629521070a0Smrg[m4_ifval([$1], [ 2630521070a0Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2631521070a0Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2632521070a0Smrg)]) 2633521070a0Smrg 2634521070a0Smrg 2635521070a0Smrg 2636521070a0Smrg 2637521070a0Smrg 2638521070a0Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2639521070a0Smrg# ------------------------------------------------------------------- 2640521070a0Smrg# CONFIGNAME is the name given to the value in the libtool script. 2641521070a0Smrg# VARNAME is the (base) name used in the configure script. 2642521070a0Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2643521070a0Smrg# VARNAME. Any other value will be used directly. 2644521070a0Smrgm4_define([_LT_DECL], 2645521070a0Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2646521070a0Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2647521070a0Smrg [m4_ifval([$1], [$1], [$2])]) 2648521070a0Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2649521070a0Smrg m4_ifval([$4], 2650521070a0Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2651521070a0Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 2652521070a0Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 265342d69509Smrg]) 26544456fccdSmrg 26554456fccdSmrg 2656521070a0Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2657521070a0Smrg# -------------------------------------------------------- 2658521070a0Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 26594456fccdSmrg 26604456fccdSmrg 2661521070a0Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2662521070a0Smrg# ------------------------------------------------ 2663521070a0Smrgm4_define([lt_decl_tag_varnames], 2664521070a0Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 26654456fccdSmrg 266642d69509Smrg 2667521070a0Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2668521070a0Smrg# --------------------------------------------------------- 2669521070a0Smrgm4_define([_lt_decl_filter], 2670521070a0Smrg[m4_case([$#], 2671521070a0Smrg [0], [m4_fatal([$0: too few arguments: $#])], 2672521070a0Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2673521070a0Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2674521070a0Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2675521070a0Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 267642d69509Smrg]) 267742d69509Smrg 26784456fccdSmrg 2679521070a0Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2680521070a0Smrg# -------------------------------------------------- 2681521070a0Smrgm4_define([lt_decl_quote_varnames], 2682521070a0Smrg[_lt_decl_filter([value], [1], $@)]) 2683521070a0Smrg 2684521070a0Smrg 2685521070a0Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2686521070a0Smrg# --------------------------------------------------- 2687521070a0Smrgm4_define([lt_decl_dquote_varnames], 2688521070a0Smrg[_lt_decl_filter([value], [2], $@)]) 2689521070a0Smrg 2690521070a0Smrg 2691521070a0Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2692521070a0Smrg# --------------------------------------------------- 2693521070a0Smrgm4_define([lt_decl_varnames_tagged], 2694521070a0Smrg[m4_assert([$# <= 2])dnl 2695521070a0Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 2696521070a0Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2697521070a0Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2698521070a0Smrgm4_define([_lt_decl_varnames_tagged], 2699521070a0Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2700521070a0Smrg 2701521070a0Smrg 2702521070a0Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2703521070a0Smrg# ------------------------------------------------ 2704521070a0Smrgm4_define([lt_decl_all_varnames], 2705521070a0Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2706521070a0Smrg m4_if([$2], [], 2707521070a0Smrg m4_quote(lt_decl_varnames), 2708521070a0Smrg m4_quote(m4_shift($@))))[]dnl 2709521070a0Smrg]) 2710521070a0Smrgm4_define([_lt_decl_all_varnames], 2711521070a0Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 2712521070a0Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2713521070a0Smrg]) 2714521070a0Smrg 2715521070a0Smrg 2716521070a0Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2717521070a0Smrg# ------------------------------------ 2718521070a0Smrg# Quote a variable value, and forward it to `config.status' so that its 2719521070a0Smrg# declaration there will have the same value as in `configure'. VARNAME 2720521070a0Smrg# must have a single quote delimited value for this to work. 2721521070a0Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2722521070a0Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 2723521070a0Smrg 2724521070a0Smrg 2725521070a0Smrg# _LT_CONFIG_STATUS_DECLARATIONS 2726521070a0Smrg# ------------------------------ 2727521070a0Smrg# We delimit libtool config variables with single quotes, so when 2728521070a0Smrg# we write them to config.status, we have to be sure to quote all 2729521070a0Smrg# embedded single quotes properly. In configure, this macro expands 2730521070a0Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2731521070a0Smrg# 2732521070a0Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 2733521070a0Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2734521070a0Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2735521070a0Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2736521070a0Smrg 2737521070a0Smrg 2738521070a0Smrg# _LT_LIBTOOL_TAGS 2739521070a0Smrg# ---------------- 2740521070a0Smrg# Output comment and list of tags supported by the script 2741521070a0Smrgm4_defun([_LT_LIBTOOL_TAGS], 2742521070a0Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2743521070a0Smrgavailable_tags="_LT_TAGS"dnl 2744521070a0Smrg]) 2745521070a0Smrg 2746521070a0Smrg 2747521070a0Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2748521070a0Smrg# ----------------------------------- 2749521070a0Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2750521070a0Smrg# expand to a commented shell variable setting: 2751521070a0Smrg# 2752521070a0Smrg# # Some comment about what VAR is for. 2753521070a0Smrg# visible_name=$lt_internal_name 2754521070a0Smrgm4_define([_LT_LIBTOOL_DECLARE], 2755521070a0Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2756521070a0Smrg [description])))[]dnl 2757521070a0Smrgm4_pushdef([_libtool_name], 2758521070a0Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2759521070a0Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2760521070a0Smrg [0], [_libtool_name=[$]$1], 2761521070a0Smrg [1], [_libtool_name=$lt_[]$1], 2762521070a0Smrg [2], [_libtool_name=$lt_[]$1], 2763521070a0Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2764521070a0Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2765521070a0Smrg]) 2766521070a0Smrg 2767521070a0Smrg 2768521070a0Smrg# _LT_LIBTOOL_CONFIG_VARS 2769521070a0Smrg# ----------------------- 2770521070a0Smrg# Produce commented declarations of non-tagged libtool config variables 2771521070a0Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2772521070a0Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2773521070a0Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2774521070a0Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2775521070a0Smrg[m4_foreach([_lt_var], 2776521070a0Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2777521070a0Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2778521070a0Smrg 2779521070a0Smrg 2780521070a0Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 2781521070a0Smrg# ------------------------- 2782521070a0Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 2783521070a0Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2784521070a0Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2785521070a0Smrg 2786521070a0Smrg 2787521070a0Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2788521070a0Smrg# ------------------------------ 2789521070a0Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2790521070a0Smrg 2791521070a0Smrg 2792521070a0Smrg# _LT_CONFIG_COMMANDS 2793521070a0Smrg# ------------------- 2794521070a0Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2795521070a0Smrg# variables for single and double quote escaping we saved from calls 2796521070a0Smrg# to _LT_DECL, we can put quote escaped variables declarations 2797521070a0Smrg# into `config.status', and then the shell code to quote escape them in 2798521070a0Smrg# for loops in `config.status'. Finally, any additional code accumulated 2799521070a0Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2800521070a0Smrgm4_defun([_LT_CONFIG_COMMANDS], 2801521070a0Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 2802521070a0Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 2803521070a0Smrg dnl instead of duplicating it all over again into config.status, 2804521070a0Smrg dnl then we will have config.status run $CONFIG_LT later, so it 2805521070a0Smrg dnl needs to know what name is stored there: 2806521070a0Smrg [AC_CONFIG_COMMANDS([libtool], 2807521070a0Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 2808521070a0Smrg dnl If the libtool generation code is destined for config.status, 2809521070a0Smrg dnl expand the accumulated commands and init code now: 2810521070a0Smrg [AC_CONFIG_COMMANDS([libtool], 2811521070a0Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 2812521070a0Smrg])#_LT_CONFIG_COMMANDS 2813521070a0Smrg 2814521070a0Smrg 2815521070a0Smrg# Initialize. 2816521070a0Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 2817521070a0Smrg[ 2818521070a0Smrg 2819521070a0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 2820521070a0Smrg# if CDPATH is set. 2821521070a0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2822521070a0Smrg 2823521070a0Smrgsed_quote_subst='$sed_quote_subst' 2824521070a0Smrgdouble_quote_subst='$double_quote_subst' 2825521070a0Smrgdelay_variable_subst='$delay_variable_subst' 2826521070a0Smrg_LT_CONFIG_STATUS_DECLARATIONS 2827521070a0SmrgLTCC='$LTCC' 2828521070a0SmrgLTCFLAGS='$LTCFLAGS' 2829521070a0Smrgcompiler='$compiler_DEFAULT' 2830521070a0Smrg 2831521070a0Smrg# Quote evaled strings. 2832521070a0Smrgfor var in lt_decl_all_varnames([[ \ 2833521070a0Smrg]], lt_decl_quote_varnames); do 2834521070a0Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2835521070a0Smrg *[[\\\\\\\`\\"\\\$]]*) 2836521070a0Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 2837521070a0Smrg ;; 2838521070a0Smrg *) 2839521070a0Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2840521070a0Smrg ;; 2841521070a0Smrg esac 2842521070a0Smrgdone 2843521070a0Smrg 2844521070a0Smrg# Double-quote double-evaled strings. 2845521070a0Smrgfor var in lt_decl_all_varnames([[ \ 2846521070a0Smrg]], lt_decl_dquote_varnames); do 2847521070a0Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2848521070a0Smrg *[[\\\\\\\`\\"\\\$]]*) 2849521070a0Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 2850521070a0Smrg ;; 2851521070a0Smrg *) 2852521070a0Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2853521070a0Smrg ;; 2854521070a0Smrg esac 2855521070a0Smrgdone 2856521070a0Smrg 2857521070a0Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 2858521070a0Smrgcase \$lt_ECHO in 2859521070a0Smrg*'\\\[$]0 --fallback-echo"')dnl " 2860521070a0Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 2861521070a0Smrg ;; 2862521070a0Smrgesac 2863521070a0Smrg 2864521070a0Smrg_LT_OUTPUT_LIBTOOL_INIT 2865521070a0Smrg]) 2866521070a0Smrg 2867521070a0Smrg 2868521070a0Smrg# LT_OUTPUT 2869521070a0Smrg# --------- 2870521070a0Smrg# This macro allows early generation of the libtool script (before 2871521070a0Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 2872521070a0Smrg# tests. 2873521070a0SmrgAC_DEFUN([LT_OUTPUT], 2874521070a0Smrg[: ${CONFIG_LT=./config.lt} 2875521070a0SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 2876521070a0Smrgcat >"$CONFIG_LT" <<_LTEOF 2877521070a0Smrg#! $SHELL 2878521070a0Smrg# Generated by $as_me. 2879521070a0Smrg# Run this file to recreate a libtool stub with the current configuration. 2880521070a0Smrg 2881521070a0Smrglt_cl_silent=false 2882521070a0SmrgSHELL=\${CONFIG_SHELL-$SHELL} 2883521070a0Smrg_LTEOF 2884521070a0Smrg 2885521070a0Smrgcat >>"$CONFIG_LT" <<\_LTEOF 2886521070a0SmrgAS_SHELL_SANITIZE 2887521070a0Smrg_AS_PREPARE 2888521070a0Smrg 2889521070a0Smrgexec AS_MESSAGE_FD>&1 2890521070a0Smrgexec AS_MESSAGE_LOG_FD>>config.log 2891521070a0Smrg{ 2892521070a0Smrg echo 2893521070a0Smrg AS_BOX([Running $as_me.]) 2894521070a0Smrg} >&AS_MESSAGE_LOG_FD 2895521070a0Smrg 2896521070a0Smrglt_cl_help="\ 2897521070a0Smrg\`$as_me' creates a local libtool stub from the current configuration, 2898521070a0Smrgfor use in further configure time tests before the real libtool is 2899521070a0Smrggenerated. 2900521070a0Smrg 2901521070a0SmrgUsage: $[0] [[OPTIONS]] 2902521070a0Smrg 2903521070a0Smrg -h, --help print this help, then exit 2904521070a0Smrg -V, --version print version number, then exit 2905521070a0Smrg -q, --quiet do not print progress messages 2906521070a0Smrg -d, --debug don't remove temporary files 2907521070a0Smrg 2908521070a0SmrgReport bugs to <bug-libtool@gnu.org>." 2909521070a0Smrg 2910521070a0Smrglt_cl_version="\ 2911521070a0Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 2912521070a0Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 2913521070a0Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 2914521070a0Smrg 2915521070a0SmrgCopyright (C) 2008 Free Software Foundation, Inc. 2916521070a0SmrgThis config.lt script is free software; the Free Software Foundation 2917521070a0Smrggives unlimited permision to copy, distribute and modify it." 2918521070a0Smrg 2919521070a0Smrgwhile test $[#] != 0 2920521070a0Smrgdo 2921521070a0Smrg case $[1] in 2922521070a0Smrg --version | --v* | -V ) 2923521070a0Smrg echo "$lt_cl_version"; exit 0 ;; 2924521070a0Smrg --help | --h* | -h ) 2925521070a0Smrg echo "$lt_cl_help"; exit 0 ;; 2926521070a0Smrg --debug | --d* | -d ) 2927521070a0Smrg debug=: ;; 2928521070a0Smrg --quiet | --q* | --silent | --s* | -q ) 2929521070a0Smrg lt_cl_silent=: ;; 2930521070a0Smrg 2931521070a0Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 2932521070a0SmrgTry \`$[0] --help' for more information.]) ;; 2933521070a0Smrg 2934521070a0Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 2935521070a0SmrgTry \`$[0] --help' for more information.]) ;; 2936521070a0Smrg esac 2937521070a0Smrg shift 2938521070a0Smrgdone 2939521070a0Smrg 2940521070a0Smrgif $lt_cl_silent; then 2941521070a0Smrg exec AS_MESSAGE_FD>/dev/null 2942521070a0Smrgfi 2943521070a0Smrg_LTEOF 2944521070a0Smrg 2945521070a0Smrgcat >>"$CONFIG_LT" <<_LTEOF 2946521070a0Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 2947521070a0Smrg_LTEOF 2948521070a0Smrg 2949521070a0Smrgcat >>"$CONFIG_LT" <<\_LTEOF 2950521070a0SmrgAC_MSG_NOTICE([creating $ofile]) 2951521070a0Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 2952521070a0SmrgAS_EXIT(0) 2953521070a0Smrg_LTEOF 2954521070a0Smrgchmod +x "$CONFIG_LT" 2955521070a0Smrg 2956521070a0Smrg# configure is writing to config.log, but config.lt does its own redirection, 2957521070a0Smrg# appending to config.log, which fails on DOS, as config.log is still kept 2958521070a0Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 2959521070a0Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 2960521070a0Smrgif test "$no_create" != yes; then 2961521070a0Smrg lt_cl_success=: 2962521070a0Smrg test "$silent" = yes && 2963521070a0Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 2964521070a0Smrg exec AS_MESSAGE_LOG_FD>/dev/null 2965521070a0Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 2966521070a0Smrg exec AS_MESSAGE_LOG_FD>>config.log 2967521070a0Smrg $lt_cl_success || AS_EXIT(1) 2968521070a0Smrgfi 2969521070a0Smrg])# LT_OUTPUT 2970521070a0Smrg 2971521070a0Smrg 2972521070a0Smrg# _LT_CONFIG(TAG) 2973521070a0Smrg# --------------- 2974521070a0Smrg# If TAG is the built-in tag, create an initial libtool script with a 2975521070a0Smrg# default configuration from the untagged config vars. Otherwise add code 2976521070a0Smrg# to config.status for appending the configuration named by TAG from the 2977521070a0Smrg# matching tagged config vars. 2978521070a0Smrgm4_defun([_LT_CONFIG], 2979521070a0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2980521070a0Smrg_LT_CONFIG_SAVE_COMMANDS([ 2981521070a0Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 2982521070a0Smrg m4_if(_LT_TAG, [C], [ 2983521070a0Smrg # See if we are running on zsh, and set the options which allow our 2984521070a0Smrg # commands through without removal of \ escapes. 2985521070a0Smrg if test -n "${ZSH_VERSION+set}" ; then 2986521070a0Smrg setopt NO_GLOB_SUBST 2987521070a0Smrg fi 2988521070a0Smrg 2989521070a0Smrg cfgfile="${ofile}T" 2990521070a0Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 2991521070a0Smrg $RM "$cfgfile" 2992521070a0Smrg 2993521070a0Smrg cat <<_LT_EOF >> "$cfgfile" 2994521070a0Smrg#! $SHELL 2995521070a0Smrg 2996521070a0Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 2997521070a0Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 2998521070a0Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 2999521070a0Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3000521070a0Smrg# 3001521070a0Smrg_LT_COPYING 3002521070a0Smrg_LT_LIBTOOL_TAGS 3003521070a0Smrg 3004521070a0Smrg# ### BEGIN LIBTOOL CONFIG 3005521070a0Smrg_LT_LIBTOOL_CONFIG_VARS 3006521070a0Smrg_LT_LIBTOOL_TAG_VARS 3007521070a0Smrg# ### END LIBTOOL CONFIG 3008521070a0Smrg 3009521070a0Smrg_LT_EOF 3010521070a0Smrg 3011521070a0Smrg case $host_os in 3012521070a0Smrg aix3*) 3013521070a0Smrg cat <<\_LT_EOF >> "$cfgfile" 3014521070a0Smrg# AIX sometimes has problems with the GCC collect2 program. For some 3015521070a0Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3016521070a0Smrg# vanish in a puff of smoke. 3017521070a0Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 3018521070a0Smrg COLLECT_NAMES= 3019521070a0Smrg export COLLECT_NAMES 3020521070a0Smrgfi 3021521070a0Smrg_LT_EOF 3022521070a0Smrg ;; 3023521070a0Smrg esac 3024521070a0Smrg 3025521070a0Smrg _LT_PROG_LTMAIN 3026521070a0Smrg 3027521070a0Smrg # We use sed instead of cat because bash on DJGPP gets confused if 3028521070a0Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3029521070a0Smrg # text mode, it properly converts lines to CR/LF. This bash problem 3030521070a0Smrg # is reportedly fixed, but why not run on old versions too? 3031521070a0Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3032521070a0Smrg || (rm -f "$cfgfile"; exit 1) 3033521070a0Smrg 3034521070a0Smrg _LT_PROG_XSI_SHELLFNS 3035521070a0Smrg 3036521070a0Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3037521070a0Smrg || (rm -f "$cfgfile"; exit 1) 3038521070a0Smrg 3039521070a0Smrg mv -f "$cfgfile" "$ofile" || 3040521070a0Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3041521070a0Smrg chmod +x "$ofile" 3042521070a0Smrg], 3043521070a0Smrg[cat <<_LT_EOF >> "$ofile" 3044521070a0Smrg 3045521070a0Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3046521070a0Smrgdnl in a comment (ie after a #). 3047521070a0Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3048521070a0Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3049521070a0Smrg# ### END LIBTOOL TAG CONFIG: $1 3050521070a0Smrg_LT_EOF 3051521070a0Smrg])dnl /m4_if 3052521070a0Smrg], 3053521070a0Smrg[m4_if([$1], [], [ 3054521070a0Smrg PACKAGE='$PACKAGE' 3055521070a0Smrg VERSION='$VERSION' 3056521070a0Smrg TIMESTAMP='$TIMESTAMP' 3057521070a0Smrg RM='$RM' 3058521070a0Smrg ofile='$ofile'], []) 3059521070a0Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3060521070a0Smrg])# _LT_CONFIG 3061521070a0Smrg 3062521070a0Smrg 3063521070a0Smrg# LT_SUPPORTED_TAG(TAG) 3064521070a0Smrg# --------------------- 3065521070a0Smrg# Trace this macro to discover what tags are supported by the libtool 3066521070a0Smrg# --tag option, using: 3067521070a0Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3068521070a0SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3069521070a0Smrg 3070521070a0Smrg 3071521070a0Smrg# C support is built-in for now 3072521070a0Smrgm4_define([_LT_LANG_C_enabled], []) 3073521070a0Smrgm4_define([_LT_TAGS], []) 3074521070a0Smrg 3075521070a0Smrg 3076521070a0Smrg# LT_LANG(LANG) 3077521070a0Smrg# ------------- 3078521070a0Smrg# Enable libtool support for the given language if not already enabled. 3079521070a0SmrgAC_DEFUN([LT_LANG], 3080521070a0Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3081521070a0Smrgm4_case([$1], 3082521070a0Smrg [C], [_LT_LANG(C)], 3083521070a0Smrg [C++], [_LT_LANG(CXX)], 3084521070a0Smrg [Java], [_LT_LANG(GCJ)], 3085521070a0Smrg [Fortran 77], [_LT_LANG(F77)], 3086521070a0Smrg [Fortran], [_LT_LANG(FC)], 3087521070a0Smrg [Windows Resource], [_LT_LANG(RC)], 3088521070a0Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3089521070a0Smrg [_LT_LANG($1)], 3090521070a0Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3091521070a0Smrg])# LT_LANG 3092521070a0Smrg 3093521070a0Smrg 3094521070a0Smrg# _LT_LANG(LANGNAME) 3095521070a0Smrg# ------------------ 3096521070a0Smrgm4_defun([_LT_LANG], 3097521070a0Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3098521070a0Smrg [LT_SUPPORTED_TAG([$1])dnl 3099521070a0Smrg m4_append([_LT_TAGS], [$1 ])dnl 3100521070a0Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3101521070a0Smrg _LT_LANG_$1_CONFIG($1)])dnl 3102521070a0Smrg])# _LT_LANG 3103521070a0Smrg 3104521070a0Smrg 3105521070a0Smrg# _LT_LANG_DEFAULT_CONFIG 3106521070a0Smrg# ----------------------- 3107521070a0Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3108521070a0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3109521070a0Smrg [LT_LANG(CXX)], 3110521070a0Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3111521070a0Smrg 3112521070a0SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3113521070a0Smrg [LT_LANG(F77)], 3114521070a0Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3115521070a0Smrg 3116521070a0SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3117521070a0Smrg [LT_LANG(FC)], 3118521070a0Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3119521070a0Smrg 3120521070a0Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3121521070a0Smrgdnl pulling things in needlessly. 3122521070a0SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3123521070a0Smrg [LT_LANG(GCJ)], 3124521070a0Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3125521070a0Smrg [LT_LANG(GCJ)], 3126521070a0Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3127521070a0Smrg [LT_LANG(GCJ)], 3128521070a0Smrg [m4_ifdef([AC_PROG_GCJ], 3129521070a0Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3130521070a0Smrg m4_ifdef([A][M_PROG_GCJ], 3131521070a0Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3132521070a0Smrg m4_ifdef([LT_PROG_GCJ], 3133521070a0Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3134521070a0Smrg 3135521070a0SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3136521070a0Smrg [LT_LANG(RC)], 3137521070a0Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3138521070a0Smrg])# _LT_LANG_DEFAULT_CONFIG 3139521070a0Smrg 3140521070a0Smrg# Obsolete macros: 3141521070a0SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3142521070a0SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3143521070a0SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3144521070a0SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3145521070a0Smrgdnl aclocal-1.4 backwards compatibility: 3146521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3147521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3148521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3149521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3150521070a0Smrg 3151521070a0Smrg 3152521070a0Smrg# _LT_TAG_COMPILER 3153521070a0Smrg# ---------------- 3154521070a0Smrgm4_defun([_LT_TAG_COMPILER], 3155521070a0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3156521070a0Smrg 3157521070a0Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3158521070a0Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3159521070a0Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3160521070a0Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3161521070a0Smrg 3162521070a0Smrg# If no C compiler was specified, use CC. 3163521070a0SmrgLTCC=${LTCC-"$CC"} 3164521070a0Smrg 3165521070a0Smrg# If no C compiler flags were specified, use CFLAGS. 3166521070a0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3167521070a0Smrg 3168521070a0Smrg# Allow CC to be a program name with arguments. 3169521070a0Smrgcompiler=$CC 3170521070a0Smrg])# _LT_TAG_COMPILER 3171521070a0Smrg 3172521070a0Smrg 3173521070a0Smrg# _LT_COMPILER_BOILERPLATE 3174521070a0Smrg# ------------------------ 3175521070a0Smrg# Check for compiler boilerplate output or warnings with 3176521070a0Smrg# the simple compiler test code. 3177521070a0Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 3178521070a0Smrg[m4_require([_LT_DECL_SED])dnl 3179521070a0Smrgac_outfile=conftest.$ac_objext 3180521070a0Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3181521070a0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3182521070a0Smrg_lt_compiler_boilerplate=`cat conftest.err` 3183521070a0Smrg$RM conftest* 3184521070a0Smrg])# _LT_COMPILER_BOILERPLATE 31854456fccdSmrg 3186521070a0Smrg 3187521070a0Smrg# _LT_LINKER_BOILERPLATE 318842d69509Smrg# ---------------------- 3189521070a0Smrg# Check for linker boilerplate output or warnings with 3190521070a0Smrg# the simple link test code. 3191521070a0Smrgm4_defun([_LT_LINKER_BOILERPLATE], 3192521070a0Smrg[m4_require([_LT_DECL_SED])dnl 3193521070a0Smrgac_outfile=conftest.$ac_objext 3194521070a0Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3195521070a0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3196521070a0Smrg_lt_linker_boilerplate=`cat conftest.err` 3197521070a0Smrg$RM -r conftest* 3198521070a0Smrg])# _LT_LINKER_BOILERPLATE 3199521070a0Smrg 3200521070a0Smrg# _LT_REQUIRED_DARWIN_CHECKS 3201521070a0Smrg# ------------------------- 3202521070a0Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3203521070a0Smrg case $host_os in 3204521070a0Smrg rhapsody* | darwin*) 3205521070a0Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3206521070a0Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3207521070a0Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3208521070a0Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3209521070a0Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3210521070a0Smrg _LT_DECL([], [DSYMUTIL], [1], 3211521070a0Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3212521070a0Smrg _LT_DECL([], [NMEDIT], [1], 3213521070a0Smrg [Tool to change global to local symbols on Mac OS X]) 3214521070a0Smrg _LT_DECL([], [LIPO], [1], 3215521070a0Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 3216521070a0Smrg _LT_DECL([], [OTOOL], [1], 3217521070a0Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3218521070a0Smrg _LT_DECL([], [OTOOL64], [1], 3219521070a0Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3220521070a0Smrg 3221521070a0Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3222521070a0Smrg [lt_cv_apple_cc_single_mod=no 3223521070a0Smrg if test -z "${LT_MULTI_MODULE}"; then 3224521070a0Smrg # By default we will add the -single_module flag. You can override 3225521070a0Smrg # by either setting the environment variable LT_MULTI_MODULE 3226521070a0Smrg # non-empty at configure time, or by adding -multi_module to the 3227521070a0Smrg # link flags. 3228521070a0Smrg rm -rf libconftest.dylib* 3229521070a0Smrg echo "int foo(void){return 1;}" > conftest.c 3230521070a0Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3231521070a0Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3232521070a0Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3233521070a0Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3234521070a0Smrg _lt_result=$? 3235521070a0Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3236521070a0Smrg lt_cv_apple_cc_single_mod=yes 3237521070a0Smrg else 3238521070a0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3239521070a0Smrg fi 3240521070a0Smrg rm -rf libconftest.dylib* 3241521070a0Smrg rm -f conftest.* 3242521070a0Smrg fi]) 3243521070a0Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3244521070a0Smrg [lt_cv_ld_exported_symbols_list], 3245521070a0Smrg [lt_cv_ld_exported_symbols_list=no 3246521070a0Smrg save_LDFLAGS=$LDFLAGS 3247521070a0Smrg echo "_main" > conftest.sym 3248521070a0Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3249521070a0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3250521070a0Smrg [lt_cv_ld_exported_symbols_list=yes], 3251521070a0Smrg [lt_cv_ld_exported_symbols_list=no]) 3252521070a0Smrg LDFLAGS="$save_LDFLAGS" 3253521070a0Smrg ]) 3254521070a0Smrg case $host_os in 3255521070a0Smrg rhapsody* | darwin1.[[012]]) 3256521070a0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3257521070a0Smrg darwin1.*) 3258521070a0Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3259521070a0Smrg darwin*) # darwin 5.x on 3260521070a0Smrg # if running on 10.5 or later, the deployment target defaults 3261521070a0Smrg # to the OS version, if on x86, and 10.4, the deployment 3262521070a0Smrg # target defaults to 10.4. Don't you love it? 3263521070a0Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3264521070a0Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3265521070a0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3266521070a0Smrg 10.[[012]]*) 3267521070a0Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3268521070a0Smrg 10.*) 3269521070a0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3270521070a0Smrg esac 3271521070a0Smrg ;; 3272521070a0Smrg esac 3273521070a0Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3274521070a0Smrg _lt_dar_single_mod='$single_module' 3275521070a0Smrg fi 3276521070a0Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3277521070a0Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3278521070a0Smrg else 3279521070a0Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3280521070a0Smrg fi 3281521070a0Smrg if test "$DSYMUTIL" != ":"; then 3282521070a0Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3283521070a0Smrg else 3284521070a0Smrg _lt_dsymutil= 3285521070a0Smrg fi 3286521070a0Smrg ;; 3287521070a0Smrg esac 3288521070a0Smrg]) 3289521070a0Smrg 3290521070a0Smrg 3291521070a0Smrg# _LT_DARWIN_LINKER_FEATURES 3292521070a0Smrg# -------------------------- 3293521070a0Smrg# Checks for linker and compiler features on darwin 3294521070a0Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3295521070a0Smrg[ 3296521070a0Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3297521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3298521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 3299521070a0Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3300521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3301521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3302521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3303521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3304521070a0Smrg case $cc_basename in 3305521070a0Smrg ifort*) _lt_dar_can_shared=yes ;; 3306521070a0Smrg *) _lt_dar_can_shared=$GCC ;; 3307521070a0Smrg esac 3308521070a0Smrg if test "$_lt_dar_can_shared" = "yes"; then 3309521070a0Smrg output_verbose_link_cmd=echo 3310521070a0Smrg _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}" 3311521070a0Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3312521070a0Smrg _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}" 3313521070a0Smrg _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}" 3314521070a0Smrg m4_if([$1], [CXX], 3315521070a0Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3316521070a0Smrg _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}" 3317521070a0Smrg _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}" 3318521070a0Smrg fi 3319521070a0Smrg],[]) 3320521070a0Smrg else 3321521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 3322521070a0Smrg fi 3323521070a0Smrg]) 3324521070a0Smrg 3325521070a0Smrg# _LT_SYS_MODULE_PATH_AIX 3326521070a0Smrg# ----------------------- 3327521070a0Smrg# Links a minimal program and checks the executable 3328521070a0Smrg# for the system default hardcoded library path. In most cases, 3329521070a0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3330521070a0Smrg# the location of the communication and MPI libs are included too. 3331521070a0Smrg# If we don't find anything, use the default library path according 3332521070a0Smrg# to the aix ld manual. 3333521070a0Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3334521070a0Smrg[m4_require([_LT_DECL_SED])dnl 3335521070a0SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3336521070a0Smrglt_aix_libpath_sed=' 3337521070a0Smrg /Import File Strings/,/^$/ { 3338521070a0Smrg /^0/ { 3339521070a0Smrg s/^0 *\(.*\)$/\1/ 3340521070a0Smrg p 3341521070a0Smrg } 3342521070a0Smrg }' 3343521070a0Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3344521070a0Smrg# Check for a 64-bit object if we didn't find anything. 3345521070a0Smrgif test -z "$aix_libpath"; then 3346521070a0Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3347521070a0Smrgfi],[]) 3348521070a0Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3349521070a0Smrg])# _LT_SYS_MODULE_PATH_AIX 3350521070a0Smrg 3351521070a0Smrg 3352521070a0Smrg# _LT_SHELL_INIT(ARG) 3353521070a0Smrg# ------------------- 3354521070a0Smrgm4_define([_LT_SHELL_INIT], 335542d69509Smrg[ifdef([AC_DIVERSION_NOTICE], 335642d69509Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 335742d69509Smrg [AC_DIVERT_PUSH(NOTICE)]) 335842d69509Smrg$1 335942d69509SmrgAC_DIVERT_POP 3360521070a0Smrg])# _LT_SHELL_INIT 33614456fccdSmrg 33624456fccdSmrg 3363521070a0Smrg# _LT_PROG_ECHO_BACKSLASH 3364521070a0Smrg# ----------------------- 336542d69509Smrg# Add some code to the start of the generated configure script which 336642d69509Smrg# will find an echo command which doesn't interpret backslashes. 3367521070a0Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3368521070a0Smrg[_LT_SHELL_INIT([ 336942d69509Smrg# Check that we are running under the correct shell. 337042d69509SmrgSHELL=${CONFIG_SHELL-/bin/sh} 337142d69509Smrg 3372521070a0Smrgcase X$lt_ECHO in 337342d69509SmrgX*--fallback-echo) 337442d69509Smrg # Remove one level of quotation (which was required for Make). 3375521070a0Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33764456fccdSmrg ;; 337742d69509Smrgesac 33784456fccdSmrg 3379521070a0SmrgECHO=${lt_ECHO-echo} 338042d69509Smrgif test "X[$]1" = X--no-reexec; then 338142d69509Smrg # Discard the --no-reexec flag, and continue. 338242d69509Smrg shift 338342d69509Smrgelif test "X[$]1" = X--fallback-echo; then 338442d69509Smrg # Avoid inline document here, it may be left over 338542d69509Smrg : 3386521070a0Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 3387521070a0Smrg # Yippee, $ECHO works! 338842d69509Smrg : 338942d69509Smrgelse 339042d69509Smrg # Restart under the correct shell. 339142d69509Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 339242d69509Smrgfi 33934456fccdSmrg 339442d69509Smrgif test "X[$]1" = X--fallback-echo; then 339542d69509Smrg # used as fallback echo 339642d69509Smrg shift 3397521070a0Smrg cat <<_LT_EOF 339842d69509Smrg[$]* 3399521070a0Smrg_LT_EOF 340042d69509Smrg exit 0 34014456fccdSmrgfi 34024456fccdSmrg 340342d69509Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 340442d69509Smrg# if CDPATH is set. 340542d69509Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 34064456fccdSmrg 3407521070a0Smrgif test -z "$lt_ECHO"; then 3408521070a0Smrg if test "X${echo_test_string+set}" != Xset; then 3409521070a0Smrg # find a string as large as possible, as long as the shell can cope with it 3410521070a0Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 3411521070a0Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 3412521070a0Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 3413521070a0Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 3414521070a0Smrg then 3415521070a0Smrg break 3416521070a0Smrg fi 3417521070a0Smrg done 3418521070a0Smrg fi 34194456fccdSmrg 3420521070a0Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3421521070a0Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3422521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3423521070a0Smrg : 3424521070a0Smrg else 3425521070a0Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 3426521070a0Smrg # backslashes. This makes it impossible to quote backslashes using 3427521070a0Smrg # echo "$something" | sed 's/\\/\\\\/g' 3428521070a0Smrg # 3429521070a0Smrg # So, first we look for a working echo in the user's PATH. 3430521070a0Smrg 3431521070a0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3432521070a0Smrg for dir in $PATH /usr/ucb; do 3433521070a0Smrg IFS="$lt_save_ifs" 3434521070a0Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 3435521070a0Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 3436521070a0Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 3437521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3438521070a0Smrg ECHO="$dir/echo" 3439521070a0Smrg break 3440521070a0Smrg fi 3441521070a0Smrg done 34424456fccdSmrg IFS="$lt_save_ifs" 34434456fccdSmrg 3444521070a0Smrg if test "X$ECHO" = Xecho; then 3445521070a0Smrg # We didn't find a better echo, so look for alternatives. 3446521070a0Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 3447521070a0Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 3448521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3449521070a0Smrg # This shell has a builtin print -r that does the trick. 3450521070a0Smrg ECHO='print -r' 3451521070a0Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 3452521070a0Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 3453521070a0Smrg # If we have ksh, try running configure again with it. 3454521070a0Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 3455521070a0Smrg export ORIGINAL_CONFIG_SHELL 3456521070a0Smrg CONFIG_SHELL=/bin/ksh 3457521070a0Smrg export CONFIG_SHELL 3458521070a0Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 345942d69509Smrg else 3460521070a0Smrg # Try using printf. 3461521070a0Smrg ECHO='printf %s\n' 3462521070a0Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3463521070a0Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3464521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3465521070a0Smrg # Cool, printf works 3466521070a0Smrg : 3467521070a0Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3468521070a0Smrg test "X$echo_testing_string" = 'X\t' && 3469521070a0Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3470521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3471521070a0Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 3472521070a0Smrg export CONFIG_SHELL 3473521070a0Smrg SHELL="$CONFIG_SHELL" 3474521070a0Smrg export SHELL 3475521070a0Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3476521070a0Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3477521070a0Smrg test "X$echo_testing_string" = 'X\t' && 3478521070a0Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3479521070a0Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3480521070a0Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3481521070a0Smrg else 3482521070a0Smrg # maybe with a smaller string... 3483521070a0Smrg prev=: 34844456fccdSmrg 3485521070a0Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 3486521070a0Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 3487521070a0Smrg then 3488521070a0Smrg break 3489521070a0Smrg fi 3490521070a0Smrg prev="$cmd" 3491521070a0Smrg done 34924456fccdSmrg 3493521070a0Smrg if test "$prev" != 'sed 50q "[$]0"'; then 3494521070a0Smrg echo_test_string=`eval $prev` 3495521070a0Smrg export echo_test_string 3496521070a0Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 3497521070a0Smrg else 3498521070a0Smrg # Oops. We lost completely, so just stick with echo. 3499521070a0Smrg ECHO=echo 3500521070a0Smrg fi 3501521070a0Smrg fi 350242d69509Smrg fi 350342d69509Smrg fi 350442d69509Smrg fi 350542d69509Smrgfi 35064456fccdSmrg 350742d69509Smrg# Copy echo and quote the copy suitably for passing to libtool from 350842d69509Smrg# the Makefile, instead of quoting the original, which is used later. 3509521070a0Smrglt_ECHO=$ECHO 3510521070a0Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 3511521070a0Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 351242d69509Smrgfi 35134456fccdSmrg 3514521070a0SmrgAC_SUBST(lt_ECHO) 3515521070a0Smrg]) 3516521070a0Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3517521070a0Smrg_LT_DECL([], [ECHO], [1], 3518521070a0Smrg [An echo program that does not interpret backslashes]) 3519521070a0Smrg])# _LT_PROG_ECHO_BACKSLASH 35204456fccdSmrg 35214456fccdSmrg 3522521070a0Smrg# _LT_ENABLE_LOCK 3523521070a0Smrg# --------------- 3524521070a0Smrgm4_defun([_LT_ENABLE_LOCK], 352542d69509Smrg[AC_ARG_ENABLE([libtool-lock], 3526521070a0Smrg [AS_HELP_STRING([--disable-libtool-lock], 3527521070a0Smrg [avoid locking (might break parallel builds)])]) 352842d69509Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 35294456fccdSmrg 353042d69509Smrg# Some flags need to be propagated to the compiler or linker for good 353142d69509Smrg# libtool support. 353242d69509Smrgcase $host in 353342d69509Smrgia64-*-hpux*) 353442d69509Smrg # Find out which ABI we are using. 353542d69509Smrg echo 'int i;' > conftest.$ac_ext 353642d69509Smrg if AC_TRY_EVAL(ac_compile); then 353742d69509Smrg case `/usr/bin/file conftest.$ac_objext` in 3538521070a0Smrg *ELF-32*) 3539521070a0Smrg HPUX_IA64_MODE="32" 3540521070a0Smrg ;; 3541521070a0Smrg *ELF-64*) 3542521070a0Smrg HPUX_IA64_MODE="64" 3543521070a0Smrg ;; 354442d69509Smrg esac 354542d69509Smrg fi 354642d69509Smrg rm -rf conftest* 35474456fccdSmrg ;; 354842d69509Smrg*-*-irix6*) 354942d69509Smrg # Find out which ABI we are using. 355042d69509Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 355142d69509Smrg if AC_TRY_EVAL(ac_compile); then 3552521070a0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3553521070a0Smrg case `/usr/bin/file conftest.$ac_objext` in 3554521070a0Smrg *32-bit*) 3555521070a0Smrg LD="${LD-ld} -melf32bsmip" 3556521070a0Smrg ;; 3557521070a0Smrg *N32*) 3558521070a0Smrg LD="${LD-ld} -melf32bmipn32" 3559521070a0Smrg ;; 3560521070a0Smrg *64-bit*) 3561521070a0Smrg LD="${LD-ld} -melf64bmip" 3562521070a0Smrg ;; 3563521070a0Smrg esac 3564521070a0Smrg else 3565521070a0Smrg case `/usr/bin/file conftest.$ac_objext` in 3566521070a0Smrg *32-bit*) 3567521070a0Smrg LD="${LD-ld} -32" 3568521070a0Smrg ;; 3569521070a0Smrg *N32*) 3570521070a0Smrg LD="${LD-ld} -n32" 3571521070a0Smrg ;; 3572521070a0Smrg *64-bit*) 3573521070a0Smrg LD="${LD-ld} -64" 3574521070a0Smrg ;; 3575521070a0Smrg esac 3576521070a0Smrg fi 357742d69509Smrg fi 357842d69509Smrg rm -rf conftest* 35794456fccdSmrg ;; 35804456fccdSmrg 358142d69509Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3582521070a0Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 358342d69509Smrg # Find out which ABI we are using. 358442d69509Smrg echo 'int i;' > conftest.$ac_ext 358542d69509Smrg if AC_TRY_EVAL(ac_compile); then 358642d69509Smrg case `/usr/bin/file conftest.o` in 3587521070a0Smrg *32-bit*) 3588521070a0Smrg case $host in 3589521070a0Smrg x86_64-*kfreebsd*-gnu) 3590521070a0Smrg LD="${LD-ld} -m elf_i386_fbsd" 3591521070a0Smrg ;; 3592521070a0Smrg x86_64-*linux*) 3593521070a0Smrg LD="${LD-ld} -m elf_i386" 3594521070a0Smrg ;; 3595521070a0Smrg ppc64-*linux*|powerpc64-*linux*) 3596521070a0Smrg LD="${LD-ld} -m elf32ppclinux" 3597521070a0Smrg ;; 3598521070a0Smrg s390x-*linux*) 3599521070a0Smrg LD="${LD-ld} -m elf_s390" 3600521070a0Smrg ;; 3601521070a0Smrg sparc64-*linux*) 3602521070a0Smrg LD="${LD-ld} -m elf32_sparc" 3603521070a0Smrg ;; 3604521070a0Smrg esac 3605521070a0Smrg ;; 3606521070a0Smrg *64-bit*) 3607521070a0Smrg case $host in 3608521070a0Smrg x86_64-*kfreebsd*-gnu) 3609521070a0Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 3610521070a0Smrg ;; 3611521070a0Smrg x86_64-*linux*) 3612521070a0Smrg LD="${LD-ld} -m elf_x86_64" 3613521070a0Smrg ;; 3614521070a0Smrg ppc*-*linux*|powerpc*-*linux*) 3615521070a0Smrg LD="${LD-ld} -m elf64ppc" 3616521070a0Smrg ;; 3617521070a0Smrg s390*-*linux*|s390*-*tpf*) 3618521070a0Smrg LD="${LD-ld} -m elf64_s390" 3619521070a0Smrg ;; 3620521070a0Smrg sparc*-*linux*) 3621521070a0Smrg LD="${LD-ld} -m elf64_sparc" 3622521070a0Smrg ;; 3623521070a0Smrg esac 3624521070a0Smrg ;; 36254456fccdSmrg esac 36264456fccdSmrg fi 362742d69509Smrg rm -rf conftest* 36284456fccdSmrg ;; 36294456fccdSmrg 363042d69509Smrg*-*-sco3.2v5*) 363142d69509Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 363242d69509Smrg SAVE_CFLAGS="$CFLAGS" 363342d69509Smrg CFLAGS="$CFLAGS -belf" 363442d69509Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 363542d69509Smrg [AC_LANG_PUSH(C) 3636521070a0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 363742d69509Smrg AC_LANG_POP]) 363842d69509Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 363942d69509Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 364042d69509Smrg CFLAGS="$SAVE_CFLAGS" 364142d69509Smrg fi 36424456fccdSmrg ;; 364342d69509Smrgsparc*-*solaris*) 364442d69509Smrg # Find out which ABI we are using. 364542d69509Smrg echo 'int i;' > conftest.$ac_ext 364642d69509Smrg if AC_TRY_EVAL(ac_compile); then 364742d69509Smrg case `/usr/bin/file conftest.o` in 364842d69509Smrg *64-bit*) 364942d69509Smrg case $lt_cv_prog_gnu_ld in 365042d69509Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 365142d69509Smrg *) 3652521070a0Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 365342d69509Smrg LD="${LD-ld} -64" 365442d69509Smrg fi 365542d69509Smrg ;; 365642d69509Smrg esac 365742d69509Smrg ;; 365842d69509Smrg esac 365942d69509Smrg fi 366042d69509Smrg rm -rf conftest* 36614456fccdSmrg ;; 366242d69509Smrgesac 36634456fccdSmrg 366442d69509Smrgneed_locks="$enable_libtool_lock" 3665521070a0Smrg])# _LT_ENABLE_LOCK 3666521070a0Smrg 3667521070a0Smrg 3668521070a0Smrg# _LT_CMD_OLD_ARCHIVE 3669521070a0Smrg# ------------------- 3670521070a0Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3671521070a0Smrg[AC_CHECK_TOOL(AR, ar, false) 3672521070a0Smrgtest -z "$AR" && AR=ar 3673521070a0Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3674521070a0Smrg_LT_DECL([], [AR], [1], [The archiver]) 3675521070a0Smrg_LT_DECL([], [AR_FLAGS], [1]) 3676521070a0Smrg 3677521070a0SmrgAC_CHECK_TOOL(STRIP, strip, :) 3678521070a0Smrgtest -z "$STRIP" && STRIP=: 3679521070a0Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3680521070a0Smrg 3681521070a0SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3682521070a0Smrgtest -z "$RANLIB" && RANLIB=: 3683521070a0Smrg_LT_DECL([], [RANLIB], [1], 3684521070a0Smrg [Commands used to install an old-style archive]) 3685521070a0Smrg 3686521070a0Smrg# Determine commands to create old-style static archives. 3687521070a0Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3688521070a0Smrgold_postinstall_cmds='chmod 644 $oldlib' 3689521070a0Smrgold_postuninstall_cmds= 36904456fccdSmrg 3691521070a0Smrgif test -n "$RANLIB"; then 3692521070a0Smrg case $host_os in 3693521070a0Smrg openbsd*) 3694521070a0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3695521070a0Smrg ;; 3696521070a0Smrg *) 3697521070a0Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3698521070a0Smrg ;; 3699521070a0Smrg esac 3700521070a0Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3701521070a0Smrgfi 3702521070a0Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 3703521070a0Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3704521070a0Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 3705521070a0Smrg [Commands used to build an old-style archive]) 3706521070a0Smrg])# _LT_CMD_OLD_ARCHIVE 37074456fccdSmrg 37084456fccdSmrg 3709521070a0Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 371042d69509Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 371142d69509Smrg# ---------------------------------------------------------------- 371242d69509Smrg# Check whether the given compiler option works 3713521070a0SmrgAC_DEFUN([_LT_COMPILER_OPTION], 3714521070a0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3715521070a0Smrgm4_require([_LT_DECL_SED])dnl 371642d69509SmrgAC_CACHE_CHECK([$1], [$2], 371742d69509Smrg [$2=no 3718521070a0Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 371942d69509Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 372042d69509Smrg lt_compiler_flag="$3" 372142d69509Smrg # Insert the option either (1) after the last *FLAGS variable, or 372242d69509Smrg # (2) before a word containing "conftest.", or (3) at the end. 372342d69509Smrg # Note that $ac_compile itself does not contain backslashes and begins 372442d69509Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 372542d69509Smrg # The option is referenced via a variable to avoid confusing sed. 372642d69509Smrg lt_compile=`echo "$ac_compile" | $SED \ 372742d69509Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 372842d69509Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 372942d69509Smrg -e 's:$: $lt_compiler_flag:'` 373042d69509Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 373142d69509Smrg (eval "$lt_compile" 2>conftest.err) 373242d69509Smrg ac_status=$? 373342d69509Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 373442d69509Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 373542d69509Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 373642d69509Smrg # The compiler can only warn and ignore the option if not recognized 373742d69509Smrg # So say no if there are warnings other than the usual output. 3738521070a0Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 373942d69509Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 374042d69509Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 374142d69509Smrg $2=yes 374242d69509Smrg fi 374342d69509Smrg fi 3744521070a0Smrg $RM conftest* 374542d69509Smrg]) 37464456fccdSmrg 374742d69509Smrgif test x"[$]$2" = xyes; then 3748521070a0Smrg m4_if([$5], , :, [$5]) 374942d69509Smrgelse 3750521070a0Smrg m4_if([$6], , :, [$6]) 375142d69509Smrgfi 3752521070a0Smrg])# _LT_COMPILER_OPTION 37534456fccdSmrg 3754521070a0Smrg# Old name: 3755521070a0SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3756521070a0Smrgdnl aclocal-1.4 backwards compatibility: 3757521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 37584456fccdSmrg 3759521070a0Smrg 3760521070a0Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3761521070a0Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3762521070a0Smrg# ---------------------------------------------------- 3763521070a0Smrg# Check whether the given linker option works 3764521070a0SmrgAC_DEFUN([_LT_LINKER_OPTION], 3765521070a0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3766521070a0Smrgm4_require([_LT_DECL_SED])dnl 376742d69509SmrgAC_CACHE_CHECK([$1], [$2], 376842d69509Smrg [$2=no 376942d69509Smrg save_LDFLAGS="$LDFLAGS" 377042d69509Smrg LDFLAGS="$LDFLAGS $3" 377142d69509Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 377242d69509Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 377342d69509Smrg # The linker can only warn and ignore the option if not recognized 377442d69509Smrg # So say no if there are warnings 377542d69509Smrg if test -s conftest.err; then 377642d69509Smrg # Append any errors to the config.log. 377742d69509Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3778521070a0Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 377942d69509Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 378042d69509Smrg if diff conftest.exp conftest.er2 >/dev/null; then 378142d69509Smrg $2=yes 378242d69509Smrg fi 378342d69509Smrg else 378442d69509Smrg $2=yes 378542d69509Smrg fi 378642d69509Smrg fi 3787521070a0Smrg $RM -r conftest* 378842d69509Smrg LDFLAGS="$save_LDFLAGS" 378942d69509Smrg]) 37904456fccdSmrg 379142d69509Smrgif test x"[$]$2" = xyes; then 3792521070a0Smrg m4_if([$4], , :, [$4]) 379342d69509Smrgelse 3794521070a0Smrg m4_if([$5], , :, [$5]) 379542d69509Smrgfi 3796521070a0Smrg])# _LT_LINKER_OPTION 37974456fccdSmrg 3798521070a0Smrg# Old name: 3799521070a0SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3800521070a0Smrgdnl aclocal-1.4 backwards compatibility: 3801521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 380242d69509Smrg 3803521070a0Smrg 3804521070a0Smrg# LT_CMD_MAX_LEN 3805521070a0Smrg#--------------- 3806521070a0SmrgAC_DEFUN([LT_CMD_MAX_LEN], 3807521070a0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3808521070a0Smrg# find the maximum length of command line arguments 380942d69509SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 381042d69509SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 381142d69509Smrg i=0 381242d69509Smrg teststring="ABCD" 381342d69509Smrg 381442d69509Smrg case $build_os in 381542d69509Smrg msdosdjgpp*) 381642d69509Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 381742d69509Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 381842d69509Smrg # during glob expansion). Even if it were fixed, the result of this 381942d69509Smrg # check would be larger than it should be. 382042d69509Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 38214456fccdSmrg ;; 382242d69509Smrg 382342d69509Smrg gnu*) 382442d69509Smrg # Under GNU Hurd, this test is not required because there is 382542d69509Smrg # no limit to the length of command line arguments. 382642d69509Smrg # Libtool will interpret -1 as no limit whatsoever 382742d69509Smrg lt_cv_sys_max_cmd_len=-1; 38284456fccdSmrg ;; 382942d69509Smrg 3830521070a0Smrg cygwin* | mingw* | cegcc*) 383142d69509Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 383242d69509Smrg # about 5 minutes as the teststring grows exponentially. 383342d69509Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 383442d69509Smrg # you end up with a "frozen" computer, even though with patience 383542d69509Smrg # the test eventually succeeds (with a max line length of 256k). 383642d69509Smrg # Instead, let's just punt: use the minimum linelength reported by 383742d69509Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 383842d69509Smrg lt_cv_sys_max_cmd_len=8192; 38394456fccdSmrg ;; 384042d69509Smrg 384142d69509Smrg amigaos*) 384242d69509Smrg # On AmigaOS with pdksh, this test takes hours, literally. 384342d69509Smrg # So we just punt and use a minimum line length of 8192. 384442d69509Smrg lt_cv_sys_max_cmd_len=8192; 38454456fccdSmrg ;; 384642d69509Smrg 384742d69509Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 384842d69509Smrg # This has been around since 386BSD, at least. Likely further. 384942d69509Smrg if test -x /sbin/sysctl; then 385042d69509Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 385142d69509Smrg elif test -x /usr/sbin/sysctl; then 385242d69509Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 385342d69509Smrg else 385442d69509Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 385542d69509Smrg fi 385642d69509Smrg # And add a safety zone 385742d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 385842d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 38594456fccdSmrg ;; 386042d69509Smrg 386142d69509Smrg interix*) 386242d69509Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 386342d69509Smrg lt_cv_sys_max_cmd_len=196608 38644456fccdSmrg ;; 38654456fccdSmrg 386642d69509Smrg osf*) 386742d69509Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 386842d69509Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 386942d69509Smrg # nice to cause kernel panics so lets avoid the loop below. 387042d69509Smrg # First set a reasonable default. 387142d69509Smrg lt_cv_sys_max_cmd_len=16384 387242d69509Smrg # 387342d69509Smrg if test -x /sbin/sysconfig; then 387442d69509Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 387542d69509Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 387642d69509Smrg esac 387742d69509Smrg fi 387842d69509Smrg ;; 387942d69509Smrg sco3.2v5*) 388042d69509Smrg lt_cv_sys_max_cmd_len=102400 388142d69509Smrg ;; 388242d69509Smrg sysv5* | sco5v6* | sysv4.2uw2*) 388342d69509Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 388442d69509Smrg if test -n "$kargmax"; then 3885521070a0Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 388642d69509Smrg else 388742d69509Smrg lt_cv_sys_max_cmd_len=32768 388842d69509Smrg fi 388942d69509Smrg ;; 389042d69509Smrg *) 389142d69509Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 389242d69509Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 389342d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 389442d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 389542d69509Smrg else 3896521070a0Smrg # Make teststring a little bigger before we do anything with it. 3897521070a0Smrg # a 1K string should be a reasonable start. 3898521070a0Smrg for i in 1 2 3 4 5 6 7 8 ; do 3899521070a0Smrg teststring=$teststring$teststring 3900521070a0Smrg done 390142d69509Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 3902521070a0Smrg # If test is not a shell built-in, we'll probably end up computing a 3903521070a0Smrg # maximum length that is only half of the actual maximum length, but 3904521070a0Smrg # we can't tell. 3905521070a0Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 3906521070a0Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 390742d69509Smrg test $i != 17 # 1/2 MB should be enough 390842d69509Smrg do 390942d69509Smrg i=`expr $i + 1` 391042d69509Smrg teststring=$teststring$teststring 391142d69509Smrg done 3912521070a0Smrg # Only check the string length outside the loop. 3913521070a0Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 391442d69509Smrg teststring= 3915521070a0Smrg # Add a significant safety factor because C++ compilers can tack on 3916521070a0Smrg # massive amounts of additional arguments before passing them to the 3917521070a0Smrg # linker. It appears as though 1/2 is a usable value. 391842d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 391942d69509Smrg fi 392042d69509Smrg ;; 392142d69509Smrg esac 39224456fccdSmrg]) 392342d69509Smrgif test -n $lt_cv_sys_max_cmd_len ; then 392442d69509Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 392542d69509Smrgelse 392642d69509Smrg AC_MSG_RESULT(none) 392742d69509Smrgfi 3928521070a0Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 3929521070a0Smrg_LT_DECL([], [max_cmd_len], [0], 3930521070a0Smrg [What is the maximum length of a command?]) 3931521070a0Smrg])# LT_CMD_MAX_LEN 39324456fccdSmrg 3933521070a0Smrg# Old name: 3934521070a0SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 3935521070a0Smrgdnl aclocal-1.4 backwards compatibility: 3936521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 39374456fccdSmrg 3938521070a0Smrg 3939521070a0Smrg# _LT_HEADER_DLFCN 3940521070a0Smrg# ---------------- 3941521070a0Smrgm4_defun([_LT_HEADER_DLFCN], 3942521070a0Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 3943521070a0Smrg])# _LT_HEADER_DLFCN 39444456fccdSmrg 39454456fccdSmrg 3946521070a0Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 3947521070a0Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 3948521070a0Smrg# ---------------------------------------------------------------- 3949521070a0Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 3950521070a0Smrg[m4_require([_LT_HEADER_DLFCN])dnl 395142d69509Smrgif test "$cross_compiling" = yes; then : 395242d69509Smrg [$4] 395342d69509Smrgelse 395442d69509Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 395542d69509Smrg lt_status=$lt_dlunknown 3956521070a0Smrg cat > conftest.$ac_ext <<_LT_EOF 395742d69509Smrg[#line __oline__ "configure" 395842d69509Smrg#include "confdefs.h" 39594456fccdSmrg 396042d69509Smrg#if HAVE_DLFCN_H 396142d69509Smrg#include <dlfcn.h> 396242d69509Smrg#endif 39634456fccdSmrg 396442d69509Smrg#include <stdio.h> 39654456fccdSmrg 396642d69509Smrg#ifdef RTLD_GLOBAL 396742d69509Smrg# define LT_DLGLOBAL RTLD_GLOBAL 396842d69509Smrg#else 396942d69509Smrg# ifdef DL_GLOBAL 397042d69509Smrg# define LT_DLGLOBAL DL_GLOBAL 397142d69509Smrg# else 397242d69509Smrg# define LT_DLGLOBAL 0 397342d69509Smrg# endif 397442d69509Smrg#endif 39754456fccdSmrg 397642d69509Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 397742d69509Smrg find out it does not work in some platform. */ 397842d69509Smrg#ifndef LT_DLLAZY_OR_NOW 397942d69509Smrg# ifdef RTLD_LAZY 398042d69509Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 398142d69509Smrg# else 398242d69509Smrg# ifdef DL_LAZY 398342d69509Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 398442d69509Smrg# else 398542d69509Smrg# ifdef RTLD_NOW 398642d69509Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 398742d69509Smrg# else 398842d69509Smrg# ifdef DL_NOW 398942d69509Smrg# define LT_DLLAZY_OR_NOW DL_NOW 399042d69509Smrg# else 399142d69509Smrg# define LT_DLLAZY_OR_NOW 0 399242d69509Smrg# endif 399342d69509Smrg# endif 399442d69509Smrg# endif 399542d69509Smrg# endif 399642d69509Smrg#endif 39974456fccdSmrg 399842d69509Smrgvoid fnord() { int i=42;} 399942d69509Smrgint main () 400042d69509Smrg{ 400142d69509Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 400242d69509Smrg int status = $lt_dlunknown; 40034456fccdSmrg 400442d69509Smrg if (self) 400542d69509Smrg { 400642d69509Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 400742d69509Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 400842d69509Smrg /* dlclose (self); */ 400942d69509Smrg } 401042d69509Smrg else 401142d69509Smrg puts (dlerror ()); 40124456fccdSmrg 4013521070a0Smrg return status; 401442d69509Smrg}] 4015521070a0Smrg_LT_EOF 401642d69509Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 401742d69509Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 401842d69509Smrg lt_status=$? 401942d69509Smrg case x$lt_status in 402042d69509Smrg x$lt_dlno_uscore) $1 ;; 402142d69509Smrg x$lt_dlneed_uscore) $2 ;; 402242d69509Smrg x$lt_dlunknown|x*) $3 ;; 402342d69509Smrg esac 402442d69509Smrg else : 402542d69509Smrg # compilation failed 402642d69509Smrg $3 402742d69509Smrg fi 40284456fccdSmrgfi 402942d69509Smrgrm -fr conftest* 4030521070a0Smrg])# _LT_TRY_DLOPEN_SELF 40314456fccdSmrg 40324456fccdSmrg 4033521070a0Smrg# LT_SYS_DLOPEN_SELF 4034521070a0Smrg# ------------------ 4035521070a0SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4036521070a0Smrg[m4_require([_LT_HEADER_DLFCN])dnl 403742d69509Smrgif test "x$enable_dlopen" != xyes; then 403842d69509Smrg enable_dlopen=unknown 403942d69509Smrg enable_dlopen_self=unknown 404042d69509Smrg enable_dlopen_self_static=unknown 404142d69509Smrgelse 404242d69509Smrg lt_cv_dlopen=no 404342d69509Smrg lt_cv_dlopen_libs= 40444456fccdSmrg 404542d69509Smrg case $host_os in 404642d69509Smrg beos*) 404742d69509Smrg lt_cv_dlopen="load_add_on" 404842d69509Smrg lt_cv_dlopen_libs= 404942d69509Smrg lt_cv_dlopen_self=yes 405042d69509Smrg ;; 40514456fccdSmrg 4052521070a0Smrg mingw* | pw32* | cegcc*) 405342d69509Smrg lt_cv_dlopen="LoadLibrary" 405442d69509Smrg lt_cv_dlopen_libs= 4055521070a0Smrg ;; 40564456fccdSmrg 405742d69509Smrg cygwin*) 405842d69509Smrg lt_cv_dlopen="dlopen" 405942d69509Smrg lt_cv_dlopen_libs= 4060521070a0Smrg ;; 40614456fccdSmrg 406242d69509Smrg darwin*) 406342d69509Smrg # if libdl is installed we need to link against it 406442d69509Smrg AC_CHECK_LIB([dl], [dlopen], 406542d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 406642d69509Smrg lt_cv_dlopen="dyld" 406742d69509Smrg lt_cv_dlopen_libs= 406842d69509Smrg lt_cv_dlopen_self=yes 406942d69509Smrg ]) 4070521070a0Smrg ;; 40714456fccdSmrg 407242d69509Smrg *) 407342d69509Smrg AC_CHECK_FUNC([shl_load], 407442d69509Smrg [lt_cv_dlopen="shl_load"], 407542d69509Smrg [AC_CHECK_LIB([dld], [shl_load], 407642d69509Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 407742d69509Smrg [AC_CHECK_FUNC([dlopen], 407842d69509Smrg [lt_cv_dlopen="dlopen"], 407942d69509Smrg [AC_CHECK_LIB([dl], [dlopen], 408042d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 408142d69509Smrg [AC_CHECK_LIB([svld], [dlopen], 408242d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 408342d69509Smrg [AC_CHECK_LIB([dld], [dld_link], 408442d69509Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 408542d69509Smrg ]) 408642d69509Smrg ]) 408742d69509Smrg ]) 408842d69509Smrg ]) 408942d69509Smrg ]) 409042d69509Smrg ;; 409142d69509Smrg esac 40924456fccdSmrg 409342d69509Smrg if test "x$lt_cv_dlopen" != xno; then 409442d69509Smrg enable_dlopen=yes 409542d69509Smrg else 409642d69509Smrg enable_dlopen=no 409742d69509Smrg fi 40984456fccdSmrg 409942d69509Smrg case $lt_cv_dlopen in 410042d69509Smrg dlopen) 410142d69509Smrg save_CPPFLAGS="$CPPFLAGS" 410242d69509Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 41034456fccdSmrg 410442d69509Smrg save_LDFLAGS="$LDFLAGS" 410542d69509Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 41064456fccdSmrg 410742d69509Smrg save_LIBS="$LIBS" 410842d69509Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 41094456fccdSmrg 411042d69509Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 411142d69509Smrg lt_cv_dlopen_self, [dnl 4112521070a0Smrg _LT_TRY_DLOPEN_SELF( 411342d69509Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 411442d69509Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 411542d69509Smrg ]) 41164456fccdSmrg 411742d69509Smrg if test "x$lt_cv_dlopen_self" = xyes; then 411842d69509Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 411942d69509Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4120521070a0Smrg lt_cv_dlopen_self_static, [dnl 4121521070a0Smrg _LT_TRY_DLOPEN_SELF( 412242d69509Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 412342d69509Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 412442d69509Smrg ]) 412542d69509Smrg fi 41264456fccdSmrg 412742d69509Smrg CPPFLAGS="$save_CPPFLAGS" 412842d69509Smrg LDFLAGS="$save_LDFLAGS" 412942d69509Smrg LIBS="$save_LIBS" 413042d69509Smrg ;; 413142d69509Smrg esac 41324456fccdSmrg 413342d69509Smrg case $lt_cv_dlopen_self in 413442d69509Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 413542d69509Smrg *) enable_dlopen_self=unknown ;; 413642d69509Smrg esac 41374456fccdSmrg 413842d69509Smrg case $lt_cv_dlopen_self_static in 413942d69509Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 414042d69509Smrg *) enable_dlopen_self_static=unknown ;; 414142d69509Smrg esac 414242d69509Smrgfi 4143521070a0Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4144521070a0Smrg [Whether dlopen is supported]) 4145521070a0Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4146521070a0Smrg [Whether dlopen of programs is supported]) 4147521070a0Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4148521070a0Smrg [Whether dlopen of statically linked programs is supported]) 4149521070a0Smrg])# LT_SYS_DLOPEN_SELF 41504456fccdSmrg 4151521070a0Smrg# Old name: 4152521070a0SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4153521070a0Smrgdnl aclocal-1.4 backwards compatibility: 4154521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 41554456fccdSmrg 4156521070a0Smrg 4157521070a0Smrg# _LT_COMPILER_C_O([TAGNAME]) 4158521070a0Smrg# --------------------------- 4159521070a0Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 4160521070a0Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4161521070a0Smrgm4_defun([_LT_COMPILER_C_O], 4162521070a0Smrg[m4_require([_LT_DECL_SED])dnl 4163521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4164521070a0Smrgm4_require([_LT_TAG_COMPILER])dnl 416542d69509SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4166521070a0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4167521070a0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4168521070a0Smrg $RM -r conftest 2>/dev/null 416942d69509Smrg mkdir conftest 417042d69509Smrg cd conftest 417142d69509Smrg mkdir out 417242d69509Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 41734456fccdSmrg 417442d69509Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 417542d69509Smrg # Insert the option either (1) after the last *FLAGS variable, or 417642d69509Smrg # (2) before a word containing "conftest.", or (3) at the end. 417742d69509Smrg # Note that $ac_compile itself does not contain backslashes and begins 417842d69509Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 417942d69509Smrg lt_compile=`echo "$ac_compile" | $SED \ 418042d69509Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 418142d69509Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 418242d69509Smrg -e 's:$: $lt_compiler_flag:'` 418342d69509Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 418442d69509Smrg (eval "$lt_compile" 2>out/conftest.err) 418542d69509Smrg ac_status=$? 418642d69509Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 418742d69509Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 418842d69509Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 418942d69509Smrg then 419042d69509Smrg # The compiler can only warn and ignore the option if not recognized 419142d69509Smrg # So say no if there are warnings 4192521070a0Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 419342d69509Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 419442d69509Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4195521070a0Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 419642d69509Smrg fi 419742d69509Smrg fi 419842d69509Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4199521070a0Smrg $RM conftest* 420042d69509Smrg # SGI C++ compiler will create directory out/ii_files/ for 420142d69509Smrg # template instantiation 4202521070a0Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4203521070a0Smrg $RM out/* && rmdir out 420442d69509Smrg cd .. 4205521070a0Smrg $RM -r conftest 4206521070a0Smrg $RM conftest* 420742d69509Smrg]) 4208521070a0Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4209521070a0Smrg [Does compiler simultaneously support -c and -o options?]) 4210521070a0Smrg])# _LT_COMPILER_C_O 42114456fccdSmrg 42124456fccdSmrg 4213521070a0Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4214521070a0Smrg# ---------------------------------- 421542d69509Smrg# Check to see if we can do hard links to lock some files if needed 4216521070a0Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4217521070a0Smrg[m4_require([_LT_ENABLE_LOCK])dnl 4218521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4219521070a0Smrg_LT_COMPILER_C_O([$1]) 42204456fccdSmrg 422142d69509Smrghard_links="nottested" 4222521070a0Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 422342d69509Smrg # do not overwrite the value of need_locks provided by the user 422442d69509Smrg AC_MSG_CHECKING([if we can lock with hard links]) 422542d69509Smrg hard_links=yes 4226521070a0Smrg $RM conftest* 422742d69509Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 422842d69509Smrg touch conftest.a 422942d69509Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 423042d69509Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 423142d69509Smrg AC_MSG_RESULT([$hard_links]) 423242d69509Smrg if test "$hard_links" = no; then 423342d69509Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 423442d69509Smrg need_locks=warn 423542d69509Smrg fi 423642d69509Smrgelse 423742d69509Smrg need_locks=no 423842d69509Smrgfi 4239521070a0Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4240521070a0Smrg])# _LT_COMPILER_FILE_LOCKS 42414456fccdSmrg 42424456fccdSmrg 4243521070a0Smrg# _LT_CHECK_OBJDIR 4244521070a0Smrg# ---------------- 4245521070a0Smrgm4_defun([_LT_CHECK_OBJDIR], 424642d69509Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 424742d69509Smrg[rm -f .libs 2>/dev/null 424842d69509Smrgmkdir .libs 2>/dev/null 424942d69509Smrgif test -d .libs; then 425042d69509Smrg lt_cv_objdir=.libs 425142d69509Smrgelse 425242d69509Smrg # MS-DOS does not allow filenames that begin with a dot. 425342d69509Smrg lt_cv_objdir=_libs 425442d69509Smrgfi 425542d69509Smrgrmdir .libs 2>/dev/null]) 425642d69509Smrgobjdir=$lt_cv_objdir 4257521070a0Smrg_LT_DECL([], [objdir], [0], 4258521070a0Smrg [The name of the directory that contains temporary libtool files])dnl 4259521070a0Smrgm4_pattern_allow([LT_OBJDIR])dnl 4260521070a0SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4261521070a0Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4262521070a0Smrg])# _LT_CHECK_OBJDIR 42634456fccdSmrg 42644456fccdSmrg 4265521070a0Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4266521070a0Smrg# -------------------------------------- 426742d69509Smrg# Check hardcoding attributes. 4268521070a0Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 426942d69509Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4270521070a0Smrg_LT_TAGVAR(hardcode_action, $1)= 4271521070a0Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4272521070a0Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4273521070a0Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 42744456fccdSmrg 4275521070a0Smrg # We can hardcode non-existent directories. 4276521070a0Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 427742d69509Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 427842d69509Smrg # have to relink, otherwise we might link with an installed library 427942d69509Smrg # when we should be linking with a yet-to-be-installed one 4280521070a0Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4281521070a0Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 428242d69509Smrg # Linking always hardcodes the temporary library directory. 4283521070a0Smrg _LT_TAGVAR(hardcode_action, $1)=relink 428442d69509Smrg else 428542d69509Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4286521070a0Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 428742d69509Smrg fi 42884456fccdSmrgelse 428942d69509Smrg # We cannot hardcode anything, or else we can only hardcode existing 429042d69509Smrg # directories. 4291521070a0Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 42924456fccdSmrgfi 4293521070a0SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 429442d69509Smrg 4295521070a0Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4296521070a0Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 429742d69509Smrg # Fast installation is not supported 429842d69509Smrg enable_fast_install=no 429942d69509Smrgelif test "$shlibpath_overrides_runpath" = yes || 430042d69509Smrg test "$enable_shared" = no; then 430142d69509Smrg # Fast installation is not necessary 430242d69509Smrg enable_fast_install=needless 43034456fccdSmrgfi 4304521070a0Smrg_LT_TAGDECL([], [hardcode_action], [0], 4305521070a0Smrg [How to hardcode a shared library path into an executable]) 4306521070a0Smrg])# _LT_LINKER_HARDCODE_LIBPATH 43074456fccdSmrg 430842d69509Smrg 4309521070a0Smrg# _LT_CMD_STRIPLIB 4310521070a0Smrg# ---------------- 4311521070a0Smrgm4_defun([_LT_CMD_STRIPLIB], 4312521070a0Smrg[m4_require([_LT_DECL_EGREP]) 4313521070a0Smrgstriplib= 431442d69509Smrgold_striplib= 431542d69509SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4316521070a0Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 431742d69509Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 431842d69509Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 431942d69509Smrg AC_MSG_RESULT([yes]) 43204456fccdSmrgelse 432142d69509Smrg# FIXME - insert some real tests, host_os isn't really good enough 432242d69509Smrg case $host_os in 4323521070a0Smrg darwin*) 4324521070a0Smrg if test -n "$STRIP" ; then 4325521070a0Smrg striplib="$STRIP -x" 4326521070a0Smrg old_striplib="$STRIP -S" 4327521070a0Smrg AC_MSG_RESULT([yes]) 4328521070a0Smrg else 4329521070a0Smrg AC_MSG_RESULT([no]) 4330521070a0Smrg fi 4331521070a0Smrg ;; 4332521070a0Smrg *) 4333521070a0Smrg AC_MSG_RESULT([no]) 433442d69509Smrg ;; 433542d69509Smrg esac 43364456fccdSmrgfi 4337521070a0Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4338521070a0Smrg_LT_DECL([], [striplib], [1]) 4339521070a0Smrg])# _LT_CMD_STRIPLIB 43404456fccdSmrg 43414456fccdSmrg 4342521070a0Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 434342d69509Smrg# ----------------------------- 434442d69509Smrg# PORTME Fill in your ld.so characteristics 4345521070a0Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4346521070a0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4347521070a0Smrgm4_require([_LT_DECL_EGREP])dnl 4348521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4349521070a0Smrgm4_require([_LT_DECL_OBJDUMP])dnl 4350521070a0Smrgm4_require([_LT_DECL_SED])dnl 435142d69509SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4352521070a0Smrgm4_if([$1], 4353521070a0Smrg [], [ 435442d69509Smrgif test "$GCC" = yes; then 435542d69509Smrg case $host_os in 435642d69509Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 435742d69509Smrg *) lt_awk_arg="/^libraries:/" ;; 435842d69509Smrg esac 435942d69509Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4360521070a0Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 436142d69509Smrg # if the path contains ";" then we assume it to be the separator 436242d69509Smrg # otherwise default to the standard path separator (i.e. ":") - it is 436342d69509Smrg # assumed that no part of a normal pathname contains ";" but that should 436442d69509Smrg # okay in the real world where ";" in dirpaths is itself problematic. 4365521070a0Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 436642d69509Smrg else 4367521070a0Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 436842d69509Smrg fi 436942d69509Smrg # Ok, now we have the path, separated by spaces, we can step through it 437042d69509Smrg # and add multilib dir if necessary. 437142d69509Smrg lt_tmp_lt_search_path_spec= 437242d69509Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 437342d69509Smrg for lt_sys_path in $lt_search_path_spec; do 437442d69509Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 437542d69509Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 437642d69509Smrg else 437742d69509Smrg test -d "$lt_sys_path" && \ 437842d69509Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 437942d69509Smrg fi 438042d69509Smrg done 4381521070a0Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 438242d69509SmrgBEGIN {RS=" "; FS="/|\n";} { 438342d69509Smrg lt_foo=""; 438442d69509Smrg lt_count=0; 438542d69509Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 438642d69509Smrg if ($lt_i != "" && $lt_i != ".") { 438742d69509Smrg if ($lt_i == "..") { 438842d69509Smrg lt_count++; 438942d69509Smrg } else { 439042d69509Smrg if (lt_count == 0) { 439142d69509Smrg lt_foo="/" $lt_i lt_foo; 439242d69509Smrg } else { 439342d69509Smrg lt_count--; 439442d69509Smrg } 439542d69509Smrg } 439642d69509Smrg } 439742d69509Smrg } 439842d69509Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 439942d69509Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 440042d69509Smrg}'` 4401521070a0Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 440242d69509Smrgelse 440342d69509Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 440442d69509Smrgfi]) 4405521070a0Smrglibrary_names_spec= 4406521070a0Smrglibname_spec='lib$name' 4407521070a0Smrgsoname_spec= 4408521070a0Smrgshrext_cmds=".so" 4409521070a0Smrgpostinstall_cmds= 4410521070a0Smrgpostuninstall_cmds= 4411521070a0Smrgfinish_cmds= 4412521070a0Smrgfinish_eval= 4413521070a0Smrgshlibpath_var= 4414521070a0Smrgshlibpath_overrides_runpath=unknown 4415521070a0Smrgversion_type=none 4416521070a0Smrgdynamic_linker="$host_os ld.so" 4417521070a0Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 441842d69509Smrgneed_lib_prefix=unknown 441942d69509Smrghardcode_into_libs=no 44204456fccdSmrg 442142d69509Smrg# when you set need_version to no, make sure it does not cause -set_version 442242d69509Smrg# flags to be left without arguments 442342d69509Smrgneed_version=unknown 44244456fccdSmrg 442542d69509Smrgcase $host_os in 442642d69509Smrgaix3*) 442742d69509Smrg version_type=linux 442842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 442942d69509Smrg shlibpath_var=LIBPATH 44304456fccdSmrg 443142d69509Smrg # AIX 3 has no versioning support, so we append a major version to the name. 443242d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 443342d69509Smrg ;; 44344456fccdSmrg 443542d69509Smrgaix[[4-9]]*) 443642d69509Smrg version_type=linux 443742d69509Smrg need_lib_prefix=no 443842d69509Smrg need_version=no 443942d69509Smrg hardcode_into_libs=yes 444042d69509Smrg if test "$host_cpu" = ia64; then 444142d69509Smrg # AIX 5 supports IA64 444242d69509Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 444342d69509Smrg shlibpath_var=LD_LIBRARY_PATH 444442d69509Smrg else 444542d69509Smrg # With GCC up to 2.95.x, collect2 would create an import file 444642d69509Smrg # for dependence libraries. The import file would start with 444742d69509Smrg # the line `#! .'. This would cause the generated library to 444842d69509Smrg # depend on `.', always an invalid library. This was fixed in 444942d69509Smrg # development snapshots of GCC prior to 3.0. 445042d69509Smrg case $host_os in 445142d69509Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 445242d69509Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 445342d69509Smrg echo ' yes ' 4454521070a0Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 445542d69509Smrg : 445642d69509Smrg else 445742d69509Smrg can_build_shared=no 445842d69509Smrg fi 445942d69509Smrg ;; 446042d69509Smrg esac 446142d69509Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 446242d69509Smrg # soname into executable. Probably we can add versioning support to 446342d69509Smrg # collect2, so additional links can be useful in future. 446442d69509Smrg if test "$aix_use_runtimelinking" = yes; then 446542d69509Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 446642d69509Smrg # instead of lib<name>.a to let people know that these are not 446742d69509Smrg # typical AIX shared libraries. 446842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 44694456fccdSmrg else 447042d69509Smrg # We preserve .a as extension for shared libraries through AIX4.2 447142d69509Smrg # and later when we are not doing run time linking. 447242d69509Smrg library_names_spec='${libname}${release}.a $libname.a' 447342d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 44744456fccdSmrg fi 447542d69509Smrg shlibpath_var=LIBPATH 44764456fccdSmrg fi 447742d69509Smrg ;; 44784456fccdSmrg 447942d69509Smrgamigaos*) 4480521070a0Smrg case $host_cpu in 4481521070a0Smrg powerpc) 4482521070a0Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4483521070a0Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4484521070a0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4485521070a0Smrg ;; 4486521070a0Smrg m68k) 4487521070a0Smrg library_names_spec='$libname.ixlibrary $libname.a' 4488521070a0Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4489521070a0Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 4490521070a0Smrg ;; 4491521070a0Smrg esac 449242d69509Smrg ;; 44934456fccdSmrg 449442d69509Smrgbeos*) 449542d69509Smrg library_names_spec='${libname}${shared_ext}' 449642d69509Smrg dynamic_linker="$host_os ld.so" 449742d69509Smrg shlibpath_var=LIBRARY_PATH 449842d69509Smrg ;; 44994456fccdSmrg 450042d69509Smrgbsdi[[45]]*) 450142d69509Smrg version_type=linux 450242d69509Smrg need_version=no 450342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 450442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 450542d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 450642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 450742d69509Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 450842d69509Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 450942d69509Smrg # the default ld.so.conf also contains /usr/contrib/lib and 451042d69509Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 451142d69509Smrg # libtool to hard-code these into programs 451242d69509Smrg ;; 45134456fccdSmrg 4514521070a0Smrgcygwin* | mingw* | pw32* | cegcc*) 451542d69509Smrg version_type=windows 451642d69509Smrg shrext_cmds=".dll" 451742d69509Smrg need_version=no 451842d69509Smrg need_lib_prefix=no 45194456fccdSmrg 452042d69509Smrg case $GCC,$host_os in 4521521070a0Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 452242d69509Smrg library_names_spec='$libname.dll.a' 452342d69509Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 452442d69509Smrg postinstall_cmds='base_file=`basename \${file}`~ 4525521070a0Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 452642d69509Smrg dldir=$destdir/`dirname \$dlpath`~ 452742d69509Smrg test -d \$dldir || mkdir -p \$dldir~ 452842d69509Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 4529521070a0Smrg chmod a+x \$dldir/$dlname~ 4530521070a0Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4531521070a0Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4532521070a0Smrg fi' 453342d69509Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 453442d69509Smrg dlpath=$dir/\$dldll~ 4535521070a0Smrg $RM \$dlpath' 453642d69509Smrg shlibpath_overrides_runpath=yes 45374456fccdSmrg 453842d69509Smrg case $host_os in 453942d69509Smrg cygwin*) 454042d69509Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 454142d69509Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 454242d69509Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 454342d69509Smrg ;; 4544521070a0Smrg mingw* | cegcc*) 454542d69509Smrg # MinGW DLLs use traditional 'lib' prefix 454642d69509Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4547521070a0Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4548521070a0Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 454942d69509Smrg # It is most probably a Windows format PATH printed by 455042d69509Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 455142d69509Smrg # path with ; separators, and with drive letters. We can handle the 455242d69509Smrg # drive letters (cygwin fileutils understands them), so leave them, 455342d69509Smrg # especially as we might pass files found there to a mingw objdump, 455442d69509Smrg # which wouldn't understand a cygwinified path. Ahh. 4555521070a0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 455642d69509Smrg else 4557521070a0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 455842d69509Smrg fi 455942d69509Smrg ;; 456042d69509Smrg pw32*) 456142d69509Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 456242d69509Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 456342d69509Smrg ;; 456442d69509Smrg esac 456542d69509Smrg ;; 45664456fccdSmrg 456742d69509Smrg *) 456842d69509Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 456942d69509Smrg ;; 457042d69509Smrg esac 457142d69509Smrg dynamic_linker='Win32 ld.exe' 457242d69509Smrg # FIXME: first we should search . and the directory the executable is in 457342d69509Smrg shlibpath_var=PATH 457442d69509Smrg ;; 45754456fccdSmrg 457642d69509Smrgdarwin* | rhapsody*) 457742d69509Smrg dynamic_linker="$host_os dyld" 457842d69509Smrg version_type=darwin 457942d69509Smrg need_lib_prefix=no 458042d69509Smrg need_version=no 4581521070a0Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 458242d69509Smrg soname_spec='${libname}${release}${major}$shared_ext' 458342d69509Smrg shlibpath_overrides_runpath=yes 458442d69509Smrg shlibpath_var=DYLD_LIBRARY_PATH 458542d69509Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4586521070a0Smrgm4_if([$1], [],[ 4587521070a0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 458842d69509Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 458942d69509Smrg ;; 45904456fccdSmrg 459142d69509Smrgdgux*) 459242d69509Smrg version_type=linux 459342d69509Smrg need_lib_prefix=no 459442d69509Smrg need_version=no 459542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 459642d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 459742d69509Smrg shlibpath_var=LD_LIBRARY_PATH 459842d69509Smrg ;; 45994456fccdSmrg 460042d69509Smrgfreebsd1*) 460142d69509Smrg dynamic_linker=no 460242d69509Smrg ;; 460342d69509Smrg 460442d69509Smrgfreebsd* | dragonfly*) 460542d69509Smrg # DragonFly does not have aout. When/if they implement a new 460642d69509Smrg # versioning mechanism, adjust this. 460742d69509Smrg if test -x /usr/bin/objformat; then 460842d69509Smrg objformat=`/usr/bin/objformat` 460942d69509Smrg else 461042d69509Smrg case $host_os in 461142d69509Smrg freebsd[[123]]*) objformat=aout ;; 461242d69509Smrg *) objformat=elf ;; 461342d69509Smrg esac 461442d69509Smrg fi 461542d69509Smrg version_type=freebsd-$objformat 461642d69509Smrg case $version_type in 461742d69509Smrg freebsd-elf*) 461842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 461942d69509Smrg need_version=no 462042d69509Smrg need_lib_prefix=no 462142d69509Smrg ;; 462242d69509Smrg freebsd-*) 462342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 462442d69509Smrg need_version=yes 462542d69509Smrg ;; 462642d69509Smrg esac 462742d69509Smrg shlibpath_var=LD_LIBRARY_PATH 462842d69509Smrg case $host_os in 462942d69509Smrg freebsd2*) 463042d69509Smrg shlibpath_overrides_runpath=yes 463142d69509Smrg ;; 463242d69509Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 463342d69509Smrg shlibpath_overrides_runpath=yes 463442d69509Smrg hardcode_into_libs=yes 46354456fccdSmrg ;; 463642d69509Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 463742d69509Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 463842d69509Smrg shlibpath_overrides_runpath=no 463942d69509Smrg hardcode_into_libs=yes 464042d69509Smrg ;; 464142d69509Smrg *) # from 4.6 on, and DragonFly 464242d69509Smrg shlibpath_overrides_runpath=yes 464342d69509Smrg hardcode_into_libs=yes 464442d69509Smrg ;; 464542d69509Smrg esac 464642d69509Smrg ;; 46474456fccdSmrg 464842d69509Smrggnu*) 464942d69509Smrg version_type=linux 465042d69509Smrg need_lib_prefix=no 465142d69509Smrg need_version=no 465242d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 465342d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 465442d69509Smrg shlibpath_var=LD_LIBRARY_PATH 465542d69509Smrg hardcode_into_libs=yes 465642d69509Smrg ;; 465742d69509Smrg 465842d69509Smrghpux9* | hpux10* | hpux11*) 465942d69509Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 466042d69509Smrg # link against other versions. 466142d69509Smrg version_type=sunos 466242d69509Smrg need_lib_prefix=no 466342d69509Smrg need_version=no 466442d69509Smrg case $host_cpu in 466542d69509Smrg ia64*) 466642d69509Smrg shrext_cmds='.so' 466742d69509Smrg hardcode_into_libs=yes 466842d69509Smrg dynamic_linker="$host_os dld.so" 466942d69509Smrg shlibpath_var=LD_LIBRARY_PATH 467042d69509Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 467142d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 467242d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 467342d69509Smrg if test "X$HPUX_IA64_MODE" = X32; then 467442d69509Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 46754456fccdSmrg else 467642d69509Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 46774456fccdSmrg fi 467842d69509Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 467942d69509Smrg ;; 4680521070a0Smrg hppa*64*) 4681521070a0Smrg shrext_cmds='.sl' 4682521070a0Smrg hardcode_into_libs=yes 4683521070a0Smrg dynamic_linker="$host_os dld.sl" 4684521070a0Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4685521070a0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4686521070a0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4687521070a0Smrg soname_spec='${libname}${release}${shared_ext}$major' 4688521070a0Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4689521070a0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4690521070a0Smrg ;; 4691521070a0Smrg *) 469242d69509Smrg shrext_cmds='.sl' 469342d69509Smrg dynamic_linker="$host_os dld.sl" 469442d69509Smrg shlibpath_var=SHLIB_PATH 469542d69509Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 469642d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 469742d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 46984456fccdSmrg ;; 469942d69509Smrg esac 470042d69509Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 470142d69509Smrg postinstall_cmds='chmod 555 $lib' 470242d69509Smrg ;; 47034456fccdSmrg 470442d69509Smrginterix[[3-9]]*) 470542d69509Smrg version_type=linux 470642d69509Smrg need_lib_prefix=no 470742d69509Smrg need_version=no 470842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 470942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 471042d69509Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 471142d69509Smrg shlibpath_var=LD_LIBRARY_PATH 471242d69509Smrg shlibpath_overrides_runpath=no 471342d69509Smrg hardcode_into_libs=yes 471442d69509Smrg ;; 471542d69509Smrg 471642d69509Smrgirix5* | irix6* | nonstopux*) 471742d69509Smrg case $host_os in 471842d69509Smrg nonstopux*) version_type=nonstopux ;; 471942d69509Smrg *) 472042d69509Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 472142d69509Smrg version_type=linux 472242d69509Smrg else 472342d69509Smrg version_type=irix 472442d69509Smrg fi ;; 472542d69509Smrg esac 472642d69509Smrg need_lib_prefix=no 472742d69509Smrg need_version=no 472842d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 472942d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 473042d69509Smrg case $host_os in 473142d69509Smrg irix5* | nonstopux*) 473242d69509Smrg libsuff= shlibsuff= 473342d69509Smrg ;; 473442d69509Smrg *) 473542d69509Smrg case $LD in # libtool.m4 will add one of these switches to LD 473642d69509Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 473742d69509Smrg libsuff= shlibsuff= libmagic=32-bit;; 473842d69509Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 473942d69509Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 474042d69509Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 474142d69509Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 474242d69509Smrg *) libsuff= shlibsuff= libmagic=never-match;; 47434456fccdSmrg esac 47444456fccdSmrg ;; 474542d69509Smrg esac 474642d69509Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 474742d69509Smrg shlibpath_overrides_runpath=no 474842d69509Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 474942d69509Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 475042d69509Smrg hardcode_into_libs=yes 475142d69509Smrg ;; 47524456fccdSmrg 475342d69509Smrg# No shared lib support for Linux oldld, aout, or coff. 475442d69509Smrglinux*oldld* | linux*aout* | linux*coff*) 475542d69509Smrg dynamic_linker=no 475642d69509Smrg ;; 47574456fccdSmrg 475842d69509Smrg# This must be Linux ELF. 475942d69509Smrglinux* | k*bsd*-gnu) 476042d69509Smrg version_type=linux 476142d69509Smrg need_lib_prefix=no 476242d69509Smrg need_version=no 476342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 476442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 476542d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 476642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 476742d69509Smrg shlibpath_overrides_runpath=no 4768521070a0Smrg # Some binutils ld are patched to set DT_RUNPATH 4769521070a0Smrg save_LDFLAGS=$LDFLAGS 4770521070a0Smrg save_libdir=$libdir 4771521070a0Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4772521070a0Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4773521070a0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4774521070a0Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4775521070a0Smrg [shlibpath_overrides_runpath=yes])]) 4776521070a0Smrg LDFLAGS=$save_LDFLAGS 4777521070a0Smrg libdir=$save_libdir 4778521070a0Smrg 477942d69509Smrg # This implies no fast_install, which is unacceptable. 478042d69509Smrg # Some rework will be needed to allow for fast_install 478142d69509Smrg # before this can be enabled. 478242d69509Smrg hardcode_into_libs=yes 478342d69509Smrg 478442d69509Smrg # Append ld.so.conf contents to the search path 478542d69509Smrg if test -f /etc/ld.so.conf; then 4786521070a0Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 478742d69509Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 478842d69509Smrg fi 478942d69509Smrg 479042d69509Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 479142d69509Smrg # powerpc, because MkLinux only supported shared libraries with the 479242d69509Smrg # GNU dynamic linker. Since this was broken with cross compilers, 479342d69509Smrg # most powerpc-linux boxes support dynamic linking these days and 479442d69509Smrg # people can always --disable-shared, the test was removed, and we 479542d69509Smrg # assume the GNU/Linux dynamic linker is in use. 479642d69509Smrg dynamic_linker='GNU/Linux ld.so' 47974456fccdSmrg ;; 47984456fccdSmrg 479942d69509Smrgnetbsd*) 480042d69509Smrg version_type=sunos 480142d69509Smrg need_lib_prefix=no 480242d69509Smrg need_version=no 4803521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 480442d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 480542d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 480642d69509Smrg dynamic_linker='NetBSD (a.out) ld.so' 480742d69509Smrg else 480842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 480942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 481042d69509Smrg dynamic_linker='NetBSD ld.elf_so' 481142d69509Smrg fi 481242d69509Smrg shlibpath_var=LD_LIBRARY_PATH 481342d69509Smrg shlibpath_overrides_runpath=yes 481442d69509Smrg hardcode_into_libs=yes 481542d69509Smrg ;; 48164456fccdSmrg 481742d69509Smrgnewsos6) 481842d69509Smrg version_type=linux 481942d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 482042d69509Smrg shlibpath_var=LD_LIBRARY_PATH 482142d69509Smrg shlibpath_overrides_runpath=yes 482242d69509Smrg ;; 482342d69509Smrg 4824521070a0Smrg*nto* | *qnx*) 4825521070a0Smrg version_type=qnx 482642d69509Smrg need_lib_prefix=no 482742d69509Smrg need_version=no 482842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 482942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 483042d69509Smrg shlibpath_var=LD_LIBRARY_PATH 4831521070a0Smrg shlibpath_overrides_runpath=no 4832521070a0Smrg hardcode_into_libs=yes 4833521070a0Smrg dynamic_linker='ldqnx.so' 483442d69509Smrg ;; 483542d69509Smrg 483642d69509Smrgopenbsd*) 483742d69509Smrg version_type=sunos 483842d69509Smrg sys_lib_dlsearch_path_spec="/usr/lib" 483942d69509Smrg need_lib_prefix=no 484042d69509Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 484142d69509Smrg case $host_os in 4842521070a0Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 4843521070a0Smrg *) need_version=no ;; 484442d69509Smrg esac 484542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 484642d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 484742d69509Smrg shlibpath_var=LD_LIBRARY_PATH 4848521070a0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 484942d69509Smrg case $host_os in 485042d69509Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 485142d69509Smrg shlibpath_overrides_runpath=no 48524456fccdSmrg ;; 48534456fccdSmrg *) 485442d69509Smrg shlibpath_overrides_runpath=yes 48554456fccdSmrg ;; 485642d69509Smrg esac 485742d69509Smrg else 485842d69509Smrg shlibpath_overrides_runpath=yes 485942d69509Smrg fi 486042d69509Smrg ;; 48614456fccdSmrg 486242d69509Smrgos2*) 486342d69509Smrg libname_spec='$name' 486442d69509Smrg shrext_cmds=".dll" 486542d69509Smrg need_lib_prefix=no 486642d69509Smrg library_names_spec='$libname${shared_ext} $libname.a' 486742d69509Smrg dynamic_linker='OS/2 ld.exe' 486842d69509Smrg shlibpath_var=LIBPATH 486942d69509Smrg ;; 487042d69509Smrg 487142d69509Smrgosf3* | osf4* | osf5*) 487242d69509Smrg version_type=osf 487342d69509Smrg need_lib_prefix=no 487442d69509Smrg need_version=no 487542d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 487642d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 487742d69509Smrg shlibpath_var=LD_LIBRARY_PATH 487842d69509Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 487942d69509Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 488042d69509Smrg ;; 488142d69509Smrg 488242d69509Smrgrdos*) 488342d69509Smrg dynamic_linker=no 488442d69509Smrg ;; 488542d69509Smrg 488642d69509Smrgsolaris*) 488742d69509Smrg version_type=linux 488842d69509Smrg need_lib_prefix=no 488942d69509Smrg need_version=no 489042d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 489142d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 489242d69509Smrg shlibpath_var=LD_LIBRARY_PATH 489342d69509Smrg shlibpath_overrides_runpath=yes 489442d69509Smrg hardcode_into_libs=yes 489542d69509Smrg # ldd complains unless libraries are executable 489642d69509Smrg postinstall_cmds='chmod +x $lib' 489742d69509Smrg ;; 489842d69509Smrg 489942d69509Smrgsunos4*) 490042d69509Smrg version_type=sunos 490142d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 490242d69509Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 490342d69509Smrg shlibpath_var=LD_LIBRARY_PATH 490442d69509Smrg shlibpath_overrides_runpath=yes 490542d69509Smrg if test "$with_gnu_ld" = yes; then 490642d69509Smrg need_lib_prefix=no 490742d69509Smrg fi 490842d69509Smrg need_version=yes 490942d69509Smrg ;; 491042d69509Smrg 491142d69509Smrgsysv4 | sysv4.3*) 491242d69509Smrg version_type=linux 491342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 491442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 491542d69509Smrg shlibpath_var=LD_LIBRARY_PATH 491642d69509Smrg case $host_vendor in 491742d69509Smrg sni) 491842d69509Smrg shlibpath_overrides_runpath=no 491942d69509Smrg need_lib_prefix=no 492042d69509Smrg runpath_var=LD_RUN_PATH 49214456fccdSmrg ;; 492242d69509Smrg siemens) 492342d69509Smrg need_lib_prefix=no 49244456fccdSmrg ;; 492542d69509Smrg motorola) 492642d69509Smrg need_lib_prefix=no 492742d69509Smrg need_version=no 492842d69509Smrg shlibpath_overrides_runpath=no 492942d69509Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 49304456fccdSmrg ;; 493142d69509Smrg esac 493242d69509Smrg ;; 49334456fccdSmrg 493442d69509Smrgsysv4*MP*) 493542d69509Smrg if test -d /usr/nec ;then 493642d69509Smrg version_type=linux 493742d69509Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 493842d69509Smrg soname_spec='$libname${shared_ext}.$major' 493942d69509Smrg shlibpath_var=LD_LIBRARY_PATH 494042d69509Smrg fi 494142d69509Smrg ;; 494242d69509Smrg 494342d69509Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 494442d69509Smrg version_type=freebsd-elf 494542d69509Smrg need_lib_prefix=no 494642d69509Smrg need_version=no 494742d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 494842d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 494942d69509Smrg shlibpath_var=LD_LIBRARY_PATH 4950521070a0Smrg shlibpath_overrides_runpath=yes 495142d69509Smrg hardcode_into_libs=yes 495242d69509Smrg if test "$with_gnu_ld" = yes; then 495342d69509Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 495442d69509Smrg else 495542d69509Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 495642d69509Smrg case $host_os in 495742d69509Smrg sco3.2v5*) 495842d69509Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 495942d69509Smrg ;; 496042d69509Smrg esac 496142d69509Smrg fi 496242d69509Smrg sys_lib_dlsearch_path_spec='/usr/lib' 496342d69509Smrg ;; 496442d69509Smrg 4965521070a0Smrgtpf*) 4966521070a0Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4967521070a0Smrg version_type=linux 4968521070a0Smrg need_lib_prefix=no 4969521070a0Smrg need_version=no 4970521070a0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4971521070a0Smrg shlibpath_var=LD_LIBRARY_PATH 4972521070a0Smrg shlibpath_overrides_runpath=no 4973521070a0Smrg hardcode_into_libs=yes 4974521070a0Smrg ;; 4975521070a0Smrg 497642d69509Smrguts4*) 497742d69509Smrg version_type=linux 497842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 497942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 498042d69509Smrg shlibpath_var=LD_LIBRARY_PATH 498142d69509Smrg ;; 498242d69509Smrg 498342d69509Smrg*) 498442d69509Smrg dynamic_linker=no 498542d69509Smrg ;; 498642d69509Smrgesac 498742d69509SmrgAC_MSG_RESULT([$dynamic_linker]) 498842d69509Smrgtest "$dynamic_linker" = no && can_build_shared=no 498942d69509Smrg 499042d69509Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 499142d69509Smrgif test "$GCC" = yes; then 499242d69509Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 499342d69509Smrgfi 499442d69509Smrg 4995521070a0Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4996521070a0Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4997521070a0Smrgfi 4998521070a0Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4999521070a0Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5000521070a0Smrgfi 500142d69509Smrg 5002521070a0Smrg_LT_DECL([], [variables_saved_for_relink], [1], 5003521070a0Smrg [Variables whose values should be saved in libtool wrapper scripts and 5004521070a0Smrg restored at link time]) 5005521070a0Smrg_LT_DECL([], [need_lib_prefix], [0], 5006521070a0Smrg [Do we need the "lib" prefix for modules?]) 5007521070a0Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5008521070a0Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5009521070a0Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5010521070a0Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5011521070a0Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5012521070a0Smrg [Is shlibpath searched before the hard-coded library search path?]) 5013521070a0Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5014521070a0Smrg_LT_DECL([], [library_names_spec], [1], 5015521070a0Smrg [[List of archive names. First name is the real one, the rest are links. 5016521070a0Smrg The last name is the one that the linker finds with -lNAME]]) 5017521070a0Smrg_LT_DECL([], [soname_spec], [1], 5018521070a0Smrg [[The coded name of the library, if different from the real name]]) 5019521070a0Smrg_LT_DECL([], [postinstall_cmds], [2], 5020521070a0Smrg [Command to use after installation of a shared archive]) 5021521070a0Smrg_LT_DECL([], [postuninstall_cmds], [2], 5022521070a0Smrg [Command to use after uninstallation of a shared archive]) 5023521070a0Smrg_LT_DECL([], [finish_cmds], [2], 5024521070a0Smrg [Commands used to finish a libtool library installation in a directory]) 5025521070a0Smrg_LT_DECL([], [finish_eval], [1], 5026521070a0Smrg [[As "finish_cmds", except a single script fragment to be evaled but 5027521070a0Smrg not shown]]) 5028521070a0Smrg_LT_DECL([], [hardcode_into_libs], [0], 5029521070a0Smrg [Whether we should hardcode library paths into libraries]) 5030521070a0Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5031521070a0Smrg [Compile-time system search path for libraries]) 5032521070a0Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5033521070a0Smrg [Run-time system search path for libraries]) 5034521070a0Smrg])# _LT_SYS_DYNAMIC_LINKER 5035521070a0Smrg 5036521070a0Smrg 5037521070a0Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 5038521070a0Smrg# -------------------------- 5039521070a0Smrg# find a file program which can recognize shared library 5040521070a0SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5041521070a0Smrg[m4_require([_LT_DECL_EGREP])dnl 5042521070a0SmrgAC_MSG_CHECKING([for $1]) 5043521070a0SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5044521070a0Smrg[case $MAGIC_CMD in 5045521070a0Smrg[[\\/*] | ?:[\\/]*]) 5046521070a0Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5047521070a0Smrg ;; 5048521070a0Smrg*) 5049521070a0Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5050521070a0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5051521070a0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5052521070a0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5053521070a0Smrgdnl not every word. This closes a longstanding sh security hole. 5054521070a0Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5055521070a0Smrg for ac_dir in $ac_dummy; do 505642d69509Smrg IFS="$lt_save_ifs" 505742d69509Smrg test -z "$ac_dir" && ac_dir=. 505842d69509Smrg if test -f $ac_dir/$1; then 505942d69509Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 506042d69509Smrg if test -n "$file_magic_test_file"; then 506142d69509Smrg case $deplibs_check_method in 506242d69509Smrg "file_magic "*) 506342d69509Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 506442d69509Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 506542d69509Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 506642d69509Smrg $EGREP "$file_magic_regex" > /dev/null; then 506742d69509Smrg : 50684456fccdSmrg else 5069521070a0Smrg cat <<_LT_EOF 1>&2 50704456fccdSmrg 507142d69509Smrg*** Warning: the command libtool uses to detect shared libraries, 507242d69509Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 507342d69509Smrg*** The result is that libtool may fail to recognize shared libraries 507442d69509Smrg*** as such. This will affect the creation of libtool libraries that 507542d69509Smrg*** depend on shared libraries, but programs linked with such libtool 507642d69509Smrg*** libraries will work regardless of this problem. Nevertheless, you 507742d69509Smrg*** may want to report the problem to your system manager and/or to 507842d69509Smrg*** bug-libtool@gnu.org 50794456fccdSmrg 5080521070a0Smrg_LT_EOF 508142d69509Smrg fi ;; 508242d69509Smrg esac 508342d69509Smrg fi 508442d69509Smrg break 508542d69509Smrg fi 508642d69509Smrg done 508742d69509Smrg IFS="$lt_save_ifs" 508842d69509Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 508942d69509Smrg ;; 509042d69509Smrgesac]) 509142d69509SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 509242d69509Smrgif test -n "$MAGIC_CMD"; then 509342d69509Smrg AC_MSG_RESULT($MAGIC_CMD) 509442d69509Smrgelse 509542d69509Smrg AC_MSG_RESULT(no) 509642d69509Smrgfi 5097521070a0Smrg_LT_DECL([], [MAGIC_CMD], [0], 5098521070a0Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5099521070a0Smrg])# _LT_PATH_TOOL_PREFIX 51004456fccdSmrg 5101521070a0Smrg# Old name: 5102521070a0SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5103521070a0Smrgdnl aclocal-1.4 backwards compatibility: 5104521070a0Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 51054456fccdSmrg 5106521070a0Smrg 5107521070a0Smrg# _LT_PATH_MAGIC 5108521070a0Smrg# -------------- 510942d69509Smrg# find a file program which can recognize a shared library 5110521070a0Smrgm4_defun([_LT_PATH_MAGIC], 5111521070a0Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 511242d69509Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 511342d69509Smrg if test -n "$ac_tool_prefix"; then 5114521070a0Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 511542d69509Smrg else 511642d69509Smrg MAGIC_CMD=: 511742d69509Smrg fi 511842d69509Smrgfi 5119521070a0Smrg])# _LT_PATH_MAGIC 512042d69509Smrg 512142d69509Smrg 5122521070a0Smrg# LT_PATH_LD 512342d69509Smrg# ---------- 512442d69509Smrg# find the pathname to the GNU or non-GNU linker 5125521070a0SmrgAC_DEFUN([LT_PATH_LD], 5126521070a0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 512742d69509SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 512842d69509SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5129521070a0Smrgm4_require([_LT_DECL_SED])dnl 5130521070a0Smrgm4_require([_LT_DECL_EGREP])dnl 5131521070a0Smrg 5132521070a0SmrgAC_ARG_WITH([gnu-ld], 5133521070a0Smrg [AS_HELP_STRING([--with-gnu-ld], 5134521070a0Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5135521070a0Smrg [test "$withval" = no || with_gnu_ld=yes], 5136521070a0Smrg [with_gnu_ld=no])dnl 5137521070a0Smrg 513842d69509Smrgac_prog=ld 513942d69509Smrgif test "$GCC" = yes; then 514042d69509Smrg # Check if gcc -print-prog-name=ld gives a path. 514142d69509Smrg AC_MSG_CHECKING([for ld used by $CC]) 514242d69509Smrg case $host in 514342d69509Smrg *-*-mingw*) 514442d69509Smrg # gcc leaves a trailing carriage return which upsets mingw 514542d69509Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 514642d69509Smrg *) 514742d69509Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 514842d69509Smrg esac 514942d69509Smrg case $ac_prog in 515042d69509Smrg # Accept absolute paths. 515142d69509Smrg [[\\/]]* | ?:[[\\/]]*) 515242d69509Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 515342d69509Smrg # Canonicalize the pathname of ld 5154521070a0Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5155521070a0Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5156521070a0Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 515742d69509Smrg done 515842d69509Smrg test -z "$LD" && LD="$ac_prog" 515942d69509Smrg ;; 516042d69509Smrg "") 516142d69509Smrg # If it fails, then pretend we aren't using GCC. 516242d69509Smrg ac_prog=ld 51634456fccdSmrg ;; 516442d69509Smrg *) 516542d69509Smrg # If it is relative, then search for the first ld in PATH. 516642d69509Smrg with_gnu_ld=unknown 516742d69509Smrg ;; 516842d69509Smrg esac 516942d69509Smrgelif test "$with_gnu_ld" = yes; then 517042d69509Smrg AC_MSG_CHECKING([for GNU ld]) 517142d69509Smrgelse 517242d69509Smrg AC_MSG_CHECKING([for non-GNU ld]) 517342d69509Smrgfi 517442d69509SmrgAC_CACHE_VAL(lt_cv_path_LD, 517542d69509Smrg[if test -z "$LD"; then 517642d69509Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 517742d69509Smrg for ac_dir in $PATH; do 517842d69509Smrg IFS="$lt_save_ifs" 517942d69509Smrg test -z "$ac_dir" && ac_dir=. 518042d69509Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 518142d69509Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 518242d69509Smrg # Check to see if the program is GNU ld. I'd rather use --version, 518342d69509Smrg # but apparently some variants of GNU ld only accept -v. 518442d69509Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 518542d69509Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 518642d69509Smrg *GNU* | *'with BFD'*) 518742d69509Smrg test "$with_gnu_ld" != no && break 51884456fccdSmrg ;; 51894456fccdSmrg *) 519042d69509Smrg test "$with_gnu_ld" != yes && break 51914456fccdSmrg ;; 519242d69509Smrg esac 519342d69509Smrg fi 519442d69509Smrg done 519542d69509Smrg IFS="$lt_save_ifs" 519642d69509Smrgelse 519742d69509Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 519842d69509Smrgfi]) 519942d69509SmrgLD="$lt_cv_path_LD" 520042d69509Smrgif test -n "$LD"; then 520142d69509Smrg AC_MSG_RESULT($LD) 520242d69509Smrgelse 520342d69509Smrg AC_MSG_RESULT(no) 520442d69509Smrgfi 520542d69509Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5206521070a0Smrg_LT_PATH_LD_GNU 5207521070a0SmrgAC_SUBST([LD]) 520842d69509Smrg 5209521070a0Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5210521070a0Smrg])# LT_PATH_LD 521142d69509Smrg 5212521070a0Smrg# Old names: 5213521070a0SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5214521070a0SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5215521070a0Smrgdnl aclocal-1.4 backwards compatibility: 5216521070a0Smrgdnl AC_DEFUN([AM_PROG_LD], []) 5217521070a0Smrgdnl AC_DEFUN([AC_PROG_LD], []) 5218521070a0Smrg 5219521070a0Smrg 5220521070a0Smrg# _LT_PATH_LD_GNU 5221521070a0Smrg#- -------------- 5222521070a0Smrgm4_defun([_LT_PATH_LD_GNU], 5223521070a0Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 522442d69509Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 522542d69509Smrgcase `$LD -v 2>&1 </dev/null` in 522642d69509Smrg*GNU* | *'with BFD'*) 522742d69509Smrg lt_cv_prog_gnu_ld=yes 522842d69509Smrg ;; 522942d69509Smrg*) 523042d69509Smrg lt_cv_prog_gnu_ld=no 523142d69509Smrg ;; 523242d69509Smrgesac]) 523342d69509Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5234521070a0Smrg])# _LT_PATH_LD_GNU 523542d69509Smrg 523642d69509Smrg 5237521070a0Smrg# _LT_CMD_RELOAD 5238521070a0Smrg# -------------- 523942d69509Smrg# find reload flag for linker 524042d69509Smrg# -- PORTME Some linkers may need a different reload flag. 5241521070a0Smrgm4_defun([_LT_CMD_RELOAD], 524242d69509Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 524342d69509Smrg lt_cv_ld_reload_flag, 524442d69509Smrg [lt_cv_ld_reload_flag='-r']) 524542d69509Smrgreload_flag=$lt_cv_ld_reload_flag 524642d69509Smrgcase $reload_flag in 524742d69509Smrg"" | " "*) ;; 524842d69509Smrg*) reload_flag=" $reload_flag" ;; 524942d69509Smrgesac 525042d69509Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 525142d69509Smrgcase $host_os in 525242d69509Smrg darwin*) 525342d69509Smrg if test "$GCC" = yes; then 525442d69509Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 525542d69509Smrg else 525642d69509Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 525742d69509Smrg fi 52584456fccdSmrg ;; 52594456fccdSmrgesac 5260521070a0Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5261521070a0Smrg_LT_DECL([], [reload_cmds], [2])dnl 5262521070a0Smrg])# _LT_CMD_RELOAD 52634456fccdSmrg 52644456fccdSmrg 5265521070a0Smrg# _LT_CHECK_MAGIC_METHOD 5266521070a0Smrg# ---------------------- 526742d69509Smrg# how to check for library dependencies 526842d69509Smrg# -- PORTME fill in with the dynamic library characteristics 5269521070a0Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5270521070a0Smrg[m4_require([_LT_DECL_EGREP]) 5271521070a0Smrgm4_require([_LT_DECL_OBJDUMP]) 5272521070a0SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 527342d69509Smrglt_cv_deplibs_check_method, 527442d69509Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 527542d69509Smrglt_cv_file_magic_test_file= 527642d69509Smrglt_cv_deplibs_check_method='unknown' 527742d69509Smrg# Need to set the preceding variable on all platforms that support 527842d69509Smrg# interlibrary dependencies. 527942d69509Smrg# 'none' -- dependencies not supported. 528042d69509Smrg# `unknown' -- same as none, but documents that we really don't know. 528142d69509Smrg# 'pass_all' -- all dependencies passed with no checks. 528242d69509Smrg# 'test_compile' -- check by making test program. 528342d69509Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 528442d69509Smrg# which responds to the $file_magic_cmd with a given extended regex. 528542d69509Smrg# If you have `file' or equivalent on your system and you're not sure 528642d69509Smrg# whether `pass_all' will *always* work, you probably want this one. 52874456fccdSmrg 528842d69509Smrgcase $host_os in 528942d69509Smrgaix[[4-9]]*) 529042d69509Smrg lt_cv_deplibs_check_method=pass_all 529142d69509Smrg ;; 52924456fccdSmrg 529342d69509Smrgbeos*) 529442d69509Smrg lt_cv_deplibs_check_method=pass_all 529542d69509Smrg ;; 52964456fccdSmrg 529742d69509Smrgbsdi[[45]]*) 529842d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 529942d69509Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 530042d69509Smrg lt_cv_file_magic_test_file=/shlib/libc.so 530142d69509Smrg ;; 53024456fccdSmrg 530342d69509Smrgcygwin*) 530442d69509Smrg # func_win32_libid is a shell function defined in ltmain.sh 530542d69509Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 530642d69509Smrg lt_cv_file_magic_cmd='func_win32_libid' 530742d69509Smrg ;; 53084456fccdSmrg 530942d69509Smrgmingw* | pw32*) 531042d69509Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 531142d69509Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 531242d69509Smrg # unless we find 'file', for example because we are cross-compiling. 531342d69509Smrg if ( file / ) >/dev/null 2>&1; then 531442d69509Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 531542d69509Smrg lt_cv_file_magic_cmd='func_win32_libid' 531642d69509Smrg else 531742d69509Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 531842d69509Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 531942d69509Smrg fi 532042d69509Smrg ;; 53214456fccdSmrg 5322521070a0Smrgcegcc) 5323521070a0Smrg # use the weaker test based on 'objdump'. See mingw*. 5324521070a0Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5325521070a0Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5326521070a0Smrg ;; 5327521070a0Smrg 532842d69509Smrgdarwin* | rhapsody*) 532942d69509Smrg lt_cv_deplibs_check_method=pass_all 533042d69509Smrg ;; 53314456fccdSmrg 533242d69509Smrgfreebsd* | dragonfly*) 5333521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 533442d69509Smrg case $host_cpu in 533542d69509Smrg i*86 ) 533642d69509Smrg # Not sure whether the presence of OpenBSD here was a mistake. 533742d69509Smrg # Let's accept both of them until this is cleared up. 533842d69509Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 533942d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 534042d69509Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 534142d69509Smrg ;; 53424456fccdSmrg esac 534342d69509Smrg else 534442d69509Smrg lt_cv_deplibs_check_method=pass_all 534542d69509Smrg fi 534642d69509Smrg ;; 53474456fccdSmrg 534842d69509Smrggnu*) 534942d69509Smrg lt_cv_deplibs_check_method=pass_all 53504456fccdSmrg ;; 53514456fccdSmrg 535242d69509Smrghpux10.20* | hpux11*) 535342d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 535442d69509Smrg case $host_cpu in 535542d69509Smrg ia64*) 535642d69509Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 535742d69509Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 535842d69509Smrg ;; 535942d69509Smrg hppa*64*) 536042d69509Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 536142d69509Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 536242d69509Smrg ;; 536342d69509Smrg *) 536442d69509Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 536542d69509Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 53664456fccdSmrg ;; 53674456fccdSmrg esac 53684456fccdSmrg ;; 53694456fccdSmrg 537042d69509Smrginterix[[3-9]]*) 537142d69509Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 537242d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 537342d69509Smrg ;; 53744456fccdSmrg 537542d69509Smrgirix5* | irix6* | nonstopux*) 537642d69509Smrg case $LD in 537742d69509Smrg *-32|*"-32 ") libmagic=32-bit;; 537842d69509Smrg *-n32|*"-n32 ") libmagic=N32;; 537942d69509Smrg *-64|*"-64 ") libmagic=64-bit;; 538042d69509Smrg *) libmagic=never-match;; 538142d69509Smrg esac 538242d69509Smrg lt_cv_deplibs_check_method=pass_all 538342d69509Smrg ;; 53844456fccdSmrg 538542d69509Smrg# This must be Linux ELF. 538642d69509Smrglinux* | k*bsd*-gnu) 538742d69509Smrg lt_cv_deplibs_check_method=pass_all 538842d69509Smrg ;; 53894456fccdSmrg 539042d69509Smrgnetbsd*) 5391521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 539242d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 539342d69509Smrg else 539442d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 539542d69509Smrg fi 539642d69509Smrg ;; 53974456fccdSmrg 539842d69509Smrgnewos6*) 539942d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 540042d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 540142d69509Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 540242d69509Smrg ;; 54034456fccdSmrg 5404521070a0Smrg*nto* | *qnx*) 5405521070a0Smrg lt_cv_deplibs_check_method=pass_all 540642d69509Smrg ;; 54074456fccdSmrg 540842d69509Smrgopenbsd*) 5409521070a0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 541042d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 541142d69509Smrg else 541242d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 541342d69509Smrg fi 541442d69509Smrg ;; 54154456fccdSmrg 541642d69509Smrgosf3* | osf4* | osf5*) 541742d69509Smrg lt_cv_deplibs_check_method=pass_all 541842d69509Smrg ;; 54194456fccdSmrg 542042d69509Smrgrdos*) 542142d69509Smrg lt_cv_deplibs_check_method=pass_all 542242d69509Smrg ;; 54234456fccdSmrg 542442d69509Smrgsolaris*) 542542d69509Smrg lt_cv_deplibs_check_method=pass_all 542642d69509Smrg ;; 54274456fccdSmrg 5428521070a0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5429521070a0Smrg lt_cv_deplibs_check_method=pass_all 5430521070a0Smrg ;; 5431521070a0Smrg 543242d69509Smrgsysv4 | sysv4.3*) 543342d69509Smrg case $host_vendor in 543442d69509Smrg motorola) 543542d69509Smrg 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]]' 543642d69509Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 543742d69509Smrg ;; 543842d69509Smrg ncr) 543942d69509Smrg lt_cv_deplibs_check_method=pass_all 544042d69509Smrg ;; 544142d69509Smrg sequent) 544242d69509Smrg lt_cv_file_magic_cmd='/bin/file' 544342d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 544442d69509Smrg ;; 544542d69509Smrg sni) 544642d69509Smrg lt_cv_file_magic_cmd='/bin/file' 544742d69509Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 544842d69509Smrg lt_cv_file_magic_test_file=/lib/libc.so 544942d69509Smrg ;; 545042d69509Smrg siemens) 545142d69509Smrg lt_cv_deplibs_check_method=pass_all 545242d69509Smrg ;; 545342d69509Smrg pc) 545442d69509Smrg lt_cv_deplibs_check_method=pass_all 545542d69509Smrg ;; 545642d69509Smrg esac 54574456fccdSmrg ;; 545842d69509Smrg 5459521070a0Smrgtpf*) 546042d69509Smrg lt_cv_deplibs_check_method=pass_all 54614456fccdSmrg ;; 54624456fccdSmrgesac 546342d69509Smrg]) 546442d69509Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 546542d69509Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 546642d69509Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 54674456fccdSmrg 5468521070a0Smrg_LT_DECL([], [deplibs_check_method], [1], 5469521070a0Smrg [Method to check whether dependent libraries are shared objects]) 5470521070a0Smrg_LT_DECL([], [file_magic_cmd], [1], 5471521070a0Smrg [Command to use when deplibs_check_method == "file_magic"]) 5472521070a0Smrg])# _LT_CHECK_MAGIC_METHOD 54734456fccdSmrg 5474521070a0Smrg 5475521070a0Smrg# LT_PATH_NM 547642d69509Smrg# ---------- 5477521070a0Smrg# find the pathname to a BSD- or MS-compatible name lister 5478521070a0SmrgAC_DEFUN([LT_PATH_NM], 5479521070a0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5480521070a0SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 548142d69509Smrg[if test -n "$NM"; then 548242d69509Smrg # Let the user override the test. 548342d69509Smrg lt_cv_path_NM="$NM" 548442d69509Smrgelse 548542d69509Smrg lt_nm_to_check="${ac_tool_prefix}nm" 548642d69509Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 548742d69509Smrg lt_nm_to_check="$lt_nm_to_check nm" 548842d69509Smrg fi 548942d69509Smrg for lt_tmp_nm in $lt_nm_to_check; do 549042d69509Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 549142d69509Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 549242d69509Smrg IFS="$lt_save_ifs" 549342d69509Smrg test -z "$ac_dir" && ac_dir=. 549442d69509Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 549542d69509Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 549642d69509Smrg # Check to see if the nm accepts a BSD-compat flag. 549742d69509Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 549842d69509Smrg # nm: unknown option "B" ignored 549942d69509Smrg # Tru64's nm complains that /dev/null is an invalid object file 550042d69509Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 550142d69509Smrg */dev/null* | *'Invalid file or object type'*) 550242d69509Smrg lt_cv_path_NM="$tmp_nm -B" 550342d69509Smrg break 550442d69509Smrg ;; 550542d69509Smrg *) 550642d69509Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 550742d69509Smrg */dev/null*) 550842d69509Smrg lt_cv_path_NM="$tmp_nm -p" 550942d69509Smrg break 551042d69509Smrg ;; 551142d69509Smrg *) 551242d69509Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 551342d69509Smrg continue # so that we can try to find one that supports BSD flags 551442d69509Smrg ;; 551542d69509Smrg esac 551642d69509Smrg ;; 551742d69509Smrg esac 551842d69509Smrg fi 551942d69509Smrg done 552042d69509Smrg IFS="$lt_save_ifs" 552142d69509Smrg done 5522521070a0Smrg : ${lt_cv_path_NM=no} 552342d69509Smrgfi]) 5524521070a0Smrgif test "$lt_cv_path_NM" != "no"; then 5525521070a0Smrg NM="$lt_cv_path_NM" 5526521070a0Smrgelse 5527521070a0Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 5528521070a0Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 5529521070a0Smrg AC_SUBST([DUMPBIN]) 5530521070a0Smrg if test "$DUMPBIN" != ":"; then 5531521070a0Smrg NM="$DUMPBIN" 5532521070a0Smrg fi 5533521070a0Smrgfi 5534521070a0Smrgtest -z "$NM" && NM=nm 5535521070a0SmrgAC_SUBST([NM]) 5536521070a0Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5537521070a0Smrg 5538521070a0SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5539521070a0Smrg [lt_cv_nm_interface="BSD nm" 5540521070a0Smrg echo "int some_variable = 0;" > conftest.$ac_ext 5541521070a0Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5542521070a0Smrg (eval "$ac_compile" 2>conftest.err) 5543521070a0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5544521070a0Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5545521070a0Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5546521070a0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5547521070a0Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 5548521070a0Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 5549521070a0Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5550521070a0Smrg lt_cv_nm_interface="MS dumpbin" 5551521070a0Smrg fi 5552521070a0Smrg rm -f conftest*]) 5553521070a0Smrg])# LT_PATH_NM 55544456fccdSmrg 5555521070a0Smrg# Old names: 5556521070a0SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5557521070a0SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5558521070a0Smrgdnl aclocal-1.4 backwards compatibility: 5559521070a0Smrgdnl AC_DEFUN([AM_PROG_NM], []) 5560521070a0Smrgdnl AC_DEFUN([AC_PROG_NM], []) 55614456fccdSmrg 5562521070a0Smrg 5563521070a0Smrg# LT_LIB_M 5564521070a0Smrg# -------- 556542d69509Smrg# check for math library 5566521070a0SmrgAC_DEFUN([LT_LIB_M], 556742d69509Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 556842d69509SmrgLIBM= 556942d69509Smrgcase $host in 557042d69509Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 557142d69509Smrg # These system don't have libm, or don't need it 557242d69509Smrg ;; 557342d69509Smrg*-ncr-sysv4.3*) 557442d69509Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 557542d69509Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 557642d69509Smrg ;; 557742d69509Smrg*) 557842d69509Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 557942d69509Smrg ;; 558042d69509Smrgesac 5581521070a0SmrgAC_SUBST([LIBM]) 5582521070a0Smrg])# LT_LIB_M 55834456fccdSmrg 5584521070a0Smrg# Old name: 5585521070a0SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5586521070a0Smrgdnl aclocal-1.4 backwards compatibility: 5587521070a0Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 55884456fccdSmrg 55894456fccdSmrg 5590521070a0Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5591521070a0Smrg# ------------------------------- 5592521070a0Smrgm4_defun([_LT_COMPILER_NO_RTTI], 5593521070a0Smrg[m4_require([_LT_TAG_COMPILER])dnl 55944456fccdSmrg 5595521070a0Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 55964456fccdSmrg 5597521070a0Smrgif test "$GCC" = yes; then 5598521070a0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 55994456fccdSmrg 5600521070a0Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5601521070a0Smrg lt_cv_prog_compiler_rtti_exceptions, 5602521070a0Smrg [-fno-rtti -fno-exceptions], [], 5603521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5604521070a0Smrgfi 5605521070a0Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5606521070a0Smrg [Compiler flag to turn off builtin functions]) 5607521070a0Smrg])# _LT_COMPILER_NO_RTTI 56084456fccdSmrg 56094456fccdSmrg 5610521070a0Smrg# _LT_CMD_GLOBAL_SYMBOLS 5611521070a0Smrg# ---------------------- 5612521070a0Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5613521070a0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5614521070a0SmrgAC_REQUIRE([AC_PROG_CC])dnl 5615521070a0SmrgAC_REQUIRE([LT_PATH_NM])dnl 5616521070a0SmrgAC_REQUIRE([LT_PATH_LD])dnl 5617521070a0Smrgm4_require([_LT_DECL_SED])dnl 5618521070a0Smrgm4_require([_LT_DECL_EGREP])dnl 5619521070a0Smrgm4_require([_LT_TAG_COMPILER])dnl 56204456fccdSmrg 5621521070a0Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5622521070a0SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5623521070a0SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 562442d69509Smrg[ 5625521070a0Smrg# These are sane defaults that work on at least a few old systems. 5626521070a0Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 56274456fccdSmrg 5628521070a0Smrg# Character class describing NM global symbol codes. 5629521070a0Smrgsymcode='[[BCDEGRST]]' 56304456fccdSmrg 5631521070a0Smrg# Regexp to match symbols that can be accessed directly from C. 5632521070a0Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 56334456fccdSmrg 5634521070a0Smrg# Define system-specific variables. 5635521070a0Smrgcase $host_os in 5636521070a0Smrgaix*) 5637521070a0Smrg symcode='[[BCDT]]' 5638521070a0Smrg ;; 5639521070a0Smrgcygwin* | mingw* | pw32* | cegcc*) 5640521070a0Smrg symcode='[[ABCDGISTW]]' 5641521070a0Smrg ;; 5642521070a0Smrghpux*) 5643521070a0Smrg if test "$host_cpu" = ia64; then 5644521070a0Smrg symcode='[[ABCDEGRST]]' 5645521070a0Smrg fi 5646521070a0Smrg ;; 5647521070a0Smrgirix* | nonstopux*) 5648521070a0Smrg symcode='[[BCDEGRST]]' 5649521070a0Smrg ;; 5650521070a0Smrgosf*) 5651521070a0Smrg symcode='[[BCDEGQRST]]' 5652521070a0Smrg ;; 5653521070a0Smrgsolaris*) 5654521070a0Smrg symcode='[[BDRT]]' 5655521070a0Smrg ;; 5656521070a0Smrgsco3.2v5*) 5657521070a0Smrg symcode='[[DT]]' 5658521070a0Smrg ;; 5659521070a0Smrgsysv4.2uw2*) 5660521070a0Smrg symcode='[[DT]]' 5661521070a0Smrg ;; 5662521070a0Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5663521070a0Smrg symcode='[[ABDT]]' 5664521070a0Smrg ;; 5665521070a0Smrgsysv4) 5666521070a0Smrg symcode='[[DFNSTU]]' 5667521070a0Smrg ;; 5668521070a0Smrgesac 566942d69509Smrg 5670521070a0Smrg# If we're using GNU nm, then use its standard symbol codes. 5671521070a0Smrgcase `$NM -V 2>&1` in 5672521070a0Smrg*GNU* | *'with BFD'*) 5673521070a0Smrg symcode='[[ABCDGIRSTW]]' ;; 5674521070a0Smrgesac 567542d69509Smrg 5676521070a0Smrg# Transform an extracted symbol line into a proper C declaration. 5677521070a0Smrg# Some systems (esp. on ia64) link data and code symbols differently, 5678521070a0Smrg# so use this general approach. 5679521070a0Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 568042d69509Smrg 5681521070a0Smrg# Transform an extracted symbol line into symbol name and symbol address 5682521070a0Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5683521070a0Smrglt_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'" 568442d69509Smrg 5685521070a0Smrg# Handle CRLF in mingw tool chain 5686521070a0Smrgopt_cr= 5687521070a0Smrgcase $build_os in 5688521070a0Smrgmingw*) 5689521070a0Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5690521070a0Smrg ;; 5691521070a0Smrgesac 569242d69509Smrg 5693521070a0Smrg# Try without a prefix underscore, then with it. 5694521070a0Smrgfor ac_symprfx in "" "_"; do 569542d69509Smrg 5696521070a0Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5697521070a0Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 569842d69509Smrg 5699521070a0Smrg # Write the raw and C identifiers. 5700521070a0Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5701521070a0Smrg # Fake it for dumpbin and say T for any non-static function 5702521070a0Smrg # and D for any global variable. 5703521070a0Smrg # Also find C++ and __fastcall symbols from MSVC++, 5704521070a0Smrg # which start with @ or ?. 5705521070a0Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5706521070a0Smrg" {last_section=section; section=\$ 3};"\ 5707521070a0Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5708521070a0Smrg" \$ 0!~/External *\|/{next};"\ 5709521070a0Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5710521070a0Smrg" {if(hide[section]) next};"\ 5711521070a0Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5712521070a0Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5713521070a0Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5714521070a0Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5715521070a0Smrg" ' prfx=^$ac_symprfx]" 5716521070a0Smrg else 5717521070a0Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 571842d69509Smrg fi 57194456fccdSmrg 5720521070a0Smrg # Check to see that the pipe works correctly. 5721521070a0Smrg pipe_works=no 57224456fccdSmrg 5723521070a0Smrg rm -f conftest* 5724521070a0Smrg cat > conftest.$ac_ext <<_LT_EOF 5725521070a0Smrg#ifdef __cplusplus 5726521070a0Smrgextern "C" { 5727521070a0Smrg#endif 5728521070a0Smrgchar nm_test_var; 5729521070a0Smrgvoid nm_test_func(void); 5730521070a0Smrgvoid nm_test_func(void){} 5731521070a0Smrg#ifdef __cplusplus 5732521070a0Smrg} 5733521070a0Smrg#endif 5734521070a0Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 5735521070a0Smrg_LT_EOF 57364456fccdSmrg 5737521070a0Smrg if AC_TRY_EVAL(ac_compile); then 5738521070a0Smrg # Now try to grab the symbols. 5739521070a0Smrg nlist=conftest.nm 5740521070a0Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 5741521070a0Smrg # Try sorting and uniquifying the output. 5742521070a0Smrg if sort "$nlist" | uniq > "$nlist"T; then 5743521070a0Smrg mv -f "$nlist"T "$nlist" 5744521070a0Smrg else 5745521070a0Smrg rm -f "$nlist"T 5746521070a0Smrg fi 57474456fccdSmrg 5748521070a0Smrg # Make sure that we snagged all the symbols we need. 5749521070a0Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5750521070a0Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5751521070a0Smrg cat <<_LT_EOF > conftest.$ac_ext 5752521070a0Smrg#ifdef __cplusplus 5753521070a0Smrgextern "C" { 5754521070a0Smrg#endif 57554456fccdSmrg 5756521070a0Smrg_LT_EOF 5757521070a0Smrg # Now generate the symbol file. 5758521070a0Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 57594456fccdSmrg 5760521070a0Smrg cat <<_LT_EOF >> conftest.$ac_ext 57614456fccdSmrg 5762521070a0Smrg/* The mapping between symbol names and symbols. */ 5763521070a0Smrgconst struct { 5764521070a0Smrg const char *name; 5765521070a0Smrg void *address; 5766521070a0Smrg} 5767521070a0Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5768521070a0Smrg{ 5769521070a0Smrg { "@PROGRAM@", (void *) 0 }, 5770521070a0Smrg_LT_EOF 5771521070a0Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 5772521070a0Smrg cat <<\_LT_EOF >> conftest.$ac_ext 5773521070a0Smrg {0, (void *) 0} 5774521070a0Smrg}; 57754456fccdSmrg 5776521070a0Smrg/* This works around a problem in FreeBSD linker */ 5777521070a0Smrg#ifdef FREEBSD_WORKAROUND 5778521070a0Smrgstatic const void *lt_preloaded_setup() { 5779521070a0Smrg return lt__PROGRAM__LTX_preloaded_symbols; 5780521070a0Smrg} 5781521070a0Smrg#endif 57824456fccdSmrg 5783521070a0Smrg#ifdef __cplusplus 5784521070a0Smrg} 5785521070a0Smrg#endif 5786521070a0Smrg_LT_EOF 5787521070a0Smrg # Now try linking the two files. 5788521070a0Smrg mv conftest.$ac_objext conftstm.$ac_objext 5789521070a0Smrg lt_save_LIBS="$LIBS" 5790521070a0Smrg lt_save_CFLAGS="$CFLAGS" 5791521070a0Smrg LIBS="conftstm.$ac_objext" 5792521070a0Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5793521070a0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5794521070a0Smrg pipe_works=yes 5795521070a0Smrg fi 5796521070a0Smrg LIBS="$lt_save_LIBS" 5797521070a0Smrg CFLAGS="$lt_save_CFLAGS" 5798521070a0Smrg else 5799521070a0Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5800521070a0Smrg fi 5801521070a0Smrg else 5802521070a0Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5803521070a0Smrg fi 580442d69509Smrg else 5805521070a0Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 580642d69509Smrg fi 580742d69509Smrg else 5808521070a0Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5809521070a0Smrg cat conftest.$ac_ext >&5 581042d69509Smrg fi 5811521070a0Smrg rm -rf conftest* conftst* 58124456fccdSmrg 5813521070a0Smrg # Do not use the global_symbol_pipe unless it works. 5814521070a0Smrg if test "$pipe_works" = yes; then 5815521070a0Smrg break 5816521070a0Smrg else 5817521070a0Smrg lt_cv_sys_global_symbol_pipe= 5818521070a0Smrg fi 5819521070a0Smrgdone 5820521070a0Smrg]) 5821521070a0Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 5822521070a0Smrg lt_cv_sys_global_symbol_to_cdecl= 5823521070a0Smrgfi 5824521070a0Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5825521070a0Smrg AC_MSG_RESULT(failed) 582642d69509Smrgelse 5827521070a0Smrg AC_MSG_RESULT(ok) 582842d69509Smrgfi 58294456fccdSmrg 5830521070a0Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5831521070a0Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 5832521070a0Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5833521070a0Smrg [Transform the output of nm in a proper C declaration]) 5834521070a0Smrg_LT_DECL([global_symbol_to_c_name_address], 5835521070a0Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 5836521070a0Smrg [Transform the output of nm in a C name address pair]) 5837521070a0Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5838521070a0Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5839521070a0Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5840521070a0Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 58414456fccdSmrg 58424456fccdSmrg 5843521070a0Smrg# _LT_COMPILER_PIC([TAGNAME]) 5844521070a0Smrg# --------------------------- 5845521070a0Smrgm4_defun([_LT_COMPILER_PIC], 5846521070a0Smrg[m4_require([_LT_TAG_COMPILER])dnl 5847521070a0Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5848521070a0Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5849521070a0Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 58504456fccdSmrg 5851521070a0SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5852521070a0Smrgm4_if([$1], [CXX], [ 5853521070a0Smrg # C++ specific cases for pic, static, wl, etc. 5854521070a0Smrg if test "$GXX" = yes; then 5855521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5856521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 58574456fccdSmrg 5858521070a0Smrg case $host_os in 5859521070a0Smrg aix*) 5860521070a0Smrg # All AIX code is PIC. 586142d69509Smrg if test "$host_cpu" = ia64; then 5862521070a0Smrg # AIX 5 now supports IA64 processor 5863521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 586442d69509Smrg fi 5865521070a0Smrg ;; 58664456fccdSmrg 5867521070a0Smrg amigaos*) 5868521070a0Smrg case $host_cpu in 5869521070a0Smrg powerpc) 5870521070a0Smrg # see comment about AmigaOS4 .so support 5871521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5872521070a0Smrg ;; 5873521070a0Smrg m68k) 5874521070a0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5875521070a0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5876521070a0Smrg # like `-m68040'. 5877521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 587842d69509Smrg ;; 5879521070a0Smrg esac 5880521070a0Smrg ;; 58814456fccdSmrg 5882521070a0Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5883521070a0Smrg # PIC is the default for these OSes. 5884521070a0Smrg ;; 5885521070a0Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5886521070a0Smrg # This hack is so that the source file can tell whether it is being 5887521070a0Smrg # built for inclusion in a dll (and should export symbols for example). 5888521070a0Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5889521070a0Smrg # (--disable-auto-import) libraries 5890521070a0Smrg m4_if([$1], [GCJ], [], 5891521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5892521070a0Smrg ;; 5893521070a0Smrg darwin* | rhapsody*) 5894521070a0Smrg # PIC is the default on this platform 5895521070a0Smrg # Common symbols not allowed in MH_DYLIB files 5896521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5897521070a0Smrg ;; 5898521070a0Smrg *djgpp*) 5899521070a0Smrg # DJGPP does not support shared libraries at all 5900521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5901521070a0Smrg ;; 5902521070a0Smrg interix[[3-9]]*) 5903521070a0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5904521070a0Smrg # Instead, we relocate shared libraries at runtime. 5905521070a0Smrg ;; 5906521070a0Smrg sysv4*MP*) 5907521070a0Smrg if test -d /usr/nec; then 5908521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5909521070a0Smrg fi 5910521070a0Smrg ;; 5911521070a0Smrg hpux*) 5912521070a0Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5913521070a0Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5914521070a0Smrg # sets the default TLS model and affects inlining. 5915521070a0Smrg case $host_cpu in 5916521070a0Smrg hppa*64*) 591742d69509Smrg ;; 591842d69509Smrg *) 5919521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 592042d69509Smrg ;; 5921521070a0Smrg esac 592242d69509Smrg ;; 5923521070a0Smrg *qnx* | *nto*) 5924521070a0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5925521070a0Smrg # it will coredump. 5926521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 592742d69509Smrg ;; 592842d69509Smrg *) 5929521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 593042d69509Smrg ;; 593142d69509Smrg esac 5932521070a0Smrg else 5933521070a0Smrg case $host_os in 5934521070a0Smrg aix[[4-9]]*) 5935521070a0Smrg # All AIX code is PIC. 5936521070a0Smrg if test "$host_cpu" = ia64; then 5937521070a0Smrg # AIX 5 now supports IA64 processor 5938521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5939521070a0Smrg else 5940521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5941521070a0Smrg fi 594242d69509Smrg ;; 5943521070a0Smrg chorus*) 5944521070a0Smrg case $cc_basename in 5945521070a0Smrg cxch68*) 5946521070a0Smrg # Green Hills C++ Compiler 5947521070a0Smrg # _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" 594842d69509Smrg ;; 594942d69509Smrg esac 595042d69509Smrg ;; 5951521070a0Smrg dgux*) 5952521070a0Smrg case $cc_basename in 5953521070a0Smrg ec++*) 5954521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5955521070a0Smrg ;; 5956521070a0Smrg ghcx*) 5957521070a0Smrg # Green Hills C++ Compiler 5958521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5959521070a0Smrg ;; 5960521070a0Smrg *) 5961521070a0Smrg ;; 5962521070a0Smrg esac 5963521070a0Smrg ;; 5964521070a0Smrg freebsd* | dragonfly*) 5965521070a0Smrg # FreeBSD uses GNU C++ 5966521070a0Smrg ;; 5967521070a0Smrg hpux9* | hpux10* | hpux11*) 5968521070a0Smrg case $cc_basename in 5969521070a0Smrg CC*) 5970521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5971521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5972521070a0Smrg if test "$host_cpu" != ia64; then 5973521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5974521070a0Smrg fi 5975521070a0Smrg ;; 5976521070a0Smrg aCC*) 5977521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5978521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 597942d69509Smrg case $host_cpu in 5980521070a0Smrg hppa*64*|ia64*) 5981521070a0Smrg # +Z the default 598242d69509Smrg ;; 598342d69509Smrg *) 5984521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 598542d69509Smrg ;; 598642d69509Smrg esac 5987521070a0Smrg ;; 5988521070a0Smrg *) 5989521070a0Smrg ;; 599042d69509Smrg esac 599142d69509Smrg ;; 5992521070a0Smrg interix*) 5993521070a0Smrg # This is c89, which is MS Visual C++ (no shared libs) 5994521070a0Smrg # Anyone wants to do a port? 599542d69509Smrg ;; 5996521070a0Smrg irix5* | irix6* | nonstopux*) 5997521070a0Smrg case $cc_basename in 5998521070a0Smrg CC*) 5999521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6000521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6001521070a0Smrg # CC pic flag -KPIC is the default. 6002521070a0Smrg ;; 6003521070a0Smrg *) 6004521070a0Smrg ;; 600542d69509Smrg esac 600642d69509Smrg ;; 6007521070a0Smrg linux* | k*bsd*-gnu) 6008521070a0Smrg case $cc_basename in 6009521070a0Smrg KCC*) 6010521070a0Smrg # KAI C++ Compiler 6011521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6012521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6013521070a0Smrg ;; 6014521070a0Smrg ecpc* ) 6015521070a0Smrg # old Intel C++ for x86_64 which still supported -KPIC. 6016521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6017521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6018521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6019521070a0Smrg ;; 6020521070a0Smrg icpc* ) 6021521070a0Smrg # Intel C++, used to be incompatible with GCC. 6022521070a0Smrg # ICC 10 doesn't accept -KPIC any more. 6023521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6024521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6025521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6026521070a0Smrg ;; 6027521070a0Smrg pgCC* | pgcpp*) 6028521070a0Smrg # Portland Group C++ compiler 6029521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6030521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6031521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6032521070a0Smrg ;; 6033521070a0Smrg cxx*) 6034521070a0Smrg # Compaq C++ 6035521070a0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6036521070a0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6037521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6038521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6039521070a0Smrg ;; 6040521070a0Smrg xlc* | xlC*) 6041521070a0Smrg # IBM XL 8.0 on PPC 6042521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6043521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6044521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6045521070a0Smrg ;; 6046521070a0Smrg *) 6047521070a0Smrg case `$CC -V 2>&1 | sed 5q` in 6048521070a0Smrg *Sun\ C*) 6049521070a0Smrg # Sun C++ 5.9 6050521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6051521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6052521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6053521070a0Smrg ;; 6054521070a0Smrg esac 6055521070a0Smrg ;; 6056521070a0Smrg esac 605742d69509Smrg ;; 6058521070a0Smrg lynxos*) 605942d69509Smrg ;; 6060521070a0Smrg m88k*) 606142d69509Smrg ;; 6062521070a0Smrg mvs*) 6063521070a0Smrg case $cc_basename in 6064521070a0Smrg cxx*) 6065521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6066521070a0Smrg ;; 6067521070a0Smrg *) 6068521070a0Smrg ;; 6069521070a0Smrg esac 607042d69509Smrg ;; 6071521070a0Smrg netbsd*) 607242d69509Smrg ;; 6073521070a0Smrg *qnx* | *nto*) 6074521070a0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6075521070a0Smrg # it will coredump. 6076521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6077521070a0Smrg ;; 6078521070a0Smrg osf3* | osf4* | osf5*) 6079521070a0Smrg case $cc_basename in 6080521070a0Smrg KCC*) 6081521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6082521070a0Smrg ;; 6083521070a0Smrg RCC*) 6084521070a0Smrg # Rational C++ 2.4.1 6085521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6086521070a0Smrg ;; 6087521070a0Smrg cxx*) 6088521070a0Smrg # Digital/Compaq C++ 6089521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6090521070a0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6091521070a0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6092521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6093521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6094521070a0Smrg ;; 6095521070a0Smrg *) 6096521070a0Smrg ;; 6097521070a0Smrg esac 609842d69509Smrg ;; 6099521070a0Smrg psos*) 610042d69509Smrg ;; 6101521070a0Smrg solaris*) 6102521070a0Smrg case $cc_basename in 6103521070a0Smrg CC*) 6104521070a0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6105521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6106521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6107521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6108521070a0Smrg ;; 6109521070a0Smrg gcx*) 6110521070a0Smrg # Green Hills C++ Compiler 6111521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6112521070a0Smrg ;; 611342d69509Smrg *) 611442d69509Smrg ;; 611542d69509Smrg esac 611642d69509Smrg ;; 6117521070a0Smrg sunos4*) 6118521070a0Smrg case $cc_basename in 6119521070a0Smrg CC*) 6120521070a0Smrg # Sun C++ 4.x 6121521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6122521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6123521070a0Smrg ;; 6124521070a0Smrg lcc*) 6125521070a0Smrg # Lucid 6126521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6127521070a0Smrg ;; 612842d69509Smrg *) 612942d69509Smrg ;; 6130521070a0Smrg esac 613142d69509Smrg ;; 6132521070a0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6133521070a0Smrg case $cc_basename in 6134521070a0Smrg CC*) 6135521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6136521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6137521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6138521070a0Smrg ;; 6139521070a0Smrg esac 614042d69509Smrg ;; 6141521070a0Smrg tandem*) 6142521070a0Smrg case $cc_basename in 6143521070a0Smrg NCC*) 6144521070a0Smrg # NonStop-UX NCC 3.20 6145521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6146521070a0Smrg ;; 6147521070a0Smrg *) 6148521070a0Smrg ;; 6149521070a0Smrg esac 615042d69509Smrg ;; 6151521070a0Smrg vxworks*) 615242d69509Smrg ;; 615342d69509Smrg *) 6154521070a0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 615542d69509Smrg ;; 615642d69509Smrg esac 6157521070a0Smrg fi 6158521070a0Smrg], 6159521070a0Smrg[ 6160521070a0Smrg if test "$GCC" = yes; then 6161521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6162521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 61634456fccdSmrg 6164521070a0Smrg case $host_os in 6165521070a0Smrg aix*) 6166521070a0Smrg # All AIX code is PIC. 6167521070a0Smrg if test "$host_cpu" = ia64; then 6168521070a0Smrg # AIX 5 now supports IA64 processor 6169521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6170521070a0Smrg fi 6171521070a0Smrg ;; 61724456fccdSmrg 6173521070a0Smrg amigaos*) 6174521070a0Smrg case $host_cpu in 6175521070a0Smrg powerpc) 6176521070a0Smrg # see comment about AmigaOS4 .so support 6177521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6178521070a0Smrg ;; 6179521070a0Smrg m68k) 6180521070a0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6181521070a0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6182521070a0Smrg # like `-m68040'. 6183521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6184521070a0Smrg ;; 6185521070a0Smrg esac 6186521070a0Smrg ;; 61874456fccdSmrg 6188521070a0Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6189521070a0Smrg # PIC is the default for these OSes. 6190521070a0Smrg ;; 61914456fccdSmrg 6192521070a0Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6193521070a0Smrg # This hack is so that the source file can tell whether it is being 6194521070a0Smrg # built for inclusion in a dll (and should export symbols for example). 6195521070a0Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6196521070a0Smrg # (--disable-auto-import) libraries 6197521070a0Smrg m4_if([$1], [GCJ], [], 6198521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6199521070a0Smrg ;; 62004456fccdSmrg 6201521070a0Smrg darwin* | rhapsody*) 6202521070a0Smrg # PIC is the default on this platform 6203521070a0Smrg # Common symbols not allowed in MH_DYLIB files 6204521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6205521070a0Smrg ;; 62064456fccdSmrg 6207521070a0Smrg hpux*) 6208521070a0Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6209521070a0Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6210521070a0Smrg # sets the default TLS model and affects inlining. 6211521070a0Smrg case $host_cpu in 6212521070a0Smrg hppa*64*) 6213521070a0Smrg # +Z the default 6214521070a0Smrg ;; 6215521070a0Smrg *) 6216521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6217521070a0Smrg ;; 6218521070a0Smrg esac 6219521070a0Smrg ;; 62204456fccdSmrg 6221521070a0Smrg interix[[3-9]]*) 6222521070a0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6223521070a0Smrg # Instead, we relocate shared libraries at runtime. 6224521070a0Smrg ;; 62254456fccdSmrg 6226521070a0Smrg msdosdjgpp*) 6227521070a0Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6228521070a0Smrg # on systems that don't support them. 6229521070a0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6230521070a0Smrg enable_shared=no 6231521070a0Smrg ;; 62324456fccdSmrg 6233521070a0Smrg *nto* | *qnx*) 6234521070a0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6235521070a0Smrg # it will coredump. 6236521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6237521070a0Smrg ;; 62384456fccdSmrg 6239521070a0Smrg sysv4*MP*) 6240521070a0Smrg if test -d /usr/nec; then 6241521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6242521070a0Smrg fi 6243521070a0Smrg ;; 62444456fccdSmrg 6245521070a0Smrg *) 6246521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6247521070a0Smrg ;; 6248521070a0Smrg esac 6249521070a0Smrg else 6250521070a0Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6251521070a0Smrg case $host_os in 6252521070a0Smrg aix*) 6253521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6254521070a0Smrg if test "$host_cpu" = ia64; then 6255521070a0Smrg # AIX 5 now supports IA64 processor 6256521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6257521070a0Smrg else 6258521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6259521070a0Smrg fi 6260521070a0Smrg ;; 62614456fccdSmrg 6262521070a0Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6263521070a0Smrg # This hack is so that the source file can tell whether it is being 6264521070a0Smrg # built for inclusion in a dll (and should export symbols for example). 6265521070a0Smrg m4_if([$1], [GCJ], [], 6266521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6267521070a0Smrg ;; 62684456fccdSmrg 6269521070a0Smrg hpux9* | hpux10* | hpux11*) 6270521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6271521070a0Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6272521070a0Smrg # not for PA HP-UX. 6273521070a0Smrg case $host_cpu in 6274521070a0Smrg hppa*64*|ia64*) 6275521070a0Smrg # +Z the default 6276521070a0Smrg ;; 6277521070a0Smrg *) 6278521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6279521070a0Smrg ;; 6280521070a0Smrg esac 6281521070a0Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6282521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6283521070a0Smrg ;; 62844456fccdSmrg 6285521070a0Smrg irix5* | irix6* | nonstopux*) 6286521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6287521070a0Smrg # PIC (with -KPIC) is the default. 6288521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6289521070a0Smrg ;; 62904456fccdSmrg 6291521070a0Smrg linux* | k*bsd*-gnu) 6292521070a0Smrg case $cc_basename in 6293521070a0Smrg # old Intel for x86_64 which still supported -KPIC. 6294521070a0Smrg ecc*) 6295521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6296521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6297521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6298521070a0Smrg ;; 6299521070a0Smrg # icc used to be incompatible with GCC. 6300521070a0Smrg # ICC 10 doesn't accept -KPIC any more. 6301521070a0Smrg icc* | ifort*) 6302521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6303521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6304521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6305521070a0Smrg ;; 6306521070a0Smrg # Lahey Fortran 8.1. 6307521070a0Smrg lf95*) 6308521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6309521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6310521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6311521070a0Smrg ;; 6312521070a0Smrg pgcc* | pgf77* | pgf90* | pgf95*) 6313521070a0Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6314521070a0Smrg # which looks to be a dead project) 6315521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6316521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6317521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6318521070a0Smrg ;; 6319521070a0Smrg ccc*) 6320521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6321521070a0Smrg # All Alpha code is PIC. 6322521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6323521070a0Smrg ;; 6324521070a0Smrg xl*) 6325521070a0Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 6326521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6327521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6328521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6329521070a0Smrg ;; 6330521070a0Smrg *) 6331521070a0Smrg case `$CC -V 2>&1 | sed 5q` in 6332521070a0Smrg *Sun\ C*) 6333521070a0Smrg # Sun C 5.9 6334521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6335521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6336521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6337521070a0Smrg ;; 6338521070a0Smrg *Sun\ F*) 6339521070a0Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6340521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6341521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6342521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6343521070a0Smrg ;; 6344521070a0Smrg esac 6345521070a0Smrg ;; 6346521070a0Smrg esac 6347521070a0Smrg ;; 63484456fccdSmrg 6349521070a0Smrg newsos6) 6350521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6351521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6352521070a0Smrg ;; 63534456fccdSmrg 6354521070a0Smrg *nto* | *qnx*) 6355521070a0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6356521070a0Smrg # it will coredump. 6357521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6358521070a0Smrg ;; 63594456fccdSmrg 6360521070a0Smrg osf3* | osf4* | osf5*) 6361521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6362521070a0Smrg # All OSF/1 code is PIC. 6363521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 636442d69509Smrg ;; 63654456fccdSmrg 6366521070a0Smrg rdos*) 6367521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 636842d69509Smrg ;; 63694456fccdSmrg 6370521070a0Smrg solaris*) 6371521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6372521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6373521070a0Smrg case $cc_basename in 6374521070a0Smrg f77* | f90* | f95*) 6375521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6376521070a0Smrg *) 6377521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6378521070a0Smrg esac 6379521070a0Smrg ;; 63804456fccdSmrg 6381521070a0Smrg sunos4*) 6382521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6383521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6384521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6385521070a0Smrg ;; 63864456fccdSmrg 6387521070a0Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 6388521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6389521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6390521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6391521070a0Smrg ;; 63924456fccdSmrg 6393521070a0Smrg sysv4*MP*) 6394521070a0Smrg if test -d /usr/nec ;then 6395521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6396521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6397521070a0Smrg fi 6398521070a0Smrg ;; 63994456fccdSmrg 6400521070a0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6401521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6402521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6403521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6404521070a0Smrg ;; 64054456fccdSmrg 6406521070a0Smrg unicos*) 6407521070a0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6408521070a0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6409521070a0Smrg ;; 64104456fccdSmrg 6411521070a0Smrg uts4*) 6412521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6413521070a0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6414521070a0Smrg ;; 64154456fccdSmrg 6416521070a0Smrg *) 6417521070a0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6418521070a0Smrg ;; 6419521070a0Smrg esac 6420521070a0Smrg fi 6421521070a0Smrg]) 6422521070a0Smrgcase $host_os in 6423521070a0Smrg # For platforms which do not support PIC, -DPIC is meaningless: 6424521070a0Smrg *djgpp*) 6425521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6426521070a0Smrg ;; 6427521070a0Smrg *) 6428521070a0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6429521070a0Smrg ;; 6430521070a0Smrgesac 6431521070a0SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6432521070a0Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6433521070a0Smrg [How to pass a linker flag through the compiler]) 64344456fccdSmrg 6435521070a0Smrg# 6436521070a0Smrg# Check to make sure the PIC flag actually works. 6437521070a0Smrg# 6438521070a0Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6439521070a0Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6440521070a0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6441521070a0Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6442521070a0Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6443521070a0Smrg "" | " "*) ;; 6444521070a0Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6445521070a0Smrg esac], 6446521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6447521070a0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6448521070a0Smrgfi 6449521070a0Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6450521070a0Smrg [Additional compiler flags for building library objects]) 64514456fccdSmrg 6452521070a0Smrg# 6453521070a0Smrg# Check to make sure the static flag actually works. 6454521070a0Smrg# 6455521070a0Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6456521070a0Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6457521070a0Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6458521070a0Smrg $lt_tmp_static_flag, 6459521070a0Smrg [], 6460521070a0Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6461521070a0Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6462521070a0Smrg [Compiler flag to prevent dynamic linking]) 6463521070a0Smrg])# _LT_COMPILER_PIC 64644456fccdSmrg 64654456fccdSmrg 6466521070a0Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 6467521070a0Smrg# ---------------------------- 6468521070a0Smrg# See if the linker supports building shared libraries. 6469521070a0Smrgm4_defun([_LT_LINKER_SHLIBS], 6470521070a0Smrg[AC_REQUIRE([LT_PATH_LD])dnl 6471521070a0SmrgAC_REQUIRE([LT_PATH_NM])dnl 6472521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6473521070a0Smrgm4_require([_LT_DECL_EGREP])dnl 6474521070a0Smrgm4_require([_LT_DECL_SED])dnl 6475521070a0Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6476521070a0Smrgm4_require([_LT_TAG_COMPILER])dnl 6477521070a0SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6478521070a0Smrgm4_if([$1], [CXX], [ 6479521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6480521070a0Smrg case $host_os in 6481521070a0Smrg aix[[4-9]]*) 6482521070a0Smrg # If we're using GNU nm, then we don't want the "-C" option. 6483521070a0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6484521070a0Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6485521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6486521070a0Smrg else 6487521070a0Smrg _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' 6488521070a0Smrg fi 6489521070a0Smrg ;; 6490521070a0Smrg pw32*) 6491521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 649242d69509Smrg ;; 6493521070a0Smrg cygwin* | mingw* | cegcc*) 6494521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 649542d69509Smrg ;; 6496521070a0Smrg *) 6497521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6498521070a0Smrg ;; 6499521070a0Smrg esac 6500521070a0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6501521070a0Smrg], [ 6502521070a0Smrg runpath_var= 6503521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6504521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6505521070a0Smrg _LT_TAGVAR(archive_cmds, $1)= 6506521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6507521070a0Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 6508521070a0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6509521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6510521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6511521070a0Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 6512521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6513521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6514521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6515521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6516521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6517521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6518521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6519521070a0Smrg _LT_TAGVAR(inherit_rpath, $1)=no 6520521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6521521070a0Smrg _LT_TAGVAR(module_cmds, $1)= 6522521070a0Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 6523521070a0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6524521070a0Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6525521070a0Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6526521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6527521070a0Smrg # include_expsyms should be a list of space-separated symbols to be *always* 6528521070a0Smrg # included in the symbol list 6529521070a0Smrg _LT_TAGVAR(include_expsyms, $1)= 6530521070a0Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 6531521070a0Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6532521070a0Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6533521070a0Smrg # as well as any symbol that contains `d'. 6534521070a0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6535521070a0Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6536521070a0Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 6537521070a0Smrg # the symbol is explicitly referenced. Since portable code cannot 6538521070a0Smrg # rely on this symbol name, it's probably fine to never include it in 6539521070a0Smrg # preloaded symbol tables. 6540521070a0Smrg # Exclude shared library initialization/finalization symbols. 6541521070a0Smrgdnl Note also adjust exclude_expsyms for C++ above. 6542521070a0Smrg extract_expsyms_cmds= 65434456fccdSmrg 6544521070a0Smrg case $host_os in 6545521070a0Smrg cygwin* | mingw* | pw32* | cegcc*) 6546521070a0Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6547521070a0Smrg # When not using gcc, we currently assume that we are using 6548521070a0Smrg # Microsoft Visual C++. 6549521070a0Smrg if test "$GCC" != yes; then 6550521070a0Smrg with_gnu_ld=no 6551521070a0Smrg fi 6552521070a0Smrg ;; 6553521070a0Smrg interix*) 6554521070a0Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6555521070a0Smrg with_gnu_ld=yes 6556521070a0Smrg ;; 6557521070a0Smrg openbsd*) 6558521070a0Smrg with_gnu_ld=no 6559521070a0Smrg ;; 6560521070a0Smrg esac 65614456fccdSmrg 6562521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6563521070a0Smrg if test "$with_gnu_ld" = yes; then 6564521070a0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6565521070a0Smrg wlarc='${wl}' 65664456fccdSmrg 6567521070a0Smrg # Set some defaults for GNU ld with shared library support. These 6568521070a0Smrg # are reset later if shared libraries are not supported. Putting them 6569521070a0Smrg # here allows them to be overridden if necessary. 6570521070a0Smrg runpath_var=LD_RUN_PATH 6571521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6572521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6573521070a0Smrg # ancient GNU ld didn't support --whole-archive et. al. 6574521070a0Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6575521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6576521070a0Smrg else 6577521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6578521070a0Smrg fi 6579521070a0Smrg supports_anon_versioning=no 6580521070a0Smrg case `$LD -v 2>&1` in 6581521070a0Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6582521070a0Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6583521070a0Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6584521070a0Smrg *\ 2.11.*) ;; # other 2.11 versions 6585521070a0Smrg *) supports_anon_versioning=yes ;; 6586521070a0Smrg esac 65874456fccdSmrg 6588521070a0Smrg # See if GNU ld supports shared libraries. 6589521070a0Smrg case $host_os in 6590521070a0Smrg aix[[3-9]]*) 6591521070a0Smrg # On AIX/PPC, the GNU linker is very broken 6592521070a0Smrg if test "$host_cpu" != ia64; then 6593521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6594521070a0Smrg cat <<_LT_EOF 1>&2 65954456fccdSmrg 6596521070a0Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6597521070a0Smrg*** to be unable to reliably create shared libraries on AIX. 6598521070a0Smrg*** Therefore, libtool is disabling shared libraries support. If you 6599521070a0Smrg*** really care for shared libraries, you may want to modify your PATH 6600521070a0Smrg*** so that a non-GNU linker is found, and then restart. 66014456fccdSmrg 6602521070a0Smrg_LT_EOF 6603521070a0Smrg fi 6604521070a0Smrg ;; 66054456fccdSmrg 6606521070a0Smrg amigaos*) 6607521070a0Smrg case $host_cpu in 6608521070a0Smrg powerpc) 6609521070a0Smrg # see comment about AmigaOS4 .so support 6610521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6611521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6612521070a0Smrg ;; 6613521070a0Smrg m68k) 6614521070a0Smrg _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)' 6615521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6616521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6617521070a0Smrg ;; 6618521070a0Smrg esac 6619521070a0Smrg ;; 66204456fccdSmrg 6621521070a0Smrg beos*) 6622521070a0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6623521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6624521070a0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6625521070a0Smrg # support --undefined. This deserves some investigation. FIXME 6626521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6627521070a0Smrg else 6628521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6629521070a0Smrg fi 6630521070a0Smrg ;; 66314456fccdSmrg 6632521070a0Smrg cygwin* | mingw* | pw32* | cegcc*) 6633521070a0Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6634521070a0Smrg # as there is no search path for DLLs. 6635521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6636521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6637521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6638521070a0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6639521070a0Smrg _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' 6640521070a0Smrg 6641521070a0Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6642521070a0Smrg _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' 6643521070a0Smrg # If the export-symbols file already is a .def file (1st line 6644521070a0Smrg # is EXPORTS), use it as is; otherwise, prepend... 6645521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6646521070a0Smrg cp $export_symbols $output_objdir/$soname.def; 6647521070a0Smrg else 6648521070a0Smrg echo EXPORTS > $output_objdir/$soname.def; 6649521070a0Smrg cat $export_symbols >> $output_objdir/$soname.def; 6650521070a0Smrg fi~ 6651521070a0Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6652521070a0Smrg else 6653521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6654521070a0Smrg fi 6655521070a0Smrg ;; 66564456fccdSmrg 6657521070a0Smrg interix[[3-9]]*) 6658521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6659521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6660521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6661521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6662521070a0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6663521070a0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6664521070a0Smrg # default) and relocated if they conflict, which is a slow very memory 6665521070a0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6666521070a0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6667521070a0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6668521070a0Smrg _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' 6669521070a0Smrg _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' 6670521070a0Smrg ;; 66714456fccdSmrg 6672521070a0Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 6673521070a0Smrg tmp_diet=no 6674521070a0Smrg if test "$host_os" = linux-dietlibc; then 6675521070a0Smrg case $cc_basename in 6676521070a0Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6677521070a0Smrg esac 6678521070a0Smrg fi 6679521070a0Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6680521070a0Smrg && test "$tmp_diet" = no 6681521070a0Smrg then 6682521070a0Smrg tmp_addflag= 6683521070a0Smrg tmp_sharedflag='-shared' 6684521070a0Smrg case $cc_basename,$host_cpu in 6685521070a0Smrg pgcc*) # Portland Group C compiler 6686521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6687521070a0Smrg tmp_addflag=' $pic_flag' 6688521070a0Smrg ;; 6689521070a0Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6690521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6691521070a0Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 6692521070a0Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6693521070a0Smrg tmp_addflag=' -i_dynamic' ;; 6694521070a0Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6695521070a0Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6696521070a0Smrg ifc* | ifort*) # Intel Fortran compiler 6697521070a0Smrg tmp_addflag=' -nofor_main' ;; 6698521070a0Smrg lf95*) # Lahey Fortran 8.1 6699521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6700521070a0Smrg tmp_sharedflag='--shared' ;; 6701521070a0Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6702521070a0Smrg tmp_sharedflag='-qmkshrobj' 6703521070a0Smrg tmp_addflag= ;; 6704521070a0Smrg esac 6705521070a0Smrg case `$CC -V 2>&1 | sed 5q` in 6706521070a0Smrg *Sun\ C*) # Sun C 5.9 6707521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6708521070a0Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6709521070a0Smrg tmp_sharedflag='-G' ;; 6710521070a0Smrg *Sun\ F*) # Sun Fortran 8.3 6711521070a0Smrg tmp_sharedflag='-G' ;; 6712521070a0Smrg esac 6713521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 67144456fccdSmrg 6715521070a0Smrg if test "x$supports_anon_versioning" = xyes; then 6716521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6717521070a0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6718521070a0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6719521070a0Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6720521070a0Smrg fi 67214456fccdSmrg 6722521070a0Smrg case $cc_basename in 6723521070a0Smrg xlf*) 6724521070a0Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6725521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6726521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6727521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6728521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 6729521070a0Smrg if test "x$supports_anon_versioning" = xyes; then 6730521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6731521070a0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6732521070a0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6733521070a0Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6734521070a0Smrg fi 6735521070a0Smrg ;; 6736521070a0Smrg esac 6737521070a0Smrg else 6738521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6739521070a0Smrg fi 6740521070a0Smrg ;; 67414456fccdSmrg 6742521070a0Smrg netbsd*) 6743521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6744521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6745521070a0Smrg wlarc= 6746521070a0Smrg else 6747521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6748521070a0Smrg _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' 6749521070a0Smrg fi 6750521070a0Smrg ;; 67514456fccdSmrg 6752521070a0Smrg solaris*) 6753521070a0Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6754521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6755521070a0Smrg cat <<_LT_EOF 1>&2 67564456fccdSmrg 6757521070a0Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6758521070a0Smrg*** create shared libraries on Solaris systems. Therefore, libtool 6759521070a0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6760521070a0Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 6761521070a0Smrg*** your PATH or compiler configuration so that the native linker is 6762521070a0Smrg*** used, and then restart. 67634456fccdSmrg 6764521070a0Smrg_LT_EOF 6765521070a0Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6766521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6767521070a0Smrg _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' 6768521070a0Smrg else 6769521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6770521070a0Smrg fi 6771521070a0Smrg ;; 67724456fccdSmrg 6773521070a0Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6774521070a0Smrg case `$LD -v 2>&1` in 6775521070a0Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6776521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6777521070a0Smrg cat <<_LT_EOF 1>&2 67784456fccdSmrg 6779521070a0Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6780521070a0Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6781521070a0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6782521070a0Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6783521070a0Smrg*** your PATH or compiler configuration so that the native linker is 6784521070a0Smrg*** used, and then restart. 67854456fccdSmrg 6786521070a0Smrg_LT_EOF 6787521070a0Smrg ;; 6788521070a0Smrg *) 6789521070a0Smrg # For security reasons, it is highly recommended that you always 6790521070a0Smrg # use absolute paths for naming shared libraries, and exclude the 6791521070a0Smrg # DT_RUNPATH tag from executables and libraries. But doing so 6792521070a0Smrg # requires that you compile everything twice, which is a pain. 6793521070a0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6794521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6795521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6796521070a0Smrg _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' 6797521070a0Smrg else 6798521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6799521070a0Smrg fi 6800521070a0Smrg ;; 6801521070a0Smrg esac 6802521070a0Smrg ;; 68034456fccdSmrg 6804521070a0Smrg sunos4*) 6805521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6806521070a0Smrg wlarc= 6807521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6808521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68094456fccdSmrg ;; 6810521070a0Smrg 68114456fccdSmrg *) 6812521070a0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6813521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6814521070a0Smrg _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' 6815521070a0Smrg else 6816521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6817521070a0Smrg fi 68184456fccdSmrg ;; 68194456fccdSmrg esac 68204456fccdSmrg 6821521070a0Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6822521070a0Smrg runpath_var= 6823521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6824521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6825521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6826521070a0Smrg fi 6827521070a0Smrg else 6828521070a0Smrg # PORTME fill in a description of your system's linker (not GNU ld) 6829521070a0Smrg case $host_os in 6830521070a0Smrg aix3*) 6831521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6832521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6833521070a0Smrg _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' 6834521070a0Smrg # Note: this linker hardcodes the directories in LIBPATH if there 6835521070a0Smrg # are no directories specified by -L. 6836521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6837521070a0Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6838521070a0Smrg # Neither direct hardcoding nor static linking is supported with a 6839521070a0Smrg # broken collect2. 6840521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6841521070a0Smrg fi 6842521070a0Smrg ;; 68434456fccdSmrg 6844521070a0Smrg aix[[4-9]]*) 6845521070a0Smrg if test "$host_cpu" = ia64; then 6846521070a0Smrg # On IA64, the linker does run time linking by default, so we don't 6847521070a0Smrg # have to do anything special. 6848521070a0Smrg aix_use_runtimelinking=no 6849521070a0Smrg exp_sym_flag='-Bexport' 6850521070a0Smrg no_entry_flag="" 6851521070a0Smrg else 6852521070a0Smrg # If we're using GNU nm, then we don't want the "-C" option. 6853521070a0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6854521070a0Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6855521070a0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6856521070a0Smrg else 6857521070a0Smrg _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' 6858521070a0Smrg fi 6859521070a0Smrg aix_use_runtimelinking=no 68604456fccdSmrg 6861521070a0Smrg # Test if we are trying to use run time linking or normal 6862521070a0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6863521070a0Smrg # need to do runtime linking. 6864521070a0Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6865521070a0Smrg for ld_flag in $LDFLAGS; do 6866521070a0Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6867521070a0Smrg aix_use_runtimelinking=yes 6868521070a0Smrg break 6869521070a0Smrg fi 6870521070a0Smrg done 6871521070a0Smrg ;; 6872521070a0Smrg esac 68734456fccdSmrg 6874521070a0Smrg exp_sym_flag='-bexport' 6875521070a0Smrg no_entry_flag='-bnoentry' 6876521070a0Smrg fi 68774456fccdSmrg 6878521070a0Smrg # When large executables or shared objects are built, AIX ld can 6879521070a0Smrg # have problems creating the table of contents. If linking a library 6880521070a0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6881521070a0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6882521070a0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 68834456fccdSmrg 6884521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='' 6885521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6886521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6887521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6888521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6889521070a0Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 68904456fccdSmrg 6891521070a0Smrg if test "$GCC" = yes; then 6892521070a0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6893521070a0Smrg # We only want to do this on AIX 4.2 and lower, the check 6894521070a0Smrg # below for broken collect2 doesn't work under 4.3+ 6895521070a0Smrg collect2name=`${CC} -print-prog-name=collect2` 6896521070a0Smrg if test -f "$collect2name" && 6897521070a0Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6898521070a0Smrg then 6899521070a0Smrg # We have reworked collect2 6900521070a0Smrg : 6901521070a0Smrg else 6902521070a0Smrg # We have old collect2 6903521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6904521070a0Smrg # It fails to find uninstalled libraries when the uninstalled 6905521070a0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6906521070a0Smrg # to unsupported forces relinking 6907521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6908521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6909521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6910521070a0Smrg fi 6911521070a0Smrg ;; 6912521070a0Smrg esac 6913521070a0Smrg shared_flag='-shared' 6914521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 6915521070a0Smrg shared_flag="$shared_flag "'${wl}-G' 6916521070a0Smrg fi 6917521070a0Smrg else 6918521070a0Smrg # not using gcc 6919521070a0Smrg if test "$host_cpu" = ia64; then 6920521070a0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6921521070a0Smrg # chokes on -Wl,-G. The following line is correct: 6922521070a0Smrg shared_flag='-G' 6923521070a0Smrg else 6924521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 6925521070a0Smrg shared_flag='${wl}-G' 6926521070a0Smrg else 6927521070a0Smrg shared_flag='${wl}-bM:SRE' 6928521070a0Smrg fi 6929521070a0Smrg fi 6930521070a0Smrg fi 69314456fccdSmrg 6932521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6933521070a0Smrg # It seems that -bexpall does not export symbols beginning with 6934521070a0Smrg # underscore (_), so it is better to generate a list of symbols to export. 6935521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6936521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 6937521070a0Smrg # Warning - without using the other runtime loading flags (-brtl), 6938521070a0Smrg # -berok will link without error, but may produce a broken library. 6939521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6940521070a0Smrg # Determine the default libpath from the value encoded in an 6941521070a0Smrg # empty executable. 6942521070a0Smrg _LT_SYS_MODULE_PATH_AIX 6943521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6944521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6945521070a0Smrg else 6946521070a0Smrg if test "$host_cpu" = ia64; then 6947521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6948521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6949521070a0Smrg _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" 6950521070a0Smrg else 6951521070a0Smrg # Determine the default libpath from the value encoded in an 6952521070a0Smrg # empty executable. 6953521070a0Smrg _LT_SYS_MODULE_PATH_AIX 6954521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6955521070a0Smrg # Warning - without using the other run time loading flags, 6956521070a0Smrg # -berok will link without error, but may produce a broken library. 6957521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6958521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6959521070a0Smrg # Exported symbols can be pulled into shared objects from archives 6960521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6961521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6962521070a0Smrg # This is similar to how AIX traditionally builds its shared libraries. 6963521070a0Smrg _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' 6964521070a0Smrg fi 6965521070a0Smrg fi 6966521070a0Smrg ;; 69674456fccdSmrg 6968521070a0Smrg amigaos*) 6969521070a0Smrg case $host_cpu in 6970521070a0Smrg powerpc) 6971521070a0Smrg # see comment about AmigaOS4 .so support 6972521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6973521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6974521070a0Smrg ;; 6975521070a0Smrg m68k) 6976521070a0Smrg _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)' 6977521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6978521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6979521070a0Smrg ;; 6980521070a0Smrg esac 6981521070a0Smrg ;; 69824456fccdSmrg 6983521070a0Smrg bsdi[[45]]*) 6984521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6985521070a0Smrg ;; 69864456fccdSmrg 6987521070a0Smrg cygwin* | mingw* | pw32* | cegcc*) 6988521070a0Smrg # When not using gcc, we currently assume that we are using 6989521070a0Smrg # Microsoft Visual C++. 6990521070a0Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6991521070a0Smrg # no search path for DLLs. 6992521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6993521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6994521070a0Smrg # Tell ltmain to make .lib files, not .a files. 6995521070a0Smrg libext=lib 6996521070a0Smrg # Tell ltmain to make .dll files, not .so files. 6997521070a0Smrg shrext_cmds=".dll" 6998521070a0Smrg # FIXME: Setting linknames here is a bad hack. 6999521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7000521070a0Smrg # The linker will automatically build a .lib file if we build a DLL. 7001521070a0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7002521070a0Smrg # FIXME: Should let the user specify the lib program. 7003521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7004521070a0Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7005521070a0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7006521070a0Smrg ;; 70074456fccdSmrg 7008521070a0Smrg darwin* | rhapsody*) 7009521070a0Smrg _LT_DARWIN_LINKER_FEATURES($1) 7010521070a0Smrg ;; 70114456fccdSmrg 7012521070a0Smrg dgux*) 7013521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7014521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7015521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7016521070a0Smrg ;; 70174456fccdSmrg 7018521070a0Smrg freebsd1*) 7019521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7020521070a0Smrg ;; 70214456fccdSmrg 7022521070a0Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7023521070a0Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7024521070a0Smrg # does not break anything, and helps significantly (at the cost of a little 7025521070a0Smrg # extra space). 7026521070a0Smrg freebsd2.2*) 7027521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7028521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7029521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7030521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7031521070a0Smrg ;; 70324456fccdSmrg 7033521070a0Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7034521070a0Smrg freebsd2*) 7035521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7036521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7037521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7038521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7039521070a0Smrg ;; 70404456fccdSmrg 7041521070a0Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7042521070a0Smrg freebsd* | dragonfly*) 7043521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7044521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7045521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7046521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7047521070a0Smrg ;; 70484456fccdSmrg 7049521070a0Smrg hpux9*) 7050521070a0Smrg if test "$GCC" = yes; then 7051521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7052521070a0Smrg else 7053521070a0Smrg _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' 7054521070a0Smrg fi 7055521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7056521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7057521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 70584456fccdSmrg 7059521070a0Smrg # hardcode_minus_L: Not really in the search PATH, 7060521070a0Smrg # but as the default location of the library. 7061521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7062521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7063521070a0Smrg ;; 70644456fccdSmrg 7065521070a0Smrg hpux10*) 7066521070a0Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7067521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7068521070a0Smrg else 7069521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7070521070a0Smrg fi 7071521070a0Smrg if test "$with_gnu_ld" = no; then 7072521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7073521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7074521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7075521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7076521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7077521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7078521070a0Smrg # hardcode_minus_L: Not really in the search PATH, 7079521070a0Smrg # but as the default location of the library. 7080521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7081521070a0Smrg fi 7082521070a0Smrg ;; 70834456fccdSmrg 7084521070a0Smrg hpux11*) 7085521070a0Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7086521070a0Smrg case $host_cpu in 7087521070a0Smrg hppa*64*) 7088521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7089521070a0Smrg ;; 7090521070a0Smrg ia64*) 7091521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7092521070a0Smrg ;; 7093521070a0Smrg *) 7094521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7095521070a0Smrg ;; 7096521070a0Smrg esac 7097521070a0Smrg else 7098521070a0Smrg case $host_cpu in 7099521070a0Smrg hppa*64*) 7100521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7101521070a0Smrg ;; 7102521070a0Smrg ia64*) 7103521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7104521070a0Smrg ;; 7105521070a0Smrg *) 7106521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7107521070a0Smrg ;; 7108521070a0Smrg esac 7109521070a0Smrg fi 7110521070a0Smrg if test "$with_gnu_ld" = no; then 7111521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7112521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71134456fccdSmrg 7114521070a0Smrg case $host_cpu in 7115521070a0Smrg hppa*64*|ia64*) 7116521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7117521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7118521070a0Smrg ;; 7119521070a0Smrg *) 7120521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7121521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7122521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 71234456fccdSmrg 7124521070a0Smrg # hardcode_minus_L: Not really in the search PATH, 7125521070a0Smrg # but as the default location of the library. 7126521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7127521070a0Smrg ;; 7128521070a0Smrg esac 7129521070a0Smrg fi 7130521070a0Smrg ;; 71314456fccdSmrg 7132521070a0Smrg irix5* | irix6* | nonstopux*) 7133521070a0Smrg if test "$GCC" = yes; then 7134521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7135521070a0Smrg # Try to use the -exported_symbol ld option, if it does not 7136521070a0Smrg # work, assume that -exports_file does not work either and 7137521070a0Smrg # implicitly export all symbols. 7138521070a0Smrg save_LDFLAGS="$LDFLAGS" 7139521070a0Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7140521070a0Smrg AC_LINK_IFELSE(int foo(void) {}, 7141521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 7142521070a0Smrg ) 7143521070a0Smrg LDFLAGS="$save_LDFLAGS" 7144521070a0Smrg else 7145521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7146521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 7147521070a0Smrg fi 7148521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7149521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7150521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7151521070a0Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7152521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7153521070a0Smrg ;; 71544456fccdSmrg 7155521070a0Smrg netbsd*) 7156521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7157521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7158521070a0Smrg else 7159521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7160521070a0Smrg fi 7161521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7162521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7163521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7164521070a0Smrg ;; 71654456fccdSmrg 7166521070a0Smrg newsos6) 7167521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7168521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7169521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7170521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7171521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7172521070a0Smrg ;; 71734456fccdSmrg 7174521070a0Smrg *nto* | *qnx*) 7175521070a0Smrg ;; 71764456fccdSmrg 7177521070a0Smrg openbsd*) 7178521070a0Smrg if test -f /usr/libexec/ld.so; then 7179521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7180521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7181521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7182521070a0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7183521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7184521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7185521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7186521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7187521070a0Smrg else 7188521070a0Smrg case $host_os in 7189521070a0Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7190521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7191521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7192521070a0Smrg ;; 7193521070a0Smrg *) 7194521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7195521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7196521070a0Smrg ;; 7197521070a0Smrg esac 7198521070a0Smrg fi 7199521070a0Smrg else 7200521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7201521070a0Smrg fi 7202521070a0Smrg ;; 72034456fccdSmrg 7204521070a0Smrg os2*) 7205521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7206521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7207521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7208521070a0Smrg _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' 7209521070a0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7210521070a0Smrg ;; 72114456fccdSmrg 7212521070a0Smrg osf3*) 7213521070a0Smrg if test "$GCC" = yes; then 7214521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7215521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7216521070a0Smrg else 7217521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7218521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7219521070a0Smrg fi 7220521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7221521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7222521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7223521070a0Smrg ;; 72244456fccdSmrg 7225521070a0Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7226521070a0Smrg if test "$GCC" = yes; then 7227521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7228521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7229521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7230521070a0Smrg else 7231521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7232521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7233521070a0Smrg _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~ 7234521070a0Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 72354456fccdSmrg 7236521070a0Smrg # Both c and cxx compiler support -rpath directly 7237521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7238521070a0Smrg fi 7239521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7240521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7241521070a0Smrg ;; 72424456fccdSmrg 7243521070a0Smrg solaris*) 7244521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7245521070a0Smrg if test "$GCC" = yes; then 7246521070a0Smrg wlarc='${wl}' 7247521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7248521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7249521070a0Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7250521070a0Smrg else 7251521070a0Smrg case `$CC -V 2>&1` in 7252521070a0Smrg *"Compilers 5.0"*) 7253521070a0Smrg wlarc='' 7254521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7255521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7256521070a0Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7257521070a0Smrg ;; 7258521070a0Smrg *) 7259521070a0Smrg wlarc='${wl}' 7260521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7261521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7262521070a0Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7263521070a0Smrg ;; 7264521070a0Smrg esac 7265521070a0Smrg fi 7266521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7267521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7268521070a0Smrg case $host_os in 7269521070a0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7270521070a0Smrg *) 7271521070a0Smrg # The compiler driver will combine and reorder linker options, 7272521070a0Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7273521070a0Smrg # but is careful enough not to reorder. 7274521070a0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7275521070a0Smrg if test "$GCC" = yes; then 7276521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7277521070a0Smrg else 7278521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7279521070a0Smrg fi 7280521070a0Smrg ;; 7281521070a0Smrg esac 7282521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7283521070a0Smrg ;; 72844456fccdSmrg 7285521070a0Smrg sunos4*) 7286521070a0Smrg if test "x$host_vendor" = xsequent; then 7287521070a0Smrg # Use $CC to link under sequent, because it throws in some extra .o 7288521070a0Smrg # files that make .init and .fini sections work. 7289521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7290521070a0Smrg else 7291521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7292521070a0Smrg fi 7293521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7294521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7295521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7296521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7297521070a0Smrg ;; 72984456fccdSmrg 7299521070a0Smrg sysv4) 7300521070a0Smrg case $host_vendor in 7301521070a0Smrg sni) 7302521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7303521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7304521070a0Smrg ;; 7305521070a0Smrg siemens) 7306521070a0Smrg ## LD is ld it makes a PLAMLIB 7307521070a0Smrg ## CC just makes a GrossModule. 7308521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7309521070a0Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7310521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7311521070a0Smrg ;; 7312521070a0Smrg motorola) 7313521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7314521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7315521070a0Smrg ;; 7316521070a0Smrg esac 7317521070a0Smrg runpath_var='LD_RUN_PATH' 7318521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7319521070a0Smrg ;; 73204456fccdSmrg 7321521070a0Smrg sysv4.3*) 7322521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7323521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7324521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7325521070a0Smrg ;; 73264456fccdSmrg 7327521070a0Smrg sysv4*MP*) 7328521070a0Smrg if test -d /usr/nec; then 7329521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7330521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7331521070a0Smrg runpath_var=LD_RUN_PATH 7332521070a0Smrg hardcode_runpath_var=yes 7333521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7334521070a0Smrg fi 7335521070a0Smrg ;; 73364456fccdSmrg 7337521070a0Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7338521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7339521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7340521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7341521070a0Smrg runpath_var='LD_RUN_PATH' 73424456fccdSmrg 7343521070a0Smrg if test "$GCC" = yes; then 7344521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7346521070a0Smrg else 7347521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349521070a0Smrg fi 7350521070a0Smrg ;; 73514456fccdSmrg 7352521070a0Smrg sysv5* | sco3.2v5* | sco5v6*) 7353521070a0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7354521070a0Smrg # link with -lc, and that would cause any symbols used from libc to 7355521070a0Smrg # always be unresolved, which means just about no library would 7356521070a0Smrg # ever link correctly. If we're not using GNU ld we use -z text 7357521070a0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7358521070a0Smrg # as -z defs. 7359521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7360521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7361521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7362521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7363521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7364521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7365521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7366521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7367521070a0Smrg runpath_var='LD_RUN_PATH' 73684456fccdSmrg 7369521070a0Smrg if test "$GCC" = yes; then 7370521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7371521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7372521070a0Smrg else 7373521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7375521070a0Smrg fi 7376521070a0Smrg ;; 73774456fccdSmrg 7378521070a0Smrg uts4*) 7379521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7380521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7381521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7382521070a0Smrg ;; 73834456fccdSmrg 7384521070a0Smrg *) 7385521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7386521070a0Smrg ;; 7387521070a0Smrg esac 73884456fccdSmrg 7389521070a0Smrg if test x$host_vendor = xsni; then 7390521070a0Smrg case $host in 7391521070a0Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7392521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7393521070a0Smrg ;; 7394521070a0Smrg esac 7395521070a0Smrg fi 7396521070a0Smrg fi 7397521070a0Smrg]) 7398521070a0SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7399521070a0Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 74004456fccdSmrg 7401521070a0Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 74024456fccdSmrg 7403521070a0Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7404521070a0Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7405521070a0Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 7406521070a0Smrg [The commands to extract the exported symbol list from a shared archive]) 74074456fccdSmrg 7408521070a0Smrg# 7409521070a0Smrg# Do we need to explicitly link libc? 7410521070a0Smrg# 7411521070a0Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7412521070a0Smrgx|xyes) 7413521070a0Smrg # Assume -lc should be added 7414521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 74154456fccdSmrg 7416521070a0Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7417521070a0Smrg case $_LT_TAGVAR(archive_cmds, $1) in 7418521070a0Smrg *'~'*) 7419521070a0Smrg # FIXME: we may have to deal with multi-command sequences. 7420521070a0Smrg ;; 7421521070a0Smrg '$CC '*) 7422521070a0Smrg # Test whether the compiler implicitly links with -lc since on some 7423521070a0Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7424521070a0Smrg # to ld, don't add -lc before -lgcc. 7425521070a0Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7426521070a0Smrg $RM conftest* 7427521070a0Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 74284456fccdSmrg 7429521070a0Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7430521070a0Smrg soname=conftest 7431521070a0Smrg lib=conftest 7432521070a0Smrg libobjs=conftest.$ac_objext 7433521070a0Smrg deplibs= 7434521070a0Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7435521070a0Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7436521070a0Smrg compiler_flags=-v 7437521070a0Smrg linker_flags=-v 7438521070a0Smrg verstring= 7439521070a0Smrg output_objdir=. 7440521070a0Smrg libname=conftest 7441521070a0Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7442521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 7443521070a0Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7444521070a0Smrg then 7445521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7446521070a0Smrg else 7447521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7448521070a0Smrg fi 7449521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7450521070a0Smrg else 7451521070a0Smrg cat conftest.err 1>&5 7452521070a0Smrg fi 7453521070a0Smrg $RM conftest* 7454521070a0Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 7455521070a0Smrg ;; 7456521070a0Smrg esac 7457521070a0Smrg fi 7458521070a0Smrg ;; 7459521070a0Smrgesac 74604456fccdSmrg 7461521070a0Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7462521070a0Smrg [Whether or not to add -lc for building shared libraries]) 7463521070a0Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7464521070a0Smrg [enable_shared_with_static_runtimes], [0], 7465521070a0Smrg [Whether or not to disallow shared libs when runtime libs are static]) 7466521070a0Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7467521070a0Smrg [Compiler flag to allow reflexive dlopens]) 7468521070a0Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7469521070a0Smrg [Compiler flag to generate shared objects directly from archives]) 7470521070a0Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 7471521070a0Smrg [Whether the compiler copes with passing no objects directly]) 7472521070a0Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7473521070a0Smrg [Create an old-style archive from a shared archive]) 7474521070a0Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7475521070a0Smrg [Create a temporary old-style archive to link instead of a shared archive]) 7476521070a0Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7477521070a0Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7478521070a0Smrg_LT_TAGDECL([], [module_cmds], [2], 7479521070a0Smrg [Commands used to build a loadable module if different from building 7480521070a0Smrg a shared archive.]) 7481521070a0Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7482521070a0Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 7483521070a0Smrg [Whether we are building with GNU ld or not]) 7484521070a0Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7485521070a0Smrg [Flag that allows shared libraries with undefined symbols to be built]) 7486521070a0Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 7487521070a0Smrg [Flag that enforces no undefined symbols]) 7488521070a0Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7489521070a0Smrg [Flag to hardcode $libdir into a binary during linking. 7490521070a0Smrg This must work even if $libdir does not exist]) 7491521070a0Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7492521070a0Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7493521070a0Smrg during linking. This must work even if $libdir does not exist]]) 7494521070a0Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7495521070a0Smrg [Whether we need a single "-rpath" flag with a separated argument]) 7496521070a0Smrg_LT_TAGDECL([], [hardcode_direct], [0], 7497521070a0Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7498521070a0Smrg DIR into the resulting binary]) 7499521070a0Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7500521070a0Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7501521070a0Smrg DIR into the resulting binary and the resulting library dependency is 7502521070a0Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7503521070a0Smrg library is relocated]) 7504521070a0Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7505521070a0Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7506521070a0Smrg into the resulting binary]) 7507521070a0Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7508521070a0Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7509521070a0Smrg into the resulting binary]) 7510521070a0Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 7511521070a0Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 7512521070a0Smrg into the library and all subsequent libraries and executables linked 7513521070a0Smrg against it]) 7514521070a0Smrg_LT_TAGDECL([], [inherit_rpath], [0], 7515521070a0Smrg [Set to yes if linker adds runtime paths of dependent libraries 7516521070a0Smrg to runtime path list]) 7517521070a0Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 7518521070a0Smrg [Whether libtool must link a program against all its dependency libraries]) 7519521070a0Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7520521070a0Smrg [Fix the shell variable $srcfile for the compiler]) 7521521070a0Smrg_LT_TAGDECL([], [always_export_symbols], [0], 7522521070a0Smrg [Set to "yes" if exported symbols are required]) 7523521070a0Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7524521070a0Smrg [The commands to list exported symbols]) 7525521070a0Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 7526521070a0Smrg [Symbols that should not be listed in the preloaded symbols]) 7527521070a0Smrg_LT_TAGDECL([], [include_expsyms], [1], 7528521070a0Smrg [Symbols that must always be exported]) 7529521070a0Smrg_LT_TAGDECL([], [prelink_cmds], [2], 7530521070a0Smrg [Commands necessary for linking programs (against libraries) with templates]) 7531521070a0Smrg_LT_TAGDECL([], [file_list_spec], [1], 7532521070a0Smrg [Specify filename containing input files]) 7533521070a0Smrgdnl FIXME: Not yet implemented 7534521070a0Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7535521070a0Smrgdnl [Compiler flag to generate thread safe objects]) 7536521070a0Smrg])# _LT_LINKER_SHLIBS 7537521070a0Smrg 7538521070a0Smrg 7539521070a0Smrg# _LT_LANG_C_CONFIG([TAG]) 7540521070a0Smrg# ------------------------ 7541521070a0Smrg# Ensure that the configuration variables for a C compiler are suitably 7542521070a0Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7543521070a0Smrg# the compiler configuration to `libtool'. 7544521070a0Smrgm4_defun([_LT_LANG_C_CONFIG], 7545521070a0Smrg[m4_require([_LT_DECL_EGREP])dnl 7546521070a0Smrglt_save_CC="$CC" 7547521070a0SmrgAC_LANG_PUSH(C) 75484456fccdSmrg 7549521070a0Smrg# Source file extension for C test sources. 7550521070a0Smrgac_ext=c 75514456fccdSmrg 7552521070a0Smrg# Object file extension for compiled C test sources. 7553521070a0Smrgobjext=o 7554521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 75554456fccdSmrg 7556521070a0Smrg# Code to be used in simple compile tests 7557521070a0Smrglt_simple_compile_test_code="int some_variable = 0;" 75584456fccdSmrg 7559521070a0Smrg# Code to be used in simple link tests 7560521070a0Smrglt_simple_link_test_code='int main(){return(0);}' 75614456fccdSmrg 7562521070a0Smrg_LT_TAG_COMPILER 7563521070a0Smrg# Save the default compiler, since it gets overwritten when the other 7564521070a0Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7565521070a0Smrgcompiler_DEFAULT=$CC 75664456fccdSmrg 7567521070a0Smrg# save warnings/boilerplate of simple test code 7568521070a0Smrg_LT_COMPILER_BOILERPLATE 7569521070a0Smrg_LT_LINKER_BOILERPLATE 75704456fccdSmrg 7571521070a0Smrgif test -n "$compiler"; then 7572521070a0Smrg _LT_COMPILER_NO_RTTI($1) 7573521070a0Smrg _LT_COMPILER_PIC($1) 7574521070a0Smrg _LT_COMPILER_C_O($1) 7575521070a0Smrg _LT_COMPILER_FILE_LOCKS($1) 7576521070a0Smrg _LT_LINKER_SHLIBS($1) 7577521070a0Smrg _LT_SYS_DYNAMIC_LINKER($1) 7578521070a0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7579521070a0Smrg LT_SYS_DLOPEN_SELF 7580521070a0Smrg _LT_CMD_STRIPLIB 7581521070a0Smrg 7582521070a0Smrg # Report which library types will actually be built 7583521070a0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7584521070a0Smrg AC_MSG_RESULT([$can_build_shared]) 7585521070a0Smrg 7586521070a0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7587521070a0Smrg test "$can_build_shared" = "no" && enable_shared=no 7588521070a0Smrg 7589521070a0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7590521070a0Smrg # are all built from PIC. 7591521070a0Smrg case $host_os in 7592521070a0Smrg aix3*) 7593521070a0Smrg test "$enable_shared" = yes && enable_static=no 7594521070a0Smrg if test -n "$RANLIB"; then 7595521070a0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7596521070a0Smrg postinstall_cmds='$RANLIB $lib' 7597521070a0Smrg fi 7598521070a0Smrg ;; 75994456fccdSmrg 7600521070a0Smrg aix[[4-9]]*) 7601521070a0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7602521070a0Smrg test "$enable_shared" = yes && enable_static=no 7603521070a0Smrg fi 7604521070a0Smrg ;; 7605521070a0Smrg esac 7606521070a0Smrg AC_MSG_RESULT([$enable_shared]) 76074456fccdSmrg 7608521070a0Smrg AC_MSG_CHECKING([whether to build static libraries]) 7609521070a0Smrg # Make sure either enable_shared or enable_static is yes. 7610521070a0Smrg test "$enable_shared" = yes || enable_static=yes 7611521070a0Smrg AC_MSG_RESULT([$enable_static]) 76124456fccdSmrg 7613521070a0Smrg _LT_CONFIG($1) 7614521070a0Smrgfi 7615521070a0SmrgAC_LANG_POP 7616521070a0SmrgCC="$lt_save_CC" 7617521070a0Smrg])# _LT_LANG_C_CONFIG 76184456fccdSmrg 76194456fccdSmrg 7620521070a0Smrg# _LT_PROG_CXX 7621521070a0Smrg# ------------ 7622521070a0Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 7623521070a0Smrg# compiler, we have our own version here. 7624521070a0Smrgm4_defun([_LT_PROG_CXX], 7625521070a0Smrg[ 7626521070a0Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 7627521070a0SmrgAC_PROG_CXX 7628521070a0Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7629521070a0Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7630521070a0Smrg (test "X$CXX" != "Xg++"))) ; then 7631521070a0Smrg AC_PROG_CXXCPP 7632521070a0Smrgelse 7633521070a0Smrg _lt_caught_CXX_error=yes 7634521070a0Smrgfi 7635521070a0Smrgpopdef([AC_MSG_ERROR]) 7636521070a0Smrg])# _LT_PROG_CXX 76374456fccdSmrg 7638521070a0Smrgdnl aclocal-1.4 backwards compatibility: 7639521070a0Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 76404456fccdSmrg 76414456fccdSmrg 7642521070a0Smrg# _LT_LANG_CXX_CONFIG([TAG]) 7643521070a0Smrg# -------------------------- 7644521070a0Smrg# Ensure that the configuration variables for a C++ compiler are suitably 7645521070a0Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7646521070a0Smrg# the compiler configuration to `libtool'. 7647521070a0Smrgm4_defun([_LT_LANG_CXX_CONFIG], 7648521070a0Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 7649521070a0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 7650521070a0Smrgm4_require([_LT_DECL_EGREP])dnl 7651521070a0Smrg 7652521070a0SmrgAC_LANG_PUSH(C++) 7653521070a0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7654521070a0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7655521070a0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7656521070a0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7657521070a0Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 7658521070a0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7659521070a0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7660521070a0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7661521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7662521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7663521070a0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7664521070a0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7665521070a0Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7666521070a0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7667521070a0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7668521070a0Smrg_LT_TAGVAR(module_cmds, $1)= 7669521070a0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7670521070a0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7671521070a0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7672521070a0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7673521070a0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7674521070a0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 76754456fccdSmrg 7676521070a0Smrg# Source file extension for C++ test sources. 7677521070a0Smrgac_ext=cpp 76784456fccdSmrg 7679521070a0Smrg# Object file extension for compiled C++ test sources. 7680521070a0Smrgobjext=o 7681521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 7682521070a0Smrg 7683521070a0Smrg# No sense in running all these tests if we already determined that 7684521070a0Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 7685521070a0Smrg# are currently assumed to apply to all compilers on this platform, 7686521070a0Smrg# and will be corrupted by setting them based on a non-working compiler. 7687521070a0Smrgif test "$_lt_caught_CXX_error" != yes; then 7688521070a0Smrg # Code to be used in simple compile tests 7689521070a0Smrg lt_simple_compile_test_code="int some_variable = 0;" 7690521070a0Smrg 7691521070a0Smrg # Code to be used in simple link tests 7692521070a0Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7693521070a0Smrg 7694521070a0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7695521070a0Smrg _LT_TAG_COMPILER 7696521070a0Smrg 7697521070a0Smrg # save warnings/boilerplate of simple test code 7698521070a0Smrg _LT_COMPILER_BOILERPLATE 7699521070a0Smrg _LT_LINKER_BOILERPLATE 7700521070a0Smrg 7701521070a0Smrg # Allow CC to be a program name with arguments. 7702521070a0Smrg lt_save_CC=$CC 7703521070a0Smrg lt_save_LD=$LD 7704521070a0Smrg lt_save_GCC=$GCC 7705521070a0Smrg GCC=$GXX 7706521070a0Smrg lt_save_with_gnu_ld=$with_gnu_ld 7707521070a0Smrg lt_save_path_LD=$lt_cv_path_LD 7708521070a0Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7709521070a0Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7710521070a0Smrg else 7711521070a0Smrg $as_unset lt_cv_prog_gnu_ld 7712521070a0Smrg fi 7713521070a0Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 7714521070a0Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 7715521070a0Smrg else 7716521070a0Smrg $as_unset lt_cv_path_LD 7717521070a0Smrg fi 7718521070a0Smrg test -z "${LDCXX+set}" || LD=$LDCXX 7719521070a0Smrg CC=${CXX-"c++"} 7720521070a0Smrg compiler=$CC 7721521070a0Smrg _LT_TAGVAR(compiler, $1)=$CC 7722521070a0Smrg _LT_CC_BASENAME([$compiler]) 77234456fccdSmrg 7724521070a0Smrg if test -n "$compiler"; then 7725521070a0Smrg # We don't want -fno-exception when compiling C++ code, so set the 7726521070a0Smrg # no_builtin_flag separately 7727521070a0Smrg if test "$GXX" = yes; then 7728521070a0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7729521070a0Smrg else 7730521070a0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7731521070a0Smrg fi 77324456fccdSmrg 7733521070a0Smrg if test "$GXX" = yes; then 7734521070a0Smrg # Set up default GNU C++ configuration 77354456fccdSmrg 7736521070a0Smrg LT_PATH_LD 77374456fccdSmrg 7738521070a0Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7739521070a0Smrg # archiving commands below assume that GNU ld is being used. 7740521070a0Smrg if test "$with_gnu_ld" = yes; then 7741521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7742521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 77434456fccdSmrg 7744521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7745521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 77464456fccdSmrg 7747521070a0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 7748521070a0Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7749521070a0Smrg # investigate it a little bit more. (MM) 7750521070a0Smrg wlarc='${wl}' 77514456fccdSmrg 7752521070a0Smrg # ancient GNU ld didn't support --whole-archive et. al. 7753521070a0Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7754521070a0Smrg $GREP 'no-whole-archive' > /dev/null; then 7755521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7756521070a0Smrg else 7757521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7758521070a0Smrg fi 7759521070a0Smrg else 7760521070a0Smrg with_gnu_ld=no 7761521070a0Smrg wlarc= 7762521070a0Smrg 7763521070a0Smrg # A generic and very simple default shared library creation 7764521070a0Smrg # command for GNU C++ for the case where it uses the native 7765521070a0Smrg # linker, instead of GNU ld. If possible, this setting should 7766521070a0Smrg # overridden to take advantage of the native linker features on 7767521070a0Smrg # the platform it is being used on. 7768521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7769521070a0Smrg fi 77704456fccdSmrg 7771521070a0Smrg # Commands to make compiler produce verbose output that lists 7772521070a0Smrg # what "hidden" libraries, object files and flags are used when 7773521070a0Smrg # linking a shared library. 7774521070a0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 77754456fccdSmrg 7776521070a0Smrg else 7777521070a0Smrg GXX=no 7778521070a0Smrg with_gnu_ld=no 7779521070a0Smrg wlarc= 7780521070a0Smrg fi 77814456fccdSmrg 7782521070a0Smrg # PORTME: fill in a description of your system's C++ link characteristics 7783521070a0Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7784521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7785521070a0Smrg case $host_os in 7786521070a0Smrg aix3*) 7787521070a0Smrg # FIXME: insert proper C++ library support 7788521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7789521070a0Smrg ;; 7790521070a0Smrg aix[[4-9]]*) 7791521070a0Smrg if test "$host_cpu" = ia64; then 7792521070a0Smrg # On IA64, the linker does run time linking by default, so we don't 7793521070a0Smrg # have to do anything special. 7794521070a0Smrg aix_use_runtimelinking=no 7795521070a0Smrg exp_sym_flag='-Bexport' 7796521070a0Smrg no_entry_flag="" 7797521070a0Smrg else 7798521070a0Smrg aix_use_runtimelinking=no 7799521070a0Smrg 7800521070a0Smrg # Test if we are trying to use run time linking or normal 7801521070a0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7802521070a0Smrg # need to do runtime linking. 7803521070a0Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7804521070a0Smrg for ld_flag in $LDFLAGS; do 7805521070a0Smrg case $ld_flag in 7806521070a0Smrg *-brtl*) 7807521070a0Smrg aix_use_runtimelinking=yes 7808521070a0Smrg break 7809521070a0Smrg ;; 7810521070a0Smrg esac 7811521070a0Smrg done 7812521070a0Smrg ;; 7813521070a0Smrg esac 78144456fccdSmrg 7815521070a0Smrg exp_sym_flag='-bexport' 7816521070a0Smrg no_entry_flag='-bnoentry' 7817521070a0Smrg fi 78184456fccdSmrg 7819521070a0Smrg # When large executables or shared objects are built, AIX ld can 7820521070a0Smrg # have problems creating the table of contents. If linking a library 7821521070a0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7822521070a0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7823521070a0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7824521070a0Smrg 7825521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='' 7826521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7827521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7828521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7829521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7830521070a0Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7831521070a0Smrg 7832521070a0Smrg if test "$GXX" = yes; then 7833521070a0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7834521070a0Smrg # We only want to do this on AIX 4.2 and lower, the check 7835521070a0Smrg # below for broken collect2 doesn't work under 4.3+ 7836521070a0Smrg collect2name=`${CC} -print-prog-name=collect2` 7837521070a0Smrg if test -f "$collect2name" && 7838521070a0Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7839521070a0Smrg then 7840521070a0Smrg # We have reworked collect2 7841521070a0Smrg : 7842521070a0Smrg else 7843521070a0Smrg # We have old collect2 7844521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7845521070a0Smrg # It fails to find uninstalled libraries when the uninstalled 7846521070a0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7847521070a0Smrg # to unsupported forces relinking 7848521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7849521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7850521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7851521070a0Smrg fi 7852521070a0Smrg esac 7853521070a0Smrg shared_flag='-shared' 7854521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 7855521070a0Smrg shared_flag="$shared_flag "'${wl}-G' 7856521070a0Smrg fi 7857521070a0Smrg else 7858521070a0Smrg # not using gcc 7859521070a0Smrg if test "$host_cpu" = ia64; then 7860521070a0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7861521070a0Smrg # chokes on -Wl,-G. The following line is correct: 7862521070a0Smrg shared_flag='-G' 7863521070a0Smrg else 7864521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 7865521070a0Smrg shared_flag='${wl}-G' 7866521070a0Smrg else 7867521070a0Smrg shared_flag='${wl}-bM:SRE' 7868521070a0Smrg fi 7869521070a0Smrg fi 7870521070a0Smrg fi 78714456fccdSmrg 7872521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7873521070a0Smrg # It seems that -bexpall does not export symbols beginning with 7874521070a0Smrg # underscore (_), so it is better to generate a list of symbols to 7875521070a0Smrg # export. 7876521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7877521070a0Smrg if test "$aix_use_runtimelinking" = yes; then 7878521070a0Smrg # Warning - without using the other runtime loading flags (-brtl), 7879521070a0Smrg # -berok will link without error, but may produce a broken library. 7880521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7881521070a0Smrg # Determine the default libpath from the value encoded in an empty 7882521070a0Smrg # executable. 7883521070a0Smrg _LT_SYS_MODULE_PATH_AIX 7884521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7885521070a0Smrg 7886521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7887521070a0Smrg else 7888521070a0Smrg if test "$host_cpu" = ia64; then 7889521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7890521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7891521070a0Smrg _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" 7892521070a0Smrg else 7893521070a0Smrg # Determine the default libpath from the value encoded in an 7894521070a0Smrg # empty executable. 7895521070a0Smrg _LT_SYS_MODULE_PATH_AIX 7896521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7897521070a0Smrg # Warning - without using the other run time loading flags, 7898521070a0Smrg # -berok will link without error, but may produce a broken library. 7899521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7900521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7901521070a0Smrg # Exported symbols can be pulled into shared objects from archives 7902521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7903521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7904521070a0Smrg # This is similar to how AIX traditionally builds its shared 7905521070a0Smrg # libraries. 7906521070a0Smrg _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' 7907521070a0Smrg fi 7908521070a0Smrg fi 7909521070a0Smrg ;; 79104456fccdSmrg 7911521070a0Smrg beos*) 7912521070a0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7913521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7914521070a0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7915521070a0Smrg # support --undefined. This deserves some investigation. FIXME 7916521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7917521070a0Smrg else 7918521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7919521070a0Smrg fi 7920521070a0Smrg ;; 79214456fccdSmrg 7922521070a0Smrg chorus*) 7923521070a0Smrg case $cc_basename in 7924521070a0Smrg *) 7925521070a0Smrg # FIXME: insert proper C++ library support 7926521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7927521070a0Smrg ;; 7928521070a0Smrg esac 7929521070a0Smrg ;; 79304456fccdSmrg 7931521070a0Smrg cygwin* | mingw* | pw32* | cegcc*) 7932521070a0Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7933521070a0Smrg # as there is no search path for DLLs. 7934521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7935521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7936521070a0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7937521070a0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7938521070a0Smrg 7939521070a0Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7940521070a0Smrg _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' 7941521070a0Smrg # If the export-symbols file already is a .def file (1st line 7942521070a0Smrg # is EXPORTS), use it as is; otherwise, prepend... 7943521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7944521070a0Smrg cp $export_symbols $output_objdir/$soname.def; 7945521070a0Smrg else 7946521070a0Smrg echo EXPORTS > $output_objdir/$soname.def; 7947521070a0Smrg cat $export_symbols >> $output_objdir/$soname.def; 7948521070a0Smrg fi~ 7949521070a0Smrg $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' 7950521070a0Smrg else 7951521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7952521070a0Smrg fi 7953521070a0Smrg ;; 7954521070a0Smrg darwin* | rhapsody*) 7955521070a0Smrg _LT_DARWIN_LINKER_FEATURES($1) 7956521070a0Smrg ;; 79574456fccdSmrg 7958521070a0Smrg dgux*) 7959521070a0Smrg case $cc_basename in 7960521070a0Smrg ec++*) 7961521070a0Smrg # FIXME: insert proper C++ library support 7962521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7963521070a0Smrg ;; 7964521070a0Smrg ghcx*) 7965521070a0Smrg # Green Hills C++ Compiler 7966521070a0Smrg # FIXME: insert proper C++ library support 7967521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7968521070a0Smrg ;; 7969521070a0Smrg *) 7970521070a0Smrg # FIXME: insert proper C++ library support 7971521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7972521070a0Smrg ;; 7973521070a0Smrg esac 7974521070a0Smrg ;; 79754456fccdSmrg 7976521070a0Smrg freebsd[[12]]*) 7977521070a0Smrg # C++ shared libraries reported to be fairly broken before 7978521070a0Smrg # switch to ELF 7979521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7980521070a0Smrg ;; 79814456fccdSmrg 7982521070a0Smrg freebsd-elf*) 7983521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7984521070a0Smrg ;; 79854456fccdSmrg 7986521070a0Smrg freebsd* | dragonfly*) 7987521070a0Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7988521070a0Smrg # conventions 7989521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7990521070a0Smrg ;; 79914456fccdSmrg 7992521070a0Smrg gnu*) 7993521070a0Smrg ;; 79944456fccdSmrg 7995521070a0Smrg hpux9*) 7996521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7997521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7998521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7999521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8000521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8001521070a0Smrg # but as the default 8002521070a0Smrg # location of the library. 8003521070a0Smrg 8004521070a0Smrg case $cc_basename in 8005521070a0Smrg CC*) 8006521070a0Smrg # FIXME: insert proper C++ library support 8007521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8008521070a0Smrg ;; 8009521070a0Smrg aCC*) 8010521070a0Smrg _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' 8011521070a0Smrg # Commands to make compiler produce verbose output that lists 8012521070a0Smrg # what "hidden" libraries, object files and flags are used when 8013521070a0Smrg # linking a shared library. 8014521070a0Smrg # 8015521070a0Smrg # There doesn't appear to be a way to prevent this compiler from 8016521070a0Smrg # explicitly linking system object files so we need to strip them 8017521070a0Smrg # from the output so that they don't get included in the library 8018521070a0Smrg # dependencies. 8019521070a0Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8020521070a0Smrg ;; 8021521070a0Smrg *) 8022521070a0Smrg if test "$GXX" = yes; then 8023521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8024521070a0Smrg else 8025521070a0Smrg # FIXME: insert proper C++ library support 8026521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8027521070a0Smrg fi 8028521070a0Smrg ;; 8029521070a0Smrg esac 8030521070a0Smrg ;; 80314456fccdSmrg 8032521070a0Smrg hpux10*|hpux11*) 8033521070a0Smrg if test $with_gnu_ld = no; then 8034521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8035521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8036521070a0Smrg 8037521070a0Smrg case $host_cpu in 8038521070a0Smrg hppa*64*|ia64*) 8039521070a0Smrg ;; 8040521070a0Smrg *) 8041521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8042521070a0Smrg ;; 8043521070a0Smrg esac 8044521070a0Smrg fi 8045521070a0Smrg case $host_cpu in 8046521070a0Smrg hppa*64*|ia64*) 8047521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8048521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8049521070a0Smrg ;; 8050521070a0Smrg *) 8051521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8052521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8053521070a0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8054521070a0Smrg # but as the default 8055521070a0Smrg # location of the library. 8056521070a0Smrg ;; 8057521070a0Smrg esac 8058521070a0Smrg 8059521070a0Smrg case $cc_basename in 8060521070a0Smrg CC*) 8061521070a0Smrg # FIXME: insert proper C++ library support 8062521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8063521070a0Smrg ;; 8064521070a0Smrg aCC*) 8065521070a0Smrg case $host_cpu in 8066521070a0Smrg hppa*64*) 8067521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8068521070a0Smrg ;; 8069521070a0Smrg ia64*) 8070521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8071521070a0Smrg ;; 8072521070a0Smrg *) 8073521070a0Smrg _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' 8074521070a0Smrg ;; 8075521070a0Smrg esac 8076521070a0Smrg # Commands to make compiler produce verbose output that lists 8077521070a0Smrg # what "hidden" libraries, object files and flags are used when 8078521070a0Smrg # linking a shared library. 8079521070a0Smrg # 8080521070a0Smrg # There doesn't appear to be a way to prevent this compiler from 8081521070a0Smrg # explicitly linking system object files so we need to strip them 8082521070a0Smrg # from the output so that they don't get included in the library 8083521070a0Smrg # dependencies. 8084521070a0Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8085521070a0Smrg ;; 8086521070a0Smrg *) 8087521070a0Smrg if test "$GXX" = yes; then 8088521070a0Smrg if test $with_gnu_ld = no; then 8089521070a0Smrg case $host_cpu in 8090521070a0Smrg hppa*64*) 8091521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8092521070a0Smrg ;; 8093521070a0Smrg ia64*) 8094521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8095521070a0Smrg ;; 8096521070a0Smrg *) 8097521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8098521070a0Smrg ;; 8099521070a0Smrg esac 8100521070a0Smrg fi 8101521070a0Smrg else 8102521070a0Smrg # FIXME: insert proper C++ library support 8103521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8104521070a0Smrg fi 8105521070a0Smrg ;; 8106521070a0Smrg esac 8107521070a0Smrg ;; 81084456fccdSmrg 8109521070a0Smrg interix[[3-9]]*) 8110521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8111521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8112521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8113521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8114521070a0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8115521070a0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8116521070a0Smrg # default) and relocated if they conflict, which is a slow very memory 8117521070a0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8118521070a0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8119521070a0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8120521070a0Smrg _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' 8121521070a0Smrg _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' 8122521070a0Smrg ;; 8123521070a0Smrg irix5* | irix6*) 8124521070a0Smrg case $cc_basename in 8125521070a0Smrg CC*) 8126521070a0Smrg # SGI C++ 8127521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8128521070a0Smrg 8129521070a0Smrg # Archives containing C++ object files must be created using 8130521070a0Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8131521070a0Smrg # necessary to make sure instantiated templates are included 8132521070a0Smrg # in the archive. 8133521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8134521070a0Smrg ;; 8135521070a0Smrg *) 8136521070a0Smrg if test "$GXX" = yes; then 8137521070a0Smrg if test "$with_gnu_ld" = no; then 8138521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8139521070a0Smrg else 8140521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 8141521070a0Smrg fi 8142521070a0Smrg fi 8143521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8144521070a0Smrg ;; 8145521070a0Smrg esac 8146521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8147521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8148521070a0Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 8149521070a0Smrg ;; 81504456fccdSmrg 8151521070a0Smrg linux* | k*bsd*-gnu) 8152521070a0Smrg case $cc_basename in 8153521070a0Smrg KCC*) 8154521070a0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8155521070a0Smrg 8156521070a0Smrg # KCC will only create a shared library if the output file 8157521070a0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8158521070a0Smrg # to its proper name (with version) after linking. 8159521070a0Smrg _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' 8160521070a0Smrg _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' 8161521070a0Smrg # Commands to make compiler produce verbose output that lists 8162521070a0Smrg # what "hidden" libraries, object files and flags are used when 8163521070a0Smrg # linking a shared library. 8164521070a0Smrg # 8165521070a0Smrg # There doesn't appear to be a way to prevent this compiler from 8166521070a0Smrg # explicitly linking system object files so we need to strip them 8167521070a0Smrg # from the output so that they don't get included in the library 8168521070a0Smrg # dependencies. 8169521070a0Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8170521070a0Smrg 8171521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8172521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8173521070a0Smrg 8174521070a0Smrg # Archives containing C++ object files must be created using 8175521070a0Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8176521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8177521070a0Smrg ;; 8178521070a0Smrg icpc* | ecpc* ) 8179521070a0Smrg # Intel C++ 8180521070a0Smrg with_gnu_ld=yes 8181521070a0Smrg # version 8.0 and above of icpc choke on multiply defined symbols 8182521070a0Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8183521070a0Smrg # earlier do not add the objects themselves. 8184521070a0Smrg case `$CC -V 2>&1` in 8185521070a0Smrg *"Version 7."*) 8186521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8187521070a0Smrg _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' 8188521070a0Smrg ;; 8189521070a0Smrg *) # Version 8.0 or newer 8190521070a0Smrg tmp_idyn= 8191521070a0Smrg case $host_cpu in 8192521070a0Smrg ia64*) tmp_idyn=' -i_dynamic';; 8193521070a0Smrg esac 8194521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8195521070a0Smrg _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' 8196521070a0Smrg ;; 8197521070a0Smrg esac 8198521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8199521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8200521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8201521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8202521070a0Smrg ;; 8203521070a0Smrg pgCC* | pgcpp*) 8204521070a0Smrg # Portland Group C++ compiler 8205521070a0Smrg case `$CC -V` in 8206521070a0Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 8207521070a0Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8208521070a0Smrg rm -rf $tpldir~ 8209521070a0Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8210521070a0Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 8211521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8212521070a0Smrg rm -rf $tpldir~ 8213521070a0Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8214521070a0Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 8215521070a0Smrg $RANLIB $oldlib' 8216521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8217521070a0Smrg rm -rf $tpldir~ 8218521070a0Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8219521070a0Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8220521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8221521070a0Smrg rm -rf $tpldir~ 8222521070a0Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8223521070a0Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 8224521070a0Smrg ;; 8225521070a0Smrg *) # Version 6 will use weak symbols 8226521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8227521070a0Smrg _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' 8228521070a0Smrg ;; 8229521070a0Smrg esac 82304456fccdSmrg 8231521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8232521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8233521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8234521070a0Smrg ;; 8235521070a0Smrg cxx*) 8236521070a0Smrg # Compaq C++ 8237521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8238521070a0Smrg _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' 82394456fccdSmrg 8240521070a0Smrg runpath_var=LD_RUN_PATH 8241521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8242521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 82434456fccdSmrg 8244521070a0Smrg # Commands to make compiler produce verbose output that lists 8245521070a0Smrg # what "hidden" libraries, object files and flags are used when 8246521070a0Smrg # linking a shared library. 8247521070a0Smrg # 8248521070a0Smrg # There doesn't appear to be a way to prevent this compiler from 8249521070a0Smrg # explicitly linking system object files so we need to strip them 8250521070a0Smrg # from the output so that they don't get included in the library 8251521070a0Smrg # dependencies. 8252521070a0Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8253521070a0Smrg ;; 8254521070a0Smrg xl*) 8255521070a0Smrg # IBM XL 8.0 on PPC, with GNU ld 8256521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8257521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8258521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8259521070a0Smrg if test "x$supports_anon_versioning" = xyes; then 8260521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8261521070a0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8262521070a0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8263521070a0Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8264521070a0Smrg fi 8265521070a0Smrg ;; 8266521070a0Smrg *) 8267521070a0Smrg case `$CC -V 2>&1 | sed 5q` in 8268521070a0Smrg *Sun\ C*) 8269521070a0Smrg # Sun C++ 5.9 8270521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8271521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8272521070a0Smrg _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' 8273521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8274521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8275521070a0Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8276521070a0Smrg 8277521070a0Smrg # Not sure whether something based on 8278521070a0Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8279521070a0Smrg # would be better. 8280521070a0Smrg output_verbose_link_cmd='echo' 8281521070a0Smrg 8282521070a0Smrg # Archives containing C++ object files must be created using 8283521070a0Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8284521070a0Smrg # necessary to make sure instantiated templates are included 8285521070a0Smrg # in the archive. 8286521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8287521070a0Smrg ;; 8288521070a0Smrg esac 8289521070a0Smrg ;; 8290521070a0Smrg esac 8291521070a0Smrg ;; 82924456fccdSmrg 8293521070a0Smrg lynxos*) 8294521070a0Smrg # FIXME: insert proper C++ library support 8295521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8296521070a0Smrg ;; 82974456fccdSmrg 8298521070a0Smrg m88k*) 8299521070a0Smrg # FIXME: insert proper C++ library support 8300521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8301521070a0Smrg ;; 83024456fccdSmrg 8303521070a0Smrg mvs*) 8304521070a0Smrg case $cc_basename in 8305521070a0Smrg cxx*) 8306521070a0Smrg # FIXME: insert proper C++ library support 8307521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8308521070a0Smrg ;; 8309521070a0Smrg *) 8310521070a0Smrg # FIXME: insert proper C++ library support 8311521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8312521070a0Smrg ;; 8313521070a0Smrg esac 8314521070a0Smrg ;; 83154456fccdSmrg 8316521070a0Smrg netbsd*) 8317521070a0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8318521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8319521070a0Smrg wlarc= 8320521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8321521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8322521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8323521070a0Smrg fi 8324521070a0Smrg # Workaround some broken pre-1.5 toolchains 8325521070a0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8326521070a0Smrg ;; 83274456fccdSmrg 8328521070a0Smrg *nto* | *qnx*) 8329521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8330521070a0Smrg ;; 83314456fccdSmrg 8332521070a0Smrg openbsd2*) 8333521070a0Smrg # C++ shared libraries are fairly broken 8334521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8335521070a0Smrg ;; 833642d69509Smrg 8337521070a0Smrg openbsd*) 8338521070a0Smrg if test -f /usr/libexec/ld.so; then 8339521070a0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8340521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8341521070a0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8342521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8343521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8344521070a0Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8345521070a0Smrg _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' 8346521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8347521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8348521070a0Smrg fi 8349521070a0Smrg output_verbose_link_cmd=echo 8350521070a0Smrg else 8351521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8352521070a0Smrg fi 8353521070a0Smrg ;; 835442d69509Smrg 8355521070a0Smrg osf3* | osf4* | osf5*) 8356521070a0Smrg case $cc_basename in 8357521070a0Smrg KCC*) 8358521070a0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8359521070a0Smrg 8360521070a0Smrg # KCC will only create a shared library if the output file 8361521070a0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8362521070a0Smrg # to its proper name (with version) after linking. 8363521070a0Smrg _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' 8364521070a0Smrg 8365521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8366521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8367521070a0Smrg 8368521070a0Smrg # Archives containing C++ object files must be created using 8369521070a0Smrg # the KAI C++ compiler. 8370521070a0Smrg case $host in 8371521070a0Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8372521070a0Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8373521070a0Smrg esac 8374521070a0Smrg ;; 8375521070a0Smrg RCC*) 8376521070a0Smrg # Rational C++ 2.4.1 8377521070a0Smrg # FIXME: insert proper C++ library support 8378521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8379521070a0Smrg ;; 8380521070a0Smrg cxx*) 8381521070a0Smrg case $host in 8382521070a0Smrg osf3*) 8383521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8384521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8385521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8386521070a0Smrg ;; 8387521070a0Smrg *) 8388521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8389521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8390521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8391521070a0Smrg echo "-hidden">> $lib.exp~ 8392521070a0Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 8393521070a0Smrg $RM $lib.exp' 8394521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8395521070a0Smrg ;; 8396521070a0Smrg esac 83974456fccdSmrg 8398521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 839942d69509Smrg 8400521070a0Smrg # Commands to make compiler produce verbose output that lists 8401521070a0Smrg # what "hidden" libraries, object files and flags are used when 8402521070a0Smrg # linking a shared library. 8403521070a0Smrg # 8404521070a0Smrg # There doesn't appear to be a way to prevent this compiler from 8405521070a0Smrg # explicitly linking system object files so we need to strip them 8406521070a0Smrg # from the output so that they don't get included in the library 8407521070a0Smrg # dependencies. 8408521070a0Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8409521070a0Smrg ;; 8410521070a0Smrg *) 8411521070a0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8412521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8413521070a0Smrg case $host in 8414521070a0Smrg osf3*) 8415521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8416521070a0Smrg ;; 8417521070a0Smrg *) 8418521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8419521070a0Smrg ;; 8420521070a0Smrg esac 8421521070a0Smrg 8422521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8423521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8424521070a0Smrg 8425521070a0Smrg # Commands to make compiler produce verbose output that lists 8426521070a0Smrg # what "hidden" libraries, object files and flags are used when 8427521070a0Smrg # linking a shared library. 8428521070a0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8429521070a0Smrg 8430521070a0Smrg else 8431521070a0Smrg # FIXME: insert proper C++ library support 8432521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8433521070a0Smrg fi 8434521070a0Smrg ;; 8435521070a0Smrg esac 8436521070a0Smrg ;; 843742d69509Smrg 8438521070a0Smrg psos*) 8439521070a0Smrg # FIXME: insert proper C++ library support 8440521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8441521070a0Smrg ;; 844242d69509Smrg 8443521070a0Smrg sunos4*) 8444521070a0Smrg case $cc_basename in 8445521070a0Smrg CC*) 8446521070a0Smrg # Sun C++ 4.x 8447521070a0Smrg # FIXME: insert proper C++ library support 8448521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8449521070a0Smrg ;; 8450521070a0Smrg lcc*) 8451521070a0Smrg # Lucid 8452521070a0Smrg # FIXME: insert proper C++ library support 8453521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8454521070a0Smrg ;; 8455521070a0Smrg *) 8456521070a0Smrg # FIXME: insert proper C++ library support 8457521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8458521070a0Smrg ;; 8459521070a0Smrg esac 8460521070a0Smrg ;; 846142d69509Smrg 8462521070a0Smrg solaris*) 8463521070a0Smrg case $cc_basename in 8464521070a0Smrg CC*) 8465521070a0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 8466521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8467521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8468521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8469521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8470521070a0Smrg $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' 8471521070a0Smrg 8472521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8473521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8474521070a0Smrg case $host_os in 8475521070a0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8476521070a0Smrg *) 8477521070a0Smrg # The compiler driver will combine and reorder linker options, 8478521070a0Smrg # but understands `-z linker_flag'. 8479521070a0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8480521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8481521070a0Smrg ;; 8482521070a0Smrg esac 8483521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 848442d69509Smrg 8485521070a0Smrg output_verbose_link_cmd='echo' 848642d69509Smrg 8487521070a0Smrg # Archives containing C++ object files must be created using 8488521070a0Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8489521070a0Smrg # necessary to make sure instantiated templates are included 8490521070a0Smrg # in the archive. 8491521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8492521070a0Smrg ;; 8493521070a0Smrg gcx*) 8494521070a0Smrg # Green Hills C++ Compiler 8495521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 849642d69509Smrg 8497521070a0Smrg # The C++ compiler must be used to create the archive. 8498521070a0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8499521070a0Smrg ;; 8500521070a0Smrg *) 8501521070a0Smrg # GNU C++ compiler with Solaris linker 8502521070a0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8503521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8504521070a0Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8505521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8506521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8507521070a0Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8508521070a0Smrg 8509521070a0Smrg # Commands to make compiler produce verbose output that lists 8510521070a0Smrg # what "hidden" libraries, object files and flags are used when 8511521070a0Smrg # linking a shared library. 8512521070a0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8513521070a0Smrg else 8514521070a0Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8515521070a0Smrg # platform. 8516521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8517521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8518521070a0Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8519521070a0Smrg 8520521070a0Smrg # Commands to make compiler produce verbose output that lists 8521521070a0Smrg # what "hidden" libraries, object files and flags are used when 8522521070a0Smrg # linking a shared library. 8523521070a0Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8524521070a0Smrg fi 8525521070a0Smrg 8526521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8527521070a0Smrg case $host_os in 8528521070a0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8529521070a0Smrg *) 8530521070a0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8531521070a0Smrg ;; 8532521070a0Smrg esac 8533521070a0Smrg fi 8534521070a0Smrg ;; 8535521070a0Smrg esac 8536521070a0Smrg ;; 853742d69509Smrg 8538521070a0Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8539521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8540521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8541521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8542521070a0Smrg runpath_var='LD_RUN_PATH' 854342d69509Smrg 8544521070a0Smrg case $cc_basename in 8545521070a0Smrg CC*) 8546521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8547521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8548521070a0Smrg ;; 8549521070a0Smrg *) 8550521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8551521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8552521070a0Smrg ;; 8553521070a0Smrg esac 8554521070a0Smrg ;; 855542d69509Smrg 8556521070a0Smrg sysv5* | sco3.2v5* | sco5v6*) 8557521070a0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8558521070a0Smrg # link with -lc, and that would cause any symbols used from libc to 8559521070a0Smrg # always be unresolved, which means just about no library would 8560521070a0Smrg # ever link correctly. If we're not using GNU ld we use -z text 8561521070a0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8562521070a0Smrg # as -z defs. 8563521070a0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8564521070a0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8565521070a0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8566521070a0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8567521070a0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8568521070a0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8569521070a0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8570521070a0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8571521070a0Smrg runpath_var='LD_RUN_PATH' 857242d69509Smrg 8573521070a0Smrg case $cc_basename in 8574521070a0Smrg CC*) 8575521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8576521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8577521070a0Smrg ;; 8578521070a0Smrg *) 8579521070a0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8580521070a0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8581521070a0Smrg ;; 8582521070a0Smrg esac 8583521070a0Smrg ;; 85844456fccdSmrg 8585521070a0Smrg tandem*) 8586521070a0Smrg case $cc_basename in 8587521070a0Smrg NCC*) 8588521070a0Smrg # NonStop-UX NCC 3.20 8589521070a0Smrg # FIXME: insert proper C++ library support 8590521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8591521070a0Smrg ;; 8592521070a0Smrg *) 8593521070a0Smrg # FIXME: insert proper C++ library support 8594521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8595521070a0Smrg ;; 8596521070a0Smrg esac 8597521070a0Smrg ;; 859842d69509Smrg 8599521070a0Smrg vxworks*) 8600521070a0Smrg # FIXME: insert proper C++ library support 8601521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8602521070a0Smrg ;; 860342d69509Smrg 8604521070a0Smrg *) 8605521070a0Smrg # FIXME: insert proper C++ library support 8606521070a0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8607521070a0Smrg ;; 8608521070a0Smrg esac 860942d69509Smrg 8610521070a0Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8611521070a0Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8612521070a0Smrg 8613521070a0Smrg _LT_TAGVAR(GCC, $1)="$GXX" 8614521070a0Smrg _LT_TAGVAR(LD, $1)="$LD" 8615521070a0Smrg 8616521070a0Smrg ## CAVEAT EMPTOR: 8617521070a0Smrg ## There is no encapsulation within the following macros, do not change 8618521070a0Smrg ## the running order or otherwise move them around unless you know exactly 8619521070a0Smrg ## what you are doing... 8620521070a0Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8621521070a0Smrg _LT_COMPILER_PIC($1) 8622521070a0Smrg _LT_COMPILER_C_O($1) 8623521070a0Smrg _LT_COMPILER_FILE_LOCKS($1) 8624521070a0Smrg _LT_LINKER_SHLIBS($1) 8625521070a0Smrg _LT_SYS_DYNAMIC_LINKER($1) 8626521070a0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8627521070a0Smrg 8628521070a0Smrg _LT_CONFIG($1) 8629521070a0Smrg fi # test -n "$compiler" 8630521070a0Smrg 8631521070a0Smrg CC=$lt_save_CC 8632521070a0Smrg LDCXX=$LD 8633521070a0Smrg LD=$lt_save_LD 8634521070a0Smrg GCC=$lt_save_GCC 8635521070a0Smrg with_gnu_ld=$lt_save_with_gnu_ld 8636521070a0Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 8637521070a0Smrg lt_cv_path_LD=$lt_save_path_LD 8638521070a0Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8639521070a0Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8640521070a0Smrgfi # test "$_lt_caught_CXX_error" != yes 864142d69509Smrg 8642521070a0SmrgAC_LANG_POP 8643521070a0Smrg])# _LT_LANG_CXX_CONFIG 864442d69509Smrg 864542d69509Smrg 8646521070a0Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8647521070a0Smrg# --------------------------------- 8648521070a0Smrg# Figure out "hidden" library dependencies from verbose 8649521070a0Smrg# compiler output when linking a shared library. 8650521070a0Smrg# Parse the compiler output and extract the necessary 8651521070a0Smrg# objects, libraries and library flags. 8652521070a0Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8653521070a0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8654521070a0Smrg# Dependencies to place before and after the object being linked: 8655521070a0Smrg_LT_TAGVAR(predep_objects, $1)= 8656521070a0Smrg_LT_TAGVAR(postdep_objects, $1)= 8657521070a0Smrg_LT_TAGVAR(predeps, $1)= 8658521070a0Smrg_LT_TAGVAR(postdeps, $1)= 8659521070a0Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 866042d69509Smrg 8661521070a0Smrgdnl we can't use the lt_simple_compile_test_code here, 8662521070a0Smrgdnl because it contains code intended for an executable, 8663521070a0Smrgdnl not a library. It's possible we should let each 8664521070a0Smrgdnl tag define a new lt_????_link_test_code variable, 8665521070a0Smrgdnl but it's only used here... 8666521070a0Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8667521070a0Smrgint a; 8668521070a0Smrgvoid foo (void) { a = 0; } 8669521070a0Smrg_LT_EOF 8670521070a0Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8671521070a0Smrgclass Foo 867242d69509Smrg{ 8673521070a0Smrgpublic: 8674521070a0Smrg Foo (void) { a = 0; } 8675521070a0Smrgprivate: 8676521070a0Smrg int a; 867742d69509Smrg}; 8678521070a0Smrg_LT_EOF 8679521070a0Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8680521070a0Smrg subroutine foo 8681521070a0Smrg implicit none 8682521070a0Smrg integer*4 a 8683521070a0Smrg a=0 8684521070a0Smrg return 8685521070a0Smrg end 8686521070a0Smrg_LT_EOF 8687521070a0Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8688521070a0Smrg subroutine foo 8689521070a0Smrg implicit none 8690521070a0Smrg integer a 8691521070a0Smrg a=0 8692521070a0Smrg return 8693521070a0Smrg end 8694521070a0Smrg_LT_EOF 8695521070a0Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8696521070a0Smrgpublic class foo { 8697521070a0Smrg private int a; 8698521070a0Smrg public void bar (void) { 8699521070a0Smrg a = 0; 8700521070a0Smrg } 8701521070a0Smrg}; 8702521070a0Smrg_LT_EOF 870342d69509Smrg]) 8704521070a0Smrgdnl Parse the compiler output and extract the necessary 8705521070a0Smrgdnl objects, libraries and library flags. 8706521070a0Smrgif AC_TRY_EVAL(ac_compile); then 8707521070a0Smrg # Parse the compiler output and extract the necessary 8708521070a0Smrg # objects, libraries and library flags. 870942d69509Smrg 8710521070a0Smrg # Sentinel used to keep track of whether or not we are before 8711521070a0Smrg # the conftest object file. 8712521070a0Smrg pre_test_object_deps_done=no 871342d69509Smrg 8714521070a0Smrg for p in `eval "$output_verbose_link_cmd"`; do 8715521070a0Smrg case $p in 871642d69509Smrg 8717521070a0Smrg -L* | -R* | -l*) 8718521070a0Smrg # Some compilers place space between "-{L,R}" and the path. 8719521070a0Smrg # Remove the space. 8720521070a0Smrg if test $p = "-L" || 8721521070a0Smrg test $p = "-R"; then 8722521070a0Smrg prev=$p 8723521070a0Smrg continue 8724521070a0Smrg else 8725521070a0Smrg prev= 8726521070a0Smrg fi 872742d69509Smrg 8728521070a0Smrg if test "$pre_test_object_deps_done" = no; then 8729521070a0Smrg case $p in 8730521070a0Smrg -L* | -R*) 8731521070a0Smrg # Internal compiler library paths should come after those 8732521070a0Smrg # provided the user. The postdeps already come after the 8733521070a0Smrg # user supplied libs so there is no need to process them. 8734521070a0Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8735521070a0Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8736521070a0Smrg else 8737521070a0Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8738521070a0Smrg fi 8739521070a0Smrg ;; 8740521070a0Smrg # The "-l" case would never come before the object being 8741521070a0Smrg # linked, so don't bother handling this case. 8742521070a0Smrg esac 8743521070a0Smrg else 8744521070a0Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8745521070a0Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8746521070a0Smrg else 8747521070a0Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8748521070a0Smrg fi 8749521070a0Smrg fi 875042d69509Smrg ;; 87514456fccdSmrg 8752521070a0Smrg *.$objext) 8753521070a0Smrg # This assumes that the test object file only shows up 8754521070a0Smrg # once in the compiler output. 8755521070a0Smrg if test "$p" = "conftest.$objext"; then 8756521070a0Smrg pre_test_object_deps_done=yes 8757521070a0Smrg continue 8758521070a0Smrg fi 8759521070a0Smrg 8760521070a0Smrg if test "$pre_test_object_deps_done" = no; then 8761521070a0Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8762521070a0Smrg _LT_TAGVAR(predep_objects, $1)="$p" 8763521070a0Smrg else 8764521070a0Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8765521070a0Smrg fi 8766521070a0Smrg else 8767521070a0Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8768521070a0Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 8769521070a0Smrg else 8770521070a0Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8771521070a0Smrg fi 8772521070a0Smrg fi 8773521070a0Smrg ;; 87744456fccdSmrg 8775521070a0Smrg *) ;; # Ignore the rest. 87764456fccdSmrg 8777521070a0Smrg esac 8778521070a0Smrg done 87794456fccdSmrg 8780521070a0Smrg # Clean up. 8781521070a0Smrg rm -f a.out a.exe 8782521070a0Smrgelse 8783521070a0Smrg echo "libtool.m4: error: problem compiling $1 test program" 8784521070a0Smrgfi 87854456fccdSmrg 8786521070a0Smrg$RM -f confest.$objext 87874456fccdSmrg 8788521070a0Smrg# PORTME: override above test on systems where it is broken 8789521070a0Smrgm4_if([$1], [CXX], 8790521070a0Smrg[case $host_os in 8791521070a0Smrginterix[[3-9]]*) 8792521070a0Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8793521070a0Smrg # hack all around it, let's just trust "g++" to DTRT. 8794521070a0Smrg _LT_TAGVAR(predep_objects,$1)= 8795521070a0Smrg _LT_TAGVAR(postdep_objects,$1)= 8796521070a0Smrg _LT_TAGVAR(postdeps,$1)= 8797521070a0Smrg ;; 87984456fccdSmrg 8799521070a0Smrglinux*) 8800521070a0Smrg case `$CC -V 2>&1 | sed 5q` in 8801521070a0Smrg *Sun\ C*) 8802521070a0Smrg # Sun C++ 5.9 88034456fccdSmrg 8804521070a0Smrg # The more standards-conforming stlport4 library is 8805521070a0Smrg # incompatible with the Cstd library. Avoid specifying 8806521070a0Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8807521070a0Smrg # -library=stlport4 depends on it. 8808521070a0Smrg case " $CXX $CXXFLAGS " in 8809521070a0Smrg *" -library=stlport4 "*) 8810521070a0Smrg solaris_use_stlport4=yes 881142d69509Smrg ;; 8812521070a0Smrg esac 88134456fccdSmrg 8814521070a0Smrg if test "$solaris_use_stlport4" != yes; then 8815521070a0Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8816521070a0Smrg fi 8817521070a0Smrg ;; 8818521070a0Smrg esac 8819521070a0Smrg ;; 88204456fccdSmrg 8821521070a0Smrgsolaris*) 8822521070a0Smrg case $cc_basename in 8823521070a0Smrg CC*) 8824521070a0Smrg # The more standards-conforming stlport4 library is 8825521070a0Smrg # incompatible with the Cstd library. Avoid specifying 8826521070a0Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8827521070a0Smrg # -library=stlport4 depends on it. 8828521070a0Smrg case " $CXX $CXXFLAGS " in 8829521070a0Smrg *" -library=stlport4 "*) 8830521070a0Smrg solaris_use_stlport4=yes 883142d69509Smrg ;; 883242d69509Smrg esac 88334456fccdSmrg 8834521070a0Smrg # Adding this requires a known-good setup of shared libraries for 8835521070a0Smrg # Sun compiler versions before 5.6, else PIC objects from an old 8836521070a0Smrg # archive will be linked into the output, leading to subtle bugs. 8837521070a0Smrg if test "$solaris_use_stlport4" != yes; then 8838521070a0Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8839521070a0Smrg fi 8840521070a0Smrg ;; 8841521070a0Smrg esac 8842521070a0Smrg ;; 8843521070a0Smrgesac 8844521070a0Smrg]) 88454456fccdSmrg 8846521070a0Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 8847521070a0Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8848521070a0Smrgesac 8849521070a0Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8850521070a0Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8851521070a0Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8852521070a0Smrgfi 8853521070a0Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8854521070a0Smrg [The directories searched by this compiler when creating a shared library]) 8855521070a0Smrg_LT_TAGDECL([], [predep_objects], [1], 8856521070a0Smrg [Dependencies to place before and after the objects being linked to 8857521070a0Smrg create a shared library]) 8858521070a0Smrg_LT_TAGDECL([], [postdep_objects], [1]) 8859521070a0Smrg_LT_TAGDECL([], [predeps], [1]) 8860521070a0Smrg_LT_TAGDECL([], [postdeps], [1]) 8861521070a0Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8862521070a0Smrg [The library search path used internally by the compiler when linking 8863521070a0Smrg a shared library]) 8864521070a0Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8865521070a0Smrg 8866521070a0Smrg 8867521070a0Smrg# _LT_PROG_F77 8868521070a0Smrg# ------------ 8869521070a0Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 8870521070a0Smrg# if there is no fortran compiler, we have our own version here. 8871521070a0Smrgm4_defun([_LT_PROG_F77], 8872521070a0Smrg[ 8873521070a0Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 8874521070a0SmrgAC_PROG_F77 8875521070a0Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 8876521070a0Smrg _lt_disable_F77=yes 8877521070a0Smrgfi 8878521070a0Smrgpopdef([AC_MSG_ERROR]) 8879521070a0Smrg])# _LT_PROG_F77 88804456fccdSmrg 8881521070a0Smrgdnl aclocal-1.4 backwards compatibility: 8882521070a0Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 88834456fccdSmrg 88844456fccdSmrg 8885521070a0Smrg# _LT_LANG_F77_CONFIG([TAG]) 8886521070a0Smrg# -------------------------- 8887521070a0Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 8888521070a0Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8889521070a0Smrg# to write the compiler configuration to `libtool'. 8890521070a0Smrgm4_defun([_LT_LANG_F77_CONFIG], 8891521070a0Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 8892521070a0SmrgAC_LANG_PUSH(Fortran 77) 8893521070a0Smrg 8894521070a0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8895521070a0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8896521070a0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8897521070a0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8898521070a0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8899521070a0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8900521070a0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8901521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8902521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8903521070a0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8904521070a0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8905521070a0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8906521070a0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8907521070a0Smrg_LT_TAGVAR(module_cmds, $1)= 8908521070a0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8909521070a0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8910521070a0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8911521070a0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8912521070a0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8913521070a0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8914521070a0Smrg 8915521070a0Smrg# Source file extension for f77 test sources. 8916521070a0Smrgac_ext=f 8917521070a0Smrg 8918521070a0Smrg# Object file extension for compiled f77 test sources. 8919521070a0Smrgobjext=o 8920521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 8921521070a0Smrg 8922521070a0Smrg# No sense in running all these tests if we already determined that 8923521070a0Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8924521070a0Smrg# are currently assumed to apply to all compilers on this platform, 8925521070a0Smrg# and will be corrupted by setting them based on a non-working compiler. 8926521070a0Smrgif test "$_lt_disable_F77" != yes; then 8927521070a0Smrg # Code to be used in simple compile tests 8928521070a0Smrg lt_simple_compile_test_code="\ 8929521070a0Smrg subroutine t 8930521070a0Smrg return 8931521070a0Smrg end 8932521070a0Smrg" 8933521070a0Smrg 8934521070a0Smrg # Code to be used in simple link tests 8935521070a0Smrg lt_simple_link_test_code="\ 8936521070a0Smrg program t 8937521070a0Smrg end 8938521070a0Smrg" 8939521070a0Smrg 8940521070a0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8941521070a0Smrg _LT_TAG_COMPILER 8942521070a0Smrg 8943521070a0Smrg # save warnings/boilerplate of simple test code 8944521070a0Smrg _LT_COMPILER_BOILERPLATE 8945521070a0Smrg _LT_LINKER_BOILERPLATE 8946521070a0Smrg 8947521070a0Smrg # Allow CC to be a program name with arguments. 8948521070a0Smrg lt_save_CC="$CC" 8949521070a0Smrg lt_save_GCC=$GCC 8950521070a0Smrg CC=${F77-"f77"} 8951521070a0Smrg compiler=$CC 8952521070a0Smrg _LT_TAGVAR(compiler, $1)=$CC 8953521070a0Smrg _LT_CC_BASENAME([$compiler]) 8954521070a0Smrg GCC=$G77 8955521070a0Smrg if test -n "$compiler"; then 8956521070a0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8957521070a0Smrg AC_MSG_RESULT([$can_build_shared]) 8958521070a0Smrg 8959521070a0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8960521070a0Smrg test "$can_build_shared" = "no" && enable_shared=no 8961521070a0Smrg 8962521070a0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8963521070a0Smrg # are all built from PIC. 8964521070a0Smrg case $host_os in 8965521070a0Smrg aix3*) 8966521070a0Smrg test "$enable_shared" = yes && enable_static=no 8967521070a0Smrg if test -n "$RANLIB"; then 8968521070a0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8969521070a0Smrg postinstall_cmds='$RANLIB $lib' 8970521070a0Smrg fi 897142d69509Smrg ;; 8972521070a0Smrg aix[[4-9]]*) 8973521070a0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8974521070a0Smrg test "$enable_shared" = yes && enable_static=no 8975521070a0Smrg fi 897642d69509Smrg ;; 8977521070a0Smrg esac 8978521070a0Smrg AC_MSG_RESULT([$enable_shared]) 8979521070a0Smrg 8980521070a0Smrg AC_MSG_CHECKING([whether to build static libraries]) 8981521070a0Smrg # Make sure either enable_shared or enable_static is yes. 8982521070a0Smrg test "$enable_shared" = yes || enable_static=yes 8983521070a0Smrg AC_MSG_RESULT([$enable_static]) 8984521070a0Smrg 8985521070a0Smrg _LT_TAGVAR(GCC, $1)="$G77" 8986521070a0Smrg _LT_TAGVAR(LD, $1)="$LD" 8987521070a0Smrg 8988521070a0Smrg ## CAVEAT EMPTOR: 8989521070a0Smrg ## There is no encapsulation within the following macros, do not change 8990521070a0Smrg ## the running order or otherwise move them around unless you know exactly 8991521070a0Smrg ## what you are doing... 8992521070a0Smrg _LT_COMPILER_PIC($1) 8993521070a0Smrg _LT_COMPILER_C_O($1) 8994521070a0Smrg _LT_COMPILER_FILE_LOCKS($1) 8995521070a0Smrg _LT_LINKER_SHLIBS($1) 8996521070a0Smrg _LT_SYS_DYNAMIC_LINKER($1) 8997521070a0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8998521070a0Smrg 8999521070a0Smrg _LT_CONFIG($1) 9000521070a0Smrg fi # test -n "$compiler" 9001521070a0Smrg 9002521070a0Smrg GCC=$lt_save_GCC 9003521070a0Smrg CC="$lt_save_CC" 9004521070a0Smrgfi # test "$_lt_disable_F77" != yes 9005521070a0Smrg 9006521070a0SmrgAC_LANG_POP 9007521070a0Smrg])# _LT_LANG_F77_CONFIG 9008521070a0Smrg 9009521070a0Smrg 9010521070a0Smrg# _LT_PROG_FC 9011521070a0Smrg# ----------- 9012521070a0Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 9013521070a0Smrg# if there is no fortran compiler, we have our own version here. 9014521070a0Smrgm4_defun([_LT_PROG_FC], 9015521070a0Smrg[ 9016521070a0Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 9017521070a0SmrgAC_PROG_FC 9018521070a0Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 9019521070a0Smrg _lt_disable_FC=yes 9020521070a0Smrgfi 9021521070a0Smrgpopdef([AC_MSG_ERROR]) 9022521070a0Smrg])# _LT_PROG_FC 9023521070a0Smrg 9024521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9025521070a0Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 9026521070a0Smrg 9027521070a0Smrg 9028521070a0Smrg# _LT_LANG_FC_CONFIG([TAG]) 9029521070a0Smrg# ------------------------- 9030521070a0Smrg# Ensure that the configuration variables for a Fortran compiler are 9031521070a0Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9032521070a0Smrg# to write the compiler configuration to `libtool'. 9033521070a0Smrgm4_defun([_LT_LANG_FC_CONFIG], 9034521070a0Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 9035521070a0SmrgAC_LANG_PUSH(Fortran) 9036521070a0Smrg 9037521070a0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9038521070a0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9039521070a0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9040521070a0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9041521070a0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9042521070a0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9043521070a0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9044521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9045521070a0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9046521070a0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9047521070a0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9048521070a0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9049521070a0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9050521070a0Smrg_LT_TAGVAR(module_cmds, $1)= 9051521070a0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9052521070a0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9053521070a0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9054521070a0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9055521070a0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9056521070a0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9057521070a0Smrg 9058521070a0Smrg# Source file extension for fc test sources. 9059521070a0Smrgac_ext=${ac_fc_srcext-f} 9060521070a0Smrg 9061521070a0Smrg# Object file extension for compiled fc test sources. 9062521070a0Smrgobjext=o 9063521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 9064521070a0Smrg 9065521070a0Smrg# No sense in running all these tests if we already determined that 9066521070a0Smrg# the FC compiler isn't working. Some variables (like enable_shared) 9067521070a0Smrg# are currently assumed to apply to all compilers on this platform, 9068521070a0Smrg# and will be corrupted by setting them based on a non-working compiler. 9069521070a0Smrgif test "$_lt_disable_FC" != yes; then 9070521070a0Smrg # Code to be used in simple compile tests 9071521070a0Smrg lt_simple_compile_test_code="\ 9072521070a0Smrg subroutine t 9073521070a0Smrg return 9074521070a0Smrg end 9075521070a0Smrg" 9076521070a0Smrg 9077521070a0Smrg # Code to be used in simple link tests 9078521070a0Smrg lt_simple_link_test_code="\ 9079521070a0Smrg program t 9080521070a0Smrg end 9081521070a0Smrg" 9082521070a0Smrg 9083521070a0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9084521070a0Smrg _LT_TAG_COMPILER 9085521070a0Smrg 9086521070a0Smrg # save warnings/boilerplate of simple test code 9087521070a0Smrg _LT_COMPILER_BOILERPLATE 9088521070a0Smrg _LT_LINKER_BOILERPLATE 9089521070a0Smrg 9090521070a0Smrg # Allow CC to be a program name with arguments. 9091521070a0Smrg lt_save_CC="$CC" 9092521070a0Smrg lt_save_GCC=$GCC 9093521070a0Smrg CC=${FC-"f95"} 9094521070a0Smrg compiler=$CC 9095521070a0Smrg GCC=$ac_cv_fc_compiler_gnu 9096521070a0Smrg 9097521070a0Smrg _LT_TAGVAR(compiler, $1)=$CC 9098521070a0Smrg _LT_CC_BASENAME([$compiler]) 9099521070a0Smrg 9100521070a0Smrg if test -n "$compiler"; then 9101521070a0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9102521070a0Smrg AC_MSG_RESULT([$can_build_shared]) 9103521070a0Smrg 9104521070a0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9105521070a0Smrg test "$can_build_shared" = "no" && enable_shared=no 9106521070a0Smrg 9107521070a0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9108521070a0Smrg # are all built from PIC. 9109521070a0Smrg case $host_os in 9110521070a0Smrg aix3*) 9111521070a0Smrg test "$enable_shared" = yes && enable_static=no 9112521070a0Smrg if test -n "$RANLIB"; then 9113521070a0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9114521070a0Smrg postinstall_cmds='$RANLIB $lib' 9115521070a0Smrg fi 911642d69509Smrg ;; 9117521070a0Smrg aix[[4-9]]*) 9118521070a0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9119521070a0Smrg test "$enable_shared" = yes && enable_static=no 9120521070a0Smrg fi 9121521070a0Smrg ;; 9122521070a0Smrg esac 9123521070a0Smrg AC_MSG_RESULT([$enable_shared]) 9124521070a0Smrg 9125521070a0Smrg AC_MSG_CHECKING([whether to build static libraries]) 9126521070a0Smrg # Make sure either enable_shared or enable_static is yes. 9127521070a0Smrg test "$enable_shared" = yes || enable_static=yes 9128521070a0Smrg AC_MSG_RESULT([$enable_static]) 9129521070a0Smrg 9130521070a0Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9131521070a0Smrg _LT_TAGVAR(LD, $1)="$LD" 9132521070a0Smrg 9133521070a0Smrg ## CAVEAT EMPTOR: 9134521070a0Smrg ## There is no encapsulation within the following macros, do not change 9135521070a0Smrg ## the running order or otherwise move them around unless you know exactly 9136521070a0Smrg ## what you are doing... 9137521070a0Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9138521070a0Smrg _LT_COMPILER_PIC($1) 9139521070a0Smrg _LT_COMPILER_C_O($1) 9140521070a0Smrg _LT_COMPILER_FILE_LOCKS($1) 9141521070a0Smrg _LT_LINKER_SHLIBS($1) 9142521070a0Smrg _LT_SYS_DYNAMIC_LINKER($1) 9143521070a0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9144521070a0Smrg 9145521070a0Smrg _LT_CONFIG($1) 9146521070a0Smrg fi # test -n "$compiler" 9147521070a0Smrg 9148521070a0Smrg GCC=$lt_save_GCC 9149521070a0Smrg CC="$lt_save_CC" 9150521070a0Smrgfi # test "$_lt_disable_FC" != yes 9151521070a0Smrg 9152521070a0SmrgAC_LANG_POP 9153521070a0Smrg])# _LT_LANG_FC_CONFIG 9154521070a0Smrg 9155521070a0Smrg 9156521070a0Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 9157521070a0Smrg# -------------------------- 9158521070a0Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9159521070a0Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9160521070a0Smrg# to write the compiler configuration to `libtool'. 9161521070a0Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 9162521070a0Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9163521070a0SmrgAC_LANG_SAVE 9164521070a0Smrg 9165521070a0Smrg# Source file extension for Java test sources. 9166521070a0Smrgac_ext=java 9167521070a0Smrg 9168521070a0Smrg# Object file extension for compiled Java test sources. 9169521070a0Smrgobjext=o 9170521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 9171521070a0Smrg 9172521070a0Smrg# Code to be used in simple compile tests 9173521070a0Smrglt_simple_compile_test_code="class foo {}" 9174521070a0Smrg 9175521070a0Smrg# Code to be used in simple link tests 9176521070a0Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9177521070a0Smrg 9178521070a0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9179521070a0Smrg_LT_TAG_COMPILER 9180521070a0Smrg 9181521070a0Smrg# save warnings/boilerplate of simple test code 9182521070a0Smrg_LT_COMPILER_BOILERPLATE 9183521070a0Smrg_LT_LINKER_BOILERPLATE 9184521070a0Smrg 9185521070a0Smrg# Allow CC to be a program name with arguments. 9186521070a0Smrglt_save_CC="$CC" 9187521070a0Smrglt_save_GCC=$GCC 9188521070a0SmrgGCC=yes 9189521070a0SmrgCC=${GCJ-"gcj"} 9190521070a0Smrgcompiler=$CC 9191521070a0Smrg_LT_TAGVAR(compiler, $1)=$CC 9192521070a0Smrg_LT_TAGVAR(LD, $1)="$LD" 9193521070a0Smrg_LT_CC_BASENAME([$compiler]) 91944456fccdSmrg 9195521070a0Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9196521070a0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 91974456fccdSmrg 9198521070a0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 91994456fccdSmrg 9200521070a0Smrgif test -n "$compiler"; then 9201521070a0Smrg _LT_COMPILER_NO_RTTI($1) 9202521070a0Smrg _LT_COMPILER_PIC($1) 9203521070a0Smrg _LT_COMPILER_C_O($1) 9204521070a0Smrg _LT_COMPILER_FILE_LOCKS($1) 9205521070a0Smrg _LT_LINKER_SHLIBS($1) 9206521070a0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 92074456fccdSmrg 9208521070a0Smrg _LT_CONFIG($1) 9209521070a0Smrgfi 92104456fccdSmrg 9211521070a0SmrgAC_LANG_RESTORE 92124456fccdSmrg 9213521070a0SmrgGCC=$lt_save_GCC 9214521070a0SmrgCC="$lt_save_CC" 9215521070a0Smrg])# _LT_LANG_GCJ_CONFIG 92164456fccdSmrg 92174456fccdSmrg 9218521070a0Smrg# _LT_LANG_RC_CONFIG([TAG]) 9219521070a0Smrg# ------------------------- 9220521070a0Smrg# Ensure that the configuration variables for the Windows resource compiler 9221521070a0Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9222521070a0Smrg# to write the compiler configuration to `libtool'. 9223521070a0Smrgm4_defun([_LT_LANG_RC_CONFIG], 9224521070a0Smrg[AC_REQUIRE([LT_PROG_RC])dnl 9225521070a0SmrgAC_LANG_SAVE 92264456fccdSmrg 9227521070a0Smrg# Source file extension for RC test sources. 9228521070a0Smrgac_ext=rc 92294456fccdSmrg 9230521070a0Smrg# Object file extension for compiled RC test sources. 9231521070a0Smrgobjext=o 9232521070a0Smrg_LT_TAGVAR(objext, $1)=$objext 92334456fccdSmrg 9234521070a0Smrg# Code to be used in simple compile tests 9235521070a0Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9236521070a0Smrg 9237521070a0Smrg# Code to be used in simple link tests 9238521070a0Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 9239521070a0Smrg 9240521070a0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9241521070a0Smrg_LT_TAG_COMPILER 9242521070a0Smrg 9243521070a0Smrg# save warnings/boilerplate of simple test code 9244521070a0Smrg_LT_COMPILER_BOILERPLATE 9245521070a0Smrg_LT_LINKER_BOILERPLATE 9246521070a0Smrg 9247521070a0Smrg# Allow CC to be a program name with arguments. 9248521070a0Smrglt_save_CC="$CC" 9249521070a0Smrglt_save_GCC=$GCC 9250521070a0SmrgGCC= 9251521070a0SmrgCC=${RC-"windres"} 9252521070a0Smrgcompiler=$CC 9253521070a0Smrg_LT_TAGVAR(compiler, $1)=$CC 9254521070a0Smrg_LT_CC_BASENAME([$compiler]) 9255521070a0Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9256521070a0Smrg 9257521070a0Smrgif test -n "$compiler"; then 9258521070a0Smrg : 9259521070a0Smrg _LT_CONFIG($1) 92604456fccdSmrgfi 926142d69509Smrg 9262521070a0SmrgGCC=$lt_save_GCC 9263521070a0SmrgAC_LANG_RESTORE 9264521070a0SmrgCC="$lt_save_CC" 9265521070a0Smrg])# _LT_LANG_RC_CONFIG 9266521070a0Smrg 9267521070a0Smrg 9268521070a0Smrg# LT_PROG_GCJ 9269521070a0Smrg# ----------- 9270521070a0SmrgAC_DEFUN([LT_PROG_GCJ], 9271521070a0Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9272521070a0Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9273521070a0Smrg [AC_CHECK_TOOL(GCJ, gcj,) 9274521070a0Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9275521070a0Smrg AC_SUBST(GCJFLAGS)])])[]dnl 927642d69509Smrg]) 927742d69509Smrg 9278521070a0Smrg# Old name: 9279521070a0SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9280521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9281521070a0Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 928242d69509Smrg 92834456fccdSmrg 9284521070a0Smrg# LT_PROG_RC 9285521070a0Smrg# ---------- 9286521070a0SmrgAC_DEFUN([LT_PROG_RC], 9287521070a0Smrg[AC_CHECK_TOOL(RC, windres,) 9288521070a0Smrg]) 92894456fccdSmrg 9290521070a0Smrg# Old name: 9291521070a0SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9292521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9293521070a0Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 92944456fccdSmrg 92954456fccdSmrg 9296521070a0Smrg# _LT_DECL_EGREP 9297521070a0Smrg# -------------- 9298521070a0Smrg# If we don't have a new enough Autoconf to choose the best grep 9299521070a0Smrg# available, choose the one first in the user's PATH. 9300521070a0Smrgm4_defun([_LT_DECL_EGREP], 9301521070a0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9302521070a0SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9303521070a0Smrgtest -z "$GREP" && GREP=grep 9304521070a0Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9305521070a0Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9306521070a0Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9307521070a0Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9308521070a0SmrgAC_SUBST([GREP]) 9309521070a0Smrg]) 93104456fccdSmrg 93114456fccdSmrg 9312521070a0Smrg# _LT_DECL_OBJDUMP 9313521070a0Smrg# -------------- 9314521070a0Smrg# If we don't have a new enough Autoconf to choose the best objdump 9315521070a0Smrg# available, choose the one first in the user's PATH. 9316521070a0Smrgm4_defun([_LT_DECL_OBJDUMP], 9317521070a0Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9318521070a0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9319521070a0Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9320521070a0SmrgAC_SUBST([OBJDUMP]) 9321521070a0Smrg]) 93224456fccdSmrg 93234456fccdSmrg 9324521070a0Smrg# _LT_DECL_SED 9325521070a0Smrg# ------------ 9326521070a0Smrg# Check for a fully-functional sed program, that truncates 9327521070a0Smrg# as few characters as possible. Prefer GNU sed if found. 9328521070a0Smrgm4_defun([_LT_DECL_SED], 9329521070a0Smrg[AC_PROG_SED 9330521070a0Smrgtest -z "$SED" && SED=sed 9331521070a0SmrgXsed="$SED -e 1s/^X//" 9332521070a0Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9333521070a0Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9334521070a0Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9335521070a0Smrg])# _LT_DECL_SED 9336521070a0Smrg 9337521070a0Smrgm4_ifndef([AC_PROG_SED], [ 9338521070a0Smrg# NOTE: This macro has been submitted for inclusion into # 9339521070a0Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9340521070a0Smrg# a released version of Autoconf we should remove this # 9341521070a0Smrg# macro and use it instead. # 9342521070a0Smrg 9343521070a0Smrgm4_defun([AC_PROG_SED], 9344521070a0Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9345521070a0SmrgAC_CACHE_VAL(lt_cv_path_SED, 9346521070a0Smrg[# Loop through the user's path and test for sed and gsed. 9347521070a0Smrg# Then use that list of sed's as ones to test for truncation. 9348521070a0Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9349521070a0Smrgfor as_dir in $PATH 9350521070a0Smrgdo 9351521070a0Smrg IFS=$as_save_IFS 9352521070a0Smrg test -z "$as_dir" && as_dir=. 9353521070a0Smrg for lt_ac_prog in sed gsed; do 9354521070a0Smrg for ac_exec_ext in '' $ac_executable_extensions; do 9355521070a0Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9356521070a0Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 935742d69509Smrg fi 9358521070a0Smrg done 9359521070a0Smrg done 9360521070a0Smrgdone 9361521070a0SmrgIFS=$as_save_IFS 9362521070a0Smrglt_ac_max=0 9363521070a0Smrglt_ac_count=0 9364521070a0Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9365521070a0Smrg# along with /bin/sed that truncates output. 9366521070a0Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9367521070a0Smrg test ! -f $lt_ac_sed && continue 9368521070a0Smrg cat /dev/null > conftest.in 9369521070a0Smrg lt_ac_count=0 9370521070a0Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9371521070a0Smrg # Check for GNU sed and select it if it is found. 9372521070a0Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9373521070a0Smrg lt_cv_path_SED=$lt_ac_sed 9374521070a0Smrg break 9375521070a0Smrg fi 9376521070a0Smrg while true; do 9377521070a0Smrg cat conftest.in conftest.in >conftest.tmp 9378521070a0Smrg mv conftest.tmp conftest.in 9379521070a0Smrg cp conftest.in conftest.nl 9380521070a0Smrg echo >>conftest.nl 9381521070a0Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9382521070a0Smrg cmp -s conftest.out conftest.nl || break 9383521070a0Smrg # 10000 chars as input seems more than enough 9384521070a0Smrg test $lt_ac_count -gt 10 && break 9385521070a0Smrg lt_ac_count=`expr $lt_ac_count + 1` 9386521070a0Smrg if test $lt_ac_count -gt $lt_ac_max; then 9387521070a0Smrg lt_ac_max=$lt_ac_count 9388521070a0Smrg lt_cv_path_SED=$lt_ac_sed 9389521070a0Smrg fi 9390521070a0Smrg done 9391521070a0Smrgdone 9392521070a0Smrg]) 9393521070a0SmrgSED=$lt_cv_path_SED 9394521070a0SmrgAC_SUBST([SED]) 9395521070a0SmrgAC_MSG_RESULT([$SED]) 9396521070a0Smrg])#AC_PROG_SED 9397521070a0Smrg])#m4_ifndef 9398521070a0Smrg 9399521070a0Smrg# Old name: 9400521070a0SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9401521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9402521070a0Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9403521070a0Smrg 9404521070a0Smrg 9405521070a0Smrg# _LT_CHECK_SHELL_FEATURES 9406521070a0Smrg# ------------------------ 9407521070a0Smrg# Find out whether the shell is Bourne or XSI compatible, 9408521070a0Smrg# or has some other useful features. 9409521070a0Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9410521070a0Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9411521070a0Smrg# Try some XSI features 9412521070a0Smrgxsi_shell=no 9413521070a0Smrg( _lt_dummy="a/b/c" 9414521070a0Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9415521070a0Smrg = c,a/b,, \ 9416521070a0Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9417521070a0Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9418521070a0Smrg && xsi_shell=yes 9419521070a0SmrgAC_MSG_RESULT([$xsi_shell]) 9420521070a0Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9421521070a0Smrg 9422521070a0SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9423521070a0Smrglt_shell_append=no 9424521070a0Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9425521070a0Smrg >/dev/null 2>&1 \ 9426521070a0Smrg && lt_shell_append=yes 9427521070a0SmrgAC_MSG_RESULT([$lt_shell_append]) 9428521070a0Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9429521070a0Smrg 9430521070a0Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9431521070a0Smrg lt_unset=unset 9432521070a0Smrgelse 9433521070a0Smrg lt_unset=false 9434521070a0Smrgfi 9435521070a0Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9436521070a0Smrg 9437521070a0Smrg# test EBCDIC or ASCII 9438521070a0Smrgcase `echo X|tr X '\101'` in 9439521070a0Smrg A) # ASCII based system 9440521070a0Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9441521070a0Smrg lt_SP2NL='tr \040 \012' 9442521070a0Smrg lt_NL2SP='tr \015\012 \040\040' 9443521070a0Smrg ;; 9444521070a0Smrg *) # EBCDIC based system 9445521070a0Smrg lt_SP2NL='tr \100 \n' 9446521070a0Smrg lt_NL2SP='tr \r\n \100\100' 9447521070a0Smrg ;; 9448521070a0Smrgesac 9449521070a0Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9450521070a0Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9451521070a0Smrg])# _LT_CHECK_SHELL_FEATURES 94524456fccdSmrg 94534456fccdSmrg 9454521070a0Smrg# _LT_PROG_XSI_SHELLFNS 9455521070a0Smrg# --------------------- 9456521070a0Smrg# Bourne and XSI compatible variants of some useful shell functions. 9457521070a0Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9458521070a0Smrg[case $xsi_shell in 9459521070a0Smrg yes) 9460521070a0Smrg cat << \_LT_EOF >> "$cfgfile" 9461521070a0Smrg 9462521070a0Smrg# func_dirname file append nondir_replacement 9463521070a0Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9464521070a0Smrg# otherwise set result to NONDIR_REPLACEMENT. 9465521070a0Smrgfunc_dirname () 9466521070a0Smrg{ 9467521070a0Smrg case ${1} in 9468521070a0Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9469521070a0Smrg * ) func_dirname_result="${3}" ;; 9470521070a0Smrg esac 9471521070a0Smrg} 94724456fccdSmrg 9473521070a0Smrg# func_basename file 9474521070a0Smrgfunc_basename () 9475521070a0Smrg{ 9476521070a0Smrg func_basename_result="${1##*/}" 9477521070a0Smrg} 94784456fccdSmrg 9479521070a0Smrg# func_dirname_and_basename file append nondir_replacement 9480521070a0Smrg# perform func_basename and func_dirname in a single function 9481521070a0Smrg# call: 9482521070a0Smrg# dirname: Compute the dirname of FILE. If nonempty, 9483521070a0Smrg# add APPEND to the result, otherwise set result 9484521070a0Smrg# to NONDIR_REPLACEMENT. 9485521070a0Smrg# value returned in "$func_dirname_result" 9486521070a0Smrg# basename: Compute filename of FILE. 9487521070a0Smrg# value retuned in "$func_basename_result" 9488521070a0Smrg# Implementation must be kept synchronized with func_dirname 9489521070a0Smrg# and func_basename. For efficiency, we do not delegate to 9490521070a0Smrg# those functions but instead duplicate the functionality here. 9491521070a0Smrgfunc_dirname_and_basename () 9492521070a0Smrg{ 9493521070a0Smrg case ${1} in 9494521070a0Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9495521070a0Smrg * ) func_dirname_result="${3}" ;; 9496521070a0Smrg esac 9497521070a0Smrg func_basename_result="${1##*/}" 9498521070a0Smrg} 94994456fccdSmrg 9500521070a0Smrg# func_stripname prefix suffix name 9501521070a0Smrg# strip PREFIX and SUFFIX off of NAME. 9502521070a0Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9503521070a0Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9504521070a0Smrg# dot (in which case that matches only a dot). 9505521070a0Smrgfunc_stripname () 9506521070a0Smrg{ 9507521070a0Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9508521070a0Smrg # positional parameters, so assign one to ordinary parameter first. 9509521070a0Smrg func_stripname_result=${3} 9510521070a0Smrg func_stripname_result=${func_stripname_result#"${1}"} 9511521070a0Smrg func_stripname_result=${func_stripname_result%"${2}"} 9512521070a0Smrg} 95134456fccdSmrg 9514521070a0Smrg# func_opt_split 9515521070a0Smrgfunc_opt_split () 9516521070a0Smrg{ 9517521070a0Smrg func_opt_split_opt=${1%%=*} 9518521070a0Smrg func_opt_split_arg=${1#*=} 9519521070a0Smrg} 95204456fccdSmrg 9521521070a0Smrg# func_lo2o object 9522521070a0Smrgfunc_lo2o () 9523521070a0Smrg{ 9524521070a0Smrg case ${1} in 9525521070a0Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9526521070a0Smrg *) func_lo2o_result=${1} ;; 9527521070a0Smrg esac 9528521070a0Smrg} 95294456fccdSmrg 9530521070a0Smrg# func_xform libobj-or-source 9531521070a0Smrgfunc_xform () 9532521070a0Smrg{ 9533521070a0Smrg func_xform_result=${1%.*}.lo 9534521070a0Smrg} 95354456fccdSmrg 9536521070a0Smrg# func_arith arithmetic-term... 9537521070a0Smrgfunc_arith () 9538521070a0Smrg{ 9539521070a0Smrg func_arith_result=$(( $[*] )) 9540521070a0Smrg} 9541521070a0Smrg 9542521070a0Smrg# func_len string 9543521070a0Smrg# STRING may not start with a hyphen. 9544521070a0Smrgfunc_len () 9545521070a0Smrg{ 9546521070a0Smrg func_len_result=${#1} 9547521070a0Smrg} 95484456fccdSmrg 954942d69509Smrg_LT_EOF 9550521070a0Smrg ;; 9551521070a0Smrg *) # Bourne compatible functions. 9552521070a0Smrg cat << \_LT_EOF >> "$cfgfile" 95534456fccdSmrg 9554521070a0Smrg# func_dirname file append nondir_replacement 9555521070a0Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9556521070a0Smrg# otherwise set result to NONDIR_REPLACEMENT. 9557521070a0Smrgfunc_dirname () 9558521070a0Smrg{ 9559521070a0Smrg # Extract subdirectory from the argument. 9560521070a0Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 9561521070a0Smrg if test "X$func_dirname_result" = "X${1}"; then 9562521070a0Smrg func_dirname_result="${3}" 9563521070a0Smrg else 9564521070a0Smrg func_dirname_result="$func_dirname_result${2}" 9565521070a0Smrg fi 9566521070a0Smrg} 95674456fccdSmrg 9568521070a0Smrg# func_basename file 9569521070a0Smrgfunc_basename () 9570521070a0Smrg{ 9571521070a0Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 9572521070a0Smrg} 95734456fccdSmrg 9574521070a0Smrgdnl func_dirname_and_basename 9575521070a0Smrgdnl A portable version of this function is already defined in general.m4sh 9576521070a0Smrgdnl so there is no need for it here. 9577521070a0Smrg 9578521070a0Smrg# func_stripname prefix suffix name 9579521070a0Smrg# strip PREFIX and SUFFIX off of NAME. 9580521070a0Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9581521070a0Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9582521070a0Smrg# dot (in which case that matches only a dot). 9583521070a0Smrg# func_strip_suffix prefix name 9584521070a0Smrgfunc_stripname () 9585521070a0Smrg{ 9586521070a0Smrg case ${2} in 9587521070a0Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 9588521070a0Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 9589521070a0Smrg *) func_stripname_result=`$ECHO "X${3}" \ 9590521070a0Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 9591521070a0Smrg esac 9592521070a0Smrg} 95934456fccdSmrg 9594521070a0Smrg# sed scripts: 9595521070a0Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9596521070a0Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 95974456fccdSmrg 9598521070a0Smrg# func_opt_split 9599521070a0Smrgfunc_opt_split () 9600521070a0Smrg{ 9601521070a0Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 9602521070a0Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 9603521070a0Smrg} 96044456fccdSmrg 9605521070a0Smrg# func_lo2o object 9606521070a0Smrgfunc_lo2o () 9607521070a0Smrg{ 9608521070a0Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 9609521070a0Smrg} 961042d69509Smrg 9611521070a0Smrg# func_xform libobj-or-source 9612521070a0Smrgfunc_xform () 9613521070a0Smrg{ 9614521070a0Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 9615521070a0Smrg} 96164456fccdSmrg 9617521070a0Smrg# func_arith arithmetic-term... 9618521070a0Smrgfunc_arith () 9619521070a0Smrg{ 9620521070a0Smrg func_arith_result=`expr "$[@]"` 9621521070a0Smrg} 962242d69509Smrg 9623521070a0Smrg# func_len string 9624521070a0Smrg# STRING may not start with a hyphen. 9625521070a0Smrgfunc_len () 9626521070a0Smrg{ 9627521070a0Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9628521070a0Smrg} 96294456fccdSmrg 9630521070a0Smrg_LT_EOF 9631521070a0Smrgesac 96324456fccdSmrg 9633521070a0Smrgcase $lt_shell_append in 9634521070a0Smrg yes) 9635521070a0Smrg cat << \_LT_EOF >> "$cfgfile" 96364456fccdSmrg 9637521070a0Smrg# func_append var value 9638521070a0Smrg# Append VALUE to the end of shell variable VAR. 9639521070a0Smrgfunc_append () 9640521070a0Smrg{ 9641521070a0Smrg eval "$[1]+=\$[2]" 9642521070a0Smrg} 9643521070a0Smrg_LT_EOF 9644521070a0Smrg ;; 9645521070a0Smrg *) 9646521070a0Smrg cat << \_LT_EOF >> "$cfgfile" 96474456fccdSmrg 9648521070a0Smrg# func_append var value 9649521070a0Smrg# Append VALUE to the end of shell variable VAR. 9650521070a0Smrgfunc_append () 9651521070a0Smrg{ 9652521070a0Smrg eval "$[1]=\$$[1]\$[2]" 9653521070a0Smrg} 96544456fccdSmrg 9655521070a0Smrg_LT_EOF 9656521070a0Smrg ;; 9657521070a0Smrg esac 9658521070a0Smrg]) 96594456fccdSmrg 9660521070a0Smrg# Helper functions for option handling. -*- Autoconf -*- 9661521070a0Smrg# 9662521070a0Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9663521070a0Smrg# Written by Gary V. Vaughan, 2004 9664521070a0Smrg# 9665521070a0Smrg# This file is free software; the Free Software Foundation gives 9666521070a0Smrg# unlimited permission to copy and/or distribute it, with or without 9667521070a0Smrg# modifications, as long as this notice is preserved. 96684456fccdSmrg 9669521070a0Smrg# serial 6 ltoptions.m4 96704456fccdSmrg 9671521070a0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9672521070a0SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9673521070a0Smrg 9674521070a0Smrg 9675521070a0Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9676521070a0Smrg# ------------------------------------------ 9677521070a0Smrgm4_define([_LT_MANGLE_OPTION], 9678521070a0Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9679521070a0Smrg 9680521070a0Smrg 9681521070a0Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9682521070a0Smrg# --------------------------------------- 9683521070a0Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9684521070a0Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9685521070a0Smrg# saved as a flag. 9686521070a0Smrgm4_define([_LT_SET_OPTION], 9687521070a0Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9688521070a0Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9689521070a0Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9690521070a0Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9691521070a0Smrg]) 9692521070a0Smrg 9693521070a0Smrg 9694521070a0Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9695521070a0Smrg# ------------------------------------------------------------ 9696521070a0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9697521070a0Smrgm4_define([_LT_IF_OPTION], 9698521070a0Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9699521070a0Smrg 9700521070a0Smrg 9701521070a0Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9702521070a0Smrg# ------------------------------------------------------- 9703521070a0Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9704521070a0Smrg# are set. 9705521070a0Smrgm4_define([_LT_UNLESS_OPTIONS], 9706521070a0Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9707521070a0Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9708521070a0Smrg [m4_define([$0_found])])])[]dnl 9709521070a0Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9710521070a0Smrg])[]dnl 9711521070a0Smrg]) 97124456fccdSmrg 97134456fccdSmrg 9714521070a0Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9715521070a0Smrg# ---------------------------------------- 9716521070a0Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9717521070a0Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9718521070a0Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9719521070a0Smrg# the unknown option and exit. 9720521070a0Smrgm4_defun([_LT_SET_OPTIONS], 9721521070a0Smrg[# Set options 9722521070a0Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9723521070a0Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9724521070a0Smrg 9725521070a0Smrgm4_if([$1],[LT_INIT],[ 9726521070a0Smrg dnl 9727521070a0Smrg dnl Simply set some default values (i.e off) if boolean options were not 9728521070a0Smrg dnl specified: 9729521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9730521070a0Smrg ]) 9731521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9732521070a0Smrg ]) 9733521070a0Smrg dnl 9734521070a0Smrg dnl If no reference was made to various pairs of opposing options, then 9735521070a0Smrg dnl we run the default mode handler for the pair. For example, if neither 9736521070a0Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9737521070a0Smrg dnl archives by default: 9738521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9739521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9740521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9741521070a0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9742521070a0Smrg [_LT_ENABLE_FAST_INSTALL]) 9743521070a0Smrg ]) 9744521070a0Smrg])# _LT_SET_OPTIONS 97454456fccdSmrg 974642d69509Smrg 974742d69509Smrg 9748521070a0Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9749521070a0Smrg# ----------------------------------------- 9750521070a0Smrgm4_define([_LT_MANGLE_DEFUN], 9751521070a0Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 97524456fccdSmrg 97534456fccdSmrg 9754521070a0Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9755521070a0Smrg# ----------------------------------------------- 9756521070a0Smrgm4_define([LT_OPTION_DEFINE], 9757521070a0Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9758521070a0Smrg])# LT_OPTION_DEFINE 97594456fccdSmrg 97604456fccdSmrg 9761521070a0Smrg# dlopen 9762521070a0Smrg# ------ 9763521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9764521070a0Smrg]) 97654456fccdSmrg 9766521070a0SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9767521070a0Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9768521070a0SmrgAC_DIAGNOSE([obsolete], 9769521070a0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9770521070a0Smrgput the `dlopen' option into LT_INIT's first parameter.]) 9771521070a0Smrg]) 97724456fccdSmrg 9773521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9774521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 97754456fccdSmrg 97764456fccdSmrg 9777521070a0Smrg# win32-dll 9778521070a0Smrg# --------- 9779521070a0Smrg# Declare package support for building win32 dll's. 9780521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9781521070a0Smrg[enable_win32_dll=yes 97824456fccdSmrg 9783521070a0Smrgcase $host in 9784521070a0Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 9785521070a0Smrg AC_CHECK_TOOL(AS, as, false) 9786521070a0Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9787521070a0Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9788521070a0Smrg ;; 9789521070a0Smrgesac 97904456fccdSmrg 9791521070a0Smrgtest -z "$AS" && AS=as 9792521070a0Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 97934456fccdSmrg 9794521070a0Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9795521070a0Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 97964456fccdSmrg 9797521070a0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9798521070a0Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 9799521070a0Smrg])# win32-dll 98004456fccdSmrg 9801521070a0SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9802521070a0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9803521070a0Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9804521070a0SmrgAC_DIAGNOSE([obsolete], 9805521070a0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9806521070a0Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 9807521070a0Smrg]) 98084456fccdSmrg 9809521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9810521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 981142d69509Smrg 98124456fccdSmrg 9813521070a0Smrg# _LT_ENABLE_SHARED([DEFAULT]) 9814521070a0Smrg# ---------------------------- 9815521070a0Smrg# implement the --enable-shared flag, and supports the `shared' and 9816521070a0Smrg# `disable-shared' LT_INIT options. 9817521070a0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9818521070a0Smrgm4_define([_LT_ENABLE_SHARED], 9819521070a0Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9820521070a0SmrgAC_ARG_ENABLE([shared], 9821521070a0Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9822521070a0Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9823521070a0Smrg [p=${PACKAGE-default} 9824521070a0Smrg case $enableval in 9825521070a0Smrg yes) enable_shared=yes ;; 9826521070a0Smrg no) enable_shared=no ;; 9827521070a0Smrg *) 9828521070a0Smrg enable_shared=no 9829521070a0Smrg # Look at the argument we got. We use all the common list separators. 9830521070a0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9831521070a0Smrg for pkg in $enableval; do 9832521070a0Smrg IFS="$lt_save_ifs" 9833521070a0Smrg if test "X$pkg" = "X$p"; then 9834521070a0Smrg enable_shared=yes 9835521070a0Smrg fi 9836521070a0Smrg done 9837521070a0Smrg IFS="$lt_save_ifs" 983842d69509Smrg ;; 9839521070a0Smrg esac], 9840521070a0Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 98414456fccdSmrg 9842521070a0Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9843521070a0Smrg [Whether or not to build shared libraries]) 9844521070a0Smrg])# _LT_ENABLE_SHARED 98454456fccdSmrg 9846521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9847521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 98484456fccdSmrg 9849521070a0Smrg# Old names: 9850521070a0SmrgAC_DEFUN([AC_ENABLE_SHARED], 9851521070a0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9852521070a0Smrg]) 98534456fccdSmrg 9854521070a0SmrgAC_DEFUN([AC_DISABLE_SHARED], 9855521070a0Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9856521070a0Smrg]) 98574456fccdSmrg 9858521070a0SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9859521070a0SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9860521070a0Smrg 9861521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9862521070a0Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9863521070a0Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 98644456fccdSmrg 98654456fccdSmrg 98664456fccdSmrg 9867521070a0Smrg# _LT_ENABLE_STATIC([DEFAULT]) 9868521070a0Smrg# ---------------------------- 9869521070a0Smrg# implement the --enable-static flag, and support the `static' and 9870521070a0Smrg# `disable-static' LT_INIT options. 9871521070a0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9872521070a0Smrgm4_define([_LT_ENABLE_STATIC], 9873521070a0Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9874521070a0SmrgAC_ARG_ENABLE([static], 9875521070a0Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9876521070a0Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9877521070a0Smrg [p=${PACKAGE-default} 9878521070a0Smrg case $enableval in 9879521070a0Smrg yes) enable_static=yes ;; 9880521070a0Smrg no) enable_static=no ;; 988142d69509Smrg *) 9882521070a0Smrg enable_static=no 9883521070a0Smrg # Look at the argument we got. We use all the common list separators. 9884521070a0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9885521070a0Smrg for pkg in $enableval; do 9886521070a0Smrg IFS="$lt_save_ifs" 9887521070a0Smrg if test "X$pkg" = "X$p"; then 9888521070a0Smrg enable_static=yes 9889521070a0Smrg fi 9890521070a0Smrg done 9891521070a0Smrg IFS="$lt_save_ifs" 989242d69509Smrg ;; 9893521070a0Smrg esac], 9894521070a0Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 98954456fccdSmrg 9896521070a0Smrg _LT_DECL([build_old_libs], [enable_static], [0], 9897521070a0Smrg [Whether or not to build static libraries]) 9898521070a0Smrg])# _LT_ENABLE_STATIC 98994456fccdSmrg 9900521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9901521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 99024456fccdSmrg 9903521070a0Smrg# Old names: 9904521070a0SmrgAC_DEFUN([AC_ENABLE_STATIC], 9905521070a0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9906521070a0Smrg]) 99074456fccdSmrg 9908521070a0SmrgAC_DEFUN([AC_DISABLE_STATIC], 9909521070a0Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9910521070a0Smrg]) 9911521070a0Smrg 9912521070a0SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9913521070a0SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9914521070a0Smrg 9915521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9916521070a0Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9917521070a0Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 99184456fccdSmrg 99194456fccdSmrg 99204456fccdSmrg 9921521070a0Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9922521070a0Smrg# ---------------------------------- 9923521070a0Smrg# implement the --enable-fast-install flag, and support the `fast-install' 9924521070a0Smrg# and `disable-fast-install' LT_INIT options. 9925521070a0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9926521070a0Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 9927521070a0Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9928521070a0SmrgAC_ARG_ENABLE([fast-install], 9929521070a0Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9930521070a0Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9931521070a0Smrg [p=${PACKAGE-default} 9932521070a0Smrg case $enableval in 9933521070a0Smrg yes) enable_fast_install=yes ;; 9934521070a0Smrg no) enable_fast_install=no ;; 9935521070a0Smrg *) 9936521070a0Smrg enable_fast_install=no 9937521070a0Smrg # Look at the argument we got. We use all the common list separators. 9938521070a0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9939521070a0Smrg for pkg in $enableval; do 9940521070a0Smrg IFS="$lt_save_ifs" 9941521070a0Smrg if test "X$pkg" = "X$p"; then 9942521070a0Smrg enable_fast_install=yes 9943521070a0Smrg fi 9944521070a0Smrg done 9945521070a0Smrg IFS="$lt_save_ifs" 9946521070a0Smrg ;; 9947521070a0Smrg esac], 9948521070a0Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9949521070a0Smrg 9950521070a0Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 9951521070a0Smrg [Whether or not to optimize for fast installation])dnl 9952521070a0Smrg])# _LT_ENABLE_FAST_INSTALL 9953521070a0Smrg 9954521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9955521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 99564456fccdSmrg 9957521070a0Smrg# Old names: 9958521070a0SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9959521070a0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9960521070a0SmrgAC_DIAGNOSE([obsolete], 9961521070a0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9962521070a0Smrgthe `fast-install' option into LT_INIT's first parameter.]) 99634456fccdSmrg]) 99644456fccdSmrg 9965521070a0SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9966521070a0Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9967521070a0SmrgAC_DIAGNOSE([obsolete], 9968521070a0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9969521070a0Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 997042d69509Smrg]) 99714456fccdSmrg 9972521070a0Smrgdnl aclocal-1.4 backwards compatibility: 9973521070a0Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9974521070a0Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 99754456fccdSmrg 99764456fccdSmrg 9977521070a0Smrg# _LT_WITH_PIC([MODE]) 9978521070a0Smrg# -------------------- 9979521070a0Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9980521070a0Smrg# LT_INIT options. 9981521070a0Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9982521070a0Smrgm4_define([_LT_WITH_PIC], 9983521070a0Smrg[AC_ARG_WITH([pic], 9984521070a0Smrg [AS_HELP_STRING([--with-pic], 9985521070a0Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9986521070a0Smrg [pic_mode="$withval"], 9987521070a0Smrg [pic_mode=default]) 99884456fccdSmrg 9989521070a0Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 999042d69509Smrg 9991521070a0Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9992521070a0Smrg])# _LT_WITH_PIC 9993521070a0Smrg 9994521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9995521070a0SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9996521070a0Smrg 9997521070a0Smrg# Old name: 9998521070a0SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 9999521070a0Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10000521070a0SmrgAC_DIAGNOSE([obsolete], 10001521070a0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10002521070a0Smrgput the `pic-only' option into LT_INIT's first parameter.]) 1000342d69509Smrg]) 100044456fccdSmrg 10005521070a0Smrgdnl aclocal-1.4 backwards compatibility: 10006521070a0Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 100074456fccdSmrg 100084456fccdSmrg 10009521070a0Smrgm4_define([_LTDL_MODE], []) 10010521070a0SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10011521070a0Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10012521070a0SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10013521070a0Smrg [m4_define([_LTDL_MODE], [recursive])]) 10014521070a0SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10015521070a0Smrg [m4_define([_LTDL_MODE], [subproject])]) 10016521070a0Smrg 10017521070a0Smrgm4_define([_LTDL_TYPE], []) 10018521070a0SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10019521070a0Smrg [m4_define([_LTDL_TYPE], [installable])]) 10020521070a0SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10021521070a0Smrg [m4_define([_LTDL_TYPE], [convenience])]) 10022521070a0Smrg 10023521070a0Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1002442d69509Smrg# 10025521070a0Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10026521070a0Smrg# Written by Gary V. Vaughan, 2004 1002742d69509Smrg# 10028521070a0Smrg# This file is free software; the Free Software Foundation gives 10029521070a0Smrg# unlimited permission to copy and/or distribute it, with or without 10030521070a0Smrg# modifications, as long as this notice is preserved. 100314456fccdSmrg 10032521070a0Smrg# serial 6 ltsugar.m4 100334456fccdSmrg 10034521070a0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10035521070a0SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 100364456fccdSmrg 10037521070a0Smrg 10038521070a0Smrg# lt_join(SEP, ARG1, [ARG2...]) 1003942d69509Smrg# ----------------------------- 10040521070a0Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10041521070a0Smrg# associated separator. 10042521070a0Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10043521070a0Smrg# versions in m4sugar had bugs. 10044521070a0Smrgm4_define([lt_join], 10045521070a0Smrg[m4_if([$#], [1], [], 10046521070a0Smrg [$#], [2], [[$2]], 10047521070a0Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10048521070a0Smrgm4_define([_lt_join], 10049521070a0Smrg[m4_if([$#$2], [2], [], 10050521070a0Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10051521070a0Smrg 10052521070a0Smrg 10053521070a0Smrg# lt_car(LIST) 10054521070a0Smrg# lt_cdr(LIST) 10055521070a0Smrg# ------------ 10056521070a0Smrg# Manipulate m4 lists. 10057521070a0Smrg# These macros are necessary as long as will still need to support 10058521070a0Smrg# Autoconf-2.59 which quotes differently. 10059521070a0Smrgm4_define([lt_car], [[$1]]) 10060521070a0Smrgm4_define([lt_cdr], 10061521070a0Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10062521070a0Smrg [$#], 1, [], 10063521070a0Smrg [m4_dquote(m4_shift($@))])]) 10064521070a0Smrgm4_define([lt_unquote], $1) 10065521070a0Smrg 10066521070a0Smrg 10067521070a0Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10068521070a0Smrg# ------------------------------------------ 10069521070a0Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10070521070a0Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10071521070a0Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10072521070a0Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10073521070a0Smrg# than defined and empty). 10074521070a0Smrg# 10075521070a0Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10076521070a0Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10077521070a0Smrgm4_define([lt_append], 10078521070a0Smrg[m4_define([$1], 10079521070a0Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10080521070a0Smrg 10081521070a0Smrg 10082521070a0Smrg 10083521070a0Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10084521070a0Smrg# ---------------------------------------------------------- 10085521070a0Smrg# Produce a SEP delimited list of all paired combinations of elements of 10086521070a0Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10087521070a0Smrg# has the form PREFIXmINFIXSUFFIXn. 10088521070a0Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10089521070a0Smrgm4_define([lt_combine], 10090521070a0Smrg[m4_if(m4_eval([$# > 3]), [1], 10091521070a0Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10092521070a0Smrg[[m4_foreach([_Lt_prefix], [$2], 10093521070a0Smrg [m4_foreach([_Lt_suffix], 10094521070a0Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10095521070a0Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10096521070a0Smrg 10097521070a0Smrg 10098521070a0Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10099521070a0Smrg# ----------------------------------------------------------------------- 10100521070a0Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10101521070a0Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10102521070a0Smrgm4_define([lt_if_append_uniq], 10103521070a0Smrg[m4_ifdef([$1], 10104521070a0Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10105521070a0Smrg [lt_append([$1], [$2], [$3])$4], 10106521070a0Smrg [$5])], 10107521070a0Smrg [lt_append([$1], [$2], [$3])$4])]) 10108521070a0Smrg 10109521070a0Smrg 10110521070a0Smrg# lt_dict_add(DICT, KEY, VALUE) 10111521070a0Smrg# ----------------------------- 10112521070a0Smrgm4_define([lt_dict_add], 10113521070a0Smrg[m4_define([$1($2)], [$3])]) 101144456fccdSmrg 101154456fccdSmrg 10116521070a0Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10117521070a0Smrg# -------------------------------------------- 10118521070a0Smrgm4_define([lt_dict_add_subkey], 10119521070a0Smrg[m4_define([$1($2:$3)], [$4])]) 101204456fccdSmrg 101214456fccdSmrg 10122521070a0Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10123521070a0Smrg# ---------------------------------- 10124521070a0Smrgm4_define([lt_dict_fetch], 10125521070a0Smrg[m4_ifval([$3], 10126521070a0Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10127521070a0Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 101284456fccdSmrg 101294456fccdSmrg 10130521070a0Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10131521070a0Smrg# ----------------------------------------------------------------- 10132521070a0Smrgm4_define([lt_if_dict_fetch], 10133521070a0Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10134521070a0Smrg [$5], 10135521070a0Smrg [$6])]) 101364456fccdSmrg 101374456fccdSmrg 10138521070a0Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10139521070a0Smrg# -------------------------------------------------------------- 10140521070a0Smrgm4_define([lt_dict_filter], 10141521070a0Smrg[m4_if([$5], [], [], 10142521070a0Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10143521070a0Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10144521070a0Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10145521070a0Smrg]) 101464456fccdSmrg 10147521070a0Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10148521070a0Smrg# 10149521070a0Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 10150521070a0Smrg# Written by Scott James Remnant, 2004 10151521070a0Smrg# 10152521070a0Smrg# This file is free software; the Free Software Foundation gives 10153521070a0Smrg# unlimited permission to copy and/or distribute it, with or without 10154521070a0Smrg# modifications, as long as this notice is preserved. 101554456fccdSmrg 10156521070a0Smrg# Generated from ltversion.in. 101574456fccdSmrg 10158521070a0Smrg# serial 3017 ltversion.m4 10159521070a0Smrg# This file is part of GNU Libtool 101604456fccdSmrg 10161521070a0Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 10162521070a0Smrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 10163521070a0Smrg 10164521070a0SmrgAC_DEFUN([LTVERSION_VERSION], 10165521070a0Smrg[macro_version='2.2.6b' 10166521070a0Smrgmacro_revision='1.3017' 10167521070a0Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10168521070a0Smrg_LT_DECL(, macro_revision, 0) 10169521070a0Smrg]) 10170521070a0Smrg 10171521070a0Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10172521070a0Smrg# 10173521070a0Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 10174521070a0Smrg# Written by Scott James Remnant, 2004. 10175521070a0Smrg# 10176521070a0Smrg# This file is free software; the Free Software Foundation gives 10177521070a0Smrg# unlimited permission to copy and/or distribute it, with or without 10178521070a0Smrg# modifications, as long as this notice is preserved. 10179521070a0Smrg 10180521070a0Smrg# serial 4 lt~obsolete.m4 10181521070a0Smrg 10182521070a0Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 10183521070a0Smrg# 10184521070a0Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10185521070a0Smrg# which have later been changed to m4_define as they aren't part of the 10186521070a0Smrg# exported API, or moved to Autoconf or Automake where they belong. 10187521070a0Smrg# 10188521070a0Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10189521070a0Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10190521070a0Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 10191521070a0Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10192521070a0Smrg# and doesn't know about Autoconf macros at all.) 10193521070a0Smrg# 10194521070a0Smrg# So we provide this file, which has a silly filename so it's always 10195521070a0Smrg# included after everything else. This provides aclocal with the 10196521070a0Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10197521070a0Smrg# because those macros already exist, or will be overwritten later. 10198521070a0Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10199521070a0Smrg# 10200521070a0Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10201521070a0Smrg# Yes, that means every name once taken will need to remain here until 10202521070a0Smrg# we give up compatibility with versions before 1.7, at which point 10203521070a0Smrg# we need to keep only those names which we still refer to. 10204521070a0Smrg 10205521070a0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10206521070a0SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10207521070a0Smrg 10208521070a0Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10209521070a0Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10210521070a0Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10211521070a0Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10212521070a0Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10213521070a0Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10214521070a0Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10215521070a0Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10216521070a0Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10217521070a0Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10218521070a0Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10219521070a0Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10220521070a0Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10221521070a0Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10222521070a0Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10223521070a0Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10224521070a0Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10225521070a0Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10226521070a0Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10227521070a0Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10228521070a0Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10229521070a0Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10230521070a0Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10231521070a0Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10232521070a0Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10233521070a0Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10234521070a0Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10235521070a0Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10236521070a0Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10237521070a0Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10238521070a0Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10239521070a0Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10240521070a0Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10241521070a0Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10242521070a0Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10243521070a0Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10244521070a0Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10245521070a0Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10246521070a0Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10247521070a0Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10248521070a0Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10249521070a0Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10250521070a0Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 10251521070a0Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10252521070a0Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10253521070a0Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10254521070a0Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10255521070a0Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10256521070a0Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10257521070a0Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10258521070a0Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10259521070a0Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10260521070a0Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10261521070a0Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10262521070a0Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 102634456fccdSmrg 10264