aclocal.m4 revision 4e7590ef
14e7590efSmrg# generated automatically by aclocal 1.11.2 -*- Autoconf -*- 24b0ead49Smrg 34b0ead49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 44e7590efSmrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 54e7590efSmrg# Inc. 64b0ead49Smrg# This file is free software; the Free Software Foundation 74b0ead49Smrg# gives unlimited permission to copy and/or distribute it, 84b0ead49Smrg# with or without modifications, as long as this notice is preserved. 94b0ead49Smrg 104b0ead49Smrg# This program is distributed in the hope that it will be useful, 114b0ead49Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 124b0ead49Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 134b0ead49Smrg# PARTICULAR PURPOSE. 144b0ead49Smrg 1552b01e16Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1652b01e16Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 177aa89044Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 187aa89044Smrg[m4_warning([this file was generated for autoconf 2.68. 1952b01e16SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2052b01e16SmrgIf you have problems, you may need to regenerate the build system entirely. 2152b01e16SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 224b0ead49Smrg 234e7590efSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 244e7590efSmrg# Foundation, Inc. 2552b01e16Smrg# 2652b01e16Smrg# This file is free software; the Free Software Foundation 2752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 2852b01e16Smrg# with or without modifications, as long as this notice is preserved. 294b0ead49Smrg 304e7590efSmrg# serial 1 314e7590efSmrg 3252b01e16Smrg# AM_AUTOMAKE_VERSION(VERSION) 3352b01e16Smrg# ---------------------------- 3452b01e16Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3552b01e16Smrg# generated from the m4 files accompanying Automake X.Y. 3652b01e16Smrg# (This private macro should not be called outside this file.) 3752b01e16SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3852b01e16Smrg[am__api_version='1.11' 3952b01e16Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 4052b01e16Smrgdnl require some minimum version. Point them to the right macro. 414e7590efSmrgm4_if([$1], [1.11.2], [], 4252b01e16Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4352b01e16Smrg]) 444b0ead49Smrg 4552b01e16Smrg# _AM_AUTOCONF_VERSION(VERSION) 4652b01e16Smrg# ----------------------------- 4752b01e16Smrg# aclocal traces this macro to find the Autoconf version. 4852b01e16Smrg# This is a private macro too. Using m4_define simplifies 4952b01e16Smrg# the logic in aclocal, which can simply ignore this definition. 5052b01e16Smrgm4_define([_AM_AUTOCONF_VERSION], []) 514b0ead49Smrg 5252b01e16Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5352b01e16Smrg# ------------------------------- 5452b01e16Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5552b01e16Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5652b01e16SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 574e7590efSmrg[AM_AUTOMAKE_VERSION([1.11.2])dnl 5852b01e16Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5952b01e16Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 6052b01e16Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 614b0ead49Smrg 6252b01e16Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 634b0ead49Smrg 644e7590efSmrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 6552b01e16Smrg# 6652b01e16Smrg# This file is free software; the Free Software Foundation 6752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 6852b01e16Smrg# with or without modifications, as long as this notice is preserved. 694b0ead49Smrg 704e7590efSmrg# serial 1 714e7590efSmrg 7252b01e16Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 7352b01e16Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 7452b01e16Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 7552b01e16Smrg# 7652b01e16Smrg# Of course, Automake must honor this variable whenever it calls a 7752b01e16Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7852b01e16Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7952b01e16Smrg# depending on how configure is run. This is pretty annoying, since 8052b01e16Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8152b01e16Smrg# source directory, any form will work fine, but in subdirectories a 8252b01e16Smrg# relative path needs to be adjusted first. 8352b01e16Smrg# 8452b01e16Smrg# $ac_aux_dir/missing 8552b01e16Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8652b01e16Smrg# $top_srcdir/$ac_aux_dir/missing 8752b01e16Smrg# fails if $ac_aux_dir is absolute, 8852b01e16Smrg# fails when called from a subdirectory in a VPATH build with 8952b01e16Smrg# a relative $ac_aux_dir 9052b01e16Smrg# 9152b01e16Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 9252b01e16Smrg# are both prefixed by $srcdir. In an in-source build this is usually 9352b01e16Smrg# harmless because $srcdir is `.', but things will broke when you 9452b01e16Smrg# start a VPATH build or use an absolute $srcdir. 9552b01e16Smrg# 9652b01e16Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9752b01e16Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9852b01e16Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9952b01e16Smrg# and then we would define $MISSING as 10052b01e16Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 10152b01e16Smrg# This will work as long as MISSING is not called from configure, because 10252b01e16Smrg# unfortunately $(top_srcdir) has no meaning in configure. 10352b01e16Smrg# However there are other variables, like CC, which are often used in 10452b01e16Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10552b01e16Smrg# 10652b01e16Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10752b01e16Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10852b01e16Smrg# configured tree to be moved without reconfiguration. 1094b0ead49Smrg 11052b01e16SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11152b01e16Smrg[dnl Rely on autoconf to set up CDPATH properly. 11252b01e16SmrgAC_PREREQ([2.50])dnl 11352b01e16Smrg# expand $ac_aux_dir to an absolute path 11452b01e16Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 11552b01e16Smrg]) 1164b0ead49Smrg 11752b01e16Smrg# AM_CONDITIONAL -*- Autoconf -*- 1184b0ead49Smrg 11952b01e16Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 12052b01e16Smrg# Free Software Foundation, Inc. 12152b01e16Smrg# 12252b01e16Smrg# This file is free software; the Free Software Foundation 12352b01e16Smrg# gives unlimited permission to copy and/or distribute it, 12452b01e16Smrg# with or without modifications, as long as this notice is preserved. 1254b0ead49Smrg 12652b01e16Smrg# serial 9 1274b0ead49Smrg 12852b01e16Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12952b01e16Smrg# ------------------------------------- 13052b01e16Smrg# Define a conditional. 13152b01e16SmrgAC_DEFUN([AM_CONDITIONAL], 13252b01e16Smrg[AC_PREREQ(2.52)dnl 13352b01e16Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 13452b01e16Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 13552b01e16SmrgAC_SUBST([$1_TRUE])dnl 13652b01e16SmrgAC_SUBST([$1_FALSE])dnl 13752b01e16Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13852b01e16Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13952b01e16Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 14052b01e16Smrgif $2; then 14152b01e16Smrg $1_TRUE= 14252b01e16Smrg $1_FALSE='#' 14352b01e16Smrgelse 14452b01e16Smrg $1_TRUE='#' 14552b01e16Smrg $1_FALSE= 14652b01e16Smrgfi 14752b01e16SmrgAC_CONFIG_COMMANDS_PRE( 14852b01e16Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14952b01e16Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 15052b01e16SmrgUsually this means the macro was only invoked conditionally.]]) 15152b01e16Smrgfi])]) 1524b0ead49Smrg 1534e7590efSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 1544e7590efSmrg# 2010, 2011 Free Software Foundation, Inc. 15552b01e16Smrg# 15652b01e16Smrg# This file is free software; the Free Software Foundation 15752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 15852b01e16Smrg# with or without modifications, as long as this notice is preserved. 1594b0ead49Smrg 1604e7590efSmrg# serial 12 1614b0ead49Smrg 16252b01e16Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 16352b01e16Smrg# written in clear, in which case automake, when reading aclocal.m4, 16452b01e16Smrg# will think it sees a *use*, and therefore will trigger all it's 16552b01e16Smrg# C support machinery. Also note that it means that autoscan, seeing 16652b01e16Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1674b0ead49Smrg 1684b0ead49Smrg 16952b01e16Smrg# _AM_DEPENDENCIES(NAME) 17052b01e16Smrg# ---------------------- 17152b01e16Smrg# See how the compiler implements dependency checking. 17252b01e16Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 17352b01e16Smrg# We try a few techniques and use that to set a single cache variable. 17452b01e16Smrg# 17552b01e16Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17652b01e16Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17752b01e16Smrg# dependency, and given that the user is not expected to run this macro, 17852b01e16Smrg# just rely on AC_PROG_CC. 17952b01e16SmrgAC_DEFUN([_AM_DEPENDENCIES], 18052b01e16Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 18152b01e16SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 18252b01e16SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 18352b01e16SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1844b0ead49Smrg 18552b01e16Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18652b01e16Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18752b01e16Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18852b01e16Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18952b01e16Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 19052b01e16Smrg [depcc="$$1" am_compiler_list=]) 1914b0ead49Smrg 19252b01e16SmrgAC_CACHE_CHECK([dependency style of $depcc], 19352b01e16Smrg [am_cv_$1_dependencies_compiler_type], 19452b01e16Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 19552b01e16Smrg # We make a subdir and do the tests there. Otherwise we can end up 19652b01e16Smrg # making bogus files that we don't know about and never remove. For 19752b01e16Smrg # instance it was reported that on HP-UX the gcc test will end up 19852b01e16Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19952b01e16Smrg # in D'. 2004e7590efSmrg rm -rf conftest.dir 20152b01e16Smrg mkdir conftest.dir 20252b01e16Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 20352b01e16Smrg # using a relative directory. 20452b01e16Smrg cp "$am_depcomp" conftest.dir 20552b01e16Smrg cd conftest.dir 20652b01e16Smrg # We will build objects and dependencies in a subdirectory because 20752b01e16Smrg # it helps to detect inapplicable dependency modes. For instance 20852b01e16Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20952b01e16Smrg # side effect of compilation, but ICC will put the dependencies in 21052b01e16Smrg # the current directory while Tru64 will put them in the object 21152b01e16Smrg # directory. 21252b01e16Smrg mkdir sub 2134b0ead49Smrg 21452b01e16Smrg am_cv_$1_dependencies_compiler_type=none 21552b01e16Smrg if test "$am_compiler_list" = ""; then 21652b01e16Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21752b01e16Smrg fi 21852b01e16Smrg am__universal=false 21952b01e16Smrg m4_case([$1], [CC], 22052b01e16Smrg [case " $depcc " in #( 22152b01e16Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 22252b01e16Smrg esac], 22352b01e16Smrg [CXX], 22452b01e16Smrg [case " $depcc " in #( 22552b01e16Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 22652b01e16Smrg esac]) 2274b0ead49Smrg 22852b01e16Smrg for depmode in $am_compiler_list; do 22952b01e16Smrg # Setup a source with many dependencies, because some compilers 23052b01e16Smrg # like to wrap large dependency lists on column 80 (with \), and 23152b01e16Smrg # we should not choose a depcomp mode which is confused by this. 23252b01e16Smrg # 23352b01e16Smrg # We need to recreate these files for each test, as the compiler may 23452b01e16Smrg # overwrite some of them when testing with obscure command lines. 23552b01e16Smrg # This happens at least with the AIX C compiler. 23652b01e16Smrg : > sub/conftest.c 23752b01e16Smrg for i in 1 2 3 4 5 6; do 23852b01e16Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23952b01e16Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 24052b01e16Smrg # Solaris 8's {/usr,}/bin/sh. 24152b01e16Smrg touch sub/conftst$i.h 24252b01e16Smrg done 24352b01e16Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2444b0ead49Smrg 24552b01e16Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 24652b01e16Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24752b01e16Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24852b01e16Smrg # versions had trouble with output in subdirs 24952b01e16Smrg am__obj=sub/conftest.${OBJEXT-o} 25052b01e16Smrg am__minus_obj="-o $am__obj" 25152b01e16Smrg case $depmode in 25252b01e16Smrg gcc) 25352b01e16Smrg # This depmode causes a compiler race in universal mode. 25452b01e16Smrg test "$am__universal" = false || continue 25552b01e16Smrg ;; 25652b01e16Smrg nosideeffect) 25752b01e16Smrg # after this tag, mechanisms are not by side-effect, so they'll 25852b01e16Smrg # only be used when explicitly requested 25952b01e16Smrg if test "x$enable_dependency_tracking" = xyes; then 26052b01e16Smrg continue 26152b01e16Smrg else 26252b01e16Smrg break 26352b01e16Smrg fi 26452b01e16Smrg ;; 2654e7590efSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 26652b01e16Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26752b01e16Smrg # not run yet. These depmodes are late enough in the game, and 26852b01e16Smrg # so weak that their functioning should not be impacted. 26952b01e16Smrg am__obj=conftest.${OBJEXT-o} 27052b01e16Smrg am__minus_obj= 27152b01e16Smrg ;; 27252b01e16Smrg none) break ;; 27352b01e16Smrg esac 27452b01e16Smrg if depmode=$depmode \ 27552b01e16Smrg source=sub/conftest.c object=$am__obj \ 27652b01e16Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27752b01e16Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27852b01e16Smrg >/dev/null 2>conftest.err && 27952b01e16Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 28052b01e16Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 28152b01e16Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 28252b01e16Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 28352b01e16Smrg # icc doesn't choke on unknown options, it will just issue warnings 28452b01e16Smrg # or remarks (even with -Werror). So we grep stderr for any message 28552b01e16Smrg # that says an option was ignored or not supported. 28652b01e16Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28752b01e16Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28852b01e16Smrg # The diagnosis changed in icc 8.0: 28952b01e16Smrg # icc: Command line remark: option '-MP' not supported 29052b01e16Smrg if (grep 'ignoring option' conftest.err || 29152b01e16Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 29252b01e16Smrg am_cv_$1_dependencies_compiler_type=$depmode 29352b01e16Smrg break 29452b01e16Smrg fi 29552b01e16Smrg fi 29652b01e16Smrg done 2974b0ead49Smrg 29852b01e16Smrg cd .. 29952b01e16Smrg rm -rf conftest.dir 30052b01e16Smrgelse 30152b01e16Smrg am_cv_$1_dependencies_compiler_type=none 3024b0ead49Smrgfi 30352b01e16Smrg]) 30452b01e16SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 30552b01e16SmrgAM_CONDITIONAL([am__fastdep$1], [ 30652b01e16Smrg test "x$enable_dependency_tracking" != xno \ 30752b01e16Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30852b01e16Smrg]) 3094b0ead49Smrg 3104b0ead49Smrg 31152b01e16Smrg# AM_SET_DEPDIR 31252b01e16Smrg# ------------- 31352b01e16Smrg# Choose a directory name for dependency files. 31452b01e16Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 31552b01e16SmrgAC_DEFUN([AM_SET_DEPDIR], 31652b01e16Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31752b01e16SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31852b01e16Smrg]) 3194b0ead49Smrg 3204b0ead49Smrg 32152b01e16Smrg# AM_DEP_TRACK 32252b01e16Smrg# ------------ 32352b01e16SmrgAC_DEFUN([AM_DEP_TRACK], 32452b01e16Smrg[AC_ARG_ENABLE(dependency-tracking, 32552b01e16Smrg[ --disable-dependency-tracking speeds up one-time build 32652b01e16Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32752b01e16Smrgif test "x$enable_dependency_tracking" != xno; then 32852b01e16Smrg am_depcomp="$ac_aux_dir/depcomp" 32952b01e16Smrg AMDEPBACKSLASH='\' 3304e7590efSmrg am__nodep='_no' 33152b01e16Smrgfi 33252b01e16SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 33352b01e16SmrgAC_SUBST([AMDEPBACKSLASH])dnl 33452b01e16Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3354e7590efSmrgAC_SUBST([am__nodep])dnl 3364e7590efSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33752b01e16Smrg]) 3384b0ead49Smrg 33952b01e16Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3404b0ead49Smrg 34152b01e16Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 34252b01e16Smrg# Free Software Foundation, Inc. 34352b01e16Smrg# 34452b01e16Smrg# This file is free software; the Free Software Foundation 34552b01e16Smrg# gives unlimited permission to copy and/or distribute it, 34652b01e16Smrg# with or without modifications, as long as this notice is preserved. 3474b0ead49Smrg 34852b01e16Smrg#serial 5 3494b0ead49Smrg 35052b01e16Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 35152b01e16Smrg# ------------------------------ 35252b01e16SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 35352b01e16Smrg[{ 35452b01e16Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 35552b01e16Smrg # are listed without --file. Let's play safe and only enable the eval 35652b01e16Smrg # if we detect the quoting. 35752b01e16Smrg case $CONFIG_FILES in 35852b01e16Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35952b01e16Smrg *) set x $CONFIG_FILES ;; 36052b01e16Smrg esac 36152b01e16Smrg shift 36252b01e16Smrg for mf 36352b01e16Smrg do 36452b01e16Smrg # Strip MF so we end up with the name of the file. 36552b01e16Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 36652b01e16Smrg # Check whether this is an Automake generated Makefile or not. 36752b01e16Smrg # We used to match only the files named `Makefile.in', but 36852b01e16Smrg # some people rename them; so instead we look at the file content. 36952b01e16Smrg # Grep'ing the first line is not enough: some people post-process 37052b01e16Smrg # each Makefile.in and add a new line on top of each file to say so. 37152b01e16Smrg # Grep'ing the whole file is not good either: AIX grep has a line 37252b01e16Smrg # limit of 2048, but all sed's we know have understand at least 4000. 37352b01e16Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 37452b01e16Smrg dirpart=`AS_DIRNAME("$mf")` 37552b01e16Smrg else 37652b01e16Smrg continue 37752b01e16Smrg fi 37852b01e16Smrg # Extract the definition of DEPDIR, am__include, and am__quote 37952b01e16Smrg # from the Makefile without running `make'. 38052b01e16Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 38152b01e16Smrg test -z "$DEPDIR" && continue 38252b01e16Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 38352b01e16Smrg test -z "am__include" && continue 38452b01e16Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 38552b01e16Smrg # When using ansi2knr, U may be empty or an underscore; expand it 38652b01e16Smrg U=`sed -n 's/^U = //p' < "$mf"` 38752b01e16Smrg # Find all dependency output files, they are included files with 38852b01e16Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 38952b01e16Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 39052b01e16Smrg # expansion. 39152b01e16Smrg for file in `sed -n " 39252b01e16Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 39352b01e16Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 39452b01e16Smrg # Make sure the directory exists. 39552b01e16Smrg test -f "$dirpart/$file" && continue 39652b01e16Smrg fdir=`AS_DIRNAME(["$file"])` 39752b01e16Smrg AS_MKDIR_P([$dirpart/$fdir]) 39852b01e16Smrg # echo "creating $dirpart/$file" 39952b01e16Smrg echo '# dummy' > "$dirpart/$file" 40052b01e16Smrg done 40152b01e16Smrg done 40252b01e16Smrg} 40352b01e16Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 4044b0ead49Smrg 4054b0ead49Smrg 40652b01e16Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 40752b01e16Smrg# ----------------------------- 40852b01e16Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 40952b01e16Smrg# 41052b01e16Smrg# This code is only required when automatic dependency tracking 41152b01e16Smrg# is enabled. FIXME. This creates each `.P' file that we will 41252b01e16Smrg# need in order to bootstrap the dependency handling code. 41352b01e16SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 41452b01e16Smrg[AC_CONFIG_COMMANDS([depfiles], 41552b01e16Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 41652b01e16Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4174b0ead49Smrg]) 4184b0ead49Smrg 41952b01e16Smrg# Do all the work for Automake. -*- Autoconf -*- 4204b0ead49Smrg 42152b01e16Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42252b01e16Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42352b01e16Smrg# 42452b01e16Smrg# This file is free software; the Free Software Foundation 42552b01e16Smrg# gives unlimited permission to copy and/or distribute it, 42652b01e16Smrg# with or without modifications, as long as this notice is preserved. 4274b0ead49Smrg 42852b01e16Smrg# serial 16 4294b0ead49Smrg 43052b01e16Smrg# This macro actually does too much. Some checks are only needed if 43152b01e16Smrg# your package does certain things. But this isn't really a big deal. 4324b0ead49Smrg 43352b01e16Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43452b01e16Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 43552b01e16Smrg# ----------------------------------------------- 43652b01e16Smrg# The call with PACKAGE and VERSION arguments is the old style 43752b01e16Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 43852b01e16Smrg# and VERSION should now be passed to AC_INIT and removed from 43952b01e16Smrg# the call to AM_INIT_AUTOMAKE. 44052b01e16Smrg# We support both call styles for the transition. After 44152b01e16Smrg# the next Automake release, Autoconf can make the AC_INIT 44252b01e16Smrg# arguments mandatory, and then we can depend on a new Autoconf 44352b01e16Smrg# release and drop the old call support. 44452b01e16SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44552b01e16Smrg[AC_PREREQ([2.62])dnl 44652b01e16Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44752b01e16Smrgdnl the ones we care about. 44852b01e16Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44952b01e16SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45052b01e16SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45152b01e16Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45252b01e16Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45352b01e16Smrg # is not polluted with repeated "-I." 45452b01e16Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45552b01e16Smrg # test to see if srcdir already configured 45652b01e16Smrg if test -f $srcdir/config.status; then 45752b01e16Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 45852b01e16Smrg fi 45952b01e16Smrgfi 4604b0ead49Smrg 46152b01e16Smrg# test whether we have cygpath 46252b01e16Smrgif test -z "$CYGPATH_W"; then 46352b01e16Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 46452b01e16Smrg CYGPATH_W='cygpath -w' 46552b01e16Smrg else 46652b01e16Smrg CYGPATH_W=echo 46752b01e16Smrg fi 46852b01e16Smrgfi 46952b01e16SmrgAC_SUBST([CYGPATH_W]) 4704b0ead49Smrg 47152b01e16Smrg# Define the identity of the package. 47252b01e16Smrgdnl Distinguish between old-style and new-style calls. 47352b01e16Smrgm4_ifval([$2], 47452b01e16Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47552b01e16Smrg AC_SUBST([PACKAGE], [$1])dnl 47652b01e16Smrg AC_SUBST([VERSION], [$2])], 47752b01e16Smrg[_AM_SET_OPTIONS([$1])dnl 47852b01e16Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 47952b01e16Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48052b01e16Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48152b01e16Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48252b01e16Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4834b0ead49Smrg 48452b01e16Smrg_AM_IF_OPTION([no-define],, 48552b01e16Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48652b01e16Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4874b0ead49Smrg 48852b01e16Smrg# Some tools Automake needs. 48952b01e16SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49052b01e16SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49152b01e16SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49252b01e16SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49352b01e16SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49452b01e16SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49552b01e16SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49652b01e16SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49752b01e16SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49852b01e16SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 49952b01e16Smrg# We need awk for the "check" target. The system "awk" is bad on 50052b01e16Smrg# some platforms. 50152b01e16SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50252b01e16SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50352b01e16SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50452b01e16Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50552b01e16Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50652b01e16Smrg [_AM_PROG_TAR([v7])])]) 50752b01e16Smrg_AM_IF_OPTION([no-dependencies],, 50852b01e16Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 50952b01e16Smrg [_AM_DEPENDENCIES(CC)], 51052b01e16Smrg [define([AC_PROG_CC], 51152b01e16Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51252b01e16SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51352b01e16Smrg [_AM_DEPENDENCIES(CXX)], 51452b01e16Smrg [define([AC_PROG_CXX], 51552b01e16Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51652b01e16SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51752b01e16Smrg [_AM_DEPENDENCIES(OBJC)], 51852b01e16Smrg [define([AC_PROG_OBJC], 51952b01e16Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52052b01e16Smrg]) 52152b01e16Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52252b01e16Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52352b01e16Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52452b01e16Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52552b01e16SmrgAC_CONFIG_COMMANDS_PRE(dnl 52652b01e16Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52752b01e16Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 52852b01e16Smrg]) 5294b0ead49Smrg 53052b01e16Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53152b01e16Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53252b01e16Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53352b01e16Smrgm4_define([_AC_COMPILER_EXEEXT], 53452b01e16Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5354b0ead49Smrg 5364b0ead49Smrg 53752b01e16Smrg# When config.status generates a header, we must update the stamp-h file. 53852b01e16Smrg# This file resides in the same directory as the config header 53952b01e16Smrg# that is generated. The stamp files are numbered to have different names. 5404b0ead49Smrg 54152b01e16Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54252b01e16Smrg# loop where config.status creates the headers, so we can generate 54352b01e16Smrg# our stamp files there. 54452b01e16SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54552b01e16Smrg[# Compute $1's index in $config_headers. 54652b01e16Smrg_am_arg=$1 54752b01e16Smrg_am_stamp_count=1 54852b01e16Smrgfor _am_header in $config_headers :; do 54952b01e16Smrg case $_am_header in 55052b01e16Smrg $_am_arg | $_am_arg:* ) 55152b01e16Smrg break ;; 55252b01e16Smrg * ) 55352b01e16Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55452b01e16Smrg esac 55552b01e16Smrgdone 55652b01e16Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5574b0ead49Smrg 5584e7590efSmrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 5594e7590efSmrg# Inc. 56052b01e16Smrg# 56152b01e16Smrg# This file is free software; the Free Software Foundation 56252b01e16Smrg# gives unlimited permission to copy and/or distribute it, 56352b01e16Smrg# with or without modifications, as long as this notice is preserved. 5644b0ead49Smrg 5654e7590efSmrg# serial 1 5664e7590efSmrg 56752b01e16Smrg# AM_PROG_INSTALL_SH 56852b01e16Smrg# ------------------ 56952b01e16Smrg# Define $install_sh. 57052b01e16SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57152b01e16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57252b01e16Smrgif test x"${install_sh}" != xset; then 57352b01e16Smrg case $am_aux_dir in 57452b01e16Smrg *\ * | *\ *) 57552b01e16Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57652b01e16Smrg *) 57752b01e16Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57852b01e16Smrg esac 57952b01e16Smrgfi 58052b01e16SmrgAC_SUBST(install_sh)]) 5814b0ead49Smrg 58252b01e16Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58352b01e16Smrg# 58452b01e16Smrg# This file is free software; the Free Software Foundation 58552b01e16Smrg# gives unlimited permission to copy and/or distribute it, 58652b01e16Smrg# with or without modifications, as long as this notice is preserved. 5874b0ead49Smrg 58852b01e16Smrg# serial 2 5894b0ead49Smrg 59052b01e16Smrg# Check whether the underlying file-system supports filenames 59152b01e16Smrg# with a leading dot. For instance MS-DOS doesn't. 59252b01e16SmrgAC_DEFUN([AM_SET_LEADING_DOT], 59352b01e16Smrg[rm -rf .tst 2>/dev/null 59452b01e16Smrgmkdir .tst 2>/dev/null 59552b01e16Smrgif test -d .tst; then 59652b01e16Smrg am__leading_dot=. 59752b01e16Smrgelse 59852b01e16Smrg am__leading_dot=_ 5994b0ead49Smrgfi 60052b01e16Smrgrmdir .tst 2>/dev/null 60152b01e16SmrgAC_SUBST([am__leading_dot])]) 6024b0ead49Smrg 60352b01e16Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60452b01e16Smrg# From Jim Meyering 6054b0ead49Smrg 6064e7590efSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 6074e7590efSmrg# 2011 Free Software Foundation, Inc. 60852b01e16Smrg# 60952b01e16Smrg# This file is free software; the Free Software Foundation 61052b01e16Smrg# gives unlimited permission to copy and/or distribute it, 61152b01e16Smrg# with or without modifications, as long as this notice is preserved. 6124b0ead49Smrg 61352b01e16Smrg# serial 5 6144b0ead49Smrg 61552b01e16Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61652b01e16Smrg# ---------------------------------- 61752b01e16Smrg# Control maintainer-specific portions of Makefiles. 61852b01e16Smrg# Default is to disable them, unless `enable' is passed literally. 61952b01e16Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 62052b01e16Smrg# can override the default with the --enable/--disable switch. 62152b01e16SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62252b01e16Smrg[m4_case(m4_default([$1], [disable]), 62352b01e16Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62452b01e16Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62552b01e16Smrg [m4_define([am_maintainer_other], [enable]) 62652b01e16Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6274e7590efSmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 62852b01e16Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62952b01e16Smrg AC_ARG_ENABLE([maintainer-mode], 63052b01e16Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63152b01e16Smrg (and sometimes confusing) to the casual installer], 63252b01e16Smrg [USE_MAINTAINER_MODE=$enableval], 63352b01e16Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63452b01e16Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63552b01e16Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63652b01e16Smrg MAINT=$MAINTAINER_MODE_TRUE 63752b01e16Smrg AC_SUBST([MAINT])dnl 63852b01e16Smrg] 63952b01e16Smrg) 6404b0ead49Smrg 64152b01e16SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6424b0ead49Smrg 64352b01e16Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64452b01e16Smrg 64552b01e16Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 64652b01e16Smrg# 64752b01e16Smrg# This file is free software; the Free Software Foundation 64852b01e16Smrg# gives unlimited permission to copy and/or distribute it, 64952b01e16Smrg# with or without modifications, as long as this notice is preserved. 65052b01e16Smrg 65152b01e16Smrg# serial 4 65252b01e16Smrg 65352b01e16Smrg# AM_MAKE_INCLUDE() 65452b01e16Smrg# ----------------- 65552b01e16Smrg# Check to see how make treats includes. 65652b01e16SmrgAC_DEFUN([AM_MAKE_INCLUDE], 65752b01e16Smrg[am_make=${MAKE-make} 65852b01e16Smrgcat > confinc << 'END' 65952b01e16Smrgam__doit: 66052b01e16Smrg @echo this is the am__doit target 66152b01e16Smrg.PHONY: am__doit 66252b01e16SmrgEND 66352b01e16Smrg# If we don't find an include directive, just comment out the code. 66452b01e16SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66552b01e16Smrgam__include="#" 66652b01e16Smrgam__quote= 66752b01e16Smrg_am_result=none 66852b01e16Smrg# First try GNU make style include. 66952b01e16Smrgecho "include confinc" > confmf 67052b01e16Smrg# Ignore all kinds of additional output from `make'. 67152b01e16Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67252b01e16Smrg*the\ am__doit\ target*) 67352b01e16Smrg am__include=include 67452b01e16Smrg am__quote= 67552b01e16Smrg _am_result=GNU 6764b0ead49Smrg ;; 6774b0ead49Smrgesac 67852b01e16Smrg# Now try BSD make style include. 67952b01e16Smrgif test "$am__include" = "#"; then 68052b01e16Smrg echo '.include "confinc"' > confmf 68152b01e16Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68252b01e16Smrg *the\ am__doit\ target*) 68352b01e16Smrg am__include=.include 68452b01e16Smrg am__quote="\"" 68552b01e16Smrg _am_result=BSD 68652b01e16Smrg ;; 68752b01e16Smrg esac 68852b01e16Smrgfi 68952b01e16SmrgAC_SUBST([am__include]) 69052b01e16SmrgAC_SUBST([am__quote]) 69152b01e16SmrgAC_MSG_RESULT([$_am_result]) 69252b01e16Smrgrm -f confinc confmf 69352b01e16Smrg]) 6944b0ead49Smrg 69552b01e16Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6964b0ead49Smrg 69752b01e16Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69852b01e16Smrg# Free Software Foundation, Inc. 69952b01e16Smrg# 70052b01e16Smrg# This file is free software; the Free Software Foundation 70152b01e16Smrg# gives unlimited permission to copy and/or distribute it, 70252b01e16Smrg# with or without modifications, as long as this notice is preserved. 7034b0ead49Smrg 70452b01e16Smrg# serial 6 7054b0ead49Smrg 70652b01e16Smrg# AM_MISSING_PROG(NAME, PROGRAM) 70752b01e16Smrg# ------------------------------ 70852b01e16SmrgAC_DEFUN([AM_MISSING_PROG], 70952b01e16Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 71052b01e16Smrg$1=${$1-"${am_missing_run}$2"} 71152b01e16SmrgAC_SUBST($1)]) 7124b0ead49Smrg 71352b01e16Smrg 71452b01e16Smrg# AM_MISSING_HAS_RUN 71552b01e16Smrg# ------------------ 71652b01e16Smrg# Define MISSING if not defined so far and test if it supports --run. 71752b01e16Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71852b01e16SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71952b01e16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 72052b01e16SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72152b01e16Smrgif test x"${MISSING+set}" != xset; then 72252b01e16Smrg case $am_aux_dir in 72352b01e16Smrg *\ * | *\ *) 72452b01e16Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72552b01e16Smrg *) 72652b01e16Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72752b01e16Smrg esac 72852b01e16Smrgfi 72952b01e16Smrg# Use eval to expand $SHELL 73052b01e16Smrgif eval "$MISSING --run true"; then 73152b01e16Smrg am_missing_run="$MISSING --run " 7324b0ead49Smrgelse 73352b01e16Smrg am_missing_run= 73452b01e16Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7354b0ead49Smrgfi 73652b01e16Smrg]) 7374b0ead49Smrg 7384e7590efSmrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 7394e7590efSmrg# Inc. 74052b01e16Smrg# 74152b01e16Smrg# This file is free software; the Free Software Foundation 74252b01e16Smrg# gives unlimited permission to copy and/or distribute it, 74352b01e16Smrg# with or without modifications, as long as this notice is preserved. 7444b0ead49Smrg 7454e7590efSmrg# serial 1 7464e7590efSmrg 74752b01e16Smrg# AM_PROG_MKDIR_P 74852b01e16Smrg# --------------- 74952b01e16Smrg# Check for `mkdir -p'. 75052b01e16SmrgAC_DEFUN([AM_PROG_MKDIR_P], 75152b01e16Smrg[AC_PREREQ([2.60])dnl 75252b01e16SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 75352b01e16Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75452b01e16Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 75552b01e16Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75652b01e16Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75752b01e16Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75852b01e16Smrgdnl adjustment using top_builddir (which is defined more often than 75952b01e16Smrgdnl MKDIR_P). 76052b01e16SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 76152b01e16Smrgcase $mkdir_p in 76252b01e16Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 76352b01e16Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 76452b01e16Smrgesac 7654b0ead49Smrg]) 7664b0ead49Smrg 76752b01e16Smrg# Helper functions for option handling. -*- Autoconf -*- 7684b0ead49Smrg 7694e7590efSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 7704e7590efSmrg# Foundation, Inc. 77152b01e16Smrg# 77252b01e16Smrg# This file is free software; the Free Software Foundation 77352b01e16Smrg# gives unlimited permission to copy and/or distribute it, 77452b01e16Smrg# with or without modifications, as long as this notice is preserved. 7754b0ead49Smrg 7764e7590efSmrg# serial 5 7774b0ead49Smrg 77852b01e16Smrg# _AM_MANGLE_OPTION(NAME) 77952b01e16Smrg# ----------------------- 78052b01e16SmrgAC_DEFUN([_AM_MANGLE_OPTION], 78152b01e16Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7824b0ead49Smrg 78352b01e16Smrg# _AM_SET_OPTION(NAME) 7844e7590efSmrg# -------------------- 78552b01e16Smrg# Set option NAME. Presently that only means defining a flag for this option. 78652b01e16SmrgAC_DEFUN([_AM_SET_OPTION], 78752b01e16Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7884b0ead49Smrg 78952b01e16Smrg# _AM_SET_OPTIONS(OPTIONS) 7904e7590efSmrg# ------------------------ 79152b01e16Smrg# OPTIONS is a space-separated list of Automake options. 79252b01e16SmrgAC_DEFUN([_AM_SET_OPTIONS], 79352b01e16Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7944b0ead49Smrg 79552b01e16Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79652b01e16Smrg# ------------------------------------------- 79752b01e16Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79852b01e16SmrgAC_DEFUN([_AM_IF_OPTION], 79952b01e16Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8004b0ead49Smrg 80152b01e16Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8024b0ead49Smrg 80352b01e16Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 80452b01e16Smrg# Free Software Foundation, Inc. 80552b01e16Smrg# 80652b01e16Smrg# This file is free software; the Free Software Foundation 80752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 80852b01e16Smrg# with or without modifications, as long as this notice is preserved. 8094b0ead49Smrg 81052b01e16Smrg# serial 5 8114b0ead49Smrg 81252b01e16Smrg# AM_SANITY_CHECK 81352b01e16Smrg# --------------- 81452b01e16SmrgAC_DEFUN([AM_SANITY_CHECK], 81552b01e16Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81652b01e16Smrg# Just in case 81752b01e16Smrgsleep 1 81852b01e16Smrgecho timestamp > conftest.file 81952b01e16Smrg# Reject unsafe characters in $srcdir or the absolute working directory 82052b01e16Smrg# name. Accept space and tab only in the latter. 82152b01e16Smrgam_lf=' 82252b01e16Smrg' 82352b01e16Smrgcase `pwd` in 82452b01e16Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82552b01e16Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82652b01e16Smrgesac 82752b01e16Smrgcase $srcdir in 82852b01e16Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82952b01e16Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 83052b01e16Smrgesac 8314b0ead49Smrg 83252b01e16Smrg# Do `set' in a subshell so we don't clobber the current shell's 83352b01e16Smrg# arguments. Must try -L first in case configure is actually a 83452b01e16Smrg# symlink; some systems play weird games with the mod time of symlinks 83552b01e16Smrg# (eg FreeBSD returns the mod time of the symlink's containing 83652b01e16Smrg# directory). 83752b01e16Smrgif ( 83852b01e16Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83952b01e16Smrg if test "$[*]" = "X"; then 84052b01e16Smrg # -L didn't work. 84152b01e16Smrg set X `ls -t "$srcdir/configure" conftest.file` 84252b01e16Smrg fi 84352b01e16Smrg rm -f conftest.file 84452b01e16Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84552b01e16Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8464b0ead49Smrg 84752b01e16Smrg # If neither matched, then we have a broken ls. This can happen 84852b01e16Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84952b01e16Smrg # broken ls alias from the environment. This has actually 85052b01e16Smrg # happened. Such a system could not be considered "sane". 85152b01e16Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 85252b01e16Smrgalias in your environment]) 85352b01e16Smrg fi 8544b0ead49Smrg 85552b01e16Smrg test "$[2]" = conftest.file 85652b01e16Smrg ) 85752b01e16Smrgthen 85852b01e16Smrg # Ok. 85952b01e16Smrg : 8604b0ead49Smrgelse 86152b01e16Smrg AC_MSG_ERROR([newly created file is older than distributed files! 86252b01e16SmrgCheck your system clock]) 86352b01e16Smrgfi 86452b01e16SmrgAC_MSG_RESULT(yes)]) 8654b0ead49Smrg 86652b01e16Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86752b01e16Smrg# 86852b01e16Smrg# This file is free software; the Free Software Foundation 86952b01e16Smrg# gives unlimited permission to copy and/or distribute it, 87052b01e16Smrg# with or without modifications, as long as this notice is preserved. 8714b0ead49Smrg 87252b01e16Smrg# serial 1 8734b0ead49Smrg 87452b01e16Smrg# AM_SILENT_RULES([DEFAULT]) 87552b01e16Smrg# -------------------------- 87652b01e16Smrg# Enable less verbose build rules; with the default set to DEFAULT 87752b01e16Smrg# (`yes' being less verbose, `no' or empty being verbose). 87852b01e16SmrgAC_DEFUN([AM_SILENT_RULES], 87952b01e16Smrg[AC_ARG_ENABLE([silent-rules], 88052b01e16Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 88152b01e16Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 88252b01e16Smrgcase $enable_silent_rules in 88352b01e16Smrgyes) AM_DEFAULT_VERBOSITY=0;; 88452b01e16Smrgno) AM_DEFAULT_VERBOSITY=1;; 88552b01e16Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88652b01e16Smrgesac 88752b01e16SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88852b01e16SmrgAM_BACKSLASH='\' 88952b01e16SmrgAC_SUBST([AM_BACKSLASH])dnl 89052b01e16Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 89152b01e16Smrg]) 8924b0ead49Smrg 8934e7590efSmrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 89452b01e16Smrg# 89552b01e16Smrg# This file is free software; the Free Software Foundation 89652b01e16Smrg# gives unlimited permission to copy and/or distribute it, 89752b01e16Smrg# with or without modifications, as long as this notice is preserved. 8984b0ead49Smrg 8994e7590efSmrg# serial 1 9004e7590efSmrg 90152b01e16Smrg# AM_PROG_INSTALL_STRIP 90252b01e16Smrg# --------------------- 90352b01e16Smrg# One issue with vendor `install' (even GNU) is that you can't 90452b01e16Smrg# specify the program used to strip binaries. This is especially 90552b01e16Smrg# annoying in cross-compiling environments, where the build's strip 90652b01e16Smrg# is unlikely to handle the host's binaries. 90752b01e16Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90852b01e16Smrg# always use install-sh in `make install-strip', and initialize 90952b01e16Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 91052b01e16SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 91152b01e16Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 91252b01e16Smrg# Installed binaries are usually stripped using `strip' when the user 91352b01e16Smrg# run `make install-strip'. However `strip' might not be the right 91452b01e16Smrg# tool to use in cross-compilation environments, therefore Automake 91552b01e16Smrg# will honor the `STRIP' environment variable to overrule this program. 91652b01e16Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91752b01e16Smrgif test "$cross_compiling" != no; then 91852b01e16Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9194b0ead49Smrgfi 92052b01e16SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 92152b01e16SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9224b0ead49Smrg 9234e7590efSmrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 92452b01e16Smrg# 92552b01e16Smrg# This file is free software; the Free Software Foundation 92652b01e16Smrg# gives unlimited permission to copy and/or distribute it, 92752b01e16Smrg# with or without modifications, as long as this notice is preserved. 9284b0ead49Smrg 9294e7590efSmrg# serial 3 9304b0ead49Smrg 93152b01e16Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 93252b01e16Smrg# --------------------------- 93352b01e16Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 93452b01e16Smrg# This macro is traced by Automake. 93552b01e16SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9364b0ead49Smrg 93752b01e16Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9384e7590efSmrg# -------------------------- 93952b01e16Smrg# Public sister of _AM_SUBST_NOTMAKE. 94052b01e16SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9414b0ead49Smrg 94252b01e16Smrg# Check how to create a tarball. -*- Autoconf -*- 9434b0ead49Smrg 94452b01e16Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 94552b01e16Smrg# 94652b01e16Smrg# This file is free software; the Free Software Foundation 94752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 94852b01e16Smrg# with or without modifications, as long as this notice is preserved. 9494b0ead49Smrg 95052b01e16Smrg# serial 2 95152b01e16Smrg 95252b01e16Smrg# _AM_PROG_TAR(FORMAT) 95352b01e16Smrg# -------------------- 95452b01e16Smrg# Check how to create a tarball in format FORMAT. 95552b01e16Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 95652b01e16Smrg# 95752b01e16Smrg# Substitute a variable $(am__tar) that is a command 95852b01e16Smrg# writing to stdout a FORMAT-tarball containing the directory 95952b01e16Smrg# $tardir. 96052b01e16Smrg# tardir=directory && $(am__tar) > result.tar 96152b01e16Smrg# 96252b01e16Smrg# Substitute a variable $(am__untar) that extract such 96352b01e16Smrg# a tarball read from stdin. 96452b01e16Smrg# $(am__untar) < result.tar 96552b01e16SmrgAC_DEFUN([_AM_PROG_TAR], 96652b01e16Smrg[# Always define AMTAR for backward compatibility. 96752b01e16SmrgAM_MISSING_PROG([AMTAR], [tar]) 96852b01e16Smrgm4_if([$1], [v7], 96952b01e16Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 97052b01e16Smrg [m4_case([$1], [ustar],, [pax],, 97152b01e16Smrg [m4_fatal([Unknown tar format])]) 97252b01e16SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 97352b01e16Smrg# Loop over all known methods to create a tar archive until one works. 97452b01e16Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 97552b01e16Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 97652b01e16Smrg# Do not fold the above two line into one, because Tru64 sh and 97752b01e16Smrg# Solaris sh will not grok spaces in the rhs of `-'. 97852b01e16Smrgfor _am_tool in $_am_tools 97952b01e16Smrgdo 98052b01e16Smrg case $_am_tool in 98152b01e16Smrg gnutar) 98252b01e16Smrg for _am_tar in tar gnutar gtar; 98352b01e16Smrg do 98452b01e16Smrg AM_RUN_LOG([$_am_tar --version]) && break 98552b01e16Smrg done 98652b01e16Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98752b01e16Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98852b01e16Smrg am__untar="$_am_tar -xf -" 98952b01e16Smrg ;; 99052b01e16Smrg plaintar) 99152b01e16Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 99252b01e16Smrg # ustar tarball either. 99352b01e16Smrg (tar --version) >/dev/null 2>&1 && continue 99452b01e16Smrg am__tar='tar chf - "$$tardir"' 99552b01e16Smrg am__tar_='tar chf - "$tardir"' 99652b01e16Smrg am__untar='tar xf -' 99752b01e16Smrg ;; 99852b01e16Smrg pax) 99952b01e16Smrg am__tar='pax -L -x $1 -w "$$tardir"' 100052b01e16Smrg am__tar_='pax -L -x $1 -w "$tardir"' 100152b01e16Smrg am__untar='pax -r' 100252b01e16Smrg ;; 100352b01e16Smrg cpio) 100452b01e16Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 100552b01e16Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 100652b01e16Smrg am__untar='cpio -i -H $1 -d' 100752b01e16Smrg ;; 100852b01e16Smrg none) 100952b01e16Smrg am__tar=false 101052b01e16Smrg am__tar_=false 101152b01e16Smrg am__untar=false 10124b0ead49Smrg ;; 10134b0ead49Smrg esac 10144b0ead49Smrg 101552b01e16Smrg # If the value was cached, stop now. We just wanted to have am__tar 101652b01e16Smrg # and am__untar set. 101752b01e16Smrg test -n "${am_cv_prog_tar_$1}" && break 10184b0ead49Smrg 101952b01e16Smrg # tar/untar a dummy directory, and stop if the command works 102052b01e16Smrg rm -rf conftest.dir 102152b01e16Smrg mkdir conftest.dir 102252b01e16Smrg echo GrepMe > conftest.dir/file 102352b01e16Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 102452b01e16Smrg rm -rf conftest.dir 102552b01e16Smrg if test -s conftest.tar; then 102652b01e16Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102752b01e16Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102852b01e16Smrg fi 102952b01e16Smrgdone 103052b01e16Smrgrm -rf conftest.dir 10314b0ead49Smrg 103252b01e16SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 103352b01e16SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 103452b01e16SmrgAC_SUBST([am__tar]) 103552b01e16SmrgAC_SUBST([am__untar]) 103652b01e16Smrg]) # _AM_PROG_TAR 10374b0ead49Smrg 10384e7590efSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 10394e7590efSmrg# 10404e7590efSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10414e7590efSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10424e7590efSmrg# Foundation, Inc. 10434e7590efSmrg# Written by Gordon Matzigkeit, 1996 10444e7590efSmrg# 10454e7590efSmrg# This file is free software; the Free Software Foundation gives 10464e7590efSmrg# unlimited permission to copy and/or distribute it, with or without 10474e7590efSmrg# modifications, as long as this notice is preserved. 10484b0ead49Smrg 10494e7590efSmrgm4_define([_LT_COPYING], [dnl 10504e7590efSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10514e7590efSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10524e7590efSmrg# Foundation, Inc. 10534e7590efSmrg# Written by Gordon Matzigkeit, 1996 105452b01e16Smrg# 10554e7590efSmrg# This file is part of GNU Libtool. 105652b01e16Smrg# 10574e7590efSmrg# GNU Libtool is free software; you can redistribute it and/or 10584e7590efSmrg# modify it under the terms of the GNU General Public License as 10594e7590efSmrg# published by the Free Software Foundation; either version 2 of 10604e7590efSmrg# the License, or (at your option) any later version. 106152b01e16Smrg# 10624e7590efSmrg# As a special exception to the GNU General Public License, 10634e7590efSmrg# if you distribute this file as part of a program or library that 10644e7590efSmrg# is built using GNU Libtool, you may include this file under the 10654e7590efSmrg# same distribution terms that you use for the rest of that program. 106652b01e16Smrg# 10674e7590efSmrg# GNU Libtool is distributed in the hope that it will be useful, 10684e7590efSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 10694e7590efSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10704e7590efSmrg# GNU General Public License for more details. 107152b01e16Smrg# 10724e7590efSmrg# You should have received a copy of the GNU General Public License 10734e7590efSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 10744e7590efSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 10754e7590efSmrg# obtained by writing to the Free Software Foundation, Inc., 10764e7590efSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 10774e7590efSmrg]) 10784b0ead49Smrg 10794e7590efSmrg# serial 57 LT_INIT 10804b0ead49Smrg 10814b0ead49Smrg 10824e7590efSmrg# LT_PREREQ(VERSION) 10834e7590efSmrg# ------------------ 10844e7590efSmrg# Complain and exit if this libtool version is less that VERSION. 10854e7590efSmrgm4_defun([LT_PREREQ], 10864e7590efSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 10874e7590efSmrg [m4_default([$3], 10884e7590efSmrg [m4_fatal([Libtool version $1 or higher is required], 10894e7590efSmrg 63)])], 10904e7590efSmrg [$2])]) 10914b0ead49Smrg 10924b0ead49Smrg 10934e7590efSmrg# _LT_CHECK_BUILDDIR 10944e7590efSmrg# ------------------ 10954e7590efSmrg# Complain if the absolute build directory name contains unusual characters 10964e7590efSmrgm4_defun([_LT_CHECK_BUILDDIR], 10974e7590efSmrg[case `pwd` in 10984e7590efSmrg *\ * | *\ *) 10994e7590efSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 11004e7590efSmrgesac 11014e7590efSmrg]) 11024b0ead49Smrg 11034b0ead49Smrg 11044e7590efSmrg# LT_INIT([OPTIONS]) 11054e7590efSmrg# ------------------ 11064e7590efSmrgAC_DEFUN([LT_INIT], 11074e7590efSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 11084e7590efSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11094e7590efSmrgAC_BEFORE([$0], [LT_LANG])dnl 11104e7590efSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 11114e7590efSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 11124e7590efSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 11134b0ead49Smrg 11144e7590efSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 11154e7590efSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 11164e7590efSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 11174e7590efSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 11184e7590efSmrgdnl unless we require an AC_DEFUNed macro: 11194e7590efSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 11204e7590efSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 11214e7590efSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 11224e7590efSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 11234e7590efSmrgm4_require([_LT_PROG_LTMAIN])dnl 11244b0ead49Smrg 11254e7590efSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11264b0ead49Smrg 11274e7590efSmrgdnl Parse OPTIONS 11284e7590efSmrg_LT_SET_OPTIONS([$0], [$1]) 11294b0ead49Smrg 11304e7590efSmrg# This can be used to rebuild libtool when needed 11314e7590efSmrgLIBTOOL_DEPS="$ltmain" 11324b0ead49Smrg 11334e7590efSmrg# Always use our own libtool. 11344e7590efSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11354e7590efSmrgAC_SUBST(LIBTOOL)dnl 113649dc963fSmrg 11374e7590efSmrg_LT_SETUP 11384b0ead49Smrg 11394e7590efSmrg# Only expand once: 11404e7590efSmrgm4_define([LT_INIT]) 11414e7590efSmrg])# LT_INIT 114249dc963fSmrg 11434e7590efSmrg# Old names: 11444e7590efSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 11454e7590efSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 11464e7590efSmrgdnl aclocal-1.4 backwards compatibility: 11474e7590efSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 11484e7590efSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 114949dc963fSmrg 115049dc963fSmrg 11514e7590efSmrg# _LT_CC_BASENAME(CC) 115252b01e16Smrg# ------------------- 11534e7590efSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11544e7590efSmrgm4_defun([_LT_CC_BASENAME], 11554e7590efSmrg[for cc_temp in $1""; do 11564e7590efSmrg case $cc_temp in 11574e7590efSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11584e7590efSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11594e7590efSmrg \-*) ;; 11604e7590efSmrg *) break;; 11614e7590efSmrg esac 11624e7590efSmrgdone 11634e7590efSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 11644e7590efSmrg]) 11654b0ead49Smrg 11664b0ead49Smrg 11674e7590efSmrg# _LT_FILEUTILS_DEFAULTS 11684e7590efSmrg# ---------------------- 11694e7590efSmrg# It is okay to use these file commands and assume they have been set 11704e7590efSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 11714e7590efSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 11724e7590efSmrg[: ${CP="cp -f"} 11734e7590efSmrg: ${MV="mv -f"} 11744e7590efSmrg: ${RM="rm -f"} 11754e7590efSmrg])# _LT_FILEUTILS_DEFAULTS 11764b0ead49Smrg 11774b0ead49Smrg 11784e7590efSmrg# _LT_SETUP 11794e7590efSmrg# --------- 11804e7590efSmrgm4_defun([_LT_SETUP], 11814e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11824e7590efSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11834e7590efSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 11844e7590efSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 118552b01e16Smrg 11864e7590efSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 11874e7590efSmrgdnl 11884e7590efSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 11894e7590efSmrg_LT_DECL([], [host], [0])dnl 11904e7590efSmrg_LT_DECL([], [host_os], [0])dnl 11914e7590efSmrgdnl 11924e7590efSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 11934e7590efSmrg_LT_DECL([], [build], [0])dnl 11944e7590efSmrg_LT_DECL([], [build_os], [0])dnl 11954e7590efSmrgdnl 11964e7590efSmrgAC_REQUIRE([AC_PROG_CC])dnl 11974e7590efSmrgAC_REQUIRE([LT_PATH_LD])dnl 11984e7590efSmrgAC_REQUIRE([LT_PATH_NM])dnl 11994e7590efSmrgdnl 12004e7590efSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 12014e7590efSmrgtest -z "$LN_S" && LN_S="ln -s" 12024e7590efSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 12034e7590efSmrgdnl 12044e7590efSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 12054e7590efSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 12064e7590efSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 12074e7590efSmrgdnl 12084e7590efSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 12094e7590efSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 12104e7590efSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 12114e7590efSmrgm4_require([_LT_CMD_RELOAD])dnl 12124e7590efSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 12134e7590efSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 12144e7590efSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 12154e7590efSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 12164e7590efSmrgm4_require([_LT_WITH_SYSROOT])dnl 121752b01e16Smrg 12184e7590efSmrg_LT_CONFIG_LIBTOOL_INIT([ 12194e7590efSmrg# See if we are running on zsh, and set the options which allow our 12204e7590efSmrg# commands through without removal of \ escapes INIT. 12214e7590efSmrgif test -n "\${ZSH_VERSION+set}" ; then 12224e7590efSmrg setopt NO_GLOB_SUBST 12234e7590efSmrgfi 12244e7590efSmrg]) 12254e7590efSmrgif test -n "${ZSH_VERSION+set}" ; then 12264e7590efSmrg setopt NO_GLOB_SUBST 12274b0ead49Smrgfi 12284b0ead49Smrg 12294e7590efSmrg_LT_CHECK_OBJDIR 12304b0ead49Smrg 12314e7590efSmrgm4_require([_LT_TAG_COMPILER])dnl 12324b0ead49Smrg 12334e7590efSmrgcase $host_os in 12344e7590efSmrgaix3*) 12354e7590efSmrg # AIX sometimes has problems with the GCC collect2 program. For some 12364e7590efSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12374e7590efSmrg # vanish in a puff of smoke. 12384e7590efSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 12394e7590efSmrg COLLECT_NAMES= 12404e7590efSmrg export COLLECT_NAMES 12414e7590efSmrg fi 12424e7590efSmrg ;; 12434e7590efSmrgesac 12444b0ead49Smrg 12454e7590efSmrg# Global variables: 12464e7590efSmrgofile=libtool 12474e7590efSmrgcan_build_shared=yes 124849dc963fSmrg 12494e7590efSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 12504e7590efSmrg# which needs '.lib'). 12514e7590efSmrglibext=a 12524b0ead49Smrg 12534e7590efSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 12544b0ead49Smrg 12554e7590efSmrgold_CC="$CC" 12564e7590efSmrgold_CFLAGS="$CFLAGS" 12574b0ead49Smrg 12584e7590efSmrg# Set sane defaults for various variables 12594e7590efSmrgtest -z "$CC" && CC=cc 12604e7590efSmrgtest -z "$LTCC" && LTCC=$CC 12614e7590efSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 12624e7590efSmrgtest -z "$LD" && LD=ld 12634e7590efSmrgtest -z "$ac_objext" && ac_objext=o 12644b0ead49Smrg 12654e7590efSmrg_LT_CC_BASENAME([$compiler]) 12664b0ead49Smrg 12674e7590efSmrg# Only perform the check for file, if the check method requires it 12684e7590efSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 12694e7590efSmrgcase $deplibs_check_method in 12704e7590efSmrgfile_magic*) 12714e7590efSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 12724e7590efSmrg _LT_PATH_MAGIC 12734e7590efSmrg fi 12744e7590efSmrg ;; 12754e7590efSmrgesac 12764b0ead49Smrg 12774e7590efSmrg# Use C for the default configuration in the libtool script 12784e7590efSmrgLT_SUPPORTED_TAG([CC]) 12794e7590efSmrg_LT_LANG_C_CONFIG 12804e7590efSmrg_LT_LANG_DEFAULT_CONFIG 12814e7590efSmrg_LT_CONFIG_COMMANDS 12824e7590efSmrg])# _LT_SETUP 12834b0ead49Smrg 12844b0ead49Smrg 12854e7590efSmrg# _LT_PREPARE_SED_QUOTE_VARS 12864e7590efSmrg# -------------------------- 12874e7590efSmrg# Define a few sed substitution that help us do robust quoting. 12884e7590efSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 12894e7590efSmrg[# Backslashify metacharacters that are still active within 12904e7590efSmrg# double-quoted strings. 12914e7590efSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 129249dc963fSmrg 12934e7590efSmrg# Same as above, but do not quote variable references. 12944e7590efSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 12957aa89044Smrg 12964e7590efSmrg# Sed substitution to delay expansion of an escaped shell variable in a 12974e7590efSmrg# double_quote_subst'ed string. 12984e7590efSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 12997aa89044Smrg 13004e7590efSmrg# Sed substitution to delay expansion of an escaped single quote. 13014e7590efSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 130249dc963fSmrg 13034e7590efSmrg# Sed substitution to avoid accidental globbing in evaled expressions 13044e7590efSmrgno_glob_subst='s/\*/\\\*/g' 13054e7590efSmrg]) 130649dc963fSmrg 13074e7590efSmrg# _LT_PROG_LTMAIN 13084e7590efSmrg# --------------- 13094e7590efSmrg# Note that this code is called both from `configure', and `config.status' 13104e7590efSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 13114e7590efSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 13124e7590efSmrg# so we pass a copy along to make sure it has a sensible value anyway. 13134e7590efSmrgm4_defun([_LT_PROG_LTMAIN], 13144e7590efSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 13154e7590efSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 13164e7590efSmrgltmain="$ac_aux_dir/ltmain.sh" 13174e7590efSmrg])# _LT_PROG_LTMAIN 131849dc963fSmrg 131949dc963fSmrg 132049dc963fSmrg 13214e7590efSmrg# So that we can recreate a full libtool script including additional 13224e7590efSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 13234e7590efSmrg# in macros and then make a single call at the end using the `libtool' 13244e7590efSmrg# label. 13257aa89044Smrg 13267aa89044Smrg 13274e7590efSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 13284e7590efSmrg# ---------------------------------------- 13294e7590efSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13304e7590efSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 13314e7590efSmrg[m4_ifval([$1], 13324e7590efSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 13334e7590efSmrg [$1 13344e7590efSmrg])])]) 13357aa89044Smrg 13364e7590efSmrg# Initialize. 13374e7590efSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 133849dc963fSmrg 133949dc963fSmrg 13404e7590efSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 13414e7590efSmrg# ------------------------------ 13424e7590efSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13434e7590efSmrgm4_define([_LT_CONFIG_LIBTOOL], 13444e7590efSmrg[m4_ifval([$1], 13454e7590efSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 13464e7590efSmrg [$1 13474e7590efSmrg])])]) 134849dc963fSmrg 13494e7590efSmrg# Initialize. 13504e7590efSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 135149dc963fSmrg 135249dc963fSmrg 13534e7590efSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 13544e7590efSmrg# ----------------------------------------------------- 13554e7590efSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 13564e7590efSmrg[_LT_CONFIG_LIBTOOL([$1]) 13574e7590efSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 13584e7590efSmrg]) 135949dc963fSmrg 136049dc963fSmrg 13614e7590efSmrg# _LT_FORMAT_COMMENT([COMMENT]) 13624e7590efSmrg# ----------------------------- 13634e7590efSmrg# Add leading comment marks to the start of each line, and a trailing 13644e7590efSmrg# full-stop to the whole comment if one is not present already. 13654e7590efSmrgm4_define([_LT_FORMAT_COMMENT], 13664e7590efSmrg[m4_ifval([$1], [ 13674e7590efSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 13684e7590efSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 13694e7590efSmrg)]) 137049dc963fSmrg 13714b0ead49Smrg 13724b0ead49Smrg 13734b0ead49Smrg 13744b0ead49Smrg 13754e7590efSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 13764e7590efSmrg# ------------------------------------------------------------------- 13774e7590efSmrg# CONFIGNAME is the name given to the value in the libtool script. 13784e7590efSmrg# VARNAME is the (base) name used in the configure script. 13794e7590efSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 13804e7590efSmrg# VARNAME. Any other value will be used directly. 13814e7590efSmrgm4_define([_LT_DECL], 13824e7590efSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 13834e7590efSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 13844e7590efSmrg [m4_ifval([$1], [$1], [$2])]) 13854e7590efSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 13864e7590efSmrg m4_ifval([$4], 13874e7590efSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 13884e7590efSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 13894e7590efSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 13904e7590efSmrg]) 139152b01e16Smrg 139249dc963fSmrg 13934e7590efSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 13944e7590efSmrg# -------------------------------------------------------- 13954e7590efSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 139649dc963fSmrg 139749dc963fSmrg 13984e7590efSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 13994e7590efSmrg# ------------------------------------------------ 14004e7590efSmrgm4_define([lt_decl_tag_varnames], 14014e7590efSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 14024b0ead49Smrg 14034b0ead49Smrg 14044e7590efSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 14054e7590efSmrg# --------------------------------------------------------- 14064e7590efSmrgm4_define([_lt_decl_filter], 14074e7590efSmrg[m4_case([$#], 14084e7590efSmrg [0], [m4_fatal([$0: too few arguments: $#])], 14094e7590efSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 14104e7590efSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 14114e7590efSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 14124e7590efSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 14134e7590efSmrg]) 14144b0ead49Smrg 14154b0ead49Smrg 14164e7590efSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 14174e7590efSmrg# -------------------------------------------------- 14184e7590efSmrgm4_define([lt_decl_quote_varnames], 14194e7590efSmrg[_lt_decl_filter([value], [1], $@)]) 142049dc963fSmrg 142149dc963fSmrg 14224e7590efSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 14234e7590efSmrg# --------------------------------------------------- 14244e7590efSmrgm4_define([lt_decl_dquote_varnames], 14254e7590efSmrg[_lt_decl_filter([value], [2], $@)]) 14264b0ead49Smrg 14274b0ead49Smrg 14284e7590efSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 14294e7590efSmrg# --------------------------------------------------- 14304e7590efSmrgm4_define([lt_decl_varnames_tagged], 14314e7590efSmrg[m4_assert([$# <= 2])dnl 14324e7590efSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 14334e7590efSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 14344e7590efSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 14354e7590efSmrgm4_define([_lt_decl_varnames_tagged], 14364e7590efSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 14374b0ead49Smrg 143852b01e16Smrg 14394e7590efSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 14404e7590efSmrg# ------------------------------------------------ 14414e7590efSmrgm4_define([lt_decl_all_varnames], 14424e7590efSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 14434e7590efSmrg m4_if([$2], [], 14444e7590efSmrg m4_quote(lt_decl_varnames), 14454e7590efSmrg m4_quote(m4_shift($@))))[]dnl 14464e7590efSmrg]) 14474e7590efSmrgm4_define([_lt_decl_all_varnames], 14484e7590efSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 14494e7590efSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 14504e7590efSmrg]) 14514b0ead49Smrg 145249dc963fSmrg 14534e7590efSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 14544e7590efSmrg# ------------------------------------ 14554e7590efSmrg# Quote a variable value, and forward it to `config.status' so that its 14564e7590efSmrg# declaration there will have the same value as in `configure'. VARNAME 14574e7590efSmrg# must have a single quote delimited value for this to work. 14584e7590efSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 14594e7590efSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 14604b0ead49Smrg 14614b0ead49Smrg 14624e7590efSmrg# _LT_CONFIG_STATUS_DECLARATIONS 14634e7590efSmrg# ------------------------------ 14644e7590efSmrg# We delimit libtool config variables with single quotes, so when 14654e7590efSmrg# we write them to config.status, we have to be sure to quote all 14664e7590efSmrg# embedded single quotes properly. In configure, this macro expands 14674e7590efSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 146852b01e16Smrg# 14694e7590efSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 14704e7590efSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 14714e7590efSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 14724e7590efSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 14734b0ead49Smrg 14744b0ead49Smrg 14754e7590efSmrg# _LT_LIBTOOL_TAGS 14764e7590efSmrg# ---------------- 14774e7590efSmrg# Output comment and list of tags supported by the script 14784e7590efSmrgm4_defun([_LT_LIBTOOL_TAGS], 14794e7590efSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 14804e7590efSmrgavailable_tags="_LT_TAGS"dnl 14814e7590efSmrg]) 14824b0ead49Smrg 14834e7590efSmrg 14844e7590efSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 14854e7590efSmrg# ----------------------------------- 14864e7590efSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 14874e7590efSmrg# expand to a commented shell variable setting: 148849dc963fSmrg# 14894e7590efSmrg# # Some comment about what VAR is for. 14904e7590efSmrg# visible_name=$lt_internal_name 14914e7590efSmrgm4_define([_LT_LIBTOOL_DECLARE], 14924e7590efSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 14934e7590efSmrg [description])))[]dnl 14944e7590efSmrgm4_pushdef([_libtool_name], 14954e7590efSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 14964e7590efSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 14974e7590efSmrg [0], [_libtool_name=[$]$1], 14984e7590efSmrg [1], [_libtool_name=$lt_[]$1], 14994e7590efSmrg [2], [_libtool_name=$lt_[]$1], 15004e7590efSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 15014e7590efSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 15024e7590efSmrg]) 15034b0ead49Smrg 15044b0ead49Smrg 15054e7590efSmrg# _LT_LIBTOOL_CONFIG_VARS 15064e7590efSmrg# ----------------------- 15074e7590efSmrg# Produce commented declarations of non-tagged libtool config variables 15084e7590efSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 15094e7590efSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 15104e7590efSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 15114e7590efSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 15124e7590efSmrg[m4_foreach([_lt_var], 15134e7590efSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 15144e7590efSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 15154b0ead49Smrg 15164b0ead49Smrg 15174e7590efSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 15184e7590efSmrg# ------------------------- 15194e7590efSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 15204e7590efSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 15214e7590efSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 15224b0ead49Smrg 15234b0ead49Smrg 15244e7590efSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 15254e7590efSmrg# ------------------------------ 15264e7590efSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 15274b0ead49Smrg 15284b0ead49Smrg 15294e7590efSmrg# _LT_CONFIG_COMMANDS 15304e7590efSmrg# ------------------- 15314e7590efSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 15324e7590efSmrg# variables for single and double quote escaping we saved from calls 15334e7590efSmrg# to _LT_DECL, we can put quote escaped variables declarations 15344e7590efSmrg# into `config.status', and then the shell code to quote escape them in 15354e7590efSmrg# for loops in `config.status'. Finally, any additional code accumulated 15364e7590efSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 15374e7590efSmrgm4_defun([_LT_CONFIG_COMMANDS], 15384e7590efSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 15394e7590efSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 15404e7590efSmrg dnl instead of duplicating it all over again into config.status, 15414e7590efSmrg dnl then we will have config.status run $CONFIG_LT later, so it 15424e7590efSmrg dnl needs to know what name is stored there: 15434e7590efSmrg [AC_CONFIG_COMMANDS([libtool], 15444e7590efSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 15454e7590efSmrg dnl If the libtool generation code is destined for config.status, 15464e7590efSmrg dnl expand the accumulated commands and init code now: 15474e7590efSmrg [AC_CONFIG_COMMANDS([libtool], 15484e7590efSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 15494e7590efSmrg])#_LT_CONFIG_COMMANDS 155049dc963fSmrg 155149dc963fSmrg 15524e7590efSmrg# Initialize. 15534e7590efSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 15544e7590efSmrg[ 155549dc963fSmrg 15564e7590efSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 15574e7590efSmrg# if CDPATH is set. 15584e7590efSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 155949dc963fSmrg 15604e7590efSmrgsed_quote_subst='$sed_quote_subst' 15614e7590efSmrgdouble_quote_subst='$double_quote_subst' 15624e7590efSmrgdelay_variable_subst='$delay_variable_subst' 15634e7590efSmrg_LT_CONFIG_STATUS_DECLARATIONS 15644e7590efSmrgLTCC='$LTCC' 15654e7590efSmrgLTCFLAGS='$LTCFLAGS' 15664e7590efSmrgcompiler='$compiler_DEFAULT' 156749dc963fSmrg 15684e7590efSmrg# A function that is used when there is no print builtin or printf. 15694e7590efSmrgfunc_fallback_echo () 15704e7590efSmrg{ 15714e7590efSmrg eval 'cat <<_LTECHO_EOF 15724e7590efSmrg\$[]1 15734e7590efSmrg_LTECHO_EOF' 15744e7590efSmrg} 157549dc963fSmrg 15764e7590efSmrg# Quote evaled strings. 15774e7590efSmrgfor var in lt_decl_all_varnames([[ \ 15784e7590efSmrg]], lt_decl_quote_varnames); do 15794e7590efSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15804e7590efSmrg *[[\\\\\\\`\\"\\\$]]*) 15814e7590efSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 15824e7590efSmrg ;; 15834e7590efSmrg *) 15844e7590efSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15854e7590efSmrg ;; 15864e7590efSmrg esac 15874e7590efSmrgdone 158849dc963fSmrg 15894e7590efSmrg# Double-quote double-evaled strings. 15904e7590efSmrgfor var in lt_decl_all_varnames([[ \ 15914e7590efSmrg]], lt_decl_dquote_varnames); do 15924e7590efSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15934e7590efSmrg *[[\\\\\\\`\\"\\\$]]*) 15944e7590efSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 15954e7590efSmrg ;; 15964e7590efSmrg *) 15974e7590efSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15984e7590efSmrg ;; 15994e7590efSmrg esac 16004e7590efSmrgdone 160149dc963fSmrg 16024e7590efSmrg_LT_OUTPUT_LIBTOOL_INIT 160349dc963fSmrg]) 160449dc963fSmrg 16054e7590efSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 16064e7590efSmrg# ------------------------------------ 16074e7590efSmrg# Generate a child script FILE with all initialization necessary to 16084e7590efSmrg# reuse the environment learned by the parent script, and make the 16094e7590efSmrg# file executable. If COMMENT is supplied, it is inserted after the 16104e7590efSmrg# `#!' sequence but before initialization text begins. After this 16114e7590efSmrg# macro, additional text can be appended to FILE to form the body of 16124e7590efSmrg# the child script. The macro ends with non-zero status if the 16134e7590efSmrg# file could not be fully written (such as if the disk is full). 16144e7590efSmrgm4_ifdef([AS_INIT_GENERATED], 16154e7590efSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 16164e7590efSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 16174e7590efSmrg[m4_require([AS_PREPARE])]dnl 16184e7590efSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 16194e7590efSmrg[lt_write_fail=0 16204e7590efSmrgcat >$1 <<_ASEOF || lt_write_fail=1 16214e7590efSmrg#! $SHELL 16224e7590efSmrg# Generated by $as_me. 16234e7590efSmrg$2 16244e7590efSmrgSHELL=\${CONFIG_SHELL-$SHELL} 16254e7590efSmrgexport SHELL 16264e7590efSmrg_ASEOF 16274e7590efSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 16284e7590efSmrgAS_SHELL_SANITIZE 16294e7590efSmrg_AS_PREPARE 16304e7590efSmrgexec AS_MESSAGE_FD>&1 16314e7590efSmrg_ASEOF 16324e7590efSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 16334e7590efSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 163449dc963fSmrg 16354e7590efSmrg# LT_OUTPUT 16364e7590efSmrg# --------- 16374e7590efSmrg# This macro allows early generation of the libtool script (before 16384e7590efSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 16394e7590efSmrg# tests. 16404e7590efSmrgAC_DEFUN([LT_OUTPUT], 16414e7590efSmrg[: ${CONFIG_LT=./config.lt} 16424e7590efSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 16434e7590efSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 16444e7590efSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 164549dc963fSmrg 16464e7590efSmrgcat >>"$CONFIG_LT" <<\_LTEOF 16474e7590efSmrglt_cl_silent=false 16484e7590efSmrgexec AS_MESSAGE_LOG_FD>>config.log 16494e7590efSmrg{ 16504e7590efSmrg echo 16514e7590efSmrg AS_BOX([Running $as_me.]) 16524e7590efSmrg} >&AS_MESSAGE_LOG_FD 165349dc963fSmrg 16544e7590efSmrglt_cl_help="\ 16554e7590efSmrg\`$as_me' creates a local libtool stub from the current configuration, 16564e7590efSmrgfor use in further configure time tests before the real libtool is 16574e7590efSmrggenerated. 165849dc963fSmrg 16594e7590efSmrgUsage: $[0] [[OPTIONS]] 166049dc963fSmrg 16614e7590efSmrg -h, --help print this help, then exit 16624e7590efSmrg -V, --version print version number, then exit 16634e7590efSmrg -q, --quiet do not print progress messages 16644e7590efSmrg -d, --debug don't remove temporary files 166549dc963fSmrg 16664e7590efSmrgReport bugs to <bug-libtool@gnu.org>." 166749dc963fSmrg 16684e7590efSmrglt_cl_version="\ 16694e7590efSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 16704e7590efSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 16714e7590efSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 16727aa89044Smrg 16734e7590efSmrgCopyright (C) 2011 Free Software Foundation, Inc. 16744e7590efSmrgThis config.lt script is free software; the Free Software Foundation 16754e7590efSmrggives unlimited permision to copy, distribute and modify it." 167649dc963fSmrg 16774e7590efSmrgwhile test $[#] != 0 16784e7590efSmrgdo 16794e7590efSmrg case $[1] in 16804e7590efSmrg --version | --v* | -V ) 16814e7590efSmrg echo "$lt_cl_version"; exit 0 ;; 16824e7590efSmrg --help | --h* | -h ) 16834e7590efSmrg echo "$lt_cl_help"; exit 0 ;; 16844e7590efSmrg --debug | --d* | -d ) 16854e7590efSmrg debug=: ;; 16864e7590efSmrg --quiet | --q* | --silent | --s* | -q ) 16874e7590efSmrg lt_cl_silent=: ;; 168849dc963fSmrg 16894e7590efSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 16904e7590efSmrgTry \`$[0] --help' for more information.]) ;; 169149dc963fSmrg 16924e7590efSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 16934e7590efSmrgTry \`$[0] --help' for more information.]) ;; 169449dc963fSmrg esac 16954e7590efSmrg shift 169649dc963fSmrgdone 169749dc963fSmrg 16984e7590efSmrgif $lt_cl_silent; then 16994e7590efSmrg exec AS_MESSAGE_FD>/dev/null 17004e7590efSmrgfi 17014e7590efSmrg_LTEOF 170249dc963fSmrg 17034e7590efSmrgcat >>"$CONFIG_LT" <<_LTEOF 17044e7590efSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 17054e7590efSmrg_LTEOF 170649dc963fSmrg 17074e7590efSmrgcat >>"$CONFIG_LT" <<\_LTEOF 17084e7590efSmrgAC_MSG_NOTICE([creating $ofile]) 17094e7590efSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 17104e7590efSmrgAS_EXIT(0) 17114e7590efSmrg_LTEOF 17124e7590efSmrgchmod +x "$CONFIG_LT" 17137aa89044Smrg 17144e7590efSmrg# configure is writing to config.log, but config.lt does its own redirection, 17154e7590efSmrg# appending to config.log, which fails on DOS, as config.log is still kept 17164e7590efSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 17174e7590efSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 17184e7590efSmrglt_cl_success=: 17194e7590efSmrgtest "$silent" = yes && 17204e7590efSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 17214e7590efSmrgexec AS_MESSAGE_LOG_FD>/dev/null 17224e7590efSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 17234e7590efSmrgexec AS_MESSAGE_LOG_FD>>config.log 17244e7590efSmrg$lt_cl_success || AS_EXIT(1) 17254e7590efSmrg])# LT_OUTPUT 172649dc963fSmrg 172749dc963fSmrg 17284e7590efSmrg# _LT_CONFIG(TAG) 17294e7590efSmrg# --------------- 17304e7590efSmrg# If TAG is the built-in tag, create an initial libtool script with a 17314e7590efSmrg# default configuration from the untagged config vars. Otherwise add code 17324e7590efSmrg# to config.status for appending the configuration named by TAG from the 17334e7590efSmrg# matching tagged config vars. 17344e7590efSmrgm4_defun([_LT_CONFIG], 17354e7590efSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 17364e7590efSmrg_LT_CONFIG_SAVE_COMMANDS([ 17374e7590efSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 17384e7590efSmrg m4_if(_LT_TAG, [C], [ 17394e7590efSmrg # See if we are running on zsh, and set the options which allow our 17404e7590efSmrg # commands through without removal of \ escapes. 17414e7590efSmrg if test -n "${ZSH_VERSION+set}" ; then 17424e7590efSmrg setopt NO_GLOB_SUBST 17434e7590efSmrg fi 17444b0ead49Smrg 17454e7590efSmrg cfgfile="${ofile}T" 17464e7590efSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 17474e7590efSmrg $RM "$cfgfile" 17484b0ead49Smrg 17494e7590efSmrg cat <<_LT_EOF >> "$cfgfile" 17504e7590efSmrg#! $SHELL 17514b0ead49Smrg 17524e7590efSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 17534e7590efSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 17544e7590efSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 17554e7590efSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 17564e7590efSmrg# 17574e7590efSmrg_LT_COPYING 17584e7590efSmrg_LT_LIBTOOL_TAGS 17594b0ead49Smrg 17604e7590efSmrg# ### BEGIN LIBTOOL CONFIG 17614e7590efSmrg_LT_LIBTOOL_CONFIG_VARS 17624e7590efSmrg_LT_LIBTOOL_TAG_VARS 17634e7590efSmrg# ### END LIBTOOL CONFIG 17644b0ead49Smrg 17654e7590efSmrg_LT_EOF 17664b0ead49Smrg 17674e7590efSmrg case $host_os in 17684e7590efSmrg aix3*) 17694e7590efSmrg cat <<\_LT_EOF >> "$cfgfile" 17704e7590efSmrg# AIX sometimes has problems with the GCC collect2 program. For some 17714e7590efSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 17724e7590efSmrg# vanish in a puff of smoke. 17734e7590efSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 17744e7590efSmrg COLLECT_NAMES= 17754e7590efSmrg export COLLECT_NAMES 17764e7590efSmrgfi 17774e7590efSmrg_LT_EOF 17784e7590efSmrg ;; 17794e7590efSmrg esac 17804b0ead49Smrg 17814e7590efSmrg _LT_PROG_LTMAIN 17824b0ead49Smrg 17834e7590efSmrg # We use sed instead of cat because bash on DJGPP gets confused if 17844e7590efSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 17854e7590efSmrg # text mode, it properly converts lines to CR/LF. This bash problem 17864e7590efSmrg # is reportedly fixed, but why not run on old versions too? 17874e7590efSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 17884e7590efSmrg || (rm -f "$cfgfile"; exit 1) 17894b0ead49Smrg 17904e7590efSmrg _LT_PROG_REPLACE_SHELLFNS 17914b0ead49Smrg 17924e7590efSmrg mv -f "$cfgfile" "$ofile" || 17934e7590efSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 17944e7590efSmrg chmod +x "$ofile" 17954e7590efSmrg], 17964e7590efSmrg[cat <<_LT_EOF >> "$ofile" 17974b0ead49Smrg 17984e7590efSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 17994e7590efSmrgdnl in a comment (ie after a #). 18004e7590efSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 18014e7590efSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 18024e7590efSmrg# ### END LIBTOOL TAG CONFIG: $1 18034e7590efSmrg_LT_EOF 18044e7590efSmrg])dnl /m4_if 18054e7590efSmrg], 18064e7590efSmrg[m4_if([$1], [], [ 18074e7590efSmrg PACKAGE='$PACKAGE' 18084e7590efSmrg VERSION='$VERSION' 18094e7590efSmrg TIMESTAMP='$TIMESTAMP' 18104e7590efSmrg RM='$RM' 18114e7590efSmrg ofile='$ofile'], []) 18124e7590efSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 18134e7590efSmrg])# _LT_CONFIG 18144b0ead49Smrg 18157aa89044Smrg 18164e7590efSmrg# LT_SUPPORTED_TAG(TAG) 18174e7590efSmrg# --------------------- 18184e7590efSmrg# Trace this macro to discover what tags are supported by the libtool 18194e7590efSmrg# --tag option, using: 18204e7590efSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 18214e7590efSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 18227aa89044Smrg 18237aa89044Smrg 18244e7590efSmrg# C support is built-in for now 18254e7590efSmrgm4_define([_LT_LANG_C_enabled], []) 18264e7590efSmrgm4_define([_LT_TAGS], []) 18277aa89044Smrg 18284b0ead49Smrg 18294e7590efSmrg# LT_LANG(LANG) 18304e7590efSmrg# ------------- 18314e7590efSmrg# Enable libtool support for the given language if not already enabled. 18324e7590efSmrgAC_DEFUN([LT_LANG], 18334e7590efSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 18344e7590efSmrgm4_case([$1], 18354e7590efSmrg [C], [_LT_LANG(C)], 18364e7590efSmrg [C++], [_LT_LANG(CXX)], 18374e7590efSmrg [Go], [_LT_LANG(GO)], 18384e7590efSmrg [Java], [_LT_LANG(GCJ)], 18394e7590efSmrg [Fortran 77], [_LT_LANG(F77)], 18404e7590efSmrg [Fortran], [_LT_LANG(FC)], 18414e7590efSmrg [Windows Resource], [_LT_LANG(RC)], 18424e7590efSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 18434e7590efSmrg [_LT_LANG($1)], 18444e7590efSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 18454e7590efSmrg])# LT_LANG 18464b0ead49Smrg 18474b0ead49Smrg 18484e7590efSmrg# _LT_LANG(LANGNAME) 18494e7590efSmrg# ------------------ 18504e7590efSmrgm4_defun([_LT_LANG], 18514e7590efSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 18524e7590efSmrg [LT_SUPPORTED_TAG([$1])dnl 18534e7590efSmrg m4_append([_LT_TAGS], [$1 ])dnl 18544e7590efSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 18554e7590efSmrg _LT_LANG_$1_CONFIG($1)])dnl 18564e7590efSmrg])# _LT_LANG 18574b0ead49Smrg 18584b0ead49Smrg 18594e7590efSmrgm4_ifndef([AC_PROG_GO], [ 18604e7590efSmrg# NOTE: This macro has been submitted for inclusion into # 18614e7590efSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 18624e7590efSmrg# a released version of Autoconf we should remove this # 18634e7590efSmrg# macro and use it instead. # 18644e7590efSmrgm4_defun([AC_PROG_GO], 18654e7590efSmrg[AC_LANG_PUSH(Go)dnl 18664e7590efSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 18674e7590efSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 18684e7590efSmrg_AC_ARG_VAR_LDFLAGS()dnl 18694e7590efSmrgAC_CHECK_TOOL(GOC, gccgo) 18704e7590efSmrgif test -z "$GOC"; then 18714e7590efSmrg if test -n "$ac_tool_prefix"; then 18724e7590efSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 18734e7590efSmrg fi 18744e7590efSmrgfi 18754e7590efSmrgif test -z "$GOC"; then 18764e7590efSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 18774e7590efSmrgfi 18784e7590efSmrg])#m4_defun 18794e7590efSmrg])#m4_ifndef 188049dc963fSmrg 188149dc963fSmrg 18824e7590efSmrg# _LT_LANG_DEFAULT_CONFIG 18834e7590efSmrg# ----------------------- 18844e7590efSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 18854e7590efSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 18864e7590efSmrg [LT_LANG(CXX)], 18874e7590efSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 188849dc963fSmrg 18894e7590efSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 18904e7590efSmrg [LT_LANG(F77)], 18914e7590efSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 18924b0ead49Smrg 18934e7590efSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 18944e7590efSmrg [LT_LANG(FC)], 18954e7590efSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 189649dc963fSmrg 18974e7590efSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 18984e7590efSmrgdnl pulling things in needlessly. 18994e7590efSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 19004e7590efSmrg [LT_LANG(GCJ)], 19014e7590efSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 19024e7590efSmrg [LT_LANG(GCJ)], 19034e7590efSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 19044e7590efSmrg [LT_LANG(GCJ)], 19054e7590efSmrg [m4_ifdef([AC_PROG_GCJ], 19064e7590efSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 19074e7590efSmrg m4_ifdef([A][M_PROG_GCJ], 19084e7590efSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 19094e7590efSmrg m4_ifdef([LT_PROG_GCJ], 19104e7590efSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 191149dc963fSmrg 19124e7590efSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 19134e7590efSmrg [LT_LANG(GO)], 19144e7590efSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 191549dc963fSmrg 19164e7590efSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 19174e7590efSmrg [LT_LANG(RC)], 19184e7590efSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 19194e7590efSmrg])# _LT_LANG_DEFAULT_CONFIG 192049dc963fSmrg 19214e7590efSmrg# Obsolete macros: 19224e7590efSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 19234e7590efSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 19244e7590efSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 19254e7590efSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 19264e7590efSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 19274e7590efSmrgdnl aclocal-1.4 backwards compatibility: 19284e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 19294e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 19304e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 19314e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 19324e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 193349dc963fSmrg 193449dc963fSmrg 19354e7590efSmrg# _LT_TAG_COMPILER 19364e7590efSmrg# ---------------- 19374e7590efSmrgm4_defun([_LT_TAG_COMPILER], 19384e7590efSmrg[AC_REQUIRE([AC_PROG_CC])dnl 19394b0ead49Smrg 19404e7590efSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 19414e7590efSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 19424e7590efSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 19434e7590efSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 19444b0ead49Smrg 19454e7590efSmrg# If no C compiler was specified, use CC. 19464e7590efSmrgLTCC=${LTCC-"$CC"} 19474b0ead49Smrg 19484e7590efSmrg# If no C compiler flags were specified, use CFLAGS. 19494e7590efSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 19504b0ead49Smrg 19514e7590efSmrg# Allow CC to be a program name with arguments. 19524e7590efSmrgcompiler=$CC 19534e7590efSmrg])# _LT_TAG_COMPILER 19544b0ead49Smrg 195552b01e16Smrg 19564e7590efSmrg# _LT_COMPILER_BOILERPLATE 19574e7590efSmrg# ------------------------ 19584e7590efSmrg# Check for compiler boilerplate output or warnings with 19594e7590efSmrg# the simple compiler test code. 19604e7590efSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 19614e7590efSmrg[m4_require([_LT_DECL_SED])dnl 19624e7590efSmrgac_outfile=conftest.$ac_objext 19634e7590efSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 19644e7590efSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19654e7590efSmrg_lt_compiler_boilerplate=`cat conftest.err` 19664e7590efSmrg$RM conftest* 19674e7590efSmrg])# _LT_COMPILER_BOILERPLATE 19684b0ead49Smrg 19694b0ead49Smrg 19704e7590efSmrg# _LT_LINKER_BOILERPLATE 19714e7590efSmrg# ---------------------- 19724e7590efSmrg# Check for linker boilerplate output or warnings with 19734e7590efSmrg# the simple link test code. 19744e7590efSmrgm4_defun([_LT_LINKER_BOILERPLATE], 19754e7590efSmrg[m4_require([_LT_DECL_SED])dnl 19764e7590efSmrgac_outfile=conftest.$ac_objext 19774e7590efSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 19784e7590efSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19794e7590efSmrg_lt_linker_boilerplate=`cat conftest.err` 19804e7590efSmrg$RM -r conftest* 19814e7590efSmrg])# _LT_LINKER_BOILERPLATE 198249dc963fSmrg 19834e7590efSmrg# _LT_REQUIRED_DARWIN_CHECKS 19844e7590efSmrg# ------------------------- 19854e7590efSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 19864e7590efSmrg case $host_os in 19874e7590efSmrg rhapsody* | darwin*) 19884e7590efSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 19894e7590efSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 19904e7590efSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 19914e7590efSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 19924e7590efSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 19934e7590efSmrg _LT_DECL([], [DSYMUTIL], [1], 19944e7590efSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 19954e7590efSmrg _LT_DECL([], [NMEDIT], [1], 19964e7590efSmrg [Tool to change global to local symbols on Mac OS X]) 19974e7590efSmrg _LT_DECL([], [LIPO], [1], 19984e7590efSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 19994e7590efSmrg _LT_DECL([], [OTOOL], [1], 20004e7590efSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 20014e7590efSmrg _LT_DECL([], [OTOOL64], [1], 20024e7590efSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 200349dc963fSmrg 20044e7590efSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 20054e7590efSmrg [lt_cv_apple_cc_single_mod=no 20064e7590efSmrg if test -z "${LT_MULTI_MODULE}"; then 20074e7590efSmrg # By default we will add the -single_module flag. You can override 20084e7590efSmrg # by either setting the environment variable LT_MULTI_MODULE 20094e7590efSmrg # non-empty at configure time, or by adding -multi_module to the 20104e7590efSmrg # link flags. 20114e7590efSmrg rm -rf libconftest.dylib* 20124e7590efSmrg echo "int foo(void){return 1;}" > conftest.c 20134e7590efSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20144e7590efSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 20154e7590efSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20164e7590efSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 20174e7590efSmrg _lt_result=$? 20184e7590efSmrg # If there is a non-empty error log, and "single_module" 20194e7590efSmrg # appears in it, assume the flag caused a linker warning 20204e7590efSmrg if test -s conftest.err && $GREP single_module conftest.err; then 20214e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20224e7590efSmrg # Otherwise, if the output was created with a 0 exit code from 20234e7590efSmrg # the compiler, it worked. 20244e7590efSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 20254e7590efSmrg lt_cv_apple_cc_single_mod=yes 20264e7590efSmrg else 20274e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20284e7590efSmrg fi 20294e7590efSmrg rm -rf libconftest.dylib* 20304e7590efSmrg rm -f conftest.* 20314e7590efSmrg fi]) 203249dc963fSmrg 20334e7590efSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 20344e7590efSmrg [lt_cv_ld_exported_symbols_list], 20354e7590efSmrg [lt_cv_ld_exported_symbols_list=no 20364e7590efSmrg save_LDFLAGS=$LDFLAGS 20374e7590efSmrg echo "_main" > conftest.sym 20384e7590efSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 20394e7590efSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 20404e7590efSmrg [lt_cv_ld_exported_symbols_list=yes], 20414e7590efSmrg [lt_cv_ld_exported_symbols_list=no]) 20424e7590efSmrg LDFLAGS="$save_LDFLAGS" 20434e7590efSmrg ]) 204449dc963fSmrg 20454e7590efSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 20464e7590efSmrg [lt_cv_ld_force_load=no 20474e7590efSmrg cat > conftest.c << _LT_EOF 20484e7590efSmrgint forced_loaded() { return 2;} 20494e7590efSmrg_LT_EOF 20504e7590efSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 20514e7590efSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 20524e7590efSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 20534e7590efSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 20544e7590efSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 20554e7590efSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 20564e7590efSmrg cat > conftest.c << _LT_EOF 20574e7590efSmrgint main() { return 0;} 20584e7590efSmrg_LT_EOF 20594e7590efSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 20604e7590efSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 20614e7590efSmrg _lt_result=$? 20624e7590efSmrg if test -s conftest.err && $GREP force_load conftest.err; then 20634e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20644e7590efSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 20654e7590efSmrg lt_cv_ld_force_load=yes 20664e7590efSmrg else 20674e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20684e7590efSmrg fi 20694e7590efSmrg rm -f conftest.err libconftest.a conftest conftest.c 20704e7590efSmrg rm -rf conftest.dSYM 20714e7590efSmrg ]) 20724e7590efSmrg case $host_os in 20734e7590efSmrg rhapsody* | darwin1.[[012]]) 20744e7590efSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 20754e7590efSmrg darwin1.*) 20764e7590efSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20774e7590efSmrg darwin*) # darwin 5.x on 20784e7590efSmrg # if running on 10.5 or later, the deployment target defaults 20794e7590efSmrg # to the OS version, if on x86, and 10.4, the deployment 20804e7590efSmrg # target defaults to 10.4. Don't you love it? 20814e7590efSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 20824e7590efSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 20834e7590efSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20844e7590efSmrg 10.[[012]]*) 20854e7590efSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20864e7590efSmrg 10.*) 20874e7590efSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20884e7590efSmrg esac 20894e7590efSmrg ;; 20904e7590efSmrg esac 20914e7590efSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 20924e7590efSmrg _lt_dar_single_mod='$single_module' 20934e7590efSmrg fi 20944e7590efSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 20954e7590efSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 20964e7590efSmrg else 20974e7590efSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 20984e7590efSmrg fi 20994e7590efSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 21004e7590efSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 21014e7590efSmrg else 21024e7590efSmrg _lt_dsymutil= 21034e7590efSmrg fi 21044e7590efSmrg ;; 21054e7590efSmrg esac 21064e7590efSmrg]) 210749dc963fSmrg 210849dc963fSmrg 21094e7590efSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 21104e7590efSmrg# --------------------------------- 21114e7590efSmrg# Checks for linker and compiler features on darwin 21124e7590efSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 21134e7590efSmrg[ 21144e7590efSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 21154e7590efSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 21164e7590efSmrg _LT_TAGVAR(hardcode_direct, $1)=no 21174e7590efSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 21184e7590efSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 21194e7590efSmrg if test "$lt_cv_ld_force_load" = "yes"; then 21204e7590efSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 21214e7590efSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 21224e7590efSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 21234e7590efSmrg else 21244e7590efSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 21254e7590efSmrg fi 21264e7590efSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 21274e7590efSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 21284e7590efSmrg case $cc_basename in 21294e7590efSmrg ifort*) _lt_dar_can_shared=yes ;; 21304e7590efSmrg *) _lt_dar_can_shared=$GCC ;; 21314e7590efSmrg esac 21324e7590efSmrg if test "$_lt_dar_can_shared" = "yes"; then 21334e7590efSmrg output_verbose_link_cmd=func_echo_all 21344e7590efSmrg _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}" 21354e7590efSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 21364e7590efSmrg _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}" 21374e7590efSmrg _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}" 21384e7590efSmrg m4_if([$1], [CXX], 21394e7590efSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 21404e7590efSmrg _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}" 21414e7590efSmrg _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}" 21424e7590efSmrg fi 21434e7590efSmrg],[]) 21444e7590efSmrg else 21454e7590efSmrg _LT_TAGVAR(ld_shlibs, $1)=no 21464e7590efSmrg fi 214749dc963fSmrg]) 214849dc963fSmrg 21494e7590efSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 21504e7590efSmrg# ---------------------------------- 21514e7590efSmrg# Links a minimal program and checks the executable 21524e7590efSmrg# for the system default hardcoded library path. In most cases, 21534e7590efSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 21544e7590efSmrg# the location of the communication and MPI libs are included too. 21554e7590efSmrg# If we don't find anything, use the default library path according 21564e7590efSmrg# to the aix ld manual. 21574e7590efSmrg# Store the results from the different compilers for each TAGNAME. 21584e7590efSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 21594e7590efSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 21604e7590efSmrg[m4_require([_LT_DECL_SED])dnl 21614e7590efSmrgif test "${lt_cv_aix_libpath+set}" = set; then 21624e7590efSmrg aix_libpath=$lt_cv_aix_libpath 21634e7590efSmrgelse 21644e7590efSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 21654e7590efSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 21664e7590efSmrg lt_aix_libpath_sed='[ 21674e7590efSmrg /Import File Strings/,/^$/ { 21684e7590efSmrg /^0/ { 21694e7590efSmrg s/^0 *\([^ ]*\) *$/\1/ 21704e7590efSmrg p 21714e7590efSmrg } 21724e7590efSmrg }]' 21734e7590efSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21744e7590efSmrg # Check for a 64-bit object if we didn't find anything. 21754e7590efSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21764e7590efSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21774e7590efSmrg fi],[]) 21784e7590efSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21794e7590efSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 21804e7590efSmrg fi 21814e7590efSmrg ]) 21824e7590efSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 21834e7590efSmrgfi 21844e7590efSmrg])# _LT_SYS_MODULE_PATH_AIX 218549dc963fSmrg 218649dc963fSmrg 21874e7590efSmrg# _LT_SHELL_INIT(ARG) 21884e7590efSmrg# ------------------- 21894e7590efSmrgm4_define([_LT_SHELL_INIT], 21904e7590efSmrg[m4_divert_text([M4SH-INIT], [$1 21914e7590efSmrg])])# _LT_SHELL_INIT 219249dc963fSmrg 219349dc963fSmrg 219449dc963fSmrg 21954e7590efSmrg# _LT_PROG_ECHO_BACKSLASH 21964e7590efSmrg# ----------------------- 21974e7590efSmrg# Find how we can fake an echo command that does not interpret backslash. 21984e7590efSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 21994e7590efSmrg# of the generated configure script which will find a shell with a builtin 22004e7590efSmrg# printf (which we can use as an echo command). 22014e7590efSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 22024e7590efSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22034e7590efSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22044e7590efSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 220549dc963fSmrg 22064e7590efSmrgAC_MSG_CHECKING([how to print strings]) 22074e7590efSmrg# Test print first, because it will be a builtin if present. 22084e7590efSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 22094e7590efSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 22104e7590efSmrg ECHO='print -r --' 22114e7590efSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 22124e7590efSmrg ECHO='printf %s\n' 22134e7590efSmrgelse 22144e7590efSmrg # Use this function as a fallback that always works. 22154e7590efSmrg func_fallback_echo () 22164e7590efSmrg { 22174e7590efSmrg eval 'cat <<_LTECHO_EOF 22184e7590efSmrg$[]1 22194e7590efSmrg_LTECHO_EOF' 22204e7590efSmrg } 22214e7590efSmrg ECHO='func_fallback_echo' 22224e7590efSmrgfi 222349dc963fSmrg 22244e7590efSmrg# func_echo_all arg... 22254e7590efSmrg# Invoke $ECHO with all args, space-separated. 22264e7590efSmrgfunc_echo_all () 22274e7590efSmrg{ 22284e7590efSmrg $ECHO "$*" 22294e7590efSmrg} 223049dc963fSmrg 22314e7590efSmrgcase "$ECHO" in 22324e7590efSmrg printf*) AC_MSG_RESULT([printf]) ;; 22334e7590efSmrg print*) AC_MSG_RESULT([print -r]) ;; 22344e7590efSmrg *) AC_MSG_RESULT([cat]) ;; 22354e7590efSmrgesac 223649dc963fSmrg 22374e7590efSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 22384e7590efSmrg[_AS_DETECT_SUGGESTED([ 22394e7590efSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 22404e7590efSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22414e7590efSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22424e7590efSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 22434e7590efSmrg PATH=/empty FPATH=/empty; export PATH FPATH 22444e7590efSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 22454e7590efSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 224649dc963fSmrg 22474e7590efSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 22484e7590efSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 22494e7590efSmrg])# _LT_PROG_ECHO_BACKSLASH 225049dc963fSmrg 225149dc963fSmrg 22524e7590efSmrg# _LT_WITH_SYSROOT 22534e7590efSmrg# ---------------- 22544e7590efSmrgAC_DEFUN([_LT_WITH_SYSROOT], 22554e7590efSmrg[AC_MSG_CHECKING([for sysroot]) 22564e7590efSmrgAC_ARG_WITH([sysroot], 22574e7590efSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 22584e7590efSmrg (or the compiler's sysroot if not specified).], 22594e7590efSmrg[], [with_sysroot=no]) 22604e7590efSmrg 22614e7590efSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 22624e7590efSmrgdnl in case the user passed a directory name. 22634e7590efSmrglt_sysroot= 22644e7590efSmrgcase ${with_sysroot} in #( 22654e7590efSmrg yes) 22664e7590efSmrg if test "$GCC" = yes; then 22674e7590efSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 22684e7590efSmrg fi 22694e7590efSmrg ;; #( 22704e7590efSmrg /*) 22714e7590efSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 22724e7590efSmrg ;; #( 22734e7590efSmrg no|'') 22744e7590efSmrg ;; #( 22754e7590efSmrg *) 22764e7590efSmrg AC_MSG_RESULT([${with_sysroot}]) 22774e7590efSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 22784e7590efSmrg ;; 22794e7590efSmrgesac 228049dc963fSmrg 22814e7590efSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 22824e7590efSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 22834e7590efSmrg[dependent libraries, and in which our libraries should be installed.])]) 228449dc963fSmrg 22854e7590efSmrg# _LT_ENABLE_LOCK 22864e7590efSmrg# --------------- 22874e7590efSmrgm4_defun([_LT_ENABLE_LOCK], 22884e7590efSmrg[AC_ARG_ENABLE([libtool-lock], 22894e7590efSmrg [AS_HELP_STRING([--disable-libtool-lock], 22904e7590efSmrg [avoid locking (might break parallel builds)])]) 22914e7590efSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 229249dc963fSmrg 22934e7590efSmrg# Some flags need to be propagated to the compiler or linker for good 22944e7590efSmrg# libtool support. 22954e7590efSmrgcase $host in 22964e7590efSmrgia64-*-hpux*) 22974e7590efSmrg # Find out which ABI we are using. 22984e7590efSmrg echo 'int i;' > conftest.$ac_ext 22994e7590efSmrg if AC_TRY_EVAL(ac_compile); then 23004e7590efSmrg case `/usr/bin/file conftest.$ac_objext` in 23014e7590efSmrg *ELF-32*) 23024e7590efSmrg HPUX_IA64_MODE="32" 23034e7590efSmrg ;; 23044e7590efSmrg *ELF-64*) 23054e7590efSmrg HPUX_IA64_MODE="64" 23064e7590efSmrg ;; 23074e7590efSmrg esac 23084e7590efSmrg fi 23094e7590efSmrg rm -rf conftest* 23104e7590efSmrg ;; 23114e7590efSmrg*-*-irix6*) 23124e7590efSmrg # Find out which ABI we are using. 23134e7590efSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 23144e7590efSmrg if AC_TRY_EVAL(ac_compile); then 23154e7590efSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 23164e7590efSmrg case `/usr/bin/file conftest.$ac_objext` in 23174e7590efSmrg *32-bit*) 23184e7590efSmrg LD="${LD-ld} -melf32bsmip" 23194e7590efSmrg ;; 23204e7590efSmrg *N32*) 23214e7590efSmrg LD="${LD-ld} -melf32bmipn32" 23224e7590efSmrg ;; 23234e7590efSmrg *64-bit*) 23244e7590efSmrg LD="${LD-ld} -melf64bmip" 23254e7590efSmrg ;; 23264e7590efSmrg esac 23274e7590efSmrg else 23284e7590efSmrg case `/usr/bin/file conftest.$ac_objext` in 23294e7590efSmrg *32-bit*) 23304e7590efSmrg LD="${LD-ld} -32" 23314e7590efSmrg ;; 23324e7590efSmrg *N32*) 23334e7590efSmrg LD="${LD-ld} -n32" 23344e7590efSmrg ;; 23354e7590efSmrg *64-bit*) 23364e7590efSmrg LD="${LD-ld} -64" 23374e7590efSmrg ;; 23384e7590efSmrg esac 23394e7590efSmrg fi 23404e7590efSmrg fi 23414e7590efSmrg rm -rf conftest* 23424e7590efSmrg ;; 23437aa89044Smrg 23444e7590efSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 23454e7590efSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 23464e7590efSmrg # Find out which ABI we are using. 23474e7590efSmrg echo 'int i;' > conftest.$ac_ext 23484e7590efSmrg if AC_TRY_EVAL(ac_compile); then 23494e7590efSmrg case `/usr/bin/file conftest.o` in 23504e7590efSmrg *32-bit*) 23514e7590efSmrg case $host in 23524e7590efSmrg x86_64-*kfreebsd*-gnu) 23534e7590efSmrg LD="${LD-ld} -m elf_i386_fbsd" 23544e7590efSmrg ;; 23554e7590efSmrg x86_64-*linux*) 23564e7590efSmrg LD="${LD-ld} -m elf_i386" 23574e7590efSmrg ;; 23584e7590efSmrg ppc64-*linux*|powerpc64-*linux*) 23594e7590efSmrg LD="${LD-ld} -m elf32ppclinux" 23604e7590efSmrg ;; 23614e7590efSmrg s390x-*linux*) 23624e7590efSmrg LD="${LD-ld} -m elf_s390" 23634e7590efSmrg ;; 23644e7590efSmrg sparc64-*linux*) 23654e7590efSmrg LD="${LD-ld} -m elf32_sparc" 23664e7590efSmrg ;; 23674e7590efSmrg esac 23684e7590efSmrg ;; 23694e7590efSmrg *64-bit*) 23704e7590efSmrg case $host in 23714e7590efSmrg x86_64-*kfreebsd*-gnu) 23724e7590efSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 23734e7590efSmrg ;; 23744e7590efSmrg x86_64-*linux*) 23754e7590efSmrg LD="${LD-ld} -m elf_x86_64" 23764e7590efSmrg ;; 23774e7590efSmrg ppc*-*linux*|powerpc*-*linux*) 23784e7590efSmrg LD="${LD-ld} -m elf64ppc" 23794e7590efSmrg ;; 23804e7590efSmrg s390*-*linux*|s390*-*tpf*) 23814e7590efSmrg LD="${LD-ld} -m elf64_s390" 23824e7590efSmrg ;; 23834e7590efSmrg sparc*-*linux*) 23844e7590efSmrg LD="${LD-ld} -m elf64_sparc" 23854e7590efSmrg ;; 23864e7590efSmrg esac 23874e7590efSmrg ;; 238849dc963fSmrg esac 23894e7590efSmrg fi 23904e7590efSmrg rm -rf conftest* 23914e7590efSmrg ;; 239249dc963fSmrg 23934e7590efSmrg*-*-sco3.2v5*) 23944e7590efSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 23954e7590efSmrg SAVE_CFLAGS="$CFLAGS" 23964e7590efSmrg CFLAGS="$CFLAGS -belf" 23974e7590efSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 23984e7590efSmrg [AC_LANG_PUSH(C) 23994e7590efSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 24004e7590efSmrg AC_LANG_POP]) 24014e7590efSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24024e7590efSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24034e7590efSmrg CFLAGS="$SAVE_CFLAGS" 24044e7590efSmrg fi 24054e7590efSmrg ;; 24064e7590efSmrg*-*solaris*) 24074e7590efSmrg # Find out which ABI we are using. 24084e7590efSmrg echo 'int i;' > conftest.$ac_ext 24094e7590efSmrg if AC_TRY_EVAL(ac_compile); then 24104e7590efSmrg case `/usr/bin/file conftest.o` in 24114e7590efSmrg *64-bit*) 24124e7590efSmrg case $lt_cv_prog_gnu_ld in 24134e7590efSmrg yes*) 24144e7590efSmrg case $host in 24154e7590efSmrg i?86-*-solaris*) 24164e7590efSmrg LD="${LD-ld} -m elf_x86_64" 24174e7590efSmrg ;; 24184e7590efSmrg sparc*-*-solaris*) 24194e7590efSmrg LD="${LD-ld} -m elf64_sparc" 24204e7590efSmrg ;; 24214e7590efSmrg esac 24224e7590efSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 24234e7590efSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 24244e7590efSmrg LD="${LD-ld}_sol2" 24254e7590efSmrg fi 24264e7590efSmrg ;; 24274e7590efSmrg *) 24284e7590efSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 24294e7590efSmrg LD="${LD-ld} -64" 24304e7590efSmrg fi 24314e7590efSmrg ;; 24324e7590efSmrg esac 243349dc963fSmrg ;; 243449dc963fSmrg esac 24354e7590efSmrg fi 24364e7590efSmrg rm -rf conftest* 24374e7590efSmrg ;; 24384e7590efSmrgesac 243949dc963fSmrg 24404e7590efSmrgneed_locks="$enable_libtool_lock" 24414e7590efSmrg])# _LT_ENABLE_LOCK 244249dc963fSmrg 244349dc963fSmrg 24444e7590efSmrg# _LT_PROG_AR 24454e7590efSmrg# ----------- 24464e7590efSmrgm4_defun([_LT_PROG_AR], 24474e7590efSmrg[AC_CHECK_TOOLS(AR, [ar], false) 24484e7590efSmrg: ${AR=ar} 24494e7590efSmrg: ${AR_FLAGS=cru} 24504e7590efSmrg_LT_DECL([], [AR], [1], [The archiver]) 24514e7590efSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 24524e7590efSmrg 24534e7590efSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 24544e7590efSmrg [lt_cv_ar_at_file=no 24554e7590efSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 24564e7590efSmrg [echo conftest.$ac_objext > conftest.lst 24574e7590efSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 24584e7590efSmrg AC_TRY_EVAL([lt_ar_try]) 24594e7590efSmrg if test "$ac_status" -eq 0; then 24604e7590efSmrg # Ensure the archiver fails upon bogus file names. 24614e7590efSmrg rm -f conftest.$ac_objext libconftest.a 24624e7590efSmrg AC_TRY_EVAL([lt_ar_try]) 24634e7590efSmrg if test "$ac_status" -ne 0; then 24644e7590efSmrg lt_cv_ar_at_file=@ 24654e7590efSmrg fi 24664e7590efSmrg fi 24674e7590efSmrg rm -f conftest.* libconftest.a 24684e7590efSmrg ]) 24694e7590efSmrg ]) 247049dc963fSmrg 24714e7590efSmrgif test "x$lt_cv_ar_at_file" = xno; then 24724e7590efSmrg archiver_list_spec= 24734e7590efSmrgelse 24744e7590efSmrg archiver_list_spec=$lt_cv_ar_at_file 24754e7590efSmrgfi 24764e7590efSmrg_LT_DECL([], [archiver_list_spec], [1], 24774e7590efSmrg [How to feed a file listing to the archiver]) 24784e7590efSmrg])# _LT_PROG_AR 247949dc963fSmrg 248049dc963fSmrg 24814e7590efSmrg# _LT_CMD_OLD_ARCHIVE 24824e7590efSmrg# ------------------- 24834e7590efSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 24844e7590efSmrg[_LT_PROG_AR 248549dc963fSmrg 24864e7590efSmrgAC_CHECK_TOOL(STRIP, strip, :) 24874e7590efSmrgtest -z "$STRIP" && STRIP=: 24884e7590efSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 248949dc963fSmrg 24904e7590efSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 24914e7590efSmrgtest -z "$RANLIB" && RANLIB=: 24924e7590efSmrg_LT_DECL([], [RANLIB], [1], 24934e7590efSmrg [Commands used to install an old-style archive]) 249449dc963fSmrg 24954e7590efSmrg# Determine commands to create old-style static archives. 24964e7590efSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 24974e7590efSmrgold_postinstall_cmds='chmod 644 $oldlib' 24984e7590efSmrgold_postuninstall_cmds= 249949dc963fSmrg 25004e7590efSmrgif test -n "$RANLIB"; then 25014e7590efSmrg case $host_os in 25024e7590efSmrg openbsd*) 25034e7590efSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 25044e7590efSmrg ;; 25054e7590efSmrg *) 25064e7590efSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 25074e7590efSmrg ;; 250849dc963fSmrg esac 25094e7590efSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 251049dc963fSmrgfi 251149dc963fSmrg 25124e7590efSmrgcase $host_os in 25134e7590efSmrg darwin*) 25144e7590efSmrg lock_old_archive_extraction=yes ;; 25154e7590efSmrg *) 25164e7590efSmrg lock_old_archive_extraction=no ;; 25174e7590efSmrgesac 25184e7590efSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 25194e7590efSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 25204e7590efSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 25214e7590efSmrg [Commands used to build an old-style archive]) 25224e7590efSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 25234e7590efSmrg [Whether to use a lock for old archive extraction]) 25244e7590efSmrg])# _LT_CMD_OLD_ARCHIVE 252549dc963fSmrg 252649dc963fSmrg 25274e7590efSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25284e7590efSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 25294e7590efSmrg# ---------------------------------------------------------------- 25304e7590efSmrg# Check whether the given compiler option works 25314e7590efSmrgAC_DEFUN([_LT_COMPILER_OPTION], 253249dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25334e7590efSmrgm4_require([_LT_DECL_SED])dnl 25344e7590efSmrgAC_CACHE_CHECK([$1], [$2], 25354e7590efSmrg [$2=no 25364e7590efSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 25374e7590efSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 25384e7590efSmrg lt_compiler_flag="$3" 25394e7590efSmrg # Insert the option either (1) after the last *FLAGS variable, or 25404e7590efSmrg # (2) before a word containing "conftest.", or (3) at the end. 25414e7590efSmrg # Note that $ac_compile itself does not contain backslashes and begins 25424e7590efSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 25434e7590efSmrg # The option is referenced via a variable to avoid confusing sed. 25444e7590efSmrg lt_compile=`echo "$ac_compile" | $SED \ 25454e7590efSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 25464e7590efSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 25474e7590efSmrg -e 's:$: $lt_compiler_flag:'` 25484e7590efSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 25494e7590efSmrg (eval "$lt_compile" 2>conftest.err) 25504e7590efSmrg ac_status=$? 25514e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 25524e7590efSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 25534e7590efSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 25544e7590efSmrg # The compiler can only warn and ignore the option if not recognized 25554e7590efSmrg # So say no if there are warnings other than the usual output. 25564e7590efSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 25574e7590efSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25584e7590efSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 25594e7590efSmrg $2=yes 25604e7590efSmrg fi 25614e7590efSmrg fi 25624e7590efSmrg $RM conftest* 25634e7590efSmrg]) 256449dc963fSmrg 25654e7590efSmrgif test x"[$]$2" = xyes; then 25664e7590efSmrg m4_if([$5], , :, [$5]) 25674e7590efSmrgelse 25684e7590efSmrg m4_if([$6], , :, [$6]) 25694e7590efSmrgfi 25704e7590efSmrg])# _LT_COMPILER_OPTION 257149dc963fSmrg 25724e7590efSmrg# Old name: 25734e7590efSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 25744e7590efSmrgdnl aclocal-1.4 backwards compatibility: 25754e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 257649dc963fSmrg 257749dc963fSmrg 25784e7590efSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25794e7590efSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 25804e7590efSmrg# ---------------------------------------------------- 25814e7590efSmrg# Check whether the given linker option works 25824e7590efSmrgAC_DEFUN([_LT_LINKER_OPTION], 25834e7590efSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25844e7590efSmrgm4_require([_LT_DECL_SED])dnl 25854e7590efSmrgAC_CACHE_CHECK([$1], [$2], 25864e7590efSmrg [$2=no 25874e7590efSmrg save_LDFLAGS="$LDFLAGS" 25884e7590efSmrg LDFLAGS="$LDFLAGS $3" 25894e7590efSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 25904e7590efSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 25914e7590efSmrg # The linker can only warn and ignore the option if not recognized 25924e7590efSmrg # So say no if there are warnings 25934e7590efSmrg if test -s conftest.err; then 25944e7590efSmrg # Append any errors to the config.log. 25954e7590efSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 25964e7590efSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 25974e7590efSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25984e7590efSmrg if diff conftest.exp conftest.er2 >/dev/null; then 25994e7590efSmrg $2=yes 26004e7590efSmrg fi 26014e7590efSmrg else 26024e7590efSmrg $2=yes 26034e7590efSmrg fi 26044e7590efSmrg fi 26054e7590efSmrg $RM -r conftest* 26064e7590efSmrg LDFLAGS="$save_LDFLAGS" 26074e7590efSmrg]) 260849dc963fSmrg 26094e7590efSmrgif test x"[$]$2" = xyes; then 26104e7590efSmrg m4_if([$4], , :, [$4]) 26114e7590efSmrgelse 26124e7590efSmrg m4_if([$5], , :, [$5]) 261349dc963fSmrgfi 26144e7590efSmrg])# _LT_LINKER_OPTION 261549dc963fSmrg 26164e7590efSmrg# Old name: 26174e7590efSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 26184e7590efSmrgdnl aclocal-1.4 backwards compatibility: 26194e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 262049dc963fSmrg 262149dc963fSmrg 26224e7590efSmrg# LT_CMD_MAX_LEN 26234e7590efSmrg#--------------- 26244e7590efSmrgAC_DEFUN([LT_CMD_MAX_LEN], 26254e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26264e7590efSmrg# find the maximum length of command line arguments 26274e7590efSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 26284e7590efSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 26294e7590efSmrg i=0 26304e7590efSmrg teststring="ABCD" 263149dc963fSmrg 26324e7590efSmrg case $build_os in 26334e7590efSmrg msdosdjgpp*) 26344e7590efSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 26354e7590efSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 26364e7590efSmrg # during glob expansion). Even if it were fixed, the result of this 26374e7590efSmrg # check would be larger than it should be. 26384e7590efSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 26394e7590efSmrg ;; 264049dc963fSmrg 26414e7590efSmrg gnu*) 26424e7590efSmrg # Under GNU Hurd, this test is not required because there is 26434e7590efSmrg # no limit to the length of command line arguments. 26444e7590efSmrg # Libtool will interpret -1 as no limit whatsoever 26454e7590efSmrg lt_cv_sys_max_cmd_len=-1; 26464e7590efSmrg ;; 264749dc963fSmrg 26484e7590efSmrg cygwin* | mingw* | cegcc*) 26494e7590efSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 26504e7590efSmrg # about 5 minutes as the teststring grows exponentially. 26514e7590efSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 26524e7590efSmrg # you end up with a "frozen" computer, even though with patience 26534e7590efSmrg # the test eventually succeeds (with a max line length of 256k). 26544e7590efSmrg # Instead, let's just punt: use the minimum linelength reported by 26554e7590efSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 26564e7590efSmrg lt_cv_sys_max_cmd_len=8192; 26574e7590efSmrg ;; 265849dc963fSmrg 26594e7590efSmrg mint*) 26604e7590efSmrg # On MiNT this can take a long time and run out of memory. 26614e7590efSmrg lt_cv_sys_max_cmd_len=8192; 26624e7590efSmrg ;; 266349dc963fSmrg 26644e7590efSmrg amigaos*) 26654e7590efSmrg # On AmigaOS with pdksh, this test takes hours, literally. 26664e7590efSmrg # So we just punt and use a minimum line length of 8192. 26674e7590efSmrg lt_cv_sys_max_cmd_len=8192; 26684e7590efSmrg ;; 266949dc963fSmrg 26704e7590efSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 26714e7590efSmrg # This has been around since 386BSD, at least. Likely further. 26724e7590efSmrg if test -x /sbin/sysctl; then 26734e7590efSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 26744e7590efSmrg elif test -x /usr/sbin/sysctl; then 26754e7590efSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 26764e7590efSmrg else 26774e7590efSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 26784e7590efSmrg fi 26794e7590efSmrg # And add a safety zone 26804e7590efSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 26814e7590efSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 26824e7590efSmrg ;; 268349dc963fSmrg 26844e7590efSmrg interix*) 26854e7590efSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 26864e7590efSmrg lt_cv_sys_max_cmd_len=196608 26874e7590efSmrg ;; 268849dc963fSmrg 26894e7590efSmrg os2*) 26904e7590efSmrg # The test takes a long time on OS/2. 26914e7590efSmrg lt_cv_sys_max_cmd_len=8192 26924e7590efSmrg ;; 269349dc963fSmrg 26944e7590efSmrg osf*) 26954e7590efSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 26964e7590efSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 26974e7590efSmrg # nice to cause kernel panics so lets avoid the loop below. 26984e7590efSmrg # First set a reasonable default. 26994e7590efSmrg lt_cv_sys_max_cmd_len=16384 27004e7590efSmrg # 27014e7590efSmrg if test -x /sbin/sysconfig; then 27024e7590efSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27034e7590efSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27044e7590efSmrg esac 27054e7590efSmrg fi 27064e7590efSmrg ;; 27074e7590efSmrg sco3.2v5*) 27084e7590efSmrg lt_cv_sys_max_cmd_len=102400 27094e7590efSmrg ;; 27104e7590efSmrg sysv5* | sco5v6* | sysv4.2uw2*) 27114e7590efSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27124e7590efSmrg if test -n "$kargmax"; then 27134e7590efSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27144e7590efSmrg else 27154e7590efSmrg lt_cv_sys_max_cmd_len=32768 27164e7590efSmrg fi 27174e7590efSmrg ;; 27184e7590efSmrg *) 27194e7590efSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 27204e7590efSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 27214e7590efSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27224e7590efSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27234e7590efSmrg else 27244e7590efSmrg # Make teststring a little bigger before we do anything with it. 27254e7590efSmrg # a 1K string should be a reasonable start. 27264e7590efSmrg for i in 1 2 3 4 5 6 7 8 ; do 27274e7590efSmrg teststring=$teststring$teststring 27284e7590efSmrg done 27294e7590efSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 27304e7590efSmrg # If test is not a shell built-in, we'll probably end up computing a 27314e7590efSmrg # maximum length that is only half of the actual maximum length, but 27324e7590efSmrg # we can't tell. 27334e7590efSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 27344e7590efSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 27354e7590efSmrg test $i != 17 # 1/2 MB should be enough 27364e7590efSmrg do 27374e7590efSmrg i=`expr $i + 1` 27384e7590efSmrg teststring=$teststring$teststring 27394e7590efSmrg done 27404e7590efSmrg # Only check the string length outside the loop. 27414e7590efSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 27424e7590efSmrg teststring= 27434e7590efSmrg # Add a significant safety factor because C++ compilers can tack on 27444e7590efSmrg # massive amounts of additional arguments before passing them to the 27454e7590efSmrg # linker. It appears as though 1/2 is a usable value. 27464e7590efSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 27474e7590efSmrg fi 27484e7590efSmrg ;; 27494e7590efSmrg esac 27504e7590efSmrg]) 27514e7590efSmrgif test -n $lt_cv_sys_max_cmd_len ; then 27524e7590efSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 27534e7590efSmrgelse 27544e7590efSmrg AC_MSG_RESULT(none) 27554e7590efSmrgfi 27564e7590efSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 27574e7590efSmrg_LT_DECL([], [max_cmd_len], [0], 27584e7590efSmrg [What is the maximum length of a command?]) 27594e7590efSmrg])# LT_CMD_MAX_LEN 276049dc963fSmrg 27614e7590efSmrg# Old name: 27624e7590efSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 276349dc963fSmrgdnl aclocal-1.4 backwards compatibility: 27644e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 276549dc963fSmrg 276649dc963fSmrg 27674e7590efSmrg# _LT_HEADER_DLFCN 276849dc963fSmrg# ---------------- 27694e7590efSmrgm4_defun([_LT_HEADER_DLFCN], 27704e7590efSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 27714e7590efSmrg])# _LT_HEADER_DLFCN 277249dc963fSmrg 277349dc963fSmrg 27744e7590efSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 27754e7590efSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 27764e7590efSmrg# ---------------------------------------------------------------- 27774e7590efSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 27784e7590efSmrg[m4_require([_LT_HEADER_DLFCN])dnl 27794e7590efSmrgif test "$cross_compiling" = yes; then : 27804e7590efSmrg [$4] 27814e7590efSmrgelse 27824e7590efSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 27834e7590efSmrg lt_status=$lt_dlunknown 27844e7590efSmrg cat > conftest.$ac_ext <<_LT_EOF 27854e7590efSmrg[#line $LINENO "configure" 27864e7590efSmrg#include "confdefs.h" 278749dc963fSmrg 27884e7590efSmrg#if HAVE_DLFCN_H 27894e7590efSmrg#include <dlfcn.h> 27904e7590efSmrg#endif 279149dc963fSmrg 27924e7590efSmrg#include <stdio.h> 279349dc963fSmrg 27944e7590efSmrg#ifdef RTLD_GLOBAL 27954e7590efSmrg# define LT_DLGLOBAL RTLD_GLOBAL 27964e7590efSmrg#else 27974e7590efSmrg# ifdef DL_GLOBAL 27984e7590efSmrg# define LT_DLGLOBAL DL_GLOBAL 27994e7590efSmrg# else 28004e7590efSmrg# define LT_DLGLOBAL 0 28014e7590efSmrg# endif 28024e7590efSmrg#endif 280349dc963fSmrg 28044e7590efSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28054e7590efSmrg find out it does not work in some platform. */ 28064e7590efSmrg#ifndef LT_DLLAZY_OR_NOW 28074e7590efSmrg# ifdef RTLD_LAZY 28084e7590efSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28094e7590efSmrg# else 28104e7590efSmrg# ifdef DL_LAZY 28114e7590efSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 28124e7590efSmrg# else 28134e7590efSmrg# ifdef RTLD_NOW 28144e7590efSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28154e7590efSmrg# else 28164e7590efSmrg# ifdef DL_NOW 28174e7590efSmrg# define LT_DLLAZY_OR_NOW DL_NOW 28184e7590efSmrg# else 28194e7590efSmrg# define LT_DLLAZY_OR_NOW 0 28204e7590efSmrg# endif 28214e7590efSmrg# endif 28224e7590efSmrg# endif 28234e7590efSmrg# endif 28244e7590efSmrg#endif 28254b0ead49Smrg 28264e7590efSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 28274e7590efSmrg correspondingly for the symbols needed. */ 28284e7590efSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 28294e7590efSmrgint fnord () __attribute__((visibility("default"))); 28304e7590efSmrg#endif 283149dc963fSmrg 28324e7590efSmrgint fnord () { return 42; } 28334e7590efSmrgint main () 28344e7590efSmrg{ 28354e7590efSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 28364e7590efSmrg int status = $lt_dlunknown; 283749dc963fSmrg 28384e7590efSmrg if (self) 28394e7590efSmrg { 28404e7590efSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 28414e7590efSmrg else 28424e7590efSmrg { 28434e7590efSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 28444e7590efSmrg else puts (dlerror ()); 28454e7590efSmrg } 28464e7590efSmrg /* dlclose (self); */ 28474e7590efSmrg } 28484e7590efSmrg else 28494e7590efSmrg puts (dlerror ()); 285049dc963fSmrg 28514e7590efSmrg return status; 28524e7590efSmrg}] 28537aa89044Smrg_LT_EOF 28544e7590efSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 28554e7590efSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 28564e7590efSmrg lt_status=$? 28574e7590efSmrg case x$lt_status in 28584e7590efSmrg x$lt_dlno_uscore) $1 ;; 28594e7590efSmrg x$lt_dlneed_uscore) $2 ;; 28604e7590efSmrg x$lt_dlunknown|x*) $3 ;; 28614e7590efSmrg esac 28624e7590efSmrg else : 28634e7590efSmrg # compilation failed 28644e7590efSmrg $3 28654e7590efSmrg fi 28664e7590efSmrgfi 28674e7590efSmrgrm -fr conftest* 28684e7590efSmrg])# _LT_TRY_DLOPEN_SELF 28694e7590efSmrg 28704e7590efSmrg 28714e7590efSmrg# LT_SYS_DLOPEN_SELF 28724e7590efSmrg# ------------------ 28734e7590efSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 28744e7590efSmrg[m4_require([_LT_HEADER_DLFCN])dnl 28754e7590efSmrgif test "x$enable_dlopen" != xyes; then 28764e7590efSmrg enable_dlopen=unknown 28774e7590efSmrg enable_dlopen_self=unknown 28784e7590efSmrg enable_dlopen_self_static=unknown 28794e7590efSmrgelse 28804e7590efSmrg lt_cv_dlopen=no 28814e7590efSmrg lt_cv_dlopen_libs= 28824e7590efSmrg 28834e7590efSmrg case $host_os in 28844e7590efSmrg beos*) 28854e7590efSmrg lt_cv_dlopen="load_add_on" 28864e7590efSmrg lt_cv_dlopen_libs= 28874e7590efSmrg lt_cv_dlopen_self=yes 28884e7590efSmrg ;; 28894e7590efSmrg 28904e7590efSmrg mingw* | pw32* | cegcc*) 28914e7590efSmrg lt_cv_dlopen="LoadLibrary" 28924e7590efSmrg lt_cv_dlopen_libs= 28934e7590efSmrg ;; 28944e7590efSmrg 28954e7590efSmrg cygwin*) 28964e7590efSmrg lt_cv_dlopen="dlopen" 28974e7590efSmrg lt_cv_dlopen_libs= 28984e7590efSmrg ;; 28994e7590efSmrg 29004e7590efSmrg darwin*) 29014e7590efSmrg # if libdl is installed we need to link against it 29024e7590efSmrg AC_CHECK_LIB([dl], [dlopen], 29034e7590efSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29044e7590efSmrg lt_cv_dlopen="dyld" 29054e7590efSmrg lt_cv_dlopen_libs= 29064e7590efSmrg lt_cv_dlopen_self=yes 29077aa89044Smrg ]) 290849dc963fSmrg ;; 29094e7590efSmrg 29104e7590efSmrg *) 29114e7590efSmrg AC_CHECK_FUNC([shl_load], 29124e7590efSmrg [lt_cv_dlopen="shl_load"], 29134e7590efSmrg [AC_CHECK_LIB([dld], [shl_load], 29144e7590efSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 29154e7590efSmrg [AC_CHECK_FUNC([dlopen], 29164e7590efSmrg [lt_cv_dlopen="dlopen"], 29174e7590efSmrg [AC_CHECK_LIB([dl], [dlopen], 29184e7590efSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29194e7590efSmrg [AC_CHECK_LIB([svld], [dlopen], 29204e7590efSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29214e7590efSmrg [AC_CHECK_LIB([dld], [dld_link], 29224e7590efSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 29234e7590efSmrg ]) 29244e7590efSmrg ]) 29254e7590efSmrg ]) 29264e7590efSmrg ]) 29274e7590efSmrg ]) 292849dc963fSmrg ;; 292949dc963fSmrg esac 293049dc963fSmrg 29314e7590efSmrg if test "x$lt_cv_dlopen" != xno; then 29324e7590efSmrg enable_dlopen=yes 29337aa89044Smrg else 29344e7590efSmrg enable_dlopen=no 29357aa89044Smrg fi 293649dc963fSmrg 29374e7590efSmrg case $lt_cv_dlopen in 29384e7590efSmrg dlopen) 29394e7590efSmrg save_CPPFLAGS="$CPPFLAGS" 29404e7590efSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 294149dc963fSmrg 29424e7590efSmrg save_LDFLAGS="$LDFLAGS" 29434e7590efSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 294449dc963fSmrg 29454e7590efSmrg save_LIBS="$LIBS" 29464e7590efSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 29477aa89044Smrg 29484e7590efSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 29494e7590efSmrg lt_cv_dlopen_self, [dnl 29504e7590efSmrg _LT_TRY_DLOPEN_SELF( 29514e7590efSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 29524e7590efSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 29534e7590efSmrg ]) 29544b0ead49Smrg 29554e7590efSmrg if test "x$lt_cv_dlopen_self" = xyes; then 29564e7590efSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 29574e7590efSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 29584e7590efSmrg lt_cv_dlopen_self_static, [dnl 29594e7590efSmrg _LT_TRY_DLOPEN_SELF( 29604e7590efSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 29614e7590efSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 29624e7590efSmrg ]) 29634e7590efSmrg fi 29644b0ead49Smrg 29654e7590efSmrg CPPFLAGS="$save_CPPFLAGS" 29664e7590efSmrg LDFLAGS="$save_LDFLAGS" 29674e7590efSmrg LIBS="$save_LIBS" 29684e7590efSmrg ;; 29694e7590efSmrg esac 29707aa89044Smrg 29714e7590efSmrg case $lt_cv_dlopen_self in 29724e7590efSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 29734e7590efSmrg *) enable_dlopen_self=unknown ;; 29744e7590efSmrg esac 29754e7590efSmrg 29764e7590efSmrg case $lt_cv_dlopen_self_static in 29774e7590efSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 29784e7590efSmrg *) enable_dlopen_self_static=unknown ;; 29794e7590efSmrg esac 298052b01e16Smrgfi 29814e7590efSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 29824e7590efSmrg [Whether dlopen is supported]) 29834e7590efSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 29844e7590efSmrg [Whether dlopen of programs is supported]) 29854e7590efSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 29864e7590efSmrg [Whether dlopen of statically linked programs is supported]) 29874e7590efSmrg])# LT_SYS_DLOPEN_SELF 29884b0ead49Smrg 29894e7590efSmrg# Old name: 29904e7590efSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 29914e7590efSmrgdnl aclocal-1.4 backwards compatibility: 29924e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 29934b0ead49Smrg 29944b0ead49Smrg 29954e7590efSmrg# _LT_COMPILER_C_O([TAGNAME]) 29964e7590efSmrg# --------------------------- 29974e7590efSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 29984e7590efSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 29994e7590efSmrgm4_defun([_LT_COMPILER_C_O], 30004e7590efSmrg[m4_require([_LT_DECL_SED])dnl 30014e7590efSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30024e7590efSmrgm4_require([_LT_TAG_COMPILER])dnl 30034e7590efSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30044e7590efSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30054e7590efSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30064e7590efSmrg $RM -r conftest 2>/dev/null 30074e7590efSmrg mkdir conftest 30084e7590efSmrg cd conftest 30094e7590efSmrg mkdir out 30104e7590efSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 30114b0ead49Smrg 30124e7590efSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30134e7590efSmrg # Insert the option either (1) after the last *FLAGS variable, or 30144e7590efSmrg # (2) before a word containing "conftest.", or (3) at the end. 30154e7590efSmrg # Note that $ac_compile itself does not contain backslashes and begins 30164e7590efSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30174e7590efSmrg lt_compile=`echo "$ac_compile" | $SED \ 30184e7590efSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30194e7590efSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30204e7590efSmrg -e 's:$: $lt_compiler_flag:'` 30214e7590efSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30224e7590efSmrg (eval "$lt_compile" 2>out/conftest.err) 30234e7590efSmrg ac_status=$? 30244e7590efSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 30254e7590efSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 30264e7590efSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 30274e7590efSmrg then 30284e7590efSmrg # The compiler can only warn and ignore the option if not recognized 30294e7590efSmrg # So say no if there are warnings 30304e7590efSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 30314e7590efSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 30324e7590efSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 30334e7590efSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 30344e7590efSmrg fi 30354e7590efSmrg fi 30364e7590efSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 30374e7590efSmrg $RM conftest* 30384e7590efSmrg # SGI C++ compiler will create directory out/ii_files/ for 30394e7590efSmrg # template instantiation 30404e7590efSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 30414e7590efSmrg $RM out/* && rmdir out 30424e7590efSmrg cd .. 30434e7590efSmrg $RM -r conftest 30444e7590efSmrg $RM conftest* 30454e7590efSmrg]) 30464e7590efSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 30474e7590efSmrg [Does compiler simultaneously support -c and -o options?]) 30484e7590efSmrg])# _LT_COMPILER_C_O 30494b0ead49Smrg 30504b0ead49Smrg 30514e7590efSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 30524e7590efSmrg# ---------------------------------- 30534e7590efSmrg# Check to see if we can do hard links to lock some files if needed 30544e7590efSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 30554e7590efSmrg[m4_require([_LT_ENABLE_LOCK])dnl 30564e7590efSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30574e7590efSmrg_LT_COMPILER_C_O([$1]) 30584b0ead49Smrg 30594e7590efSmrghard_links="nottested" 30604e7590efSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 30614e7590efSmrg # do not overwrite the value of need_locks provided by the user 30624e7590efSmrg AC_MSG_CHECKING([if we can lock with hard links]) 30634e7590efSmrg hard_links=yes 30644e7590efSmrg $RM conftest* 30654e7590efSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30664e7590efSmrg touch conftest.a 30674e7590efSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 30684e7590efSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30694e7590efSmrg AC_MSG_RESULT([$hard_links]) 30704e7590efSmrg if test "$hard_links" = no; then 30714e7590efSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 30724e7590efSmrg need_locks=warn 307352b01e16Smrg fi 30744e7590efSmrgelse 30754e7590efSmrg need_locks=no 30764e7590efSmrgfi 30774e7590efSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 30784e7590efSmrg])# _LT_COMPILER_FILE_LOCKS 30794b0ead49Smrg 30804b0ead49Smrg 30814e7590efSmrg# _LT_CHECK_OBJDIR 30824e7590efSmrg# ---------------- 30834e7590efSmrgm4_defun([_LT_CHECK_OBJDIR], 30844e7590efSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 30854e7590efSmrg[rm -f .libs 2>/dev/null 30864e7590efSmrgmkdir .libs 2>/dev/null 30874e7590efSmrgif test -d .libs; then 30884e7590efSmrg lt_cv_objdir=.libs 30894e7590efSmrgelse 30904e7590efSmrg # MS-DOS does not allow filenames that begin with a dot. 30914e7590efSmrg lt_cv_objdir=_libs 30924e7590efSmrgfi 30934e7590efSmrgrmdir .libs 2>/dev/null]) 30944e7590efSmrgobjdir=$lt_cv_objdir 30954e7590efSmrg_LT_DECL([], [objdir], [0], 30964e7590efSmrg [The name of the directory that contains temporary libtool files])dnl 30974e7590efSmrgm4_pattern_allow([LT_OBJDIR])dnl 30984e7590efSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 30994e7590efSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 31004e7590efSmrg])# _LT_CHECK_OBJDIR 310149dc963fSmrg 310249dc963fSmrg 31034e7590efSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 31044e7590efSmrg# -------------------------------------- 31054e7590efSmrg# Check hardcoding attributes. 31064e7590efSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 31074e7590efSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31084e7590efSmrg_LT_TAGVAR(hardcode_action, $1)= 31094e7590efSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 31104e7590efSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 31114e7590efSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 311249dc963fSmrg 31134e7590efSmrg # We can hardcode non-existent directories. 31144e7590efSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 31154e7590efSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31164e7590efSmrg # have to relink, otherwise we might link with an installed library 31174e7590efSmrg # when we should be linking with a yet-to-be-installed one 31184e7590efSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31194e7590efSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 31204e7590efSmrg # Linking always hardcodes the temporary library directory. 31214e7590efSmrg _LT_TAGVAR(hardcode_action, $1)=relink 31224e7590efSmrg else 31234e7590efSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 31244e7590efSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 31254e7590efSmrg fi 31264e7590efSmrgelse 31274e7590efSmrg # We cannot hardcode anything, or else we can only hardcode existing 31284e7590efSmrg # directories. 31294e7590efSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 31304e7590efSmrgfi 31314e7590efSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313249dc963fSmrg 31334e7590efSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 31344e7590efSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 31354e7590efSmrg # Fast installation is not supported 31364e7590efSmrg enable_fast_install=no 31374e7590efSmrgelif test "$shlibpath_overrides_runpath" = yes || 31384e7590efSmrg test "$enable_shared" = no; then 31394e7590efSmrg # Fast installation is not necessary 31404e7590efSmrg enable_fast_install=needless 31414e7590efSmrgfi 31424e7590efSmrg_LT_TAGDECL([], [hardcode_action], [0], 31434e7590efSmrg [How to hardcode a shared library path into an executable]) 31444e7590efSmrg])# _LT_LINKER_HARDCODE_LIBPATH 314549dc963fSmrg 31464b0ead49Smrg 31474e7590efSmrg# _LT_CMD_STRIPLIB 31484e7590efSmrg# ---------------- 31494e7590efSmrgm4_defun([_LT_CMD_STRIPLIB], 31504e7590efSmrg[m4_require([_LT_DECL_EGREP]) 31514e7590efSmrgstriplib= 31524e7590efSmrgold_striplib= 31534e7590efSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 31544e7590efSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 31554e7590efSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 31564e7590efSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 31574e7590efSmrg AC_MSG_RESULT([yes]) 31584e7590efSmrgelse 31594e7590efSmrg# FIXME - insert some real tests, host_os isn't really good enough 316049dc963fSmrg case $host_os in 31614e7590efSmrg darwin*) 31624e7590efSmrg if test -n "$STRIP" ; then 31634e7590efSmrg striplib="$STRIP -x" 31644e7590efSmrg old_striplib="$STRIP -S" 31654e7590efSmrg AC_MSG_RESULT([yes]) 31664e7590efSmrg else 31674e7590efSmrg AC_MSG_RESULT([no]) 31684e7590efSmrg fi 316949dc963fSmrg ;; 317049dc963fSmrg *) 31714e7590efSmrg AC_MSG_RESULT([no]) 317249dc963fSmrg ;; 317349dc963fSmrg esac 317449dc963fSmrgfi 31754e7590efSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 31764e7590efSmrg_LT_DECL([], [striplib], [1]) 31774e7590efSmrg])# _LT_CMD_STRIPLIB 31784b0ead49Smrg 31794b0ead49Smrg 31804e7590efSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 31814e7590efSmrg# ----------------------------- 31824e7590efSmrg# PORTME Fill in your ld.so characteristics 31834e7590efSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 31844e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 31854e7590efSmrgm4_require([_LT_DECL_EGREP])dnl 31864e7590efSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31874e7590efSmrgm4_require([_LT_DECL_OBJDUMP])dnl 318849dc963fSmrgm4_require([_LT_DECL_SED])dnl 31894e7590efSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 31904e7590efSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 31914e7590efSmrgm4_if([$1], 31924e7590efSmrg [], [ 31934e7590efSmrgif test "$GCC" = yes; then 31944e7590efSmrg case $host_os in 31954e7590efSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 31964e7590efSmrg *) lt_awk_arg="/^libraries:/" ;; 31974e7590efSmrg esac 31984e7590efSmrg case $host_os in 31994e7590efSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 32004e7590efSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 32014e7590efSmrg esac 32024e7590efSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 32034e7590efSmrg case $lt_search_path_spec in 32044e7590efSmrg *\;*) 32054e7590efSmrg # if the path contains ";" then we assume it to be the separator 32064e7590efSmrg # otherwise default to the standard path separator (i.e. ":") - it is 32074e7590efSmrg # assumed that no part of a normal pathname contains ";" but that should 32084e7590efSmrg # okay in the real world where ";" in dirpaths is itself problematic. 32094e7590efSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 321052b01e16Smrg ;; 32114e7590efSmrg *) 32124e7590efSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 321352b01e16Smrg ;; 32144e7590efSmrg esac 32154e7590efSmrg # Ok, now we have the path, separated by spaces, we can step through it 32164e7590efSmrg # and add multilib dir if necessary. 32174e7590efSmrg lt_tmp_lt_search_path_spec= 32184e7590efSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 32194e7590efSmrg for lt_sys_path in $lt_search_path_spec; do 32204e7590efSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 32214e7590efSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 32224e7590efSmrg else 32234e7590efSmrg test -d "$lt_sys_path" && \ 32244e7590efSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 32254e7590efSmrg fi 32264e7590efSmrg done 32274e7590efSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 32284e7590efSmrgBEGIN {RS=" "; FS="/|\n";} { 32294e7590efSmrg lt_foo=""; 32304e7590efSmrg lt_count=0; 32314e7590efSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 32324e7590efSmrg if ($lt_i != "" && $lt_i != ".") { 32334e7590efSmrg if ($lt_i == "..") { 32344e7590efSmrg lt_count++; 32354e7590efSmrg } else { 32364e7590efSmrg if (lt_count == 0) { 32374e7590efSmrg lt_foo="/" $lt_i lt_foo; 32384e7590efSmrg } else { 32394e7590efSmrg lt_count--; 32404e7590efSmrg } 32414e7590efSmrg } 32424e7590efSmrg } 32434e7590efSmrg } 32444e7590efSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 32454e7590efSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 32464e7590efSmrg}'` 32474e7590efSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 32484e7590efSmrg # for these hosts. 32494e7590efSmrg case $host_os in 32504e7590efSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 32514e7590efSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 32524e7590efSmrg esac 32534e7590efSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 32544e7590efSmrgelse 32554e7590efSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 32564e7590efSmrgfi]) 32574e7590efSmrglibrary_names_spec= 32584e7590efSmrglibname_spec='lib$name' 32594e7590efSmrgsoname_spec= 32604e7590efSmrgshrext_cmds=".so" 32614e7590efSmrgpostinstall_cmds= 32624e7590efSmrgpostuninstall_cmds= 32634e7590efSmrgfinish_cmds= 32644e7590efSmrgfinish_eval= 32654e7590efSmrgshlibpath_var= 32664e7590efSmrgshlibpath_overrides_runpath=unknown 32674e7590efSmrgversion_type=none 32684e7590efSmrgdynamic_linker="$host_os ld.so" 32694e7590efSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 32704e7590efSmrgneed_lib_prefix=unknown 32714e7590efSmrghardcode_into_libs=no 32724b0ead49Smrg 32734e7590efSmrg# when you set need_version to no, make sure it does not cause -set_version 32744e7590efSmrg# flags to be left without arguments 32754e7590efSmrgneed_version=unknown 32764b0ead49Smrg 32774e7590efSmrgcase $host_os in 32784e7590efSmrgaix3*) 32794e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 32804e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 32814e7590efSmrg shlibpath_var=LIBPATH 32827aa89044Smrg 32834e7590efSmrg # AIX 3 has no versioning support, so we append a major version to the name. 32844e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 32854e7590efSmrg ;; 32864b0ead49Smrg 32874e7590efSmrgaix[[4-9]]*) 32884e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 32894e7590efSmrg need_lib_prefix=no 32904e7590efSmrg need_version=no 32914e7590efSmrg hardcode_into_libs=yes 32924e7590efSmrg if test "$host_cpu" = ia64; then 32934e7590efSmrg # AIX 5 supports IA64 32944e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 32954e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 32964e7590efSmrg else 32974e7590efSmrg # With GCC up to 2.95.x, collect2 would create an import file 32984e7590efSmrg # for dependence libraries. The import file would start with 32994e7590efSmrg # the line `#! .'. This would cause the generated library to 33004e7590efSmrg # depend on `.', always an invalid library. This was fixed in 33014e7590efSmrg # development snapshots of GCC prior to 3.0. 33024e7590efSmrg case $host_os in 33034e7590efSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 33044e7590efSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 33054e7590efSmrg echo ' yes ' 33064e7590efSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 33074e7590efSmrg : 33084e7590efSmrg else 33094e7590efSmrg can_build_shared=no 33104e7590efSmrg fi 33114e7590efSmrg ;; 33124e7590efSmrg esac 33134e7590efSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 33144e7590efSmrg # soname into executable. Probably we can add versioning support to 33154e7590efSmrg # collect2, so additional links can be useful in future. 33164e7590efSmrg if test "$aix_use_runtimelinking" = yes; then 33174e7590efSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 33184e7590efSmrg # instead of lib<name>.a to let people know that these are not 33194e7590efSmrg # typical AIX shared libraries. 33204e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 332152b01e16Smrg else 33224e7590efSmrg # We preserve .a as extension for shared libraries through AIX4.2 33234e7590efSmrg # and later when we are not doing run time linking. 33244e7590efSmrg library_names_spec='${libname}${release}.a $libname.a' 33254e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 332652b01e16Smrg fi 33274e7590efSmrg shlibpath_var=LIBPATH 33284e7590efSmrg fi 33294e7590efSmrg ;; 33304b0ead49Smrg 33314e7590efSmrgamigaos*) 33324e7590efSmrg case $host_cpu in 33334e7590efSmrg powerpc) 33344e7590efSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 33354e7590efSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 33364e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33374e7590efSmrg ;; 33384e7590efSmrg m68k) 33394e7590efSmrg library_names_spec='$libname.ixlibrary $libname.a' 33404e7590efSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 33414e7590efSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 334252b01e16Smrg ;; 33434e7590efSmrg esac 33444e7590efSmrg ;; 33454b0ead49Smrg 33464e7590efSmrgbeos*) 33474e7590efSmrg library_names_spec='${libname}${shared_ext}' 33484e7590efSmrg dynamic_linker="$host_os ld.so" 33494e7590efSmrg shlibpath_var=LIBRARY_PATH 33504e7590efSmrg ;; 335149dc963fSmrg 33524e7590efSmrgbsdi[[45]]*) 33534e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 33544e7590efSmrg need_version=no 33554e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33564e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 33574e7590efSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 33584e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 33594e7590efSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 33604e7590efSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 33614e7590efSmrg # the default ld.so.conf also contains /usr/contrib/lib and 33624e7590efSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 33634e7590efSmrg # libtool to hard-code these into programs 33644e7590efSmrg ;; 33654b0ead49Smrg 33664e7590efSmrgcygwin* | mingw* | pw32* | cegcc*) 33674e7590efSmrg version_type=windows 33684e7590efSmrg shrext_cmds=".dll" 33694e7590efSmrg need_version=no 33704e7590efSmrg need_lib_prefix=no 33714b0ead49Smrg 33724e7590efSmrg case $GCC,$cc_basename in 33734e7590efSmrg yes,*) 33744e7590efSmrg # gcc 33754e7590efSmrg library_names_spec='$libname.dll.a' 33764e7590efSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 33774e7590efSmrg postinstall_cmds='base_file=`basename \${file}`~ 33784e7590efSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 33794e7590efSmrg dldir=$destdir/`dirname \$dlpath`~ 33804e7590efSmrg test -d \$dldir || mkdir -p \$dldir~ 33814e7590efSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 33824e7590efSmrg chmod a+x \$dldir/$dlname~ 33834e7590efSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 33844e7590efSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 33854e7590efSmrg fi' 33864e7590efSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 33874e7590efSmrg dlpath=$dir/\$dldll~ 33884e7590efSmrg $RM \$dlpath' 33894e7590efSmrg shlibpath_overrides_runpath=yes 33904b0ead49Smrg 33914e7590efSmrg case $host_os in 33924e7590efSmrg cygwin*) 33934e7590efSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 33944e7590efSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33954e7590efSmrgm4_if([$1], [],[ 33964e7590efSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 33974e7590efSmrg ;; 33984e7590efSmrg mingw* | cegcc*) 33994e7590efSmrg # MinGW DLLs use traditional 'lib' prefix 34004e7590efSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34014e7590efSmrg ;; 34024e7590efSmrg pw32*) 34034e7590efSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 34044e7590efSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34054e7590efSmrg ;; 34064e7590efSmrg esac 34074e7590efSmrg dynamic_linker='Win32 ld.exe' 34084e7590efSmrg ;; 34094b0ead49Smrg 34104e7590efSmrg *,cl*) 34114e7590efSmrg # Native MSVC 34124e7590efSmrg libname_spec='$name' 34134e7590efSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34144e7590efSmrg library_names_spec='${libname}.dll.lib' 34154e7590efSmrg 34164e7590efSmrg case $build_os in 34174e7590efSmrg mingw*) 34184e7590efSmrg sys_lib_search_path_spec= 34194e7590efSmrg lt_save_ifs=$IFS 34204e7590efSmrg IFS=';' 34214e7590efSmrg for lt_path in $LIB 34224e7590efSmrg do 34234e7590efSmrg IFS=$lt_save_ifs 34244e7590efSmrg # Let DOS variable expansion print the short 8.3 style file name. 34254e7590efSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 34264e7590efSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 34274e7590efSmrg done 34284e7590efSmrg IFS=$lt_save_ifs 34294e7590efSmrg # Convert to MSYS style. 34304e7590efSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 34314e7590efSmrg ;; 34324e7590efSmrg cygwin*) 34334e7590efSmrg # Convert to unix form, then to dos form, then back to unix form 34344e7590efSmrg # but this time dos style (no spaces!) so that the unix form looks 34354e7590efSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 34364e7590efSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 34374e7590efSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 34384e7590efSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34394e7590efSmrg ;; 34404e7590efSmrg *) 34414e7590efSmrg sys_lib_search_path_spec="$LIB" 34424e7590efSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 34434e7590efSmrg # It is most probably a Windows format PATH. 34444e7590efSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 34454e7590efSmrg else 34464e7590efSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34474e7590efSmrg fi 34484e7590efSmrg # FIXME: find the short name or the path components, as spaces are 34494e7590efSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 34504e7590efSmrg ;; 34514e7590efSmrg esac 34524b0ead49Smrg 34534e7590efSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34544e7590efSmrg postinstall_cmds='base_file=`basename \${file}`~ 34554e7590efSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34564e7590efSmrg dldir=$destdir/`dirname \$dlpath`~ 34574e7590efSmrg test -d \$dldir || mkdir -p \$dldir~ 34584e7590efSmrg $install_prog $dir/$dlname \$dldir/$dlname' 34594e7590efSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34604e7590efSmrg dlpath=$dir/\$dldll~ 34614e7590efSmrg $RM \$dlpath' 34624e7590efSmrg shlibpath_overrides_runpath=yes 34634e7590efSmrg dynamic_linker='Win32 link.exe' 34644e7590efSmrg ;; 34654b0ead49Smrg 34664e7590efSmrg *) 34674e7590efSmrg # Assume MSVC wrapper 34684e7590efSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 34694e7590efSmrg dynamic_linker='Win32 ld.exe' 34704e7590efSmrg ;; 34714e7590efSmrg esac 34724e7590efSmrg # FIXME: first we should search . and the directory the executable is in 34734e7590efSmrg shlibpath_var=PATH 34744e7590efSmrg ;; 34754b0ead49Smrg 34764e7590efSmrgdarwin* | rhapsody*) 34774e7590efSmrg dynamic_linker="$host_os dyld" 34784e7590efSmrg version_type=darwin 34794e7590efSmrg need_lib_prefix=no 34804e7590efSmrg need_version=no 34814e7590efSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 34824e7590efSmrg soname_spec='${libname}${release}${major}$shared_ext' 34834e7590efSmrg shlibpath_overrides_runpath=yes 34844e7590efSmrg shlibpath_var=DYLD_LIBRARY_PATH 34854e7590efSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 34864e7590efSmrgm4_if([$1], [],[ 34874e7590efSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 34884e7590efSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 34894e7590efSmrg ;; 34907aa89044Smrg 34914e7590efSmrgdgux*) 34924e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 34934e7590efSmrg need_lib_prefix=no 34944e7590efSmrg need_version=no 34954e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 34964e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 34974e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 34984e7590efSmrg ;; 349952b01e16Smrg 35004e7590efSmrgfreebsd* | dragonfly*) 35014e7590efSmrg # DragonFly does not have aout. When/if they implement a new 35024e7590efSmrg # versioning mechanism, adjust this. 35034e7590efSmrg if test -x /usr/bin/objformat; then 35044e7590efSmrg objformat=`/usr/bin/objformat` 350552b01e16Smrg else 35064e7590efSmrg case $host_os in 35074e7590efSmrg freebsd[[23]].*) objformat=aout ;; 35084e7590efSmrg *) objformat=elf ;; 350952b01e16Smrg esac 35104b0ead49Smrg fi 35114e7590efSmrg version_type=freebsd-$objformat 35124e7590efSmrg case $version_type in 35134e7590efSmrg freebsd-elf*) 35144e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 35154e7590efSmrg need_version=no 35164e7590efSmrg need_lib_prefix=no 35174e7590efSmrg ;; 35184e7590efSmrg freebsd-*) 35194e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 35204e7590efSmrg need_version=yes 35214e7590efSmrg ;; 35224e7590efSmrg esac 35234e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 352452b01e16Smrg case $host_os in 35254e7590efSmrg freebsd2.*) 35264e7590efSmrg shlibpath_overrides_runpath=yes 352749dc963fSmrg ;; 35284e7590efSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 35294e7590efSmrg shlibpath_overrides_runpath=yes 35304e7590efSmrg hardcode_into_libs=yes 353149dc963fSmrg ;; 35324e7590efSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 35334e7590efSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 35344e7590efSmrg shlibpath_overrides_runpath=no 35354e7590efSmrg hardcode_into_libs=yes 353649dc963fSmrg ;; 35374e7590efSmrg *) # from 4.6 on, and DragonFly 35384e7590efSmrg shlibpath_overrides_runpath=yes 35394e7590efSmrg hardcode_into_libs=yes 354052b01e16Smrg ;; 354152b01e16Smrg esac 35424e7590efSmrg ;; 35434b0ead49Smrg 35444e7590efSmrggnu*) 35454e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 35464e7590efSmrg need_lib_prefix=no 35474e7590efSmrg need_version=no 35484e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35494e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 35504e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 35514e7590efSmrg shlibpath_overrides_runpath=no 35524e7590efSmrg hardcode_into_libs=yes 35534e7590efSmrg ;; 35544b0ead49Smrg 35554e7590efSmrghaiku*) 35564e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 35574e7590efSmrg need_lib_prefix=no 35584e7590efSmrg need_version=no 35594e7590efSmrg dynamic_linker="$host_os runtime_loader" 35604e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35614e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 35624e7590efSmrg shlibpath_var=LIBRARY_PATH 35634e7590efSmrg shlibpath_overrides_runpath=yes 35644e7590efSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 35654e7590efSmrg hardcode_into_libs=yes 35664e7590efSmrg ;; 35674b0ead49Smrg 35684e7590efSmrghpux9* | hpux10* | hpux11*) 35694e7590efSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 35704e7590efSmrg # link against other versions. 35714e7590efSmrg version_type=sunos 35724e7590efSmrg need_lib_prefix=no 35734e7590efSmrg need_version=no 35744e7590efSmrg case $host_cpu in 35754e7590efSmrg ia64*) 35764e7590efSmrg shrext_cmds='.so' 35774e7590efSmrg hardcode_into_libs=yes 35784e7590efSmrg dynamic_linker="$host_os dld.so" 35794e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 35804e7590efSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35814e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35824e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 35834e7590efSmrg if test "X$HPUX_IA64_MODE" = X32; then 35844e7590efSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 35854e7590efSmrg else 35864e7590efSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 358752b01e16Smrg fi 35884e7590efSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35894e7590efSmrg ;; 35904e7590efSmrg hppa*64*) 35914e7590efSmrg shrext_cmds='.sl' 35924e7590efSmrg hardcode_into_libs=yes 35934e7590efSmrg dynamic_linker="$host_os dld.sl" 35944e7590efSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 35954e7590efSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35964e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35974e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 35984e7590efSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 35994e7590efSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 36004e7590efSmrg ;; 36014e7590efSmrg *) 36024e7590efSmrg shrext_cmds='.sl' 36034e7590efSmrg dynamic_linker="$host_os dld.sl" 36044e7590efSmrg shlibpath_var=SHLIB_PATH 36054e7590efSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 36064e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36074e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 360852b01e16Smrg ;; 360952b01e16Smrg esac 36104e7590efSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 36114e7590efSmrg postinstall_cmds='chmod 555 $lib' 36124e7590efSmrg # or fails outright, so override atomically: 36134e7590efSmrg install_override_mode=555 36144e7590efSmrg ;; 36154b0ead49Smrg 36164e7590efSmrginterix[[3-9]]*) 36174e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 36184e7590efSmrg need_lib_prefix=no 36194e7590efSmrg need_version=no 36204e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36214e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 36224e7590efSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 36234e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 36244e7590efSmrg shlibpath_overrides_runpath=no 36254e7590efSmrg hardcode_into_libs=yes 36264e7590efSmrg ;; 36274b0ead49Smrg 36284e7590efSmrgirix5* | irix6* | nonstopux*) 36294e7590efSmrg case $host_os in 36304e7590efSmrg nonstopux*) version_type=nonstopux ;; 36314e7590efSmrg *) 36324e7590efSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 36334e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 36344e7590efSmrg else 36354e7590efSmrg version_type=irix 36364e7590efSmrg fi ;; 363752b01e16Smrg esac 36384e7590efSmrg need_lib_prefix=no 36394e7590efSmrg need_version=no 36404e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 36414e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 36424e7590efSmrg case $host_os in 36434e7590efSmrg irix5* | nonstopux*) 36444e7590efSmrg libsuff= shlibsuff= 36454e7590efSmrg ;; 36464e7590efSmrg *) 36474e7590efSmrg case $LD in # libtool.m4 will add one of these switches to LD 36484e7590efSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 36494e7590efSmrg libsuff= shlibsuff= libmagic=32-bit;; 36504e7590efSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 36514e7590efSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 36524e7590efSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 36534e7590efSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 36544e7590efSmrg *) libsuff= shlibsuff= libmagic=never-match;; 36554e7590efSmrg esac 36564e7590efSmrg ;; 36574e7590efSmrg esac 36584e7590efSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 36594e7590efSmrg shlibpath_overrides_runpath=no 36604e7590efSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 36614e7590efSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 36624e7590efSmrg hardcode_into_libs=yes 36634e7590efSmrg ;; 366452b01e16Smrg 36654e7590efSmrg# No shared lib support for Linux oldld, aout, or coff. 36664e7590efSmrglinux*oldld* | linux*aout* | linux*coff*) 36674e7590efSmrg dynamic_linker=no 36684e7590efSmrg ;; 366949dc963fSmrg 36704e7590efSmrg# This must be glibc/ELF. 36714e7590efSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 36724e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 36734e7590efSmrg need_lib_prefix=no 36744e7590efSmrg need_version=no 36754e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36764e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 36774e7590efSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 36784e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 36794e7590efSmrg shlibpath_overrides_runpath=no 368052b01e16Smrg 36814e7590efSmrg # Some binutils ld are patched to set DT_RUNPATH 36824e7590efSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 36834e7590efSmrg [lt_cv_shlibpath_overrides_runpath=no 36844e7590efSmrg save_LDFLAGS=$LDFLAGS 36854e7590efSmrg save_libdir=$libdir 36864e7590efSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 36874e7590efSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 36884e7590efSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 36894e7590efSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 36904e7590efSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 36914e7590efSmrg LDFLAGS=$save_LDFLAGS 36924e7590efSmrg libdir=$save_libdir 36934e7590efSmrg ]) 36944e7590efSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 369552b01e16Smrg 36964e7590efSmrg # This implies no fast_install, which is unacceptable. 36974e7590efSmrg # Some rework will be needed to allow for fast_install 36984e7590efSmrg # before this can be enabled. 36994e7590efSmrg hardcode_into_libs=yes 370052b01e16Smrg 37014e7590efSmrg # Append ld.so.conf contents to the search path 37024e7590efSmrg if test -f /etc/ld.so.conf; then 37034e7590efSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 37044e7590efSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 370552b01e16Smrg fi 370652b01e16Smrg 37074e7590efSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 37084e7590efSmrg # powerpc, because MkLinux only supported shared libraries with the 37094e7590efSmrg # GNU dynamic linker. Since this was broken with cross compilers, 37104e7590efSmrg # most powerpc-linux boxes support dynamic linking these days and 37114e7590efSmrg # people can always --disable-shared, the test was removed, and we 37124e7590efSmrg # assume the GNU/Linux dynamic linker is in use. 37134e7590efSmrg dynamic_linker='GNU/Linux ld.so' 37144e7590efSmrg ;; 371552b01e16Smrg 37164e7590efSmrgnetbsd*) 37174e7590efSmrg version_type=sunos 37184e7590efSmrg need_lib_prefix=no 37194e7590efSmrg need_version=no 37204e7590efSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 37214e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37224e7590efSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37234e7590efSmrg dynamic_linker='NetBSD (a.out) ld.so' 37244e7590efSmrg else 37254e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37264e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 37274e7590efSmrg dynamic_linker='NetBSD ld.elf_so' 37284e7590efSmrg fi 37294e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 37304e7590efSmrg shlibpath_overrides_runpath=yes 37314e7590efSmrg hardcode_into_libs=yes 37324e7590efSmrg ;; 37334b0ead49Smrg 37344e7590efSmrgnewsos6) 37354e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 37364e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37374e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 37384e7590efSmrg shlibpath_overrides_runpath=yes 37394e7590efSmrg ;; 374052b01e16Smrg 37414e7590efSmrg*nto* | *qnx*) 37424e7590efSmrg version_type=qnx 37434e7590efSmrg need_lib_prefix=no 37444e7590efSmrg need_version=no 37454e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37464e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 37474e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 37484e7590efSmrg shlibpath_overrides_runpath=no 37494e7590efSmrg hardcode_into_libs=yes 37504e7590efSmrg dynamic_linker='ldqnx.so' 37514e7590efSmrg ;; 375252b01e16Smrg 37534e7590efSmrgopenbsd*) 37544e7590efSmrg version_type=sunos 37554e7590efSmrg sys_lib_dlsearch_path_spec="/usr/lib" 37564e7590efSmrg need_lib_prefix=no 37574e7590efSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 37584e7590efSmrg case $host_os in 37594e7590efSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 37604e7590efSmrg *) need_version=no ;; 37614e7590efSmrg esac 37624e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37634e7590efSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37644e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 37654e7590efSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 37664e7590efSmrg case $host_os in 37674e7590efSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 37684e7590efSmrg shlibpath_overrides_runpath=no 37694e7590efSmrg ;; 37704e7590efSmrg *) 37714e7590efSmrg shlibpath_overrides_runpath=yes 37724e7590efSmrg ;; 37734e7590efSmrg esac 377452b01e16Smrg else 37754e7590efSmrg shlibpath_overrides_runpath=yes 377652b01e16Smrg fi 37774e7590efSmrg ;; 37784b0ead49Smrg 37794e7590efSmrgos2*) 37804e7590efSmrg libname_spec='$name' 37814e7590efSmrg shrext_cmds=".dll" 37824e7590efSmrg need_lib_prefix=no 37834e7590efSmrg library_names_spec='$libname${shared_ext} $libname.a' 37844e7590efSmrg dynamic_linker='OS/2 ld.exe' 37854e7590efSmrg shlibpath_var=LIBPATH 37864e7590efSmrg ;; 37874b0ead49Smrg 37884e7590efSmrgosf3* | osf4* | osf5*) 37894e7590efSmrg version_type=osf 37904e7590efSmrg need_lib_prefix=no 37914e7590efSmrg need_version=no 37924e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 37934e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37944e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 37954e7590efSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 37964e7590efSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 37974e7590efSmrg ;; 37984b0ead49Smrg 37994e7590efSmrgrdos*) 38004e7590efSmrg dynamic_linker=no 38014e7590efSmrg ;; 38024b0ead49Smrg 38034e7590efSmrgsolaris*) 38044e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 38054e7590efSmrg need_lib_prefix=no 38064e7590efSmrg need_version=no 38074e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38084e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 38094e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38104e7590efSmrg shlibpath_overrides_runpath=yes 38114e7590efSmrg hardcode_into_libs=yes 38124e7590efSmrg # ldd complains unless libraries are executable 38134e7590efSmrg postinstall_cmds='chmod +x $lib' 38144e7590efSmrg ;; 38154b0ead49Smrg 38164e7590efSmrgsunos4*) 38174e7590efSmrg version_type=sunos 38184e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38194e7590efSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 38204e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38214e7590efSmrg shlibpath_overrides_runpath=yes 38224e7590efSmrg if test "$with_gnu_ld" = yes; then 38234e7590efSmrg need_lib_prefix=no 38244e7590efSmrg fi 38254e7590efSmrg need_version=yes 38264e7590efSmrg ;; 38274b0ead49Smrg 38284e7590efSmrgsysv4 | sysv4.3*) 38294e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 38304e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 383152b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 38324e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38334e7590efSmrg case $host_vendor in 38344e7590efSmrg sni) 38354e7590efSmrg shlibpath_overrides_runpath=no 38364e7590efSmrg need_lib_prefix=no 38374e7590efSmrg runpath_var=LD_RUN_PATH 38384e7590efSmrg ;; 38394e7590efSmrg siemens) 38404e7590efSmrg need_lib_prefix=no 38414e7590efSmrg ;; 38424e7590efSmrg motorola) 38434e7590efSmrg need_lib_prefix=no 38444e7590efSmrg need_version=no 38454e7590efSmrg shlibpath_overrides_runpath=no 38464e7590efSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 38474e7590efSmrg ;; 38484e7590efSmrg esac 384952b01e16Smrg ;; 38504b0ead49Smrg 38514e7590efSmrgsysv4*MP*) 38524e7590efSmrg if test -d /usr/nec ;then 38534e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 38544e7590efSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 38554e7590efSmrg soname_spec='$libname${shared_ext}.$major' 38564e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38574e7590efSmrg fi 38584e7590efSmrg ;; 38594e7590efSmrg 38604e7590efSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 38614e7590efSmrg version_type=freebsd-elf 386252b01e16Smrg need_lib_prefix=no 386352b01e16Smrg need_version=no 38644e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 38654e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 38664e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38674e7590efSmrg shlibpath_overrides_runpath=yes 386852b01e16Smrg hardcode_into_libs=yes 38694e7590efSmrg if test "$with_gnu_ld" = yes; then 38704e7590efSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 387152b01e16Smrg else 38724e7590efSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 387352b01e16Smrg case $host_os in 38744e7590efSmrg sco3.2v5*) 38754e7590efSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 38764e7590efSmrg ;; 387752b01e16Smrg esac 387852b01e16Smrg fi 38794e7590efSmrg sys_lib_dlsearch_path_spec='/usr/lib' 388052b01e16Smrg ;; 38814b0ead49Smrg 38824e7590efSmrgtpf*) 38834e7590efSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 38844e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 38854e7590efSmrg need_lib_prefix=no 388652b01e16Smrg need_version=no 388752b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 388852b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 38894e7590efSmrg shlibpath_overrides_runpath=no 38904e7590efSmrg hardcode_into_libs=yes 389152b01e16Smrg ;; 38924b0ead49Smrg 38934e7590efSmrguts4*) 38944e7590efSmrg version_type=linux # correct to gnu/linux during the next big refactor 38954e7590efSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38964e7590efSmrg soname_spec='${libname}${release}${shared_ext}$major' 38974e7590efSmrg shlibpath_var=LD_LIBRARY_PATH 38984e7590efSmrg ;; 38994b0ead49Smrg 39004e7590efSmrg*) 39014e7590efSmrg dynamic_linker=no 39024e7590efSmrg ;; 39034e7590efSmrgesac 39044e7590efSmrgAC_MSG_RESULT([$dynamic_linker]) 39054e7590efSmrgtest "$dynamic_linker" = no && can_build_shared=no 390652b01e16Smrg 39074e7590efSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 39084e7590efSmrgif test "$GCC" = yes; then 39094e7590efSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 39104e7590efSmrgfi 39114b0ead49Smrg 39124e7590efSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 39134e7590efSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 39144e7590efSmrgfi 39154e7590efSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 39164e7590efSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 39174e7590efSmrgfi 39184b0ead49Smrg 39194e7590efSmrg_LT_DECL([], [variables_saved_for_relink], [1], 39204e7590efSmrg [Variables whose values should be saved in libtool wrapper scripts and 39214e7590efSmrg restored at link time]) 39224e7590efSmrg_LT_DECL([], [need_lib_prefix], [0], 39234e7590efSmrg [Do we need the "lib" prefix for modules?]) 39244e7590efSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 39254e7590efSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 39264e7590efSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 39274e7590efSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 39284e7590efSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 39294e7590efSmrg [Is shlibpath searched before the hard-coded library search path?]) 39304e7590efSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 39314e7590efSmrg_LT_DECL([], [library_names_spec], [1], 39324e7590efSmrg [[List of archive names. First name is the real one, the rest are links. 39334e7590efSmrg The last name is the one that the linker finds with -lNAME]]) 39344e7590efSmrg_LT_DECL([], [soname_spec], [1], 39354e7590efSmrg [[The coded name of the library, if different from the real name]]) 39364e7590efSmrg_LT_DECL([], [install_override_mode], [1], 39374e7590efSmrg [Permission mode override for installation of shared libraries]) 39384e7590efSmrg_LT_DECL([], [postinstall_cmds], [2], 39394e7590efSmrg [Command to use after installation of a shared archive]) 39404e7590efSmrg_LT_DECL([], [postuninstall_cmds], [2], 39414e7590efSmrg [Command to use after uninstallation of a shared archive]) 39424e7590efSmrg_LT_DECL([], [finish_cmds], [2], 39434e7590efSmrg [Commands used to finish a libtool library installation in a directory]) 39444e7590efSmrg_LT_DECL([], [finish_eval], [1], 39454e7590efSmrg [[As "finish_cmds", except a single script fragment to be evaled but 39464e7590efSmrg not shown]]) 39474e7590efSmrg_LT_DECL([], [hardcode_into_libs], [0], 39484e7590efSmrg [Whether we should hardcode library paths into libraries]) 39494e7590efSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 39504e7590efSmrg [Compile-time system search path for libraries]) 39514e7590efSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 39524e7590efSmrg [Run-time system search path for libraries]) 39534e7590efSmrg])# _LT_SYS_DYNAMIC_LINKER 39544b0ead49Smrg 39554e7590efSmrg 39564e7590efSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 39574e7590efSmrg# -------------------------- 39584e7590efSmrg# find a file program which can recognize shared library 39594e7590efSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 39604e7590efSmrg[m4_require([_LT_DECL_EGREP])dnl 39614e7590efSmrgAC_MSG_CHECKING([for $1]) 39624e7590efSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 39634e7590efSmrg[case $MAGIC_CMD in 39644e7590efSmrg[[\\/*] | ?:[\\/]*]) 39654e7590efSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 39664b0ead49Smrg ;; 39674e7590efSmrg*) 39684e7590efSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 39694e7590efSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39704e7590efSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 39714e7590efSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 39724e7590efSmrgdnl not every word. This closes a longstanding sh security hole. 39734e7590efSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 39744e7590efSmrg for ac_dir in $ac_dummy; do 39754e7590efSmrg IFS="$lt_save_ifs" 39764e7590efSmrg test -z "$ac_dir" && ac_dir=. 39774e7590efSmrg if test -f $ac_dir/$1; then 39784e7590efSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 39794e7590efSmrg if test -n "$file_magic_test_file"; then 39804e7590efSmrg case $deplibs_check_method in 39814e7590efSmrg "file_magic "*) 39824e7590efSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 39834e7590efSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39844e7590efSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 39854e7590efSmrg $EGREP "$file_magic_regex" > /dev/null; then 39864e7590efSmrg : 39874e7590efSmrg else 39884e7590efSmrg cat <<_LT_EOF 1>&2 39894b0ead49Smrg 39904e7590efSmrg*** Warning: the command libtool uses to detect shared libraries, 39914e7590efSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 39924e7590efSmrg*** The result is that libtool may fail to recognize shared libraries 39934e7590efSmrg*** as such. This will affect the creation of libtool libraries that 39944e7590efSmrg*** depend on shared libraries, but programs linked with such libtool 39954e7590efSmrg*** libraries will work regardless of this problem. Nevertheless, you 39964e7590efSmrg*** may want to report the problem to your system manager and/or to 39974e7590efSmrg*** bug-libtool@gnu.org 39984e7590efSmrg 39994e7590efSmrg_LT_EOF 40004e7590efSmrg fi ;; 40014e7590efSmrg esac 40024e7590efSmrg fi 40034e7590efSmrg break 40044e7590efSmrg fi 40054e7590efSmrg done 40064e7590efSmrg IFS="$lt_save_ifs" 40074e7590efSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 400852b01e16Smrg ;; 40094e7590efSmrgesac]) 40104e7590efSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40114e7590efSmrgif test -n "$MAGIC_CMD"; then 40124e7590efSmrg AC_MSG_RESULT($MAGIC_CMD) 40134e7590efSmrgelse 40144e7590efSmrg AC_MSG_RESULT(no) 40154e7590efSmrgfi 40164e7590efSmrg_LT_DECL([], [MAGIC_CMD], [0], 40174e7590efSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 40184e7590efSmrg])# _LT_PATH_TOOL_PREFIX 40194b0ead49Smrg 40204e7590efSmrg# Old name: 40214e7590efSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 40224e7590efSmrgdnl aclocal-1.4 backwards compatibility: 40234e7590efSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 40244e7590efSmrg 40254e7590efSmrg 40264e7590efSmrg# _LT_PATH_MAGIC 40274e7590efSmrg# -------------- 40284e7590efSmrg# find a file program which can recognize a shared library 40294e7590efSmrgm4_defun([_LT_PATH_MAGIC], 40304e7590efSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 40314e7590efSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 40324e7590efSmrg if test -n "$ac_tool_prefix"; then 40334e7590efSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 403452b01e16Smrg else 40354e7590efSmrg MAGIC_CMD=: 403652b01e16Smrg fi 40374e7590efSmrgfi 40384e7590efSmrg])# _LT_PATH_MAGIC 403952b01e16Smrg 404052b01e16Smrg 40414e7590efSmrg# LT_PATH_LD 40424e7590efSmrg# ---------- 40434e7590efSmrg# find the pathname to the GNU or non-GNU linker 40444e7590efSmrgAC_DEFUN([LT_PATH_LD], 40454e7590efSmrg[AC_REQUIRE([AC_PROG_CC])dnl 40464e7590efSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 40474e7590efSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 40484e7590efSmrgm4_require([_LT_DECL_SED])dnl 40494e7590efSmrgm4_require([_LT_DECL_EGREP])dnl 40504e7590efSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 40514b0ead49Smrg 40524e7590efSmrgAC_ARG_WITH([gnu-ld], 40534e7590efSmrg [AS_HELP_STRING([--with-gnu-ld], 40544e7590efSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 40554e7590efSmrg [test "$withval" = no || with_gnu_ld=yes], 40564e7590efSmrg [with_gnu_ld=no])dnl 405752b01e16Smrg 40584e7590efSmrgac_prog=ld 40594e7590efSmrgif test "$GCC" = yes; then 40604e7590efSmrg # Check if gcc -print-prog-name=ld gives a path. 40614e7590efSmrg AC_MSG_CHECKING([for ld used by $CC]) 40624e7590efSmrg case $host in 40634e7590efSmrg *-*-mingw*) 40644e7590efSmrg # gcc leaves a trailing carriage return which upsets mingw 40654e7590efSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 40664e7590efSmrg *) 40674e7590efSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 406852b01e16Smrg esac 40694e7590efSmrg case $ac_prog in 40704e7590efSmrg # Accept absolute paths. 40714e7590efSmrg [[\\/]]* | ?:[[\\/]]*) 40724e7590efSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 40734e7590efSmrg # Canonicalize the pathname of ld 40744e7590efSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 40754e7590efSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 40764e7590efSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 40774e7590efSmrg done 40784e7590efSmrg test -z "$LD" && LD="$ac_prog" 40794e7590efSmrg ;; 40804e7590efSmrg "") 40814e7590efSmrg # If it fails, then pretend we aren't using GCC. 40824e7590efSmrg ac_prog=ld 408352b01e16Smrg ;; 408452b01e16Smrg *) 40854e7590efSmrg # If it is relative, then search for the first ld in PATH. 40864e7590efSmrg with_gnu_ld=unknown 40874b0ead49Smrg ;; 408852b01e16Smrg esac 40894e7590efSmrgelif test "$with_gnu_ld" = yes; then 40904e7590efSmrg AC_MSG_CHECKING([for GNU ld]) 40914e7590efSmrgelse 40924e7590efSmrg AC_MSG_CHECKING([for non-GNU ld]) 40934e7590efSmrgfi 40944e7590efSmrgAC_CACHE_VAL(lt_cv_path_LD, 40954e7590efSmrg[if test -z "$LD"; then 40964e7590efSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40974e7590efSmrg for ac_dir in $PATH; do 40984e7590efSmrg IFS="$lt_save_ifs" 40994e7590efSmrg test -z "$ac_dir" && ac_dir=. 41004e7590efSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 41014e7590efSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 41024e7590efSmrg # Check to see if the program is GNU ld. I'd rather use --version, 41034e7590efSmrg # but apparently some variants of GNU ld only accept -v. 41044e7590efSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 41054e7590efSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 41064e7590efSmrg *GNU* | *'with BFD'*) 41074e7590efSmrg test "$with_gnu_ld" != no && break 41084e7590efSmrg ;; 41094e7590efSmrg *) 41104e7590efSmrg test "$with_gnu_ld" != yes && break 41114e7590efSmrg ;; 41124e7590efSmrg esac 41134e7590efSmrg fi 41144e7590efSmrg done 41154e7590efSmrg IFS="$lt_save_ifs" 41164e7590efSmrgelse 41174e7590efSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 41184e7590efSmrgfi]) 41194e7590efSmrgLD="$lt_cv_path_LD" 41204e7590efSmrgif test -n "$LD"; then 41214e7590efSmrg AC_MSG_RESULT($LD) 41224e7590efSmrgelse 41234e7590efSmrg AC_MSG_RESULT(no) 41244e7590efSmrgfi 41254e7590efSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 41264e7590efSmrg_LT_PATH_LD_GNU 41274e7590efSmrgAC_SUBST([LD]) 41287aa89044Smrg 41294e7590efSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 41304e7590efSmrg])# LT_PATH_LD 413149dc963fSmrg 41324e7590efSmrg# Old names: 41334e7590efSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 41344e7590efSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 41354e7590efSmrgdnl aclocal-1.4 backwards compatibility: 41364e7590efSmrgdnl AC_DEFUN([AM_PROG_LD], []) 41374e7590efSmrgdnl AC_DEFUN([AC_PROG_LD], []) 41384b0ead49Smrg 41394b0ead49Smrg 41404e7590efSmrg# _LT_PATH_LD_GNU 41414e7590efSmrg#- -------------- 41424e7590efSmrgm4_defun([_LT_PATH_LD_GNU], 41434e7590efSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 41444e7590efSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 41454e7590efSmrgcase `$LD -v 2>&1 </dev/null` in 41464e7590efSmrg*GNU* | *'with BFD'*) 41474e7590efSmrg lt_cv_prog_gnu_ld=yes 414852b01e16Smrg ;; 41494e7590efSmrg*) 41504e7590efSmrg lt_cv_prog_gnu_ld=no 415152b01e16Smrg ;; 41524e7590efSmrgesac]) 41534e7590efSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 41544e7590efSmrg])# _LT_PATH_LD_GNU 41554b0ead49Smrg 415652b01e16Smrg 41574e7590efSmrg# _LT_CMD_RELOAD 41584e7590efSmrg# -------------- 41594e7590efSmrg# find reload flag for linker 41604e7590efSmrg# -- PORTME Some linkers may need a different reload flag. 41614e7590efSmrgm4_defun([_LT_CMD_RELOAD], 41624e7590efSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 41634e7590efSmrg lt_cv_ld_reload_flag, 41644e7590efSmrg [lt_cv_ld_reload_flag='-r']) 41654e7590efSmrgreload_flag=$lt_cv_ld_reload_flag 41664e7590efSmrgcase $reload_flag in 41674e7590efSmrg"" | " "*) ;; 41684e7590efSmrg*) reload_flag=" $reload_flag" ;; 41694e7590efSmrgesac 41704e7590efSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 41714e7590efSmrgcase $host_os in 41724e7590efSmrg cygwin* | mingw* | pw32* | cegcc*) 41734e7590efSmrg if test "$GCC" != yes; then 41744e7590efSmrg reload_cmds=false 41754e7590efSmrg fi 41764e7590efSmrg ;; 41774e7590efSmrg darwin*) 41784e7590efSmrg if test "$GCC" = yes; then 41794e7590efSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 41804e7590efSmrg else 41814e7590efSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 41824e7590efSmrg fi 41834e7590efSmrg ;; 41844e7590efSmrgesac 41854e7590efSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 41864e7590efSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 41874e7590efSmrg])# _LT_CMD_RELOAD 418852b01e16Smrg 41894b0ead49Smrg 41904e7590efSmrg# _LT_CHECK_MAGIC_METHOD 41914e7590efSmrg# ---------------------- 41924e7590efSmrg# how to check for library dependencies 41934e7590efSmrg# -- PORTME fill in with the dynamic library characteristics 41944e7590efSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 41954e7590efSmrg[m4_require([_LT_DECL_EGREP]) 41964e7590efSmrgm4_require([_LT_DECL_OBJDUMP]) 41974e7590efSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 41984e7590efSmrglt_cv_deplibs_check_method, 41994e7590efSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42004e7590efSmrglt_cv_file_magic_test_file= 42014e7590efSmrglt_cv_deplibs_check_method='unknown' 42024e7590efSmrg# Need to set the preceding variable on all platforms that support 42034e7590efSmrg# interlibrary dependencies. 42044e7590efSmrg# 'none' -- dependencies not supported. 42054e7590efSmrg# `unknown' -- same as none, but documents that we really don't know. 42064e7590efSmrg# 'pass_all' -- all dependencies passed with no checks. 42074e7590efSmrg# 'test_compile' -- check by making test program. 42084e7590efSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 42094e7590efSmrg# which responds to the $file_magic_cmd with a given extended regex. 42104e7590efSmrg# If you have `file' or equivalent on your system and you're not sure 42114e7590efSmrg# whether `pass_all' will *always* work, you probably want this one. 42124e7590efSmrg 42134e7590efSmrgcase $host_os in 42144e7590efSmrgaix[[4-9]]*) 42154e7590efSmrg lt_cv_deplibs_check_method=pass_all 421652b01e16Smrg ;; 42174b0ead49Smrg 42184e7590efSmrgbeos*) 42194e7590efSmrg lt_cv_deplibs_check_method=pass_all 422052b01e16Smrg ;; 42214b0ead49Smrg 42224e7590efSmrgbsdi[[45]]*) 42234e7590efSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 42244e7590efSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 42254e7590efSmrg lt_cv_file_magic_test_file=/shlib/libc.so 422652b01e16Smrg ;; 42274b0ead49Smrg 42284e7590efSmrgcygwin*) 42294e7590efSmrg # func_win32_libid is a shell function defined in ltmain.sh 42304e7590efSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42314e7590efSmrg lt_cv_file_magic_cmd='func_win32_libid' 423252b01e16Smrg ;; 42334b0ead49Smrg 42344e7590efSmrgmingw* | pw32*) 42354e7590efSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 42364e7590efSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 42374e7590efSmrg # unless we find 'file', for example because we are cross-compiling. 42384e7590efSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 42394e7590efSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 42404e7590efSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42414e7590efSmrg lt_cv_file_magic_cmd='func_win32_libid' 42424e7590efSmrg else 42434e7590efSmrg # Keep this pattern in sync with the one in func_win32_libid. 42444e7590efSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 42454e7590efSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 424652b01e16Smrg fi 424752b01e16Smrg ;; 42484b0ead49Smrg 42494e7590efSmrgcegcc*) 42504e7590efSmrg # use the weaker test based on 'objdump'. See mingw*. 42514e7590efSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 42524e7590efSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 425352b01e16Smrg ;; 42544b0ead49Smrg 42554e7590efSmrgdarwin* | rhapsody*) 42564e7590efSmrg lt_cv_deplibs_check_method=pass_all 425752b01e16Smrg ;; 425852b01e16Smrg 42594e7590efSmrgfreebsd* | dragonfly*) 42604e7590efSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 42614e7590efSmrg case $host_cpu in 42624e7590efSmrg i*86 ) 42634e7590efSmrg # Not sure whether the presence of OpenBSD here was a mistake. 42644e7590efSmrg # Let's accept both of them until this is cleared up. 42654e7590efSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 42664e7590efSmrg lt_cv_file_magic_cmd=/usr/bin/file 42674e7590efSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 42684e7590efSmrg ;; 426952b01e16Smrg esac 42704e7590efSmrg else 42714e7590efSmrg lt_cv_deplibs_check_method=pass_all 427252b01e16Smrg fi 427352b01e16Smrg ;; 42744b0ead49Smrg 42754e7590efSmrggnu*) 42764e7590efSmrg lt_cv_deplibs_check_method=pass_all 427749dc963fSmrg ;; 427849dc963fSmrg 42794e7590efSmrghaiku*) 42804e7590efSmrg lt_cv_deplibs_check_method=pass_all 428152b01e16Smrg ;; 42824b0ead49Smrg 42834e7590efSmrghpux10.20* | hpux11*) 42844e7590efSmrg lt_cv_file_magic_cmd=/usr/bin/file 42854e7590efSmrg case $host_cpu in 42864e7590efSmrg ia64*) 42874e7590efSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 42884e7590efSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 42894e7590efSmrg ;; 42904e7590efSmrg hppa*64*) 42914e7590efSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 42924e7590efSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 42934e7590efSmrg ;; 42944e7590efSmrg *) 42954e7590efSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 42964e7590efSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 42974e7590efSmrg ;; 42984e7590efSmrg esac 429952b01e16Smrg ;; 430049dc963fSmrg 43014e7590efSmrginterix[[3-9]]*) 43024e7590efSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43034e7590efSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 43044e7590efSmrg ;; 430549dc963fSmrg 43064e7590efSmrgirix5* | irix6* | nonstopux*) 43074e7590efSmrg case $LD in 43084e7590efSmrg *-32|*"-32 ") libmagic=32-bit;; 43094e7590efSmrg *-n32|*"-n32 ") libmagic=N32;; 43104e7590efSmrg *-64|*"-64 ") libmagic=64-bit;; 43114e7590efSmrg *) libmagic=never-match;; 43124e7590efSmrg esac 43134e7590efSmrg lt_cv_deplibs_check_method=pass_all 431449dc963fSmrg ;; 43154b0ead49Smrg 43164e7590efSmrg# This must be glibc/ELF. 43174e7590efSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 43184e7590efSmrg lt_cv_deplibs_check_method=pass_all 43194e7590efSmrg ;; 432052b01e16Smrg 43214e7590efSmrgnetbsd*) 43224e7590efSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43234e7590efSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 43244e7590efSmrg else 43254e7590efSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 43264e7590efSmrg fi 432752b01e16Smrg ;; 43284b0ead49Smrg 43294e7590efSmrgnewos6*) 43304e7590efSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 43314e7590efSmrg lt_cv_file_magic_cmd=/usr/bin/file 43324e7590efSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 43334e7590efSmrg ;; 43344b0ead49Smrg 43354e7590efSmrg*nto* | *qnx*) 43364e7590efSmrg lt_cv_deplibs_check_method=pass_all 43374e7590efSmrg ;; 433849dc963fSmrg 43394e7590efSmrgopenbsd*) 43404e7590efSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 43414e7590efSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 434252b01e16Smrg else 43434e7590efSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 434452b01e16Smrg fi 43454e7590efSmrg ;; 43464b0ead49Smrg 43474e7590efSmrgosf3* | osf4* | osf5*) 43484e7590efSmrg lt_cv_deplibs_check_method=pass_all 43494e7590efSmrg ;; 435052b01e16Smrg 43514e7590efSmrgrdos*) 43524e7590efSmrg lt_cv_deplibs_check_method=pass_all 43534e7590efSmrg ;; 435449dc963fSmrg 43554e7590efSmrgsolaris*) 43564e7590efSmrg lt_cv_deplibs_check_method=pass_all 43574e7590efSmrg ;; 435849dc963fSmrg 43594e7590efSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 43604e7590efSmrg lt_cv_deplibs_check_method=pass_all 43614e7590efSmrg ;; 43624e7590efSmrg 43634e7590efSmrgsysv4 | sysv4.3*) 43644e7590efSmrg case $host_vendor in 43654e7590efSmrg motorola) 43664e7590efSmrg 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]]' 43674e7590efSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 436852b01e16Smrg ;; 43694e7590efSmrg ncr) 43704e7590efSmrg lt_cv_deplibs_check_method=pass_all 43714e7590efSmrg ;; 43724e7590efSmrg sequent) 43734e7590efSmrg lt_cv_file_magic_cmd='/bin/file' 43744e7590efSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 43754e7590efSmrg ;; 43764e7590efSmrg sni) 43774e7590efSmrg lt_cv_file_magic_cmd='/bin/file' 43784e7590efSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 43794e7590efSmrg lt_cv_file_magic_test_file=/lib/libc.so 43804e7590efSmrg ;; 43814e7590efSmrg siemens) 43824e7590efSmrg lt_cv_deplibs_check_method=pass_all 43834e7590efSmrg ;; 43844e7590efSmrg pc) 43854e7590efSmrg lt_cv_deplibs_check_method=pass_all 43864e7590efSmrg ;; 43874e7590efSmrg esac 43884e7590efSmrg ;; 43894e7590efSmrg 43904e7590efSmrgtpf*) 43914e7590efSmrg lt_cv_deplibs_check_method=pass_all 43924e7590efSmrg ;; 43934e7590efSmrgesac 43944e7590efSmrg]) 43954e7590efSmrg 43964e7590efSmrgfile_magic_glob= 43974e7590efSmrgwant_nocaseglob=no 43984e7590efSmrgif test "$build" = "$host"; then 43994e7590efSmrg case $host_os in 44004e7590efSmrg mingw* | pw32*) 44014e7590efSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 44024e7590efSmrg want_nocaseglob=yes 44034e7590efSmrg else 44044e7590efSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 44054e7590efSmrg fi 44064b0ead49Smrg ;; 44074b0ead49Smrg esac 440852b01e16Smrgfi 44094e7590efSmrg 44104e7590efSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 44114e7590efSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 44124e7590efSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 44134e7590efSmrg 44144e7590efSmrg_LT_DECL([], [deplibs_check_method], [1], 44154e7590efSmrg [Method to check whether dependent libraries are shared objects]) 44164e7590efSmrg_LT_DECL([], [file_magic_cmd], [1], 44174e7590efSmrg [Command to use when deplibs_check_method = "file_magic"]) 44184e7590efSmrg_LT_DECL([], [file_magic_glob], [1], 44194e7590efSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 44204e7590efSmrg_LT_DECL([], [want_nocaseglob], [1], 44214e7590efSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 44224e7590efSmrg])# _LT_CHECK_MAGIC_METHOD 44234e7590efSmrg 44244e7590efSmrg 44254e7590efSmrg# LT_PATH_NM 44264e7590efSmrg# ---------- 44274e7590efSmrg# find the pathname to a BSD- or MS-compatible name lister 44284e7590efSmrgAC_DEFUN([LT_PATH_NM], 44294e7590efSmrg[AC_REQUIRE([AC_PROG_CC])dnl 44304e7590efSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 44314e7590efSmrg[if test -n "$NM"; then 44324e7590efSmrg # Let the user override the test. 44334e7590efSmrg lt_cv_path_NM="$NM" 443452b01e16Smrgelse 44354e7590efSmrg lt_nm_to_check="${ac_tool_prefix}nm" 44364e7590efSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 44374e7590efSmrg lt_nm_to_check="$lt_nm_to_check nm" 44384e7590efSmrg fi 44394e7590efSmrg for lt_tmp_nm in $lt_nm_to_check; do 44404e7590efSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 44414e7590efSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 44424e7590efSmrg IFS="$lt_save_ifs" 44434e7590efSmrg test -z "$ac_dir" && ac_dir=. 44444e7590efSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 44454e7590efSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 44464e7590efSmrg # Check to see if the nm accepts a BSD-compat flag. 44474e7590efSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 44484e7590efSmrg # nm: unknown option "B" ignored 44494e7590efSmrg # Tru64's nm complains that /dev/null is an invalid object file 44504e7590efSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 44514e7590efSmrg */dev/null* | *'Invalid file or object type'*) 44524e7590efSmrg lt_cv_path_NM="$tmp_nm -B" 44534e7590efSmrg break 44544e7590efSmrg ;; 44554e7590efSmrg *) 44564e7590efSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 44574e7590efSmrg */dev/null*) 44584e7590efSmrg lt_cv_path_NM="$tmp_nm -p" 44594e7590efSmrg break 44604e7590efSmrg ;; 44614e7590efSmrg *) 44624e7590efSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 44634e7590efSmrg continue # so that we can try to find one that supports BSD flags 44644e7590efSmrg ;; 44654e7590efSmrg esac 44664e7590efSmrg ;; 44674e7590efSmrg esac 44684e7590efSmrg fi 44694e7590efSmrg done 44704e7590efSmrg IFS="$lt_save_ifs" 44714e7590efSmrg done 44724e7590efSmrg : ${lt_cv_path_NM=no} 447352b01e16Smrgfi]) 44744e7590efSmrgif test "$lt_cv_path_NM" != "no"; then 44754e7590efSmrg NM="$lt_cv_path_NM" 447652b01e16Smrgelse 44774e7590efSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 44784e7590efSmrg if test -n "$DUMPBIN"; then : 44794e7590efSmrg # Let the user override the test. 44804e7590efSmrg else 44814e7590efSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 44824e7590efSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 44834e7590efSmrg *COFF*) 44844e7590efSmrg DUMPBIN="$DUMPBIN -symbols" 44854e7590efSmrg ;; 44864e7590efSmrg *) 44874e7590efSmrg DUMPBIN=: 44884e7590efSmrg ;; 44894e7590efSmrg esac 44904e7590efSmrg fi 44914e7590efSmrg AC_SUBST([DUMPBIN]) 44924e7590efSmrg if test "$DUMPBIN" != ":"; then 44934e7590efSmrg NM="$DUMPBIN" 44944e7590efSmrg fi 449552b01e16Smrgfi 44964e7590efSmrgtest -z "$NM" && NM=nm 44974e7590efSmrgAC_SUBST([NM]) 44984e7590efSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 449952b01e16Smrg 45004e7590efSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45014e7590efSmrg [lt_cv_nm_interface="BSD nm" 45024e7590efSmrg echo "int some_variable = 0;" > conftest.$ac_ext 45034e7590efSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45044e7590efSmrg (eval "$ac_compile" 2>conftest.err) 45054e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45064e7590efSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45074e7590efSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45084e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45094e7590efSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45104e7590efSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 45114e7590efSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45124e7590efSmrg lt_cv_nm_interface="MS dumpbin" 45134e7590efSmrg fi 45144e7590efSmrg rm -f conftest*]) 45154e7590efSmrg])# LT_PATH_NM 451652b01e16Smrg 451749dc963fSmrg# Old names: 45184e7590efSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 45194e7590efSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 452049dc963fSmrgdnl aclocal-1.4 backwards compatibility: 45214e7590efSmrgdnl AC_DEFUN([AM_PROG_NM], []) 45224e7590efSmrgdnl AC_DEFUN([AC_PROG_NM], []) 452349dc963fSmrg 45244e7590efSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45254e7590efSmrg# -------------------------------- 45264e7590efSmrg# how to determine the name of the shared library 45274e7590efSmrg# associated with a specific link library. 45284e7590efSmrg# -- PORTME fill in with the dynamic library characteristics 45294e7590efSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 45304e7590efSmrg[m4_require([_LT_DECL_EGREP]) 45314e7590efSmrgm4_require([_LT_DECL_OBJDUMP]) 45324e7590efSmrgm4_require([_LT_DECL_DLLTOOL]) 45334e7590efSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 45344e7590efSmrglt_cv_sharedlib_from_linklib_cmd, 45354e7590efSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 453649dc963fSmrg 45374e7590efSmrgcase $host_os in 45384e7590efSmrgcygwin* | mingw* | pw32* | cegcc*) 45394e7590efSmrg # two different shell functions defined in ltmain.sh 45404e7590efSmrg # decide which to use based on capabilities of $DLLTOOL 45414e7590efSmrg case `$DLLTOOL --help 2>&1` in 45424e7590efSmrg *--identify-strict*) 45434e7590efSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 45444e7590efSmrg ;; 45454e7590efSmrg *) 45464e7590efSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 45474e7590efSmrg ;; 45484e7590efSmrg esac 45494b0ead49Smrg ;; 455052b01e16Smrg*) 45514e7590efSmrg # fallback: assume linklib IS sharedlib 45524e7590efSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 455352b01e16Smrg ;; 455452b01e16Smrgesac 45554e7590efSmrg]) 45564e7590efSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 45574e7590efSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 45584b0ead49Smrg 45594e7590efSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 45604e7590efSmrg [Command to associate shared and link libraries]) 45614e7590efSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45624b0ead49Smrg 45634e7590efSmrg 45644e7590efSmrg# _LT_PATH_MANIFEST_TOOL 456549dc963fSmrg# ---------------------- 45664e7590efSmrg# locate the manifest tool 45674e7590efSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 45684e7590efSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 45694e7590efSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 45704e7590efSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 45714e7590efSmrg [lt_cv_path_mainfest_tool=no 45724e7590efSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 45734e7590efSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 45744e7590efSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45754e7590efSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 45764e7590efSmrg lt_cv_path_mainfest_tool=yes 45774e7590efSmrg fi 45784e7590efSmrg rm -f conftest*]) 45794e7590efSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 45804e7590efSmrg MANIFEST_TOOL=: 45814e7590efSmrgfi 45824e7590efSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 45834e7590efSmrg])# _LT_PATH_MANIFEST_TOOL 45844b0ead49Smrg 45854b0ead49Smrg 45864e7590efSmrg# LT_LIB_M 45874e7590efSmrg# -------- 45884e7590efSmrg# check for math library 45894e7590efSmrgAC_DEFUN([LT_LIB_M], 45904e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 45914e7590efSmrgLIBM= 45924e7590efSmrgcase $host in 45934e7590efSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 45944e7590efSmrg # These system don't have libm, or don't need it 459552b01e16Smrg ;; 45964e7590efSmrg*-ncr-sysv4.3*) 45974e7590efSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 45984e7590efSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 459952b01e16Smrg ;; 46004e7590efSmrg*) 46014e7590efSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 46024b0ead49Smrg ;; 46034e7590efSmrgesac 46044e7590efSmrgAC_SUBST([LIBM]) 46054e7590efSmrg])# LT_LIB_M 460652b01e16Smrg 46074e7590efSmrg# Old name: 46084e7590efSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46094e7590efSmrgdnl aclocal-1.4 backwards compatibility: 46104e7590efSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 46114b0ead49Smrg 46124b0ead49Smrg 46134e7590efSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46144e7590efSmrg# ------------------------------- 46154e7590efSmrgm4_defun([_LT_COMPILER_NO_RTTI], 46164e7590efSmrg[m4_require([_LT_TAG_COMPILER])dnl 46174b0ead49Smrg 46184e7590efSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 46197aa89044Smrg 46204e7590efSmrgif test "$GCC" = yes; then 46214e7590efSmrg case $cc_basename in 46224e7590efSmrg nvcc*) 46234e7590efSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 462452b01e16Smrg *) 46254e7590efSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 462652b01e16Smrg esac 46274b0ead49Smrg 46284e7590efSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 46294e7590efSmrg lt_cv_prog_compiler_rtti_exceptions, 46304e7590efSmrg [-fno-rtti -fno-exceptions], [], 46314e7590efSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 46324e7590efSmrgfi 46334e7590efSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 46344e7590efSmrg [Compiler flag to turn off builtin functions]) 46354e7590efSmrg])# _LT_COMPILER_NO_RTTI 46364b0ead49Smrg 46374b0ead49Smrg 46384e7590efSmrg# _LT_CMD_GLOBAL_SYMBOLS 46394e7590efSmrg# ---------------------- 46404e7590efSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 46414e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 46424e7590efSmrgAC_REQUIRE([AC_PROG_CC])dnl 46434e7590efSmrgAC_REQUIRE([AC_PROG_AWK])dnl 46444e7590efSmrgAC_REQUIRE([LT_PATH_NM])dnl 46454e7590efSmrgAC_REQUIRE([LT_PATH_LD])dnl 46464e7590efSmrgm4_require([_LT_DECL_SED])dnl 46474e7590efSmrgm4_require([_LT_DECL_EGREP])dnl 46484e7590efSmrgm4_require([_LT_TAG_COMPILER])dnl 46494b0ead49Smrg 46504e7590efSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 46514e7590efSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 46524e7590efSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 46534e7590efSmrg[ 46544e7590efSmrg# These are sane defaults that work on at least a few old systems. 46554e7590efSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 46564b0ead49Smrg 46574e7590efSmrg# Character class describing NM global symbol codes. 46584e7590efSmrgsymcode='[[BCDEGRST]]' 46594b0ead49Smrg 46604e7590efSmrg# Regexp to match symbols that can be accessed directly from C. 46614e7590efSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 46624b0ead49Smrg 46634e7590efSmrg# Define system-specific variables. 46644e7590efSmrgcase $host_os in 46654e7590efSmrgaix*) 46664e7590efSmrg symcode='[[BCDT]]' 46674e7590efSmrg ;; 46684e7590efSmrgcygwin* | mingw* | pw32* | cegcc*) 46694e7590efSmrg symcode='[[ABCDGISTW]]' 46704e7590efSmrg ;; 46714e7590efSmrghpux*) 46724e7590efSmrg if test "$host_cpu" = ia64; then 46734e7590efSmrg symcode='[[ABCDEGRST]]' 467452b01e16Smrg fi 467552b01e16Smrg ;; 46764e7590efSmrgirix* | nonstopux*) 46774e7590efSmrg symcode='[[BCDEGRST]]' 467852b01e16Smrg ;; 46794e7590efSmrgosf*) 46804e7590efSmrg symcode='[[BCDEGQRST]]' 468152b01e16Smrg ;; 468252b01e16Smrgsolaris*) 46834e7590efSmrg symcode='[[BDRT]]' 468452b01e16Smrg ;; 46854e7590efSmrgsco3.2v5*) 46864e7590efSmrg symcode='[[DT]]' 468749dc963fSmrg ;; 46884e7590efSmrgsysv4.2uw2*) 46894e7590efSmrg symcode='[[DT]]' 46904e7590efSmrg ;; 46914e7590efSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 46924e7590efSmrg symcode='[[ABDT]]' 46934e7590efSmrg ;; 46944e7590efSmrgsysv4) 46954e7590efSmrg symcode='[[DFNSTU]]' 469652b01e16Smrg ;; 46974e7590efSmrgesac 46984b0ead49Smrg 46994e7590efSmrg# If we're using GNU nm, then use its standard symbol codes. 47004e7590efSmrgcase `$NM -V 2>&1` in 47014e7590efSmrg*GNU* | *'with BFD'*) 47024e7590efSmrg symcode='[[ABCDGIRSTW]]' ;; 47034e7590efSmrgesac 47044e7590efSmrg 47054e7590efSmrg# Transform an extracted symbol line into a proper C declaration. 47064e7590efSmrg# Some systems (esp. on ia64) link data and code symbols differently, 47074e7590efSmrg# so use this general approach. 47084e7590efSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 47094e7590efSmrg 47104e7590efSmrg# Transform an extracted symbol line into symbol name and symbol address 47114e7590efSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 47124e7590efSmrglt_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'" 47134e7590efSmrg 47144e7590efSmrg# Handle CRLF in mingw tool chain 47154e7590efSmrgopt_cr= 47164e7590efSmrgcase $build_os in 47174e7590efSmrgmingw*) 47184e7590efSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 471952b01e16Smrg ;; 472052b01e16Smrgesac 47214b0ead49Smrg 47224e7590efSmrg# Try without a prefix underscore, then with it. 47234e7590efSmrgfor ac_symprfx in "" "_"; do 47244b0ead49Smrg 47254e7590efSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 47264e7590efSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 472749dc963fSmrg 47284e7590efSmrg # Write the raw and C identifiers. 47294e7590efSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 47304e7590efSmrg # Fake it for dumpbin and say T for any non-static function 47314e7590efSmrg # and D for any global variable. 47324e7590efSmrg # Also find C++ and __fastcall symbols from MSVC++, 47334e7590efSmrg # which start with @ or ?. 47344e7590efSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 47354e7590efSmrg" {last_section=section; section=\$ 3};"\ 47364e7590efSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 47374e7590efSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 47384e7590efSmrg" \$ 0!~/External *\|/{next};"\ 47394e7590efSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 47404e7590efSmrg" {if(hide[section]) next};"\ 47414e7590efSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 47424e7590efSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 47434e7590efSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 47444e7590efSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 47454e7590efSmrg" ' prfx=^$ac_symprfx]" 47464e7590efSmrg else 47474e7590efSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 474852b01e16Smrg fi 47494e7590efSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 47504b0ead49Smrg 475149dc963fSmrg # Check to see that the pipe works correctly. 475249dc963fSmrg pipe_works=no 47534b0ead49Smrg 475449dc963fSmrg rm -f conftest* 475549dc963fSmrg cat > conftest.$ac_ext <<_LT_EOF 475649dc963fSmrg#ifdef __cplusplus 475749dc963fSmrgextern "C" { 475849dc963fSmrg#endif 475949dc963fSmrgchar nm_test_var; 476049dc963fSmrgvoid nm_test_func(void); 476149dc963fSmrgvoid nm_test_func(void){} 476249dc963fSmrg#ifdef __cplusplus 476349dc963fSmrg} 476449dc963fSmrg#endif 476549dc963fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 476649dc963fSmrg_LT_EOF 47674b0ead49Smrg 476849dc963fSmrg if AC_TRY_EVAL(ac_compile); then 476949dc963fSmrg # Now try to grab the symbols. 477049dc963fSmrg nlist=conftest.nm 47717aa89044Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 477249dc963fSmrg # Try sorting and uniquifying the output. 477349dc963fSmrg if sort "$nlist" | uniq > "$nlist"T; then 477449dc963fSmrg mv -f "$nlist"T "$nlist" 477549dc963fSmrg else 477649dc963fSmrg rm -f "$nlist"T 477749dc963fSmrg fi 47784b0ead49Smrg 477949dc963fSmrg # Make sure that we snagged all the symbols we need. 478049dc963fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 478149dc963fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 478249dc963fSmrg cat <<_LT_EOF > conftest.$ac_ext 47834e7590efSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 47844e7590efSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 47854e7590efSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 47864e7590efSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 47874e7590efSmrg# define LT@&t@_DLSYM_CONST 47884e7590efSmrg#elif defined(__osf__) 47894e7590efSmrg/* This system does not cope well with relocations in const data. */ 47904e7590efSmrg# define LT@&t@_DLSYM_CONST 47914e7590efSmrg#else 47924e7590efSmrg# define LT@&t@_DLSYM_CONST const 47934e7590efSmrg#endif 47944e7590efSmrg 479549dc963fSmrg#ifdef __cplusplus 479649dc963fSmrgextern "C" { 479749dc963fSmrg#endif 47984b0ead49Smrg 479949dc963fSmrg_LT_EOF 480049dc963fSmrg # Now generate the symbol file. 480149dc963fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 48024b0ead49Smrg 480349dc963fSmrg cat <<_LT_EOF >> conftest.$ac_ext 48044b0ead49Smrg 480549dc963fSmrg/* The mapping between symbol names and symbols. */ 48064e7590efSmrgLT@&t@_DLSYM_CONST struct { 480749dc963fSmrg const char *name; 480849dc963fSmrg void *address; 480949dc963fSmrg} 481049dc963fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 481149dc963fSmrg{ 481249dc963fSmrg { "@PROGRAM@", (void *) 0 }, 481349dc963fSmrg_LT_EOF 481449dc963fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 481549dc963fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 481649dc963fSmrg {0, (void *) 0} 481749dc963fSmrg}; 48184b0ead49Smrg 481949dc963fSmrg/* This works around a problem in FreeBSD linker */ 482049dc963fSmrg#ifdef FREEBSD_WORKAROUND 482149dc963fSmrgstatic const void *lt_preloaded_setup() { 482249dc963fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 482349dc963fSmrg} 482449dc963fSmrg#endif 48254b0ead49Smrg 482649dc963fSmrg#ifdef __cplusplus 482749dc963fSmrg} 482849dc963fSmrg#endif 482949dc963fSmrg_LT_EOF 483049dc963fSmrg # Now try linking the two files. 483149dc963fSmrg mv conftest.$ac_objext conftstm.$ac_objext 48324e7590efSmrg lt_globsym_save_LIBS=$LIBS 48334e7590efSmrg lt_globsym_save_CFLAGS=$CFLAGS 483449dc963fSmrg LIBS="conftstm.$ac_objext" 483549dc963fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 483649dc963fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 483749dc963fSmrg pipe_works=yes 483849dc963fSmrg fi 48394e7590efSmrg LIBS=$lt_globsym_save_LIBS 48404e7590efSmrg CFLAGS=$lt_globsym_save_CFLAGS 484149dc963fSmrg else 484249dc963fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 484349dc963fSmrg fi 484449dc963fSmrg else 484549dc963fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 484649dc963fSmrg fi 484752b01e16Smrg else 484849dc963fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 484952b01e16Smrg fi 485052b01e16Smrg else 485149dc963fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 485249dc963fSmrg cat conftest.$ac_ext >&5 485352b01e16Smrg fi 485449dc963fSmrg rm -rf conftest* conftst* 48554b0ead49Smrg 485649dc963fSmrg # Do not use the global_symbol_pipe unless it works. 485749dc963fSmrg if test "$pipe_works" = yes; then 485849dc963fSmrg break 485949dc963fSmrg else 486049dc963fSmrg lt_cv_sys_global_symbol_pipe= 486149dc963fSmrg fi 486249dc963fSmrgdone 486349dc963fSmrg]) 486449dc963fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 486549dc963fSmrg lt_cv_sys_global_symbol_to_cdecl= 486649dc963fSmrgfi 486749dc963fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 486849dc963fSmrg AC_MSG_RESULT(failed) 486952b01e16Smrgelse 487049dc963fSmrg AC_MSG_RESULT(ok) 487152b01e16Smrgfi 48724b0ead49Smrg 48734e7590efSmrg# Response file support. 48744e7590efSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 48754e7590efSmrg nm_file_list_spec='@' 48764e7590efSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 48774e7590efSmrg nm_file_list_spec='@' 48784e7590efSmrgfi 48794e7590efSmrg 488049dc963fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 488149dc963fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 488249dc963fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 488349dc963fSmrg [Transform the output of nm in a proper C declaration]) 488449dc963fSmrg_LT_DECL([global_symbol_to_c_name_address], 488549dc963fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 488649dc963fSmrg [Transform the output of nm in a C name address pair]) 488749dc963fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 488849dc963fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 488949dc963fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 48904e7590efSmrg_LT_DECL([], [nm_file_list_spec], [1], 48914e7590efSmrg [Specify filename containing input files for $NM]) 489249dc963fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 48934b0ead49Smrg 48944b0ead49Smrg 489549dc963fSmrg# _LT_COMPILER_PIC([TAGNAME]) 489649dc963fSmrg# --------------------------- 489749dc963fSmrgm4_defun([_LT_COMPILER_PIC], 489849dc963fSmrg[m4_require([_LT_TAG_COMPILER])dnl 489949dc963fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 490049dc963fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 490149dc963fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 49024b0ead49Smrg 490349dc963fSmrgm4_if([$1], [CXX], [ 490449dc963fSmrg # C++ specific cases for pic, static, wl, etc. 490549dc963fSmrg if test "$GXX" = yes; then 490649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 490749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 49084b0ead49Smrg 490949dc963fSmrg case $host_os in 491049dc963fSmrg aix*) 491149dc963fSmrg # All AIX code is PIC. 491252b01e16Smrg if test "$host_cpu" = ia64; then 491349dc963fSmrg # AIX 5 now supports IA64 processor 491449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 491552b01e16Smrg fi 491649dc963fSmrg ;; 49174b0ead49Smrg 491849dc963fSmrg amigaos*) 491949dc963fSmrg case $host_cpu in 492049dc963fSmrg powerpc) 492149dc963fSmrg # see comment about AmigaOS4 .so support 492249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 492349dc963fSmrg ;; 492449dc963fSmrg m68k) 492549dc963fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 492649dc963fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 492749dc963fSmrg # like `-m68040'. 492849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 492952b01e16Smrg ;; 493049dc963fSmrg esac 493149dc963fSmrg ;; 49324b0ead49Smrg 493349dc963fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 493449dc963fSmrg # PIC is the default for these OSes. 493549dc963fSmrg ;; 493649dc963fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 493749dc963fSmrg # This hack is so that the source file can tell whether it is being 493849dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 493949dc963fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 494049dc963fSmrg # (--disable-auto-import) libraries 494149dc963fSmrg m4_if([$1], [GCJ], [], 494249dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 494349dc963fSmrg ;; 494449dc963fSmrg darwin* | rhapsody*) 494549dc963fSmrg # PIC is the default on this platform 494649dc963fSmrg # Common symbols not allowed in MH_DYLIB files 494749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 494849dc963fSmrg ;; 494949dc963fSmrg *djgpp*) 495049dc963fSmrg # DJGPP does not support shared libraries at all 495149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 495249dc963fSmrg ;; 49537aa89044Smrg haiku*) 49547aa89044Smrg # PIC is the default for Haiku. 49557aa89044Smrg # The "-static" flag exists, but is broken. 49567aa89044Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 49577aa89044Smrg ;; 495849dc963fSmrg interix[[3-9]]*) 495949dc963fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 496049dc963fSmrg # Instead, we relocate shared libraries at runtime. 496149dc963fSmrg ;; 496249dc963fSmrg sysv4*MP*) 496349dc963fSmrg if test -d /usr/nec; then 496449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 496549dc963fSmrg fi 496649dc963fSmrg ;; 496749dc963fSmrg hpux*) 496849dc963fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 496949dc963fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 497049dc963fSmrg # sets the default TLS model and affects inlining. 497149dc963fSmrg case $host_cpu in 497249dc963fSmrg hppa*64*) 497352b01e16Smrg ;; 497452b01e16Smrg *) 497549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 497652b01e16Smrg ;; 497749dc963fSmrg esac 497852b01e16Smrg ;; 497949dc963fSmrg *qnx* | *nto*) 498049dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 498149dc963fSmrg # it will coredump. 498249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 498352b01e16Smrg ;; 498452b01e16Smrg *) 498549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498652b01e16Smrg ;; 498752b01e16Smrg esac 498849dc963fSmrg else 498949dc963fSmrg case $host_os in 499049dc963fSmrg aix[[4-9]]*) 499149dc963fSmrg # All AIX code is PIC. 499249dc963fSmrg if test "$host_cpu" = ia64; then 499349dc963fSmrg # AIX 5 now supports IA64 processor 499449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499549dc963fSmrg else 499649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 499749dc963fSmrg fi 499852b01e16Smrg ;; 499949dc963fSmrg chorus*) 500049dc963fSmrg case $cc_basename in 500149dc963fSmrg cxch68*) 500249dc963fSmrg # Green Hills C++ Compiler 500349dc963fSmrg # _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" 500452b01e16Smrg ;; 500552b01e16Smrg esac 500652b01e16Smrg ;; 50074e7590efSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50084e7590efSmrg # This hack is so that the source file can tell whether it is being 50094e7590efSmrg # built for inclusion in a dll (and should export symbols for example). 50104e7590efSmrg m4_if([$1], [GCJ], [], 50114e7590efSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50124e7590efSmrg ;; 501349dc963fSmrg dgux*) 501449dc963fSmrg case $cc_basename in 501549dc963fSmrg ec++*) 501649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 501749dc963fSmrg ;; 501849dc963fSmrg ghcx*) 501949dc963fSmrg # Green Hills C++ Compiler 502049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 502149dc963fSmrg ;; 502249dc963fSmrg *) 502349dc963fSmrg ;; 502449dc963fSmrg esac 502549dc963fSmrg ;; 502649dc963fSmrg freebsd* | dragonfly*) 502749dc963fSmrg # FreeBSD uses GNU C++ 502849dc963fSmrg ;; 502949dc963fSmrg hpux9* | hpux10* | hpux11*) 503049dc963fSmrg case $cc_basename in 503149dc963fSmrg CC*) 503249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 503449dc963fSmrg if test "$host_cpu" != ia64; then 503549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 503649dc963fSmrg fi 503749dc963fSmrg ;; 503849dc963fSmrg aCC*) 503949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 504049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 504152b01e16Smrg case $host_cpu in 504249dc963fSmrg hppa*64*|ia64*) 504349dc963fSmrg # +Z the default 504452b01e16Smrg ;; 504552b01e16Smrg *) 504649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 504752b01e16Smrg ;; 504852b01e16Smrg esac 504949dc963fSmrg ;; 505049dc963fSmrg *) 505149dc963fSmrg ;; 505252b01e16Smrg esac 505352b01e16Smrg ;; 505449dc963fSmrg interix*) 505549dc963fSmrg # This is c89, which is MS Visual C++ (no shared libs) 505649dc963fSmrg # Anyone wants to do a port? 505752b01e16Smrg ;; 505849dc963fSmrg irix5* | irix6* | nonstopux*) 505949dc963fSmrg case $cc_basename in 506049dc963fSmrg CC*) 506149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 506349dc963fSmrg # CC pic flag -KPIC is the default. 506449dc963fSmrg ;; 506549dc963fSmrg *) 506649dc963fSmrg ;; 506752b01e16Smrg esac 506852b01e16Smrg ;; 50697aa89044Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 507049dc963fSmrg case $cc_basename in 507149dc963fSmrg KCC*) 507249dc963fSmrg # KAI C++ Compiler 507349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 507449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 507549dc963fSmrg ;; 507649dc963fSmrg ecpc* ) 507749dc963fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 507849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 507949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 508149dc963fSmrg ;; 508249dc963fSmrg icpc* ) 508349dc963fSmrg # Intel C++, used to be incompatible with GCC. 508449dc963fSmrg # ICC 10 doesn't accept -KPIC any more. 508549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 508749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 508849dc963fSmrg ;; 508949dc963fSmrg pgCC* | pgcpp*) 509049dc963fSmrg # Portland Group C++ compiler 509149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 509349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509449dc963fSmrg ;; 509549dc963fSmrg cxx*) 509649dc963fSmrg # Compaq C++ 509749dc963fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 509849dc963fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 509949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 510049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 510149dc963fSmrg ;; 51027aa89044Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 51037aa89044Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 510449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 510649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 510749dc963fSmrg ;; 510849dc963fSmrg *) 510949dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 511049dc963fSmrg *Sun\ C*) 511149dc963fSmrg # Sun C++ 5.9 511249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 511349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 511549dc963fSmrg ;; 511649dc963fSmrg esac 511749dc963fSmrg ;; 511849dc963fSmrg esac 511952b01e16Smrg ;; 512049dc963fSmrg lynxos*) 512152b01e16Smrg ;; 512249dc963fSmrg m88k*) 512352b01e16Smrg ;; 512449dc963fSmrg mvs*) 512549dc963fSmrg case $cc_basename in 512649dc963fSmrg cxx*) 512749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 512849dc963fSmrg ;; 512949dc963fSmrg *) 513049dc963fSmrg ;; 513149dc963fSmrg esac 513252b01e16Smrg ;; 513349dc963fSmrg netbsd*) 513452b01e16Smrg ;; 513549dc963fSmrg *qnx* | *nto*) 513649dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 513749dc963fSmrg # it will coredump. 513849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 513949dc963fSmrg ;; 514049dc963fSmrg osf3* | osf4* | osf5*) 514149dc963fSmrg case $cc_basename in 514249dc963fSmrg KCC*) 514349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 514449dc963fSmrg ;; 514549dc963fSmrg RCC*) 514649dc963fSmrg # Rational C++ 2.4.1 514749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 514849dc963fSmrg ;; 514949dc963fSmrg cxx*) 515049dc963fSmrg # Digital/Compaq C++ 515149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515249dc963fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 515349dc963fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 515449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 515549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 515649dc963fSmrg ;; 515749dc963fSmrg *) 515849dc963fSmrg ;; 515949dc963fSmrg esac 516052b01e16Smrg ;; 516149dc963fSmrg psos*) 516252b01e16Smrg ;; 516349dc963fSmrg solaris*) 516449dc963fSmrg case $cc_basename in 51657aa89044Smrg CC* | sunCC*) 516649dc963fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 516749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 516849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 516949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 517049dc963fSmrg ;; 517149dc963fSmrg gcx*) 517249dc963fSmrg # Green Hills C++ Compiler 517349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 517449dc963fSmrg ;; 517552b01e16Smrg *) 517652b01e16Smrg ;; 517752b01e16Smrg esac 517852b01e16Smrg ;; 517949dc963fSmrg sunos4*) 518049dc963fSmrg case $cc_basename in 518149dc963fSmrg CC*) 518249dc963fSmrg # Sun C++ 4.x 518349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518549dc963fSmrg ;; 518649dc963fSmrg lcc*) 518749dc963fSmrg # Lucid 518849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518949dc963fSmrg ;; 519052b01e16Smrg *) 519152b01e16Smrg ;; 519249dc963fSmrg esac 519352b01e16Smrg ;; 519449dc963fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 519549dc963fSmrg case $cc_basename in 519649dc963fSmrg CC*) 519749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 519949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520049dc963fSmrg ;; 520149dc963fSmrg esac 520252b01e16Smrg ;; 520349dc963fSmrg tandem*) 520449dc963fSmrg case $cc_basename in 520549dc963fSmrg NCC*) 520649dc963fSmrg # NonStop-UX NCC 3.20 520749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520849dc963fSmrg ;; 520949dc963fSmrg *) 521049dc963fSmrg ;; 521149dc963fSmrg esac 521252b01e16Smrg ;; 521349dc963fSmrg vxworks*) 521452b01e16Smrg ;; 521552b01e16Smrg *) 521649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 521752b01e16Smrg ;; 521852b01e16Smrg esac 521949dc963fSmrg fi 522049dc963fSmrg], 522149dc963fSmrg[ 522249dc963fSmrg if test "$GCC" = yes; then 522349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52254b0ead49Smrg 522649dc963fSmrg case $host_os in 522749dc963fSmrg aix*) 522849dc963fSmrg # All AIX code is PIC. 522949dc963fSmrg if test "$host_cpu" = ia64; then 523049dc963fSmrg # AIX 5 now supports IA64 processor 523149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523249dc963fSmrg fi 523349dc963fSmrg ;; 52344b0ead49Smrg 523549dc963fSmrg amigaos*) 523649dc963fSmrg case $host_cpu in 523749dc963fSmrg powerpc) 523849dc963fSmrg # see comment about AmigaOS4 .so support 523949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 524049dc963fSmrg ;; 524149dc963fSmrg m68k) 524249dc963fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 524349dc963fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 524449dc963fSmrg # like `-m68040'. 524549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 524649dc963fSmrg ;; 524749dc963fSmrg esac 524849dc963fSmrg ;; 52494b0ead49Smrg 525049dc963fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 525149dc963fSmrg # PIC is the default for these OSes. 525249dc963fSmrg ;; 52534b0ead49Smrg 525449dc963fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 525549dc963fSmrg # This hack is so that the source file can tell whether it is being 525649dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 525749dc963fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 525849dc963fSmrg # (--disable-auto-import) libraries 525949dc963fSmrg m4_if([$1], [GCJ], [], 526049dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 526149dc963fSmrg ;; 52624b0ead49Smrg 526349dc963fSmrg darwin* | rhapsody*) 526449dc963fSmrg # PIC is the default on this platform 526549dc963fSmrg # Common symbols not allowed in MH_DYLIB files 526649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 526749dc963fSmrg ;; 52684b0ead49Smrg 52697aa89044Smrg haiku*) 52707aa89044Smrg # PIC is the default for Haiku. 52717aa89044Smrg # The "-static" flag exists, but is broken. 52727aa89044Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 52737aa89044Smrg ;; 52747aa89044Smrg 527549dc963fSmrg hpux*) 527649dc963fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 527749dc963fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 527849dc963fSmrg # sets the default TLS model and affects inlining. 527949dc963fSmrg case $host_cpu in 528049dc963fSmrg hppa*64*) 528149dc963fSmrg # +Z the default 528249dc963fSmrg ;; 528349dc963fSmrg *) 528449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 528549dc963fSmrg ;; 528649dc963fSmrg esac 528749dc963fSmrg ;; 52884b0ead49Smrg 528949dc963fSmrg interix[[3-9]]*) 529049dc963fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 529149dc963fSmrg # Instead, we relocate shared libraries at runtime. 529249dc963fSmrg ;; 52934b0ead49Smrg 529449dc963fSmrg msdosdjgpp*) 529549dc963fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 529649dc963fSmrg # on systems that don't support them. 529749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529849dc963fSmrg enable_shared=no 529949dc963fSmrg ;; 53004b0ead49Smrg 530149dc963fSmrg *nto* | *qnx*) 530249dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 530349dc963fSmrg # it will coredump. 530449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 530549dc963fSmrg ;; 53064b0ead49Smrg 530749dc963fSmrg sysv4*MP*) 530849dc963fSmrg if test -d /usr/nec; then 530949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 531049dc963fSmrg fi 531149dc963fSmrg ;; 53124b0ead49Smrg 531349dc963fSmrg *) 531449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 531549dc963fSmrg ;; 531649dc963fSmrg esac 53177aa89044Smrg 53187aa89044Smrg case $cc_basename in 53197aa89044Smrg nvcc*) # Cuda Compiler Driver 2.2 53207aa89044Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 53214e7590efSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 53224e7590efSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 53234e7590efSmrg fi 53247aa89044Smrg ;; 53257aa89044Smrg esac 532649dc963fSmrg else 532749dc963fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 532849dc963fSmrg case $host_os in 532949dc963fSmrg aix*) 533049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533149dc963fSmrg if test "$host_cpu" = ia64; then 533249dc963fSmrg # AIX 5 now supports IA64 processor 533349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 533449dc963fSmrg else 533549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 533649dc963fSmrg fi 533749dc963fSmrg ;; 53384b0ead49Smrg 533949dc963fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 534049dc963fSmrg # This hack is so that the source file can tell whether it is being 534149dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 534249dc963fSmrg m4_if([$1], [GCJ], [], 534349dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 534449dc963fSmrg ;; 53454b0ead49Smrg 534649dc963fSmrg hpux9* | hpux10* | hpux11*) 534749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 534849dc963fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 534949dc963fSmrg # not for PA HP-UX. 535049dc963fSmrg case $host_cpu in 535149dc963fSmrg hppa*64*|ia64*) 535249dc963fSmrg # +Z the default 535349dc963fSmrg ;; 535449dc963fSmrg *) 535549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 535649dc963fSmrg ;; 535749dc963fSmrg esac 535849dc963fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 535949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 536049dc963fSmrg ;; 53614b0ead49Smrg 536249dc963fSmrg irix5* | irix6* | nonstopux*) 536349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 536449dc963fSmrg # PIC (with -KPIC) is the default. 536549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 536649dc963fSmrg ;; 53674b0ead49Smrg 53687aa89044Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 536949dc963fSmrg case $cc_basename in 537049dc963fSmrg # old Intel for x86_64 which still supported -KPIC. 537149dc963fSmrg ecc*) 537249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 537449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 537549dc963fSmrg ;; 537649dc963fSmrg # icc used to be incompatible with GCC. 537749dc963fSmrg # ICC 10 doesn't accept -KPIC any more. 537849dc963fSmrg icc* | ifort*) 537949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 538149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538249dc963fSmrg ;; 538349dc963fSmrg # Lahey Fortran 8.1. 538449dc963fSmrg lf95*) 538549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 538749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 538849dc963fSmrg ;; 53894e7590efSmrg nagfor*) 53904e7590efSmrg # NAG Fortran compiler 53914e7590efSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 53924e7590efSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 53934e7590efSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53944e7590efSmrg ;; 53957aa89044Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 539649dc963fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 539749dc963fSmrg # which looks to be a dead project) 539849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 539949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 540049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540149dc963fSmrg ;; 540249dc963fSmrg ccc*) 540349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540449dc963fSmrg # All Alpha code is PIC. 540549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 540649dc963fSmrg ;; 54077aa89044Smrg xl* | bgxl* | bgf* | mpixl*) 54087aa89044Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 540949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 541149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 541249dc963fSmrg ;; 541349dc963fSmrg *) 541449dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 54154e7590efSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 54167aa89044Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 541749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 541849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54197aa89044Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 542049dc963fSmrg ;; 54214e7590efSmrg *Sun\ F* | *Sun*Fortran*) 54224e7590efSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54234e7590efSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54244e7590efSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54254e7590efSmrg ;; 54267aa89044Smrg *Sun\ C*) 54277aa89044Smrg # Sun C 5.9 542849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54307aa89044Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543149dc963fSmrg ;; 54324e7590efSmrg *Intel*\ [[CF]]*Compiler*) 54334e7590efSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54344e7590efSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54354e7590efSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54364e7590efSmrg ;; 54374e7590efSmrg *Portland\ Group*) 54384e7590efSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54394e7590efSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54404e7590efSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54414e7590efSmrg ;; 544249dc963fSmrg esac 544349dc963fSmrg ;; 544449dc963fSmrg esac 544549dc963fSmrg ;; 54464b0ead49Smrg 544749dc963fSmrg newsos6) 544849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 544949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 545049dc963fSmrg ;; 54514b0ead49Smrg 545249dc963fSmrg *nto* | *qnx*) 545349dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 545449dc963fSmrg # it will coredump. 545549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 545649dc963fSmrg ;; 54574b0ead49Smrg 545849dc963fSmrg osf3* | osf4* | osf5*) 545949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546049dc963fSmrg # All OSF/1 code is PIC. 546149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546252b01e16Smrg ;; 54634b0ead49Smrg 546449dc963fSmrg rdos*) 546549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546652b01e16Smrg ;; 54674b0ead49Smrg 546849dc963fSmrg solaris*) 546949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 547049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547149dc963fSmrg case $cc_basename in 54727aa89044Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 547349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 547449dc963fSmrg *) 547549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 547649dc963fSmrg esac 547749dc963fSmrg ;; 54784b0ead49Smrg 547949dc963fSmrg sunos4*) 548049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 548149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 548249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548349dc963fSmrg ;; 54844b0ead49Smrg 548549dc963fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 548649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 548849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548949dc963fSmrg ;; 54904b0ead49Smrg 549149dc963fSmrg sysv4*MP*) 549249dc963fSmrg if test -d /usr/nec ;then 549349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 549449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549549dc963fSmrg fi 549649dc963fSmrg ;; 54974b0ead49Smrg 549849dc963fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 549949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550249dc963fSmrg ;; 55034b0ead49Smrg 550449dc963fSmrg unicos*) 550549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 550749dc963fSmrg ;; 55084b0ead49Smrg 550949dc963fSmrg uts4*) 551049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 551149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551249dc963fSmrg ;; 55134b0ead49Smrg 551449dc963fSmrg *) 551549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 551649dc963fSmrg ;; 551749dc963fSmrg esac 551849dc963fSmrg fi 551949dc963fSmrg]) 552049dc963fSmrgcase $host_os in 552149dc963fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 552249dc963fSmrg *djgpp*) 552349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 552449dc963fSmrg ;; 552549dc963fSmrg *) 552649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 552749dc963fSmrg ;; 552849dc963fSmrgesac 55294e7590efSmrg 55304e7590efSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 55314e7590efSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 55324e7590efSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 55334e7590efSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 55344b0ead49Smrg 553549dc963fSmrg# 553649dc963fSmrg# Check to make sure the PIC flag actually works. 553749dc963fSmrg# 553849dc963fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 553949dc963fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 554049dc963fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 554149dc963fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 554249dc963fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 554349dc963fSmrg "" | " "*) ;; 554449dc963fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 554549dc963fSmrg esac], 554649dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 554749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 554849dc963fSmrgfi 554949dc963fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 555049dc963fSmrg [Additional compiler flags for building library objects]) 555152b01e16Smrg 55524e7590efSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 55534e7590efSmrg [How to pass a linker flag through the compiler]) 555449dc963fSmrg# 555549dc963fSmrg# Check to make sure the static flag actually works. 555649dc963fSmrg# 555749dc963fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 555849dc963fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 555949dc963fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 556049dc963fSmrg $lt_tmp_static_flag, 556149dc963fSmrg [], 556249dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 556349dc963fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 556449dc963fSmrg [Compiler flag to prevent dynamic linking]) 556549dc963fSmrg])# _LT_COMPILER_PIC 556652b01e16Smrg 556752b01e16Smrg 556849dc963fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 556949dc963fSmrg# ---------------------------- 557049dc963fSmrg# See if the linker supports building shared libraries. 557149dc963fSmrgm4_defun([_LT_LINKER_SHLIBS], 557249dc963fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 557349dc963fSmrgAC_REQUIRE([LT_PATH_NM])dnl 55744e7590efSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 557549dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 557649dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 557749dc963fSmrgm4_require([_LT_DECL_SED])dnl 557849dc963fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 557949dc963fSmrgm4_require([_LT_TAG_COMPILER])dnl 558049dc963fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 558149dc963fSmrgm4_if([$1], [CXX], [ 558249dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55834e7590efSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 558449dc963fSmrg case $host_os in 558549dc963fSmrg aix[[4-9]]*) 558649dc963fSmrg # If we're using GNU nm, then we don't want the "-C" option. 558749dc963fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55887aa89044Smrg # Also, AIX nm treats weak defined symbols like other global defined 55897aa89044Smrg # symbols, whereas GNU nm marks them as "W". 559049dc963fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 55917aa89044Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 559249dc963fSmrg else 559349dc963fSmrg _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' 559449dc963fSmrg fi 559549dc963fSmrg ;; 559649dc963fSmrg pw32*) 559749dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 55984e7590efSmrg ;; 559949dc963fSmrg cygwin* | mingw* | cegcc*) 56004e7590efSmrg case $cc_basename in 56014e7590efSmrg cl*) 56024e7590efSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56034e7590efSmrg ;; 56044e7590efSmrg *) 56054e7590efSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 56064e7590efSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 56074e7590efSmrg ;; 56084e7590efSmrg esac 56094e7590efSmrg ;; 561049dc963fSmrg *) 561149dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56124e7590efSmrg ;; 561349dc963fSmrg esac 561449dc963fSmrg], [ 561549dc963fSmrg runpath_var= 561649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 561749dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 561849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)= 561949dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 562049dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 562149dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 562249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 562349dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 562449dc963fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 562549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 562649dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 562749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 562849dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 562949dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 563049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 563149dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 563249dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 563349dc963fSmrg _LT_TAGVAR(module_cmds, $1)= 563449dc963fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 563549dc963fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 563649dc963fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 563749dc963fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 563849dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 563949dc963fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 564049dc963fSmrg # included in the symbol list 564149dc963fSmrg _LT_TAGVAR(include_expsyms, $1)= 564249dc963fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 564349dc963fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 564449dc963fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 564549dc963fSmrg # as well as any symbol that contains `d'. 564649dc963fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 564749dc963fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 564849dc963fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 564949dc963fSmrg # the symbol is explicitly referenced. Since portable code cannot 565049dc963fSmrg # rely on this symbol name, it's probably fine to never include it in 565149dc963fSmrg # preloaded symbol tables. 565249dc963fSmrg # Exclude shared library initialization/finalization symbols. 565349dc963fSmrgdnl Note also adjust exclude_expsyms for C++ above. 565449dc963fSmrg extract_expsyms_cmds= 56554b0ead49Smrg 565649dc963fSmrg case $host_os in 565749dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 565849dc963fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 565949dc963fSmrg # When not using gcc, we currently assume that we are using 566049dc963fSmrg # Microsoft Visual C++. 566149dc963fSmrg if test "$GCC" != yes; then 566249dc963fSmrg with_gnu_ld=no 566349dc963fSmrg fi 566449dc963fSmrg ;; 566549dc963fSmrg interix*) 566649dc963fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 566749dc963fSmrg with_gnu_ld=yes 566849dc963fSmrg ;; 566949dc963fSmrg openbsd*) 567049dc963fSmrg with_gnu_ld=no 567149dc963fSmrg ;; 567249dc963fSmrg esac 56734b0ead49Smrg 567449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 56757aa89044Smrg 56767aa89044Smrg # On some targets, GNU ld is compatible enough with the native linker 56777aa89044Smrg # that we're better off using the native interface for both. 56787aa89044Smrg lt_use_gnu_ld_interface=no 567949dc963fSmrg if test "$with_gnu_ld" = yes; then 56807aa89044Smrg case $host_os in 56817aa89044Smrg aix*) 56827aa89044Smrg # The AIX port of GNU ld has always aspired to compatibility 56837aa89044Smrg # with the native linker. However, as the warning in the GNU ld 56847aa89044Smrg # block says, versions before 2.19.5* couldn't really create working 56857aa89044Smrg # shared libraries, regardless of the interface used. 56867aa89044Smrg case `$LD -v 2>&1` in 56877aa89044Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 56887aa89044Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 56897aa89044Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 56907aa89044Smrg *) 56917aa89044Smrg lt_use_gnu_ld_interface=yes 56927aa89044Smrg ;; 56937aa89044Smrg esac 56947aa89044Smrg ;; 56957aa89044Smrg *) 56967aa89044Smrg lt_use_gnu_ld_interface=yes 56977aa89044Smrg ;; 56987aa89044Smrg esac 56997aa89044Smrg fi 57007aa89044Smrg 57017aa89044Smrg if test "$lt_use_gnu_ld_interface" = yes; then 570249dc963fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 570349dc963fSmrg wlarc='${wl}' 57044b0ead49Smrg 570549dc963fSmrg # Set some defaults for GNU ld with shared library support. These 570649dc963fSmrg # are reset later if shared libraries are not supported. Putting them 570749dc963fSmrg # here allows them to be overridden if necessary. 570849dc963fSmrg runpath_var=LD_RUN_PATH 570949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 571049dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 571149dc963fSmrg # ancient GNU ld didn't support --whole-archive et. al. 571249dc963fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 571349dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 571449dc963fSmrg else 571549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 571649dc963fSmrg fi 571749dc963fSmrg supports_anon_versioning=no 571849dc963fSmrg case `$LD -v 2>&1` in 57197aa89044Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 572049dc963fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 572149dc963fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 572249dc963fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 572349dc963fSmrg *\ 2.11.*) ;; # other 2.11 versions 572449dc963fSmrg *) supports_anon_versioning=yes ;; 572549dc963fSmrg esac 57264b0ead49Smrg 572749dc963fSmrg # See if GNU ld supports shared libraries. 572849dc963fSmrg case $host_os in 572949dc963fSmrg aix[[3-9]]*) 573049dc963fSmrg # On AIX/PPC, the GNU linker is very broken 573149dc963fSmrg if test "$host_cpu" != ia64; then 573249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 573349dc963fSmrg cat <<_LT_EOF 1>&2 57344b0ead49Smrg 57357aa89044Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 573649dc963fSmrg*** to be unable to reliably create shared libraries on AIX. 573749dc963fSmrg*** Therefore, libtool is disabling shared libraries support. If you 57387aa89044Smrg*** really care for shared libraries, you may want to install binutils 57397aa89044Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 57407aa89044Smrg*** You will then need to restart the configuration process. 57414b0ead49Smrg 574249dc963fSmrg_LT_EOF 574349dc963fSmrg fi 574449dc963fSmrg ;; 57454b0ead49Smrg 574649dc963fSmrg amigaos*) 574749dc963fSmrg case $host_cpu in 574849dc963fSmrg powerpc) 574949dc963fSmrg # see comment about AmigaOS4 .so support 575049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 575149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 575249dc963fSmrg ;; 575349dc963fSmrg m68k) 575449dc963fSmrg _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)' 575549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 575649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 575749dc963fSmrg ;; 575849dc963fSmrg esac 575949dc963fSmrg ;; 57604b0ead49Smrg 576149dc963fSmrg beos*) 576249dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 576349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 576449dc963fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 576549dc963fSmrg # support --undefined. This deserves some investigation. FIXME 576649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 576749dc963fSmrg else 576849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 576949dc963fSmrg fi 577049dc963fSmrg ;; 57714b0ead49Smrg 577249dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 577349dc963fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 577449dc963fSmrg # as there is no search path for DLLs. 577549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57767aa89044Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 577749dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 577849dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 577949dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57804e7590efSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 57814e7590efSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 578249dc963fSmrg 578349dc963fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 578449dc963fSmrg _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' 578549dc963fSmrg # If the export-symbols file already is a .def file (1st line 578649dc963fSmrg # is EXPORTS), use it as is; otherwise, prepend... 578749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 578849dc963fSmrg cp $export_symbols $output_objdir/$soname.def; 578949dc963fSmrg else 579049dc963fSmrg echo EXPORTS > $output_objdir/$soname.def; 579149dc963fSmrg cat $export_symbols >> $output_objdir/$soname.def; 579249dc963fSmrg fi~ 579349dc963fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 579449dc963fSmrg else 579549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 579649dc963fSmrg fi 579749dc963fSmrg ;; 57984b0ead49Smrg 57997aa89044Smrg haiku*) 58007aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58017aa89044Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58027aa89044Smrg ;; 58037aa89044Smrg 580449dc963fSmrg interix[[3-9]]*) 580549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 580649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 580749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 580849dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 580949dc963fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 581049dc963fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 581149dc963fSmrg # default) and relocated if they conflict, which is a slow very memory 581249dc963fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 581349dc963fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 581449dc963fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 581549dc963fSmrg _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' 581649dc963fSmrg _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' 581749dc963fSmrg ;; 58184b0ead49Smrg 58197aa89044Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 582049dc963fSmrg tmp_diet=no 582149dc963fSmrg if test "$host_os" = linux-dietlibc; then 582249dc963fSmrg case $cc_basename in 582349dc963fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 582449dc963fSmrg esac 582549dc963fSmrg fi 582649dc963fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 582749dc963fSmrg && test "$tmp_diet" = no 582849dc963fSmrg then 58294e7590efSmrg tmp_addflag=' $pic_flag' 583049dc963fSmrg tmp_sharedflag='-shared' 583149dc963fSmrg case $cc_basename,$host_cpu in 583249dc963fSmrg pgcc*) # Portland Group C compiler 58337aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 583449dc963fSmrg tmp_addflag=' $pic_flag' 583549dc963fSmrg ;; 58367aa89044Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 58377aa89044Smrg # Portland Group f77 and f90 compilers 58387aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 583949dc963fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 584049dc963fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 584149dc963fSmrg tmp_addflag=' -i_dynamic' ;; 584249dc963fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 584349dc963fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 584449dc963fSmrg ifc* | ifort*) # Intel Fortran compiler 584549dc963fSmrg tmp_addflag=' -nofor_main' ;; 584649dc963fSmrg lf95*) # Lahey Fortran 8.1 584749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 584849dc963fSmrg tmp_sharedflag='--shared' ;; 58497aa89044Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 585049dc963fSmrg tmp_sharedflag='-qmkshrobj' 585149dc963fSmrg tmp_addflag= ;; 58527aa89044Smrg nvcc*) # Cuda Compiler Driver 2.2 58537aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 58547aa89044Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58557aa89044Smrg ;; 585649dc963fSmrg esac 585749dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 585849dc963fSmrg *Sun\ C*) # Sun C 5.9 58597aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 586049dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 586149dc963fSmrg tmp_sharedflag='-G' ;; 586249dc963fSmrg *Sun\ F*) # Sun Fortran 8.3 586349dc963fSmrg tmp_sharedflag='-G' ;; 586449dc963fSmrg esac 586549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58664b0ead49Smrg 586749dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 586849dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 586949dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 587049dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 587149dc963fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 587249dc963fSmrg fi 58734b0ead49Smrg 587449dc963fSmrg case $cc_basename in 58757aa89044Smrg xlf* | bgf* | bgxlf* | mpixlf*) 587649dc963fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 587749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 58784e7590efSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58797aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 588049dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 588149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 588249dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 588349dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58847aa89044Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 588549dc963fSmrg fi 588649dc963fSmrg ;; 588749dc963fSmrg esac 588849dc963fSmrg else 588949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 589049dc963fSmrg fi 589149dc963fSmrg ;; 58924b0ead49Smrg 589349dc963fSmrg netbsd*) 589449dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 589549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 589649dc963fSmrg wlarc= 589749dc963fSmrg else 58984e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58994e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 590049dc963fSmrg fi 590149dc963fSmrg ;; 59024b0ead49Smrg 590349dc963fSmrg solaris*) 590449dc963fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 590549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 590649dc963fSmrg cat <<_LT_EOF 1>&2 59074b0ead49Smrg 590849dc963fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 590949dc963fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 591049dc963fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 591149dc963fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 591249dc963fSmrg*** your PATH or compiler configuration so that the native linker is 591349dc963fSmrg*** used, and then restart. 59144b0ead49Smrg 591549dc963fSmrg_LT_EOF 591649dc963fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59174e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59184e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 591949dc963fSmrg else 592049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 592149dc963fSmrg fi 592249dc963fSmrg ;; 59234b0ead49Smrg 592449dc963fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 592549dc963fSmrg case `$LD -v 2>&1` in 592649dc963fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 592749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 592849dc963fSmrg cat <<_LT_EOF 1>&2 59294b0ead49Smrg 593049dc963fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 593149dc963fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 593249dc963fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 593349dc963fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 593449dc963fSmrg*** your PATH or compiler configuration so that the native linker is 593549dc963fSmrg*** used, and then restart. 593652b01e16Smrg 593749dc963fSmrg_LT_EOF 593849dc963fSmrg ;; 593949dc963fSmrg *) 594049dc963fSmrg # For security reasons, it is highly recommended that you always 594149dc963fSmrg # use absolute paths for naming shared libraries, and exclude the 594249dc963fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 594349dc963fSmrg # requires that you compile everything twice, which is a pain. 594449dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 594549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 594749dc963fSmrg _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' 594849dc963fSmrg else 594949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 595049dc963fSmrg fi 595149dc963fSmrg ;; 595249dc963fSmrg esac 595349dc963fSmrg ;; 595452b01e16Smrg 595549dc963fSmrg sunos4*) 595649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 595749dc963fSmrg wlarc= 595849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 595949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59604b0ead49Smrg ;; 596149dc963fSmrg 59624b0ead49Smrg *) 596349dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59644e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59654e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 596649dc963fSmrg else 596749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 596849dc963fSmrg fi 59694b0ead49Smrg ;; 59704b0ead49Smrg esac 59714b0ead49Smrg 597249dc963fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 597349dc963fSmrg runpath_var= 597449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 597549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 597649dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 597749dc963fSmrg fi 597849dc963fSmrg else 597949dc963fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 598049dc963fSmrg case $host_os in 598149dc963fSmrg aix3*) 598249dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 598349dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 598449dc963fSmrg _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' 598549dc963fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 598649dc963fSmrg # are no directories specified by -L. 598749dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 598849dc963fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 598949dc963fSmrg # Neither direct hardcoding nor static linking is supported with a 599049dc963fSmrg # broken collect2. 599149dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 599249dc963fSmrg fi 599349dc963fSmrg ;; 59944b0ead49Smrg 599549dc963fSmrg aix[[4-9]]*) 599649dc963fSmrg if test "$host_cpu" = ia64; then 599749dc963fSmrg # On IA64, the linker does run time linking by default, so we don't 599849dc963fSmrg # have to do anything special. 599949dc963fSmrg aix_use_runtimelinking=no 600049dc963fSmrg exp_sym_flag='-Bexport' 600149dc963fSmrg no_entry_flag="" 600249dc963fSmrg else 600349dc963fSmrg # If we're using GNU nm, then we don't want the "-C" option. 600449dc963fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60057aa89044Smrg # Also, AIX nm treats weak defined symbols like other global 60067aa89044Smrg # defined symbols, whereas GNU nm marks them as "W". 600749dc963fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60087aa89044Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 600949dc963fSmrg else 601049dc963fSmrg _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' 601149dc963fSmrg fi 601249dc963fSmrg aix_use_runtimelinking=no 60134b0ead49Smrg 601449dc963fSmrg # Test if we are trying to use run time linking or normal 601549dc963fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 601649dc963fSmrg # need to do runtime linking. 601749dc963fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 601849dc963fSmrg for ld_flag in $LDFLAGS; do 601949dc963fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 602049dc963fSmrg aix_use_runtimelinking=yes 602149dc963fSmrg break 602249dc963fSmrg fi 602349dc963fSmrg done 602449dc963fSmrg ;; 602549dc963fSmrg esac 60264b0ead49Smrg 602749dc963fSmrg exp_sym_flag='-bexport' 602849dc963fSmrg no_entry_flag='-bnoentry' 602949dc963fSmrg fi 60304b0ead49Smrg 603149dc963fSmrg # When large executables or shared objects are built, AIX ld can 603249dc963fSmrg # have problems creating the table of contents. If linking a library 603349dc963fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 603449dc963fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 603549dc963fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60364b0ead49Smrg 603749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='' 603849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 603949dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 604049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604149dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604249dc963fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60434b0ead49Smrg 604449dc963fSmrg if test "$GCC" = yes; then 604549dc963fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 604649dc963fSmrg # We only want to do this on AIX 4.2 and lower, the check 604749dc963fSmrg # below for broken collect2 doesn't work under 4.3+ 604849dc963fSmrg collect2name=`${CC} -print-prog-name=collect2` 604949dc963fSmrg if test -f "$collect2name" && 605049dc963fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 605149dc963fSmrg then 605249dc963fSmrg # We have reworked collect2 605349dc963fSmrg : 605449dc963fSmrg else 605549dc963fSmrg # We have old collect2 605649dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 605749dc963fSmrg # It fails to find uninstalled libraries when the uninstalled 605849dc963fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 605949dc963fSmrg # to unsupported forces relinking 606049dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 606149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606249dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 606349dc963fSmrg fi 606449dc963fSmrg ;; 606549dc963fSmrg esac 606649dc963fSmrg shared_flag='-shared' 606749dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 606849dc963fSmrg shared_flag="$shared_flag "'${wl}-G' 606949dc963fSmrg fi 607049dc963fSmrg else 607149dc963fSmrg # not using gcc 607249dc963fSmrg if test "$host_cpu" = ia64; then 607349dc963fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 607449dc963fSmrg # chokes on -Wl,-G. The following line is correct: 607549dc963fSmrg shared_flag='-G' 607649dc963fSmrg else 607749dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 607849dc963fSmrg shared_flag='${wl}-G' 607949dc963fSmrg else 608049dc963fSmrg shared_flag='${wl}-bM:SRE' 608149dc963fSmrg fi 608249dc963fSmrg fi 608349dc963fSmrg fi 60844b0ead49Smrg 608549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 608649dc963fSmrg # It seems that -bexpall does not export symbols beginning with 608749dc963fSmrg # underscore (_), so it is better to generate a list of symbols to export. 608849dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 608949dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 609049dc963fSmrg # Warning - without using the other runtime loading flags (-brtl), 609149dc963fSmrg # -berok will link without error, but may produce a broken library. 609249dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 609349dc963fSmrg # Determine the default libpath from the value encoded in an 609449dc963fSmrg # empty executable. 60954e7590efSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 609649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60977aa89044Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 609849dc963fSmrg else 609949dc963fSmrg if test "$host_cpu" = ia64; then 610049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 610149dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 610249dc963fSmrg _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" 610349dc963fSmrg else 610449dc963fSmrg # Determine the default libpath from the value encoded in an 610549dc963fSmrg # empty executable. 61064e7590efSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 610749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 610849dc963fSmrg # Warning - without using the other run time loading flags, 610949dc963fSmrg # -berok will link without error, but may produce a broken library. 611049dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 611149dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61127aa89044Smrg if test "$with_gnu_ld" = yes; then 61137aa89044Smrg # We only use this code for GNU lds that support --whole-archive. 61147aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61157aa89044Smrg else 61167aa89044Smrg # Exported symbols can be pulled into shared objects from archives 61177aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61187aa89044Smrg fi 611949dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612049dc963fSmrg # This is similar to how AIX traditionally builds its shared libraries. 612149dc963fSmrg _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' 612249dc963fSmrg fi 612349dc963fSmrg fi 612449dc963fSmrg ;; 61254b0ead49Smrg 612649dc963fSmrg amigaos*) 612749dc963fSmrg case $host_cpu in 612849dc963fSmrg powerpc) 612949dc963fSmrg # see comment about AmigaOS4 .so support 613049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 613149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 613249dc963fSmrg ;; 613349dc963fSmrg m68k) 613449dc963fSmrg _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)' 613549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 613649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 613749dc963fSmrg ;; 613849dc963fSmrg esac 613949dc963fSmrg ;; 61404b0ead49Smrg 614149dc963fSmrg bsdi[[45]]*) 614249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 614349dc963fSmrg ;; 61444b0ead49Smrg 614549dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 614649dc963fSmrg # When not using gcc, we currently assume that we are using 614749dc963fSmrg # Microsoft Visual C++. 614849dc963fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 614949dc963fSmrg # no search path for DLLs. 61504e7590efSmrg case $cc_basename in 61514e7590efSmrg cl*) 61524e7590efSmrg # Native MSVC 61534e7590efSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61544e7590efSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61554e7590efSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61564e7590efSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61574e7590efSmrg # Tell ltmain to make .lib files, not .a files. 61584e7590efSmrg libext=lib 61594e7590efSmrg # Tell ltmain to make .dll files, not .so files. 61604e7590efSmrg shrext_cmds=".dll" 61614e7590efSmrg # FIXME: Setting linknames here is a bad hack. 61624e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61634e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61644e7590efSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61654e7590efSmrg else 61664e7590efSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61674e7590efSmrg fi~ 61684e7590efSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61694e7590efSmrg linknames=' 61704e7590efSmrg # The linker will not automatically build a static lib if we build a DLL. 61714e7590efSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61724e7590efSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61734e7590efSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 61744e7590efSmrg _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' 61754e7590efSmrg # Don't use ranlib 61764e7590efSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61774e7590efSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61784e7590efSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61794e7590efSmrg case $lt_outputfile in 61804e7590efSmrg *.exe|*.EXE) ;; 61814e7590efSmrg *) 61824e7590efSmrg lt_outputfile="$lt_outputfile.exe" 61834e7590efSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61844e7590efSmrg ;; 61854e7590efSmrg esac~ 61864e7590efSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61874e7590efSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61884e7590efSmrg $RM "$lt_outputfile.manifest"; 61894e7590efSmrg fi' 61904e7590efSmrg ;; 61914e7590efSmrg *) 61924e7590efSmrg # Assume MSVC wrapper 61934e7590efSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61944e7590efSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61954e7590efSmrg # Tell ltmain to make .lib files, not .a files. 61964e7590efSmrg libext=lib 61974e7590efSmrg # Tell ltmain to make .dll files, not .so files. 61984e7590efSmrg shrext_cmds=".dll" 61994e7590efSmrg # FIXME: Setting linknames here is a bad hack. 62004e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 62014e7590efSmrg # The linker will automatically build a .lib file if we build a DLL. 62024e7590efSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62034e7590efSmrg # FIXME: Should let the user specify the lib program. 62044e7590efSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 62054e7590efSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62064e7590efSmrg ;; 62074e7590efSmrg esac 620849dc963fSmrg ;; 62094b0ead49Smrg 621049dc963fSmrg darwin* | rhapsody*) 621149dc963fSmrg _LT_DARWIN_LINKER_FEATURES($1) 621249dc963fSmrg ;; 62134b0ead49Smrg 621449dc963fSmrg dgux*) 621549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621749dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 621849dc963fSmrg ;; 62194b0ead49Smrg 622049dc963fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 622149dc963fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 622249dc963fSmrg # does not break anything, and helps significantly (at the cost of a little 622349dc963fSmrg # extra space). 622449dc963fSmrg freebsd2.2*) 622549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 622649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 622749dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 622849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 622949dc963fSmrg ;; 62304b0ead49Smrg 623149dc963fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62324e7590efSmrg freebsd2.*) 623349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 623449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 623549dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 623649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623749dc963fSmrg ;; 62384b0ead49Smrg 623949dc963fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 624049dc963fSmrg freebsd* | dragonfly*) 62414e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 624249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 624349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 624449dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 624549dc963fSmrg ;; 62464b0ead49Smrg 624749dc963fSmrg hpux9*) 624849dc963fSmrg if test "$GCC" = yes; then 62494e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 625049dc963fSmrg else 625149dc963fSmrg _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' 625249dc963fSmrg fi 625349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 625449dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62564b0ead49Smrg 625749dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 625849dc963fSmrg # but as the default location of the library. 625949dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 626049dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 626149dc963fSmrg ;; 62624b0ead49Smrg 626349dc963fSmrg hpux10*) 62647aa89044Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62654e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 626649dc963fSmrg else 626749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 626849dc963fSmrg fi 626949dc963fSmrg if test "$with_gnu_ld" = no; then 627049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 627149dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 627249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 627349dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 627449dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 627549dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 627649dc963fSmrg # but as the default location of the library. 627749dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 627849dc963fSmrg fi 627949dc963fSmrg ;; 62804b0ead49Smrg 628149dc963fSmrg hpux11*) 62827aa89044Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 628349dc963fSmrg case $host_cpu in 628449dc963fSmrg hppa*64*) 628549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 628649dc963fSmrg ;; 628749dc963fSmrg ia64*) 62884e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 628949dc963fSmrg ;; 629049dc963fSmrg *) 62914e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 629249dc963fSmrg ;; 629349dc963fSmrg esac 629449dc963fSmrg else 629549dc963fSmrg case $host_cpu in 629649dc963fSmrg hppa*64*) 629749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 629849dc963fSmrg ;; 629949dc963fSmrg ia64*) 630049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 630149dc963fSmrg ;; 630249dc963fSmrg *) 63037aa89044Smrg m4_if($1, [], [ 63047aa89044Smrg # Older versions of the 11.00 compiler do not understand -b yet 63057aa89044Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63067aa89044Smrg _LT_LINKER_OPTION([if $CC understands -b], 63077aa89044Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63087aa89044Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63097aa89044Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63107aa89044Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 631149dc963fSmrg ;; 631249dc963fSmrg esac 631349dc963fSmrg fi 631449dc963fSmrg if test "$with_gnu_ld" = no; then 631549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 631649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63174b0ead49Smrg 631849dc963fSmrg case $host_cpu in 631949dc963fSmrg hppa*64*|ia64*) 632049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 632149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 632249dc963fSmrg ;; 632349dc963fSmrg *) 632449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 632549dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 632649dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63274b0ead49Smrg 632849dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 632949dc963fSmrg # but as the default location of the library. 633049dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 633149dc963fSmrg ;; 633249dc963fSmrg esac 633349dc963fSmrg fi 633449dc963fSmrg ;; 63354b0ead49Smrg 633649dc963fSmrg irix5* | irix6* | nonstopux*) 633749dc963fSmrg if test "$GCC" = yes; then 63384e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 633949dc963fSmrg # Try to use the -exported_symbol ld option, if it does not 634049dc963fSmrg # work, assume that -exports_file does not work either and 634149dc963fSmrg # implicitly export all symbols. 63424e7590efSmrg # This should be the same for all languages, so no per-tag cache variable. 63434e7590efSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 63444e7590efSmrg [lt_cv_irix_exported_symbol], 63454e7590efSmrg [save_LDFLAGS="$LDFLAGS" 63464e7590efSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 63474e7590efSmrg AC_LINK_IFELSE( 63484e7590efSmrg [AC_LANG_SOURCE( 63494e7590efSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 63504e7590efSmrg [C++], [[int foo (void) { return 0; }]], 63514e7590efSmrg [Fortran 77], [[ 63524e7590efSmrg subroutine foo 63534e7590efSmrg end]], 63544e7590efSmrg [Fortran], [[ 63554e7590efSmrg subroutine foo 63564e7590efSmrg end]])])], 63574e7590efSmrg [lt_cv_irix_exported_symbol=yes], 63584e7590efSmrg [lt_cv_irix_exported_symbol=no]) 63594e7590efSmrg LDFLAGS="$save_LDFLAGS"]) 63604e7590efSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 63614e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 63624e7590efSmrg fi 636349dc963fSmrg else 63647aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 63657aa89044Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 636649dc963fSmrg fi 636749dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 636849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 636949dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 637049dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 637149dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 637249dc963fSmrg ;; 63734b0ead49Smrg 637449dc963fSmrg netbsd*) 637549dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 637649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 637749dc963fSmrg else 637849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 637949dc963fSmrg fi 638049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 638149dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 638249dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 638349dc963fSmrg ;; 63844b0ead49Smrg 638549dc963fSmrg newsos6) 638649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638749dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 638849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 638949dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 639049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 639149dc963fSmrg ;; 63924b0ead49Smrg 639349dc963fSmrg *nto* | *qnx*) 639449dc963fSmrg ;; 63954b0ead49Smrg 639649dc963fSmrg openbsd*) 639749dc963fSmrg if test -f /usr/libexec/ld.so; then 639849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 639949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 640049dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 640149dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 640249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 640349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 640449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 640549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 640649dc963fSmrg else 640749dc963fSmrg case $host_os in 640849dc963fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 640949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 641049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 641149dc963fSmrg ;; 641249dc963fSmrg *) 641349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 641449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 641549dc963fSmrg ;; 641649dc963fSmrg esac 641749dc963fSmrg fi 641849dc963fSmrg else 641949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 642049dc963fSmrg fi 642149dc963fSmrg ;; 64224b0ead49Smrg 642349dc963fSmrg os2*) 642449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 642549dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 642649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64277aa89044Smrg _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' 642849dc963fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 642949dc963fSmrg ;; 64304b0ead49Smrg 643149dc963fSmrg osf3*) 643249dc963fSmrg if test "$GCC" = yes; then 643349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64347aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 643549dc963fSmrg else 643649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64377aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 643849dc963fSmrg fi 643949dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 644049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 644149dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 644249dc963fSmrg ;; 64434b0ead49Smrg 644449dc963fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 644549dc963fSmrg if test "$GCC" = yes; then 644649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64474e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 644849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 644949dc963fSmrg else 645049dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64517aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 645249dc963fSmrg _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~ 64537aa89044Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 64544b0ead49Smrg 645549dc963fSmrg # Both c and cxx compiler support -rpath directly 645649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 645749dc963fSmrg fi 645849dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 645949dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 646049dc963fSmrg ;; 64614b0ead49Smrg 646249dc963fSmrg solaris*) 646349dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 646449dc963fSmrg if test "$GCC" = yes; then 646549dc963fSmrg wlarc='${wl}' 64664e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 646749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64684e7590efSmrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 646949dc963fSmrg else 647049dc963fSmrg case `$CC -V 2>&1` in 647149dc963fSmrg *"Compilers 5.0"*) 647249dc963fSmrg wlarc='' 647349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 647449dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647549dc963fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 647649dc963fSmrg ;; 647749dc963fSmrg *) 647849dc963fSmrg wlarc='${wl}' 647949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 648049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 648149dc963fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 648249dc963fSmrg ;; 648349dc963fSmrg esac 648449dc963fSmrg fi 648549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 648649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 648749dc963fSmrg case $host_os in 648849dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 648949dc963fSmrg *) 649049dc963fSmrg # The compiler driver will combine and reorder linker options, 649149dc963fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 649249dc963fSmrg # but is careful enough not to reorder. 649349dc963fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 649449dc963fSmrg if test "$GCC" = yes; then 649549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 649649dc963fSmrg else 649749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 649849dc963fSmrg fi 649949dc963fSmrg ;; 650049dc963fSmrg esac 650149dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 650249dc963fSmrg ;; 65034b0ead49Smrg 650449dc963fSmrg sunos4*) 650549dc963fSmrg if test "x$host_vendor" = xsequent; then 650649dc963fSmrg # Use $CC to link under sequent, because it throws in some extra .o 650749dc963fSmrg # files that make .init and .fini sections work. 650849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 650949dc963fSmrg else 651049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 651149dc963fSmrg fi 651249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 651349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 651449dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 651549dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 651649dc963fSmrg ;; 65174b0ead49Smrg 651849dc963fSmrg sysv4) 651949dc963fSmrg case $host_vendor in 652049dc963fSmrg sni) 652149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 652249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 652349dc963fSmrg ;; 652449dc963fSmrg siemens) 652549dc963fSmrg ## LD is ld it makes a PLAMLIB 652649dc963fSmrg ## CC just makes a GrossModule. 652749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 652849dc963fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 652949dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 653049dc963fSmrg ;; 653149dc963fSmrg motorola) 653249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 653349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 653449dc963fSmrg ;; 653549dc963fSmrg esac 653649dc963fSmrg runpath_var='LD_RUN_PATH' 653749dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 653849dc963fSmrg ;; 65394b0ead49Smrg 654049dc963fSmrg sysv4.3*) 654149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 654249dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654349dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 654449dc963fSmrg ;; 65454b0ead49Smrg 654649dc963fSmrg sysv4*MP*) 654749dc963fSmrg if test -d /usr/nec; then 654849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 654949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655049dc963fSmrg runpath_var=LD_RUN_PATH 655149dc963fSmrg hardcode_runpath_var=yes 655249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 655349dc963fSmrg fi 655449dc963fSmrg ;; 65554b0ead49Smrg 655649dc963fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 655749dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 655849dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 655949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 656049dc963fSmrg runpath_var='LD_RUN_PATH' 65614b0ead49Smrg 656249dc963fSmrg if test "$GCC" = yes; then 656349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656449dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656549dc963fSmrg else 656649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656849dc963fSmrg fi 656949dc963fSmrg ;; 65704b0ead49Smrg 657149dc963fSmrg sysv5* | sco3.2v5* | sco5v6*) 657249dc963fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 657349dc963fSmrg # link with -lc, and that would cause any symbols used from libc to 657449dc963fSmrg # always be unresolved, which means just about no library would 657549dc963fSmrg # ever link correctly. If we're not using GNU ld we use -z text 657649dc963fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 657749dc963fSmrg # as -z defs. 657849dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 657949dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 658049dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 658149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 658349dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 658449dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 658549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 658649dc963fSmrg runpath_var='LD_RUN_PATH' 65874b0ead49Smrg 658849dc963fSmrg if test "$GCC" = yes; then 658949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659149dc963fSmrg else 659249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659449dc963fSmrg fi 659549dc963fSmrg ;; 65964b0ead49Smrg 659749dc963fSmrg uts4*) 659849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 659949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 660049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660149dc963fSmrg ;; 66024b0ead49Smrg 660349dc963fSmrg *) 660449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 660549dc963fSmrg ;; 660649dc963fSmrg esac 66074b0ead49Smrg 660849dc963fSmrg if test x$host_vendor = xsni; then 660949dc963fSmrg case $host in 661049dc963fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 661149dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 661249dc963fSmrg ;; 661349dc963fSmrg esac 661449dc963fSmrg fi 661549dc963fSmrg fi 661649dc963fSmrg]) 661749dc963fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 661849dc963fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 66194b0ead49Smrg 662049dc963fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 66214b0ead49Smrg 662249dc963fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 662349dc963fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 662449dc963fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 662549dc963fSmrg [The commands to extract the exported symbol list from a shared archive]) 66264b0ead49Smrg 662749dc963fSmrg# 662849dc963fSmrg# Do we need to explicitly link libc? 662949dc963fSmrg# 663049dc963fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 663149dc963fSmrgx|xyes) 663249dc963fSmrg # Assume -lc should be added 663349dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66344b0ead49Smrg 663549dc963fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 663649dc963fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 663749dc963fSmrg *'~'*) 663849dc963fSmrg # FIXME: we may have to deal with multi-command sequences. 663949dc963fSmrg ;; 664049dc963fSmrg '$CC '*) 664149dc963fSmrg # Test whether the compiler implicitly links with -lc since on some 664249dc963fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 664349dc963fSmrg # to ld, don't add -lc before -lgcc. 66447aa89044Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 66457aa89044Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 66467aa89044Smrg [$RM conftest* 66477aa89044Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 66487aa89044Smrg 66497aa89044Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 66507aa89044Smrg soname=conftest 66517aa89044Smrg lib=conftest 66527aa89044Smrg libobjs=conftest.$ac_objext 66537aa89044Smrg deplibs= 66547aa89044Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 66557aa89044Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 66567aa89044Smrg compiler_flags=-v 66577aa89044Smrg linker_flags=-v 66587aa89044Smrg verstring= 66597aa89044Smrg output_objdir=. 66607aa89044Smrg libname=conftest 66617aa89044Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 66627aa89044Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 66637aa89044Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 66647aa89044Smrg then 66657aa89044Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66667aa89044Smrg else 66677aa89044Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66687aa89044Smrg fi 66697aa89044Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 66707aa89044Smrg else 66717aa89044Smrg cat conftest.err 1>&5 66727aa89044Smrg fi 66737aa89044Smrg $RM conftest* 66747aa89044Smrg ]) 66757aa89044Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 667649dc963fSmrg ;; 667749dc963fSmrg esac 667849dc963fSmrg fi 667949dc963fSmrg ;; 668049dc963fSmrgesac 66814b0ead49Smrg 668249dc963fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 668349dc963fSmrg [Whether or not to add -lc for building shared libraries]) 668449dc963fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 668549dc963fSmrg [enable_shared_with_static_runtimes], [0], 668649dc963fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 668749dc963fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 668849dc963fSmrg [Compiler flag to allow reflexive dlopens]) 668949dc963fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 669049dc963fSmrg [Compiler flag to generate shared objects directly from archives]) 669149dc963fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 669249dc963fSmrg [Whether the compiler copes with passing no objects directly]) 669349dc963fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 669449dc963fSmrg [Create an old-style archive from a shared archive]) 669549dc963fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 669649dc963fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 669749dc963fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 669849dc963fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 669949dc963fSmrg_LT_TAGDECL([], [module_cmds], [2], 670049dc963fSmrg [Commands used to build a loadable module if different from building 670149dc963fSmrg a shared archive.]) 670249dc963fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 670349dc963fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 670449dc963fSmrg [Whether we are building with GNU ld or not]) 670549dc963fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 670649dc963fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 670749dc963fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 670849dc963fSmrg [Flag that enforces no undefined symbols]) 670949dc963fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 671049dc963fSmrg [Flag to hardcode $libdir into a binary during linking. 671149dc963fSmrg This must work even if $libdir does not exist]) 671249dc963fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 671349dc963fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 671449dc963fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 671549dc963fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 671649dc963fSmrg DIR into the resulting binary]) 671749dc963fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 671849dc963fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 671949dc963fSmrg DIR into the resulting binary and the resulting library dependency is 672049dc963fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 672149dc963fSmrg library is relocated]) 672249dc963fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 672349dc963fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 672449dc963fSmrg into the resulting binary]) 672549dc963fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 672649dc963fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 672749dc963fSmrg into the resulting binary]) 672849dc963fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 672949dc963fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 673049dc963fSmrg into the library and all subsequent libraries and executables linked 673149dc963fSmrg against it]) 673249dc963fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 673349dc963fSmrg [Set to yes if linker adds runtime paths of dependent libraries 673449dc963fSmrg to runtime path list]) 673549dc963fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 673649dc963fSmrg [Whether libtool must link a program against all its dependency libraries]) 673749dc963fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 673849dc963fSmrg [Set to "yes" if exported symbols are required]) 673949dc963fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 674049dc963fSmrg [The commands to list exported symbols]) 674149dc963fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 674249dc963fSmrg [Symbols that should not be listed in the preloaded symbols]) 674349dc963fSmrg_LT_TAGDECL([], [include_expsyms], [1], 674449dc963fSmrg [Symbols that must always be exported]) 674549dc963fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 674649dc963fSmrg [Commands necessary for linking programs (against libraries) with templates]) 67474e7590efSmrg_LT_TAGDECL([], [postlink_cmds], [2], 67484e7590efSmrg [Commands necessary for finishing linking programs]) 674949dc963fSmrg_LT_TAGDECL([], [file_list_spec], [1], 675049dc963fSmrg [Specify filename containing input files]) 675149dc963fSmrgdnl FIXME: Not yet implemented 675249dc963fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 675349dc963fSmrgdnl [Compiler flag to generate thread safe objects]) 675449dc963fSmrg])# _LT_LINKER_SHLIBS 675549dc963fSmrg 675649dc963fSmrg 675749dc963fSmrg# _LT_LANG_C_CONFIG([TAG]) 675849dc963fSmrg# ------------------------ 675949dc963fSmrg# Ensure that the configuration variables for a C compiler are suitably 676049dc963fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 676149dc963fSmrg# the compiler configuration to `libtool'. 676249dc963fSmrgm4_defun([_LT_LANG_C_CONFIG], 676349dc963fSmrg[m4_require([_LT_DECL_EGREP])dnl 676449dc963fSmrglt_save_CC="$CC" 676549dc963fSmrgAC_LANG_PUSH(C) 67664b0ead49Smrg 676749dc963fSmrg# Source file extension for C test sources. 676849dc963fSmrgac_ext=c 67694b0ead49Smrg 677049dc963fSmrg# Object file extension for compiled C test sources. 677149dc963fSmrgobjext=o 677249dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 67734b0ead49Smrg 677449dc963fSmrg# Code to be used in simple compile tests 677549dc963fSmrglt_simple_compile_test_code="int some_variable = 0;" 67764b0ead49Smrg 677749dc963fSmrg# Code to be used in simple link tests 677849dc963fSmrglt_simple_link_test_code='int main(){return(0);}' 67794b0ead49Smrg 678049dc963fSmrg_LT_TAG_COMPILER 678149dc963fSmrg# Save the default compiler, since it gets overwritten when the other 678249dc963fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 678349dc963fSmrgcompiler_DEFAULT=$CC 67844b0ead49Smrg 678549dc963fSmrg# save warnings/boilerplate of simple test code 678649dc963fSmrg_LT_COMPILER_BOILERPLATE 678749dc963fSmrg_LT_LINKER_BOILERPLATE 67884b0ead49Smrg 678949dc963fSmrgif test -n "$compiler"; then 679049dc963fSmrg _LT_COMPILER_NO_RTTI($1) 679149dc963fSmrg _LT_COMPILER_PIC($1) 679249dc963fSmrg _LT_COMPILER_C_O($1) 679349dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 679449dc963fSmrg _LT_LINKER_SHLIBS($1) 679549dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 679649dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 679749dc963fSmrg LT_SYS_DLOPEN_SELF 679849dc963fSmrg _LT_CMD_STRIPLIB 679949dc963fSmrg 680049dc963fSmrg # Report which library types will actually be built 680149dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 680249dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 680349dc963fSmrg 680449dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 680549dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 680649dc963fSmrg 680749dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 680849dc963fSmrg # are all built from PIC. 680949dc963fSmrg case $host_os in 681049dc963fSmrg aix3*) 681149dc963fSmrg test "$enable_shared" = yes && enable_static=no 681249dc963fSmrg if test -n "$RANLIB"; then 681349dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 681449dc963fSmrg postinstall_cmds='$RANLIB $lib' 681549dc963fSmrg fi 681649dc963fSmrg ;; 68174b0ead49Smrg 681849dc963fSmrg aix[[4-9]]*) 681949dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 682049dc963fSmrg test "$enable_shared" = yes && enable_static=no 682149dc963fSmrg fi 682249dc963fSmrg ;; 682349dc963fSmrg esac 682449dc963fSmrg AC_MSG_RESULT([$enable_shared]) 68254b0ead49Smrg 682649dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 682749dc963fSmrg # Make sure either enable_shared or enable_static is yes. 682849dc963fSmrg test "$enable_shared" = yes || enable_static=yes 682949dc963fSmrg AC_MSG_RESULT([$enable_static]) 68304b0ead49Smrg 683149dc963fSmrg _LT_CONFIG($1) 683249dc963fSmrgfi 683349dc963fSmrgAC_LANG_POP 683449dc963fSmrgCC="$lt_save_CC" 683549dc963fSmrg])# _LT_LANG_C_CONFIG 68364b0ead49Smrg 68374b0ead49Smrg 683849dc963fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 683949dc963fSmrg# -------------------------- 684049dc963fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 684149dc963fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 684249dc963fSmrg# the compiler configuration to `libtool'. 684349dc963fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 68447aa89044Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684549dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 68464e7590efSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 68477aa89044Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 68487aa89044Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 68497aa89044Smrg (test "X$CXX" != "Xg++"))) ; then 68507aa89044Smrg AC_PROG_CXXCPP 68517aa89044Smrgelse 68527aa89044Smrg _lt_caught_CXX_error=yes 68537aa89044Smrgfi 685449dc963fSmrg 685549dc963fSmrgAC_LANG_PUSH(C++) 685649dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 685749dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 685849dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 685949dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 686049dc963fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 686149dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 686249dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 686349dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 686449dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 686549dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 686649dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 686749dc963fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 686849dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 686949dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 687049dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 687149dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 687249dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 687349dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 68747aa89044Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 68757aa89044Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 687649dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 687749dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 687849dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 68794b0ead49Smrg 688049dc963fSmrg# Source file extension for C++ test sources. 688149dc963fSmrgac_ext=cpp 68824b0ead49Smrg 688349dc963fSmrg# Object file extension for compiled C++ test sources. 688449dc963fSmrgobjext=o 688549dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 688649dc963fSmrg 688749dc963fSmrg# No sense in running all these tests if we already determined that 688849dc963fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 688949dc963fSmrg# are currently assumed to apply to all compilers on this platform, 689049dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 689149dc963fSmrgif test "$_lt_caught_CXX_error" != yes; then 689249dc963fSmrg # Code to be used in simple compile tests 689349dc963fSmrg lt_simple_compile_test_code="int some_variable = 0;" 689449dc963fSmrg 689549dc963fSmrg # Code to be used in simple link tests 689649dc963fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 689749dc963fSmrg 689849dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 689949dc963fSmrg _LT_TAG_COMPILER 690049dc963fSmrg 690149dc963fSmrg # save warnings/boilerplate of simple test code 690249dc963fSmrg _LT_COMPILER_BOILERPLATE 690349dc963fSmrg _LT_LINKER_BOILERPLATE 690449dc963fSmrg 690549dc963fSmrg # Allow CC to be a program name with arguments. 690649dc963fSmrg lt_save_CC=$CC 69074e7590efSmrg lt_save_CFLAGS=$CFLAGS 690849dc963fSmrg lt_save_LD=$LD 690949dc963fSmrg lt_save_GCC=$GCC 691049dc963fSmrg GCC=$GXX 691149dc963fSmrg lt_save_with_gnu_ld=$with_gnu_ld 691249dc963fSmrg lt_save_path_LD=$lt_cv_path_LD 691349dc963fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 691449dc963fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 691549dc963fSmrg else 691649dc963fSmrg $as_unset lt_cv_prog_gnu_ld 691749dc963fSmrg fi 691849dc963fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 691949dc963fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 692049dc963fSmrg else 692149dc963fSmrg $as_unset lt_cv_path_LD 692249dc963fSmrg fi 692349dc963fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 692449dc963fSmrg CC=${CXX-"c++"} 69254e7590efSmrg CFLAGS=$CXXFLAGS 692649dc963fSmrg compiler=$CC 692749dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 692849dc963fSmrg _LT_CC_BASENAME([$compiler]) 69294b0ead49Smrg 693049dc963fSmrg if test -n "$compiler"; then 693149dc963fSmrg # We don't want -fno-exception when compiling C++ code, so set the 693249dc963fSmrg # no_builtin_flag separately 693349dc963fSmrg if test "$GXX" = yes; then 693449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 693549dc963fSmrg else 693649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 693749dc963fSmrg fi 69384b0ead49Smrg 693949dc963fSmrg if test "$GXX" = yes; then 694049dc963fSmrg # Set up default GNU C++ configuration 69414b0ead49Smrg 694249dc963fSmrg LT_PATH_LD 69434b0ead49Smrg 694449dc963fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 694549dc963fSmrg # archiving commands below assume that GNU ld is being used. 694649dc963fSmrg if test "$with_gnu_ld" = yes; then 69474e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 69484e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 69494b0ead49Smrg 695049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 695149dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 69524b0ead49Smrg 695349dc963fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 695449dc963fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 695549dc963fSmrg # investigate it a little bit more. (MM) 695649dc963fSmrg wlarc='${wl}' 69574b0ead49Smrg 695849dc963fSmrg # ancient GNU ld didn't support --whole-archive et. al. 695949dc963fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 696049dc963fSmrg $GREP 'no-whole-archive' > /dev/null; then 696149dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 696249dc963fSmrg else 696349dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 696449dc963fSmrg fi 696549dc963fSmrg else 696649dc963fSmrg with_gnu_ld=no 696749dc963fSmrg wlarc= 696849dc963fSmrg 696949dc963fSmrg # A generic and very simple default shared library creation 697049dc963fSmrg # command for GNU C++ for the case where it uses the native 697149dc963fSmrg # linker, instead of GNU ld. If possible, this setting should 697249dc963fSmrg # overridden to take advantage of the native linker features on 697349dc963fSmrg # the platform it is being used on. 697449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 697549dc963fSmrg fi 69764b0ead49Smrg 697749dc963fSmrg # Commands to make compiler produce verbose output that lists 697849dc963fSmrg # what "hidden" libraries, object files and flags are used when 697949dc963fSmrg # linking a shared library. 69807aa89044Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 69814b0ead49Smrg 698249dc963fSmrg else 698349dc963fSmrg GXX=no 698449dc963fSmrg with_gnu_ld=no 698549dc963fSmrg wlarc= 698649dc963fSmrg fi 69874b0ead49Smrg 698849dc963fSmrg # PORTME: fill in a description of your system's C++ link characteristics 698949dc963fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 699049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 699149dc963fSmrg case $host_os in 699249dc963fSmrg aix3*) 699349dc963fSmrg # FIXME: insert proper C++ library support 699449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 699549dc963fSmrg ;; 699649dc963fSmrg aix[[4-9]]*) 699749dc963fSmrg if test "$host_cpu" = ia64; then 699849dc963fSmrg # On IA64, the linker does run time linking by default, so we don't 699949dc963fSmrg # have to do anything special. 700049dc963fSmrg aix_use_runtimelinking=no 700149dc963fSmrg exp_sym_flag='-Bexport' 700249dc963fSmrg no_entry_flag="" 700349dc963fSmrg else 700449dc963fSmrg aix_use_runtimelinking=no 700549dc963fSmrg 700649dc963fSmrg # Test if we are trying to use run time linking or normal 700749dc963fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 700849dc963fSmrg # need to do runtime linking. 700949dc963fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 701049dc963fSmrg for ld_flag in $LDFLAGS; do 701149dc963fSmrg case $ld_flag in 701249dc963fSmrg *-brtl*) 701349dc963fSmrg aix_use_runtimelinking=yes 701449dc963fSmrg break 701549dc963fSmrg ;; 701649dc963fSmrg esac 701749dc963fSmrg done 701849dc963fSmrg ;; 701949dc963fSmrg esac 70204b0ead49Smrg 702149dc963fSmrg exp_sym_flag='-bexport' 702249dc963fSmrg no_entry_flag='-bnoentry' 702349dc963fSmrg fi 70244b0ead49Smrg 702549dc963fSmrg # When large executables or shared objects are built, AIX ld can 702649dc963fSmrg # have problems creating the table of contents. If linking a library 702749dc963fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 702849dc963fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 702949dc963fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 703049dc963fSmrg 703149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='' 703249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 703349dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 703449dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 703549dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 703649dc963fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 703749dc963fSmrg 703849dc963fSmrg if test "$GXX" = yes; then 703949dc963fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 704049dc963fSmrg # We only want to do this on AIX 4.2 and lower, the check 704149dc963fSmrg # below for broken collect2 doesn't work under 4.3+ 704249dc963fSmrg collect2name=`${CC} -print-prog-name=collect2` 704349dc963fSmrg if test -f "$collect2name" && 704449dc963fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 704549dc963fSmrg then 704649dc963fSmrg # We have reworked collect2 704749dc963fSmrg : 704849dc963fSmrg else 704949dc963fSmrg # We have old collect2 705049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 705149dc963fSmrg # It fails to find uninstalled libraries when the uninstalled 705249dc963fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 705349dc963fSmrg # to unsupported forces relinking 705449dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 705549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 705649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 705749dc963fSmrg fi 705849dc963fSmrg esac 705949dc963fSmrg shared_flag='-shared' 706049dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 706149dc963fSmrg shared_flag="$shared_flag "'${wl}-G' 706249dc963fSmrg fi 706349dc963fSmrg else 706449dc963fSmrg # not using gcc 706549dc963fSmrg if test "$host_cpu" = ia64; then 706649dc963fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 706749dc963fSmrg # chokes on -Wl,-G. The following line is correct: 706849dc963fSmrg shared_flag='-G' 706949dc963fSmrg else 707049dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 707149dc963fSmrg shared_flag='${wl}-G' 707249dc963fSmrg else 707349dc963fSmrg shared_flag='${wl}-bM:SRE' 707449dc963fSmrg fi 707549dc963fSmrg fi 707649dc963fSmrg fi 70774b0ead49Smrg 707849dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 707949dc963fSmrg # It seems that -bexpall does not export symbols beginning with 708049dc963fSmrg # underscore (_), so it is better to generate a list of symbols to 708149dc963fSmrg # export. 708249dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 708349dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 708449dc963fSmrg # Warning - without using the other runtime loading flags (-brtl), 708549dc963fSmrg # -berok will link without error, but may produce a broken library. 708649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 708749dc963fSmrg # Determine the default libpath from the value encoded in an empty 708849dc963fSmrg # executable. 70894e7590efSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 709049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 709149dc963fSmrg 70927aa89044Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 709349dc963fSmrg else 709449dc963fSmrg if test "$host_cpu" = ia64; then 709549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 709649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 709749dc963fSmrg _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" 709849dc963fSmrg else 709949dc963fSmrg # Determine the default libpath from the value encoded in an 710049dc963fSmrg # empty executable. 71014e7590efSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 710249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 710349dc963fSmrg # Warning - without using the other run time loading flags, 710449dc963fSmrg # -berok will link without error, but may produce a broken library. 710549dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 710649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71077aa89044Smrg if test "$with_gnu_ld" = yes; then 71087aa89044Smrg # We only use this code for GNU lds that support --whole-archive. 71097aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71107aa89044Smrg else 71117aa89044Smrg # Exported symbols can be pulled into shared objects from archives 71127aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71137aa89044Smrg fi 711449dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 711549dc963fSmrg # This is similar to how AIX traditionally builds its shared 711649dc963fSmrg # libraries. 711749dc963fSmrg _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' 711849dc963fSmrg fi 711949dc963fSmrg fi 712049dc963fSmrg ;; 71214b0ead49Smrg 712249dc963fSmrg beos*) 712349dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 712449dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 712549dc963fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 712649dc963fSmrg # support --undefined. This deserves some investigation. FIXME 712749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 712849dc963fSmrg else 712949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 713049dc963fSmrg fi 713149dc963fSmrg ;; 71324b0ead49Smrg 713349dc963fSmrg chorus*) 713449dc963fSmrg case $cc_basename in 713549dc963fSmrg *) 713649dc963fSmrg # FIXME: insert proper C++ library support 713749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 713849dc963fSmrg ;; 713949dc963fSmrg esac 714049dc963fSmrg ;; 71414b0ead49Smrg 714249dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 71434e7590efSmrg case $GXX,$cc_basename in 71444e7590efSmrg ,cl* | no,cl*) 71454e7590efSmrg # Native MSVC 71464e7590efSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 71474e7590efSmrg # no search path for DLLs. 71484e7590efSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 71494e7590efSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71504e7590efSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 71514e7590efSmrg _LT_TAGVAR(file_list_spec, $1)='@' 71524e7590efSmrg # Tell ltmain to make .lib files, not .a files. 71534e7590efSmrg libext=lib 71544e7590efSmrg # Tell ltmain to make .dll files, not .so files. 71554e7590efSmrg shrext_cmds=".dll" 71564e7590efSmrg # FIXME: Setting linknames here is a bad hack. 71574e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 71584e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 71594e7590efSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 71604e7590efSmrg else 71614e7590efSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 71624e7590efSmrg fi~ 71634e7590efSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 71644e7590efSmrg linknames=' 71654e7590efSmrg # The linker will not automatically build a static lib if we build a DLL. 71664e7590efSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 71674e7590efSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71684e7590efSmrg # Don't use ranlib 71694e7590efSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 71704e7590efSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 71714e7590efSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 71724e7590efSmrg case $lt_outputfile in 71734e7590efSmrg *.exe|*.EXE) ;; 71744e7590efSmrg *) 71754e7590efSmrg lt_outputfile="$lt_outputfile.exe" 71764e7590efSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 71774e7590efSmrg ;; 71784e7590efSmrg esac~ 71794e7590efSmrg func_to_tool_file "$lt_outputfile"~ 71804e7590efSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 71814e7590efSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 71824e7590efSmrg $RM "$lt_outputfile.manifest"; 71834e7590efSmrg fi' 71844e7590efSmrg ;; 71854e7590efSmrg *) 71864e7590efSmrg # g++ 71874e7590efSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 71884e7590efSmrg # as there is no search path for DLLs. 71894e7590efSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71904e7590efSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 71914e7590efSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71924e7590efSmrg _LT_TAGVAR(always_export_symbols, $1)=no 71934e7590efSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71944e7590efSmrg 71954e7590efSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 71964e7590efSmrg _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' 71974e7590efSmrg # If the export-symbols file already is a .def file (1st line 71984e7590efSmrg # is EXPORTS), use it as is; otherwise, prepend... 71994e7590efSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72004e7590efSmrg cp $export_symbols $output_objdir/$soname.def; 72014e7590efSmrg else 72024e7590efSmrg echo EXPORTS > $output_objdir/$soname.def; 72034e7590efSmrg cat $export_symbols >> $output_objdir/$soname.def; 72044e7590efSmrg fi~ 72054e7590efSmrg $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' 72064e7590efSmrg else 72074e7590efSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72084e7590efSmrg fi 72094e7590efSmrg ;; 72104e7590efSmrg esac 72114e7590efSmrg ;; 721249dc963fSmrg darwin* | rhapsody*) 721349dc963fSmrg _LT_DARWIN_LINKER_FEATURES($1) 721449dc963fSmrg ;; 72154b0ead49Smrg 721649dc963fSmrg dgux*) 721749dc963fSmrg case $cc_basename in 721849dc963fSmrg ec++*) 721949dc963fSmrg # FIXME: insert proper C++ library support 722049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 722149dc963fSmrg ;; 722249dc963fSmrg ghcx*) 722349dc963fSmrg # Green Hills C++ Compiler 722449dc963fSmrg # FIXME: insert proper C++ library support 722549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 722649dc963fSmrg ;; 722749dc963fSmrg *) 722849dc963fSmrg # FIXME: insert proper C++ library support 722949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 723049dc963fSmrg ;; 723149dc963fSmrg esac 723249dc963fSmrg ;; 72334b0ead49Smrg 72344e7590efSmrg freebsd2.*) 723549dc963fSmrg # C++ shared libraries reported to be fairly broken before 723649dc963fSmrg # switch to ELF 723749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 723849dc963fSmrg ;; 72394b0ead49Smrg 724049dc963fSmrg freebsd-elf*) 724149dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 724249dc963fSmrg ;; 72434b0ead49Smrg 724449dc963fSmrg freebsd* | dragonfly*) 724549dc963fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 724649dc963fSmrg # conventions 724749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 724849dc963fSmrg ;; 72494b0ead49Smrg 725049dc963fSmrg gnu*) 725149dc963fSmrg ;; 72524b0ead49Smrg 72537aa89044Smrg haiku*) 72547aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72557aa89044Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72567aa89044Smrg ;; 72577aa89044Smrg 725849dc963fSmrg hpux9*) 725949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 726049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 726149dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 726249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 726349dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 726449dc963fSmrg # but as the default 726549dc963fSmrg # location of the library. 726649dc963fSmrg 726749dc963fSmrg case $cc_basename in 726849dc963fSmrg CC*) 726949dc963fSmrg # FIXME: insert proper C++ library support 727049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 727149dc963fSmrg ;; 727249dc963fSmrg aCC*) 727349dc963fSmrg _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' 727449dc963fSmrg # Commands to make compiler produce verbose output that lists 727549dc963fSmrg # what "hidden" libraries, object files and flags are used when 727649dc963fSmrg # linking a shared library. 727749dc963fSmrg # 727849dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 727949dc963fSmrg # explicitly linking system object files so we need to strip them 728049dc963fSmrg # from the output so that they don't get included in the library 728149dc963fSmrg # dependencies. 72827aa89044Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 728349dc963fSmrg ;; 728449dc963fSmrg *) 728549dc963fSmrg if test "$GXX" = yes; then 72864e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 728749dc963fSmrg else 728849dc963fSmrg # FIXME: insert proper C++ library support 728949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 729049dc963fSmrg fi 729149dc963fSmrg ;; 729249dc963fSmrg esac 729349dc963fSmrg ;; 72944b0ead49Smrg 729549dc963fSmrg hpux10*|hpux11*) 729649dc963fSmrg if test $with_gnu_ld = no; then 729749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 729849dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 729949dc963fSmrg 730049dc963fSmrg case $host_cpu in 730149dc963fSmrg hppa*64*|ia64*) 730249dc963fSmrg ;; 730349dc963fSmrg *) 730449dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 730549dc963fSmrg ;; 730649dc963fSmrg esac 730749dc963fSmrg fi 730849dc963fSmrg case $host_cpu in 730949dc963fSmrg hppa*64*|ia64*) 731049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 731149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731249dc963fSmrg ;; 731349dc963fSmrg *) 731449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 731549dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 731649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 731749dc963fSmrg # but as the default 731849dc963fSmrg # location of the library. 731949dc963fSmrg ;; 732049dc963fSmrg esac 732149dc963fSmrg 732249dc963fSmrg case $cc_basename in 732349dc963fSmrg CC*) 732449dc963fSmrg # FIXME: insert proper C++ library support 732549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 732649dc963fSmrg ;; 732749dc963fSmrg aCC*) 732849dc963fSmrg case $host_cpu in 732949dc963fSmrg hppa*64*) 733049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733149dc963fSmrg ;; 733249dc963fSmrg ia64*) 733349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733449dc963fSmrg ;; 733549dc963fSmrg *) 733649dc963fSmrg _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' 733749dc963fSmrg ;; 733849dc963fSmrg esac 733949dc963fSmrg # Commands to make compiler produce verbose output that lists 734049dc963fSmrg # what "hidden" libraries, object files and flags are used when 734149dc963fSmrg # linking a shared library. 734249dc963fSmrg # 734349dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 734449dc963fSmrg # explicitly linking system object files so we need to strip them 734549dc963fSmrg # from the output so that they don't get included in the library 734649dc963fSmrg # dependencies. 73477aa89044Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 734849dc963fSmrg ;; 734949dc963fSmrg *) 735049dc963fSmrg if test "$GXX" = yes; then 735149dc963fSmrg if test $with_gnu_ld = no; then 735249dc963fSmrg case $host_cpu in 735349dc963fSmrg hppa*64*) 735449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 735549dc963fSmrg ;; 735649dc963fSmrg ia64*) 73574e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 735849dc963fSmrg ;; 735949dc963fSmrg *) 73604e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 736149dc963fSmrg ;; 736249dc963fSmrg esac 736349dc963fSmrg fi 736449dc963fSmrg else 736549dc963fSmrg # FIXME: insert proper C++ library support 736649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 736749dc963fSmrg fi 736849dc963fSmrg ;; 736949dc963fSmrg esac 737049dc963fSmrg ;; 73714b0ead49Smrg 737249dc963fSmrg interix[[3-9]]*) 737349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 737449dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 737549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 737649dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 737749dc963fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 737849dc963fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 737949dc963fSmrg # default) and relocated if they conflict, which is a slow very memory 738049dc963fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 738149dc963fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 738249dc963fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 738349dc963fSmrg _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' 738449dc963fSmrg _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' 738549dc963fSmrg ;; 738649dc963fSmrg irix5* | irix6*) 738749dc963fSmrg case $cc_basename in 738849dc963fSmrg CC*) 738949dc963fSmrg # SGI C++ 73907aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 739149dc963fSmrg 739249dc963fSmrg # Archives containing C++ object files must be created using 739349dc963fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 739449dc963fSmrg # necessary to make sure instantiated templates are included 739549dc963fSmrg # in the archive. 739649dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 739749dc963fSmrg ;; 739849dc963fSmrg *) 739949dc963fSmrg if test "$GXX" = yes; then 740049dc963fSmrg if test "$with_gnu_ld" = no; then 74014e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 740249dc963fSmrg else 74034e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 740449dc963fSmrg fi 740549dc963fSmrg fi 740649dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 740749dc963fSmrg ;; 740849dc963fSmrg esac 740949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 741049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 741149dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 741249dc963fSmrg ;; 74134b0ead49Smrg 74147aa89044Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 741549dc963fSmrg case $cc_basename in 741649dc963fSmrg KCC*) 741749dc963fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 741849dc963fSmrg 741949dc963fSmrg # KCC will only create a shared library if the output file 742049dc963fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 742149dc963fSmrg # to its proper name (with version) after linking. 742249dc963fSmrg _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' 742349dc963fSmrg _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' 742449dc963fSmrg # Commands to make compiler produce verbose output that lists 742549dc963fSmrg # what "hidden" libraries, object files and flags are used when 742649dc963fSmrg # linking a shared library. 742749dc963fSmrg # 742849dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 742949dc963fSmrg # explicitly linking system object files so we need to strip them 743049dc963fSmrg # from the output so that they don't get included in the library 743149dc963fSmrg # dependencies. 74327aa89044Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 743349dc963fSmrg 743449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 743549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 743649dc963fSmrg 743749dc963fSmrg # Archives containing C++ object files must be created using 743849dc963fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 743949dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 744049dc963fSmrg ;; 744149dc963fSmrg icpc* | ecpc* ) 744249dc963fSmrg # Intel C++ 744349dc963fSmrg with_gnu_ld=yes 744449dc963fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 744549dc963fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 744649dc963fSmrg # earlier do not add the objects themselves. 744749dc963fSmrg case `$CC -V 2>&1` in 744849dc963fSmrg *"Version 7."*) 744949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 745049dc963fSmrg _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' 745149dc963fSmrg ;; 745249dc963fSmrg *) # Version 8.0 or newer 745349dc963fSmrg tmp_idyn= 745449dc963fSmrg case $host_cpu in 745549dc963fSmrg ia64*) tmp_idyn=' -i_dynamic';; 745649dc963fSmrg esac 745749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 745849dc963fSmrg _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' 745949dc963fSmrg ;; 746049dc963fSmrg esac 746149dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 746249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 746349dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 746449dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 746549dc963fSmrg ;; 746649dc963fSmrg pgCC* | pgcpp*) 746749dc963fSmrg # Portland Group C++ compiler 746849dc963fSmrg case `$CC -V` in 74697aa89044Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 747049dc963fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 747149dc963fSmrg rm -rf $tpldir~ 747249dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 74737aa89044Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 747449dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 747549dc963fSmrg rm -rf $tpldir~ 747649dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 74777aa89044Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 747849dc963fSmrg $RANLIB $oldlib' 747949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 748049dc963fSmrg rm -rf $tpldir~ 748149dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74827aa89044Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 748349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 748449dc963fSmrg rm -rf $tpldir~ 748549dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74867aa89044Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 748749dc963fSmrg ;; 74887aa89044Smrg *) # Version 6 and above use weak symbols 748949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 749049dc963fSmrg _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' 749149dc963fSmrg ;; 749249dc963fSmrg esac 74934b0ead49Smrg 749449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 749549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74967aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 749749dc963fSmrg ;; 749849dc963fSmrg cxx*) 749949dc963fSmrg # Compaq C++ 750049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 750149dc963fSmrg _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' 75024b0ead49Smrg 750349dc963fSmrg runpath_var=LD_RUN_PATH 750449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 750549dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75064b0ead49Smrg 750749dc963fSmrg # Commands to make compiler produce verbose output that lists 750849dc963fSmrg # what "hidden" libraries, object files and flags are used when 750949dc963fSmrg # linking a shared library. 751049dc963fSmrg # 751149dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 751249dc963fSmrg # explicitly linking system object files so we need to strip them 751349dc963fSmrg # from the output so that they don't get included in the library 751449dc963fSmrg # dependencies. 75157aa89044Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 751649dc963fSmrg ;; 75177aa89044Smrg xl* | mpixl* | bgxl*) 751849dc963fSmrg # IBM XL 8.0 on PPC, with GNU ld 751949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 752049dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 752149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 752249dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 752349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 752449dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 752549dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 752649dc963fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 752749dc963fSmrg fi 752849dc963fSmrg ;; 752949dc963fSmrg *) 753049dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 753149dc963fSmrg *Sun\ C*) 753249dc963fSmrg # Sun C++ 5.9 753349dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 753449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 753549dc963fSmrg _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' 753649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75377aa89044Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 753849dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 753949dc963fSmrg 754049dc963fSmrg # Not sure whether something based on 754149dc963fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 754249dc963fSmrg # would be better. 75437aa89044Smrg output_verbose_link_cmd='func_echo_all' 754449dc963fSmrg 754549dc963fSmrg # Archives containing C++ object files must be created using 754649dc963fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 754749dc963fSmrg # necessary to make sure instantiated templates are included 754849dc963fSmrg # in the archive. 754949dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 755049dc963fSmrg ;; 755149dc963fSmrg esac 755249dc963fSmrg ;; 755349dc963fSmrg esac 755449dc963fSmrg ;; 75554b0ead49Smrg 755649dc963fSmrg lynxos*) 755749dc963fSmrg # FIXME: insert proper C++ library support 755849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 755949dc963fSmrg ;; 75604b0ead49Smrg 756149dc963fSmrg m88k*) 756249dc963fSmrg # FIXME: insert proper C++ library support 756349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 756449dc963fSmrg ;; 75654b0ead49Smrg 756649dc963fSmrg mvs*) 756749dc963fSmrg case $cc_basename in 756849dc963fSmrg cxx*) 756949dc963fSmrg # FIXME: insert proper C++ library support 757049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 757149dc963fSmrg ;; 757249dc963fSmrg *) 757349dc963fSmrg # FIXME: insert proper C++ library support 757449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 757549dc963fSmrg ;; 757649dc963fSmrg esac 757749dc963fSmrg ;; 75784b0ead49Smrg 757949dc963fSmrg netbsd*) 758049dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 758149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 758249dc963fSmrg wlarc= 758349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 758449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 758549dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 758649dc963fSmrg fi 758749dc963fSmrg # Workaround some broken pre-1.5 toolchains 758849dc963fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 758949dc963fSmrg ;; 75904b0ead49Smrg 759149dc963fSmrg *nto* | *qnx*) 759249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 759349dc963fSmrg ;; 75944b0ead49Smrg 759549dc963fSmrg openbsd2*) 759649dc963fSmrg # C++ shared libraries are fairly broken 759749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 759849dc963fSmrg ;; 75994b0ead49Smrg 760049dc963fSmrg openbsd*) 760149dc963fSmrg if test -f /usr/libexec/ld.so; then 760249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 760349dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 760449dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 760549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 760649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 760749dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 760849dc963fSmrg _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' 760949dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 761049dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 761149dc963fSmrg fi 76127aa89044Smrg output_verbose_link_cmd=func_echo_all 761349dc963fSmrg else 761449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 761549dc963fSmrg fi 761649dc963fSmrg ;; 76174b0ead49Smrg 761849dc963fSmrg osf3* | osf4* | osf5*) 761949dc963fSmrg case $cc_basename in 762049dc963fSmrg KCC*) 762149dc963fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 762249dc963fSmrg 762349dc963fSmrg # KCC will only create a shared library if the output file 762449dc963fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 762549dc963fSmrg # to its proper name (with version) after linking. 762649dc963fSmrg _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' 762749dc963fSmrg 762849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 762949dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 763049dc963fSmrg 763149dc963fSmrg # Archives containing C++ object files must be created using 763249dc963fSmrg # the KAI C++ compiler. 763349dc963fSmrg case $host in 763449dc963fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 763549dc963fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 763649dc963fSmrg esac 763749dc963fSmrg ;; 763849dc963fSmrg RCC*) 763949dc963fSmrg # Rational C++ 2.4.1 764049dc963fSmrg # FIXME: insert proper C++ library support 764149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 764249dc963fSmrg ;; 764349dc963fSmrg cxx*) 764449dc963fSmrg case $host in 764549dc963fSmrg osf3*) 764649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76477aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 764849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 764949dc963fSmrg ;; 765049dc963fSmrg *) 765149dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 76527aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 765349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 765449dc963fSmrg echo "-hidden">> $lib.exp~ 76557aa89044Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 765649dc963fSmrg $RM $lib.exp' 765749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 765849dc963fSmrg ;; 765949dc963fSmrg esac 76604b0ead49Smrg 766149dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76624b0ead49Smrg 766349dc963fSmrg # Commands to make compiler produce verbose output that lists 766449dc963fSmrg # what "hidden" libraries, object files and flags are used when 766549dc963fSmrg # linking a shared library. 766649dc963fSmrg # 766749dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 766849dc963fSmrg # explicitly linking system object files so we need to strip them 766949dc963fSmrg # from the output so that they don't get included in the library 767049dc963fSmrg # dependencies. 76717aa89044Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 767249dc963fSmrg ;; 767349dc963fSmrg *) 767449dc963fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 767549dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 767649dc963fSmrg case $host in 767749dc963fSmrg osf3*) 76787aa89044Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 767949dc963fSmrg ;; 768049dc963fSmrg *) 76814e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 768249dc963fSmrg ;; 768349dc963fSmrg esac 768449dc963fSmrg 768549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 768649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 768749dc963fSmrg 768849dc963fSmrg # Commands to make compiler produce verbose output that lists 768949dc963fSmrg # what "hidden" libraries, object files and flags are used when 769049dc963fSmrg # linking a shared library. 76917aa89044Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 769249dc963fSmrg 769349dc963fSmrg else 769449dc963fSmrg # FIXME: insert proper C++ library support 769549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 769649dc963fSmrg fi 769749dc963fSmrg ;; 769849dc963fSmrg esac 769949dc963fSmrg ;; 77004b0ead49Smrg 770149dc963fSmrg psos*) 770249dc963fSmrg # FIXME: insert proper C++ library support 770349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 770449dc963fSmrg ;; 77054b0ead49Smrg 770649dc963fSmrg sunos4*) 770749dc963fSmrg case $cc_basename in 770849dc963fSmrg CC*) 770949dc963fSmrg # Sun C++ 4.x 771049dc963fSmrg # FIXME: insert proper C++ library support 771149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 771249dc963fSmrg ;; 771349dc963fSmrg lcc*) 771449dc963fSmrg # Lucid 771549dc963fSmrg # FIXME: insert proper C++ library support 771649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 771749dc963fSmrg ;; 771849dc963fSmrg *) 771949dc963fSmrg # FIXME: insert proper C++ library support 772049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 772149dc963fSmrg ;; 772249dc963fSmrg esac 772349dc963fSmrg ;; 77244b0ead49Smrg 772549dc963fSmrg solaris*) 772649dc963fSmrg case $cc_basename in 77277aa89044Smrg CC* | sunCC*) 772849dc963fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 772949dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 773049dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 773149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 773249dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 773349dc963fSmrg $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' 773449dc963fSmrg 773549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 773649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 773749dc963fSmrg case $host_os in 773849dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 773949dc963fSmrg *) 774049dc963fSmrg # The compiler driver will combine and reorder linker options, 774149dc963fSmrg # but understands `-z linker_flag'. 774249dc963fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 774349dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 774449dc963fSmrg ;; 774549dc963fSmrg esac 774649dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 77474b0ead49Smrg 77487aa89044Smrg output_verbose_link_cmd='func_echo_all' 77494b0ead49Smrg 775049dc963fSmrg # Archives containing C++ object files must be created using 775149dc963fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 775249dc963fSmrg # necessary to make sure instantiated templates are included 775349dc963fSmrg # in the archive. 775449dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 775549dc963fSmrg ;; 775649dc963fSmrg gcx*) 775749dc963fSmrg # Green Hills C++ Compiler 775849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 77594b0ead49Smrg 776049dc963fSmrg # The C++ compiler must be used to create the archive. 776149dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 776249dc963fSmrg ;; 776349dc963fSmrg *) 776449dc963fSmrg # GNU C++ compiler with Solaris linker 776549dc963fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 776649dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 776749dc963fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 77684e7590efSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 776949dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77704e7590efSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 777149dc963fSmrg 777249dc963fSmrg # Commands to make compiler produce verbose output that lists 777349dc963fSmrg # what "hidden" libraries, object files and flags are used when 777449dc963fSmrg # linking a shared library. 77757aa89044Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 777649dc963fSmrg else 777749dc963fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 777849dc963fSmrg # platform. 777949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 778049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 778149dc963fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 778249dc963fSmrg 778349dc963fSmrg # Commands to make compiler produce verbose output that lists 778449dc963fSmrg # what "hidden" libraries, object files and flags are used when 778549dc963fSmrg # linking a shared library. 77867aa89044Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 778749dc963fSmrg fi 778849dc963fSmrg 778949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 779049dc963fSmrg case $host_os in 779149dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 779249dc963fSmrg *) 779349dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 779449dc963fSmrg ;; 779549dc963fSmrg esac 779649dc963fSmrg fi 779749dc963fSmrg ;; 779849dc963fSmrg esac 779949dc963fSmrg ;; 78004b0ead49Smrg 780149dc963fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 780249dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 780349dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 780449dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 780549dc963fSmrg runpath_var='LD_RUN_PATH' 78064b0ead49Smrg 780749dc963fSmrg case $cc_basename in 780849dc963fSmrg CC*) 780949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781149dc963fSmrg ;; 781249dc963fSmrg *) 781349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781449dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781549dc963fSmrg ;; 781649dc963fSmrg esac 781749dc963fSmrg ;; 78184b0ead49Smrg 781949dc963fSmrg sysv5* | sco3.2v5* | sco5v6*) 782049dc963fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 782149dc963fSmrg # link with -lc, and that would cause any symbols used from libc to 782249dc963fSmrg # always be unresolved, which means just about no library would 782349dc963fSmrg # ever link correctly. If we're not using GNU ld we use -z text 782449dc963fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 782549dc963fSmrg # as -z defs. 782649dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 782749dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 782849dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 782949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 783149dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 783249dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 783349dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 783449dc963fSmrg runpath_var='LD_RUN_PATH' 78354b0ead49Smrg 783649dc963fSmrg case $cc_basename in 783749dc963fSmrg CC*) 783849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 783949dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78407aa89044Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 78417aa89044Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 78427aa89044Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 78437aa89044Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 784449dc963fSmrg ;; 784549dc963fSmrg *) 784649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784849dc963fSmrg ;; 784949dc963fSmrg esac 785049dc963fSmrg ;; 78514b0ead49Smrg 785249dc963fSmrg tandem*) 785349dc963fSmrg case $cc_basename in 785449dc963fSmrg NCC*) 785549dc963fSmrg # NonStop-UX NCC 3.20 785649dc963fSmrg # FIXME: insert proper C++ library support 785749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 785849dc963fSmrg ;; 785949dc963fSmrg *) 786049dc963fSmrg # FIXME: insert proper C++ library support 786149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 786249dc963fSmrg ;; 786349dc963fSmrg esac 786449dc963fSmrg ;; 78654b0ead49Smrg 786649dc963fSmrg vxworks*) 786749dc963fSmrg # FIXME: insert proper C++ library support 786849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 786949dc963fSmrg ;; 78704b0ead49Smrg 787149dc963fSmrg *) 787249dc963fSmrg # FIXME: insert proper C++ library support 787349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 787449dc963fSmrg ;; 787549dc963fSmrg esac 78764b0ead49Smrg 787749dc963fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 787849dc963fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 787949dc963fSmrg 788049dc963fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 788149dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 788249dc963fSmrg 788349dc963fSmrg ## CAVEAT EMPTOR: 788449dc963fSmrg ## There is no encapsulation within the following macros, do not change 788549dc963fSmrg ## the running order or otherwise move them around unless you know exactly 788649dc963fSmrg ## what you are doing... 788749dc963fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 788849dc963fSmrg _LT_COMPILER_PIC($1) 788949dc963fSmrg _LT_COMPILER_C_O($1) 789049dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 789149dc963fSmrg _LT_LINKER_SHLIBS($1) 789249dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 789349dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 789449dc963fSmrg 789549dc963fSmrg _LT_CONFIG($1) 789649dc963fSmrg fi # test -n "$compiler" 789749dc963fSmrg 789849dc963fSmrg CC=$lt_save_CC 78994e7590efSmrg CFLAGS=$lt_save_CFLAGS 790049dc963fSmrg LDCXX=$LD 790149dc963fSmrg LD=$lt_save_LD 790249dc963fSmrg GCC=$lt_save_GCC 790349dc963fSmrg with_gnu_ld=$lt_save_with_gnu_ld 790449dc963fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 790549dc963fSmrg lt_cv_path_LD=$lt_save_path_LD 790649dc963fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 790749dc963fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 790849dc963fSmrgfi # test "$_lt_caught_CXX_error" != yes 79094b0ead49Smrg 791049dc963fSmrgAC_LANG_POP 791149dc963fSmrg])# _LT_LANG_CXX_CONFIG 79124b0ead49Smrg 79134b0ead49Smrg 79144e7590efSmrg# _LT_FUNC_STRIPNAME_CNF 79154e7590efSmrg# ---------------------- 79164e7590efSmrg# func_stripname_cnf prefix suffix name 79174e7590efSmrg# strip PREFIX and SUFFIX off of NAME. 79184e7590efSmrg# PREFIX and SUFFIX must not contain globbing or regex special 79194e7590efSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 79204e7590efSmrg# dot (in which case that matches only a dot). 79214e7590efSmrg# 79224e7590efSmrg# This function is identical to the (non-XSI) version of func_stripname, 79234e7590efSmrg# except this one can be used by m4 code that may be executed by configure, 79244e7590efSmrg# rather than the libtool script. 79254e7590efSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 79264e7590efSmrgAC_REQUIRE([_LT_DECL_SED]) 79274e7590efSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 79284e7590efSmrgfunc_stripname_cnf () 79294e7590efSmrg{ 79304e7590efSmrg case ${2} in 79314e7590efSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 79324e7590efSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 79334e7590efSmrg esac 79344e7590efSmrg} # func_stripname_cnf 79354e7590efSmrg])# _LT_FUNC_STRIPNAME_CNF 79364e7590efSmrg 793749dc963fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 793849dc963fSmrg# --------------------------------- 793949dc963fSmrg# Figure out "hidden" library dependencies from verbose 794049dc963fSmrg# compiler output when linking a shared library. 794149dc963fSmrg# Parse the compiler output and extract the necessary 794249dc963fSmrg# objects, libraries and library flags. 794349dc963fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 794449dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 79454e7590efSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 794649dc963fSmrg# Dependencies to place before and after the object being linked: 794749dc963fSmrg_LT_TAGVAR(predep_objects, $1)= 794849dc963fSmrg_LT_TAGVAR(postdep_objects, $1)= 794949dc963fSmrg_LT_TAGVAR(predeps, $1)= 795049dc963fSmrg_LT_TAGVAR(postdeps, $1)= 795149dc963fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 79524b0ead49Smrg 795349dc963fSmrgdnl we can't use the lt_simple_compile_test_code here, 795449dc963fSmrgdnl because it contains code intended for an executable, 795549dc963fSmrgdnl not a library. It's possible we should let each 795649dc963fSmrgdnl tag define a new lt_????_link_test_code variable, 795749dc963fSmrgdnl but it's only used here... 795849dc963fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 795949dc963fSmrgint a; 796049dc963fSmrgvoid foo (void) { a = 0; } 796149dc963fSmrg_LT_EOF 796249dc963fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 796349dc963fSmrgclass Foo 796452b01e16Smrg{ 796549dc963fSmrgpublic: 796649dc963fSmrg Foo (void) { a = 0; } 796749dc963fSmrgprivate: 796849dc963fSmrg int a; 796952b01e16Smrg}; 797049dc963fSmrg_LT_EOF 797149dc963fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 797249dc963fSmrg subroutine foo 797349dc963fSmrg implicit none 797449dc963fSmrg integer*4 a 797549dc963fSmrg a=0 797649dc963fSmrg return 797749dc963fSmrg end 797849dc963fSmrg_LT_EOF 797949dc963fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 798049dc963fSmrg subroutine foo 798149dc963fSmrg implicit none 798249dc963fSmrg integer a 798349dc963fSmrg a=0 798449dc963fSmrg return 798549dc963fSmrg end 798649dc963fSmrg_LT_EOF 798749dc963fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 798849dc963fSmrgpublic class foo { 798949dc963fSmrg private int a; 799049dc963fSmrg public void bar (void) { 799149dc963fSmrg a = 0; 799249dc963fSmrg } 799349dc963fSmrg}; 799449dc963fSmrg_LT_EOF 79954e7590efSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 79964e7590efSmrgpackage foo 79974e7590efSmrgfunc foo() { 79984e7590efSmrg} 79994e7590efSmrg_LT_EOF 800052b01e16Smrg]) 80014e7590efSmrg 80024e7590efSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 80034e7590efSmrgcase "$CC $CFLAGS " in #( 80044e7590efSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 80054e7590efSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 80064e7590efSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 80074e7590efSmrgesac 80084e7590efSmrg 800949dc963fSmrgdnl Parse the compiler output and extract the necessary 801049dc963fSmrgdnl objects, libraries and library flags. 801149dc963fSmrgif AC_TRY_EVAL(ac_compile); then 801249dc963fSmrg # Parse the compiler output and extract the necessary 801349dc963fSmrg # objects, libraries and library flags. 801452b01e16Smrg 801549dc963fSmrg # Sentinel used to keep track of whether or not we are before 801649dc963fSmrg # the conftest object file. 801749dc963fSmrg pre_test_object_deps_done=no 801852b01e16Smrg 801949dc963fSmrg for p in `eval "$output_verbose_link_cmd"`; do 80204e7590efSmrg case ${prev}${p} in 802152b01e16Smrg 802249dc963fSmrg -L* | -R* | -l*) 802349dc963fSmrg # Some compilers place space between "-{L,R}" and the path. 802449dc963fSmrg # Remove the space. 802549dc963fSmrg if test $p = "-L" || 802649dc963fSmrg test $p = "-R"; then 802749dc963fSmrg prev=$p 802849dc963fSmrg continue 802949dc963fSmrg fi 803052b01e16Smrg 80314e7590efSmrg # Expand the sysroot to ease extracting the directories later. 80324e7590efSmrg if test -z "$prev"; then 80334e7590efSmrg case $p in 80344e7590efSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 80354e7590efSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 80364e7590efSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 80374e7590efSmrg esac 80384e7590efSmrg fi 80394e7590efSmrg case $p in 80404e7590efSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 80414e7590efSmrg esac 804249dc963fSmrg if test "$pre_test_object_deps_done" = no; then 80434e7590efSmrg case ${prev} in 80444e7590efSmrg -L | -R) 804549dc963fSmrg # Internal compiler library paths should come after those 804649dc963fSmrg # provided the user. The postdeps already come after the 804749dc963fSmrg # user supplied libs so there is no need to process them. 804849dc963fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 804949dc963fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 805049dc963fSmrg else 805149dc963fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 805249dc963fSmrg fi 805349dc963fSmrg ;; 805449dc963fSmrg # The "-l" case would never come before the object being 805549dc963fSmrg # linked, so don't bother handling this case. 805649dc963fSmrg esac 805749dc963fSmrg else 805849dc963fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 805949dc963fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 806049dc963fSmrg else 806149dc963fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 806249dc963fSmrg fi 806349dc963fSmrg fi 80644e7590efSmrg prev= 806552b01e16Smrg ;; 80664b0ead49Smrg 80674e7590efSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 806849dc963fSmrg *.$objext) 806949dc963fSmrg # This assumes that the test object file only shows up 807049dc963fSmrg # once in the compiler output. 807149dc963fSmrg if test "$p" = "conftest.$objext"; then 807249dc963fSmrg pre_test_object_deps_done=yes 807349dc963fSmrg continue 807449dc963fSmrg fi 807549dc963fSmrg 807649dc963fSmrg if test "$pre_test_object_deps_done" = no; then 807749dc963fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 807849dc963fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 807949dc963fSmrg else 808049dc963fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 808149dc963fSmrg fi 808249dc963fSmrg else 808349dc963fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 808449dc963fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 808549dc963fSmrg else 808649dc963fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 808749dc963fSmrg fi 808849dc963fSmrg fi 808949dc963fSmrg ;; 80904b0ead49Smrg 809149dc963fSmrg *) ;; # Ignore the rest. 80924b0ead49Smrg 809349dc963fSmrg esac 809449dc963fSmrg done 809552b01e16Smrg 809649dc963fSmrg # Clean up. 809749dc963fSmrg rm -f a.out a.exe 809849dc963fSmrgelse 809949dc963fSmrg echo "libtool.m4: error: problem compiling $1 test program" 810049dc963fSmrgfi 81014b0ead49Smrg 810249dc963fSmrg$RM -f confest.$objext 81034e7590efSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 81044b0ead49Smrg 810549dc963fSmrg# PORTME: override above test on systems where it is broken 810649dc963fSmrgm4_if([$1], [CXX], 810749dc963fSmrg[case $host_os in 810849dc963fSmrginterix[[3-9]]*) 810949dc963fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 811049dc963fSmrg # hack all around it, let's just trust "g++" to DTRT. 811149dc963fSmrg _LT_TAGVAR(predep_objects,$1)= 811249dc963fSmrg _LT_TAGVAR(postdep_objects,$1)= 811349dc963fSmrg _LT_TAGVAR(postdeps,$1)= 811449dc963fSmrg ;; 81154b0ead49Smrg 811649dc963fSmrglinux*) 811749dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 811849dc963fSmrg *Sun\ C*) 811949dc963fSmrg # Sun C++ 5.9 81204b0ead49Smrg 812149dc963fSmrg # The more standards-conforming stlport4 library is 812249dc963fSmrg # incompatible with the Cstd library. Avoid specifying 812349dc963fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 812449dc963fSmrg # -library=stlport4 depends on it. 812549dc963fSmrg case " $CXX $CXXFLAGS " in 812649dc963fSmrg *" -library=stlport4 "*) 812749dc963fSmrg solaris_use_stlport4=yes 812852b01e16Smrg ;; 812949dc963fSmrg esac 81304b0ead49Smrg 813149dc963fSmrg if test "$solaris_use_stlport4" != yes; then 813249dc963fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 813349dc963fSmrg fi 813449dc963fSmrg ;; 813549dc963fSmrg esac 813649dc963fSmrg ;; 81374b0ead49Smrg 813849dc963fSmrgsolaris*) 813949dc963fSmrg case $cc_basename in 81407aa89044Smrg CC* | sunCC*) 814149dc963fSmrg # The more standards-conforming stlport4 library is 814249dc963fSmrg # incompatible with the Cstd library. Avoid specifying 814349dc963fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 814449dc963fSmrg # -library=stlport4 depends on it. 814549dc963fSmrg case " $CXX $CXXFLAGS " in 814649dc963fSmrg *" -library=stlport4 "*) 814749dc963fSmrg solaris_use_stlport4=yes 814852b01e16Smrg ;; 814952b01e16Smrg esac 81504b0ead49Smrg 815149dc963fSmrg # Adding this requires a known-good setup of shared libraries for 815249dc963fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 815349dc963fSmrg # archive will be linked into the output, leading to subtle bugs. 815449dc963fSmrg if test "$solaris_use_stlport4" != yes; then 815549dc963fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 815649dc963fSmrg fi 815749dc963fSmrg ;; 815849dc963fSmrg esac 815949dc963fSmrg ;; 816049dc963fSmrgesac 816149dc963fSmrg]) 81624b0ead49Smrg 816349dc963fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 816449dc963fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 816549dc963fSmrgesac 816649dc963fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 816749dc963fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 816849dc963fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 816949dc963fSmrgfi 817049dc963fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 817149dc963fSmrg [The directories searched by this compiler when creating a shared library]) 817249dc963fSmrg_LT_TAGDECL([], [predep_objects], [1], 817349dc963fSmrg [Dependencies to place before and after the objects being linked to 817449dc963fSmrg create a shared library]) 817549dc963fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 817649dc963fSmrg_LT_TAGDECL([], [predeps], [1]) 817749dc963fSmrg_LT_TAGDECL([], [postdeps], [1]) 817849dc963fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 817949dc963fSmrg [The library search path used internally by the compiler when linking 818049dc963fSmrg a shared library]) 818149dc963fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 818249dc963fSmrg 818349dc963fSmrg 818449dc963fSmrg# _LT_LANG_F77_CONFIG([TAG]) 818549dc963fSmrg# -------------------------- 818649dc963fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 818749dc963fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 818849dc963fSmrg# to write the compiler configuration to `libtool'. 818949dc963fSmrgm4_defun([_LT_LANG_F77_CONFIG], 81907aa89044Smrg[AC_LANG_PUSH(Fortran 77) 81917aa89044Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 81927aa89044Smrg _lt_disable_F77=yes 81937aa89044Smrgfi 819449dc963fSmrg 819549dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 819649dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 819749dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 819849dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 819949dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 820049dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 820149dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 820249dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 820349dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 820449dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 820549dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 820649dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 820749dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 820849dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 820949dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 821049dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82117aa89044Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82127aa89044Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 821349dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 821449dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 821549dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 821649dc963fSmrg 821749dc963fSmrg# Source file extension for f77 test sources. 821849dc963fSmrgac_ext=f 821949dc963fSmrg 822049dc963fSmrg# Object file extension for compiled f77 test sources. 822149dc963fSmrgobjext=o 822249dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 822349dc963fSmrg 822449dc963fSmrg# No sense in running all these tests if we already determined that 822549dc963fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 822649dc963fSmrg# are currently assumed to apply to all compilers on this platform, 822749dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 822849dc963fSmrgif test "$_lt_disable_F77" != yes; then 822949dc963fSmrg # Code to be used in simple compile tests 823049dc963fSmrg lt_simple_compile_test_code="\ 823149dc963fSmrg subroutine t 823249dc963fSmrg return 823349dc963fSmrg end 823449dc963fSmrg" 823549dc963fSmrg 823649dc963fSmrg # Code to be used in simple link tests 823749dc963fSmrg lt_simple_link_test_code="\ 823849dc963fSmrg program t 823949dc963fSmrg end 824049dc963fSmrg" 824149dc963fSmrg 824249dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 824349dc963fSmrg _LT_TAG_COMPILER 824449dc963fSmrg 824549dc963fSmrg # save warnings/boilerplate of simple test code 824649dc963fSmrg _LT_COMPILER_BOILERPLATE 824749dc963fSmrg _LT_LINKER_BOILERPLATE 824849dc963fSmrg 824949dc963fSmrg # Allow CC to be a program name with arguments. 825049dc963fSmrg lt_save_CC="$CC" 825149dc963fSmrg lt_save_GCC=$GCC 82524e7590efSmrg lt_save_CFLAGS=$CFLAGS 825349dc963fSmrg CC=${F77-"f77"} 82544e7590efSmrg CFLAGS=$FFLAGS 825549dc963fSmrg compiler=$CC 825649dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 825749dc963fSmrg _LT_CC_BASENAME([$compiler]) 825849dc963fSmrg GCC=$G77 825949dc963fSmrg if test -n "$compiler"; then 826049dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 826149dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 826249dc963fSmrg 826349dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 826449dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 826549dc963fSmrg 826649dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 826749dc963fSmrg # are all built from PIC. 826849dc963fSmrg case $host_os in 826949dc963fSmrg aix3*) 827049dc963fSmrg test "$enable_shared" = yes && enable_static=no 827149dc963fSmrg if test -n "$RANLIB"; then 827249dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 827349dc963fSmrg postinstall_cmds='$RANLIB $lib' 827449dc963fSmrg fi 827552b01e16Smrg ;; 827649dc963fSmrg aix[[4-9]]*) 827749dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 827849dc963fSmrg test "$enable_shared" = yes && enable_static=no 827949dc963fSmrg fi 828052b01e16Smrg ;; 828149dc963fSmrg esac 828249dc963fSmrg AC_MSG_RESULT([$enable_shared]) 828349dc963fSmrg 828449dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 828549dc963fSmrg # Make sure either enable_shared or enable_static is yes. 828649dc963fSmrg test "$enable_shared" = yes || enable_static=yes 828749dc963fSmrg AC_MSG_RESULT([$enable_static]) 828849dc963fSmrg 828949dc963fSmrg _LT_TAGVAR(GCC, $1)="$G77" 829049dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 829149dc963fSmrg 829249dc963fSmrg ## CAVEAT EMPTOR: 829349dc963fSmrg ## There is no encapsulation within the following macros, do not change 829449dc963fSmrg ## the running order or otherwise move them around unless you know exactly 829549dc963fSmrg ## what you are doing... 829649dc963fSmrg _LT_COMPILER_PIC($1) 829749dc963fSmrg _LT_COMPILER_C_O($1) 829849dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 829949dc963fSmrg _LT_LINKER_SHLIBS($1) 830049dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 830149dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 830249dc963fSmrg 830349dc963fSmrg _LT_CONFIG($1) 830449dc963fSmrg fi # test -n "$compiler" 830549dc963fSmrg 830649dc963fSmrg GCC=$lt_save_GCC 830749dc963fSmrg CC="$lt_save_CC" 83084e7590efSmrg CFLAGS="$lt_save_CFLAGS" 830949dc963fSmrgfi # test "$_lt_disable_F77" != yes 831049dc963fSmrg 831149dc963fSmrgAC_LANG_POP 831249dc963fSmrg])# _LT_LANG_F77_CONFIG 831349dc963fSmrg 831449dc963fSmrg 831549dc963fSmrg# _LT_LANG_FC_CONFIG([TAG]) 831649dc963fSmrg# ------------------------- 831749dc963fSmrg# Ensure that the configuration variables for a Fortran compiler are 831849dc963fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 831949dc963fSmrg# to write the compiler configuration to `libtool'. 832049dc963fSmrgm4_defun([_LT_LANG_FC_CONFIG], 83217aa89044Smrg[AC_LANG_PUSH(Fortran) 83227aa89044Smrg 83237aa89044Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 83247aa89044Smrg _lt_disable_FC=yes 83257aa89044Smrgfi 832649dc963fSmrg 832749dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 832849dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 832949dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 833049dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 833149dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 833249dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 833349dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 833449dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 833549dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 833649dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 833749dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 833849dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 833949dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 834049dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 834149dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 834249dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83437aa89044Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83447aa89044Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 834549dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 834649dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 834749dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 834849dc963fSmrg 834949dc963fSmrg# Source file extension for fc test sources. 835049dc963fSmrgac_ext=${ac_fc_srcext-f} 835149dc963fSmrg 835249dc963fSmrg# Object file extension for compiled fc test sources. 835349dc963fSmrgobjext=o 835449dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 835549dc963fSmrg 835649dc963fSmrg# No sense in running all these tests if we already determined that 835749dc963fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 835849dc963fSmrg# are currently assumed to apply to all compilers on this platform, 835949dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 836049dc963fSmrgif test "$_lt_disable_FC" != yes; then 836149dc963fSmrg # Code to be used in simple compile tests 836249dc963fSmrg lt_simple_compile_test_code="\ 836349dc963fSmrg subroutine t 836449dc963fSmrg return 836549dc963fSmrg end 836649dc963fSmrg" 836749dc963fSmrg 836849dc963fSmrg # Code to be used in simple link tests 836949dc963fSmrg lt_simple_link_test_code="\ 837049dc963fSmrg program t 837149dc963fSmrg end 837249dc963fSmrg" 837349dc963fSmrg 837449dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 837549dc963fSmrg _LT_TAG_COMPILER 837649dc963fSmrg 837749dc963fSmrg # save warnings/boilerplate of simple test code 837849dc963fSmrg _LT_COMPILER_BOILERPLATE 837949dc963fSmrg _LT_LINKER_BOILERPLATE 838049dc963fSmrg 838149dc963fSmrg # Allow CC to be a program name with arguments. 838249dc963fSmrg lt_save_CC="$CC" 838349dc963fSmrg lt_save_GCC=$GCC 83844e7590efSmrg lt_save_CFLAGS=$CFLAGS 838549dc963fSmrg CC=${FC-"f95"} 83864e7590efSmrg CFLAGS=$FCFLAGS 838749dc963fSmrg compiler=$CC 838849dc963fSmrg GCC=$ac_cv_fc_compiler_gnu 838949dc963fSmrg 839049dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 839149dc963fSmrg _LT_CC_BASENAME([$compiler]) 839249dc963fSmrg 839349dc963fSmrg if test -n "$compiler"; then 839449dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 839549dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 839649dc963fSmrg 839749dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 839849dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 839949dc963fSmrg 840049dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 840149dc963fSmrg # are all built from PIC. 840249dc963fSmrg case $host_os in 840349dc963fSmrg aix3*) 840449dc963fSmrg test "$enable_shared" = yes && enable_static=no 840549dc963fSmrg if test -n "$RANLIB"; then 840649dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 840749dc963fSmrg postinstall_cmds='$RANLIB $lib' 840849dc963fSmrg fi 840952b01e16Smrg ;; 841049dc963fSmrg aix[[4-9]]*) 841149dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 841249dc963fSmrg test "$enable_shared" = yes && enable_static=no 841349dc963fSmrg fi 841449dc963fSmrg ;; 841549dc963fSmrg esac 841649dc963fSmrg AC_MSG_RESULT([$enable_shared]) 841749dc963fSmrg 841849dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 841949dc963fSmrg # Make sure either enable_shared or enable_static is yes. 842049dc963fSmrg test "$enable_shared" = yes || enable_static=yes 842149dc963fSmrg AC_MSG_RESULT([$enable_static]) 842249dc963fSmrg 842349dc963fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 842449dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 842549dc963fSmrg 842649dc963fSmrg ## CAVEAT EMPTOR: 842749dc963fSmrg ## There is no encapsulation within the following macros, do not change 842849dc963fSmrg ## the running order or otherwise move them around unless you know exactly 842949dc963fSmrg ## what you are doing... 843049dc963fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 843149dc963fSmrg _LT_COMPILER_PIC($1) 843249dc963fSmrg _LT_COMPILER_C_O($1) 843349dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 843449dc963fSmrg _LT_LINKER_SHLIBS($1) 843549dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 843649dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 843749dc963fSmrg 843849dc963fSmrg _LT_CONFIG($1) 843949dc963fSmrg fi # test -n "$compiler" 844049dc963fSmrg 844149dc963fSmrg GCC=$lt_save_GCC 84424e7590efSmrg CC=$lt_save_CC 84434e7590efSmrg CFLAGS=$lt_save_CFLAGS 844449dc963fSmrgfi # test "$_lt_disable_FC" != yes 844549dc963fSmrg 844649dc963fSmrgAC_LANG_POP 844749dc963fSmrg])# _LT_LANG_FC_CONFIG 844849dc963fSmrg 844949dc963fSmrg 845049dc963fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 845149dc963fSmrg# -------------------------- 845249dc963fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 845349dc963fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 845449dc963fSmrg# to write the compiler configuration to `libtool'. 845549dc963fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 845649dc963fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 845749dc963fSmrgAC_LANG_SAVE 845849dc963fSmrg 845949dc963fSmrg# Source file extension for Java test sources. 846049dc963fSmrgac_ext=java 846149dc963fSmrg 846249dc963fSmrg# Object file extension for compiled Java test sources. 846349dc963fSmrgobjext=o 846449dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 846549dc963fSmrg 846649dc963fSmrg# Code to be used in simple compile tests 846749dc963fSmrglt_simple_compile_test_code="class foo {}" 846849dc963fSmrg 846949dc963fSmrg# Code to be used in simple link tests 847049dc963fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 847149dc963fSmrg 847249dc963fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 847349dc963fSmrg_LT_TAG_COMPILER 847449dc963fSmrg 847549dc963fSmrg# save warnings/boilerplate of simple test code 847649dc963fSmrg_LT_COMPILER_BOILERPLATE 847749dc963fSmrg_LT_LINKER_BOILERPLATE 847849dc963fSmrg 847949dc963fSmrg# Allow CC to be a program name with arguments. 84804e7590efSmrglt_save_CC=$CC 84814e7590efSmrglt_save_CFLAGS=$CFLAGS 848249dc963fSmrglt_save_GCC=$GCC 848349dc963fSmrgGCC=yes 848449dc963fSmrgCC=${GCJ-"gcj"} 84854e7590efSmrgCFLAGS=$GCJFLAGS 848649dc963fSmrgcompiler=$CC 848749dc963fSmrg_LT_TAGVAR(compiler, $1)=$CC 848849dc963fSmrg_LT_TAGVAR(LD, $1)="$LD" 848949dc963fSmrg_LT_CC_BASENAME([$compiler]) 84904b0ead49Smrg 849149dc963fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 849249dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84934b0ead49Smrg 849449dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84957aa89044Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84967aa89044Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84974b0ead49Smrg 849849dc963fSmrgif test -n "$compiler"; then 849949dc963fSmrg _LT_COMPILER_NO_RTTI($1) 850049dc963fSmrg _LT_COMPILER_PIC($1) 850149dc963fSmrg _LT_COMPILER_C_O($1) 850249dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 850349dc963fSmrg _LT_LINKER_SHLIBS($1) 850449dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 85054b0ead49Smrg 850649dc963fSmrg _LT_CONFIG($1) 850749dc963fSmrgfi 85084b0ead49Smrg 850949dc963fSmrgAC_LANG_RESTORE 85104b0ead49Smrg 851149dc963fSmrgGCC=$lt_save_GCC 85124e7590efSmrgCC=$lt_save_CC 85134e7590efSmrgCFLAGS=$lt_save_CFLAGS 851449dc963fSmrg])# _LT_LANG_GCJ_CONFIG 85154b0ead49Smrg 85164b0ead49Smrg 85174e7590efSmrg# _LT_LANG_GO_CONFIG([TAG]) 85184e7590efSmrg# -------------------------- 85194e7590efSmrg# Ensure that the configuration variables for the GNU Go compiler 85204e7590efSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85214e7590efSmrg# to write the compiler configuration to `libtool'. 85224e7590efSmrgm4_defun([_LT_LANG_GO_CONFIG], 85234e7590efSmrg[AC_REQUIRE([LT_PROG_GO])dnl 85244e7590efSmrgAC_LANG_SAVE 85254e7590efSmrg 85264e7590efSmrg# Source file extension for Go test sources. 85274e7590efSmrgac_ext=go 85284e7590efSmrg 85294e7590efSmrg# Object file extension for compiled Go test sources. 85304e7590efSmrgobjext=o 85314e7590efSmrg_LT_TAGVAR(objext, $1)=$objext 85324e7590efSmrg 85334e7590efSmrg# Code to be used in simple compile tests 85344e7590efSmrglt_simple_compile_test_code="package main; func main() { }" 85354e7590efSmrg 85364e7590efSmrg# Code to be used in simple link tests 85374e7590efSmrglt_simple_link_test_code='package main; func main() { }' 85384e7590efSmrg 85394e7590efSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85404e7590efSmrg_LT_TAG_COMPILER 85414e7590efSmrg 85424e7590efSmrg# save warnings/boilerplate of simple test code 85434e7590efSmrg_LT_COMPILER_BOILERPLATE 85444e7590efSmrg_LT_LINKER_BOILERPLATE 85454e7590efSmrg 85464e7590efSmrg# Allow CC to be a program name with arguments. 85474e7590efSmrglt_save_CC=$CC 85484e7590efSmrglt_save_CFLAGS=$CFLAGS 85494e7590efSmrglt_save_GCC=$GCC 85504e7590efSmrgGCC=yes 85514e7590efSmrgCC=${GOC-"gccgo"} 85524e7590efSmrgCFLAGS=$GOFLAGS 85534e7590efSmrgcompiler=$CC 85544e7590efSmrg_LT_TAGVAR(compiler, $1)=$CC 85554e7590efSmrg_LT_TAGVAR(LD, $1)="$LD" 85564e7590efSmrg_LT_CC_BASENAME([$compiler]) 85574e7590efSmrg 85584e7590efSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 85594e7590efSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 85604e7590efSmrg 85614e7590efSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85624e7590efSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85634e7590efSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 85644e7590efSmrg 85654e7590efSmrgif test -n "$compiler"; then 85664e7590efSmrg _LT_COMPILER_NO_RTTI($1) 85674e7590efSmrg _LT_COMPILER_PIC($1) 85684e7590efSmrg _LT_COMPILER_C_O($1) 85694e7590efSmrg _LT_COMPILER_FILE_LOCKS($1) 85704e7590efSmrg _LT_LINKER_SHLIBS($1) 85714e7590efSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 85724e7590efSmrg 85734e7590efSmrg _LT_CONFIG($1) 85744e7590efSmrgfi 85754e7590efSmrg 85764e7590efSmrgAC_LANG_RESTORE 85774e7590efSmrg 85784e7590efSmrgGCC=$lt_save_GCC 85794e7590efSmrgCC=$lt_save_CC 85804e7590efSmrgCFLAGS=$lt_save_CFLAGS 85814e7590efSmrg])# _LT_LANG_GO_CONFIG 85824e7590efSmrg 85834e7590efSmrg 858449dc963fSmrg# _LT_LANG_RC_CONFIG([TAG]) 858549dc963fSmrg# ------------------------- 858649dc963fSmrg# Ensure that the configuration variables for the Windows resource compiler 858749dc963fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 858849dc963fSmrg# to write the compiler configuration to `libtool'. 858949dc963fSmrgm4_defun([_LT_LANG_RC_CONFIG], 859049dc963fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 859149dc963fSmrgAC_LANG_SAVE 85924b0ead49Smrg 859349dc963fSmrg# Source file extension for RC test sources. 859449dc963fSmrgac_ext=rc 85954b0ead49Smrg 859649dc963fSmrg# Object file extension for compiled RC test sources. 859749dc963fSmrgobjext=o 859849dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 85994b0ead49Smrg 860049dc963fSmrg# Code to be used in simple compile tests 860149dc963fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 860249dc963fSmrg 860349dc963fSmrg# Code to be used in simple link tests 860449dc963fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 860549dc963fSmrg 860649dc963fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 860749dc963fSmrg_LT_TAG_COMPILER 860849dc963fSmrg 860949dc963fSmrg# save warnings/boilerplate of simple test code 861049dc963fSmrg_LT_COMPILER_BOILERPLATE 861149dc963fSmrg_LT_LINKER_BOILERPLATE 861249dc963fSmrg 861349dc963fSmrg# Allow CC to be a program name with arguments. 861449dc963fSmrglt_save_CC="$CC" 86154e7590efSmrglt_save_CFLAGS=$CFLAGS 861649dc963fSmrglt_save_GCC=$GCC 861749dc963fSmrgGCC= 861849dc963fSmrgCC=${RC-"windres"} 86194e7590efSmrgCFLAGS= 862049dc963fSmrgcompiler=$CC 862149dc963fSmrg_LT_TAGVAR(compiler, $1)=$CC 862249dc963fSmrg_LT_CC_BASENAME([$compiler]) 862349dc963fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 862449dc963fSmrg 862549dc963fSmrgif test -n "$compiler"; then 862649dc963fSmrg : 862749dc963fSmrg _LT_CONFIG($1) 862852b01e16Smrgfi 86294b0ead49Smrg 863049dc963fSmrgGCC=$lt_save_GCC 863149dc963fSmrgAC_LANG_RESTORE 86324e7590efSmrgCC=$lt_save_CC 86334e7590efSmrgCFLAGS=$lt_save_CFLAGS 863449dc963fSmrg])# _LT_LANG_RC_CONFIG 863549dc963fSmrg 863649dc963fSmrg 863749dc963fSmrg# LT_PROG_GCJ 863849dc963fSmrg# ----------- 863949dc963fSmrgAC_DEFUN([LT_PROG_GCJ], 864049dc963fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864149dc963fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864249dc963fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 864349dc963fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 864449dc963fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 864552b01e16Smrg]) 86464b0ead49Smrg 864749dc963fSmrg# Old name: 864849dc963fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 864949dc963fSmrgdnl aclocal-1.4 backwards compatibility: 865049dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 86514b0ead49Smrg 865252b01e16Smrg 86534e7590efSmrg# LT_PROG_GO 86544e7590efSmrg# ---------- 86554e7590efSmrgAC_DEFUN([LT_PROG_GO], 86564e7590efSmrg[AC_CHECK_TOOL(GOC, gccgo,) 86574e7590efSmrg]) 86584e7590efSmrg 86594e7590efSmrg 866049dc963fSmrg# LT_PROG_RC 866149dc963fSmrg# ---------- 866249dc963fSmrgAC_DEFUN([LT_PROG_RC], 866349dc963fSmrg[AC_CHECK_TOOL(RC, windres,) 866449dc963fSmrg]) 86654b0ead49Smrg 866649dc963fSmrg# Old name: 866749dc963fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 866849dc963fSmrgdnl aclocal-1.4 backwards compatibility: 866949dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 86704b0ead49Smrg 86714b0ead49Smrg 867249dc963fSmrg# _LT_DECL_EGREP 867349dc963fSmrg# -------------- 867449dc963fSmrg# If we don't have a new enough Autoconf to choose the best grep 867549dc963fSmrg# available, choose the one first in the user's PATH. 867649dc963fSmrgm4_defun([_LT_DECL_EGREP], 867749dc963fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 867849dc963fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 867949dc963fSmrgtest -z "$GREP" && GREP=grep 868049dc963fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 868149dc963fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 868249dc963fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 868349dc963fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 868449dc963fSmrgAC_SUBST([GREP]) 868549dc963fSmrg]) 86864b0ead49Smrg 86874b0ead49Smrg 868849dc963fSmrg# _LT_DECL_OBJDUMP 868949dc963fSmrg# -------------- 869049dc963fSmrg# If we don't have a new enough Autoconf to choose the best objdump 869149dc963fSmrg# available, choose the one first in the user's PATH. 869249dc963fSmrgm4_defun([_LT_DECL_OBJDUMP], 869349dc963fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 869449dc963fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 869549dc963fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 869649dc963fSmrgAC_SUBST([OBJDUMP]) 869749dc963fSmrg]) 86984b0ead49Smrg 86994e7590efSmrg# _LT_DECL_DLLTOOL 87004e7590efSmrg# ---------------- 87014e7590efSmrg# Ensure DLLTOOL variable is set. 87024e7590efSmrgm4_defun([_LT_DECL_DLLTOOL], 87034e7590efSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 87044e7590efSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 87054e7590efSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 87064e7590efSmrgAC_SUBST([DLLTOOL]) 87074e7590efSmrg]) 87084b0ead49Smrg 870949dc963fSmrg# _LT_DECL_SED 871049dc963fSmrg# ------------ 871149dc963fSmrg# Check for a fully-functional sed program, that truncates 871249dc963fSmrg# as few characters as possible. Prefer GNU sed if found. 871349dc963fSmrgm4_defun([_LT_DECL_SED], 871449dc963fSmrg[AC_PROG_SED 871549dc963fSmrgtest -z "$SED" && SED=sed 871649dc963fSmrgXsed="$SED -e 1s/^X//" 871749dc963fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 871849dc963fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 871949dc963fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 872049dc963fSmrg])# _LT_DECL_SED 872149dc963fSmrg 872249dc963fSmrgm4_ifndef([AC_PROG_SED], [ 872349dc963fSmrg# NOTE: This macro has been submitted for inclusion into # 872449dc963fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 872549dc963fSmrg# a released version of Autoconf we should remove this # 872649dc963fSmrg# macro and use it instead. # 872749dc963fSmrg 872849dc963fSmrgm4_defun([AC_PROG_SED], 872949dc963fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 873049dc963fSmrgAC_CACHE_VAL(lt_cv_path_SED, 873149dc963fSmrg[# Loop through the user's path and test for sed and gsed. 873249dc963fSmrg# Then use that list of sed's as ones to test for truncation. 873349dc963fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 873449dc963fSmrgfor as_dir in $PATH 873549dc963fSmrgdo 873649dc963fSmrg IFS=$as_save_IFS 873749dc963fSmrg test -z "$as_dir" && as_dir=. 873849dc963fSmrg for lt_ac_prog in sed gsed; do 873949dc963fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 874049dc963fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 874149dc963fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 874252b01e16Smrg fi 874349dc963fSmrg done 874449dc963fSmrg done 874549dc963fSmrgdone 874649dc963fSmrgIFS=$as_save_IFS 874749dc963fSmrglt_ac_max=0 874849dc963fSmrglt_ac_count=0 874949dc963fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 875049dc963fSmrg# along with /bin/sed that truncates output. 875149dc963fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 875249dc963fSmrg test ! -f $lt_ac_sed && continue 875349dc963fSmrg cat /dev/null > conftest.in 875449dc963fSmrg lt_ac_count=0 875549dc963fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 875649dc963fSmrg # Check for GNU sed and select it if it is found. 875749dc963fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 875849dc963fSmrg lt_cv_path_SED=$lt_ac_sed 875949dc963fSmrg break 876049dc963fSmrg fi 876149dc963fSmrg while true; do 876249dc963fSmrg cat conftest.in conftest.in >conftest.tmp 876349dc963fSmrg mv conftest.tmp conftest.in 876449dc963fSmrg cp conftest.in conftest.nl 876549dc963fSmrg echo >>conftest.nl 876649dc963fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 876749dc963fSmrg cmp -s conftest.out conftest.nl || break 876849dc963fSmrg # 10000 chars as input seems more than enough 876949dc963fSmrg test $lt_ac_count -gt 10 && break 877049dc963fSmrg lt_ac_count=`expr $lt_ac_count + 1` 877149dc963fSmrg if test $lt_ac_count -gt $lt_ac_max; then 877249dc963fSmrg lt_ac_max=$lt_ac_count 877349dc963fSmrg lt_cv_path_SED=$lt_ac_sed 877449dc963fSmrg fi 877549dc963fSmrg done 877649dc963fSmrgdone 877749dc963fSmrg]) 877849dc963fSmrgSED=$lt_cv_path_SED 877949dc963fSmrgAC_SUBST([SED]) 878049dc963fSmrgAC_MSG_RESULT([$SED]) 878149dc963fSmrg])#AC_PROG_SED 878249dc963fSmrg])#m4_ifndef 878349dc963fSmrg 878449dc963fSmrg# Old name: 878549dc963fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 878649dc963fSmrgdnl aclocal-1.4 backwards compatibility: 878749dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 878849dc963fSmrg 878949dc963fSmrg 879049dc963fSmrg# _LT_CHECK_SHELL_FEATURES 879149dc963fSmrg# ------------------------ 879249dc963fSmrg# Find out whether the shell is Bourne or XSI compatible, 879349dc963fSmrg# or has some other useful features. 879449dc963fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 879549dc963fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 879649dc963fSmrg# Try some XSI features 879749dc963fSmrgxsi_shell=no 879849dc963fSmrg( _lt_dummy="a/b/c" 87994e7590efSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 88004e7590efSmrg = c,a/b,b/c, \ 880149dc963fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 880249dc963fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 880349dc963fSmrg && xsi_shell=yes 880449dc963fSmrgAC_MSG_RESULT([$xsi_shell]) 880549dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 880649dc963fSmrg 880749dc963fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 880849dc963fSmrglt_shell_append=no 880949dc963fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 881049dc963fSmrg >/dev/null 2>&1 \ 881149dc963fSmrg && lt_shell_append=yes 881249dc963fSmrgAC_MSG_RESULT([$lt_shell_append]) 881349dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 881449dc963fSmrg 881549dc963fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 881649dc963fSmrg lt_unset=unset 881749dc963fSmrgelse 881849dc963fSmrg lt_unset=false 881949dc963fSmrgfi 882049dc963fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 882149dc963fSmrg 882249dc963fSmrg# test EBCDIC or ASCII 882349dc963fSmrgcase `echo X|tr X '\101'` in 882449dc963fSmrg A) # ASCII based system 882549dc963fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 882649dc963fSmrg lt_SP2NL='tr \040 \012' 882749dc963fSmrg lt_NL2SP='tr \015\012 \040\040' 882849dc963fSmrg ;; 882949dc963fSmrg *) # EBCDIC based system 883049dc963fSmrg lt_SP2NL='tr \100 \n' 883149dc963fSmrg lt_NL2SP='tr \r\n \100\100' 883249dc963fSmrg ;; 883349dc963fSmrgesac 883449dc963fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 883549dc963fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 883649dc963fSmrg])# _LT_CHECK_SHELL_FEATURES 88374b0ead49Smrg 88384b0ead49Smrg 88394e7590efSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 88404e7590efSmrg# ------------------------------------------------------ 88414e7590efSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 88424e7590efSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 88434e7590efSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 88444e7590efSmrg[dnl { 88454e7590efSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 88464e7590efSmrg$1 ()\ 88474e7590efSmrg{\ 88484e7590efSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 88494e7590efSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 88504e7590efSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 88514e7590efSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 88524e7590efSmrgtest 0 -eq $? || _lt_function_replace_fail=: 88534e7590efSmrg]) 88544b0ead49Smrg 88554b0ead49Smrg 88564e7590efSmrg# _LT_PROG_REPLACE_SHELLFNS 88574e7590efSmrg# ------------------------- 88584e7590efSmrg# Replace existing portable implementations of several shell functions with 88594e7590efSmrg# equivalent extended shell implementations where those features are available.. 88604e7590efSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 88614e7590efSmrg[if test x"$xsi_shell" = xyes; then 88624e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 88634e7590efSmrg case ${1} in 88644e7590efSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88654e7590efSmrg * ) func_dirname_result="${3}" ;; 88664e7590efSmrg esac]) 88674e7590efSmrg 88684e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 88694e7590efSmrg func_basename_result="${1##*/}"]) 88704e7590efSmrg 88714e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 88724e7590efSmrg case ${1} in 88734e7590efSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88744e7590efSmrg * ) func_dirname_result="${3}" ;; 88754e7590efSmrg esac 88764e7590efSmrg func_basename_result="${1##*/}"]) 88774b0ead49Smrg 88784e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 88794e7590efSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 88804e7590efSmrg # positional parameters, so assign one to ordinary parameter first. 88814e7590efSmrg func_stripname_result=${3} 88824e7590efSmrg func_stripname_result=${func_stripname_result#"${1}"} 88834e7590efSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 88844b0ead49Smrg 88854e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 88864e7590efSmrg func_split_long_opt_name=${1%%=*} 88874e7590efSmrg func_split_long_opt_arg=${1#*=}]) 888849dc963fSmrg 88894e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 88904e7590efSmrg func_split_short_opt_arg=${1#??} 88914e7590efSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 88924b0ead49Smrg 88934e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 88944e7590efSmrg case ${1} in 88954e7590efSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 88964e7590efSmrg *) func_lo2o_result=${1} ;; 88974e7590efSmrg esac]) 88984b0ead49Smrg 88994e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 89004b0ead49Smrg 89014e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 89024b0ead49Smrg 89034e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 89044e7590efSmrgfi 89054b0ead49Smrg 89064e7590efSmrgif test x"$lt_shell_append" = xyes; then 89074e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 89084b0ead49Smrg 89094e7590efSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 89104e7590efSmrg func_quote_for_eval "${2}" 89114e7590efSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 89124e7590efSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 89134b0ead49Smrg 89144e7590efSmrg # Save a `func_append' function call where possible by direct use of '+=' 89154e7590efSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 89164e7590efSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89174e7590efSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89184e7590efSmrg test 0 -eq $? || _lt_function_replace_fail=: 89194e7590efSmrgelse 89204e7590efSmrg # Save a `func_append' function call even when '+=' is not available 89214e7590efSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 89224e7590efSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89234e7590efSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89244e7590efSmrg test 0 -eq $? || _lt_function_replace_fail=: 89254e7590efSmrgfi 89264b0ead49Smrg 89274e7590efSmrgif test x"$_lt_function_replace_fail" = x":"; then 89284e7590efSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 89294e7590efSmrgfi 89304e7590efSmrg]) 89314b0ead49Smrg 89324e7590efSmrg# _LT_PATH_CONVERSION_FUNCTIONS 89334e7590efSmrg# ----------------------------- 89344e7590efSmrg# Determine which file name conversion functions should be used by 89354e7590efSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 89364e7590efSmrg# for certain cross-compile configurations and native mingw. 89374e7590efSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 89384e7590efSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 89394e7590efSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 89404e7590efSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 89414e7590efSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 89424e7590efSmrg[case $host in 89434e7590efSmrg *-*-mingw* ) 89444e7590efSmrg case $build in 89454e7590efSmrg *-*-mingw* ) # actually msys 89464e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 89474e7590efSmrg ;; 89484e7590efSmrg *-*-cygwin* ) 89494e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 89504e7590efSmrg ;; 89514e7590efSmrg * ) # otherwise, assume *nix 89524e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 89534e7590efSmrg ;; 89544e7590efSmrg esac 895549dc963fSmrg ;; 89564e7590efSmrg *-*-cygwin* ) 89574e7590efSmrg case $build in 89584e7590efSmrg *-*-mingw* ) # actually msys 89594e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 89604e7590efSmrg ;; 89614e7590efSmrg *-*-cygwin* ) 89624e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89634e7590efSmrg ;; 89644e7590efSmrg * ) # otherwise, assume *nix 89654e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 89664e7590efSmrg ;; 89674e7590efSmrg esac 896849dc963fSmrg ;; 89694e7590efSmrg * ) # unhandled hosts (and "normal" native builds) 89704e7590efSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89714e7590efSmrg ;; 89724e7590efSmrgesac 89734e7590efSmrg]) 89744e7590efSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 89754e7590efSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 89764e7590efSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 89774e7590efSmrg [0], [convert $build file names to $host format])dnl 89784e7590efSmrg 89794e7590efSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 89804e7590efSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 89814e7590efSmrg[#assume ordinary cross tools, or native build. 89824e7590efSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 89834e7590efSmrgcase $host in 89844e7590efSmrg *-*-mingw* ) 89854e7590efSmrg case $build in 89864e7590efSmrg *-*-mingw* ) # actually msys 89874e7590efSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 89884e7590efSmrg ;; 89894e7590efSmrg esac 89904e7590efSmrg ;; 89914e7590efSmrgesac 899249dc963fSmrg]) 89934e7590efSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 89944e7590efSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 89954e7590efSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 89964e7590efSmrg [0], [convert $build files to toolchain format])dnl 89974e7590efSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 89984b0ead49Smrg 899949dc963fSmrg# Helper functions for option handling. -*- Autoconf -*- 900049dc963fSmrg# 90017aa89044Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 90027aa89044Smrg# Inc. 900349dc963fSmrg# Written by Gary V. Vaughan, 2004 900449dc963fSmrg# 900549dc963fSmrg# This file is free software; the Free Software Foundation gives 900649dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 900749dc963fSmrg# modifications, as long as this notice is preserved. 90084b0ead49Smrg 90097aa89044Smrg# serial 7 ltoptions.m4 90104b0ead49Smrg 901149dc963fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 901249dc963fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 901349dc963fSmrg 901449dc963fSmrg 901549dc963fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 901649dc963fSmrg# ------------------------------------------ 901749dc963fSmrgm4_define([_LT_MANGLE_OPTION], 901849dc963fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 901949dc963fSmrg 902049dc963fSmrg 902149dc963fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 902249dc963fSmrg# --------------------------------------- 902349dc963fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 902449dc963fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 902549dc963fSmrg# saved as a flag. 902649dc963fSmrgm4_define([_LT_SET_OPTION], 902749dc963fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 902849dc963fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 902949dc963fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 903049dc963fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 903149dc963fSmrg]) 903249dc963fSmrg 903349dc963fSmrg 903449dc963fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 903549dc963fSmrg# ------------------------------------------------------------ 903649dc963fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 903749dc963fSmrgm4_define([_LT_IF_OPTION], 903849dc963fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 903949dc963fSmrg 904049dc963fSmrg 904149dc963fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 904249dc963fSmrg# ------------------------------------------------------- 904349dc963fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 904449dc963fSmrg# are set. 904549dc963fSmrgm4_define([_LT_UNLESS_OPTIONS], 904649dc963fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 904749dc963fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 904849dc963fSmrg [m4_define([$0_found])])])[]dnl 904949dc963fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 905049dc963fSmrg])[]dnl 905149dc963fSmrg]) 90524b0ead49Smrg 90534b0ead49Smrg 905449dc963fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 905549dc963fSmrg# ---------------------------------------- 905649dc963fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 905749dc963fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 905849dc963fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 905949dc963fSmrg# the unknown option and exit. 906049dc963fSmrgm4_defun([_LT_SET_OPTIONS], 906149dc963fSmrg[# Set options 906249dc963fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 906349dc963fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 906449dc963fSmrg 906549dc963fSmrgm4_if([$1],[LT_INIT],[ 906649dc963fSmrg dnl 906749dc963fSmrg dnl Simply set some default values (i.e off) if boolean options were not 906849dc963fSmrg dnl specified: 906949dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 907049dc963fSmrg ]) 907149dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 907249dc963fSmrg ]) 907349dc963fSmrg dnl 907449dc963fSmrg dnl If no reference was made to various pairs of opposing options, then 907549dc963fSmrg dnl we run the default mode handler for the pair. For example, if neither 907649dc963fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 907749dc963fSmrg dnl archives by default: 907849dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 907949dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 908049dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 908149dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 908249dc963fSmrg [_LT_ENABLE_FAST_INSTALL]) 908349dc963fSmrg ]) 908449dc963fSmrg])# _LT_SET_OPTIONS 90854b0ead49Smrg 90864b0ead49Smrg 90874b0ead49Smrg 908849dc963fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 908949dc963fSmrg# ----------------------------------------- 909049dc963fSmrgm4_define([_LT_MANGLE_DEFUN], 909149dc963fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 90924b0ead49Smrg 90934b0ead49Smrg 909449dc963fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 909549dc963fSmrg# ----------------------------------------------- 909649dc963fSmrgm4_define([LT_OPTION_DEFINE], 909749dc963fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 909849dc963fSmrg])# LT_OPTION_DEFINE 90994b0ead49Smrg 91004b0ead49Smrg 910149dc963fSmrg# dlopen 910249dc963fSmrg# ------ 910349dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 910449dc963fSmrg]) 91054b0ead49Smrg 910649dc963fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 910749dc963fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 910849dc963fSmrgAC_DIAGNOSE([obsolete], 910949dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 911049dc963fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 911149dc963fSmrg]) 91124b0ead49Smrg 911349dc963fSmrgdnl aclocal-1.4 backwards compatibility: 911449dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 91154b0ead49Smrg 91164b0ead49Smrg 911749dc963fSmrg# win32-dll 911849dc963fSmrg# --------- 911949dc963fSmrg# Declare package support for building win32 dll's. 912049dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 912149dc963fSmrg[enable_win32_dll=yes 91224b0ead49Smrg 912349dc963fSmrgcase $host in 91247aa89044Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 912549dc963fSmrg AC_CHECK_TOOL(AS, as, false) 912649dc963fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 912749dc963fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 912849dc963fSmrg ;; 912949dc963fSmrgesac 91304b0ead49Smrg 913149dc963fSmrgtest -z "$AS" && AS=as 91327aa89044Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 91334b0ead49Smrg 913449dc963fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 91357aa89044Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 91364b0ead49Smrg 913749dc963fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 91387aa89044Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 913949dc963fSmrg])# win32-dll 91404b0ead49Smrg 914149dc963fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 914249dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 914349dc963fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 914449dc963fSmrgAC_DIAGNOSE([obsolete], 914549dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 914649dc963fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 914749dc963fSmrg]) 914852b01e16Smrg 914949dc963fSmrgdnl aclocal-1.4 backwards compatibility: 915049dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 91514b0ead49Smrg 91524b0ead49Smrg 915349dc963fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 915449dc963fSmrg# ---------------------------- 915549dc963fSmrg# implement the --enable-shared flag, and supports the `shared' and 915649dc963fSmrg# `disable-shared' LT_INIT options. 915749dc963fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 915849dc963fSmrgm4_define([_LT_ENABLE_SHARED], 915949dc963fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 916049dc963fSmrgAC_ARG_ENABLE([shared], 916149dc963fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 916249dc963fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 916349dc963fSmrg [p=${PACKAGE-default} 916449dc963fSmrg case $enableval in 916549dc963fSmrg yes) enable_shared=yes ;; 916649dc963fSmrg no) enable_shared=no ;; 916749dc963fSmrg *) 916849dc963fSmrg enable_shared=no 916949dc963fSmrg # Look at the argument we got. We use all the common list separators. 917049dc963fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 917149dc963fSmrg for pkg in $enableval; do 917249dc963fSmrg IFS="$lt_save_ifs" 917349dc963fSmrg if test "X$pkg" = "X$p"; then 917449dc963fSmrg enable_shared=yes 917549dc963fSmrg fi 917649dc963fSmrg done 917749dc963fSmrg IFS="$lt_save_ifs" 917852b01e16Smrg ;; 917949dc963fSmrg esac], 918049dc963fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 91814b0ead49Smrg 918249dc963fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 918349dc963fSmrg [Whether or not to build shared libraries]) 918449dc963fSmrg])# _LT_ENABLE_SHARED 91854b0ead49Smrg 918649dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 918749dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 91884b0ead49Smrg 918949dc963fSmrg# Old names: 919049dc963fSmrgAC_DEFUN([AC_ENABLE_SHARED], 919149dc963fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 919249dc963fSmrg]) 91934b0ead49Smrg 919449dc963fSmrgAC_DEFUN([AC_DISABLE_SHARED], 919549dc963fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 919649dc963fSmrg]) 91974b0ead49Smrg 919849dc963fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 919949dc963fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 920049dc963fSmrg 920149dc963fSmrgdnl aclocal-1.4 backwards compatibility: 920249dc963fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 920349dc963fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 92044b0ead49Smrg 92054b0ead49Smrg 92064b0ead49Smrg 920749dc963fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 920849dc963fSmrg# ---------------------------- 920949dc963fSmrg# implement the --enable-static flag, and support the `static' and 921049dc963fSmrg# `disable-static' LT_INIT options. 921149dc963fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 921249dc963fSmrgm4_define([_LT_ENABLE_STATIC], 921349dc963fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 921449dc963fSmrgAC_ARG_ENABLE([static], 921549dc963fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 921649dc963fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 921749dc963fSmrg [p=${PACKAGE-default} 921849dc963fSmrg case $enableval in 921949dc963fSmrg yes) enable_static=yes ;; 922049dc963fSmrg no) enable_static=no ;; 922152b01e16Smrg *) 922249dc963fSmrg enable_static=no 922349dc963fSmrg # Look at the argument we got. We use all the common list separators. 922449dc963fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 922549dc963fSmrg for pkg in $enableval; do 922649dc963fSmrg IFS="$lt_save_ifs" 922749dc963fSmrg if test "X$pkg" = "X$p"; then 922849dc963fSmrg enable_static=yes 922949dc963fSmrg fi 923049dc963fSmrg done 923149dc963fSmrg IFS="$lt_save_ifs" 923252b01e16Smrg ;; 923349dc963fSmrg esac], 923449dc963fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 92354b0ead49Smrg 923649dc963fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 923749dc963fSmrg [Whether or not to build static libraries]) 923849dc963fSmrg])# _LT_ENABLE_STATIC 92394b0ead49Smrg 924049dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 924149dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 92424b0ead49Smrg 924349dc963fSmrg# Old names: 924449dc963fSmrgAC_DEFUN([AC_ENABLE_STATIC], 924549dc963fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 924649dc963fSmrg]) 924752b01e16Smrg 924849dc963fSmrgAC_DEFUN([AC_DISABLE_STATIC], 924949dc963fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 925049dc963fSmrg]) 925149dc963fSmrg 925249dc963fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 925349dc963fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 925449dc963fSmrg 92554e7590efSmrgdnl aclocal-1.4 backwards compatibility: 92564e7590efSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 92574e7590efSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 92584e7590efSmrg 92594e7590efSmrg 92604e7590efSmrg 92614e7590efSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 92624e7590efSmrg# ---------------------------------- 92634e7590efSmrg# implement the --enable-fast-install flag, and support the `fast-install' 92644e7590efSmrg# and `disable-fast-install' LT_INIT options. 92654e7590efSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92664e7590efSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 92674e7590efSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 92684e7590efSmrgAC_ARG_ENABLE([fast-install], 92694e7590efSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 92704e7590efSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 92714e7590efSmrg [p=${PACKAGE-default} 92724e7590efSmrg case $enableval in 92734e7590efSmrg yes) enable_fast_install=yes ;; 92744e7590efSmrg no) enable_fast_install=no ;; 92754e7590efSmrg *) 92764e7590efSmrg enable_fast_install=no 92774e7590efSmrg # Look at the argument we got. We use all the common list separators. 92784e7590efSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92794e7590efSmrg for pkg in $enableval; do 92804e7590efSmrg IFS="$lt_save_ifs" 92814e7590efSmrg if test "X$pkg" = "X$p"; then 92824e7590efSmrg enable_fast_install=yes 92834e7590efSmrg fi 92844e7590efSmrg done 92854e7590efSmrg IFS="$lt_save_ifs" 92864e7590efSmrg ;; 92874e7590efSmrg esac], 92884e7590efSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 92894e7590efSmrg 92904e7590efSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 92914e7590efSmrg [Whether or not to optimize for fast installation])dnl 92924e7590efSmrg])# _LT_ENABLE_FAST_INSTALL 92934e7590efSmrg 92944e7590efSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 92954e7590efSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 92964e7590efSmrg 92974e7590efSmrg# Old names: 92984e7590efSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 92994e7590efSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 93004e7590efSmrgAC_DIAGNOSE([obsolete], 93014e7590efSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93024e7590efSmrgthe `fast-install' option into LT_INIT's first parameter.]) 93034e7590efSmrg]) 93044e7590efSmrg 93054e7590efSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 93064e7590efSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 93074e7590efSmrgAC_DIAGNOSE([obsolete], 93084e7590efSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93094e7590efSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 93104e7590efSmrg]) 93114e7590efSmrg 93124e7590efSmrgdnl aclocal-1.4 backwards compatibility: 93134e7590efSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 93144e7590efSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93154e7590efSmrg 93164e7590efSmrg 93174e7590efSmrg# _LT_WITH_PIC([MODE]) 93184e7590efSmrg# -------------------- 93194e7590efSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 93204e7590efSmrg# LT_INIT options. 93214e7590efSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 93224e7590efSmrgm4_define([_LT_WITH_PIC], 93234e7590efSmrg[AC_ARG_WITH([pic], 93244e7590efSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 93254e7590efSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 93264e7590efSmrg [lt_p=${PACKAGE-default} 93274e7590efSmrg case $withval in 93284e7590efSmrg yes|no) pic_mode=$withval ;; 93294e7590efSmrg *) 93304e7590efSmrg pic_mode=default 93314e7590efSmrg # Look at the argument we got. We use all the common list separators. 93324e7590efSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93334e7590efSmrg for lt_pkg in $withval; do 93344e7590efSmrg IFS="$lt_save_ifs" 93354e7590efSmrg if test "X$lt_pkg" = "X$lt_p"; then 93364e7590efSmrg pic_mode=yes 93374e7590efSmrg fi 93384e7590efSmrg done 93394e7590efSmrg IFS="$lt_save_ifs" 93404e7590efSmrg ;; 93414e7590efSmrg esac], 93424e7590efSmrg [pic_mode=default]) 93434e7590efSmrg 93444e7590efSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93454e7590efSmrg 93464e7590efSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 93474e7590efSmrg])# _LT_WITH_PIC 93484e7590efSmrg 93494e7590efSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 93504e7590efSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 93514e7590efSmrg 93524e7590efSmrg# Old name: 93534e7590efSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 93544e7590efSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 93554e7590efSmrgAC_DIAGNOSE([obsolete], 93564e7590efSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 93574e7590efSmrgput the `pic-only' option into LT_INIT's first parameter.]) 93584e7590efSmrg]) 93594e7590efSmrg 93604e7590efSmrgdnl aclocal-1.4 backwards compatibility: 93614e7590efSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 93624e7590efSmrg 93634e7590efSmrg 93644e7590efSmrgm4_define([_LTDL_MODE], []) 93654e7590efSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 93664e7590efSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 93674e7590efSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 93684e7590efSmrg [m4_define([_LTDL_MODE], [recursive])]) 93694e7590efSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 93704e7590efSmrg [m4_define([_LTDL_MODE], [subproject])]) 93714e7590efSmrg 93724e7590efSmrgm4_define([_LTDL_TYPE], []) 93734e7590efSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 93744e7590efSmrg [m4_define([_LTDL_TYPE], [installable])]) 93754e7590efSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 93764e7590efSmrg [m4_define([_LTDL_TYPE], [convenience])]) 93774e7590efSmrg 93784e7590efSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 93794e7590efSmrg# 93804e7590efSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 93814e7590efSmrg# Written by Gary V. Vaughan, 2004 93824e7590efSmrg# 93834e7590efSmrg# This file is free software; the Free Software Foundation gives 93844e7590efSmrg# unlimited permission to copy and/or distribute it, with or without 93854e7590efSmrg# modifications, as long as this notice is preserved. 93864e7590efSmrg 93874e7590efSmrg# serial 6 ltsugar.m4 93884e7590efSmrg 93894e7590efSmrg# This is to help aclocal find these macros, as it can't see m4_define. 93904e7590efSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 93914e7590efSmrg 93924e7590efSmrg 93934e7590efSmrg# lt_join(SEP, ARG1, [ARG2...]) 93944e7590efSmrg# ----------------------------- 93954e7590efSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 93964e7590efSmrg# associated separator. 93974e7590efSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 93984e7590efSmrg# versions in m4sugar had bugs. 93994e7590efSmrgm4_define([lt_join], 94004e7590efSmrg[m4_if([$#], [1], [], 94014e7590efSmrg [$#], [2], [[$2]], 94024e7590efSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 94034e7590efSmrgm4_define([_lt_join], 94044e7590efSmrg[m4_if([$#$2], [2], [], 94054e7590efSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 94064e7590efSmrg 94074e7590efSmrg 94084e7590efSmrg# lt_car(LIST) 94094e7590efSmrg# lt_cdr(LIST) 94104e7590efSmrg# ------------ 94114e7590efSmrg# Manipulate m4 lists. 94124e7590efSmrg# These macros are necessary as long as will still need to support 94134e7590efSmrg# Autoconf-2.59 which quotes differently. 94144e7590efSmrgm4_define([lt_car], [[$1]]) 94154e7590efSmrgm4_define([lt_cdr], 94164e7590efSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 94174e7590efSmrg [$#], 1, [], 94184e7590efSmrg [m4_dquote(m4_shift($@))])]) 94194e7590efSmrgm4_define([lt_unquote], $1) 94204e7590efSmrg 94214e7590efSmrg 94224e7590efSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 94234e7590efSmrg# ------------------------------------------ 94244e7590efSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 94254e7590efSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 94264e7590efSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 94274e7590efSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 94284e7590efSmrg# than defined and empty). 94294e7590efSmrg# 94304e7590efSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 94314e7590efSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 94324e7590efSmrgm4_define([lt_append], 94334e7590efSmrg[m4_define([$1], 94344e7590efSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 94354e7590efSmrg 94364e7590efSmrg 94374e7590efSmrg 94384e7590efSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 94394e7590efSmrg# ---------------------------------------------------------- 94404e7590efSmrg# Produce a SEP delimited list of all paired combinations of elements of 94414e7590efSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 94424e7590efSmrg# has the form PREFIXmINFIXSUFFIXn. 94434e7590efSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 94444e7590efSmrgm4_define([lt_combine], 94454e7590efSmrg[m4_if(m4_eval([$# > 3]), [1], 94464e7590efSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 94474e7590efSmrg[[m4_foreach([_Lt_prefix], [$2], 94484e7590efSmrg [m4_foreach([_Lt_suffix], 94494e7590efSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 94504e7590efSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 94514e7590efSmrg 94524e7590efSmrg 94534e7590efSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 94544e7590efSmrg# ----------------------------------------------------------------------- 94554e7590efSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 94564e7590efSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 94574e7590efSmrgm4_define([lt_if_append_uniq], 94584e7590efSmrg[m4_ifdef([$1], 94594e7590efSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 94604e7590efSmrg [lt_append([$1], [$2], [$3])$4], 94614e7590efSmrg [$5])], 94624e7590efSmrg [lt_append([$1], [$2], [$3])$4])]) 94634e7590efSmrg 94644e7590efSmrg 94654e7590efSmrg# lt_dict_add(DICT, KEY, VALUE) 94664e7590efSmrg# ----------------------------- 94674e7590efSmrgm4_define([lt_dict_add], 94684e7590efSmrg[m4_define([$1($2)], [$3])]) 94694e7590efSmrg 94704e7590efSmrg 94714e7590efSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 94724e7590efSmrg# -------------------------------------------- 94734e7590efSmrgm4_define([lt_dict_add_subkey], 94744e7590efSmrg[m4_define([$1($2:$3)], [$4])]) 94754e7590efSmrg 94764e7590efSmrg 94774e7590efSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 94784e7590efSmrg# ---------------------------------- 94794e7590efSmrgm4_define([lt_dict_fetch], 94804e7590efSmrg[m4_ifval([$3], 94814e7590efSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 94824e7590efSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 94834e7590efSmrg 94844e7590efSmrg 94854e7590efSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 94864e7590efSmrg# ----------------------------------------------------------------- 94874e7590efSmrgm4_define([lt_if_dict_fetch], 94884e7590efSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 94894e7590efSmrg [$5], 94904e7590efSmrg [$6])]) 94914e7590efSmrg 94924e7590efSmrg 94934e7590efSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 94944e7590efSmrg# -------------------------------------------------------------- 94954e7590efSmrgm4_define([lt_dict_filter], 94964e7590efSmrg[m4_if([$5], [], [], 94974e7590efSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 94984e7590efSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 94994e7590efSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 95004e7590efSmrg]) 95014e7590efSmrg 95024e7590efSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 95034e7590efSmrg# 95044e7590efSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 95054e7590efSmrg# Written by Scott James Remnant, 2004 95064e7590efSmrg# 95074e7590efSmrg# This file is free software; the Free Software Foundation gives 95084e7590efSmrg# unlimited permission to copy and/or distribute it, with or without 95094e7590efSmrg# modifications, as long as this notice is preserved. 95104e7590efSmrg 95114e7590efSmrg# @configure_input@ 95124e7590efSmrg 95134e7590efSmrg# serial 3337 ltversion.m4 95144e7590efSmrg# This file is part of GNU Libtool 95154e7590efSmrg 95164e7590efSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 95174e7590efSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 95184e7590efSmrg 95194e7590efSmrgAC_DEFUN([LTVERSION_VERSION], 95204e7590efSmrg[macro_version='2.4.2' 95214e7590efSmrgmacro_revision='1.3337' 95224e7590efSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 95234e7590efSmrg_LT_DECL(, macro_revision, 0) 95244e7590efSmrg]) 95254e7590efSmrg 95264e7590efSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 95274e7590efSmrg# 95284e7590efSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 95294e7590efSmrg# Written by Scott James Remnant, 2004. 95304e7590efSmrg# 95314e7590efSmrg# This file is free software; the Free Software Foundation gives 95324e7590efSmrg# unlimited permission to copy and/or distribute it, with or without 95334e7590efSmrg# modifications, as long as this notice is preserved. 95344e7590efSmrg 95354e7590efSmrg# serial 5 lt~obsolete.m4 95364e7590efSmrg 95374e7590efSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 95384e7590efSmrg# 95394e7590efSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 95404e7590efSmrg# which have later been changed to m4_define as they aren't part of the 95414e7590efSmrg# exported API, or moved to Autoconf or Automake where they belong. 95424e7590efSmrg# 95434e7590efSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 95444e7590efSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 95454e7590efSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 95464e7590efSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 95474e7590efSmrg# and doesn't know about Autoconf macros at all.) 95484e7590efSmrg# 95494e7590efSmrg# So we provide this file, which has a silly filename so it's always 95504e7590efSmrg# included after everything else. This provides aclocal with the 95514e7590efSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 95524e7590efSmrg# because those macros already exist, or will be overwritten later. 95534e7590efSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 95544e7590efSmrg# 95554e7590efSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 95564e7590efSmrg# Yes, that means every name once taken will need to remain here until 95574e7590efSmrg# we give up compatibility with versions before 1.7, at which point 95584e7590efSmrg# we need to keep only those names which we still refer to. 95594e7590efSmrg 95604e7590efSmrg# This is to help aclocal find these macros, as it can't see m4_define. 95614e7590efSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 95624e7590efSmrg 95634e7590efSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 95644e7590efSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 95654e7590efSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 95664e7590efSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 95674e7590efSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 95684e7590efSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 95694e7590efSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 95704e7590efSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 95714e7590efSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 95724e7590efSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 95734e7590efSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 95744e7590efSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 95754e7590efSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 95764e7590efSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 95774e7590efSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 95784e7590efSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 95794e7590efSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 95804e7590efSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 95814e7590efSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 95824e7590efSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 95834e7590efSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 95844e7590efSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 95854e7590efSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 95864e7590efSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 95874e7590efSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 95884e7590efSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 95894e7590efSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 95904e7590efSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 95914e7590efSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 95924e7590efSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 95934e7590efSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 95944e7590efSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 95954e7590efSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 95964e7590efSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 95974e7590efSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 95984e7590efSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 95994e7590efSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 96004e7590efSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 96014e7590efSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 96024e7590efSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 96034e7590efSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 96044e7590efSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 96054e7590efSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 96064e7590efSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 96074e7590efSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 96084e7590efSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 96094e7590efSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 96104e7590efSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 96114e7590efSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 96124e7590efSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 96134e7590efSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 96144e7590efSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 96154e7590efSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 96164e7590efSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 96174e7590efSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 96184e7590efSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 96194e7590efSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 96204e7590efSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 96214e7590efSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 96224e7590efSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 96234e7590efSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 96244e7590efSmrg 96254e7590efSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 96264e7590efSmrg# 96274e7590efSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 96284e7590efSmrg# 96294e7590efSmrg# This program is free software; you can redistribute it and/or modify 96304e7590efSmrg# it under the terms of the GNU General Public License as published by 96314e7590efSmrg# the Free Software Foundation; either version 2 of the License, or 96324e7590efSmrg# (at your option) any later version. 96334e7590efSmrg# 96344e7590efSmrg# This program is distributed in the hope that it will be useful, but 96354e7590efSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 96364e7590efSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 96374e7590efSmrg# General Public License for more details. 96384e7590efSmrg# 96394e7590efSmrg# You should have received a copy of the GNU General Public License 96404e7590efSmrg# along with this program; if not, write to the Free Software 96414e7590efSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 96424e7590efSmrg# 96434e7590efSmrg# As a special exception to the GNU General Public License, if you 96444e7590efSmrg# distribute this file as part of a program that contains a 96454e7590efSmrg# configuration script generated by Autoconf, you may include it under 96464e7590efSmrg# the same distribution terms that you use for the rest of that program. 96474e7590efSmrg 96484e7590efSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 96494e7590efSmrg# ---------------------------------- 96504e7590efSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 96514e7590efSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 96524e7590efSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 96534e7590efSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 96544e7590efSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 96554e7590efSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 96564e7590efSmrgfi 96574e7590efSmrgif test -n "$PKG_CONFIG"; then 96584e7590efSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 96594e7590efSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 96604e7590efSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 96614e7590efSmrg AC_MSG_RESULT([yes]) 96624e7590efSmrg else 96634e7590efSmrg AC_MSG_RESULT([no]) 96644e7590efSmrg PKG_CONFIG="" 96654e7590efSmrg fi 96664e7590efSmrg 96674e7590efSmrgfi[]dnl 96684e7590efSmrg])# PKG_PROG_PKG_CONFIG 96694e7590efSmrg 96704e7590efSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 96714e7590efSmrg# 96724e7590efSmrg# Check to see whether a particular set of modules exists. Similar 96734e7590efSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 96744e7590efSmrg# 96754e7590efSmrg# 96764e7590efSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 96774e7590efSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 96784e7590efSmrg# PKG_CHECK_EXISTS manually 96794e7590efSmrg# -------------------------------------------------------------- 96804e7590efSmrgAC_DEFUN([PKG_CHECK_EXISTS], 96814e7590efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 96824e7590efSmrgif test -n "$PKG_CONFIG" && \ 96834e7590efSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 96844e7590efSmrg m4_ifval([$2], [$2], [:]) 96854e7590efSmrgm4_ifvaln([$3], [else 96864e7590efSmrg $3])dnl 96874e7590efSmrgfi]) 96884e7590efSmrg 96894e7590efSmrg 96904e7590efSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 96914e7590efSmrg# --------------------------------------------- 96924e7590efSmrgm4_define([_PKG_CONFIG], 96934e7590efSmrg[if test -n "$$1"; then 96944e7590efSmrg pkg_cv_[]$1="$$1" 96954e7590efSmrg elif test -n "$PKG_CONFIG"; then 96964e7590efSmrg PKG_CHECK_EXISTS([$3], 96974e7590efSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 96984e7590efSmrg [pkg_failed=yes]) 96994e7590efSmrg else 97004e7590efSmrg pkg_failed=untried 97014e7590efSmrgfi[]dnl 97024e7590efSmrg])# _PKG_CONFIG 97034e7590efSmrg 97044e7590efSmrg# _PKG_SHORT_ERRORS_SUPPORTED 97054e7590efSmrg# ----------------------------- 97064e7590efSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 97074e7590efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 97084e7590efSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 97094e7590efSmrg _pkg_short_errors_supported=yes 97104e7590efSmrgelse 97114e7590efSmrg _pkg_short_errors_supported=no 97124e7590efSmrgfi[]dnl 97134e7590efSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 97144e7590efSmrg 97154e7590efSmrg 97164e7590efSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 97174e7590efSmrg# [ACTION-IF-NOT-FOUND]) 97184e7590efSmrg# 97194e7590efSmrg# 97204e7590efSmrg# Note that if there is a possibility the first call to 97214e7590efSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 97224e7590efSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 97234e7590efSmrg# 97244e7590efSmrg# 97254e7590efSmrg# -------------------------------------------------------------- 97264e7590efSmrgAC_DEFUN([PKG_CHECK_MODULES], 97274e7590efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97284e7590efSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 97294e7590efSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 97304e7590efSmrg 97314e7590efSmrgpkg_failed=no 97324e7590efSmrgAC_MSG_CHECKING([for $1]) 97334e7590efSmrg 97344e7590efSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 97354e7590efSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 97364e7590efSmrg 97374e7590efSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 97384e7590efSmrgand $1[]_LIBS to avoid the need to call pkg-config. 97394e7590efSmrgSee the pkg-config man page for more details.]) 97404e7590efSmrg 97414e7590efSmrgif test $pkg_failed = yes; then 97424e7590efSmrg _PKG_SHORT_ERRORS_SUPPORTED 97434e7590efSmrg if test $_pkg_short_errors_supported = yes; then 97444e7590efSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 97454e7590efSmrg else 97464e7590efSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 97474e7590efSmrg fi 97484e7590efSmrg # Put the nasty error message in config.log where it belongs 97494e7590efSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 97504e7590efSmrg 97514e7590efSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 97524e7590efSmrg[Package requirements ($2) were not met: 97534e7590efSmrg 97544e7590efSmrg$$1_PKG_ERRORS 97554e7590efSmrg 97564e7590efSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 97574e7590efSmrginstalled software in a non-standard prefix. 97584e7590efSmrg 97594e7590efSmrg_PKG_TEXT 97604e7590efSmrg])], 97614e7590efSmrg [AC_MSG_RESULT([no]) 97624e7590efSmrg $4]) 97634e7590efSmrgelif test $pkg_failed = untried; then 97644e7590efSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 97654e7590efSmrg[The pkg-config script could not be found or is too old. Make sure it 97664e7590efSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 97674e7590efSmrgpath to pkg-config. 97684e7590efSmrg 97694e7590efSmrg_PKG_TEXT 97704e7590efSmrg 97714e7590efSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 97724e7590efSmrg [$4]) 97734e7590efSmrgelse 97744e7590efSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 97754e7590efSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 97764e7590efSmrg AC_MSG_RESULT([yes]) 97774e7590efSmrg ifelse([$3], , :, [$3]) 97784e7590efSmrgfi[]dnl 97794e7590efSmrg])# PKG_CHECK_MODULES 97804e7590efSmrg 97814e7590efSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 97824e7590efSmrgdnl 97834e7590efSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 97844e7590efSmrgdnl 97854e7590efSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 97864e7590efSmrgdnl copy of this software and associated documentation files (the "Software"), 97874e7590efSmrgdnl to deal in the Software without restriction, including without limitation 97884e7590efSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 97894e7590efSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 97904e7590efSmrgdnl Software is furnished to do so, subject to the following conditions: 97914e7590efSmrgdnl 97924e7590efSmrgdnl The above copyright notice and this permission notice (including the next 97934e7590efSmrgdnl paragraph) shall be included in all copies or substantial portions of the 97944e7590efSmrgdnl Software. 97954e7590efSmrgdnl 97964e7590efSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 97974e7590efSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 97984e7590efSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 97994e7590efSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98004e7590efSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98014e7590efSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 98024e7590efSmrgdnl DEALINGS IN THE SOFTWARE. 98034e7590efSmrg 98044e7590efSmrg# XORG_MACROS_VERSION(required-version) 98054e7590efSmrg# ------------------------------------- 98064e7590efSmrg# Minimum version: 1.1.0 98074e7590efSmrg# 98084e7590efSmrg# If you're using a macro added in Version 1.1 or newer, include this in 98094e7590efSmrg# your configure.ac with the minimum required version, such as: 98104e7590efSmrg# XORG_MACROS_VERSION(1.1) 98114e7590efSmrg# 98124e7590efSmrg# To ensure that this macro is defined, also add: 98134e7590efSmrg# m4_ifndef([XORG_MACROS_VERSION], 98144e7590efSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 98154e7590efSmrg# 98164e7590efSmrg# 98174e7590efSmrg# See the "minimum version" comment for each macro you use to see what 98184e7590efSmrg# version you require. 98194e7590efSmrgm4_defun([XORG_MACROS_VERSION],[ 98204e7590efSmrgm4_define([vers_have], [1.17]) 98214e7590efSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 98224e7590efSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 98234e7590efSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 98244e7590efSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 98254e7590efSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 98264e7590efSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 98274e7590efSmrgm4_undefine([vers_have]) 98284e7590efSmrgm4_undefine([maj_have]) 98294e7590efSmrgm4_undefine([maj_needed]) 98304e7590efSmrg]) # XORG_MACROS_VERSION 98314e7590efSmrg 98324e7590efSmrg# XORG_PROG_RAWCPP() 98334e7590efSmrg# ------------------ 98344e7590efSmrg# Minimum version: 1.0.0 98354e7590efSmrg# 98364e7590efSmrg# Find cpp program and necessary flags for use in pre-processing text files 98374e7590efSmrg# such as man pages and config files 98384e7590efSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 98394e7590efSmrgAC_REQUIRE([AC_PROG_CPP]) 98404e7590efSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 98414e7590efSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 98424e7590efSmrg 98434e7590efSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 98444e7590efSmrg# which is not the best choice for supporting other OS'es, but covers most 98454e7590efSmrg# of the ones we need for now. 98464e7590efSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 98474e7590efSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 98484e7590efSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98494e7590efSmrg AC_MSG_RESULT([no]) 98504e7590efSmrgelse 98514e7590efSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98524e7590efSmrg RAWCPPFLAGS=-undef 98534e7590efSmrg AC_MSG_RESULT([yes]) 98544e7590efSmrg # under Cygwin unix is still defined even with -undef 98554e7590efSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98564e7590efSmrg RAWCPPFLAGS="-undef -ansi" 98574e7590efSmrg AC_MSG_RESULT([yes, with -ansi]) 98584e7590efSmrg else 98594e7590efSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 98604e7590efSmrg fi 98614e7590efSmrgfi 98624e7590efSmrgrm -f conftest.$ac_ext 98634e7590efSmrg 98644e7590efSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 98654e7590efSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 98664e7590efSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98674e7590efSmrg AC_MSG_RESULT([no]) 98684e7590efSmrgelse 98694e7590efSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98704e7590efSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 98714e7590efSmrg AC_MSG_RESULT([yes]) 98724e7590efSmrg else 98734e7590efSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 98744e7590efSmrg fi 98754e7590efSmrgfi 98764e7590efSmrgrm -f conftest.$ac_ext 98774e7590efSmrgAC_SUBST(RAWCPPFLAGS) 98784e7590efSmrg]) # XORG_PROG_RAWCPP 98794e7590efSmrg 98804e7590efSmrg# XORG_MANPAGE_SECTIONS() 98814e7590efSmrg# ----------------------- 98824e7590efSmrg# Minimum version: 1.0.0 98834e7590efSmrg# 98844e7590efSmrg# Determine which sections man pages go in for the different man page types 98854e7590efSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 98864e7590efSmrg# Not sure if there's any better way than just hardcoding by OS name. 98874e7590efSmrg# Override default settings by setting environment variables 98884e7590efSmrg# Added MAN_SUBSTS in version 1.8 98894e7590efSmrg# Added AC_PROG_SED in version 1.8 98904e7590efSmrg 98914e7590efSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 98924e7590efSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 98934e7590efSmrgAC_REQUIRE([AC_PROG_SED]) 98944e7590efSmrg 98954e7590efSmrgif test x$APP_MAN_SUFFIX = x ; then 98964e7590efSmrg APP_MAN_SUFFIX=1 98974e7590efSmrgfi 98984e7590efSmrgif test x$APP_MAN_DIR = x ; then 98994e7590efSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 99004e7590efSmrgfi 99014e7590efSmrg 99024e7590efSmrgif test x$LIB_MAN_SUFFIX = x ; then 99034e7590efSmrg LIB_MAN_SUFFIX=3 99044e7590efSmrgfi 99054e7590efSmrgif test x$LIB_MAN_DIR = x ; then 99064e7590efSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 99074e7590efSmrgfi 99084e7590efSmrg 99094e7590efSmrgif test x$FILE_MAN_SUFFIX = x ; then 99104e7590efSmrg case $host_os in 99114e7590efSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 99124e7590efSmrg *) FILE_MAN_SUFFIX=5 ;; 99134e7590efSmrg esac 99144e7590efSmrgfi 99154e7590efSmrgif test x$FILE_MAN_DIR = x ; then 99164e7590efSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 99174e7590efSmrgfi 99184e7590efSmrg 99194e7590efSmrgif test x$MISC_MAN_SUFFIX = x ; then 99204e7590efSmrg case $host_os in 99214e7590efSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 99224e7590efSmrg *) MISC_MAN_SUFFIX=7 ;; 99234e7590efSmrg esac 99244e7590efSmrgfi 99254e7590efSmrgif test x$MISC_MAN_DIR = x ; then 99264e7590efSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 99274e7590efSmrgfi 99284e7590efSmrg 99294e7590efSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 99304e7590efSmrg case $host_os in 99314e7590efSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 99324e7590efSmrg *) DRIVER_MAN_SUFFIX=4 ;; 99334e7590efSmrg esac 99344e7590efSmrgfi 99354e7590efSmrgif test x$DRIVER_MAN_DIR = x ; then 99364e7590efSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 99374e7590efSmrgfi 99384e7590efSmrg 99394e7590efSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 99404e7590efSmrg case $host_os in 99414e7590efSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 99424e7590efSmrg *) ADMIN_MAN_SUFFIX=8 ;; 99434e7590efSmrg esac 99444e7590efSmrgfi 99454e7590efSmrgif test x$ADMIN_MAN_DIR = x ; then 99464e7590efSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 99474e7590efSmrgfi 99484e7590efSmrg 99494e7590efSmrg 99504e7590efSmrgAC_SUBST([APP_MAN_SUFFIX]) 99514e7590efSmrgAC_SUBST([LIB_MAN_SUFFIX]) 99524e7590efSmrgAC_SUBST([FILE_MAN_SUFFIX]) 99534e7590efSmrgAC_SUBST([MISC_MAN_SUFFIX]) 99544e7590efSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 99554e7590efSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 99564e7590efSmrgAC_SUBST([APP_MAN_DIR]) 99574e7590efSmrgAC_SUBST([LIB_MAN_DIR]) 99584e7590efSmrgAC_SUBST([FILE_MAN_DIR]) 99594e7590efSmrgAC_SUBST([MISC_MAN_DIR]) 99604e7590efSmrgAC_SUBST([DRIVER_MAN_DIR]) 99614e7590efSmrgAC_SUBST([ADMIN_MAN_DIR]) 99624e7590efSmrg 99634e7590efSmrgXORG_MAN_PAGE="X Version 11" 99644e7590efSmrgAC_SUBST([XORG_MAN_PAGE]) 99654e7590efSmrgMAN_SUBSTS="\ 99664e7590efSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 99674e7590efSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 99684e7590efSmrg -e 's|__xservername__|Xorg|g' \ 99694e7590efSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 99704e7590efSmrg -e 's|__projectroot__|\$(prefix)|g' \ 99714e7590efSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 99724e7590efSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 99734e7590efSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 99744e7590efSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 99754e7590efSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 99764e7590efSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 99774e7590efSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 99784e7590efSmrgAC_SUBST([MAN_SUBSTS]) 99794e7590efSmrg 99804e7590efSmrg]) # XORG_MANPAGE_SECTIONS 99814e7590efSmrg 99824e7590efSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 99834e7590efSmrg# ------------------------ 99844e7590efSmrg# Minimum version: 1.7.0 99854e7590efSmrg# 99864e7590efSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 99874e7590efSmrg# provided by xorg-sgml-doctools, if installed. 99884e7590efSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 99894e7590efSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 99904e7590efSmrgXORG_SGML_PATH= 99914e7590efSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 99924e7590efSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 99934e7590efSmrg [m4_ifval([$1],[:], 99944e7590efSmrg [if test x"$cross_compiling" != x"yes" ; then 99954e7590efSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 99964e7590efSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 99974e7590efSmrg fi]) 99984e7590efSmrg ]) 99994e7590efSmrg 100004e7590efSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 100014e7590efSmrg# the path and the name of the doc stylesheet 100024e7590efSmrgif test "x$XORG_SGML_PATH" != "x" ; then 100034e7590efSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 100044e7590efSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 100054e7590efSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 100064e7590efSmrgelse 100074e7590efSmrg AC_MSG_RESULT([no]) 100084e7590efSmrgfi 100094e7590efSmrg 100104e7590efSmrgAC_SUBST(XORG_SGML_PATH) 100114e7590efSmrgAC_SUBST(STYLESHEET_SRCDIR) 100124e7590efSmrgAC_SUBST(XSL_STYLESHEET) 100134e7590efSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 100144e7590efSmrg]) # XORG_CHECK_SGML_DOCTOOLS 100154e7590efSmrg 100164e7590efSmrg# XORG_CHECK_LINUXDOC 100174e7590efSmrg# ------------------- 100184e7590efSmrg# Minimum version: 1.0.0 100194e7590efSmrg# 100204e7590efSmrg# Defines the variable MAKE_TEXT if the necessary tools and 100214e7590efSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 100224e7590efSmrg# Whether or not the necessary tools and files are found can be checked 100234e7590efSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 100244e7590efSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 100254e7590efSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 100264e7590efSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 100274e7590efSmrg 100284e7590efSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 100294e7590efSmrg 100304e7590efSmrgAC_MSG_CHECKING([whether to build documentation]) 100314e7590efSmrg 100324e7590efSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 100334e7590efSmrg BUILDDOC=yes 100344e7590efSmrgelse 100354e7590efSmrg BUILDDOC=no 100364e7590efSmrgfi 100374e7590efSmrg 100384e7590efSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 100394e7590efSmrg 100404e7590efSmrgAC_MSG_RESULT([$BUILDDOC]) 100414e7590efSmrg 100424e7590efSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 100434e7590efSmrg 100444e7590efSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 100454e7590efSmrg BUILDPDFDOC=yes 100464e7590efSmrgelse 100474e7590efSmrg BUILDPDFDOC=no 100484e7590efSmrgfi 100494e7590efSmrg 100504e7590efSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 100514e7590efSmrg 100524e7590efSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 100534e7590efSmrg 100544e7590efSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 100554e7590efSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 100564e7590efSmrgMAKE_PDF="$PS2PDF" 100574e7590efSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 100584e7590efSmrg 100594e7590efSmrgAC_SUBST(MAKE_TEXT) 100604e7590efSmrgAC_SUBST(MAKE_PS) 100614e7590efSmrgAC_SUBST(MAKE_PDF) 100624e7590efSmrgAC_SUBST(MAKE_HTML) 100634e7590efSmrg]) # XORG_CHECK_LINUXDOC 100644e7590efSmrg 100654e7590efSmrg# XORG_CHECK_DOCBOOK 100664e7590efSmrg# ------------------- 100674e7590efSmrg# Minimum version: 1.0.0 100684e7590efSmrg# 100694e7590efSmrg# Checks for the ability to build output formats from SGML DocBook source. 100704e7590efSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 100714e7590efSmrg# indicates whether the necessary tools and files are found and, if set, 100724e7590efSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 100734e7590efSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 100744e7590efSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 100754e7590efSmrg 100764e7590efSmrgBUILDTXTDOC=no 100774e7590efSmrgBUILDPDFDOC=no 100784e7590efSmrgBUILDPSDOC=no 100794e7590efSmrgBUILDHTMLDOC=no 100804e7590efSmrg 100814e7590efSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 100824e7590efSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 100834e7590efSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 100844e7590efSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 100854e7590efSmrg 100864e7590efSmrgAC_MSG_CHECKING([whether to build text documentation]) 100874e7590efSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 100884e7590efSmrg test x$BUILD_TXTDOC != xno; then 100894e7590efSmrg BUILDTXTDOC=yes 100904e7590efSmrgfi 100914e7590efSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 100924e7590efSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 100934e7590efSmrg 100944e7590efSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 100954e7590efSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 100964e7590efSmrg test x$BUILD_PDFDOC != xno; then 100974e7590efSmrg BUILDPDFDOC=yes 100984e7590efSmrgfi 100994e7590efSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101004e7590efSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101014e7590efSmrg 101024e7590efSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 101034e7590efSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 101044e7590efSmrg test x$BUILD_PSDOC != xno; then 101054e7590efSmrg BUILDPSDOC=yes 101064e7590efSmrgfi 101074e7590efSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 101084e7590efSmrgAC_MSG_RESULT([$BUILDPSDOC]) 101094e7590efSmrg 101104e7590efSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 101114e7590efSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 101124e7590efSmrg test x$BUILD_HTMLDOC != xno; then 101134e7590efSmrg BUILDHTMLDOC=yes 101144e7590efSmrgfi 101154e7590efSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 101164e7590efSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 101174e7590efSmrg 101184e7590efSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 101194e7590efSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 101204e7590efSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 101214e7590efSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 101224e7590efSmrg 101234e7590efSmrgAC_SUBST(MAKE_TEXT) 101244e7590efSmrgAC_SUBST(MAKE_PS) 101254e7590efSmrgAC_SUBST(MAKE_PDF) 101264e7590efSmrgAC_SUBST(MAKE_HTML) 101274e7590efSmrg]) # XORG_CHECK_DOCBOOK 101284e7590efSmrg 101294e7590efSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 101304e7590efSmrg# ---------------- 101314e7590efSmrg# Minimum version: 1.5.0 101324e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 101334e7590efSmrg# 101344e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 101354e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 101364e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 101374e7590efSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 101384e7590efSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 101394e7590efSmrg# --with-xmlto assumes 'auto'. 101404e7590efSmrg# 101414e7590efSmrg# Interface to module: 101424e7590efSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 101434e7590efSmrg# XMLTO: returns the path of the xmlto program found 101444e7590efSmrg# returns the path set by the user in the environment 101454e7590efSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 101464e7590efSmrg# 'no' user instructs the module not to use xmlto 101474e7590efSmrg# 101484e7590efSmrg# Added in version 1.10.0 101494e7590efSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 101504e7590efSmrg# xmlto for text output requires either lynx, links, or w3m browsers 101514e7590efSmrg# 101524e7590efSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 101534e7590efSmrg# 101544e7590efSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 101554e7590efSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 101564e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 101574e7590efSmrgAC_ARG_WITH(xmlto, 101584e7590efSmrg AS_HELP_STRING([--with-xmlto], 101594e7590efSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 101604e7590efSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 101614e7590efSmrgm4_undefine([_defopt]) 101624e7590efSmrg 101634e7590efSmrgif test "x$use_xmlto" = x"auto"; then 101644e7590efSmrg AC_PATH_PROG([XMLTO], [xmlto]) 101654e7590efSmrg if test "x$XMLTO" = "x"; then 101664e7590efSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 101674e7590efSmrg have_xmlto=no 101684e7590efSmrg else 101694e7590efSmrg have_xmlto=yes 101704e7590efSmrg fi 101714e7590efSmrgelif test "x$use_xmlto" = x"yes" ; then 101724e7590efSmrg AC_PATH_PROG([XMLTO], [xmlto]) 101734e7590efSmrg if test "x$XMLTO" = "x"; then 101744e7590efSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 101754e7590efSmrg fi 101764e7590efSmrg have_xmlto=yes 101774e7590efSmrgelif test "x$use_xmlto" = x"no" ; then 101784e7590efSmrg if test "x$XMLTO" != "x"; then 101794e7590efSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 101804e7590efSmrg fi 101814e7590efSmrg have_xmlto=no 101824e7590efSmrgelse 101834e7590efSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 101844e7590efSmrgfi 101854e7590efSmrg 101864e7590efSmrg# Test for a minimum version of xmlto, if provided. 101874e7590efSmrgm4_ifval([$1], 101884e7590efSmrg[if test "$have_xmlto" = yes; then 101894e7590efSmrg # scrape the xmlto version 101904e7590efSmrg AC_MSG_CHECKING([the xmlto version]) 101914e7590efSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 101924e7590efSmrg AC_MSG_RESULT([$xmlto_version]) 101934e7590efSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 101944e7590efSmrg [if test "x$use_xmlto" = xauto; then 101954e7590efSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 101964e7590efSmrg have_xmlto=no 101974e7590efSmrg else 101984e7590efSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 101994e7590efSmrg fi]) 102004e7590efSmrgfi]) 102014e7590efSmrg 102024e7590efSmrg# Test for the ability of xmlto to generate a text target 102034e7590efSmrghave_xmlto_text=no 102044e7590efSmrgcat > conftest.xml << "EOF" 102054e7590efSmrgEOF 102064e7590efSmrgAS_IF([test "$have_xmlto" = yes], 102074e7590efSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 102084e7590efSmrg [have_xmlto_text=yes], 102094e7590efSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 102104e7590efSmrgrm -f conftest.xml 102114e7590efSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 102124e7590efSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 102134e7590efSmrg]) # XORG_WITH_XMLTO 102144e7590efSmrg 102154e7590efSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 102164e7590efSmrg# -------------------------------------------- 102174e7590efSmrg# Minimum version: 1.12.0 102184e7590efSmrg# Minimum version for optional DEFAULT argument: 1.12.0 102194e7590efSmrg# 102204e7590efSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 102214e7590efSmrg# XML-based language used for the transformation of XML documents. 102224e7590efSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 102234e7590efSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 102244e7590efSmrg# The XSLT processor is often used as a standalone tool for transformations. 102254e7590efSmrg# It should not be assumed that this tool is used only to work with documnetation. 102264e7590efSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 102274e7590efSmrg# 102284e7590efSmrg# Interface to module: 102294e7590efSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 102304e7590efSmrg# XSLTPROC: returns the path of the xsltproc program found 102314e7590efSmrg# returns the path set by the user in the environment 102324e7590efSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 102334e7590efSmrg# 'no' user instructs the module not to use xsltproc 102344e7590efSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 102354e7590efSmrg# 102364e7590efSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 102374e7590efSmrg# 102384e7590efSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 102394e7590efSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 102404e7590efSmrg# Preserves the interface, should it be implemented later 102414e7590efSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 102424e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 102434e7590efSmrgAC_ARG_WITH(xsltproc, 102444e7590efSmrg AS_HELP_STRING([--with-xsltproc], 102454e7590efSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 102464e7590efSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 102474e7590efSmrgm4_undefine([_defopt]) 102484e7590efSmrg 102494e7590efSmrgif test "x$use_xsltproc" = x"auto"; then 102504e7590efSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102514e7590efSmrg if test "x$XSLTPROC" = "x"; then 102524e7590efSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 102534e7590efSmrg have_xsltproc=no 102544e7590efSmrg else 102554e7590efSmrg have_xsltproc=yes 102564e7590efSmrg fi 102574e7590efSmrgelif test "x$use_xsltproc" = x"yes" ; then 102584e7590efSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102594e7590efSmrg if test "x$XSLTPROC" = "x"; then 102604e7590efSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 102614e7590efSmrg fi 102624e7590efSmrg have_xsltproc=yes 102634e7590efSmrgelif test "x$use_xsltproc" = x"no" ; then 102644e7590efSmrg if test "x$XSLTPROC" != "x"; then 102654e7590efSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 102664e7590efSmrg fi 102674e7590efSmrg have_xsltproc=no 102684e7590efSmrgelse 102694e7590efSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 102704e7590efSmrgfi 102714e7590efSmrg 102724e7590efSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 102734e7590efSmrg]) # XORG_WITH_XSLTPROC 102744e7590efSmrg 102754e7590efSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 102764e7590efSmrg# ---------------------------------------- 102774e7590efSmrg# Minimum version: 1.15.0 102784e7590efSmrg# 102794e7590efSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 102804e7590efSmrg# scanning arbitrary text files, extracting information from those text files, 102814e7590efSmrg# and printing reports based on that information. 102824e7590efSmrg# 102834e7590efSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 102844e7590efSmrg# 102854e7590efSmrg# Interface to module: 102864e7590efSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 102874e7590efSmrg# PERL: returns the path of the perl program found 102884e7590efSmrg# returns the path set by the user in the environment 102894e7590efSmrg# --with-perl: 'yes' user instructs the module to use perl 102904e7590efSmrg# 'no' user instructs the module not to use perl 102914e7590efSmrg# have_perl: returns yes if perl found in PATH or no 102924e7590efSmrg# 102934e7590efSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 102944e7590efSmrg# 102954e7590efSmrgAC_DEFUN([XORG_WITH_PERL],[ 102964e7590efSmrgAC_ARG_VAR([PERL], [Path to perl command]) 102974e7590efSmrg# Preserves the interface, should it be implemented later 102984e7590efSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 102994e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 103004e7590efSmrgAC_ARG_WITH(perl, 103014e7590efSmrg AS_HELP_STRING([--with-perl], 103024e7590efSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 103034e7590efSmrg [use_perl=$withval], [use_perl=]_defopt) 103044e7590efSmrgm4_undefine([_defopt]) 103054e7590efSmrg 103064e7590efSmrgif test "x$use_perl" = x"auto"; then 103074e7590efSmrg AC_PATH_PROG([PERL], [perl]) 103084e7590efSmrg if test "x$PERL" = "x"; then 103094e7590efSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 103104e7590efSmrg have_perl=no 103114e7590efSmrg else 103124e7590efSmrg have_perl=yes 103134e7590efSmrg fi 103144e7590efSmrgelif test "x$use_perl" = x"yes" ; then 103154e7590efSmrg AC_PATH_PROG([PERL], [perl]) 103164e7590efSmrg if test "x$PERL" = "x"; then 103174e7590efSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 103184e7590efSmrg fi 103194e7590efSmrg have_perl=yes 103204e7590efSmrgelif test "x$use_perl" = x"no" ; then 103214e7590efSmrg if test "x$PERL" != "x"; then 103224e7590efSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 103234e7590efSmrg fi 103244e7590efSmrg have_perl=no 103254e7590efSmrgelse 103264e7590efSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 103274e7590efSmrgfi 103284e7590efSmrg 103294e7590efSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 103304e7590efSmrg]) # XORG_WITH_PERL 103314e7590efSmrg 103324e7590efSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 103334e7590efSmrg# ---------------- 103344e7590efSmrg# Minimum version: 1.5.0 103354e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 103364e7590efSmrg# 103374e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 103384e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 103394e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 103404e7590efSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 103414e7590efSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 103424e7590efSmrg# --with-asciidoc assumes 'auto'. 103434e7590efSmrg# 103444e7590efSmrg# Interface to module: 103454e7590efSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 103464e7590efSmrg# ASCIIDOC: returns the path of the asciidoc program found 103474e7590efSmrg# returns the path set by the user in the environment 103484e7590efSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 103494e7590efSmrg# 'no' user instructs the module not to use asciidoc 103504e7590efSmrg# 103514e7590efSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 103524e7590efSmrg# 103534e7590efSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 103544e7590efSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 103554e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 103564e7590efSmrgAC_ARG_WITH(asciidoc, 103574e7590efSmrg AS_HELP_STRING([--with-asciidoc], 103584e7590efSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 103594e7590efSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 103604e7590efSmrgm4_undefine([_defopt]) 103614e7590efSmrg 103624e7590efSmrgif test "x$use_asciidoc" = x"auto"; then 103634e7590efSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 103644e7590efSmrg if test "x$ASCIIDOC" = "x"; then 103654e7590efSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 103664e7590efSmrg have_asciidoc=no 103674e7590efSmrg else 103684e7590efSmrg have_asciidoc=yes 103694e7590efSmrg fi 103704e7590efSmrgelif test "x$use_asciidoc" = x"yes" ; then 103714e7590efSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 103724e7590efSmrg if test "x$ASCIIDOC" = "x"; then 103734e7590efSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 103744e7590efSmrg fi 103754e7590efSmrg have_asciidoc=yes 103764e7590efSmrgelif test "x$use_asciidoc" = x"no" ; then 103774e7590efSmrg if test "x$ASCIIDOC" != "x"; then 103784e7590efSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 103794e7590efSmrg fi 103804e7590efSmrg have_asciidoc=no 103814e7590efSmrgelse 103824e7590efSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 103834e7590efSmrgfi 103844e7590efSmrgm4_ifval([$1], 103854e7590efSmrg[if test "$have_asciidoc" = yes; then 103864e7590efSmrg # scrape the asciidoc version 103874e7590efSmrg AC_MSG_CHECKING([the asciidoc version]) 103884e7590efSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 103894e7590efSmrg AC_MSG_RESULT([$asciidoc_version]) 103904e7590efSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 103914e7590efSmrg [if test "x$use_asciidoc" = xauto; then 103924e7590efSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 103934e7590efSmrg have_asciidoc=no 103944e7590efSmrg else 103954e7590efSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 103964e7590efSmrg fi]) 103974e7590efSmrgfi]) 103984e7590efSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 103994e7590efSmrg]) # XORG_WITH_ASCIIDOC 104004e7590efSmrg 104014e7590efSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 104024e7590efSmrg# -------------------------------- 104034e7590efSmrg# Minimum version: 1.5.0 104044e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104054e7590efSmrg# 104064e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 104074e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 104084e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104094e7590efSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 104104e7590efSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 104114e7590efSmrg# --with-doxygen assumes 'auto'. 104124e7590efSmrg# 104134e7590efSmrg# Interface to module: 104144e7590efSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 104154e7590efSmrg# DOXYGEN: returns the path of the doxygen program found 104164e7590efSmrg# returns the path set by the user in the environment 104174e7590efSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 104184e7590efSmrg# 'no' user instructs the module not to use doxygen 104194e7590efSmrg# 104204e7590efSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 104214e7590efSmrg# 104224e7590efSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 104234e7590efSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 104244e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 104254e7590efSmrgAC_ARG_WITH(doxygen, 104264e7590efSmrg AS_HELP_STRING([--with-doxygen], 104274e7590efSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 104284e7590efSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 104294e7590efSmrgm4_undefine([_defopt]) 104304e7590efSmrg 104314e7590efSmrgif test "x$use_doxygen" = x"auto"; then 104324e7590efSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104334e7590efSmrg if test "x$DOXYGEN" = "x"; then 104344e7590efSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 104354e7590efSmrg have_doxygen=no 104364e7590efSmrg else 104374e7590efSmrg have_doxygen=yes 104384e7590efSmrg fi 104394e7590efSmrgelif test "x$use_doxygen" = x"yes" ; then 104404e7590efSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104414e7590efSmrg if test "x$DOXYGEN" = "x"; then 104424e7590efSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 104434e7590efSmrg fi 104444e7590efSmrg have_doxygen=yes 104454e7590efSmrgelif test "x$use_doxygen" = x"no" ; then 104464e7590efSmrg if test "x$DOXYGEN" != "x"; then 104474e7590efSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 104484e7590efSmrg fi 104494e7590efSmrg have_doxygen=no 104504e7590efSmrgelse 104514e7590efSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 104524e7590efSmrgfi 104534e7590efSmrgm4_ifval([$1], 104544e7590efSmrg[if test "$have_doxygen" = yes; then 104554e7590efSmrg # scrape the doxygen version 104564e7590efSmrg AC_MSG_CHECKING([the doxygen version]) 104574e7590efSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 104584e7590efSmrg AC_MSG_RESULT([$doxygen_version]) 104594e7590efSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 104604e7590efSmrg [if test "x$use_doxygen" = xauto; then 104614e7590efSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 104624e7590efSmrg have_doxygen=no 104634e7590efSmrg else 104644e7590efSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 104654e7590efSmrg fi]) 104664e7590efSmrgfi]) 104674e7590efSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 104684e7590efSmrg]) # XORG_WITH_DOXYGEN 104694e7590efSmrg 104704e7590efSmrg# XORG_WITH_GROFF([DEFAULT]) 104714e7590efSmrg# ---------------- 104724e7590efSmrg# Minimum version: 1.6.0 104734e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104744e7590efSmrg# 104754e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 104764e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 104774e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104784e7590efSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 104794e7590efSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 104804e7590efSmrg# --with-groff assumes 'auto'. 104814e7590efSmrg# 104824e7590efSmrg# Interface to module: 104834e7590efSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 104844e7590efSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 104854e7590efSmrg# HAVE_GROFF_MS: the -ms macros package 104864e7590efSmrg# GROFF: returns the path of the groff program found 104874e7590efSmrg# returns the path set by the user in the environment 104884e7590efSmrg# --with-groff: 'yes' user instructs the module to use groff 104894e7590efSmrg# 'no' user instructs the module not to use groff 104904e7590efSmrg# 104914e7590efSmrg# Added in version 1.9.0: 104924e7590efSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 104934e7590efSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 104944e7590efSmrg# psselect from the psutils package. 104954e7590efSmrg# the ghostcript package. Refer to the grohtml man pages 104964e7590efSmrg# 104974e7590efSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 104984e7590efSmrg# 104994e7590efSmrg# OS and distros often splits groff in a basic and full package, the former 105004e7590efSmrg# having the groff program and the later having devices, fonts and macros 105014e7590efSmrg# Checking for the groff executable is not enough. 105024e7590efSmrg# 105034e7590efSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 105044e7590efSmrg# unset HAVE_GROFF or GROFF env variables. 105054e7590efSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 105064e7590efSmrg# 105074e7590efSmrgAC_DEFUN([XORG_WITH_GROFF],[ 105084e7590efSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 105094e7590efSmrgm4_define([_defopt], m4_default([$1], [auto])) 105104e7590efSmrgAC_ARG_WITH(groff, 105114e7590efSmrg AS_HELP_STRING([--with-groff], 105124e7590efSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 105134e7590efSmrg [use_groff=$withval], [use_groff=]_defopt) 105144e7590efSmrgm4_undefine([_defopt]) 105154e7590efSmrg 105164e7590efSmrgif test "x$use_groff" = x"auto"; then 105174e7590efSmrg AC_PATH_PROG([GROFF], [groff]) 105184e7590efSmrg if test "x$GROFF" = "x"; then 105194e7590efSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 105204e7590efSmrg have_groff=no 105214e7590efSmrg else 105224e7590efSmrg have_groff=yes 105234e7590efSmrg fi 105244e7590efSmrgelif test "x$use_groff" = x"yes" ; then 105254e7590efSmrg AC_PATH_PROG([GROFF], [groff]) 105264e7590efSmrg if test "x$GROFF" = "x"; then 105274e7590efSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 105284e7590efSmrg fi 105294e7590efSmrg have_groff=yes 105304e7590efSmrgelif test "x$use_groff" = x"no" ; then 105314e7590efSmrg if test "x$GROFF" != "x"; then 105324e7590efSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 105334e7590efSmrg fi 105344e7590efSmrg have_groff=no 105354e7590efSmrgelse 105364e7590efSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 105374e7590efSmrgfi 105384e7590efSmrg 105394e7590efSmrg# We have groff, test for the presence of the macro packages 105404e7590efSmrgif test "x$have_groff" = x"yes"; then 105414e7590efSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 105424e7590efSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 105434e7590efSmrg groff_ms_works=yes 105444e7590efSmrg else 105454e7590efSmrg groff_ms_works=no 105464e7590efSmrg fi 105474e7590efSmrg AC_MSG_RESULT([$groff_ms_works]) 105484e7590efSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 105494e7590efSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 105504e7590efSmrg groff_mm_works=yes 105514e7590efSmrg else 105524e7590efSmrg groff_mm_works=no 105534e7590efSmrg fi 105544e7590efSmrg AC_MSG_RESULT([$groff_mm_works]) 105554e7590efSmrgfi 105564e7590efSmrg 105574e7590efSmrg# We have groff, test for HTML dependencies, one command per package 105584e7590efSmrgif test "x$have_groff" = x"yes"; then 105594e7590efSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 105604e7590efSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 105614e7590efSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 105624e7590efSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 105634e7590efSmrg have_groff_html=yes 105644e7590efSmrg else 105654e7590efSmrg have_groff_html=no 105664e7590efSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 105674e7590efSmrg fi 105684e7590efSmrgfi 105694e7590efSmrg 105704e7590efSmrg# Set Automake conditionals for Makefiles 105714e7590efSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 105724e7590efSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 105734e7590efSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 105744e7590efSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 105754e7590efSmrg]) # XORG_WITH_GROFF 105764e7590efSmrg 105774e7590efSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 105784e7590efSmrg# --------------------------------------- 105794e7590efSmrg# Minimum version: 1.6.0 105804e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 105814e7590efSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 105824e7590efSmrg# 105834e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 105844e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 105854e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 105864e7590efSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 105874e7590efSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 105884e7590efSmrg# --with-fop assumes 'auto'. 105894e7590efSmrg# 105904e7590efSmrg# Interface to module: 105914e7590efSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 105924e7590efSmrg# FOP: returns the path of the fop program found 105934e7590efSmrg# returns the path set by the user in the environment 105944e7590efSmrg# --with-fop: 'yes' user instructs the module to use fop 105954e7590efSmrg# 'no' user instructs the module not to use fop 105964e7590efSmrg# 105974e7590efSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 105984e7590efSmrg# 105994e7590efSmrgAC_DEFUN([XORG_WITH_FOP],[ 106004e7590efSmrgAC_ARG_VAR([FOP], [Path to fop command]) 106014e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 106024e7590efSmrgAC_ARG_WITH(fop, 106034e7590efSmrg AS_HELP_STRING([--with-fop], 106044e7590efSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106054e7590efSmrg [use_fop=$withval], [use_fop=]_defopt) 106064e7590efSmrgm4_undefine([_defopt]) 106074e7590efSmrg 106084e7590efSmrgif test "x$use_fop" = x"auto"; then 106094e7590efSmrg AC_PATH_PROG([FOP], [fop]) 106104e7590efSmrg if test "x$FOP" = "x"; then 106114e7590efSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 106124e7590efSmrg have_fop=no 106134e7590efSmrg else 106144e7590efSmrg have_fop=yes 106154e7590efSmrg fi 106164e7590efSmrgelif test "x$use_fop" = x"yes" ; then 106174e7590efSmrg AC_PATH_PROG([FOP], [fop]) 106184e7590efSmrg if test "x$FOP" = "x"; then 106194e7590efSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 106204e7590efSmrg fi 106214e7590efSmrg have_fop=yes 106224e7590efSmrgelif test "x$use_fop" = x"no" ; then 106234e7590efSmrg if test "x$FOP" != "x"; then 106244e7590efSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 106254e7590efSmrg fi 106264e7590efSmrg have_fop=no 106274e7590efSmrgelse 106284e7590efSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 106294e7590efSmrgfi 106304b0ead49Smrg 106314e7590efSmrg# Test for a minimum version of fop, if provided. 106324e7590efSmrgm4_ifval([$1], 106334e7590efSmrg[if test "$have_fop" = yes; then 106344e7590efSmrg # scrape the fop version 106354e7590efSmrg AC_MSG_CHECKING([for fop minimum version]) 106364e7590efSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 106374e7590efSmrg AC_MSG_RESULT([$fop_version]) 106384e7590efSmrg AS_VERSION_COMPARE([$fop_version], [$1], 106394e7590efSmrg [if test "x$use_fop" = xauto; then 106404e7590efSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 106414e7590efSmrg have_fop=no 106424e7590efSmrg else 106434e7590efSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 106444e7590efSmrg fi]) 106454e7590efSmrgfi]) 106464e7590efSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 106474e7590efSmrg]) # XORG_WITH_FOP 106484b0ead49Smrg 106494e7590efSmrg# XORG_WITH_PS2PDF([DEFAULT]) 106504e7590efSmrg# ---------------- 106514e7590efSmrg# Minimum version: 1.6.0 106524e7590efSmrg# Minimum version for optional DEFAULT argument: 1.11.0 106534e7590efSmrg# 106544e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 106554e7590efSmrg# not at the appropriate level. This macro enables a module to test for the 106564e7590efSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 106574e7590efSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 106584e7590efSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 106594e7590efSmrg# --with-ps2pdf assumes 'auto'. 106604e7590efSmrg# 106614e7590efSmrg# Interface to module: 106624e7590efSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 106634e7590efSmrg# PS2PDF: returns the path of the ps2pdf program found 106644e7590efSmrg# returns the path set by the user in the environment 106654e7590efSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 106664e7590efSmrg# 'no' user instructs the module not to use ps2pdf 106674e7590efSmrg# 106684e7590efSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 106694e7590efSmrg# 106704e7590efSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 106714e7590efSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 106724e7590efSmrgm4_define([_defopt], m4_default([$1], [auto])) 106734e7590efSmrgAC_ARG_WITH(ps2pdf, 106744e7590efSmrg AS_HELP_STRING([--with-ps2pdf], 106754e7590efSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 106764e7590efSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 106774e7590efSmrgm4_undefine([_defopt]) 106784b0ead49Smrg 106794e7590efSmrgif test "x$use_ps2pdf" = x"auto"; then 106804e7590efSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 106814e7590efSmrg if test "x$PS2PDF" = "x"; then 106824e7590efSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 106834e7590efSmrg have_ps2pdf=no 106844e7590efSmrg else 106854e7590efSmrg have_ps2pdf=yes 106864e7590efSmrg fi 106874e7590efSmrgelif test "x$use_ps2pdf" = x"yes" ; then 106884e7590efSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 106894e7590efSmrg if test "x$PS2PDF" = "x"; then 106904e7590efSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 106914e7590efSmrg fi 106924e7590efSmrg have_ps2pdf=yes 106934e7590efSmrgelif test "x$use_ps2pdf" = x"no" ; then 106944e7590efSmrg if test "x$PS2PDF" != "x"; then 106954e7590efSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 106964e7590efSmrg fi 106974e7590efSmrg have_ps2pdf=no 106984e7590efSmrgelse 106994e7590efSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 107004e7590efSmrgfi 107014e7590efSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 107024e7590efSmrg]) # XORG_WITH_PS2PDF 1070349dc963fSmrg 107044e7590efSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 107054e7590efSmrg# ---------------- 107064e7590efSmrg# Minimum version: 1.6.0 107074e7590efSmrg# 107084e7590efSmrg# Documentation tools are not always available on all platforms and sometimes 107094e7590efSmrg# not at the appropriate level. This macro enables a builder to skip all 107104e7590efSmrg# documentation targets except traditional man pages. 107114e7590efSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107124e7590efSmrg# maximum flexibilty in controlling documentation building. 107134e7590efSmrg# Refer to: 107144e7590efSmrg# XORG_WITH_XMLTO --with-xmlto 107154e7590efSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107164e7590efSmrg# XORG_WITH_DOXYGEN --with-doxygen 107174e7590efSmrg# XORG_WITH_FOP --with-fop 107184e7590efSmrg# XORG_WITH_GROFF --with-groff 107194e7590efSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107204e7590efSmrg# 107214e7590efSmrg# Interface to module: 107224e7590efSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 107234e7590efSmrg# --enable-docs: 'yes' user instructs the module to generate docs 107244e7590efSmrg# 'no' user instructs the module not to generate docs 107254e7590efSmrg# parm1: specify the default value, yes or no. 107264e7590efSmrg# 107274e7590efSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 107284e7590efSmrgm4_define([docs_default], m4_default([$1], [yes])) 107294e7590efSmrgAC_ARG_ENABLE(docs, 107304e7590efSmrg AS_HELP_STRING([--enable-docs], 107314e7590efSmrg [Enable building the documentation (default: ]docs_default[)]), 107324e7590efSmrg [build_docs=$enableval], [build_docs=]docs_default) 107334e7590efSmrgm4_undefine([docs_default]) 107344e7590efSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 107354e7590efSmrgAC_MSG_CHECKING([whether to build documentation]) 107364e7590efSmrgAC_MSG_RESULT([$build_docs]) 107374e7590efSmrg]) # XORG_ENABLE_DOCS 1073849dc963fSmrg 107394e7590efSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 107404e7590efSmrg# ---------------- 107414e7590efSmrg# Minimum version: 1.6.0 107424e7590efSmrg# 107434e7590efSmrg# This macro enables a builder to skip all developer documentation. 107444e7590efSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107454e7590efSmrg# maximum flexibilty in controlling documentation building. 107464e7590efSmrg# Refer to: 107474e7590efSmrg# XORG_WITH_XMLTO --with-xmlto 107484e7590efSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107494e7590efSmrg# XORG_WITH_DOXYGEN --with-doxygen 107504e7590efSmrg# XORG_WITH_FOP --with-fop 107514e7590efSmrg# XORG_WITH_GROFF --with-groff 107524e7590efSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107534e7590efSmrg# 107544e7590efSmrg# Interface to module: 107554e7590efSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 107564e7590efSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 107574e7590efSmrg# 'no' user instructs the module not to generate developer docs 107584e7590efSmrg# parm1: specify the default value, yes or no. 107594e7590efSmrg# 107604e7590efSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 107614e7590efSmrgm4_define([devel_default], m4_default([$1], [yes])) 107624e7590efSmrgAC_ARG_ENABLE(devel-docs, 107634e7590efSmrg AS_HELP_STRING([--enable-devel-docs], 107644e7590efSmrg [Enable building the developer documentation (default: ]devel_default[)]), 107654e7590efSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 107664e7590efSmrgm4_undefine([devel_default]) 107674e7590efSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 107684e7590efSmrgAC_MSG_CHECKING([whether to build developer documentation]) 107694e7590efSmrgAC_MSG_RESULT([$build_devel_docs]) 107704e7590efSmrg]) # XORG_ENABLE_DEVEL_DOCS 107714b0ead49Smrg 107724e7590efSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 107734e7590efSmrg# ---------------- 107744e7590efSmrg# Minimum version: 1.6.0 107754e7590efSmrg# 107764e7590efSmrg# This macro enables a builder to skip all functional specification targets. 107774e7590efSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107784e7590efSmrg# maximum flexibilty in controlling documentation building. 107794e7590efSmrg# Refer to: 107804e7590efSmrg# XORG_WITH_XMLTO --with-xmlto 107814e7590efSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 107824e7590efSmrg# XORG_WITH_DOXYGEN --with-doxygen 107834e7590efSmrg# XORG_WITH_FOP --with-fop 107844e7590efSmrg# XORG_WITH_GROFF --with-groff 107854e7590efSmrg# XORG_WITH_PS2PDF --with-ps2pdf 107864e7590efSmrg# 107874e7590efSmrg# Interface to module: 107884e7590efSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 107894e7590efSmrg# --enable-specs: 'yes' user instructs the module to generate specs 107904e7590efSmrg# 'no' user instructs the module not to generate specs 107914e7590efSmrg# parm1: specify the default value, yes or no. 107924e7590efSmrg# 107934e7590efSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 107944e7590efSmrgm4_define([spec_default], m4_default([$1], [yes])) 107954e7590efSmrgAC_ARG_ENABLE(specs, 107964e7590efSmrg AS_HELP_STRING([--enable-specs], 107974e7590efSmrg [Enable building the specs (default: ]spec_default[)]), 107984e7590efSmrg [build_specs=$enableval], [build_specs=]spec_default) 107994e7590efSmrgm4_undefine([spec_default]) 108004e7590efSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 108014e7590efSmrgAC_MSG_CHECKING([whether to build functional specifications]) 108024e7590efSmrgAC_MSG_RESULT([$build_specs]) 108034e7590efSmrg]) # XORG_ENABLE_SPECS 108044b0ead49Smrg 108054e7590efSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 108064e7590efSmrg# ---------------------------------------------- 108074e7590efSmrg# Minimum version: 1.13.0 108084e7590efSmrg# 108094e7590efSmrg# This macro enables a builder to enable/disable unit testing 108104e7590efSmrg# It makes no assumption about the test cases implementation 108114e7590efSmrg# Test cases may or may not use Automake "Support for test suites" 108124e7590efSmrg# They may or may not use the software utility library GLib 108134e7590efSmrg# 108144e7590efSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 108154e7590efSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 108164e7590efSmrg# The variable enable_unit_tests is used by other macros in this file. 108174e7590efSmrg# 108184e7590efSmrg# Interface to module: 108194e7590efSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 108204e7590efSmrg# enable_unit_tests: used in configure.ac for additional configuration 108214e7590efSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 108224e7590efSmrg# 'no' user instructs the module not to build tests 108234e7590efSmrg# parm1: specify the default value, yes or no. 108244e7590efSmrg# 108254e7590efSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 108264e7590efSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 108274e7590efSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 108284e7590efSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108294e7590efSmrgm4_define([_defopt], m4_default([$1], [auto])) 108304e7590efSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 108314e7590efSmrg [Enable building unit test cases (default: ]_defopt[)]), 108324e7590efSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 108334e7590efSmrgm4_undefine([_defopt]) 108344e7590efSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 108354e7590efSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108364e7590efSmrgAC_MSG_RESULT([$enable_unit_tests]) 108374e7590efSmrg]) # XORG_ENABLE_UNIT_TESTS 108384e7590efSmrg 108394e7590efSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 108404e7590efSmrg# ------------------------------------------------------ 108414e7590efSmrg# Minimum version: 1.17.0 108424e7590efSmrg# 108434e7590efSmrg# This macro enables a builder to enable/disable integration testing 108444e7590efSmrg# It makes no assumption about the test cases' implementation 108454e7590efSmrg# Test cases may or may not use Automake "Support for test suites" 108464e7590efSmrg# 108474e7590efSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 108484e7590efSmrg# usually requires less dependencies and may be built and run under less 108494e7590efSmrg# stringent environments than integration tests. 108504e7590efSmrg# 108514e7590efSmrg# Interface to module: 108524e7590efSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 108534e7590efSmrg# enable_integration_tests: used in configure.ac for additional configuration 108544e7590efSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 108554e7590efSmrg# 'no' user instructs the module not to build tests 108564e7590efSmrg# parm1: specify the default value, yes or no. 108574e7590efSmrg# 108584e7590efSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 108594e7590efSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108604e7590efSmrgm4_define([_defopt], m4_default([$1], [auto])) 108614e7590efSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 108624e7590efSmrg [Enable building integration test cases (default: ]_defopt[)]), 108634e7590efSmrg [enable_integration_tests=$enableval], 108644e7590efSmrg [enable_integration_tests=]_defopt) 108654e7590efSmrgm4_undefine([_defopt]) 108664e7590efSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 108674e7590efSmrg [test "x$enable_integration_tests" != xno]) 108684e7590efSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108694e7590efSmrgAC_MSG_RESULT([$enable_integration_tests]) 108704e7590efSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 108714e7590efSmrg 108724e7590efSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 108734e7590efSmrg# ---------------------------------------- 108744e7590efSmrg# Minimum version: 1.13.0 108754e7590efSmrg# 108764e7590efSmrg# GLib is a library which provides advanced data structures and functions. 108774e7590efSmrg# This macro enables a module to test for the presence of Glib. 108784e7590efSmrg# 108794e7590efSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 108804e7590efSmrg# Otherwise the value of $enable_unit_tests is blank. 108814e7590efSmrg# 108824e7590efSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 108834e7590efSmrg# test support usually requires less dependencies and may be built and run under 108844e7590efSmrg# less stringent environments than integration tests. 108854e7590efSmrg# 108864e7590efSmrg# Interface to module: 108874e7590efSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 108884e7590efSmrg# with_glib: used in configure.ac to know if GLib has been found 108894e7590efSmrg# --with-glib: 'yes' user instructs the module to use glib 108904e7590efSmrg# 'no' user instructs the module not to use glib 108914e7590efSmrg# 108924e7590efSmrgAC_DEFUN([XORG_WITH_GLIB],[ 108934e7590efSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 108944e7590efSmrgm4_define([_defopt], m4_default([$2], [auto])) 108954e7590efSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 108964e7590efSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 108974e7590efSmrg [with_glib=$withval], [with_glib=]_defopt) 108984e7590efSmrgm4_undefine([_defopt]) 108994e7590efSmrg 109004e7590efSmrghave_glib=no 109014e7590efSmrg# Do not probe GLib if user explicitly disabled unit testing 109024e7590efSmrgif test "x$enable_unit_tests" != x"no"; then 109034e7590efSmrg # Do not probe GLib if user explicitly disabled it 109044e7590efSmrg if test "x$with_glib" != x"no"; then 109054e7590efSmrg m4_ifval( 109064e7590efSmrg [$1], 109074e7590efSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 109084e7590efSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 109094e7590efSmrg ) 109104e7590efSmrg fi 109114e7590efSmrgfi 109124b0ead49Smrg 109134e7590efSmrg# Not having GLib when unit testing has been explicitly requested is an error 109144e7590efSmrgif test "x$enable_unit_tests" = x"yes"; then 109154e7590efSmrg if test "x$have_glib" = x"no"; then 109164e7590efSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109174e7590efSmrg fi 109184e7590efSmrgfi 109194b0ead49Smrg 109204e7590efSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 109214e7590efSmrgif test "x$enable_unit_tests" = x"no"; then 109224e7590efSmrg if test "x$with_glib" = x"yes"; then 109234e7590efSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109244e7590efSmrg fi 109254e7590efSmrgfi 109264b0ead49Smrg 109274e7590efSmrg# Not having GLib when it has been explicitly requested is an error 109284e7590efSmrgif test "x$with_glib" = x"yes"; then 109294e7590efSmrg if test "x$have_glib" = x"no"; then 109304e7590efSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 109314e7590efSmrg fi 109324e7590efSmrgfi 109334b0ead49Smrg 109344e7590efSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 109354e7590efSmrg]) # XORG_WITH_GLIB 109364b0ead49Smrg 109374e7590efSmrg# XORG_LD_WRAP([required|optional]) 109384e7590efSmrg# --------------------------------- 109394e7590efSmrg# Minimum version: 1.13.0 109404e7590efSmrg# 109414e7590efSmrg# Check if linker supports -wrap, passed via compiler flags 109424e7590efSmrg# 109434e7590efSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 109444e7590efSmrg# Otherwise the value of $enable_unit_tests is blank. 109454e7590efSmrg# 109464e7590efSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 109474e7590efSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 109484e7590efSmrg# available, an argument of "optional" allows use when some unit tests require 109494e7590efSmrg# ld -wrap and others do not. 109504e7590efSmrg# 109514e7590efSmrgAC_DEFUN([XORG_LD_WRAP],[ 109524e7590efSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 109534e7590efSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 109544e7590efSmrg void __wrap_exit(int status) { return; }], 109554e7590efSmrg [exit(0);])]) 109564e7590efSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 109574e7590efSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 109584e7590efSmrg if test "x$have_ld_wrap" = x"no"; then 109594e7590efSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 109604e7590efSmrg fi 109614e7590efSmrgfi 109624e7590efSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 109634e7590efSmrg# 109644e7590efSmrg]) # XORG_LD_WRAP 1096549dc963fSmrg 109664e7590efSmrg# XORG_CHECK_LINKER_FLAGS 109674e7590efSmrg# ----------------------- 109684e7590efSmrg# SYNOPSIS 109694e7590efSmrg# 109704e7590efSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 109714e7590efSmrg# 109724e7590efSmrg# DESCRIPTION 109734e7590efSmrg# 109744e7590efSmrg# Check whether the given linker FLAGS work with the current language's 109754e7590efSmrg# linker, or whether they give an error. 109764e7590efSmrg# 109774e7590efSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 109784e7590efSmrg# success/failure. 109794e7590efSmrg# 109804e7590efSmrg# PROGRAM-SOURCE is the program source to link with, if needed 109814e7590efSmrg# 109824e7590efSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 109834e7590efSmrg# 109844e7590efSmrg# LICENSE 109854e7590efSmrg# 109864e7590efSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 109874e7590efSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 109884e7590efSmrg# Copyright (c) 2009 Matteo Frigo 109894e7590efSmrg# 109904e7590efSmrg# This program is free software: you can redistribute it and/or modify it 109914e7590efSmrg# under the terms of the GNU General Public License as published by the 109924e7590efSmrg# Free Software Foundation, either version 3 of the License, or (at your 109934e7590efSmrg# option) any later version. 109944e7590efSmrg# 109954e7590efSmrg# This program is distributed in the hope that it will be useful, but 109964e7590efSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 109974e7590efSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 109984e7590efSmrg# Public License for more details. 109994e7590efSmrg# 110004e7590efSmrg# You should have received a copy of the GNU General Public License along 110014e7590efSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 110024e7590efSmrg# 110034e7590efSmrg# As a special exception, the respective Autoconf Macro's copyright owner 110044e7590efSmrg# gives unlimited permission to copy, distribute and modify the configure 110054e7590efSmrg# scripts that are the output of Autoconf when processing the Macro. You 110064e7590efSmrg# need not follow the terms of the GNU General Public License when using 110074e7590efSmrg# or distributing such scripts, even though portions of the text of the 110084e7590efSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 110094e7590efSmrg# all other use of the material that constitutes the Autoconf Macro. 110104e7590efSmrg# 110114e7590efSmrg# This special exception to the GPL applies to versions of the Autoconf 110124e7590efSmrg# Macro released by the Autoconf Archive. When you make and distribute a 110134e7590efSmrg# modified version of the Autoconf Macro, you may extend this special 110144e7590efSmrg# exception to the GPL to apply to your modified version as well.# 110154e7590efSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 110164e7590efSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 110174e7590efSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 110184e7590efSmrgAS_LITERAL_IF([$1], 110194e7590efSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 110204e7590efSmrg ax_save_FLAGS=$LDFLAGS 110214e7590efSmrg LDFLAGS="$1" 110224e7590efSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 110234e7590efSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110244e7590efSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110254e7590efSmrg LDFLAGS=$ax_save_FLAGS])], 110264e7590efSmrg [ax_save_FLAGS=$LDFLAGS 110274e7590efSmrg LDFLAGS="$1" 110284e7590efSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 110294e7590efSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110304e7590efSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110314e7590efSmrg LDFLAGS=$ax_save_FLAGS]) 110324e7590efSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 110334e7590efSmrgAC_MSG_RESULT($xorg_check_linker_flags) 110344e7590efSmrgif test "x$xorg_check_linker_flags" = xyes; then 110354e7590efSmrg m4_default([$2], :) 110364e7590efSmrgelse 110374e7590efSmrg m4_default([$3], :) 110384e7590efSmrgfi 110394e7590efSmrg]) # XORG_CHECK_LINKER_FLAGS 1104049dc963fSmrg 110414e7590efSmrg# XORG_MEMORY_CHECK_FLAGS 110424e7590efSmrg# ----------------------- 110434e7590efSmrg# Minimum version: 1.16.0 110444e7590efSmrg# 110454e7590efSmrg# This macro attempts to find appropriate memory checking functionality 110464e7590efSmrg# for various platforms which unit testing code may use to catch various 110474e7590efSmrg# forms of memory allocation and access errors in testing. 110484e7590efSmrg# 110494e7590efSmrg# Interface to module: 110504e7590efSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 110514e7590efSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 110524e7590efSmrg# 110534e7590efSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 110544e7590efSmrg# 110554e7590efSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 110564b0ead49Smrg 110574e7590efSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 110584e7590efSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 110594e7590efSmrg [Environment variables to enable memory checking in tests]) 110604b0ead49Smrg 110614e7590efSmrg# Check for different types of support on different platforms 110624e7590efSmrgcase $host_os in 110634e7590efSmrg solaris*) 110644e7590efSmrg AC_CHECK_LIB([umem], [umem_alloc], 110654e7590efSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 110664e7590efSmrg ;; 110674e7590efSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 110684e7590efSmrg # both directly and inverted, so should not be 0 or 255. 110694e7590efSmrg malloc_debug_env='MALLOC_PERTURB_=15' 110704e7590efSmrg ;; 110714e7590efSmrg darwin*) 110724e7590efSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 110734e7590efSmrg ;; 110744e7590efSmrg *bsd*) 110754e7590efSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 110764e7590efSmrg ;; 110774e7590efSmrgesac 110784b0ead49Smrg 110794e7590efSmrg# User supplied flags override default flags 110804e7590efSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 110814e7590efSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 110824e7590efSmrgfi 1108349dc963fSmrg 110844e7590efSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 110854e7590efSmrg]) # XORG_WITH_LINT 1108649dc963fSmrg 110874e7590efSmrg# XORG_CHECK_MALLOC_ZERO 110884e7590efSmrg# ---------------------- 110894e7590efSmrg# Minimum version: 1.0.0 1109052b01e16Smrg# 110914e7590efSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 110924e7590efSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 110934e7590efSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 110944e7590efSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 110954e7590efSmrgAC_ARG_ENABLE(malloc0returnsnull, 110964e7590efSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 110974e7590efSmrg [malloc(0) returns NULL (default: auto)]), 110984e7590efSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 110994e7590efSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 111004b0ead49Smrg 111014e7590efSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 111024e7590efSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 111034e7590efSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 111044e7590efSmrg#include <stdlib.h> 111054e7590efSmrg],[ 111064e7590efSmrg char *m0, *r0, *c0, *p; 111074e7590efSmrg m0 = malloc(0); 111084e7590efSmrg p = malloc(10); 111094e7590efSmrg r0 = realloc(p,0); 111104e7590efSmrg c0 = calloc(0,10); 111114e7590efSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 111124e7590efSmrg])], 111134e7590efSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 111144e7590efSmrg [MALLOC_ZERO_RETURNS_NULL=no], 111154e7590efSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 111164e7590efSmrgfi 111174e7590efSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 111184b0ead49Smrg 111194e7590efSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 111204e7590efSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 111214e7590efSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 111224e7590efSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 111234e7590efSmrgelse 111244e7590efSmrg MALLOC_ZERO_CFLAGS="" 111254e7590efSmrg XMALLOC_ZERO_CFLAGS="" 111264e7590efSmrg XTMALLOC_ZERO_CFLAGS="" 111274e7590efSmrgfi 1112852b01e16Smrg 111294e7590efSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 111304e7590efSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 111314e7590efSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 111324e7590efSmrg]) # XORG_CHECK_MALLOC_ZERO 1113349dc963fSmrg 111344e7590efSmrg# XORG_WITH_LINT() 111354e7590efSmrg# ---------------- 111364e7590efSmrg# Minimum version: 1.1.0 111374e7590efSmrg# 111384e7590efSmrg# This macro enables the use of a tool that flags some suspicious and 111394e7590efSmrg# non-portable constructs (likely to be bugs) in C language source code. 111404e7590efSmrg# It will attempt to locate the tool and use appropriate options. 111414e7590efSmrg# There are various lint type tools on different platforms. 111424e7590efSmrg# 111434e7590efSmrg# Interface to module: 111444e7590efSmrg# LINT: returns the path to the tool found on the platform 111454e7590efSmrg# or the value set to LINT on the configure cmd line 111464e7590efSmrg# also an Automake conditional 111474e7590efSmrg# LINT_FLAGS: an Automake variable with appropriate flags 111484e7590efSmrg# 111494e7590efSmrg# --with-lint: 'yes' user instructs the module to use lint 111504e7590efSmrg# 'no' user instructs the module not to use lint (default) 111514e7590efSmrg# 111524e7590efSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 111534e7590efSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 111544e7590efSmrg# 111554e7590efSmrgAC_DEFUN([XORG_WITH_LINT],[ 1115649dc963fSmrg 111574e7590efSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 111584e7590efSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 111594e7590efSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 111604e7590efSmrg [Use a lint-style source code checker (default: disabled)])], 111614e7590efSmrg [use_lint=$withval], [use_lint=no]) 1116249dc963fSmrg 111634e7590efSmrg# Obtain platform specific info like program name and options 111644e7590efSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 111654e7590efSmrgcase $host_os in 111664e7590efSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 111674e7590efSmrg lint_name=splint 111684e7590efSmrg lint_options="-badflag" 111694e7590efSmrg ;; 111704e7590efSmrg *freebsd* | *netbsd*) 111714e7590efSmrg lint_name=lint 111724e7590efSmrg lint_options="-u -b" 111734e7590efSmrg ;; 111744e7590efSmrg *solaris*) 111754e7590efSmrg lint_name=lint 111764e7590efSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 111774e7590efSmrg ;; 111784e7590efSmrgesac 1117949dc963fSmrg 111804e7590efSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 111814e7590efSmrgif test "x$use_lint" = x"yes" ; then 111824e7590efSmrg AC_PATH_PROG([LINT], [$lint_name]) 111834e7590efSmrg if test "x$LINT" = "x"; then 111844e7590efSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 111854e7590efSmrg fi 111864e7590efSmrgelif test "x$use_lint" = x"no" ; then 111874e7590efSmrg if test "x$LINT" != "x"; then 111884e7590efSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 111894e7590efSmrg fi 111904e7590efSmrgelse 111914e7590efSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 111924e7590efSmrgfi 1119349dc963fSmrg 111944e7590efSmrg# User supplied flags override default flags 111954e7590efSmrgif test "x$LINT_FLAGS" != "x"; then 111964e7590efSmrg lint_options=$LINT_FLAGS 111974e7590efSmrgfi 1119849dc963fSmrg 111994e7590efSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 112004e7590efSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1120149dc963fSmrg 112024e7590efSmrg]) # XORG_WITH_LINT 1120349dc963fSmrg 112044e7590efSmrg# XORG_LINT_LIBRARY(LIBNAME) 112054e7590efSmrg# -------------------------- 112064e7590efSmrg# Minimum version: 1.1.0 112074e7590efSmrg# 112084e7590efSmrg# Sets up flags for building lint libraries for checking programs that call 112094e7590efSmrg# functions in the library. 112104e7590efSmrg# 112114e7590efSmrg# Interface to module: 112124e7590efSmrg# LINTLIB - Automake variable with the name of lint library file to make 112134e7590efSmrg# MAKE_LINT_LIB - Automake conditional 112144e7590efSmrg# 112154e7590efSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 112164e7590efSmrg# - 'no' user instructs the module not to create a lint library (default) 1121749dc963fSmrg 112184e7590efSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 112194e7590efSmrgAC_REQUIRE([XORG_WITH_LINT]) 112204e7590efSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 112214e7590efSmrg [Create lint library (default: disabled)])], 112224e7590efSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1122349dc963fSmrg 112244e7590efSmrgif test "x$make_lint_lib" = x"yes" ; then 112254e7590efSmrg LINTLIB=llib-l$1.ln 112264e7590efSmrg if test "x$LINT" = "x"; then 112274e7590efSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 112284e7590efSmrg fi 112294e7590efSmrgelif test "x$make_lint_lib" != x"no" ; then 112304e7590efSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 112314e7590efSmrgfi 1123249dc963fSmrg 112334e7590efSmrgAC_SUBST(LINTLIB) 112344e7590efSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1123549dc963fSmrg 112364e7590efSmrg]) # XORG_LINT_LIBRARY 112374e7590efSmrg 112384e7590efSmrg# XORG_COMPILER_BRAND 112394e7590efSmrg# ------------------- 112404e7590efSmrg# Minimum version: 1.14.0 112414e7590efSmrg# 112424e7590efSmrg# Checks for various brands of compilers and sets flags as appropriate: 112434e7590efSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 112444e7590efSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 112454e7590efSmrg# clang compiler - sets CLANGCC to "yes" 112464e7590efSmrg# Intel compiler - sets INTELCC to "yes" 112474e7590efSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 112484e7590efSmrg# 112494e7590efSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 112504e7590efSmrgAC_LANG_CASE( 112514e7590efSmrg [C], [ 112524e7590efSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112534e7590efSmrg ], 112544e7590efSmrg [C++], [ 112554e7590efSmrg AC_REQUIRE([AC_PROG_CXX]) 112564e7590efSmrg ] 112574e7590efSmrg) 112584e7590efSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 112594e7590efSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 112604e7590efSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 112614e7590efSmrg]) # XORG_COMPILER_BRAND 112624b0ead49Smrg 112634e7590efSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 112644e7590efSmrg# --------------- 112654e7590efSmrg# Minimum version: 1.16.0 112664e7590efSmrg# 112674e7590efSmrg# Test if the compiler works when passed the given flag as a command line argument. 112684e7590efSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 112694e7590efSmrg# next flag in the list until there are no more options. 112704e7590efSmrg# 112714e7590efSmrg# Note that this does not guarantee that the compiler supports the flag as some 112724e7590efSmrg# compilers will simply ignore arguments that they do not understand, but we do 112734e7590efSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 112744e7590efSmrg# -Werror=unused-command-line-argument 112754e7590efSmrg# 112764e7590efSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 112774e7590efSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112784e7590efSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112794e7590efSmrg 112804e7590efSmrgAC_LANG_COMPILER_REQUIRE 112814e7590efSmrg 112824e7590efSmrgAC_LANG_CASE( 112834e7590efSmrg [C], [ 112844e7590efSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112854e7590efSmrg define([PREFIX], [C]) 112864e7590efSmrg define([CACHE_PREFIX], [cc]) 112874e7590efSmrg define([COMPILER], [$CC]) 112884e7590efSmrg ], 112894e7590efSmrg [C++], [ 112904e7590efSmrg define([PREFIX], [CXX]) 112914e7590efSmrg define([CACHE_PREFIX], [cxx]) 112924e7590efSmrg define([COMPILER], [$CXX]) 112934e7590efSmrg ] 112944e7590efSmrg) 112954b0ead49Smrg 112964e7590efSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 112974e7590efSmrg 112984e7590efSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 112994e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113004e7590efSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 113014e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 113024e7590efSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113034e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 113044e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 113054e7590efSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 113064e7590efSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113074e7590efSmrgfi 113084b0ead49Smrg 113094e7590efSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 113104e7590efSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 113114e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113124e7590efSmrg fi 113134e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113144e7590efSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 113154e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 113164e7590efSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113174e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 113184e7590efSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 113194e7590efSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 113204e7590efSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113214e7590efSmrgfi 113224b0ead49Smrg 113234e7590efSmrgfound="no" 113244e7590efSmrgm4_foreach([flag], m4_cdr($@), [ 113254e7590efSmrg if test $found = "no" ; then 113264e7590efSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 113274e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113284e7590efSmrg fi 113294e7590efSmrg 113304e7590efSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 113314e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113324e7590efSmrg fi 113334e7590efSmrg 113344e7590efSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 113354e7590efSmrg 113364e7590efSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 113374e7590efSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 113384e7590efSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 113394e7590efSmrg AC_CACHE_VAL($cacheid, 113404e7590efSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 113414e7590efSmrg [eval $cacheid=yes], 113424e7590efSmrg [eval $cacheid=no])]) 113434e7590efSmrg 113444e7590efSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113454e7590efSmrg 113464e7590efSmrg eval supported=\$$cacheid 113474e7590efSmrg AC_MSG_RESULT([$supported]) 113484e7590efSmrg if test "$supported" = "yes" ; then 113494e7590efSmrg $1="$$1 ]flag[" 113504e7590efSmrg found="yes" 113514e7590efSmrg fi 113524e7590efSmrg fi 113534e7590efSmrg]) 113544e7590efSmrg]) # XORG_TESTSET_CFLAG 113554b0ead49Smrg 113564e7590efSmrg# XORG_COMPILER_FLAGS 113574e7590efSmrg# --------------- 113584e7590efSmrg# Minimum version: 1.16.0 113594e7590efSmrg# 113604e7590efSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 113614e7590efSmrg# arguments supported by the selected compiler which do NOT alter the generated 113624e7590efSmrg# code. These arguments will cause the compiler to print various warnings 113634e7590efSmrg# during compilation AND turn a conservative set of warnings into errors. 113644e7590efSmrg# 113654e7590efSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 113664e7590efSmrg# future versions of util-macros as options are added to new compilers. 113674e7590efSmrg# 113684e7590efSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 113694e7590efSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113704e7590efSmrg 113714e7590efSmrgAC_ARG_ENABLE(selective-werror, 113724e7590efSmrg AS_HELP_STRING([--disable-selective-werror], 113734e7590efSmrg [Turn off selective compiler errors. (default: enabled)]), 113744e7590efSmrg [SELECTIVE_WERROR=$enableval], 113754e7590efSmrg [SELECTIVE_WERROR=yes]) 113764e7590efSmrg 113774e7590efSmrgAC_LANG_CASE( 113784e7590efSmrg [C], [ 113794e7590efSmrg define([PREFIX], [C]) 113804e7590efSmrg ], 113814e7590efSmrg [C++], [ 113824e7590efSmrg define([PREFIX], [CXX]) 113834e7590efSmrg ] 113844e7590efSmrg) 113854e7590efSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 113864e7590efSmrgif test "x$SUNCC" = "xyes"; then 113874e7590efSmrg [BASE_]PREFIX[FLAGS]="-v" 113884e7590efSmrgelse 113894e7590efSmrg [BASE_]PREFIX[FLAGS]="" 113904e7590efSmrgfi 113914b0ead49Smrg 113924e7590efSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 113934e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 113944e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 113954e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 113964e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 113974e7590efSmrg 113984e7590efSmrgAC_LANG_CASE( 113994e7590efSmrg [C], [ 114004e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 114014e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 114024e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 114034e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 114044e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 114054e7590efSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 114064e7590efSmrg ] 114074e7590efSmrg) 114084b0ead49Smrg 114094e7590efSmrg# This chunk adds additional warnings that could catch undesired effects. 114104e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 114114e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 114124e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 114134e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 114144e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 114154e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 114164e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 114174e7590efSmrg 114184e7590efSmrg# These are currently disabled because they are noisy. They will be enabled 114194e7590efSmrg# in the future once the codebase is sufficiently modernized to silence 114204e7590efSmrg# them. For now, I don't want them to drown out the other warnings. 114214e7590efSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 114224e7590efSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 114234e7590efSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 114244e7590efSmrg 114254e7590efSmrg# Turn some warnings into errors, so we don't accidently get successful builds 114264e7590efSmrg# when there are problems that should be fixed. 114274e7590efSmrg 114284e7590efSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 114294e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 114304e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 114314e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 114324e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 114334e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 114344e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 114354e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 114364e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 114374e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 114384e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 114394e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 114404e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 114414e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 114424e7590efSmrgelse 114434e7590efSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 114444e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 114454e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 114464e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 114474e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 114484e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 114494e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 114504e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 114514e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 114524e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 114534e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 114544e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 114554e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 114564e7590efSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 114574e7590efSmrgfi 114584b0ead49Smrg 114594e7590efSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 114604e7590efSmrg]) # XORG_COMPILER_FLAGS 114614b0ead49Smrg 114624e7590efSmrg# XORG_CWARNFLAGS 114634e7590efSmrg# --------------- 114644e7590efSmrg# Minimum version: 1.2.0 114654e7590efSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1146649dc963fSmrg# 114674e7590efSmrg# Defines CWARNFLAGS to enable C compiler warnings. 1146849dc963fSmrg# 114694e7590efSmrg# This function is deprecated because it defines -fno-strict-aliasing 114704e7590efSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 114714e7590efSmrg# is needed, then it should be added explicitly in the module when 114724e7590efSmrg# it is updated to use BASE_CFLAGS. 114734e7590efSmrg# 114744e7590efSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 114754e7590efSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 114764e7590efSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114774e7590efSmrgAC_LANG_CASE( 114784e7590efSmrg [C], [ 114794e7590efSmrg CWARNFLAGS="$BASE_CFLAGS" 114804e7590efSmrg if test "x$GCC" = xyes ; then 114814e7590efSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 114824e7590efSmrg fi 114834e7590efSmrg AC_SUBST(CWARNFLAGS) 114844e7590efSmrg ] 114854e7590efSmrg) 114864e7590efSmrg]) # XORG_CWARNFLAGS 114874b0ead49Smrg 114884e7590efSmrg# XORG_STRICT_OPTION 114894e7590efSmrg# ----------------------- 114904e7590efSmrg# Minimum version: 1.3.0 114914e7590efSmrg# 114924e7590efSmrg# Add configure option to enable strict compilation flags, such as treating 114934e7590efSmrg# warnings as fatal errors. 114944e7590efSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 114954e7590efSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 114964e7590efSmrg# 114974e7590efSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 114984e7590efSmrg# when strict compilation is unconditionally desired. 114994e7590efSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 115004e7590efSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 115014e7590efSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1150252b01e16Smrg 115034e7590efSmrgAC_ARG_ENABLE(strict-compilation, 115044e7590efSmrg AS_HELP_STRING([--enable-strict-compilation], 115054e7590efSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 115064e7590efSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1150752b01e16Smrg 115084e7590efSmrgAC_LANG_CASE( 115094e7590efSmrg [C], [ 115104e7590efSmrg define([PREFIX], [C]) 115114e7590efSmrg ], 115124e7590efSmrg [C++], [ 115134e7590efSmrg define([PREFIX], [CXX]) 115144e7590efSmrg ] 115154e7590efSmrg) 1151649dc963fSmrg 115174e7590efSmrg[STRICT_]PREFIX[FLAGS]="" 115184e7590efSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 115194e7590efSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1152049dc963fSmrg 115214e7590efSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 115224e7590efSmrg# activate it with -Werror, so we add it here explicitly. 115234e7590efSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1152449dc963fSmrg 115254e7590efSmrgif test "x$STRICT_COMPILE" = "xyes"; then 115264e7590efSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 115274e7590efSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 115284e7590efSmrgfi 115294e7590efSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 115304e7590efSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115314e7590efSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 115324e7590efSmrg]) # XORG_STRICT_OPTION 1153349dc963fSmrg 115344e7590efSmrg# XORG_DEFAULT_OPTIONS 115354e7590efSmrg# -------------------- 115364e7590efSmrg# Minimum version: 1.3.0 1153749dc963fSmrg# 115384e7590efSmrg# Defines default options for X.Org modules. 1153949dc963fSmrg# 115404e7590efSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 115414e7590efSmrgAC_REQUIRE([AC_PROG_INSTALL]) 115424e7590efSmrgXORG_COMPILER_FLAGS 115434e7590efSmrgXORG_CWARNFLAGS 115444e7590efSmrgXORG_STRICT_OPTION 115454e7590efSmrgXORG_RELEASE_VERSION 115464e7590efSmrgXORG_CHANGELOG 115474e7590efSmrgXORG_INSTALL 115484e7590efSmrgXORG_MANPAGE_SECTIONS 115494e7590efSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 115504e7590efSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 115514e7590efSmrg]) # XORG_DEFAULT_OPTIONS 115524e7590efSmrg 115534e7590efSmrg# XORG_INSTALL() 115544e7590efSmrg# ---------------- 115554e7590efSmrg# Minimum version: 1.4.0 1155649dc963fSmrg# 115574e7590efSmrg# Defines the variable INSTALL_CMD as the command to copy 115584e7590efSmrg# INSTALL from $prefix/share/util-macros. 1155949dc963fSmrg# 115604e7590efSmrgAC_DEFUN([XORG_INSTALL], [ 115614e7590efSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 115624e7590efSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 115634e7590efSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 115644e7590efSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 115654e7590efSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 115664e7590efSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 115674e7590efSmrgAC_SUBST([INSTALL_CMD]) 115684e7590efSmrg]) # XORG_INSTALL 115694e7590efSmrgdnl Copyright 2005 Red Hat, Inc 115704e7590efSmrgdnl 115714e7590efSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 115724e7590efSmrgdnl documentation for any purpose is hereby granted without fee, provided that 115734e7590efSmrgdnl the above copyright notice appear in all copies and that both that 115744e7590efSmrgdnl copyright notice and this permission notice appear in supporting 115754e7590efSmrgdnl documentation. 115764e7590efSmrgdnl 115774e7590efSmrgdnl The above copyright notice and this permission notice shall be included 115784e7590efSmrgdnl in all copies or substantial portions of the Software. 115794e7590efSmrgdnl 115804e7590efSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 115814e7590efSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 115824e7590efSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 115834e7590efSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 115844e7590efSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 115854e7590efSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 115864e7590efSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 115874e7590efSmrgdnl 115884e7590efSmrgdnl Except as contained in this notice, the name of the copyright holders shall 115894e7590efSmrgdnl not be used in advertising or otherwise to promote the sale, use or 115904e7590efSmrgdnl other dealings in this Software without prior written authorization 115914e7590efSmrgdnl from the copyright holders. 115924e7590efSmrgdnl 1159349dc963fSmrg 115944e7590efSmrg# XORG_RELEASE_VERSION 115954e7590efSmrg# -------------------- 115964e7590efSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 115974e7590efSmrg 115984e7590efSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 115994e7590efSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 116004e7590efSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 116014e7590efSmrg [Major version of this package]) 116024e7590efSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 116034e7590efSmrg if test "x$PVM" = "x"; then 116044e7590efSmrg PVM="0" 116054e7590efSmrg fi 116064e7590efSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 116074e7590efSmrg [$PVM], 116084e7590efSmrg [Minor version of this package]) 116094e7590efSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 116104e7590efSmrg if test "x$PVP" = "x"; then 116114e7590efSmrg PVP="0" 116124e7590efSmrg fi 116134e7590efSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 116144e7590efSmrg [$PVP], 116154e7590efSmrg [Patch version of this package]) 116164e7590efSmrg]) 1161749dc963fSmrg 116184e7590efSmrg# XORG_CHANGELOG() 116194e7590efSmrg# ---------------- 116204e7590efSmrg# Minimum version: 1.2.0 116214e7590efSmrg# 116224e7590efSmrg# Defines the variable CHANGELOG_CMD as the command to generate 116234e7590efSmrg# ChangeLog from git. 116244e7590efSmrg# 116254e7590efSmrg# 116264e7590efSmrgAC_DEFUN([XORG_CHANGELOG], [ 116274e7590efSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 116284e7590efSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 116294e7590efSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 116304e7590efSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 116314e7590efSmrgAC_SUBST([CHANGELOG_CMD]) 116324e7590efSmrg]) # XORG_CHANGELOG 116334b0ead49Smrg 11634