aclocal.m4 revision 70728a38
170728a38Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 270728a38Smrg 370728a38Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 48c9fbc29Smrg 58c9fbc29Smrg# This file is free software; the Free Software Foundation 68c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 78c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 88c9fbc29Smrg 98c9fbc29Smrg# This program is distributed in the hope that it will be useful, 108c9fbc29Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 118c9fbc29Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 128c9fbc29Smrg# PARTICULAR PURPOSE. 138c9fbc29Smrg 1470728a38Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 154e411241Smrgm4_ifndef([AC_AUTOCONF_VERSION], 164e411241Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1770728a38Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1870728a38Smrg[m4_warning([this file was generated for autoconf 2.69. 194e411241SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 204e411241SmrgIf you have problems, you may need to regenerate the build system entirely. 2170728a38SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 228c9fbc29Smrg 2370728a38Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 248c9fbc29Smrg# 258c9fbc29Smrg# This file is free software; the Free Software Foundation 268c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 278c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 288c9fbc29Smrg 298c9fbc29Smrg# AM_AUTOMAKE_VERSION(VERSION) 308c9fbc29Smrg# ---------------------------- 318c9fbc29Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 328c9fbc29Smrg# generated from the m4 files accompanying Automake X.Y. 338c9fbc29Smrg# (This private macro should not be called outside this file.) 348c9fbc29SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3570728a38Smrg[am__api_version='1.15' 368c9fbc29Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 378c9fbc29Smrgdnl require some minimum version. Point them to the right macro. 3870728a38Smrgm4_if([$1], [1.15], [], 398c9fbc29Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 408c9fbc29Smrg]) 418c9fbc29Smrg 428c9fbc29Smrg# _AM_AUTOCONF_VERSION(VERSION) 438c9fbc29Smrg# ----------------------------- 448c9fbc29Smrg# aclocal traces this macro to find the Autoconf version. 458c9fbc29Smrg# This is a private macro too. Using m4_define simplifies 468c9fbc29Smrg# the logic in aclocal, which can simply ignore this definition. 478c9fbc29Smrgm4_define([_AM_AUTOCONF_VERSION], []) 488c9fbc29Smrg 498c9fbc29Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 508c9fbc29Smrg# ------------------------------- 518c9fbc29Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 524e411241Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 538c9fbc29SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5470728a38Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 554e411241Smrgm4_ifndef([AC_AUTOCONF_VERSION], 564e411241Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 574e411241Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 588c9fbc29Smrg 598c9fbc29Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 608c9fbc29Smrg 6170728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 628c9fbc29Smrg# 638c9fbc29Smrg# This file is free software; the Free Software Foundation 648c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 658c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 668c9fbc29Smrg 678c9fbc29Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6870728a38Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 6970728a38Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 708c9fbc29Smrg# 718c9fbc29Smrg# Of course, Automake must honor this variable whenever it calls a 728c9fbc29Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 738c9fbc29Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 748c9fbc29Smrg# depending on how configure is run. This is pretty annoying, since 758c9fbc29Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 768c9fbc29Smrg# source directory, any form will work fine, but in subdirectories a 778c9fbc29Smrg# relative path needs to be adjusted first. 788c9fbc29Smrg# 798c9fbc29Smrg# $ac_aux_dir/missing 808c9fbc29Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 818c9fbc29Smrg# $top_srcdir/$ac_aux_dir/missing 828c9fbc29Smrg# fails if $ac_aux_dir is absolute, 838c9fbc29Smrg# fails when called from a subdirectory in a VPATH build with 848c9fbc29Smrg# a relative $ac_aux_dir 858c9fbc29Smrg# 868c9fbc29Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 878c9fbc29Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8870728a38Smrg# harmless because $srcdir is '.', but things will broke when you 898c9fbc29Smrg# start a VPATH build or use an absolute $srcdir. 908c9fbc29Smrg# 918c9fbc29Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 928c9fbc29Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 938c9fbc29Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 948c9fbc29Smrg# and then we would define $MISSING as 958c9fbc29Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 968c9fbc29Smrg# This will work as long as MISSING is not called from configure, because 978c9fbc29Smrg# unfortunately $(top_srcdir) has no meaning in configure. 988c9fbc29Smrg# However there are other variables, like CC, which are often used in 998c9fbc29Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1008c9fbc29Smrg# 1018c9fbc29Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1028c9fbc29Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1038c9fbc29Smrg# configured tree to be moved without reconfiguration. 1048c9fbc29Smrg 1058c9fbc29SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10670728a38Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10770728a38Smrg# Expand $ac_aux_dir to an absolute path. 10870728a38Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1098c9fbc29Smrg]) 1108c9fbc29Smrg 1118c9fbc29Smrg# AM_CONDITIONAL -*- Autoconf -*- 1128c9fbc29Smrg 11370728a38Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 1148c9fbc29Smrg# 1158c9fbc29Smrg# This file is free software; the Free Software Foundation 1168c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 1178c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 1188c9fbc29Smrg 1198c9fbc29Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1208c9fbc29Smrg# ------------------------------------- 1218c9fbc29Smrg# Define a conditional. 1228c9fbc29SmrgAC_DEFUN([AM_CONDITIONAL], 12370728a38Smrg[AC_PREREQ([2.52])dnl 12470728a38Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12570728a38Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1268c9fbc29SmrgAC_SUBST([$1_TRUE])dnl 1278c9fbc29SmrgAC_SUBST([$1_FALSE])dnl 1288c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1298c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1304e411241Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1318c9fbc29Smrgif $2; then 1328c9fbc29Smrg $1_TRUE= 1338c9fbc29Smrg $1_FALSE='#' 1348c9fbc29Smrgelse 1358c9fbc29Smrg $1_TRUE='#' 1368c9fbc29Smrg $1_FALSE= 1378c9fbc29Smrgfi 1388c9fbc29SmrgAC_CONFIG_COMMANDS_PRE( 1398c9fbc29Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1408c9fbc29Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1418c9fbc29SmrgUsually this means the macro was only invoked conditionally.]]) 1428c9fbc29Smrgfi])]) 1438c9fbc29Smrg 14470728a38Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1458c9fbc29Smrg# 1468c9fbc29Smrg# This file is free software; the Free Software Foundation 1478c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 1488c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 1498c9fbc29Smrg 1508c9fbc29Smrg 15170728a38Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1528c9fbc29Smrg# written in clear, in which case automake, when reading aclocal.m4, 1538c9fbc29Smrg# will think it sees a *use*, and therefore will trigger all it's 1548c9fbc29Smrg# C support machinery. Also note that it means that autoscan, seeing 1558c9fbc29Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1568c9fbc29Smrg 1578c9fbc29Smrg 1588c9fbc29Smrg# _AM_DEPENDENCIES(NAME) 1598c9fbc29Smrg# ---------------------- 1608c9fbc29Smrg# See how the compiler implements dependency checking. 16170728a38Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1628c9fbc29Smrg# We try a few techniques and use that to set a single cache variable. 1638c9fbc29Smrg# 1648c9fbc29Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1658c9fbc29Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1668c9fbc29Smrg# dependency, and given that the user is not expected to run this macro, 1678c9fbc29Smrg# just rely on AC_PROG_CC. 1688c9fbc29SmrgAC_DEFUN([_AM_DEPENDENCIES], 1698c9fbc29Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1708c9fbc29SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1718c9fbc29SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1728c9fbc29SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1738c9fbc29Smrg 17470728a38Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 17570728a38Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 17670728a38Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 17770728a38Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 17870728a38Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 17970728a38Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18070728a38Smrg [depcc="$$1" am_compiler_list=]) 1818c9fbc29Smrg 1828c9fbc29SmrgAC_CACHE_CHECK([dependency style of $depcc], 1838c9fbc29Smrg [am_cv_$1_dependencies_compiler_type], 1848c9fbc29Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1858c9fbc29Smrg # We make a subdir and do the tests there. Otherwise we can end up 1868c9fbc29Smrg # making bogus files that we don't know about and never remove. For 1878c9fbc29Smrg # instance it was reported that on HP-UX the gcc test will end up 18870728a38Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 18970728a38Smrg # in D". 19070728a38Smrg rm -rf conftest.dir 1918c9fbc29Smrg mkdir conftest.dir 1928c9fbc29Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1938c9fbc29Smrg # using a relative directory. 1948c9fbc29Smrg cp "$am_depcomp" conftest.dir 1958c9fbc29Smrg cd conftest.dir 1968c9fbc29Smrg # We will build objects and dependencies in a subdirectory because 1978c9fbc29Smrg # it helps to detect inapplicable dependency modes. For instance 1988c9fbc29Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1998c9fbc29Smrg # side effect of compilation, but ICC will put the dependencies in 2008c9fbc29Smrg # the current directory while Tru64 will put them in the object 2018c9fbc29Smrg # directory. 2028c9fbc29Smrg mkdir sub 2038c9fbc29Smrg 2048c9fbc29Smrg am_cv_$1_dependencies_compiler_type=none 2058c9fbc29Smrg if test "$am_compiler_list" = ""; then 2068c9fbc29Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2078c9fbc29Smrg fi 2084e411241Smrg am__universal=false 2094e411241Smrg m4_case([$1], [CC], 2104e411241Smrg [case " $depcc " in #( 2114e411241Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2124e411241Smrg esac], 2134e411241Smrg [CXX], 2144e411241Smrg [case " $depcc " in #( 2154e411241Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2164e411241Smrg esac]) 2174e411241Smrg 2188c9fbc29Smrg for depmode in $am_compiler_list; do 2198c9fbc29Smrg # Setup a source with many dependencies, because some compilers 2208c9fbc29Smrg # like to wrap large dependency lists on column 80 (with \), and 2218c9fbc29Smrg # we should not choose a depcomp mode which is confused by this. 2228c9fbc29Smrg # 2238c9fbc29Smrg # We need to recreate these files for each test, as the compiler may 2248c9fbc29Smrg # overwrite some of them when testing with obscure command lines. 2258c9fbc29Smrg # This happens at least with the AIX C compiler. 2268c9fbc29Smrg : > sub/conftest.c 2278c9fbc29Smrg for i in 1 2 3 4 5 6; do 2288c9fbc29Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 22970728a38Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 23070728a38Smrg # Solaris 10 /bin/sh. 23170728a38Smrg echo '/* dummy */' > sub/conftst$i.h 2328c9fbc29Smrg done 2338c9fbc29Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2348c9fbc29Smrg 23570728a38Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2364e411241Smrg # mode. It turns out that the SunPro C++ compiler does not properly 23770728a38Smrg # handle '-M -o', and we need to detect this. Also, some Intel 23870728a38Smrg # versions had trouble with output in subdirs. 2394e411241Smrg am__obj=sub/conftest.${OBJEXT-o} 2404e411241Smrg am__minus_obj="-o $am__obj" 2418c9fbc29Smrg case $depmode in 2424e411241Smrg gcc) 2434e411241Smrg # This depmode causes a compiler race in universal mode. 2444e411241Smrg test "$am__universal" = false || continue 2454e411241Smrg ;; 2468c9fbc29Smrg nosideeffect) 24770728a38Smrg # After this tag, mechanisms are not by side-effect, so they'll 24870728a38Smrg # only be used when explicitly requested. 2498c9fbc29Smrg if test "x$enable_dependency_tracking" = xyes; then 2508c9fbc29Smrg continue 2518c9fbc29Smrg else 2528c9fbc29Smrg break 2538c9fbc29Smrg fi 2548c9fbc29Smrg ;; 25570728a38Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 25670728a38Smrg # This compiler won't grok '-c -o', but also, the minuso test has 2574e411241Smrg # not run yet. These depmodes are late enough in the game, and 2584e411241Smrg # so weak that their functioning should not be impacted. 2594e411241Smrg am__obj=conftest.${OBJEXT-o} 2604e411241Smrg am__minus_obj= 2614e411241Smrg ;; 2628c9fbc29Smrg none) break ;; 2638c9fbc29Smrg esac 2648c9fbc29Smrg if depmode=$depmode \ 2654e411241Smrg source=sub/conftest.c object=$am__obj \ 2668c9fbc29Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2674e411241Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2688c9fbc29Smrg >/dev/null 2>conftest.err && 2698c9fbc29Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2708c9fbc29Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2714e411241Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2728c9fbc29Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2738c9fbc29Smrg # icc doesn't choke on unknown options, it will just issue warnings 2748c9fbc29Smrg # or remarks (even with -Werror). So we grep stderr for any message 2758c9fbc29Smrg # that says an option was ignored or not supported. 2768c9fbc29Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2778c9fbc29Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2788c9fbc29Smrg # The diagnosis changed in icc 8.0: 2798c9fbc29Smrg # icc: Command line remark: option '-MP' not supported 2808c9fbc29Smrg if (grep 'ignoring option' conftest.err || 2818c9fbc29Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2828c9fbc29Smrg am_cv_$1_dependencies_compiler_type=$depmode 2838c9fbc29Smrg break 2848c9fbc29Smrg fi 2858c9fbc29Smrg fi 2868c9fbc29Smrg done 2878c9fbc29Smrg 2888c9fbc29Smrg cd .. 2898c9fbc29Smrg rm -rf conftest.dir 2908c9fbc29Smrgelse 2918c9fbc29Smrg am_cv_$1_dependencies_compiler_type=none 2928c9fbc29Smrgfi 2938c9fbc29Smrg]) 2948c9fbc29SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2958c9fbc29SmrgAM_CONDITIONAL([am__fastdep$1], [ 2968c9fbc29Smrg test "x$enable_dependency_tracking" != xno \ 2978c9fbc29Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2988c9fbc29Smrg]) 2998c9fbc29Smrg 3008c9fbc29Smrg 3018c9fbc29Smrg# AM_SET_DEPDIR 3028c9fbc29Smrg# ------------- 3038c9fbc29Smrg# Choose a directory name for dependency files. 30470728a38Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3058c9fbc29SmrgAC_DEFUN([AM_SET_DEPDIR], 3068c9fbc29Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3078c9fbc29SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3088c9fbc29Smrg]) 3098c9fbc29Smrg 3108c9fbc29Smrg 3118c9fbc29Smrg# AM_DEP_TRACK 3128c9fbc29Smrg# ------------ 3138c9fbc29SmrgAC_DEFUN([AM_DEP_TRACK], 31470728a38Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 31570728a38SmrgAS_HELP_STRING( 31670728a38Smrg [--enable-dependency-tracking], 31770728a38Smrg [do not reject slow dependency extractors]) 31870728a38SmrgAS_HELP_STRING( 31970728a38Smrg [--disable-dependency-tracking], 32070728a38Smrg [speeds up one-time build])]) 3218c9fbc29Smrgif test "x$enable_dependency_tracking" != xno; then 3228c9fbc29Smrg am_depcomp="$ac_aux_dir/depcomp" 3238c9fbc29Smrg AMDEPBACKSLASH='\' 32470728a38Smrg am__nodep='_no' 3258c9fbc29Smrgfi 3268c9fbc29SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3278c9fbc29SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3288c9fbc29Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32970728a38SmrgAC_SUBST([am__nodep])dnl 33070728a38Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3318c9fbc29Smrg]) 3328c9fbc29Smrg 3338c9fbc29Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3348c9fbc29Smrg 33570728a38Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 3368c9fbc29Smrg# 3378c9fbc29Smrg# This file is free software; the Free Software Foundation 3388c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 3398c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 3408c9fbc29Smrg 3418c9fbc29Smrg 3428c9fbc29Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3438c9fbc29Smrg# ------------------------------ 3448c9fbc29SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3454e411241Smrg[{ 34670728a38Smrg # Older Autoconf quotes --file arguments for eval, but not when files 3474e411241Smrg # are listed without --file. Let's play safe and only enable the eval 3484e411241Smrg # if we detect the quoting. 3494e411241Smrg case $CONFIG_FILES in 3504e411241Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3514e411241Smrg *) set x $CONFIG_FILES ;; 3524e411241Smrg esac 3534e411241Smrg shift 3544e411241Smrg for mf 3554e411241Smrg do 3564e411241Smrg # Strip MF so we end up with the name of the file. 3574e411241Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3584e411241Smrg # Check whether this is an Automake generated Makefile or not. 35970728a38Smrg # We used to match only the files named 'Makefile.in', but 3604e411241Smrg # some people rename them; so instead we look at the file content. 3614e411241Smrg # Grep'ing the first line is not enough: some people post-process 3624e411241Smrg # each Makefile.in and add a new line on top of each file to say so. 3634e411241Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3644e411241Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3654e411241Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3664e411241Smrg dirpart=`AS_DIRNAME("$mf")` 3674e411241Smrg else 3684e411241Smrg continue 3694e411241Smrg fi 3704e411241Smrg # Extract the definition of DEPDIR, am__include, and am__quote 37170728a38Smrg # from the Makefile without running 'make'. 3724e411241Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3734e411241Smrg test -z "$DEPDIR" && continue 3744e411241Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37570728a38Smrg test -z "$am__include" && continue 3764e411241Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3774e411241Smrg # Find all dependency output files, they are included files with 3784e411241Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3794e411241Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3804e411241Smrg # expansion. 3814e411241Smrg for file in `sed -n " 3824e411241Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38370728a38Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3844e411241Smrg # Make sure the directory exists. 3854e411241Smrg test -f "$dirpart/$file" && continue 3864e411241Smrg fdir=`AS_DIRNAME(["$file"])` 3874e411241Smrg AS_MKDIR_P([$dirpart/$fdir]) 3884e411241Smrg # echo "creating $dirpart/$file" 3894e411241Smrg echo '# dummy' > "$dirpart/$file" 3904e411241Smrg done 3918c9fbc29Smrg done 3924e411241Smrg} 3938c9fbc29Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3948c9fbc29Smrg 3958c9fbc29Smrg 3968c9fbc29Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3978c9fbc29Smrg# ----------------------------- 3988c9fbc29Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3998c9fbc29Smrg# 4008c9fbc29Smrg# This code is only required when automatic dependency tracking 40170728a38Smrg# is enabled. FIXME. This creates each '.P' file that we will 4028c9fbc29Smrg# need in order to bootstrap the dependency handling code. 4038c9fbc29SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4048c9fbc29Smrg[AC_CONFIG_COMMANDS([depfiles], 4058c9fbc29Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4068c9fbc29Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4078c9fbc29Smrg]) 4088c9fbc29Smrg 4098c9fbc29Smrg# Do all the work for Automake. -*- Autoconf -*- 4108c9fbc29Smrg 41170728a38Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4128c9fbc29Smrg# 4138c9fbc29Smrg# This file is free software; the Free Software Foundation 4148c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 4158c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 4168c9fbc29Smrg 4178c9fbc29Smrg# This macro actually does too much. Some checks are only needed if 4188c9fbc29Smrg# your package does certain things. But this isn't really a big deal. 4198c9fbc29Smrg 42070728a38Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 42170728a38Smrgm4_define([AC_PROG_CC], 42270728a38Smrgm4_defn([AC_PROG_CC]) 42370728a38Smrg[_AM_PROG_CC_C_O 42470728a38Smrg]) 42570728a38Smrg 4268c9fbc29Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4278c9fbc29Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4288c9fbc29Smrg# ----------------------------------------------- 4298c9fbc29Smrg# The call with PACKAGE and VERSION arguments is the old style 4308c9fbc29Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4318c9fbc29Smrg# and VERSION should now be passed to AC_INIT and removed from 4328c9fbc29Smrg# the call to AM_INIT_AUTOMAKE. 4338c9fbc29Smrg# We support both call styles for the transition. After 4348c9fbc29Smrg# the next Automake release, Autoconf can make the AC_INIT 4358c9fbc29Smrg# arguments mandatory, and then we can depend on a new Autoconf 4368c9fbc29Smrg# release and drop the old call support. 4378c9fbc29SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43870728a38Smrg[AC_PREREQ([2.65])dnl 4398c9fbc29Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4408c9fbc29Smrgdnl the ones we care about. 4418c9fbc29Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4428c9fbc29SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4438c9fbc29SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4448c9fbc29Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4458c9fbc29Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4468c9fbc29Smrg # is not polluted with repeated "-I." 4478c9fbc29Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4488c9fbc29Smrg # test to see if srcdir already configured 4498c9fbc29Smrg if test -f $srcdir/config.status; then 4508c9fbc29Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4518c9fbc29Smrg fi 4528c9fbc29Smrgfi 4538c9fbc29Smrg 4548c9fbc29Smrg# test whether we have cygpath 4558c9fbc29Smrgif test -z "$CYGPATH_W"; then 4568c9fbc29Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4578c9fbc29Smrg CYGPATH_W='cygpath -w' 4588c9fbc29Smrg else 4598c9fbc29Smrg CYGPATH_W=echo 4608c9fbc29Smrg fi 4618c9fbc29Smrgfi 4628c9fbc29SmrgAC_SUBST([CYGPATH_W]) 4638c9fbc29Smrg 4648c9fbc29Smrg# Define the identity of the package. 4658c9fbc29Smrgdnl Distinguish between old-style and new-style calls. 4668c9fbc29Smrgm4_ifval([$2], 46770728a38Smrg[AC_DIAGNOSE([obsolete], 46870728a38Smrg [$0: two- and three-arguments forms are deprecated.]) 46970728a38Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4708c9fbc29Smrg AC_SUBST([PACKAGE], [$1])dnl 4718c9fbc29Smrg AC_SUBST([VERSION], [$2])], 4728c9fbc29Smrg[_AM_SET_OPTIONS([$1])dnl 4738c9fbc29Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 47470728a38Smrgm4_if( 47570728a38Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 47670728a38Smrg [ok:ok],, 4778c9fbc29Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4788c9fbc29Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4798c9fbc29Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4808c9fbc29Smrg 4818c9fbc29Smrg_AM_IF_OPTION([no-define],, 48270728a38Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 48370728a38Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4848c9fbc29Smrg 4858c9fbc29Smrg# Some tools Automake needs. 4868c9fbc29SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4878c9fbc29SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48870728a38SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 48970728a38SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 49070728a38SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 49170728a38SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 49270728a38SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4934e411241SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4944e411241SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49570728a38SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 49670728a38Smrg# For better backward compatibility. To be removed once Automake 1.9.x 49770728a38Smrg# dies out for good. For more background, see: 49870728a38Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 49970728a38Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 50070728a38SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 50170728a38Smrg# We need awk for the "check" target (and possibly the TAP driver). The 50270728a38Smrg# system "awk" is bad on some platforms. 5038c9fbc29SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5048c9fbc29SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5058c9fbc29SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5068c9fbc29Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5074e411241Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5084e411241Smrg [_AM_PROG_TAR([v7])])]) 5098c9fbc29Smrg_AM_IF_OPTION([no-dependencies],, 5108c9fbc29Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51170728a38Smrg [_AM_DEPENDENCIES([CC])], 51270728a38Smrg [m4_define([AC_PROG_CC], 51370728a38Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5148c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51570728a38Smrg [_AM_DEPENDENCIES([CXX])], 51670728a38Smrg [m4_define([AC_PROG_CXX], 51770728a38Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5188c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51970728a38Smrg [_AM_DEPENDENCIES([OBJC])], 52070728a38Smrg [m4_define([AC_PROG_OBJC], 52170728a38Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 52270728a38SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 52370728a38Smrg [_AM_DEPENDENCIES([OBJCXX])], 52470728a38Smrg [m4_define([AC_PROG_OBJCXX], 52570728a38Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5268c9fbc29Smrg]) 52770728a38SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 52870728a38Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 52970728a38Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 53070728a38Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5314e411241SmrgAC_CONFIG_COMMANDS_PRE(dnl 5324e411241Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5334e411241Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53470728a38Smrg 53570728a38Smrg# POSIX will say in a future version that running "rm -f" with no argument 53670728a38Smrg# is OK; and we want to be able to make that assumption in our Makefile 53770728a38Smrg# recipes. So use an aggressive probe to check that the usage we want is 53870728a38Smrg# actually supported "in the wild" to an acceptable degree. 53970728a38Smrg# See automake bug#10828. 54070728a38Smrg# To make any issue more visible, cause the running configure to be aborted 54170728a38Smrg# by default if the 'rm' program in use doesn't match our expectations; the 54270728a38Smrg# user can still override this though. 54370728a38Smrgif rm -f && rm -fr && rm -rf; then : OK; else 54470728a38Smrg cat >&2 <<'END' 54570728a38SmrgOops! 54670728a38Smrg 54770728a38SmrgYour 'rm' program seems unable to run without file operands specified 54870728a38Smrgon the command line, even when the '-f' option is present. This is contrary 54970728a38Smrgto the behaviour of most rm programs out there, and not conforming with 55070728a38Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 55170728a38Smrg 55270728a38SmrgPlease tell bug-automake@gnu.org about your system, including the value 55370728a38Smrgof your $PATH and any error possibly output before this message. This 55470728a38Smrgcan help us improve future automake versions. 55570728a38Smrg 55670728a38SmrgEND 55770728a38Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 55870728a38Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 55970728a38Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 56070728a38Smrg echo >&2 56170728a38Smrg else 56270728a38Smrg cat >&2 <<'END' 56370728a38SmrgAborting the configuration process, to ensure you take notice of the issue. 56470728a38Smrg 56570728a38SmrgYou can download and install GNU coreutils to get an 'rm' implementation 56670728a38Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 56770728a38Smrg 56870728a38SmrgIf you want to complete the configuration process using your problematic 56970728a38Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 57070728a38Smrgto "yes", and re-run configure. 57170728a38Smrg 57270728a38SmrgEND 57370728a38Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 57470728a38Smrg fi 57570728a38Smrgfi 57670728a38Smrgdnl The trailing newline in this macro's definition is deliberate, for 57770728a38Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 57870728a38Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5798c9fbc29Smrg]) 5808c9fbc29Smrg 58170728a38Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5824e411241Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5834e411241Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5844e411241Smrgm4_define([_AC_COMPILER_EXEEXT], 5854e411241Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5864e411241Smrg 5878c9fbc29Smrg# When config.status generates a header, we must update the stamp-h file. 5888c9fbc29Smrg# This file resides in the same directory as the config header 5898c9fbc29Smrg# that is generated. The stamp files are numbered to have different names. 5908c9fbc29Smrg 5918c9fbc29Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5928c9fbc29Smrg# loop where config.status creates the headers, so we can generate 5938c9fbc29Smrg# our stamp files there. 5948c9fbc29SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5958c9fbc29Smrg[# Compute $1's index in $config_headers. 5964e411241Smrg_am_arg=$1 5978c9fbc29Smrg_am_stamp_count=1 5988c9fbc29Smrgfor _am_header in $config_headers :; do 5998c9fbc29Smrg case $_am_header in 6004e411241Smrg $_am_arg | $_am_arg:* ) 6018c9fbc29Smrg break ;; 6028c9fbc29Smrg * ) 6038c9fbc29Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6048c9fbc29Smrg esac 6058c9fbc29Smrgdone 6064e411241Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 6078c9fbc29Smrg 60870728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 6098c9fbc29Smrg# 6108c9fbc29Smrg# This file is free software; the Free Software Foundation 6118c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 6128c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 6138c9fbc29Smrg 6148c9fbc29Smrg# AM_PROG_INSTALL_SH 6158c9fbc29Smrg# ------------------ 6168c9fbc29Smrg# Define $install_sh. 6178c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6188c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 61970728a38Smrgif test x"${install_sh+set}" != xset; then 6204e411241Smrg case $am_aux_dir in 6214e411241Smrg *\ * | *\ *) 6224e411241Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6234e411241Smrg *) 6244e411241Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6254e411241Smrg esac 6264e411241Smrgfi 62770728a38SmrgAC_SUBST([install_sh])]) 6288c9fbc29Smrg 62970728a38Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 6308c9fbc29Smrg# 6318c9fbc29Smrg# This file is free software; the Free Software Foundation 6328c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 6338c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 6348c9fbc29Smrg 6358c9fbc29Smrg# Check whether the underlying file-system supports filenames 6368c9fbc29Smrg# with a leading dot. For instance MS-DOS doesn't. 6378c9fbc29SmrgAC_DEFUN([AM_SET_LEADING_DOT], 6388c9fbc29Smrg[rm -rf .tst 2>/dev/null 6398c9fbc29Smrgmkdir .tst 2>/dev/null 6408c9fbc29Smrgif test -d .tst; then 6418c9fbc29Smrg am__leading_dot=. 6428c9fbc29Smrgelse 6438c9fbc29Smrg am__leading_dot=_ 6448c9fbc29Smrgfi 6458c9fbc29Smrgrmdir .tst 2>/dev/null 6468c9fbc29SmrgAC_SUBST([am__leading_dot])]) 6478c9fbc29Smrg 6488c9fbc29Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6498c9fbc29Smrg 65070728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 6518c9fbc29Smrg# 6528c9fbc29Smrg# This file is free software; the Free Software Foundation 6538c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 6548c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 6558c9fbc29Smrg 6568c9fbc29Smrg# AM_MAKE_INCLUDE() 6578c9fbc29Smrg# ----------------- 6588c9fbc29Smrg# Check to see how make treats includes. 6598c9fbc29SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6608c9fbc29Smrg[am_make=${MAKE-make} 6618c9fbc29Smrgcat > confinc << 'END' 6628c9fbc29Smrgam__doit: 6634e411241Smrg @echo this is the am__doit target 6648c9fbc29Smrg.PHONY: am__doit 6658c9fbc29SmrgEND 6668c9fbc29Smrg# If we don't find an include directive, just comment out the code. 6678c9fbc29SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6688c9fbc29Smrgam__include="#" 6698c9fbc29Smrgam__quote= 6708c9fbc29Smrg_am_result=none 6718c9fbc29Smrg# First try GNU make style include. 6728c9fbc29Smrgecho "include confinc" > confmf 67370728a38Smrg# Ignore all kinds of additional output from 'make'. 6744e411241Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6754e411241Smrg*the\ am__doit\ target*) 6764e411241Smrg am__include=include 6774e411241Smrg am__quote= 6784e411241Smrg _am_result=GNU 6794e411241Smrg ;; 6804e411241Smrgesac 6818c9fbc29Smrg# Now try BSD make style include. 6828c9fbc29Smrgif test "$am__include" = "#"; then 6838c9fbc29Smrg echo '.include "confinc"' > confmf 6844e411241Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6854e411241Smrg *the\ am__doit\ target*) 6864e411241Smrg am__include=.include 6874e411241Smrg am__quote="\"" 6884e411241Smrg _am_result=BSD 6894e411241Smrg ;; 6904e411241Smrg esac 6918c9fbc29Smrgfi 6928c9fbc29SmrgAC_SUBST([am__include]) 6938c9fbc29SmrgAC_SUBST([am__quote]) 6948c9fbc29SmrgAC_MSG_RESULT([$_am_result]) 6958c9fbc29Smrgrm -f confinc confmf 6968c9fbc29Smrg]) 6978c9fbc29Smrg 6988c9fbc29Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6998c9fbc29Smrg 70070728a38Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 7018c9fbc29Smrg# 7028c9fbc29Smrg# This file is free software; the Free Software Foundation 7038c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 7048c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 7058c9fbc29Smrg 7068c9fbc29Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7078c9fbc29Smrg# ------------------------------ 7088c9fbc29SmrgAC_DEFUN([AM_MISSING_PROG], 7098c9fbc29Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7108c9fbc29Smrg$1=${$1-"${am_missing_run}$2"} 7118c9fbc29SmrgAC_SUBST($1)]) 7128c9fbc29Smrg 7138c9fbc29Smrg# AM_MISSING_HAS_RUN 7148c9fbc29Smrg# ------------------ 71570728a38Smrg# Define MISSING if not defined so far and test if it is modern enough. 71670728a38Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7178c9fbc29SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7188c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7198c9fbc29SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7204e411241Smrgif test x"${MISSING+set}" != xset; then 7214e411241Smrg case $am_aux_dir in 7224e411241Smrg *\ * | *\ *) 7234e411241Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7244e411241Smrg *) 7254e411241Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7264e411241Smrg esac 7274e411241Smrgfi 7288c9fbc29Smrg# Use eval to expand $SHELL 72970728a38Smrgif eval "$MISSING --is-lightweight"; then 73070728a38Smrg am_missing_run="$MISSING " 7318c9fbc29Smrgelse 7328c9fbc29Smrg am_missing_run= 73370728a38Smrg AC_MSG_WARN(['missing' script is too old or missing]) 7348c9fbc29Smrgfi 7358c9fbc29Smrg]) 7368c9fbc29Smrg 7378c9fbc29Smrg# Helper functions for option handling. -*- Autoconf -*- 7388c9fbc29Smrg 73970728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 7408c9fbc29Smrg# 7418c9fbc29Smrg# This file is free software; the Free Software Foundation 7428c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 7438c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 7448c9fbc29Smrg 7458c9fbc29Smrg# _AM_MANGLE_OPTION(NAME) 7468c9fbc29Smrg# ----------------------- 7478c9fbc29SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7488c9fbc29Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7498c9fbc29Smrg 7508c9fbc29Smrg# _AM_SET_OPTION(NAME) 75170728a38Smrg# -------------------- 7528c9fbc29Smrg# Set option NAME. Presently that only means defining a flag for this option. 7538c9fbc29SmrgAC_DEFUN([_AM_SET_OPTION], 75470728a38Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7558c9fbc29Smrg 7568c9fbc29Smrg# _AM_SET_OPTIONS(OPTIONS) 75770728a38Smrg# ------------------------ 7588c9fbc29Smrg# OPTIONS is a space-separated list of Automake options. 7598c9fbc29SmrgAC_DEFUN([_AM_SET_OPTIONS], 7604e411241Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7618c9fbc29Smrg 7628c9fbc29Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7638c9fbc29Smrg# ------------------------------------------- 7648c9fbc29Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7658c9fbc29SmrgAC_DEFUN([_AM_IF_OPTION], 7668c9fbc29Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7678c9fbc29Smrg 76870728a38Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 76970728a38Smrg# 77070728a38Smrg# This file is free software; the Free Software Foundation 77170728a38Smrg# gives unlimited permission to copy and/or distribute it, 77270728a38Smrg# with or without modifications, as long as this notice is preserved. 77370728a38Smrg 77470728a38Smrg# _AM_PROG_CC_C_O 77570728a38Smrg# --------------- 77670728a38Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 77770728a38Smrg# to automatically call this. 77870728a38SmrgAC_DEFUN([_AM_PROG_CC_C_O], 77970728a38Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 78070728a38SmrgAC_REQUIRE_AUX_FILE([compile])dnl 78170728a38SmrgAC_LANG_PUSH([C])dnl 78270728a38SmrgAC_CACHE_CHECK( 78370728a38Smrg [whether $CC understands -c and -o together], 78470728a38Smrg [am_cv_prog_cc_c_o], 78570728a38Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 78670728a38Smrg # Make sure it works both with $CC and with simple cc. 78770728a38Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 78870728a38Smrg # compilers refuse to overwrite an existing .o file with -o, 78970728a38Smrg # though they will create one. 79070728a38Smrg am_cv_prog_cc_c_o=yes 79170728a38Smrg for am_i in 1 2; do 79270728a38Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 79370728a38Smrg && test -f conftest2.$ac_objext; then 79470728a38Smrg : OK 79570728a38Smrg else 79670728a38Smrg am_cv_prog_cc_c_o=no 79770728a38Smrg break 79870728a38Smrg fi 79970728a38Smrg done 80070728a38Smrg rm -f core conftest* 80170728a38Smrg unset am_i]) 80270728a38Smrgif test "$am_cv_prog_cc_c_o" != yes; then 80370728a38Smrg # Losing compiler, so override with the script. 80470728a38Smrg # FIXME: It is wrong to rewrite CC. 80570728a38Smrg # But if we don't then we get into trouble of one sort or another. 80670728a38Smrg # A longer-term fix would be to have automake use am__CC in this case, 80770728a38Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 80870728a38Smrg CC="$am_aux_dir/compile $CC" 80970728a38Smrgfi 81070728a38SmrgAC_LANG_POP([C])]) 8118c9fbc29Smrg 81270728a38Smrg# For backward compatibility. 81370728a38SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 81470728a38Smrg 81570728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 8168c9fbc29Smrg# 8178c9fbc29Smrg# This file is free software; the Free Software Foundation 8188c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 8198c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 8208c9fbc29Smrg 82170728a38Smrg# AM_RUN_LOG(COMMAND) 82270728a38Smrg# ------------------- 82370728a38Smrg# Run COMMAND, save the exit status in ac_status, and log it. 82470728a38Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 82570728a38SmrgAC_DEFUN([AM_RUN_LOG], 82670728a38Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 82770728a38Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 82870728a38Smrg ac_status=$? 82970728a38Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 83070728a38Smrg (exit $ac_status); }]) 83170728a38Smrg 83270728a38Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 83370728a38Smrg 83470728a38Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 83570728a38Smrg# 83670728a38Smrg# This file is free software; the Free Software Foundation 83770728a38Smrg# gives unlimited permission to copy and/or distribute it, 83870728a38Smrg# with or without modifications, as long as this notice is preserved. 8398c9fbc29Smrg 8408c9fbc29Smrg# AM_SANITY_CHECK 8418c9fbc29Smrg# --------------- 8428c9fbc29SmrgAC_DEFUN([AM_SANITY_CHECK], 8438c9fbc29Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8444e411241Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8454e411241Smrg# name. Accept space and tab only in the latter. 8464e411241Smrgam_lf=' 8474e411241Smrg' 8484e411241Smrgcase `pwd` in 8494e411241Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8504e411241Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8514e411241Smrgesac 8524e411241Smrgcase $srcdir in 8534e411241Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 85470728a38Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8554e411241Smrgesac 8564e411241Smrg 85770728a38Smrg# Do 'set' in a subshell so we don't clobber the current shell's 8588c9fbc29Smrg# arguments. Must try -L first in case configure is actually a 8598c9fbc29Smrg# symlink; some systems play weird games with the mod time of symlinks 8608c9fbc29Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8618c9fbc29Smrg# directory). 8628c9fbc29Smrgif ( 86370728a38Smrg am_has_slept=no 86470728a38Smrg for am_try in 1 2; do 86570728a38Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 86670728a38Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 86770728a38Smrg if test "$[*]" = "X"; then 86870728a38Smrg # -L didn't work. 86970728a38Smrg set X `ls -t "$srcdir/configure" conftest.file` 87070728a38Smrg fi 87170728a38Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 87270728a38Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 87370728a38Smrg 87470728a38Smrg # If neither matched, then we have a broken ls. This can happen 87570728a38Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 87670728a38Smrg # broken ls alias from the environment. This has actually 87770728a38Smrg # happened. Such a system could not be considered "sane". 87870728a38Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 87970728a38Smrg alias in your environment]) 88070728a38Smrg fi 88170728a38Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 88270728a38Smrg break 88370728a38Smrg fi 88470728a38Smrg # Just in case. 88570728a38Smrg sleep 1 88670728a38Smrg am_has_slept=yes 88770728a38Smrg done 8888c9fbc29Smrg test "$[2]" = conftest.file 8898c9fbc29Smrg ) 8908c9fbc29Smrgthen 8918c9fbc29Smrg # Ok. 8928c9fbc29Smrg : 8938c9fbc29Smrgelse 8948c9fbc29Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8958c9fbc29SmrgCheck your system clock]) 8968c9fbc29Smrgfi 89770728a38SmrgAC_MSG_RESULT([yes]) 89870728a38Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 89970728a38Smrg# generated files are strictly newer. 90070728a38Smrgam_sleep_pid= 90170728a38Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 90270728a38Smrg ( sleep 1 ) & 90370728a38Smrg am_sleep_pid=$! 90470728a38Smrgfi 90570728a38SmrgAC_CONFIG_COMMANDS_PRE( 90670728a38Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 90770728a38Smrg if test -n "$am_sleep_pid"; then 90870728a38Smrg # Hide warnings about reused PIDs. 90970728a38Smrg wait $am_sleep_pid 2>/dev/null 91070728a38Smrg fi 91170728a38Smrg AC_MSG_RESULT([done])]) 91270728a38Smrgrm -f conftest.file 91370728a38Smrg]) 9148c9fbc29Smrg 91570728a38Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 9164e411241Smrg# 9174e411241Smrg# This file is free software; the Free Software Foundation 9184e411241Smrg# gives unlimited permission to copy and/or distribute it, 9194e411241Smrg# with or without modifications, as long as this notice is preserved. 9204e411241Smrg 9214e411241Smrg# AM_SILENT_RULES([DEFAULT]) 9224e411241Smrg# -------------------------- 9234e411241Smrg# Enable less verbose build rules; with the default set to DEFAULT 92470728a38Smrg# ("yes" being less verbose, "no" or empty being verbose). 9254e411241SmrgAC_DEFUN([AM_SILENT_RULES], 92670728a38Smrg[AC_ARG_ENABLE([silent-rules], [dnl 92770728a38SmrgAS_HELP_STRING( 92870728a38Smrg [--enable-silent-rules], 92970728a38Smrg [less verbose build output (undo: "make V=1")]) 93070728a38SmrgAS_HELP_STRING( 93170728a38Smrg [--disable-silent-rules], 93270728a38Smrg [verbose build output (undo: "make V=0")])dnl 93370728a38Smrg]) 93470728a38Smrgcase $enable_silent_rules in @%:@ ((( 93570728a38Smrg yes) AM_DEFAULT_VERBOSITY=0;; 93670728a38Smrg no) AM_DEFAULT_VERBOSITY=1;; 93770728a38Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9384e411241Smrgesac 93970728a38Smrgdnl 94070728a38Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 94170728a38Smrgdnl do not support nested variable expansions. 94270728a38Smrgdnl See automake bug#9928 and bug#10237. 94370728a38Smrgam_make=${MAKE-make} 94470728a38SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 94570728a38Smrg [am_cv_make_support_nested_variables], 94670728a38Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 94770728a38SmrgBAR0=false 94870728a38SmrgBAR1=true 94970728a38SmrgV=1 95070728a38Smrgam__doit: 95170728a38Smrg @$(TRUE) 95270728a38Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 95370728a38Smrg am_cv_make_support_nested_variables=yes 95470728a38Smrgelse 95570728a38Smrg am_cv_make_support_nested_variables=no 95670728a38Smrgfi]) 95770728a38Smrgif test $am_cv_make_support_nested_variables = yes; then 95870728a38Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 95970728a38Smrg AM_V='$(V)' 96070728a38Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 96170728a38Smrgelse 96270728a38Smrg AM_V=$AM_DEFAULT_VERBOSITY 96370728a38Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 96470728a38Smrgfi 96570728a38SmrgAC_SUBST([AM_V])dnl 96670728a38SmrgAM_SUBST_NOTMAKE([AM_V])dnl 96770728a38SmrgAC_SUBST([AM_DEFAULT_V])dnl 96870728a38SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9694e411241SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9704e411241SmrgAM_BACKSLASH='\' 9714e411241SmrgAC_SUBST([AM_BACKSLASH])dnl 9724e411241Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9734e411241Smrg]) 9744e411241Smrg 97570728a38Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 9768c9fbc29Smrg# 9778c9fbc29Smrg# This file is free software; the Free Software Foundation 9788c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 9798c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 9808c9fbc29Smrg 9818c9fbc29Smrg# AM_PROG_INSTALL_STRIP 9828c9fbc29Smrg# --------------------- 98370728a38Smrg# One issue with vendor 'install' (even GNU) is that you can't 9848c9fbc29Smrg# specify the program used to strip binaries. This is especially 9858c9fbc29Smrg# annoying in cross-compiling environments, where the build's strip 9868c9fbc29Smrg# is unlikely to handle the host's binaries. 9878c9fbc29Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 98870728a38Smrg# always use install-sh in "make install-strip", and initialize 9898c9fbc29Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9908c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9918c9fbc29Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 99270728a38Smrg# Installed binaries are usually stripped using 'strip' when the user 99370728a38Smrg# run "make install-strip". However 'strip' might not be the right 9948c9fbc29Smrg# tool to use in cross-compilation environments, therefore Automake 99570728a38Smrg# will honor the 'STRIP' environment variable to overrule this program. 99670728a38Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9978c9fbc29Smrgif test "$cross_compiling" != no; then 9988c9fbc29Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9998c9fbc29Smrgfi 10008c9fbc29SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10018c9fbc29SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10028c9fbc29Smrg 100370728a38Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 10048c9fbc29Smrg# 10058c9fbc29Smrg# This file is free software; the Free Software Foundation 10068c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 10078c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 10088c9fbc29Smrg 10098c9fbc29Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 10108c9fbc29Smrg# --------------------------- 10114e411241Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10128c9fbc29Smrg# This macro is traced by Automake. 10138c9fbc29SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10148c9fbc29Smrg 10154e411241Smrg# AM_SUBST_NOTMAKE(VARIABLE) 101670728a38Smrg# -------------------------- 10174e411241Smrg# Public sister of _AM_SUBST_NOTMAKE. 10184e411241SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10194e411241Smrg 10208c9fbc29Smrg# Check how to create a tarball. -*- Autoconf -*- 10218c9fbc29Smrg 102270728a38Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 10238c9fbc29Smrg# 10248c9fbc29Smrg# This file is free software; the Free Software Foundation 10258c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 10268c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 10278c9fbc29Smrg 10288c9fbc29Smrg# _AM_PROG_TAR(FORMAT) 10298c9fbc29Smrg# -------------------- 10308c9fbc29Smrg# Check how to create a tarball in format FORMAT. 103170728a38Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10328c9fbc29Smrg# 10338c9fbc29Smrg# Substitute a variable $(am__tar) that is a command 10348c9fbc29Smrg# writing to stdout a FORMAT-tarball containing the directory 10358c9fbc29Smrg# $tardir. 10368c9fbc29Smrg# tardir=directory && $(am__tar) > result.tar 10378c9fbc29Smrg# 10388c9fbc29Smrg# Substitute a variable $(am__untar) that extract such 10398c9fbc29Smrg# a tarball read from stdin. 10408c9fbc29Smrg# $(am__untar) < result.tar 10414cd6a3aeSmrg# 104270728a38SmrgAC_DEFUN([_AM_PROG_TAR], 104370728a38Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 104470728a38Smrg# in the wild :-( We should find a proper way to deprecate it ... 104570728a38SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10464e411241Smrg 104770728a38Smrg# We'll loop over all known methods to create a tar archive until one works. 104870728a38Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10494e411241Smrg 105070728a38Smrgm4_if([$1], [v7], 105170728a38Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 105270728a38Smrg 105370728a38Smrg [m4_case([$1], 105470728a38Smrg [ustar], 105570728a38Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 105670728a38Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 105770728a38Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 105870728a38Smrg # and bug#13588). 105970728a38Smrg am_max_uid=2097151 # 2^21 - 1 106070728a38Smrg am_max_gid=$am_max_uid 106170728a38Smrg # The $UID and $GID variables are not portable, so we need to resort 106270728a38Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 106370728a38Smrg # below are definitely unexpected, so allow the users to see them 106470728a38Smrg # (that is, avoid stderr redirection). 106570728a38Smrg am_uid=`id -u || echo unknown` 106670728a38Smrg am_gid=`id -g || echo unknown` 106770728a38Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 106870728a38Smrg if test $am_uid -le $am_max_uid; then 106970728a38Smrg AC_MSG_RESULT([yes]) 107070728a38Smrg else 107170728a38Smrg AC_MSG_RESULT([no]) 107270728a38Smrg _am_tools=none 107370728a38Smrg fi 107470728a38Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 107570728a38Smrg if test $am_gid -le $am_max_gid; then 107670728a38Smrg AC_MSG_RESULT([yes]) 107770728a38Smrg else 107870728a38Smrg AC_MSG_RESULT([no]) 107970728a38Smrg _am_tools=none 108070728a38Smrg fi], 10814e411241Smrg 108270728a38Smrg [pax], 108370728a38Smrg [], 10844e411241Smrg 108570728a38Smrg [m4_fatal([Unknown tar format])]) 10864e411241Smrg 108770728a38Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10884e411241Smrg 108970728a38Smrg # Go ahead even if we have the value already cached. We do so because we 109070728a38Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 109170728a38Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10924e411241Smrg 109370728a38Smrg for _am_tool in $_am_tools; do 109470728a38Smrg case $_am_tool in 109570728a38Smrg gnutar) 109670728a38Smrg for _am_tar in tar gnutar gtar; do 109770728a38Smrg AM_RUN_LOG([$_am_tar --version]) && break 109870728a38Smrg done 109970728a38Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 110070728a38Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 110170728a38Smrg am__untar="$_am_tar -xf -" 110270728a38Smrg ;; 110370728a38Smrg plaintar) 110470728a38Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 110570728a38Smrg # ustar tarball either. 110670728a38Smrg (tar --version) >/dev/null 2>&1 && continue 110770728a38Smrg am__tar='tar chf - "$$tardir"' 110870728a38Smrg am__tar_='tar chf - "$tardir"' 110970728a38Smrg am__untar='tar xf -' 111070728a38Smrg ;; 111170728a38Smrg pax) 111270728a38Smrg am__tar='pax -L -x $1 -w "$$tardir"' 111370728a38Smrg am__tar_='pax -L -x $1 -w "$tardir"' 111470728a38Smrg am__untar='pax -r' 111570728a38Smrg ;; 111670728a38Smrg cpio) 111770728a38Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 111870728a38Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 111970728a38Smrg am__untar='cpio -i -H $1 -d' 112070728a38Smrg ;; 112170728a38Smrg none) 112270728a38Smrg am__tar=false 112370728a38Smrg am__tar_=false 112470728a38Smrg am__untar=false 112570728a38Smrg ;; 112670728a38Smrg esac 11274e411241Smrg 112870728a38Smrg # If the value was cached, stop now. We just wanted to have am__tar 112970728a38Smrg # and am__untar set. 113070728a38Smrg test -n "${am_cv_prog_tar_$1}" && break 113170728a38Smrg 113270728a38Smrg # tar/untar a dummy directory, and stop if the command works. 113370728a38Smrg rm -rf conftest.dir 113470728a38Smrg mkdir conftest.dir 113570728a38Smrg echo GrepMe > conftest.dir/file 113670728a38Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 113770728a38Smrg rm -rf conftest.dir 113870728a38Smrg if test -s conftest.tar; then 113970728a38Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 114070728a38Smrg AM_RUN_LOG([cat conftest.dir/file]) 114170728a38Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 114270728a38Smrg fi 114370728a38Smrg done 114470728a38Smrg rm -rf conftest.dir 11454e411241Smrg 114670728a38Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 114770728a38Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11484e411241Smrg 114970728a38SmrgAC_SUBST([am__tar]) 115070728a38SmrgAC_SUBST([am__untar]) 115170728a38Smrg]) # _AM_PROG_TAR 11524e411241Smrg 11534cd6a3aeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 11544cd6a3aeSmrg# 11554cd6a3aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 115670728a38Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 115770728a38Smrg# Foundation, Inc. 11584cd6a3aeSmrg# Written by Gordon Matzigkeit, 1996 11594cd6a3aeSmrg# 11604cd6a3aeSmrg# This file is free software; the Free Software Foundation gives 11614cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without 11624cd6a3aeSmrg# modifications, as long as this notice is preserved. 11634cd6a3aeSmrg 11644cd6a3aeSmrgm4_define([_LT_COPYING], [dnl 11654cd6a3aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 116670728a38Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 116770728a38Smrg# Foundation, Inc. 11684cd6a3aeSmrg# Written by Gordon Matzigkeit, 1996 11694cd6a3aeSmrg# 11704cd6a3aeSmrg# This file is part of GNU Libtool. 11714cd6a3aeSmrg# 11724cd6a3aeSmrg# GNU Libtool is free software; you can redistribute it and/or 11734cd6a3aeSmrg# modify it under the terms of the GNU General Public License as 11744cd6a3aeSmrg# published by the Free Software Foundation; either version 2 of 11754cd6a3aeSmrg# the License, or (at your option) any later version. 11764cd6a3aeSmrg# 11774cd6a3aeSmrg# As a special exception to the GNU General Public License, 11784cd6a3aeSmrg# if you distribute this file as part of a program or library that 11794cd6a3aeSmrg# is built using GNU Libtool, you may include this file under the 11804cd6a3aeSmrg# same distribution terms that you use for the rest of that program. 11814cd6a3aeSmrg# 11824cd6a3aeSmrg# GNU Libtool is distributed in the hope that it will be useful, 11834cd6a3aeSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 11844cd6a3aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11854cd6a3aeSmrg# GNU General Public License for more details. 11864cd6a3aeSmrg# 11874cd6a3aeSmrg# You should have received a copy of the GNU General Public License 11884cd6a3aeSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 11894cd6a3aeSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 11904cd6a3aeSmrg# obtained by writing to the Free Software Foundation, Inc., 11914cd6a3aeSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 11924cd6a3aeSmrg]) 11934e411241Smrg 11944cd6a3aeSmrg# serial 57 LT_INIT 11954e411241Smrg 11964e411241Smrg 11974cd6a3aeSmrg# LT_PREREQ(VERSION) 11984cd6a3aeSmrg# ------------------ 11994cd6a3aeSmrg# Complain and exit if this libtool version is less that VERSION. 12004cd6a3aeSmrgm4_defun([LT_PREREQ], 12014cd6a3aeSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 12024cd6a3aeSmrg [m4_default([$3], 12034cd6a3aeSmrg [m4_fatal([Libtool version $1 or higher is required], 12044cd6a3aeSmrg 63)])], 12054cd6a3aeSmrg [$2])]) 12064e411241Smrg 12074e411241Smrg 12084cd6a3aeSmrg# _LT_CHECK_BUILDDIR 12094cd6a3aeSmrg# ------------------ 12104cd6a3aeSmrg# Complain if the absolute build directory name contains unusual characters 12114cd6a3aeSmrgm4_defun([_LT_CHECK_BUILDDIR], 12124cd6a3aeSmrg[case `pwd` in 12134cd6a3aeSmrg *\ * | *\ *) 12144cd6a3aeSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 12154cd6a3aeSmrgesac 12164cd6a3aeSmrg]) 12174e411241Smrg 12184e411241Smrg 12194cd6a3aeSmrg# LT_INIT([OPTIONS]) 12204cd6a3aeSmrg# ------------------ 12214cd6a3aeSmrgAC_DEFUN([LT_INIT], 12224cd6a3aeSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12234cd6a3aeSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12244cd6a3aeSmrgAC_BEFORE([$0], [LT_LANG])dnl 12254cd6a3aeSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12264cd6a3aeSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12274cd6a3aeSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 12284cd6a3aeSmrg 12294cd6a3aeSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12304cd6a3aeSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12314cd6a3aeSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12324cd6a3aeSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12334cd6a3aeSmrgdnl unless we require an AC_DEFUNed macro: 12344cd6a3aeSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12354cd6a3aeSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12364cd6a3aeSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12374cd6a3aeSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12384cd6a3aeSmrgm4_require([_LT_PROG_LTMAIN])dnl 12394cd6a3aeSmrg 12404cd6a3aeSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 12414cd6a3aeSmrg 12424cd6a3aeSmrgdnl Parse OPTIONS 12434cd6a3aeSmrg_LT_SET_OPTIONS([$0], [$1]) 12444e411241Smrg 12454cd6a3aeSmrg# This can be used to rebuild libtool when needed 12464cd6a3aeSmrgLIBTOOL_DEPS="$ltmain" 12474e411241Smrg 12484cd6a3aeSmrg# Always use our own libtool. 12494cd6a3aeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12504cd6a3aeSmrgAC_SUBST(LIBTOOL)dnl 12514e411241Smrg 12524cd6a3aeSmrg_LT_SETUP 12534e411241Smrg 12544cd6a3aeSmrg# Only expand once: 12554cd6a3aeSmrgm4_define([LT_INIT]) 12564cd6a3aeSmrg])# LT_INIT 12574e411241Smrg 12584cd6a3aeSmrg# Old names: 12594cd6a3aeSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12604cd6a3aeSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12614cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 12624cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12634cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 12644e411241Smrg 12654e411241Smrg 12664cd6a3aeSmrg# _LT_CC_BASENAME(CC) 12674cd6a3aeSmrg# ------------------- 12684cd6a3aeSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12694cd6a3aeSmrgm4_defun([_LT_CC_BASENAME], 12704cd6a3aeSmrg[for cc_temp in $1""; do 12714cd6a3aeSmrg case $cc_temp in 12724cd6a3aeSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12734cd6a3aeSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12744cd6a3aeSmrg \-*) ;; 12754cd6a3aeSmrg *) break;; 12764cd6a3aeSmrg esac 12774cd6a3aeSmrgdone 12784cd6a3aeSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12794cd6a3aeSmrg]) 12804e411241Smrg 12814e411241Smrg 12824cd6a3aeSmrg# _LT_FILEUTILS_DEFAULTS 12834e411241Smrg# ---------------------- 12844cd6a3aeSmrg# It is okay to use these file commands and assume they have been set 12854cd6a3aeSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 12864cd6a3aeSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 12874cd6a3aeSmrg[: ${CP="cp -f"} 12884cd6a3aeSmrg: ${MV="mv -f"} 12894cd6a3aeSmrg: ${RM="rm -f"} 12904cd6a3aeSmrg])# _LT_FILEUTILS_DEFAULTS 12914cd6a3aeSmrg 12924cd6a3aeSmrg 12934cd6a3aeSmrg# _LT_SETUP 12944cd6a3aeSmrg# --------- 12954cd6a3aeSmrgm4_defun([_LT_SETUP], 12964cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12974cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12984cd6a3aeSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 12994cd6a3aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 13004e411241Smrg 130170728a38Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 130270728a38Smrgdnl 13034cd6a3aeSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13044cd6a3aeSmrg_LT_DECL([], [host], [0])dnl 13054cd6a3aeSmrg_LT_DECL([], [host_os], [0])dnl 13064cd6a3aeSmrgdnl 13074cd6a3aeSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13084cd6a3aeSmrg_LT_DECL([], [build], [0])dnl 13094cd6a3aeSmrg_LT_DECL([], [build_os], [0])dnl 13104cd6a3aeSmrgdnl 13114cd6a3aeSmrgAC_REQUIRE([AC_PROG_CC])dnl 13124cd6a3aeSmrgAC_REQUIRE([LT_PATH_LD])dnl 13134cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 13144cd6a3aeSmrgdnl 13154cd6a3aeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13164cd6a3aeSmrgtest -z "$LN_S" && LN_S="ln -s" 13174cd6a3aeSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13184cd6a3aeSmrgdnl 13194cd6a3aeSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13204cd6a3aeSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13214cd6a3aeSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13224cd6a3aeSmrgdnl 13234cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13244cd6a3aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13254cd6a3aeSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13264cd6a3aeSmrgm4_require([_LT_CMD_RELOAD])dnl 13274cd6a3aeSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13284cd6a3aeSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13294cd6a3aeSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13304cd6a3aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13314cd6a3aeSmrgm4_require([_LT_WITH_SYSROOT])dnl 13324cd6a3aeSmrg 13334cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([ 13344cd6a3aeSmrg# See if we are running on zsh, and set the options which allow our 13354cd6a3aeSmrg# commands through without removal of \ escapes INIT. 13364cd6a3aeSmrgif test -n "\${ZSH_VERSION+set}" ; then 13374cd6a3aeSmrg setopt NO_GLOB_SUBST 13384e411241Smrgfi 13394cd6a3aeSmrg]) 13404cd6a3aeSmrgif test -n "${ZSH_VERSION+set}" ; then 13414cd6a3aeSmrg setopt NO_GLOB_SUBST 13424e411241Smrgfi 13434e411241Smrg 13444cd6a3aeSmrg_LT_CHECK_OBJDIR 13454e411241Smrg 13464cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl 13474e411241Smrg 13484cd6a3aeSmrgcase $host_os in 13494cd6a3aeSmrgaix3*) 13504cd6a3aeSmrg # AIX sometimes has problems with the GCC collect2 program. For some 13514cd6a3aeSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13524cd6a3aeSmrg # vanish in a puff of smoke. 13534cd6a3aeSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 13544cd6a3aeSmrg COLLECT_NAMES= 13554cd6a3aeSmrg export COLLECT_NAMES 13564cd6a3aeSmrg fi 13574cd6a3aeSmrg ;; 13584cd6a3aeSmrgesac 13594e411241Smrg 13604cd6a3aeSmrg# Global variables: 13614cd6a3aeSmrgofile=libtool 13624cd6a3aeSmrgcan_build_shared=yes 13634e411241Smrg 13644cd6a3aeSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 13654cd6a3aeSmrg# which needs '.lib'). 13664cd6a3aeSmrglibext=a 13674e411241Smrg 13684cd6a3aeSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13694e411241Smrg 13704cd6a3aeSmrgold_CC="$CC" 13714cd6a3aeSmrgold_CFLAGS="$CFLAGS" 13724e411241Smrg 13734cd6a3aeSmrg# Set sane defaults for various variables 13744cd6a3aeSmrgtest -z "$CC" && CC=cc 13754cd6a3aeSmrgtest -z "$LTCC" && LTCC=$CC 13764cd6a3aeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13774cd6a3aeSmrgtest -z "$LD" && LD=ld 13784cd6a3aeSmrgtest -z "$ac_objext" && ac_objext=o 13794e411241Smrg 13804cd6a3aeSmrg_LT_CC_BASENAME([$compiler]) 13814e411241Smrg 13824cd6a3aeSmrg# Only perform the check for file, if the check method requires it 13834cd6a3aeSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 13844cd6a3aeSmrgcase $deplibs_check_method in 13854cd6a3aeSmrgfile_magic*) 13864cd6a3aeSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 13874cd6a3aeSmrg _LT_PATH_MAGIC 13884cd6a3aeSmrg fi 13894cd6a3aeSmrg ;; 13904cd6a3aeSmrgesac 13914e411241Smrg 13924cd6a3aeSmrg# Use C for the default configuration in the libtool script 13934cd6a3aeSmrgLT_SUPPORTED_TAG([CC]) 13944cd6a3aeSmrg_LT_LANG_C_CONFIG 13954cd6a3aeSmrg_LT_LANG_DEFAULT_CONFIG 13964cd6a3aeSmrg_LT_CONFIG_COMMANDS 13974cd6a3aeSmrg])# _LT_SETUP 13984e411241Smrg 13998c9fbc29Smrg 14004cd6a3aeSmrg# _LT_PREPARE_SED_QUOTE_VARS 14014cd6a3aeSmrg# -------------------------- 14024cd6a3aeSmrg# Define a few sed substitution that help us do robust quoting. 14034cd6a3aeSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14044cd6a3aeSmrg[# Backslashify metacharacters that are still active within 14054cd6a3aeSmrg# double-quoted strings. 14064cd6a3aeSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 14074cd6a3aeSmrg 14084cd6a3aeSmrg# Same as above, but do not quote variable references. 14094cd6a3aeSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 14104cd6a3aeSmrg 14114cd6a3aeSmrg# Sed substitution to delay expansion of an escaped shell variable in a 14124cd6a3aeSmrg# double_quote_subst'ed string. 14134cd6a3aeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14144cd6a3aeSmrg 14154cd6a3aeSmrg# Sed substitution to delay expansion of an escaped single quote. 14164cd6a3aeSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 14174cd6a3aeSmrg 14184cd6a3aeSmrg# Sed substitution to avoid accidental globbing in evaled expressions 14194cd6a3aeSmrgno_glob_subst='s/\*/\\\*/g' 14208c9fbc29Smrg]) 14218c9fbc29Smrg 14224cd6a3aeSmrg# _LT_PROG_LTMAIN 14234cd6a3aeSmrg# --------------- 14244cd6a3aeSmrg# Note that this code is called both from `configure', and `config.status' 14254cd6a3aeSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14264cd6a3aeSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14274cd6a3aeSmrg# so we pass a copy along to make sure it has a sensible value anyway. 14284cd6a3aeSmrgm4_defun([_LT_PROG_LTMAIN], 14294cd6a3aeSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14304cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14314cd6a3aeSmrgltmain="$ac_aux_dir/ltmain.sh" 14324cd6a3aeSmrg])# _LT_PROG_LTMAIN 14334e411241Smrg 14348c9fbc29Smrg 14358c9fbc29Smrg 14364cd6a3aeSmrg# So that we can recreate a full libtool script including additional 14374cd6a3aeSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14384cd6a3aeSmrg# in macros and then make a single call at the end using the `libtool' 14394cd6a3aeSmrg# label. 14408c9fbc29Smrg 14418c9fbc29Smrg 14424cd6a3aeSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14434cd6a3aeSmrg# ---------------------------------------- 14444cd6a3aeSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14454cd6a3aeSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14464cd6a3aeSmrg[m4_ifval([$1], 14474cd6a3aeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14484cd6a3aeSmrg [$1 14494cd6a3aeSmrg])])]) 14508c9fbc29Smrg 14514cd6a3aeSmrg# Initialize. 14524cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 14538c9fbc29Smrg 14548c9fbc29Smrg 14554cd6a3aeSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14564cd6a3aeSmrg# ------------------------------ 14574cd6a3aeSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14584cd6a3aeSmrgm4_define([_LT_CONFIG_LIBTOOL], 14594cd6a3aeSmrg[m4_ifval([$1], 14604cd6a3aeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14614cd6a3aeSmrg [$1 14624cd6a3aeSmrg])])]) 14634cd6a3aeSmrg 14644cd6a3aeSmrg# Initialize. 14654cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 14664cd6a3aeSmrg 14674cd6a3aeSmrg 14684cd6a3aeSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14694cd6a3aeSmrg# ----------------------------------------------------- 14704cd6a3aeSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14714cd6a3aeSmrg[_LT_CONFIG_LIBTOOL([$1]) 14724cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14734cd6a3aeSmrg]) 14748c9fbc29Smrg 14758c9fbc29Smrg 14764cd6a3aeSmrg# _LT_FORMAT_COMMENT([COMMENT]) 14774cd6a3aeSmrg# ----------------------------- 14784cd6a3aeSmrg# Add leading comment marks to the start of each line, and a trailing 14794cd6a3aeSmrg# full-stop to the whole comment if one is not present already. 14804cd6a3aeSmrgm4_define([_LT_FORMAT_COMMENT], 14814cd6a3aeSmrg[m4_ifval([$1], [ 14824cd6a3aeSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 14834cd6a3aeSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 14844cd6a3aeSmrg)]) 14854cd6a3aeSmrg 14864cd6a3aeSmrg 14874cd6a3aeSmrg 14884cd6a3aeSmrg 14894cd6a3aeSmrg 14904cd6a3aeSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 14914cd6a3aeSmrg# ------------------------------------------------------------------- 14924cd6a3aeSmrg# CONFIGNAME is the name given to the value in the libtool script. 14934cd6a3aeSmrg# VARNAME is the (base) name used in the configure script. 14944cd6a3aeSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 14954cd6a3aeSmrg# VARNAME. Any other value will be used directly. 14964cd6a3aeSmrgm4_define([_LT_DECL], 14974cd6a3aeSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 14984cd6a3aeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 14994cd6a3aeSmrg [m4_ifval([$1], [$1], [$2])]) 15004cd6a3aeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 15014cd6a3aeSmrg m4_ifval([$4], 15024cd6a3aeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15034cd6a3aeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 15044cd6a3aeSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15054cd6a3aeSmrg]) 15068c9fbc29Smrg 15078c9fbc29Smrg 15084cd6a3aeSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15094cd6a3aeSmrg# -------------------------------------------------------- 15104cd6a3aeSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 15118c9fbc29Smrg 15128c9fbc29Smrg 15134cd6a3aeSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15144cd6a3aeSmrg# ------------------------------------------------ 15154cd6a3aeSmrgm4_define([lt_decl_tag_varnames], 15164cd6a3aeSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 15178c9fbc29Smrg 15188c9fbc29Smrg 15194cd6a3aeSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15204cd6a3aeSmrg# --------------------------------------------------------- 15214cd6a3aeSmrgm4_define([_lt_decl_filter], 15224cd6a3aeSmrg[m4_case([$#], 15234cd6a3aeSmrg [0], [m4_fatal([$0: too few arguments: $#])], 15244cd6a3aeSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15254cd6a3aeSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15264cd6a3aeSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15274cd6a3aeSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 15284cd6a3aeSmrg]) 15298c9fbc29Smrg 15308c9fbc29Smrg 15314cd6a3aeSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15324cd6a3aeSmrg# -------------------------------------------------- 15334cd6a3aeSmrgm4_define([lt_decl_quote_varnames], 15344cd6a3aeSmrg[_lt_decl_filter([value], [1], $@)]) 15358c9fbc29Smrg 15368c9fbc29Smrg 15374cd6a3aeSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15384cd6a3aeSmrg# --------------------------------------------------- 15394cd6a3aeSmrgm4_define([lt_decl_dquote_varnames], 15404cd6a3aeSmrg[_lt_decl_filter([value], [2], $@)]) 15418c9fbc29Smrg 15428c9fbc29Smrg 15434cd6a3aeSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15444cd6a3aeSmrg# --------------------------------------------------- 15454cd6a3aeSmrgm4_define([lt_decl_varnames_tagged], 15464cd6a3aeSmrg[m4_assert([$# <= 2])dnl 15474cd6a3aeSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 15484cd6a3aeSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15494cd6a3aeSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15504cd6a3aeSmrgm4_define([_lt_decl_varnames_tagged], 15514cd6a3aeSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15528c9fbc29Smrg 15538c9fbc29Smrg 15544cd6a3aeSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15554cd6a3aeSmrg# ------------------------------------------------ 15564cd6a3aeSmrgm4_define([lt_decl_all_varnames], 15574cd6a3aeSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15584cd6a3aeSmrg m4_if([$2], [], 15594cd6a3aeSmrg m4_quote(lt_decl_varnames), 15604cd6a3aeSmrg m4_quote(m4_shift($@))))[]dnl 15614cd6a3aeSmrg]) 15624cd6a3aeSmrgm4_define([_lt_decl_all_varnames], 15634cd6a3aeSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 15644cd6a3aeSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15654cd6a3aeSmrg]) 15668c9fbc29Smrg 15678c9fbc29Smrg 15684cd6a3aeSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15694cd6a3aeSmrg# ------------------------------------ 15704cd6a3aeSmrg# Quote a variable value, and forward it to `config.status' so that its 15714cd6a3aeSmrg# declaration there will have the same value as in `configure'. VARNAME 15724cd6a3aeSmrg# must have a single quote delimited value for this to work. 15734cd6a3aeSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15744cd6a3aeSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 15758c9fbc29Smrg 15768c9fbc29Smrg 15774cd6a3aeSmrg# _LT_CONFIG_STATUS_DECLARATIONS 15784cd6a3aeSmrg# ------------------------------ 15794cd6a3aeSmrg# We delimit libtool config variables with single quotes, so when 15804cd6a3aeSmrg# we write them to config.status, we have to be sure to quote all 15814cd6a3aeSmrg# embedded single quotes properly. In configure, this macro expands 15824cd6a3aeSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 15834cd6a3aeSmrg# 15844cd6a3aeSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 15854cd6a3aeSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 15864cd6a3aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 15874cd6a3aeSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 15888c9fbc29Smrg 15894e411241Smrg 15904cd6a3aeSmrg# _LT_LIBTOOL_TAGS 15914cd6a3aeSmrg# ---------------- 15924cd6a3aeSmrg# Output comment and list of tags supported by the script 15934cd6a3aeSmrgm4_defun([_LT_LIBTOOL_TAGS], 15944cd6a3aeSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 15954cd6a3aeSmrgavailable_tags="_LT_TAGS"dnl 15964cd6a3aeSmrg]) 15978c9fbc29Smrg 15988c9fbc29Smrg 15994cd6a3aeSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 16004cd6a3aeSmrg# ----------------------------------- 16014cd6a3aeSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 16024cd6a3aeSmrg# expand to a commented shell variable setting: 16034cd6a3aeSmrg# 16044cd6a3aeSmrg# # Some comment about what VAR is for. 16054cd6a3aeSmrg# visible_name=$lt_internal_name 16064cd6a3aeSmrgm4_define([_LT_LIBTOOL_DECLARE], 16074cd6a3aeSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16084cd6a3aeSmrg [description])))[]dnl 16094cd6a3aeSmrgm4_pushdef([_libtool_name], 16104cd6a3aeSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16114cd6a3aeSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16124cd6a3aeSmrg [0], [_libtool_name=[$]$1], 16134cd6a3aeSmrg [1], [_libtool_name=$lt_[]$1], 16144cd6a3aeSmrg [2], [_libtool_name=$lt_[]$1], 16154cd6a3aeSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16164cd6a3aeSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16174cd6a3aeSmrg]) 16188c9fbc29Smrg 16198c9fbc29Smrg 16204cd6a3aeSmrg# _LT_LIBTOOL_CONFIG_VARS 16214cd6a3aeSmrg# ----------------------- 16224cd6a3aeSmrg# Produce commented declarations of non-tagged libtool config variables 16234cd6a3aeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16244cd6a3aeSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16254cd6a3aeSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16264cd6a3aeSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16274cd6a3aeSmrg[m4_foreach([_lt_var], 16284cd6a3aeSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16294cd6a3aeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16308c9fbc29Smrg 16318c9fbc29Smrg 16324cd6a3aeSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 16334cd6a3aeSmrg# ------------------------- 16344cd6a3aeSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 16354cd6a3aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16364cd6a3aeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 16378c9fbc29Smrg 16388c9fbc29Smrg 16394cd6a3aeSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16404cd6a3aeSmrg# ------------------------------ 16414cd6a3aeSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 16428c9fbc29Smrg 16438c9fbc29Smrg 16444cd6a3aeSmrg# _LT_CONFIG_COMMANDS 16458c9fbc29Smrg# ------------------- 16464cd6a3aeSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16474cd6a3aeSmrg# variables for single and double quote escaping we saved from calls 16484cd6a3aeSmrg# to _LT_DECL, we can put quote escaped variables declarations 16494cd6a3aeSmrg# into `config.status', and then the shell code to quote escape them in 16504cd6a3aeSmrg# for loops in `config.status'. Finally, any additional code accumulated 16514cd6a3aeSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16524cd6a3aeSmrgm4_defun([_LT_CONFIG_COMMANDS], 16534cd6a3aeSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16544cd6a3aeSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16554cd6a3aeSmrg dnl instead of duplicating it all over again into config.status, 16564cd6a3aeSmrg dnl then we will have config.status run $CONFIG_LT later, so it 16574cd6a3aeSmrg dnl needs to know what name is stored there: 16584cd6a3aeSmrg [AC_CONFIG_COMMANDS([libtool], 16594cd6a3aeSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16604cd6a3aeSmrg dnl If the libtool generation code is destined for config.status, 16614cd6a3aeSmrg dnl expand the accumulated commands and init code now: 16624cd6a3aeSmrg [AC_CONFIG_COMMANDS([libtool], 16634cd6a3aeSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16644cd6a3aeSmrg])#_LT_CONFIG_COMMANDS 16654cd6a3aeSmrg 16664cd6a3aeSmrg 16674cd6a3aeSmrg# Initialize. 16684cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16694cd6a3aeSmrg[ 16704cd6a3aeSmrg 16714cd6a3aeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16724cd6a3aeSmrg# if CDPATH is set. 16734cd6a3aeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 16744cd6a3aeSmrg 16754cd6a3aeSmrgsed_quote_subst='$sed_quote_subst' 16764cd6a3aeSmrgdouble_quote_subst='$double_quote_subst' 16774cd6a3aeSmrgdelay_variable_subst='$delay_variable_subst' 16784cd6a3aeSmrg_LT_CONFIG_STATUS_DECLARATIONS 16794cd6a3aeSmrgLTCC='$LTCC' 16804cd6a3aeSmrgLTCFLAGS='$LTCFLAGS' 16814cd6a3aeSmrgcompiler='$compiler_DEFAULT' 16824cd6a3aeSmrg 16834cd6a3aeSmrg# A function that is used when there is no print builtin or printf. 16844cd6a3aeSmrgfunc_fallback_echo () 16854cd6a3aeSmrg{ 16864cd6a3aeSmrg eval 'cat <<_LTECHO_EOF 16874cd6a3aeSmrg\$[]1 16884cd6a3aeSmrg_LTECHO_EOF' 16894cd6a3aeSmrg} 16904cd6a3aeSmrg 16914cd6a3aeSmrg# Quote evaled strings. 16924cd6a3aeSmrgfor var in lt_decl_all_varnames([[ \ 16934cd6a3aeSmrg]], lt_decl_quote_varnames); do 16944cd6a3aeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 16954cd6a3aeSmrg *[[\\\\\\\`\\"\\\$]]*) 16964cd6a3aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 16974cd6a3aeSmrg ;; 16984cd6a3aeSmrg *) 16994cd6a3aeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17004cd6a3aeSmrg ;; 17014cd6a3aeSmrg esac 17024cd6a3aeSmrgdone 17034cd6a3aeSmrg 17044cd6a3aeSmrg# Double-quote double-evaled strings. 17054cd6a3aeSmrgfor var in lt_decl_all_varnames([[ \ 17064cd6a3aeSmrg]], lt_decl_dquote_varnames); do 17074cd6a3aeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17084cd6a3aeSmrg *[[\\\\\\\`\\"\\\$]]*) 17094cd6a3aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17104cd6a3aeSmrg ;; 17114cd6a3aeSmrg *) 17124cd6a3aeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17134cd6a3aeSmrg ;; 17144cd6a3aeSmrg esac 17158c9fbc29Smrgdone 17164cd6a3aeSmrg 17174cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_INIT 17188c9fbc29Smrg]) 17198c9fbc29Smrg 17204cd6a3aeSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17214cd6a3aeSmrg# ------------------------------------ 17224cd6a3aeSmrg# Generate a child script FILE with all initialization necessary to 17234cd6a3aeSmrg# reuse the environment learned by the parent script, and make the 17244cd6a3aeSmrg# file executable. If COMMENT is supplied, it is inserted after the 17254cd6a3aeSmrg# `#!' sequence but before initialization text begins. After this 17264cd6a3aeSmrg# macro, additional text can be appended to FILE to form the body of 17274cd6a3aeSmrg# the child script. The macro ends with non-zero status if the 17284cd6a3aeSmrg# file could not be fully written (such as if the disk is full). 17294cd6a3aeSmrgm4_ifdef([AS_INIT_GENERATED], 17304cd6a3aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17314cd6a3aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 17324cd6a3aeSmrg[m4_require([AS_PREPARE])]dnl 17334cd6a3aeSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17344cd6a3aeSmrg[lt_write_fail=0 17354cd6a3aeSmrgcat >$1 <<_ASEOF || lt_write_fail=1 17364cd6a3aeSmrg#! $SHELL 17374cd6a3aeSmrg# Generated by $as_me. 17384cd6a3aeSmrg$2 17394cd6a3aeSmrgSHELL=\${CONFIG_SHELL-$SHELL} 17404cd6a3aeSmrgexport SHELL 17414cd6a3aeSmrg_ASEOF 17424cd6a3aeSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17434cd6a3aeSmrgAS_SHELL_SANITIZE 17444cd6a3aeSmrg_AS_PREPARE 17454cd6a3aeSmrgexec AS_MESSAGE_FD>&1 17464cd6a3aeSmrg_ASEOF 17474cd6a3aeSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17484cd6a3aeSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 17494cd6a3aeSmrg 17504cd6a3aeSmrg# LT_OUTPUT 17514cd6a3aeSmrg# --------- 17524cd6a3aeSmrg# This macro allows early generation of the libtool script (before 17534cd6a3aeSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 17544cd6a3aeSmrg# tests. 17554cd6a3aeSmrgAC_DEFUN([LT_OUTPUT], 17564cd6a3aeSmrg[: ${CONFIG_LT=./config.lt} 17574cd6a3aeSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17584cd6a3aeSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17594cd6a3aeSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 17604cd6a3aeSmrg 17614cd6a3aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 17624cd6a3aeSmrglt_cl_silent=false 17634cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>>config.log 17644cd6a3aeSmrg{ 17654cd6a3aeSmrg echo 17664cd6a3aeSmrg AS_BOX([Running $as_me.]) 17674cd6a3aeSmrg} >&AS_MESSAGE_LOG_FD 17688c9fbc29Smrg 17694cd6a3aeSmrglt_cl_help="\ 17704cd6a3aeSmrg\`$as_me' creates a local libtool stub from the current configuration, 17714cd6a3aeSmrgfor use in further configure time tests before the real libtool is 17724cd6a3aeSmrggenerated. 17734cd6a3aeSmrg 17744cd6a3aeSmrgUsage: $[0] [[OPTIONS]] 17754cd6a3aeSmrg 17764cd6a3aeSmrg -h, --help print this help, then exit 17774cd6a3aeSmrg -V, --version print version number, then exit 17784cd6a3aeSmrg -q, --quiet do not print progress messages 17794cd6a3aeSmrg -d, --debug don't remove temporary files 17804cd6a3aeSmrg 17814cd6a3aeSmrgReport bugs to <bug-libtool@gnu.org>." 17824cd6a3aeSmrg 17834cd6a3aeSmrglt_cl_version="\ 17844cd6a3aeSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 17854cd6a3aeSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 17864cd6a3aeSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 17874cd6a3aeSmrg 178870728a38SmrgCopyright (C) 2011 Free Software Foundation, Inc. 17894cd6a3aeSmrgThis config.lt script is free software; the Free Software Foundation 17904cd6a3aeSmrggives unlimited permision to copy, distribute and modify it." 17914cd6a3aeSmrg 17924cd6a3aeSmrgwhile test $[#] != 0 17934cd6a3aeSmrgdo 17944cd6a3aeSmrg case $[1] in 17954cd6a3aeSmrg --version | --v* | -V ) 17964cd6a3aeSmrg echo "$lt_cl_version"; exit 0 ;; 17974cd6a3aeSmrg --help | --h* | -h ) 17984cd6a3aeSmrg echo "$lt_cl_help"; exit 0 ;; 17994cd6a3aeSmrg --debug | --d* | -d ) 18004cd6a3aeSmrg debug=: ;; 18014cd6a3aeSmrg --quiet | --q* | --silent | --s* | -q ) 18024cd6a3aeSmrg lt_cl_silent=: ;; 18034cd6a3aeSmrg 18044cd6a3aeSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18054cd6a3aeSmrgTry \`$[0] --help' for more information.]) ;; 18064cd6a3aeSmrg 18074cd6a3aeSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18084cd6a3aeSmrgTry \`$[0] --help' for more information.]) ;; 18094cd6a3aeSmrg esac 18104cd6a3aeSmrg shift 18114cd6a3aeSmrgdone 18124cd6a3aeSmrg 18134cd6a3aeSmrgif $lt_cl_silent; then 18144cd6a3aeSmrg exec AS_MESSAGE_FD>/dev/null 18154cd6a3aeSmrgfi 18164cd6a3aeSmrg_LTEOF 18174cd6a3aeSmrg 18184cd6a3aeSmrgcat >>"$CONFIG_LT" <<_LTEOF 18194cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18204cd6a3aeSmrg_LTEOF 18214cd6a3aeSmrg 18224cd6a3aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 18234cd6a3aeSmrgAC_MSG_NOTICE([creating $ofile]) 18244cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 18254cd6a3aeSmrgAS_EXIT(0) 18264cd6a3aeSmrg_LTEOF 18274cd6a3aeSmrgchmod +x "$CONFIG_LT" 18284cd6a3aeSmrg 18294cd6a3aeSmrg# configure is writing to config.log, but config.lt does its own redirection, 18304cd6a3aeSmrg# appending to config.log, which fails on DOS, as config.log is still kept 18314cd6a3aeSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18324cd6a3aeSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18334cd6a3aeSmrglt_cl_success=: 18344cd6a3aeSmrgtest "$silent" = yes && 18354cd6a3aeSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 18364cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>/dev/null 18374cd6a3aeSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18384cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>>config.log 18394cd6a3aeSmrg$lt_cl_success || AS_EXIT(1) 18404cd6a3aeSmrg])# LT_OUTPUT 18414cd6a3aeSmrg 18424cd6a3aeSmrg 18434cd6a3aeSmrg# _LT_CONFIG(TAG) 18444cd6a3aeSmrg# --------------- 18454cd6a3aeSmrg# If TAG is the built-in tag, create an initial libtool script with a 18464cd6a3aeSmrg# default configuration from the untagged config vars. Otherwise add code 18474cd6a3aeSmrg# to config.status for appending the configuration named by TAG from the 18484cd6a3aeSmrg# matching tagged config vars. 18494cd6a3aeSmrgm4_defun([_LT_CONFIG], 18504cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18514cd6a3aeSmrg_LT_CONFIG_SAVE_COMMANDS([ 18524cd6a3aeSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18534cd6a3aeSmrg m4_if(_LT_TAG, [C], [ 18544cd6a3aeSmrg # See if we are running on zsh, and set the options which allow our 18554cd6a3aeSmrg # commands through without removal of \ escapes. 18564cd6a3aeSmrg if test -n "${ZSH_VERSION+set}" ; then 18574cd6a3aeSmrg setopt NO_GLOB_SUBST 18584cd6a3aeSmrg fi 18594cd6a3aeSmrg 18604cd6a3aeSmrg cfgfile="${ofile}T" 18614cd6a3aeSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18624cd6a3aeSmrg $RM "$cfgfile" 18634cd6a3aeSmrg 18644cd6a3aeSmrg cat <<_LT_EOF >> "$cfgfile" 18654cd6a3aeSmrg#! $SHELL 18664cd6a3aeSmrg 18674cd6a3aeSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18684cd6a3aeSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18694cd6a3aeSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18704cd6a3aeSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 18714cd6a3aeSmrg# 18724cd6a3aeSmrg_LT_COPYING 18734cd6a3aeSmrg_LT_LIBTOOL_TAGS 18744cd6a3aeSmrg 18754cd6a3aeSmrg# ### BEGIN LIBTOOL CONFIG 18764cd6a3aeSmrg_LT_LIBTOOL_CONFIG_VARS 18774cd6a3aeSmrg_LT_LIBTOOL_TAG_VARS 18784cd6a3aeSmrg# ### END LIBTOOL CONFIG 18794cd6a3aeSmrg 18804cd6a3aeSmrg_LT_EOF 18814cd6a3aeSmrg 18824cd6a3aeSmrg case $host_os in 18834cd6a3aeSmrg aix3*) 18844cd6a3aeSmrg cat <<\_LT_EOF >> "$cfgfile" 18854cd6a3aeSmrg# AIX sometimes has problems with the GCC collect2 program. For some 18864cd6a3aeSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 18874cd6a3aeSmrg# vanish in a puff of smoke. 18884cd6a3aeSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 18894cd6a3aeSmrg COLLECT_NAMES= 18904cd6a3aeSmrg export COLLECT_NAMES 18914cd6a3aeSmrgfi 18924cd6a3aeSmrg_LT_EOF 18934cd6a3aeSmrg ;; 18944cd6a3aeSmrg esac 18954cd6a3aeSmrg 18964cd6a3aeSmrg _LT_PROG_LTMAIN 18974cd6a3aeSmrg 18984cd6a3aeSmrg # We use sed instead of cat because bash on DJGPP gets confused if 18994cd6a3aeSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 19004cd6a3aeSmrg # text mode, it properly converts lines to CR/LF. This bash problem 19014cd6a3aeSmrg # is reportedly fixed, but why not run on old versions too? 19024cd6a3aeSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 19034cd6a3aeSmrg || (rm -f "$cfgfile"; exit 1) 19044cd6a3aeSmrg 19054cd6a3aeSmrg _LT_PROG_REPLACE_SHELLFNS 19064cd6a3aeSmrg 19074cd6a3aeSmrg mv -f "$cfgfile" "$ofile" || 19084cd6a3aeSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19094cd6a3aeSmrg chmod +x "$ofile" 19104cd6a3aeSmrg], 19114cd6a3aeSmrg[cat <<_LT_EOF >> "$ofile" 19124cd6a3aeSmrg 19134cd6a3aeSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19144cd6a3aeSmrgdnl in a comment (ie after a #). 19154cd6a3aeSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19164cd6a3aeSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19174cd6a3aeSmrg# ### END LIBTOOL TAG CONFIG: $1 19184cd6a3aeSmrg_LT_EOF 19194cd6a3aeSmrg])dnl /m4_if 19204cd6a3aeSmrg], 19214cd6a3aeSmrg[m4_if([$1], [], [ 19224cd6a3aeSmrg PACKAGE='$PACKAGE' 19234cd6a3aeSmrg VERSION='$VERSION' 19244cd6a3aeSmrg TIMESTAMP='$TIMESTAMP' 19254cd6a3aeSmrg RM='$RM' 19264cd6a3aeSmrg ofile='$ofile'], []) 19274cd6a3aeSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19284cd6a3aeSmrg])# _LT_CONFIG 19294cd6a3aeSmrg 19304cd6a3aeSmrg 19314cd6a3aeSmrg# LT_SUPPORTED_TAG(TAG) 19324cd6a3aeSmrg# --------------------- 19334cd6a3aeSmrg# Trace this macro to discover what tags are supported by the libtool 19344cd6a3aeSmrg# --tag option, using: 19354cd6a3aeSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19364cd6a3aeSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 19374cd6a3aeSmrg 19384cd6a3aeSmrg 19394cd6a3aeSmrg# C support is built-in for now 19404cd6a3aeSmrgm4_define([_LT_LANG_C_enabled], []) 19414cd6a3aeSmrgm4_define([_LT_TAGS], []) 19424cd6a3aeSmrg 19434cd6a3aeSmrg 19444cd6a3aeSmrg# LT_LANG(LANG) 19454cd6a3aeSmrg# ------------- 19464cd6a3aeSmrg# Enable libtool support for the given language if not already enabled. 19474cd6a3aeSmrgAC_DEFUN([LT_LANG], 19484cd6a3aeSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19494cd6a3aeSmrgm4_case([$1], 19504cd6a3aeSmrg [C], [_LT_LANG(C)], 19514cd6a3aeSmrg [C++], [_LT_LANG(CXX)], 195270728a38Smrg [Go], [_LT_LANG(GO)], 19534cd6a3aeSmrg [Java], [_LT_LANG(GCJ)], 19544cd6a3aeSmrg [Fortran 77], [_LT_LANG(F77)], 19554cd6a3aeSmrg [Fortran], [_LT_LANG(FC)], 19564cd6a3aeSmrg [Windows Resource], [_LT_LANG(RC)], 19574cd6a3aeSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19584cd6a3aeSmrg [_LT_LANG($1)], 19594cd6a3aeSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19604cd6a3aeSmrg])# LT_LANG 19614cd6a3aeSmrg 19624cd6a3aeSmrg 19634cd6a3aeSmrg# _LT_LANG(LANGNAME) 19644cd6a3aeSmrg# ------------------ 19654cd6a3aeSmrgm4_defun([_LT_LANG], 19664cd6a3aeSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19674cd6a3aeSmrg [LT_SUPPORTED_TAG([$1])dnl 19684cd6a3aeSmrg m4_append([_LT_TAGS], [$1 ])dnl 19694cd6a3aeSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19704cd6a3aeSmrg _LT_LANG_$1_CONFIG($1)])dnl 19714cd6a3aeSmrg])# _LT_LANG 19724cd6a3aeSmrg 19734cd6a3aeSmrg 197470728a38Smrgm4_ifndef([AC_PROG_GO], [ 197570728a38Smrg# NOTE: This macro has been submitted for inclusion into # 197670728a38Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 197770728a38Smrg# a released version of Autoconf we should remove this # 197870728a38Smrg# macro and use it instead. # 197970728a38Smrgm4_defun([AC_PROG_GO], 198070728a38Smrg[AC_LANG_PUSH(Go)dnl 198170728a38SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 198270728a38SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 198370728a38Smrg_AC_ARG_VAR_LDFLAGS()dnl 198470728a38SmrgAC_CHECK_TOOL(GOC, gccgo) 198570728a38Smrgif test -z "$GOC"; then 198670728a38Smrg if test -n "$ac_tool_prefix"; then 198770728a38Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 198870728a38Smrg fi 198970728a38Smrgfi 199070728a38Smrgif test -z "$GOC"; then 199170728a38Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 199270728a38Smrgfi 199370728a38Smrg])#m4_defun 199470728a38Smrg])#m4_ifndef 199570728a38Smrg 199670728a38Smrg 19974cd6a3aeSmrg# _LT_LANG_DEFAULT_CONFIG 19984cd6a3aeSmrg# ----------------------- 19994cd6a3aeSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 20004cd6a3aeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 20014cd6a3aeSmrg [LT_LANG(CXX)], 20024cd6a3aeSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 20034cd6a3aeSmrg 20044cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20054cd6a3aeSmrg [LT_LANG(F77)], 20064cd6a3aeSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 20074cd6a3aeSmrg 20084cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20094cd6a3aeSmrg [LT_LANG(FC)], 20104cd6a3aeSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 20114cd6a3aeSmrg 20124cd6a3aeSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20134cd6a3aeSmrgdnl pulling things in needlessly. 20144cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20154cd6a3aeSmrg [LT_LANG(GCJ)], 20164cd6a3aeSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20174cd6a3aeSmrg [LT_LANG(GCJ)], 20184cd6a3aeSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20194cd6a3aeSmrg [LT_LANG(GCJ)], 20204cd6a3aeSmrg [m4_ifdef([AC_PROG_GCJ], 20214cd6a3aeSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20224cd6a3aeSmrg m4_ifdef([A][M_PROG_GCJ], 20234cd6a3aeSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20244cd6a3aeSmrg m4_ifdef([LT_PROG_GCJ], 20254cd6a3aeSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 20264cd6a3aeSmrg 202770728a38SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 202870728a38Smrg [LT_LANG(GO)], 202970728a38Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 203070728a38Smrg 20314cd6a3aeSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20324cd6a3aeSmrg [LT_LANG(RC)], 20334cd6a3aeSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20344cd6a3aeSmrg])# _LT_LANG_DEFAULT_CONFIG 20354cd6a3aeSmrg 20364cd6a3aeSmrg# Obsolete macros: 20374cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20384cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20394cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20404cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20414cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20424cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 20434cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20444cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20454cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20464cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20474cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 20484cd6a3aeSmrg 20494cd6a3aeSmrg 20504cd6a3aeSmrg# _LT_TAG_COMPILER 20514cd6a3aeSmrg# ---------------- 20524cd6a3aeSmrgm4_defun([_LT_TAG_COMPILER], 20534cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 20544cd6a3aeSmrg 20554cd6a3aeSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20564cd6a3aeSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20574cd6a3aeSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20584cd6a3aeSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 20594cd6a3aeSmrg 20604cd6a3aeSmrg# If no C compiler was specified, use CC. 20614cd6a3aeSmrgLTCC=${LTCC-"$CC"} 20624cd6a3aeSmrg 20634cd6a3aeSmrg# If no C compiler flags were specified, use CFLAGS. 20644cd6a3aeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 20654cd6a3aeSmrg 20664cd6a3aeSmrg# Allow CC to be a program name with arguments. 20674cd6a3aeSmrgcompiler=$CC 20684cd6a3aeSmrg])# _LT_TAG_COMPILER 20694cd6a3aeSmrg 20704cd6a3aeSmrg 20714cd6a3aeSmrg# _LT_COMPILER_BOILERPLATE 20724cd6a3aeSmrg# ------------------------ 20734cd6a3aeSmrg# Check for compiler boilerplate output or warnings with 20744cd6a3aeSmrg# the simple compiler test code. 20754cd6a3aeSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 20764cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl 20774cd6a3aeSmrgac_outfile=conftest.$ac_objext 20784cd6a3aeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20794cd6a3aeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20804cd6a3aeSmrg_lt_compiler_boilerplate=`cat conftest.err` 20814cd6a3aeSmrg$RM conftest* 20824cd6a3aeSmrg])# _LT_COMPILER_BOILERPLATE 20838c9fbc29Smrg 20848c9fbc29Smrg 20858c9fbc29Smrg# _LT_LINKER_BOILERPLATE 20868c9fbc29Smrg# ---------------------- 20878c9fbc29Smrg# Check for linker boilerplate output or warnings with 20888c9fbc29Smrg# the simple link test code. 20894cd6a3aeSmrgm4_defun([_LT_LINKER_BOILERPLATE], 20904cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl 20914e411241Smrgac_outfile=conftest.$ac_objext 20924e411241Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20938c9fbc29Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20948c9fbc29Smrg_lt_linker_boilerplate=`cat conftest.err` 20954cd6a3aeSmrg$RM -r conftest* 20968c9fbc29Smrg])# _LT_LINKER_BOILERPLATE 20978c9fbc29Smrg 20984e411241Smrg# _LT_REQUIRED_DARWIN_CHECKS 20994cd6a3aeSmrg# ------------------------- 21004cd6a3aeSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 21014e411241Smrg case $host_os in 21024e411241Smrg rhapsody* | darwin*) 21034e411241Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 21044e411241Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 21054cd6a3aeSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 21064cd6a3aeSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 21074cd6a3aeSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21084cd6a3aeSmrg _LT_DECL([], [DSYMUTIL], [1], 21094cd6a3aeSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21104cd6a3aeSmrg _LT_DECL([], [NMEDIT], [1], 21114cd6a3aeSmrg [Tool to change global to local symbols on Mac OS X]) 21124cd6a3aeSmrg _LT_DECL([], [LIPO], [1], 21134cd6a3aeSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 21144cd6a3aeSmrg _LT_DECL([], [OTOOL], [1], 21154cd6a3aeSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21164cd6a3aeSmrg _LT_DECL([], [OTOOL64], [1], 21174cd6a3aeSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 21184e411241Smrg 21194e411241Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21204e411241Smrg [lt_cv_apple_cc_single_mod=no 21214e411241Smrg if test -z "${LT_MULTI_MODULE}"; then 21224cd6a3aeSmrg # By default we will add the -single_module flag. You can override 21234cd6a3aeSmrg # by either setting the environment variable LT_MULTI_MODULE 21244cd6a3aeSmrg # non-empty at configure time, or by adding -multi_module to the 21254cd6a3aeSmrg # link flags. 21264cd6a3aeSmrg rm -rf libconftest.dylib* 21274cd6a3aeSmrg echo "int foo(void){return 1;}" > conftest.c 21284cd6a3aeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21294cd6a3aeSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21304cd6a3aeSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21314cd6a3aeSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21324cd6a3aeSmrg _lt_result=$? 213370728a38Smrg # If there is a non-empty error log, and "single_module" 213470728a38Smrg # appears in it, assume the flag caused a linker warning 213570728a38Smrg if test -s conftest.err && $GREP single_module conftest.err; then 213670728a38Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 213770728a38Smrg # Otherwise, if the output was created with a 0 exit code from 213870728a38Smrg # the compiler, it worked. 213970728a38Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 21404cd6a3aeSmrg lt_cv_apple_cc_single_mod=yes 21414cd6a3aeSmrg else 21424cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 21434cd6a3aeSmrg fi 21444cd6a3aeSmrg rm -rf libconftest.dylib* 21454cd6a3aeSmrg rm -f conftest.* 21464e411241Smrg fi]) 214770728a38Smrg 21484e411241Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21494e411241Smrg [lt_cv_ld_exported_symbols_list], 21504e411241Smrg [lt_cv_ld_exported_symbols_list=no 21514e411241Smrg save_LDFLAGS=$LDFLAGS 21524e411241Smrg echo "_main" > conftest.sym 21534e411241Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21544e411241Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21554cd6a3aeSmrg [lt_cv_ld_exported_symbols_list=yes], 21564cd6a3aeSmrg [lt_cv_ld_exported_symbols_list=no]) 21574cd6a3aeSmrg LDFLAGS="$save_LDFLAGS" 21584cd6a3aeSmrg ]) 215970728a38Smrg 21604cd6a3aeSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21614cd6a3aeSmrg [lt_cv_ld_force_load=no 21624cd6a3aeSmrg cat > conftest.c << _LT_EOF 21634cd6a3aeSmrgint forced_loaded() { return 2;} 21644cd6a3aeSmrg_LT_EOF 21654cd6a3aeSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21664cd6a3aeSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21674cd6a3aeSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21684cd6a3aeSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21694cd6a3aeSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21704cd6a3aeSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21714cd6a3aeSmrg cat > conftest.c << _LT_EOF 21724cd6a3aeSmrgint main() { return 0;} 21734cd6a3aeSmrg_LT_EOF 21744cd6a3aeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21754cd6a3aeSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21764cd6a3aeSmrg _lt_result=$? 217770728a38Smrg if test -s conftest.err && $GREP force_load conftest.err; then 217870728a38Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 217970728a38Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 21804cd6a3aeSmrg lt_cv_ld_force_load=yes 21814cd6a3aeSmrg else 21824cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 21834cd6a3aeSmrg fi 21844cd6a3aeSmrg rm -f conftest.err libconftest.a conftest conftest.c 21854cd6a3aeSmrg rm -rf conftest.dSYM 21864e411241Smrg ]) 21874e411241Smrg case $host_os in 21884cd6a3aeSmrg rhapsody* | darwin1.[[012]]) 21894e411241Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21904e411241Smrg darwin1.*) 21914cd6a3aeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21924cd6a3aeSmrg darwin*) # darwin 5.x on 21934e411241Smrg # if running on 10.5 or later, the deployment target defaults 21944e411241Smrg # to the OS version, if on x86, and 10.4, the deployment 21954e411241Smrg # target defaults to 10.4. Don't you love it? 21964e411241Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21974cd6a3aeSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21984cd6a3aeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21994cd6a3aeSmrg 10.[[012]]*) 22004cd6a3aeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 22014cd6a3aeSmrg 10.*) 22024cd6a3aeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22034e411241Smrg esac 22044e411241Smrg ;; 22054e411241Smrg esac 22064e411241Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 22074e411241Smrg _lt_dar_single_mod='$single_module' 22084e411241Smrg fi 22094e411241Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 22104e411241Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 22114e411241Smrg else 22124cd6a3aeSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 22134e411241Smrg fi 22144cd6a3aeSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 22154cd6a3aeSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 22164e411241Smrg else 22174e411241Smrg _lt_dsymutil= 22184e411241Smrg fi 22194e411241Smrg ;; 22204e411241Smrg esac 22214e411241Smrg]) 22228c9fbc29Smrg 22234cd6a3aeSmrg 222470728a38Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 222570728a38Smrg# --------------------------------- 22264cd6a3aeSmrg# Checks for linker and compiler features on darwin 22274cd6a3aeSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22284cd6a3aeSmrg[ 22294cd6a3aeSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22304cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22314cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 22324cd6a3aeSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22334cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22344cd6a3aeSmrg if test "$lt_cv_ld_force_load" = "yes"; then 22354cd6a3aeSmrg _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\"`' 223670728a38Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 223770728a38Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 22384cd6a3aeSmrg else 22394cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22404cd6a3aeSmrg fi 22414cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22424cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22434cd6a3aeSmrg case $cc_basename in 22444cd6a3aeSmrg ifort*) _lt_dar_can_shared=yes ;; 22454cd6a3aeSmrg *) _lt_dar_can_shared=$GCC ;; 22464cd6a3aeSmrg esac 22474cd6a3aeSmrg if test "$_lt_dar_can_shared" = "yes"; then 22484cd6a3aeSmrg output_verbose_link_cmd=func_echo_all 22494cd6a3aeSmrg _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}" 22504cd6a3aeSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22514cd6a3aeSmrg _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}" 22524cd6a3aeSmrg _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}" 22534cd6a3aeSmrg m4_if([$1], [CXX], 22544cd6a3aeSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22554cd6a3aeSmrg _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}" 22564cd6a3aeSmrg _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}" 22574cd6a3aeSmrg fi 22584cd6a3aeSmrg],[]) 22594cd6a3aeSmrg else 22604cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 22614cd6a3aeSmrg fi 22624cd6a3aeSmrg]) 22634cd6a3aeSmrg 22644cd6a3aeSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22654cd6a3aeSmrg# ---------------------------------- 22668c9fbc29Smrg# Links a minimal program and checks the executable 22678c9fbc29Smrg# for the system default hardcoded library path. In most cases, 22688c9fbc29Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22698c9fbc29Smrg# the location of the communication and MPI libs are included too. 22708c9fbc29Smrg# If we don't find anything, use the default library path according 22718c9fbc29Smrg# to the aix ld manual. 22724cd6a3aeSmrg# Store the results from the different compilers for each TAGNAME. 22734cd6a3aeSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 22744cd6a3aeSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22754cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl 22764cd6a3aeSmrgif test "${lt_cv_aix_libpath+set}" = set; then 22774cd6a3aeSmrg aix_libpath=$lt_cv_aix_libpath 22788c9fbc29Smrgelse 22794cd6a3aeSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22804cd6a3aeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22814cd6a3aeSmrg lt_aix_libpath_sed='[ 22824cd6a3aeSmrg /Import File Strings/,/^$/ { 22834cd6a3aeSmrg /^0/ { 22844cd6a3aeSmrg s/^0 *\([^ ]*\) *$/\1/ 22854cd6a3aeSmrg p 22864cd6a3aeSmrg } 22874cd6a3aeSmrg }]' 22884cd6a3aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22894cd6a3aeSmrg # Check for a 64-bit object if we didn't find anything. 22904cd6a3aeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22914cd6a3aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22924cd6a3aeSmrg fi],[]) 22934cd6a3aeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22944cd6a3aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22954cd6a3aeSmrg fi 22964cd6a3aeSmrg ]) 22974cd6a3aeSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 22988c9fbc29Smrgfi 22994cd6a3aeSmrg])# _LT_SYS_MODULE_PATH_AIX 23008c9fbc29Smrg 23018c9fbc29Smrg 23024cd6a3aeSmrg# _LT_SHELL_INIT(ARG) 23034cd6a3aeSmrg# ------------------- 23044cd6a3aeSmrgm4_define([_LT_SHELL_INIT], 23054cd6a3aeSmrg[m4_divert_text([M4SH-INIT], [$1 23064cd6a3aeSmrg])])# _LT_SHELL_INIT 23078c9fbc29Smrg 23088c9fbc29Smrg 23094cd6a3aeSmrg 23104cd6a3aeSmrg# _LT_PROG_ECHO_BACKSLASH 23114cd6a3aeSmrg# ----------------------- 23124cd6a3aeSmrg# Find how we can fake an echo command that does not interpret backslash. 23134cd6a3aeSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 23144cd6a3aeSmrg# of the generated configure script which will find a shell with a builtin 23154cd6a3aeSmrg# printf (which we can use as an echo command). 23164cd6a3aeSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 23174cd6a3aeSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23184cd6a3aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23194cd6a3aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23204cd6a3aeSmrg 23214cd6a3aeSmrgAC_MSG_CHECKING([how to print strings]) 23224cd6a3aeSmrg# Test print first, because it will be a builtin if present. 23234cd6a3aeSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23244cd6a3aeSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23254cd6a3aeSmrg ECHO='print -r --' 23264cd6a3aeSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23274cd6a3aeSmrg ECHO='printf %s\n' 23288c9fbc29Smrgelse 23294cd6a3aeSmrg # Use this function as a fallback that always works. 23304cd6a3aeSmrg func_fallback_echo () 23314cd6a3aeSmrg { 23324cd6a3aeSmrg eval 'cat <<_LTECHO_EOF 23334cd6a3aeSmrg$[]1 23344cd6a3aeSmrg_LTECHO_EOF' 23354cd6a3aeSmrg } 23364cd6a3aeSmrg ECHO='func_fallback_echo' 23374cd6a3aeSmrgfi 23388c9fbc29Smrg 23394cd6a3aeSmrg# func_echo_all arg... 23404cd6a3aeSmrg# Invoke $ECHO with all args, space-separated. 23414cd6a3aeSmrgfunc_echo_all () 23424cd6a3aeSmrg{ 23434cd6a3aeSmrg $ECHO "$*" 23444cd6a3aeSmrg} 23458c9fbc29Smrg 23464cd6a3aeSmrgcase "$ECHO" in 23474cd6a3aeSmrg printf*) AC_MSG_RESULT([printf]) ;; 23484cd6a3aeSmrg print*) AC_MSG_RESULT([print -r]) ;; 23494cd6a3aeSmrg *) AC_MSG_RESULT([cat]) ;; 23504cd6a3aeSmrgesac 23518c9fbc29Smrg 23524cd6a3aeSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 23534cd6a3aeSmrg[_AS_DETECT_SUGGESTED([ 23544cd6a3aeSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23554cd6a3aeSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23564cd6a3aeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23574cd6a3aeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23584cd6a3aeSmrg PATH=/empty FPATH=/empty; export PATH FPATH 23594cd6a3aeSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23604cd6a3aeSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 23618c9fbc29Smrg 23624cd6a3aeSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23634cd6a3aeSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23644cd6a3aeSmrg])# _LT_PROG_ECHO_BACKSLASH 23658c9fbc29Smrg 23668c9fbc29Smrg 23674cd6a3aeSmrg# _LT_WITH_SYSROOT 23684cd6a3aeSmrg# ---------------- 23694cd6a3aeSmrgAC_DEFUN([_LT_WITH_SYSROOT], 23704cd6a3aeSmrg[AC_MSG_CHECKING([for sysroot]) 23714cd6a3aeSmrgAC_ARG_WITH([sysroot], 23724cd6a3aeSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23734cd6a3aeSmrg (or the compiler's sysroot if not specified).], 23744cd6a3aeSmrg[], [with_sysroot=no]) 23754cd6a3aeSmrg 23764cd6a3aeSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 23774cd6a3aeSmrgdnl in case the user passed a directory name. 23784cd6a3aeSmrglt_sysroot= 23794cd6a3aeSmrgcase ${with_sysroot} in #( 23804cd6a3aeSmrg yes) 23814cd6a3aeSmrg if test "$GCC" = yes; then 23824cd6a3aeSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23834cd6a3aeSmrg fi 23844cd6a3aeSmrg ;; #( 23854cd6a3aeSmrg /*) 23864cd6a3aeSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23874cd6a3aeSmrg ;; #( 23884cd6a3aeSmrg no|'') 23894cd6a3aeSmrg ;; #( 23904cd6a3aeSmrg *) 23914cd6a3aeSmrg AC_MSG_RESULT([${with_sysroot}]) 23924cd6a3aeSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23934cd6a3aeSmrg ;; 23944cd6a3aeSmrgesac 23958c9fbc29Smrg 23964cd6a3aeSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23974cd6a3aeSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23984cd6a3aeSmrg[dependent libraries, and in which our libraries should be installed.])]) 23998c9fbc29Smrg 24004cd6a3aeSmrg# _LT_ENABLE_LOCK 24014cd6a3aeSmrg# --------------- 24024cd6a3aeSmrgm4_defun([_LT_ENABLE_LOCK], 24038c9fbc29Smrg[AC_ARG_ENABLE([libtool-lock], 24044cd6a3aeSmrg [AS_HELP_STRING([--disable-libtool-lock], 24054cd6a3aeSmrg [avoid locking (might break parallel builds)])]) 24068c9fbc29Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 24078c9fbc29Smrg 24088c9fbc29Smrg# Some flags need to be propagated to the compiler or linker for good 24098c9fbc29Smrg# libtool support. 24108c9fbc29Smrgcase $host in 24118c9fbc29Smrgia64-*-hpux*) 24128c9fbc29Smrg # Find out which ABI we are using. 24138c9fbc29Smrg echo 'int i;' > conftest.$ac_ext 24148c9fbc29Smrg if AC_TRY_EVAL(ac_compile); then 24158c9fbc29Smrg case `/usr/bin/file conftest.$ac_objext` in 24164cd6a3aeSmrg *ELF-32*) 24174cd6a3aeSmrg HPUX_IA64_MODE="32" 24184cd6a3aeSmrg ;; 24194cd6a3aeSmrg *ELF-64*) 24204cd6a3aeSmrg HPUX_IA64_MODE="64" 24214cd6a3aeSmrg ;; 24228c9fbc29Smrg esac 24238c9fbc29Smrg fi 24248c9fbc29Smrg rm -rf conftest* 24258c9fbc29Smrg ;; 24268c9fbc29Smrg*-*-irix6*) 24278c9fbc29Smrg # Find out which ABI we are using. 24284cd6a3aeSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24298c9fbc29Smrg if AC_TRY_EVAL(ac_compile); then 24304cd6a3aeSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 24314cd6a3aeSmrg case `/usr/bin/file conftest.$ac_objext` in 24324cd6a3aeSmrg *32-bit*) 24334cd6a3aeSmrg LD="${LD-ld} -melf32bsmip" 24344cd6a3aeSmrg ;; 24354cd6a3aeSmrg *N32*) 24364cd6a3aeSmrg LD="${LD-ld} -melf32bmipn32" 24374cd6a3aeSmrg ;; 24384cd6a3aeSmrg *64-bit*) 24394cd6a3aeSmrg LD="${LD-ld} -melf64bmip" 24404cd6a3aeSmrg ;; 24414cd6a3aeSmrg esac 24424cd6a3aeSmrg else 24434cd6a3aeSmrg case `/usr/bin/file conftest.$ac_objext` in 24444cd6a3aeSmrg *32-bit*) 24454cd6a3aeSmrg LD="${LD-ld} -32" 24464cd6a3aeSmrg ;; 24474cd6a3aeSmrg *N32*) 24484cd6a3aeSmrg LD="${LD-ld} -n32" 24494cd6a3aeSmrg ;; 24504cd6a3aeSmrg *64-bit*) 24514cd6a3aeSmrg LD="${LD-ld} -64" 24524cd6a3aeSmrg ;; 24534cd6a3aeSmrg esac 24544cd6a3aeSmrg fi 24558c9fbc29Smrg fi 24568c9fbc29Smrg rm -rf conftest* 24578c9fbc29Smrg ;; 24588c9fbc29Smrg 24594e411241Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24604cd6a3aeSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24618c9fbc29Smrg # Find out which ABI we are using. 24628c9fbc29Smrg echo 'int i;' > conftest.$ac_ext 24638c9fbc29Smrg if AC_TRY_EVAL(ac_compile); then 24648c9fbc29Smrg case `/usr/bin/file conftest.o` in 24654cd6a3aeSmrg *32-bit*) 24664cd6a3aeSmrg case $host in 24674cd6a3aeSmrg x86_64-*kfreebsd*-gnu) 24684cd6a3aeSmrg LD="${LD-ld} -m elf_i386_fbsd" 24694cd6a3aeSmrg ;; 24704cd6a3aeSmrg x86_64-*linux*) 24714cd6a3aeSmrg LD="${LD-ld} -m elf_i386" 24724cd6a3aeSmrg ;; 24734cd6a3aeSmrg ppc64-*linux*|powerpc64-*linux*) 24744cd6a3aeSmrg LD="${LD-ld} -m elf32ppclinux" 24754cd6a3aeSmrg ;; 24764cd6a3aeSmrg s390x-*linux*) 24774cd6a3aeSmrg LD="${LD-ld} -m elf_s390" 24784cd6a3aeSmrg ;; 24794cd6a3aeSmrg sparc64-*linux*) 24804cd6a3aeSmrg LD="${LD-ld} -m elf32_sparc" 24814cd6a3aeSmrg ;; 24824cd6a3aeSmrg esac 24834cd6a3aeSmrg ;; 24844cd6a3aeSmrg *64-bit*) 24854cd6a3aeSmrg case $host in 24864cd6a3aeSmrg x86_64-*kfreebsd*-gnu) 24874cd6a3aeSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 24884cd6a3aeSmrg ;; 24894cd6a3aeSmrg x86_64-*linux*) 24904cd6a3aeSmrg LD="${LD-ld} -m elf_x86_64" 24914cd6a3aeSmrg ;; 24924cd6a3aeSmrg ppc*-*linux*|powerpc*-*linux*) 24934cd6a3aeSmrg LD="${LD-ld} -m elf64ppc" 24944cd6a3aeSmrg ;; 24954cd6a3aeSmrg s390*-*linux*|s390*-*tpf*) 24964cd6a3aeSmrg LD="${LD-ld} -m elf64_s390" 24974cd6a3aeSmrg ;; 24984cd6a3aeSmrg sparc*-*linux*) 24994cd6a3aeSmrg LD="${LD-ld} -m elf64_sparc" 25004cd6a3aeSmrg ;; 25014cd6a3aeSmrg esac 25024cd6a3aeSmrg ;; 25038c9fbc29Smrg esac 25048c9fbc29Smrg fi 25058c9fbc29Smrg rm -rf conftest* 25068c9fbc29Smrg ;; 25078c9fbc29Smrg 25088c9fbc29Smrg*-*-sco3.2v5*) 25098c9fbc29Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25108c9fbc29Smrg SAVE_CFLAGS="$CFLAGS" 25118c9fbc29Smrg CFLAGS="$CFLAGS -belf" 25128c9fbc29Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25138c9fbc29Smrg [AC_LANG_PUSH(C) 25144cd6a3aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25158c9fbc29Smrg AC_LANG_POP]) 25168c9fbc29Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25178c9fbc29Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25188c9fbc29Smrg CFLAGS="$SAVE_CFLAGS" 25198c9fbc29Smrg fi 25208c9fbc29Smrg ;; 252170728a38Smrg*-*solaris*) 25228c9fbc29Smrg # Find out which ABI we are using. 25238c9fbc29Smrg echo 'int i;' > conftest.$ac_ext 25248c9fbc29Smrg if AC_TRY_EVAL(ac_compile); then 25258c9fbc29Smrg case `/usr/bin/file conftest.o` in 25268c9fbc29Smrg *64-bit*) 25278c9fbc29Smrg case $lt_cv_prog_gnu_ld in 252870728a38Smrg yes*) 252970728a38Smrg case $host in 253070728a38Smrg i?86-*-solaris*) 253170728a38Smrg LD="${LD-ld} -m elf_x86_64" 253270728a38Smrg ;; 253370728a38Smrg sparc*-*-solaris*) 253470728a38Smrg LD="${LD-ld} -m elf64_sparc" 253570728a38Smrg ;; 253670728a38Smrg esac 253770728a38Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 253870728a38Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 253970728a38Smrg LD="${LD-ld}_sol2" 254070728a38Smrg fi 254170728a38Smrg ;; 25424e411241Smrg *) 25434cd6a3aeSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25444e411241Smrg LD="${LD-ld} -64" 25454e411241Smrg fi 25464e411241Smrg ;; 25478c9fbc29Smrg esac 25488c9fbc29Smrg ;; 25498c9fbc29Smrg esac 25508c9fbc29Smrg fi 25518c9fbc29Smrg rm -rf conftest* 25528c9fbc29Smrg ;; 25538c9fbc29Smrgesac 25548c9fbc29Smrg 25558c9fbc29Smrgneed_locks="$enable_libtool_lock" 25564cd6a3aeSmrg])# _LT_ENABLE_LOCK 25578c9fbc29Smrg 25588c9fbc29Smrg 25594cd6a3aeSmrg# _LT_PROG_AR 25604cd6a3aeSmrg# ----------- 25614cd6a3aeSmrgm4_defun([_LT_PROG_AR], 25624cd6a3aeSmrg[AC_CHECK_TOOLS(AR, [ar], false) 25634cd6a3aeSmrg: ${AR=ar} 25644cd6a3aeSmrg: ${AR_FLAGS=cru} 25654cd6a3aeSmrg_LT_DECL([], [AR], [1], [The archiver]) 25664cd6a3aeSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25674cd6a3aeSmrg 25684cd6a3aeSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25694cd6a3aeSmrg [lt_cv_ar_at_file=no 25704cd6a3aeSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25714cd6a3aeSmrg [echo conftest.$ac_objext > conftest.lst 25724cd6a3aeSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25734cd6a3aeSmrg AC_TRY_EVAL([lt_ar_try]) 25744cd6a3aeSmrg if test "$ac_status" -eq 0; then 25754cd6a3aeSmrg # Ensure the archiver fails upon bogus file names. 25764cd6a3aeSmrg rm -f conftest.$ac_objext libconftest.a 25774cd6a3aeSmrg AC_TRY_EVAL([lt_ar_try]) 25784cd6a3aeSmrg if test "$ac_status" -ne 0; then 25794cd6a3aeSmrg lt_cv_ar_at_file=@ 25804cd6a3aeSmrg fi 25814cd6a3aeSmrg fi 25824cd6a3aeSmrg rm -f conftest.* libconftest.a 25834cd6a3aeSmrg ]) 25844cd6a3aeSmrg ]) 25858c9fbc29Smrg 25864cd6a3aeSmrgif test "x$lt_cv_ar_at_file" = xno; then 25874cd6a3aeSmrg archiver_list_spec= 25884cd6a3aeSmrgelse 25894cd6a3aeSmrg archiver_list_spec=$lt_cv_ar_at_file 25904cd6a3aeSmrgfi 25914cd6a3aeSmrg_LT_DECL([], [archiver_list_spec], [1], 25924cd6a3aeSmrg [How to feed a file listing to the archiver]) 25934cd6a3aeSmrg])# _LT_PROG_AR 25944cd6a3aeSmrg 25954cd6a3aeSmrg 25964cd6a3aeSmrg# _LT_CMD_OLD_ARCHIVE 25974cd6a3aeSmrg# ------------------- 25984cd6a3aeSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 25994cd6a3aeSmrg[_LT_PROG_AR 26004cd6a3aeSmrg 26014cd6a3aeSmrgAC_CHECK_TOOL(STRIP, strip, :) 26024cd6a3aeSmrgtest -z "$STRIP" && STRIP=: 26034cd6a3aeSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 26044cd6a3aeSmrg 26054cd6a3aeSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 26064cd6a3aeSmrgtest -z "$RANLIB" && RANLIB=: 26074cd6a3aeSmrg_LT_DECL([], [RANLIB], [1], 26084cd6a3aeSmrg [Commands used to install an old-style archive]) 26094cd6a3aeSmrg 26104cd6a3aeSmrg# Determine commands to create old-style static archives. 26114cd6a3aeSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 26124cd6a3aeSmrgold_postinstall_cmds='chmod 644 $oldlib' 26134cd6a3aeSmrgold_postuninstall_cmds= 26144cd6a3aeSmrg 26154cd6a3aeSmrgif test -n "$RANLIB"; then 26164cd6a3aeSmrg case $host_os in 26174cd6a3aeSmrg openbsd*) 261870728a38Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 26194cd6a3aeSmrg ;; 26204cd6a3aeSmrg *) 262170728a38Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 26224cd6a3aeSmrg ;; 26234cd6a3aeSmrg esac 262470728a38Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 26254cd6a3aeSmrgfi 26264cd6a3aeSmrg 26274cd6a3aeSmrgcase $host_os in 26284cd6a3aeSmrg darwin*) 26294cd6a3aeSmrg lock_old_archive_extraction=yes ;; 26304cd6a3aeSmrg *) 26314cd6a3aeSmrg lock_old_archive_extraction=no ;; 26324cd6a3aeSmrgesac 26334cd6a3aeSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 26344cd6a3aeSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26354cd6a3aeSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 26364cd6a3aeSmrg [Commands used to build an old-style archive]) 26374cd6a3aeSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 26384cd6a3aeSmrg [Whether to use a lock for old archive extraction]) 26394cd6a3aeSmrg])# _LT_CMD_OLD_ARCHIVE 26404cd6a3aeSmrg 26414cd6a3aeSmrg 26424cd6a3aeSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26434cd6a3aeSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26444cd6a3aeSmrg# ---------------------------------------------------------------- 26454cd6a3aeSmrg# Check whether the given compiler option works 26464cd6a3aeSmrgAC_DEFUN([_LT_COMPILER_OPTION], 26474cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26484cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 26494cd6a3aeSmrgAC_CACHE_CHECK([$1], [$2], 26504cd6a3aeSmrg [$2=no 26514cd6a3aeSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26524cd6a3aeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26534cd6a3aeSmrg lt_compiler_flag="$3" 26544cd6a3aeSmrg # Insert the option either (1) after the last *FLAGS variable, or 26554cd6a3aeSmrg # (2) before a word containing "conftest.", or (3) at the end. 26564cd6a3aeSmrg # Note that $ac_compile itself does not contain backslashes and begins 26574cd6a3aeSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26584cd6a3aeSmrg # The option is referenced via a variable to avoid confusing sed. 26594cd6a3aeSmrg lt_compile=`echo "$ac_compile" | $SED \ 26604cd6a3aeSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26614cd6a3aeSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26624cd6a3aeSmrg -e 's:$: $lt_compiler_flag:'` 26634cd6a3aeSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26644cd6a3aeSmrg (eval "$lt_compile" 2>conftest.err) 26654cd6a3aeSmrg ac_status=$? 26664cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 26674cd6a3aeSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26684cd6a3aeSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 26694cd6a3aeSmrg # The compiler can only warn and ignore the option if not recognized 26704cd6a3aeSmrg # So say no if there are warnings other than the usual output. 26714cd6a3aeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26724cd6a3aeSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26734cd6a3aeSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26744cd6a3aeSmrg $2=yes 26758c9fbc29Smrg fi 26768c9fbc29Smrg fi 26774cd6a3aeSmrg $RM conftest* 26788c9fbc29Smrg]) 26798c9fbc29Smrg 26808c9fbc29Smrgif test x"[$]$2" = xyes; then 26814cd6a3aeSmrg m4_if([$5], , :, [$5]) 26828c9fbc29Smrgelse 26834cd6a3aeSmrg m4_if([$6], , :, [$6]) 26848c9fbc29Smrgfi 26854cd6a3aeSmrg])# _LT_COMPILER_OPTION 26868c9fbc29Smrg 26874cd6a3aeSmrg# Old name: 26884cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 26894cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 26904cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 26918c9fbc29Smrg 26924cd6a3aeSmrg 26934cd6a3aeSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26944cd6a3aeSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26954cd6a3aeSmrg# ---------------------------------------------------- 26964cd6a3aeSmrg# Check whether the given linker option works 26974cd6a3aeSmrgAC_DEFUN([_LT_LINKER_OPTION], 26984cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26994cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 27004e411241SmrgAC_CACHE_CHECK([$1], [$2], 27018c9fbc29Smrg [$2=no 27028c9fbc29Smrg save_LDFLAGS="$LDFLAGS" 27038c9fbc29Smrg LDFLAGS="$LDFLAGS $3" 27044e411241Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 27058c9fbc29Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 27068c9fbc29Smrg # The linker can only warn and ignore the option if not recognized 27078c9fbc29Smrg # So say no if there are warnings 27088c9fbc29Smrg if test -s conftest.err; then 27098c9fbc29Smrg # Append any errors to the config.log. 27108c9fbc29Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 27114cd6a3aeSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 27128c9fbc29Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 27138c9fbc29Smrg if diff conftest.exp conftest.er2 >/dev/null; then 27148c9fbc29Smrg $2=yes 27158c9fbc29Smrg fi 27168c9fbc29Smrg else 27178c9fbc29Smrg $2=yes 27188c9fbc29Smrg fi 27198c9fbc29Smrg fi 27204cd6a3aeSmrg $RM -r conftest* 27218c9fbc29Smrg LDFLAGS="$save_LDFLAGS" 27228c9fbc29Smrg]) 27238c9fbc29Smrg 27248c9fbc29Smrgif test x"[$]$2" = xyes; then 27254cd6a3aeSmrg m4_if([$4], , :, [$4]) 27268c9fbc29Smrgelse 27274cd6a3aeSmrg m4_if([$5], , :, [$5]) 27288c9fbc29Smrgfi 27294cd6a3aeSmrg])# _LT_LINKER_OPTION 27308c9fbc29Smrg 27314cd6a3aeSmrg# Old name: 27324cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 27334cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 27344cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 27358c9fbc29Smrg 27364cd6a3aeSmrg 27374cd6a3aeSmrg# LT_CMD_MAX_LEN 27384cd6a3aeSmrg#--------------- 27394cd6a3aeSmrgAC_DEFUN([LT_CMD_MAX_LEN], 27404cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27414cd6a3aeSmrg# find the maximum length of command line arguments 27428c9fbc29SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27438c9fbc29SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27448c9fbc29Smrg i=0 27458c9fbc29Smrg teststring="ABCD" 27468c9fbc29Smrg 27478c9fbc29Smrg case $build_os in 27488c9fbc29Smrg msdosdjgpp*) 27498c9fbc29Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27508c9fbc29Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27518c9fbc29Smrg # during glob expansion). Even if it were fixed, the result of this 27528c9fbc29Smrg # check would be larger than it should be. 27538c9fbc29Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27548c9fbc29Smrg ;; 27558c9fbc29Smrg 27568c9fbc29Smrg gnu*) 27578c9fbc29Smrg # Under GNU Hurd, this test is not required because there is 27588c9fbc29Smrg # no limit to the length of command line arguments. 27598c9fbc29Smrg # Libtool will interpret -1 as no limit whatsoever 27608c9fbc29Smrg lt_cv_sys_max_cmd_len=-1; 27618c9fbc29Smrg ;; 27628c9fbc29Smrg 27634cd6a3aeSmrg cygwin* | mingw* | cegcc*) 27648c9fbc29Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27658c9fbc29Smrg # about 5 minutes as the teststring grows exponentially. 27668c9fbc29Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27678c9fbc29Smrg # you end up with a "frozen" computer, even though with patience 27688c9fbc29Smrg # the test eventually succeeds (with a max line length of 256k). 27698c9fbc29Smrg # Instead, let's just punt: use the minimum linelength reported by 27708c9fbc29Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27718c9fbc29Smrg lt_cv_sys_max_cmd_len=8192; 27728c9fbc29Smrg ;; 27738c9fbc29Smrg 27744cd6a3aeSmrg mint*) 27754cd6a3aeSmrg # On MiNT this can take a long time and run out of memory. 27764cd6a3aeSmrg lt_cv_sys_max_cmd_len=8192; 27774cd6a3aeSmrg ;; 27784cd6a3aeSmrg 27798c9fbc29Smrg amigaos*) 27808c9fbc29Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27818c9fbc29Smrg # So we just punt and use a minimum line length of 8192. 27828c9fbc29Smrg lt_cv_sys_max_cmd_len=8192; 27838c9fbc29Smrg ;; 27848c9fbc29Smrg 27858c9fbc29Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27868c9fbc29Smrg # This has been around since 386BSD, at least. Likely further. 27878c9fbc29Smrg if test -x /sbin/sysctl; then 27888c9fbc29Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27898c9fbc29Smrg elif test -x /usr/sbin/sysctl; then 27908c9fbc29Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27918c9fbc29Smrg else 27928c9fbc29Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27938c9fbc29Smrg fi 27948c9fbc29Smrg # And add a safety zone 27958c9fbc29Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27968c9fbc29Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27978c9fbc29Smrg ;; 27988c9fbc29Smrg 27998c9fbc29Smrg interix*) 28008c9fbc29Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 28018c9fbc29Smrg lt_cv_sys_max_cmd_len=196608 28028c9fbc29Smrg ;; 28038c9fbc29Smrg 280470728a38Smrg os2*) 280570728a38Smrg # The test takes a long time on OS/2. 280670728a38Smrg lt_cv_sys_max_cmd_len=8192 280770728a38Smrg ;; 280870728a38Smrg 28098c9fbc29Smrg osf*) 28108c9fbc29Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 28118c9fbc29Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 28128c9fbc29Smrg # nice to cause kernel panics so lets avoid the loop below. 28138c9fbc29Smrg # First set a reasonable default. 28148c9fbc29Smrg lt_cv_sys_max_cmd_len=16384 28158c9fbc29Smrg # 28168c9fbc29Smrg if test -x /sbin/sysconfig; then 28178c9fbc29Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 28188c9fbc29Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 28198c9fbc29Smrg esac 28208c9fbc29Smrg fi 28218c9fbc29Smrg ;; 28228c9fbc29Smrg sco3.2v5*) 28238c9fbc29Smrg lt_cv_sys_max_cmd_len=102400 28248c9fbc29Smrg ;; 28258c9fbc29Smrg sysv5* | sco5v6* | sysv4.2uw2*) 28268c9fbc29Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 28278c9fbc29Smrg if test -n "$kargmax"; then 28284cd6a3aeSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 28298c9fbc29Smrg else 28308c9fbc29Smrg lt_cv_sys_max_cmd_len=32768 28318c9fbc29Smrg fi 28328c9fbc29Smrg ;; 28338c9fbc29Smrg *) 28344e411241Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 28354e411241Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 28364e411241Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 28374e411241Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28384e411241Smrg else 28394cd6a3aeSmrg # Make teststring a little bigger before we do anything with it. 28404cd6a3aeSmrg # a 1K string should be a reasonable start. 28414cd6a3aeSmrg for i in 1 2 3 4 5 6 7 8 ; do 28424cd6a3aeSmrg teststring=$teststring$teststring 28434cd6a3aeSmrg done 28444e411241Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28454cd6a3aeSmrg # If test is not a shell built-in, we'll probably end up computing a 28464cd6a3aeSmrg # maximum length that is only half of the actual maximum length, but 28474cd6a3aeSmrg # we can't tell. 284870728a38Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 28494cd6a3aeSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28504e411241Smrg test $i != 17 # 1/2 MB should be enough 28514e411241Smrg do 28524e411241Smrg i=`expr $i + 1` 28534e411241Smrg teststring=$teststring$teststring 28544e411241Smrg done 28554cd6a3aeSmrg # Only check the string length outside the loop. 28564cd6a3aeSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28574e411241Smrg teststring= 28584cd6a3aeSmrg # Add a significant safety factor because C++ compilers can tack on 28594cd6a3aeSmrg # massive amounts of additional arguments before passing them to the 28604cd6a3aeSmrg # linker. It appears as though 1/2 is a usable value. 28614e411241Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28624e411241Smrg fi 28638c9fbc29Smrg ;; 28648c9fbc29Smrg esac 28658c9fbc29Smrg]) 28668c9fbc29Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28678c9fbc29Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28688c9fbc29Smrgelse 28698c9fbc29Smrg AC_MSG_RESULT(none) 28708c9fbc29Smrgfi 28714cd6a3aeSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28724cd6a3aeSmrg_LT_DECL([], [max_cmd_len], [0], 28734cd6a3aeSmrg [What is the maximum length of a command?]) 28744cd6a3aeSmrg])# LT_CMD_MAX_LEN 28758c9fbc29Smrg 28764cd6a3aeSmrg# Old name: 28774cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28784cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 28794cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 28808c9fbc29Smrg 28814cd6a3aeSmrg 28824cd6a3aeSmrg# _LT_HEADER_DLFCN 28834cd6a3aeSmrg# ---------------- 28844cd6a3aeSmrgm4_defun([_LT_HEADER_DLFCN], 28854cd6a3aeSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28864cd6a3aeSmrg])# _LT_HEADER_DLFCN 28878c9fbc29Smrg 28888c9fbc29Smrg 28894cd6a3aeSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28904cd6a3aeSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28914cd6a3aeSmrg# ---------------------------------------------------------------- 28924cd6a3aeSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 28934cd6a3aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 28948c9fbc29Smrgif test "$cross_compiling" = yes; then : 28958c9fbc29Smrg [$4] 28968c9fbc29Smrgelse 28978c9fbc29Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28988c9fbc29Smrg lt_status=$lt_dlunknown 28994cd6a3aeSmrg cat > conftest.$ac_ext <<_LT_EOF 29004cd6a3aeSmrg[#line $LINENO "configure" 29018c9fbc29Smrg#include "confdefs.h" 29028c9fbc29Smrg 29038c9fbc29Smrg#if HAVE_DLFCN_H 29048c9fbc29Smrg#include <dlfcn.h> 29058c9fbc29Smrg#endif 29068c9fbc29Smrg 29078c9fbc29Smrg#include <stdio.h> 29088c9fbc29Smrg 29098c9fbc29Smrg#ifdef RTLD_GLOBAL 29108c9fbc29Smrg# define LT_DLGLOBAL RTLD_GLOBAL 29118c9fbc29Smrg#else 29128c9fbc29Smrg# ifdef DL_GLOBAL 29138c9fbc29Smrg# define LT_DLGLOBAL DL_GLOBAL 29148c9fbc29Smrg# else 29158c9fbc29Smrg# define LT_DLGLOBAL 0 29168c9fbc29Smrg# endif 29178c9fbc29Smrg#endif 29188c9fbc29Smrg 29198c9fbc29Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 29208c9fbc29Smrg find out it does not work in some platform. */ 29218c9fbc29Smrg#ifndef LT_DLLAZY_OR_NOW 29228c9fbc29Smrg# ifdef RTLD_LAZY 29238c9fbc29Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 29248c9fbc29Smrg# else 29258c9fbc29Smrg# ifdef DL_LAZY 29268c9fbc29Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 29278c9fbc29Smrg# else 29288c9fbc29Smrg# ifdef RTLD_NOW 29298c9fbc29Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 29308c9fbc29Smrg# else 29318c9fbc29Smrg# ifdef DL_NOW 29328c9fbc29Smrg# define LT_DLLAZY_OR_NOW DL_NOW 29338c9fbc29Smrg# else 29348c9fbc29Smrg# define LT_DLLAZY_OR_NOW 0 29358c9fbc29Smrg# endif 29368c9fbc29Smrg# endif 29378c9fbc29Smrg# endif 29388c9fbc29Smrg# endif 29398c9fbc29Smrg#endif 29408c9fbc29Smrg 29414cd6a3aeSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 29424cd6a3aeSmrg correspondingly for the symbols needed. */ 29434cd6a3aeSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29444cd6a3aeSmrgint fnord () __attribute__((visibility("default"))); 29458c9fbc29Smrg#endif 29468c9fbc29Smrg 29474cd6a3aeSmrgint fnord () { return 42; } 29488c9fbc29Smrgint main () 29498c9fbc29Smrg{ 29508c9fbc29Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29518c9fbc29Smrg int status = $lt_dlunknown; 29528c9fbc29Smrg 29538c9fbc29Smrg if (self) 29548c9fbc29Smrg { 29558c9fbc29Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29564cd6a3aeSmrg else 29574cd6a3aeSmrg { 29584cd6a3aeSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29594cd6a3aeSmrg else puts (dlerror ()); 29604cd6a3aeSmrg } 29618c9fbc29Smrg /* dlclose (self); */ 29628c9fbc29Smrg } 29638c9fbc29Smrg else 29648c9fbc29Smrg puts (dlerror ()); 29658c9fbc29Smrg 29664cd6a3aeSmrg return status; 29678c9fbc29Smrg}] 29684cd6a3aeSmrg_LT_EOF 29698c9fbc29Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29708c9fbc29Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29718c9fbc29Smrg lt_status=$? 29728c9fbc29Smrg case x$lt_status in 29738c9fbc29Smrg x$lt_dlno_uscore) $1 ;; 29748c9fbc29Smrg x$lt_dlneed_uscore) $2 ;; 29758c9fbc29Smrg x$lt_dlunknown|x*) $3 ;; 29768c9fbc29Smrg esac 29778c9fbc29Smrg else : 29788c9fbc29Smrg # compilation failed 29798c9fbc29Smrg $3 29808c9fbc29Smrg fi 29818c9fbc29Smrgfi 29828c9fbc29Smrgrm -fr conftest* 29834cd6a3aeSmrg])# _LT_TRY_DLOPEN_SELF 29848c9fbc29Smrg 29858c9fbc29Smrg 29864cd6a3aeSmrg# LT_SYS_DLOPEN_SELF 29874cd6a3aeSmrg# ------------------ 29884cd6a3aeSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29894cd6a3aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 29908c9fbc29Smrgif test "x$enable_dlopen" != xyes; then 29918c9fbc29Smrg enable_dlopen=unknown 29928c9fbc29Smrg enable_dlopen_self=unknown 29938c9fbc29Smrg enable_dlopen_self_static=unknown 29948c9fbc29Smrgelse 29958c9fbc29Smrg lt_cv_dlopen=no 29968c9fbc29Smrg lt_cv_dlopen_libs= 29978c9fbc29Smrg 29988c9fbc29Smrg case $host_os in 29998c9fbc29Smrg beos*) 30008c9fbc29Smrg lt_cv_dlopen="load_add_on" 30018c9fbc29Smrg lt_cv_dlopen_libs= 30028c9fbc29Smrg lt_cv_dlopen_self=yes 30038c9fbc29Smrg ;; 30048c9fbc29Smrg 30054cd6a3aeSmrg mingw* | pw32* | cegcc*) 30068c9fbc29Smrg lt_cv_dlopen="LoadLibrary" 30078c9fbc29Smrg lt_cv_dlopen_libs= 30084cd6a3aeSmrg ;; 30098c9fbc29Smrg 30108c9fbc29Smrg cygwin*) 30118c9fbc29Smrg lt_cv_dlopen="dlopen" 30128c9fbc29Smrg lt_cv_dlopen_libs= 30134cd6a3aeSmrg ;; 30148c9fbc29Smrg 30158c9fbc29Smrg darwin*) 30168c9fbc29Smrg # if libdl is installed we need to link against it 30178c9fbc29Smrg AC_CHECK_LIB([dl], [dlopen], 30188c9fbc29Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 30198c9fbc29Smrg lt_cv_dlopen="dyld" 30208c9fbc29Smrg lt_cv_dlopen_libs= 30218c9fbc29Smrg lt_cv_dlopen_self=yes 30228c9fbc29Smrg ]) 30234cd6a3aeSmrg ;; 30248c9fbc29Smrg 30258c9fbc29Smrg *) 30268c9fbc29Smrg AC_CHECK_FUNC([shl_load], 30278c9fbc29Smrg [lt_cv_dlopen="shl_load"], 30288c9fbc29Smrg [AC_CHECK_LIB([dld], [shl_load], 30294e411241Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 30308c9fbc29Smrg [AC_CHECK_FUNC([dlopen], 30318c9fbc29Smrg [lt_cv_dlopen="dlopen"], 30328c9fbc29Smrg [AC_CHECK_LIB([dl], [dlopen], 30338c9fbc29Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 30348c9fbc29Smrg [AC_CHECK_LIB([svld], [dlopen], 30358c9fbc29Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 30368c9fbc29Smrg [AC_CHECK_LIB([dld], [dld_link], 30374e411241Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30388c9fbc29Smrg ]) 30398c9fbc29Smrg ]) 30408c9fbc29Smrg ]) 30418c9fbc29Smrg ]) 30428c9fbc29Smrg ]) 30438c9fbc29Smrg ;; 30448c9fbc29Smrg esac 30458c9fbc29Smrg 30468c9fbc29Smrg if test "x$lt_cv_dlopen" != xno; then 30478c9fbc29Smrg enable_dlopen=yes 30488c9fbc29Smrg else 30498c9fbc29Smrg enable_dlopen=no 30508c9fbc29Smrg fi 30518c9fbc29Smrg 30528c9fbc29Smrg case $lt_cv_dlopen in 30538c9fbc29Smrg dlopen) 30548c9fbc29Smrg save_CPPFLAGS="$CPPFLAGS" 30558c9fbc29Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 30568c9fbc29Smrg 30578c9fbc29Smrg save_LDFLAGS="$LDFLAGS" 30588c9fbc29Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 30598c9fbc29Smrg 30608c9fbc29Smrg save_LIBS="$LIBS" 30618c9fbc29Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 30628c9fbc29Smrg 30638c9fbc29Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30648c9fbc29Smrg lt_cv_dlopen_self, [dnl 30654cd6a3aeSmrg _LT_TRY_DLOPEN_SELF( 30668c9fbc29Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30678c9fbc29Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30688c9fbc29Smrg ]) 30698c9fbc29Smrg 30708c9fbc29Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30718c9fbc29Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30728c9fbc29Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30734cd6a3aeSmrg lt_cv_dlopen_self_static, [dnl 30744cd6a3aeSmrg _LT_TRY_DLOPEN_SELF( 30758c9fbc29Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30768c9fbc29Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30778c9fbc29Smrg ]) 30788c9fbc29Smrg fi 30798c9fbc29Smrg 30808c9fbc29Smrg CPPFLAGS="$save_CPPFLAGS" 30818c9fbc29Smrg LDFLAGS="$save_LDFLAGS" 30828c9fbc29Smrg LIBS="$save_LIBS" 30838c9fbc29Smrg ;; 30848c9fbc29Smrg esac 30858c9fbc29Smrg 30868c9fbc29Smrg case $lt_cv_dlopen_self in 30878c9fbc29Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30888c9fbc29Smrg *) enable_dlopen_self=unknown ;; 30898c9fbc29Smrg esac 30908c9fbc29Smrg 30918c9fbc29Smrg case $lt_cv_dlopen_self_static in 30928c9fbc29Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30938c9fbc29Smrg *) enable_dlopen_self_static=unknown ;; 30948c9fbc29Smrg esac 30958c9fbc29Smrgfi 30964cd6a3aeSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30974cd6a3aeSmrg [Whether dlopen is supported]) 30984cd6a3aeSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 30994cd6a3aeSmrg [Whether dlopen of programs is supported]) 31004cd6a3aeSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 31014cd6a3aeSmrg [Whether dlopen of statically linked programs is supported]) 31024cd6a3aeSmrg])# LT_SYS_DLOPEN_SELF 31038c9fbc29Smrg 31044cd6a3aeSmrg# Old name: 31054cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 31064cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 31074cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 31088c9fbc29Smrg 31094cd6a3aeSmrg 31104cd6a3aeSmrg# _LT_COMPILER_C_O([TAGNAME]) 31114cd6a3aeSmrg# --------------------------- 31124cd6a3aeSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 31134cd6a3aeSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 31144cd6a3aeSmrgm4_defun([_LT_COMPILER_C_O], 31154cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl 31164cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31174cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl 31188c9fbc29SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 31194cd6a3aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 31204cd6a3aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 31214cd6a3aeSmrg $RM -r conftest 2>/dev/null 31228c9fbc29Smrg mkdir conftest 31238c9fbc29Smrg cd conftest 31248c9fbc29Smrg mkdir out 31254e411241Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 31268c9fbc29Smrg 31278c9fbc29Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 31288c9fbc29Smrg # Insert the option either (1) after the last *FLAGS variable, or 31298c9fbc29Smrg # (2) before a word containing "conftest.", or (3) at the end. 31308c9fbc29Smrg # Note that $ac_compile itself does not contain backslashes and begins 31318c9fbc29Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 31328c9fbc29Smrg lt_compile=`echo "$ac_compile" | $SED \ 31338c9fbc29Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 31348c9fbc29Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 31358c9fbc29Smrg -e 's:$: $lt_compiler_flag:'` 31364cd6a3aeSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 31378c9fbc29Smrg (eval "$lt_compile" 2>out/conftest.err) 31388c9fbc29Smrg ac_status=$? 31398c9fbc29Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31404cd6a3aeSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31418c9fbc29Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31428c9fbc29Smrg then 31438c9fbc29Smrg # The compiler can only warn and ignore the option if not recognized 31448c9fbc29Smrg # So say no if there are warnings 31454cd6a3aeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31468c9fbc29Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31478c9fbc29Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31484cd6a3aeSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 31498c9fbc29Smrg fi 31508c9fbc29Smrg fi 31518c9fbc29Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31524cd6a3aeSmrg $RM conftest* 31538c9fbc29Smrg # SGI C++ compiler will create directory out/ii_files/ for 31548c9fbc29Smrg # template instantiation 31554cd6a3aeSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31564cd6a3aeSmrg $RM out/* && rmdir out 31578c9fbc29Smrg cd .. 31584cd6a3aeSmrg $RM -r conftest 31594cd6a3aeSmrg $RM conftest* 31608c9fbc29Smrg]) 31614cd6a3aeSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31624cd6a3aeSmrg [Does compiler simultaneously support -c and -o options?]) 31634cd6a3aeSmrg])# _LT_COMPILER_C_O 31648c9fbc29Smrg 31658c9fbc29Smrg 31664cd6a3aeSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31674cd6a3aeSmrg# ---------------------------------- 31688c9fbc29Smrg# Check to see if we can do hard links to lock some files if needed 31694cd6a3aeSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31704cd6a3aeSmrg[m4_require([_LT_ENABLE_LOCK])dnl 31714cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31724cd6a3aeSmrg_LT_COMPILER_C_O([$1]) 31738c9fbc29Smrg 31748c9fbc29Smrghard_links="nottested" 31754cd6a3aeSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31768c9fbc29Smrg # do not overwrite the value of need_locks provided by the user 31778c9fbc29Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31788c9fbc29Smrg hard_links=yes 31794cd6a3aeSmrg $RM conftest* 31808c9fbc29Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31818c9fbc29Smrg touch conftest.a 31828c9fbc29Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31838c9fbc29Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31848c9fbc29Smrg AC_MSG_RESULT([$hard_links]) 31858c9fbc29Smrg if test "$hard_links" = no; then 31868c9fbc29Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31878c9fbc29Smrg need_locks=warn 31888c9fbc29Smrg fi 31898c9fbc29Smrgelse 31908c9fbc29Smrg need_locks=no 31918c9fbc29Smrgfi 31924cd6a3aeSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31934cd6a3aeSmrg])# _LT_COMPILER_FILE_LOCKS 31948c9fbc29Smrg 31958c9fbc29Smrg 31964cd6a3aeSmrg# _LT_CHECK_OBJDIR 31974cd6a3aeSmrg# ---------------- 31984cd6a3aeSmrgm4_defun([_LT_CHECK_OBJDIR], 31998c9fbc29Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 32008c9fbc29Smrg[rm -f .libs 2>/dev/null 32018c9fbc29Smrgmkdir .libs 2>/dev/null 32028c9fbc29Smrgif test -d .libs; then 32038c9fbc29Smrg lt_cv_objdir=.libs 32048c9fbc29Smrgelse 32058c9fbc29Smrg # MS-DOS does not allow filenames that begin with a dot. 32068c9fbc29Smrg lt_cv_objdir=_libs 32078c9fbc29Smrgfi 32088c9fbc29Smrgrmdir .libs 2>/dev/null]) 32098c9fbc29Smrgobjdir=$lt_cv_objdir 32104cd6a3aeSmrg_LT_DECL([], [objdir], [0], 32114cd6a3aeSmrg [The name of the directory that contains temporary libtool files])dnl 32124cd6a3aeSmrgm4_pattern_allow([LT_OBJDIR])dnl 32134cd6a3aeSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 32144cd6a3aeSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 32154cd6a3aeSmrg])# _LT_CHECK_OBJDIR 32168c9fbc29Smrg 32178c9fbc29Smrg 32184cd6a3aeSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 32194cd6a3aeSmrg# -------------------------------------- 32208c9fbc29Smrg# Check hardcoding attributes. 32214cd6a3aeSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 32228c9fbc29Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 32234cd6a3aeSmrg_LT_TAGVAR(hardcode_action, $1)= 32244cd6a3aeSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 32254cd6a3aeSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 32264cd6a3aeSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 32278c9fbc29Smrg 32284cd6a3aeSmrg # We can hardcode non-existent directories. 32294cd6a3aeSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 32308c9fbc29Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 32318c9fbc29Smrg # have to relink, otherwise we might link with an installed library 32328c9fbc29Smrg # when we should be linking with a yet-to-be-installed one 32334cd6a3aeSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 32344cd6a3aeSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 32358c9fbc29Smrg # Linking always hardcodes the temporary library directory. 32364cd6a3aeSmrg _LT_TAGVAR(hardcode_action, $1)=relink 32378c9fbc29Smrg else 32388c9fbc29Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32394cd6a3aeSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 32408c9fbc29Smrg fi 32418c9fbc29Smrgelse 32428c9fbc29Smrg # We cannot hardcode anything, or else we can only hardcode existing 32438c9fbc29Smrg # directories. 32444cd6a3aeSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32458c9fbc29Smrgfi 32464cd6a3aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 32478c9fbc29Smrg 32484cd6a3aeSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32494cd6a3aeSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32508c9fbc29Smrg # Fast installation is not supported 32518c9fbc29Smrg enable_fast_install=no 32528c9fbc29Smrgelif test "$shlibpath_overrides_runpath" = yes || 32538c9fbc29Smrg test "$enable_shared" = no; then 32548c9fbc29Smrg # Fast installation is not necessary 32558c9fbc29Smrg enable_fast_install=needless 32568c9fbc29Smrgfi 32574cd6a3aeSmrg_LT_TAGDECL([], [hardcode_action], [0], 32584cd6a3aeSmrg [How to hardcode a shared library path into an executable]) 32594cd6a3aeSmrg])# _LT_LINKER_HARDCODE_LIBPATH 32608c9fbc29Smrg 32618c9fbc29Smrg 32624cd6a3aeSmrg# _LT_CMD_STRIPLIB 32634cd6a3aeSmrg# ---------------- 32644cd6a3aeSmrgm4_defun([_LT_CMD_STRIPLIB], 32654cd6a3aeSmrg[m4_require([_LT_DECL_EGREP]) 32664cd6a3aeSmrgstriplib= 32678c9fbc29Smrgold_striplib= 32688c9fbc29SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32694cd6a3aeSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32708c9fbc29Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32718c9fbc29Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32728c9fbc29Smrg AC_MSG_RESULT([yes]) 32738c9fbc29Smrgelse 32748c9fbc29Smrg# FIXME - insert some real tests, host_os isn't really good enough 32758c9fbc29Smrg case $host_os in 32764cd6a3aeSmrg darwin*) 32774cd6a3aeSmrg if test -n "$STRIP" ; then 32784cd6a3aeSmrg striplib="$STRIP -x" 32794cd6a3aeSmrg old_striplib="$STRIP -S" 32804cd6a3aeSmrg AC_MSG_RESULT([yes]) 32814cd6a3aeSmrg else 32824cd6a3aeSmrg AC_MSG_RESULT([no]) 32834cd6a3aeSmrg fi 32844cd6a3aeSmrg ;; 32854cd6a3aeSmrg *) 32864cd6a3aeSmrg AC_MSG_RESULT([no]) 32878c9fbc29Smrg ;; 32888c9fbc29Smrg esac 32898c9fbc29Smrgfi 32904cd6a3aeSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32914cd6a3aeSmrg_LT_DECL([], [striplib], [1]) 32924cd6a3aeSmrg])# _LT_CMD_STRIPLIB 32938c9fbc29Smrg 32948c9fbc29Smrg 32954cd6a3aeSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32968c9fbc29Smrg# ----------------------------- 32978c9fbc29Smrg# PORTME Fill in your ld.so characteristics 32984cd6a3aeSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 32994cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33004cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl 33014cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 33024cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP])dnl 33034cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 33044cd6a3aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 33054e411241SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 33064cd6a3aeSmrgm4_if([$1], 33074cd6a3aeSmrg [], [ 33088c9fbc29Smrgif test "$GCC" = yes; then 33094e411241Smrg case $host_os in 33104e411241Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 33114e411241Smrg *) lt_awk_arg="/^libraries:/" ;; 33124e411241Smrg esac 33134cd6a3aeSmrg case $host_os in 33144cd6a3aeSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 33154cd6a3aeSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 33164cd6a3aeSmrg esac 33174cd6a3aeSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 33184cd6a3aeSmrg case $lt_search_path_spec in 33194cd6a3aeSmrg *\;*) 33208c9fbc29Smrg # if the path contains ";" then we assume it to be the separator 33218c9fbc29Smrg # otherwise default to the standard path separator (i.e. ":") - it is 33228c9fbc29Smrg # assumed that no part of a normal pathname contains ";" but that should 33238c9fbc29Smrg # okay in the real world where ";" in dirpaths is itself problematic. 33244cd6a3aeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 33254cd6a3aeSmrg ;; 33264cd6a3aeSmrg *) 33274cd6a3aeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 33284cd6a3aeSmrg ;; 33294cd6a3aeSmrg esac 33304e411241Smrg # Ok, now we have the path, separated by spaces, we can step through it 33314e411241Smrg # and add multilib dir if necessary. 33324e411241Smrg lt_tmp_lt_search_path_spec= 33334e411241Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 33344e411241Smrg for lt_sys_path in $lt_search_path_spec; do 33354e411241Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 33364e411241Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33374e411241Smrg else 33384e411241Smrg test -d "$lt_sys_path" && \ 33394e411241Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33404e411241Smrg fi 33414e411241Smrg done 33424cd6a3aeSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33434e411241SmrgBEGIN {RS=" "; FS="/|\n";} { 33444e411241Smrg lt_foo=""; 33454e411241Smrg lt_count=0; 33464e411241Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33474e411241Smrg if ($lt_i != "" && $lt_i != ".") { 33484e411241Smrg if ($lt_i == "..") { 33494e411241Smrg lt_count++; 33504e411241Smrg } else { 33514e411241Smrg if (lt_count == 0) { 33524e411241Smrg lt_foo="/" $lt_i lt_foo; 33534e411241Smrg } else { 33544e411241Smrg lt_count--; 33554e411241Smrg } 33564e411241Smrg } 33574e411241Smrg } 33584e411241Smrg } 33594e411241Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33604e411241Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33614e411241Smrg}'` 33624cd6a3aeSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 33634cd6a3aeSmrg # for these hosts. 33644cd6a3aeSmrg case $host_os in 33654cd6a3aeSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33664cd6a3aeSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 33674cd6a3aeSmrg esac 33684cd6a3aeSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 33698c9fbc29Smrgelse 33708c9fbc29Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33714e411241Smrgfi]) 33724cd6a3aeSmrglibrary_names_spec= 33734cd6a3aeSmrglibname_spec='lib$name' 33744cd6a3aeSmrgsoname_spec= 33754cd6a3aeSmrgshrext_cmds=".so" 33764cd6a3aeSmrgpostinstall_cmds= 33774cd6a3aeSmrgpostuninstall_cmds= 33784cd6a3aeSmrgfinish_cmds= 33794cd6a3aeSmrgfinish_eval= 33804cd6a3aeSmrgshlibpath_var= 33814cd6a3aeSmrgshlibpath_overrides_runpath=unknown 33824cd6a3aeSmrgversion_type=none 33834cd6a3aeSmrgdynamic_linker="$host_os ld.so" 33844cd6a3aeSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33858c9fbc29Smrgneed_lib_prefix=unknown 33868c9fbc29Smrghardcode_into_libs=no 33878c9fbc29Smrg 33888c9fbc29Smrg# when you set need_version to no, make sure it does not cause -set_version 33898c9fbc29Smrg# flags to be left without arguments 33908c9fbc29Smrgneed_version=unknown 33918c9fbc29Smrg 33928c9fbc29Smrgcase $host_os in 33938c9fbc29Smrgaix3*) 339470728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 33958c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33968c9fbc29Smrg shlibpath_var=LIBPATH 33978c9fbc29Smrg 33988c9fbc29Smrg # AIX 3 has no versioning support, so we append a major version to the name. 33998c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 34008c9fbc29Smrg ;; 34018c9fbc29Smrg 34024e411241Smrgaix[[4-9]]*) 340370728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 34048c9fbc29Smrg need_lib_prefix=no 34058c9fbc29Smrg need_version=no 34068c9fbc29Smrg hardcode_into_libs=yes 34078c9fbc29Smrg if test "$host_cpu" = ia64; then 34088c9fbc29Smrg # AIX 5 supports IA64 34098c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 34108c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 34118c9fbc29Smrg else 34128c9fbc29Smrg # With GCC up to 2.95.x, collect2 would create an import file 34138c9fbc29Smrg # for dependence libraries. The import file would start with 34148c9fbc29Smrg # the line `#! .'. This would cause the generated library to 34158c9fbc29Smrg # depend on `.', always an invalid library. This was fixed in 34168c9fbc29Smrg # development snapshots of GCC prior to 3.0. 34178c9fbc29Smrg case $host_os in 34188c9fbc29Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 34198c9fbc29Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 34208c9fbc29Smrg echo ' yes ' 34214cd6a3aeSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 34228c9fbc29Smrg : 34238c9fbc29Smrg else 34248c9fbc29Smrg can_build_shared=no 34258c9fbc29Smrg fi 34268c9fbc29Smrg ;; 34278c9fbc29Smrg esac 34288c9fbc29Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 34298c9fbc29Smrg # soname into executable. Probably we can add versioning support to 34308c9fbc29Smrg # collect2, so additional links can be useful in future. 34318c9fbc29Smrg if test "$aix_use_runtimelinking" = yes; then 34328c9fbc29Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 34338c9fbc29Smrg # instead of lib<name>.a to let people know that these are not 34348c9fbc29Smrg # typical AIX shared libraries. 34358c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34368c9fbc29Smrg else 34378c9fbc29Smrg # We preserve .a as extension for shared libraries through AIX4.2 34388c9fbc29Smrg # and later when we are not doing run time linking. 34398c9fbc29Smrg library_names_spec='${libname}${release}.a $libname.a' 34408c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 34418c9fbc29Smrg fi 34428c9fbc29Smrg shlibpath_var=LIBPATH 34438c9fbc29Smrg fi 34448c9fbc29Smrg ;; 34458c9fbc29Smrg 34468c9fbc29Smrgamigaos*) 34474cd6a3aeSmrg case $host_cpu in 34484cd6a3aeSmrg powerpc) 34494cd6a3aeSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34504cd6a3aeSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34514cd6a3aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34524cd6a3aeSmrg ;; 34534cd6a3aeSmrg m68k) 34544cd6a3aeSmrg library_names_spec='$libname.ixlibrary $libname.a' 34554cd6a3aeSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34564cd6a3aeSmrg 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' 34574cd6a3aeSmrg ;; 34584cd6a3aeSmrg esac 34598c9fbc29Smrg ;; 34608c9fbc29Smrg 34618c9fbc29Smrgbeos*) 34628c9fbc29Smrg library_names_spec='${libname}${shared_ext}' 34638c9fbc29Smrg dynamic_linker="$host_os ld.so" 34648c9fbc29Smrg shlibpath_var=LIBRARY_PATH 34658c9fbc29Smrg ;; 34668c9fbc29Smrg 34678c9fbc29Smrgbsdi[[45]]*) 346870728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 34698c9fbc29Smrg need_version=no 34708c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34718c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 34728c9fbc29Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34738c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 34748c9fbc29Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34758c9fbc29Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34768c9fbc29Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34778c9fbc29Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34788c9fbc29Smrg # libtool to hard-code these into programs 34798c9fbc29Smrg ;; 34808c9fbc29Smrg 34814cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*) 34828c9fbc29Smrg version_type=windows 34838c9fbc29Smrg shrext_cmds=".dll" 34848c9fbc29Smrg need_version=no 34858c9fbc29Smrg need_lib_prefix=no 34868c9fbc29Smrg 34874cd6a3aeSmrg case $GCC,$cc_basename in 34884cd6a3aeSmrg yes,*) 34894cd6a3aeSmrg # gcc 34908c9fbc29Smrg library_names_spec='$libname.dll.a' 34918c9fbc29Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34928c9fbc29Smrg postinstall_cmds='base_file=`basename \${file}`~ 34934cd6a3aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34948c9fbc29Smrg dldir=$destdir/`dirname \$dlpath`~ 34958c9fbc29Smrg test -d \$dldir || mkdir -p \$dldir~ 34968c9fbc29Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34974cd6a3aeSmrg chmod a+x \$dldir/$dlname~ 34984cd6a3aeSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 34994cd6a3aeSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 35004cd6a3aeSmrg fi' 35018c9fbc29Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35028c9fbc29Smrg dlpath=$dir/\$dldll~ 35034cd6a3aeSmrg $RM \$dlpath' 35048c9fbc29Smrg shlibpath_overrides_runpath=yes 35058c9fbc29Smrg 35068c9fbc29Smrg case $host_os in 35078c9fbc29Smrg cygwin*) 35088c9fbc29Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 35098c9fbc29Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35104cd6a3aeSmrgm4_if([$1], [],[ 35114cd6a3aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 35128c9fbc29Smrg ;; 35134cd6a3aeSmrg mingw* | cegcc*) 35148c9fbc29Smrg # MinGW DLLs use traditional 'lib' prefix 35158c9fbc29Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35168c9fbc29Smrg ;; 35178c9fbc29Smrg pw32*) 35188c9fbc29Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 35198c9fbc29Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35208c9fbc29Smrg ;; 35218c9fbc29Smrg esac 35224cd6a3aeSmrg dynamic_linker='Win32 ld.exe' 35234cd6a3aeSmrg ;; 35244cd6a3aeSmrg 35254cd6a3aeSmrg *,cl*) 35264cd6a3aeSmrg # Native MSVC 35274cd6a3aeSmrg libname_spec='$name' 35284cd6a3aeSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35294cd6a3aeSmrg library_names_spec='${libname}.dll.lib' 35304cd6a3aeSmrg 35314cd6a3aeSmrg case $build_os in 35324cd6a3aeSmrg mingw*) 35334cd6a3aeSmrg sys_lib_search_path_spec= 35344cd6a3aeSmrg lt_save_ifs=$IFS 35354cd6a3aeSmrg IFS=';' 35364cd6a3aeSmrg for lt_path in $LIB 35374cd6a3aeSmrg do 35384cd6a3aeSmrg IFS=$lt_save_ifs 35394cd6a3aeSmrg # Let DOS variable expansion print the short 8.3 style file name. 35404cd6a3aeSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35414cd6a3aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 35424cd6a3aeSmrg done 35434cd6a3aeSmrg IFS=$lt_save_ifs 35444cd6a3aeSmrg # Convert to MSYS style. 35454cd6a3aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35464cd6a3aeSmrg ;; 35474cd6a3aeSmrg cygwin*) 35484cd6a3aeSmrg # Convert to unix form, then to dos form, then back to unix form 35494cd6a3aeSmrg # but this time dos style (no spaces!) so that the unix form looks 35504cd6a3aeSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 35514cd6a3aeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35524cd6a3aeSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35534cd6a3aeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35544cd6a3aeSmrg ;; 35554cd6a3aeSmrg *) 35564cd6a3aeSmrg sys_lib_search_path_spec="$LIB" 35574cd6a3aeSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35584cd6a3aeSmrg # It is most probably a Windows format PATH. 35594cd6a3aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35604cd6a3aeSmrg else 35614cd6a3aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35624cd6a3aeSmrg fi 35634cd6a3aeSmrg # FIXME: find the short name or the path components, as spaces are 35644cd6a3aeSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 35654cd6a3aeSmrg ;; 35664cd6a3aeSmrg esac 35674cd6a3aeSmrg 35684cd6a3aeSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35694cd6a3aeSmrg postinstall_cmds='base_file=`basename \${file}`~ 35704cd6a3aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35714cd6a3aeSmrg dldir=$destdir/`dirname \$dlpath`~ 35724cd6a3aeSmrg test -d \$dldir || mkdir -p \$dldir~ 35734cd6a3aeSmrg $install_prog $dir/$dlname \$dldir/$dlname' 35744cd6a3aeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35754cd6a3aeSmrg dlpath=$dir/\$dldll~ 35764cd6a3aeSmrg $RM \$dlpath' 35774cd6a3aeSmrg shlibpath_overrides_runpath=yes 35784cd6a3aeSmrg dynamic_linker='Win32 link.exe' 35798c9fbc29Smrg ;; 35808c9fbc29Smrg 35818c9fbc29Smrg *) 35824cd6a3aeSmrg # Assume MSVC wrapper 35838c9fbc29Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35844cd6a3aeSmrg dynamic_linker='Win32 ld.exe' 35858c9fbc29Smrg ;; 35868c9fbc29Smrg esac 35878c9fbc29Smrg # FIXME: first we should search . and the directory the executable is in 35888c9fbc29Smrg shlibpath_var=PATH 35898c9fbc29Smrg ;; 35908c9fbc29Smrg 35918c9fbc29Smrgdarwin* | rhapsody*) 35928c9fbc29Smrg dynamic_linker="$host_os dyld" 35938c9fbc29Smrg version_type=darwin 35948c9fbc29Smrg need_lib_prefix=no 35958c9fbc29Smrg need_version=no 35964cd6a3aeSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35978c9fbc29Smrg soname_spec='${libname}${release}${major}$shared_ext' 35988c9fbc29Smrg shlibpath_overrides_runpath=yes 35998c9fbc29Smrg shlibpath_var=DYLD_LIBRARY_PATH 36008c9fbc29Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 36014cd6a3aeSmrgm4_if([$1], [],[ 36024cd6a3aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 36038c9fbc29Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 36048c9fbc29Smrg ;; 36058c9fbc29Smrg 36068c9fbc29Smrgdgux*) 360770728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 36088c9fbc29Smrg need_lib_prefix=no 36098c9fbc29Smrg need_version=no 36108c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 36118c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 36128c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 36138c9fbc29Smrg ;; 36148c9fbc29Smrg 36158c9fbc29Smrgfreebsd* | dragonfly*) 36168c9fbc29Smrg # DragonFly does not have aout. When/if they implement a new 36178c9fbc29Smrg # versioning mechanism, adjust this. 36188c9fbc29Smrg if test -x /usr/bin/objformat; then 36198c9fbc29Smrg objformat=`/usr/bin/objformat` 36208c9fbc29Smrg else 36218c9fbc29Smrg case $host_os in 362270728a38Smrg freebsd[[23]].*) objformat=aout ;; 36238c9fbc29Smrg *) objformat=elf ;; 36248c9fbc29Smrg esac 36258c9fbc29Smrg fi 36268c9fbc29Smrg version_type=freebsd-$objformat 36278c9fbc29Smrg case $version_type in 36288c9fbc29Smrg freebsd-elf*) 36298c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36308c9fbc29Smrg need_version=no 36318c9fbc29Smrg need_lib_prefix=no 36328c9fbc29Smrg ;; 36338c9fbc29Smrg freebsd-*) 36348c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36358c9fbc29Smrg need_version=yes 36368c9fbc29Smrg ;; 36378c9fbc29Smrg esac 36388c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 36398c9fbc29Smrg case $host_os in 364070728a38Smrg freebsd2.*) 36418c9fbc29Smrg shlibpath_overrides_runpath=yes 36428c9fbc29Smrg ;; 36438c9fbc29Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36448c9fbc29Smrg shlibpath_overrides_runpath=yes 36458c9fbc29Smrg hardcode_into_libs=yes 36468c9fbc29Smrg ;; 36478c9fbc29Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36488c9fbc29Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36498c9fbc29Smrg shlibpath_overrides_runpath=no 36508c9fbc29Smrg hardcode_into_libs=yes 36518c9fbc29Smrg ;; 36524e411241Smrg *) # from 4.6 on, and DragonFly 36538c9fbc29Smrg shlibpath_overrides_runpath=yes 36548c9fbc29Smrg hardcode_into_libs=yes 36558c9fbc29Smrg ;; 36568c9fbc29Smrg esac 36578c9fbc29Smrg ;; 36588c9fbc29Smrg 36598c9fbc29Smrggnu*) 366070728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 36618c9fbc29Smrg need_lib_prefix=no 36628c9fbc29Smrg need_version=no 36638c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36648c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 36658c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 366670728a38Smrg shlibpath_overrides_runpath=no 36678c9fbc29Smrg hardcode_into_libs=yes 36688c9fbc29Smrg ;; 36698c9fbc29Smrg 36704cd6a3aeSmrghaiku*) 367170728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 36724cd6a3aeSmrg need_lib_prefix=no 36734cd6a3aeSmrg need_version=no 36744cd6a3aeSmrg dynamic_linker="$host_os runtime_loader" 36754cd6a3aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36764cd6a3aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 36774cd6a3aeSmrg shlibpath_var=LIBRARY_PATH 36784cd6a3aeSmrg shlibpath_overrides_runpath=yes 36794cd6a3aeSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36804cd6a3aeSmrg hardcode_into_libs=yes 36814cd6a3aeSmrg ;; 36824cd6a3aeSmrg 36838c9fbc29Smrghpux9* | hpux10* | hpux11*) 36848c9fbc29Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36858c9fbc29Smrg # link against other versions. 36868c9fbc29Smrg version_type=sunos 36878c9fbc29Smrg need_lib_prefix=no 36888c9fbc29Smrg need_version=no 36898c9fbc29Smrg case $host_cpu in 36908c9fbc29Smrg ia64*) 36918c9fbc29Smrg shrext_cmds='.so' 36928c9fbc29Smrg hardcode_into_libs=yes 36938c9fbc29Smrg dynamic_linker="$host_os dld.so" 36948c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 36958c9fbc29Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36968c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36978c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 36988c9fbc29Smrg if test "X$HPUX_IA64_MODE" = X32; then 36998c9fbc29Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 37008c9fbc29Smrg else 37018c9fbc29Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 37028c9fbc29Smrg fi 37038c9fbc29Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37048c9fbc29Smrg ;; 37054cd6a3aeSmrg hppa*64*) 37064cd6a3aeSmrg shrext_cmds='.sl' 37074cd6a3aeSmrg hardcode_into_libs=yes 37084cd6a3aeSmrg dynamic_linker="$host_os dld.sl" 37094cd6a3aeSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 37104cd6a3aeSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 37114cd6a3aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37124cd6a3aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 37134cd6a3aeSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 37144cd6a3aeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37154cd6a3aeSmrg ;; 37164cd6a3aeSmrg *) 37178c9fbc29Smrg shrext_cmds='.sl' 37188c9fbc29Smrg dynamic_linker="$host_os dld.sl" 37198c9fbc29Smrg shlibpath_var=SHLIB_PATH 37208c9fbc29Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 37218c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37228c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 37238c9fbc29Smrg ;; 37248c9fbc29Smrg esac 37254cd6a3aeSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 37268c9fbc29Smrg postinstall_cmds='chmod 555 $lib' 37274cd6a3aeSmrg # or fails outright, so override atomically: 37284cd6a3aeSmrg install_override_mode=555 37298c9fbc29Smrg ;; 37308c9fbc29Smrg 37314e411241Smrginterix[[3-9]]*) 373270728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 37338c9fbc29Smrg need_lib_prefix=no 37348c9fbc29Smrg need_version=no 37358c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37368c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 37378c9fbc29Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37388c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 37398c9fbc29Smrg shlibpath_overrides_runpath=no 37408c9fbc29Smrg hardcode_into_libs=yes 37418c9fbc29Smrg ;; 37428c9fbc29Smrg 37438c9fbc29Smrgirix5* | irix6* | nonstopux*) 37448c9fbc29Smrg case $host_os in 37458c9fbc29Smrg nonstopux*) version_type=nonstopux ;; 37468c9fbc29Smrg *) 37478c9fbc29Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 374870728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 37498c9fbc29Smrg else 37508c9fbc29Smrg version_type=irix 37518c9fbc29Smrg fi ;; 37528c9fbc29Smrg esac 37538c9fbc29Smrg need_lib_prefix=no 37548c9fbc29Smrg need_version=no 37558c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 37568c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37578c9fbc29Smrg case $host_os in 37588c9fbc29Smrg irix5* | nonstopux*) 37598c9fbc29Smrg libsuff= shlibsuff= 37608c9fbc29Smrg ;; 37618c9fbc29Smrg *) 37628c9fbc29Smrg case $LD in # libtool.m4 will add one of these switches to LD 37638c9fbc29Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37648c9fbc29Smrg libsuff= shlibsuff= libmagic=32-bit;; 37658c9fbc29Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37668c9fbc29Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37678c9fbc29Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37688c9fbc29Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37698c9fbc29Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37708c9fbc29Smrg esac 37718c9fbc29Smrg ;; 37728c9fbc29Smrg esac 37738c9fbc29Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37748c9fbc29Smrg shlibpath_overrides_runpath=no 37758c9fbc29Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37768c9fbc29Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37778c9fbc29Smrg hardcode_into_libs=yes 37788c9fbc29Smrg ;; 37798c9fbc29Smrg 37808c9fbc29Smrg# No shared lib support for Linux oldld, aout, or coff. 37818c9fbc29Smrglinux*oldld* | linux*aout* | linux*coff*) 37828c9fbc29Smrg dynamic_linker=no 37838c9fbc29Smrg ;; 37848c9fbc29Smrg 378570728a38Smrg# This must be glibc/ELF. 37864cd6a3aeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 378770728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 37888c9fbc29Smrg need_lib_prefix=no 37898c9fbc29Smrg need_version=no 37908c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37918c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 37928c9fbc29Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37938c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 37948c9fbc29Smrg shlibpath_overrides_runpath=no 37954cd6a3aeSmrg 37964cd6a3aeSmrg # Some binutils ld are patched to set DT_RUNPATH 37974cd6a3aeSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37984cd6a3aeSmrg [lt_cv_shlibpath_overrides_runpath=no 37994cd6a3aeSmrg save_LDFLAGS=$LDFLAGS 38004cd6a3aeSmrg save_libdir=$libdir 38014cd6a3aeSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 38024cd6a3aeSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 38034cd6a3aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 38044cd6a3aeSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 38054cd6a3aeSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 38064cd6a3aeSmrg LDFLAGS=$save_LDFLAGS 38074cd6a3aeSmrg libdir=$save_libdir 38084cd6a3aeSmrg ]) 38094cd6a3aeSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 38104cd6a3aeSmrg 38118c9fbc29Smrg # This implies no fast_install, which is unacceptable. 38128c9fbc29Smrg # Some rework will be needed to allow for fast_install 38138c9fbc29Smrg # before this can be enabled. 38148c9fbc29Smrg hardcode_into_libs=yes 38158c9fbc29Smrg 38168c9fbc29Smrg # Append ld.so.conf contents to the search path 38178c9fbc29Smrg if test -f /etc/ld.so.conf; then 38184cd6a3aeSmrg 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' ' '` 38198c9fbc29Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 38208c9fbc29Smrg fi 38218c9fbc29Smrg 38228c9fbc29Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 38238c9fbc29Smrg # powerpc, because MkLinux only supported shared libraries with the 38248c9fbc29Smrg # GNU dynamic linker. Since this was broken with cross compilers, 38258c9fbc29Smrg # most powerpc-linux boxes support dynamic linking these days and 38268c9fbc29Smrg # people can always --disable-shared, the test was removed, and we 38278c9fbc29Smrg # assume the GNU/Linux dynamic linker is in use. 38288c9fbc29Smrg dynamic_linker='GNU/Linux ld.so' 38298c9fbc29Smrg ;; 38308c9fbc29Smrg 38318c9fbc29Smrgnetbsd*) 38328c9fbc29Smrg version_type=sunos 38338c9fbc29Smrg need_lib_prefix=no 38348c9fbc29Smrg need_version=no 38354cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38368c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38378c9fbc29Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38388c9fbc29Smrg dynamic_linker='NetBSD (a.out) ld.so' 38398c9fbc29Smrg else 38408c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38418c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 38428c9fbc29Smrg dynamic_linker='NetBSD ld.elf_so' 38438c9fbc29Smrg fi 38448c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 38458c9fbc29Smrg shlibpath_overrides_runpath=yes 38468c9fbc29Smrg hardcode_into_libs=yes 38478c9fbc29Smrg ;; 38488c9fbc29Smrg 38498c9fbc29Smrgnewsos6) 385070728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 38518c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38528c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 38538c9fbc29Smrg shlibpath_overrides_runpath=yes 38548c9fbc29Smrg ;; 38558c9fbc29Smrg 38564cd6a3aeSmrg*nto* | *qnx*) 38574cd6a3aeSmrg version_type=qnx 38588c9fbc29Smrg need_lib_prefix=no 38598c9fbc29Smrg need_version=no 38608c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38618c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 38628c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 38634cd6a3aeSmrg shlibpath_overrides_runpath=no 38644cd6a3aeSmrg hardcode_into_libs=yes 38654cd6a3aeSmrg dynamic_linker='ldqnx.so' 38668c9fbc29Smrg ;; 38678c9fbc29Smrg 38688c9fbc29Smrgopenbsd*) 38698c9fbc29Smrg version_type=sunos 38708c9fbc29Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38718c9fbc29Smrg need_lib_prefix=no 38728c9fbc29Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38738c9fbc29Smrg case $host_os in 38744cd6a3aeSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38754cd6a3aeSmrg *) need_version=no ;; 38768c9fbc29Smrg esac 38778c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38788c9fbc29Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38798c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 38804cd6a3aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38818c9fbc29Smrg case $host_os in 38828c9fbc29Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38838c9fbc29Smrg shlibpath_overrides_runpath=no 38848c9fbc29Smrg ;; 38858c9fbc29Smrg *) 38868c9fbc29Smrg shlibpath_overrides_runpath=yes 38878c9fbc29Smrg ;; 38888c9fbc29Smrg esac 38898c9fbc29Smrg else 38908c9fbc29Smrg shlibpath_overrides_runpath=yes 38918c9fbc29Smrg fi 38928c9fbc29Smrg ;; 38938c9fbc29Smrg 38948c9fbc29Smrgos2*) 38958c9fbc29Smrg libname_spec='$name' 38968c9fbc29Smrg shrext_cmds=".dll" 38978c9fbc29Smrg need_lib_prefix=no 38988c9fbc29Smrg library_names_spec='$libname${shared_ext} $libname.a' 38998c9fbc29Smrg dynamic_linker='OS/2 ld.exe' 39008c9fbc29Smrg shlibpath_var=LIBPATH 39018c9fbc29Smrg ;; 39028c9fbc29Smrg 39038c9fbc29Smrgosf3* | osf4* | osf5*) 39048c9fbc29Smrg version_type=osf 39058c9fbc29Smrg need_lib_prefix=no 39068c9fbc29Smrg need_version=no 39078c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 39088c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39098c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39108c9fbc29Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 39118c9fbc29Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 39128c9fbc29Smrg ;; 39138c9fbc29Smrg 39144e411241Smrgrdos*) 39154e411241Smrg dynamic_linker=no 39164e411241Smrg ;; 39174e411241Smrg 39188c9fbc29Smrgsolaris*) 391970728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 39208c9fbc29Smrg need_lib_prefix=no 39218c9fbc29Smrg need_version=no 39228c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39238c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 39248c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39258c9fbc29Smrg shlibpath_overrides_runpath=yes 39268c9fbc29Smrg hardcode_into_libs=yes 39278c9fbc29Smrg # ldd complains unless libraries are executable 39288c9fbc29Smrg postinstall_cmds='chmod +x $lib' 39298c9fbc29Smrg ;; 39308c9fbc29Smrg 39318c9fbc29Smrgsunos4*) 39328c9fbc29Smrg version_type=sunos 39338c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 39348c9fbc29Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39358c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39368c9fbc29Smrg shlibpath_overrides_runpath=yes 39378c9fbc29Smrg if test "$with_gnu_ld" = yes; then 39388c9fbc29Smrg need_lib_prefix=no 39398c9fbc29Smrg fi 39408c9fbc29Smrg need_version=yes 39418c9fbc29Smrg ;; 39428c9fbc29Smrg 39438c9fbc29Smrgsysv4 | sysv4.3*) 394470728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 39458c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39468c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 39478c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39488c9fbc29Smrg case $host_vendor in 39498c9fbc29Smrg sni) 39508c9fbc29Smrg shlibpath_overrides_runpath=no 39518c9fbc29Smrg need_lib_prefix=no 39528c9fbc29Smrg runpath_var=LD_RUN_PATH 39538c9fbc29Smrg ;; 39548c9fbc29Smrg siemens) 39558c9fbc29Smrg need_lib_prefix=no 39568c9fbc29Smrg ;; 39578c9fbc29Smrg motorola) 39588c9fbc29Smrg need_lib_prefix=no 39598c9fbc29Smrg need_version=no 39608c9fbc29Smrg shlibpath_overrides_runpath=no 39618c9fbc29Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 39628c9fbc29Smrg ;; 39638c9fbc29Smrg esac 39648c9fbc29Smrg ;; 39658c9fbc29Smrg 39668c9fbc29Smrgsysv4*MP*) 39678c9fbc29Smrg if test -d /usr/nec ;then 396870728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 39698c9fbc29Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39708c9fbc29Smrg soname_spec='$libname${shared_ext}.$major' 39718c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39728c9fbc29Smrg fi 39738c9fbc29Smrg ;; 39748c9fbc29Smrg 39758c9fbc29Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39768c9fbc29Smrg version_type=freebsd-elf 39778c9fbc29Smrg need_lib_prefix=no 39788c9fbc29Smrg need_version=no 39798c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39808c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 39818c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 39824cd6a3aeSmrg shlibpath_overrides_runpath=yes 39838c9fbc29Smrg hardcode_into_libs=yes 39848c9fbc29Smrg if test "$with_gnu_ld" = yes; then 39858c9fbc29Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 39868c9fbc29Smrg else 39878c9fbc29Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 39888c9fbc29Smrg case $host_os in 39898c9fbc29Smrg sco3.2v5*) 39908c9fbc29Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39918c9fbc29Smrg ;; 39928c9fbc29Smrg esac 39938c9fbc29Smrg fi 39948c9fbc29Smrg sys_lib_dlsearch_path_spec='/usr/lib' 39958c9fbc29Smrg ;; 39968c9fbc29Smrg 39974cd6a3aeSmrgtpf*) 39984cd6a3aeSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 399970728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 40004cd6a3aeSmrg need_lib_prefix=no 40014cd6a3aeSmrg need_version=no 40024cd6a3aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40034cd6a3aeSmrg shlibpath_var=LD_LIBRARY_PATH 40044cd6a3aeSmrg shlibpath_overrides_runpath=no 40054cd6a3aeSmrg hardcode_into_libs=yes 40064cd6a3aeSmrg ;; 40074cd6a3aeSmrg 40088c9fbc29Smrguts4*) 400970728a38Smrg version_type=linux # correct to gnu/linux during the next big refactor 40108c9fbc29Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40118c9fbc29Smrg soname_spec='${libname}${release}${shared_ext}$major' 40128c9fbc29Smrg shlibpath_var=LD_LIBRARY_PATH 40138c9fbc29Smrg ;; 40148c9fbc29Smrg 40158c9fbc29Smrg*) 40168c9fbc29Smrg dynamic_linker=no 40178c9fbc29Smrg ;; 40188c9fbc29Smrgesac 40198c9fbc29SmrgAC_MSG_RESULT([$dynamic_linker]) 40208c9fbc29Smrgtest "$dynamic_linker" = no && can_build_shared=no 40218c9fbc29Smrg 40228c9fbc29Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 40238c9fbc29Smrgif test "$GCC" = yes; then 40248c9fbc29Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 40258c9fbc29Smrgfi 40268c9fbc29Smrg 40274cd6a3aeSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 40284cd6a3aeSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 40294cd6a3aeSmrgfi 40304cd6a3aeSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 40314cd6a3aeSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 40324cd6a3aeSmrgfi 40338c9fbc29Smrg 40344cd6a3aeSmrg_LT_DECL([], [variables_saved_for_relink], [1], 40354cd6a3aeSmrg [Variables whose values should be saved in libtool wrapper scripts and 40364cd6a3aeSmrg restored at link time]) 40374cd6a3aeSmrg_LT_DECL([], [need_lib_prefix], [0], 40384cd6a3aeSmrg [Do we need the "lib" prefix for modules?]) 40394cd6a3aeSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40404cd6a3aeSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40414cd6a3aeSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40424cd6a3aeSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40434cd6a3aeSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40444cd6a3aeSmrg [Is shlibpath searched before the hard-coded library search path?]) 40454cd6a3aeSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40464cd6a3aeSmrg_LT_DECL([], [library_names_spec], [1], 40474cd6a3aeSmrg [[List of archive names. First name is the real one, the rest are links. 40484cd6a3aeSmrg The last name is the one that the linker finds with -lNAME]]) 40494cd6a3aeSmrg_LT_DECL([], [soname_spec], [1], 40504cd6a3aeSmrg [[The coded name of the library, if different from the real name]]) 40514cd6a3aeSmrg_LT_DECL([], [install_override_mode], [1], 40524cd6a3aeSmrg [Permission mode override for installation of shared libraries]) 40534cd6a3aeSmrg_LT_DECL([], [postinstall_cmds], [2], 40544cd6a3aeSmrg [Command to use after installation of a shared archive]) 40554cd6a3aeSmrg_LT_DECL([], [postuninstall_cmds], [2], 40564cd6a3aeSmrg [Command to use after uninstallation of a shared archive]) 40574cd6a3aeSmrg_LT_DECL([], [finish_cmds], [2], 40584cd6a3aeSmrg [Commands used to finish a libtool library installation in a directory]) 40594cd6a3aeSmrg_LT_DECL([], [finish_eval], [1], 40604cd6a3aeSmrg [[As "finish_cmds", except a single script fragment to be evaled but 40614cd6a3aeSmrg not shown]]) 40624cd6a3aeSmrg_LT_DECL([], [hardcode_into_libs], [0], 40634cd6a3aeSmrg [Whether we should hardcode library paths into libraries]) 40644cd6a3aeSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40654cd6a3aeSmrg [Compile-time system search path for libraries]) 40664cd6a3aeSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40674cd6a3aeSmrg [Run-time system search path for libraries]) 40684cd6a3aeSmrg])# _LT_SYS_DYNAMIC_LINKER 40694cd6a3aeSmrg 40704cd6a3aeSmrg 40714cd6a3aeSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 40724cd6a3aeSmrg# -------------------------- 40734cd6a3aeSmrg# find a file program which can recognize shared library 40744cd6a3aeSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40754cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])dnl 40764cd6a3aeSmrgAC_MSG_CHECKING([for $1]) 40774cd6a3aeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40784cd6a3aeSmrg[case $MAGIC_CMD in 40794cd6a3aeSmrg[[\\/*] | ?:[\\/]*]) 40804cd6a3aeSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40814cd6a3aeSmrg ;; 40824cd6a3aeSmrg*) 40834cd6a3aeSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40844cd6a3aeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40854cd6a3aeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40864cd6a3aeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40874cd6a3aeSmrgdnl not every word. This closes a longstanding sh security hole. 40884cd6a3aeSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40894cd6a3aeSmrg for ac_dir in $ac_dummy; do 40908c9fbc29Smrg IFS="$lt_save_ifs" 40914cd6a3aeSmrg test -z "$ac_dir" && ac_dir=. 40924cd6a3aeSmrg if test -f $ac_dir/$1; then 40934cd6a3aeSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40944cd6a3aeSmrg if test -n "$file_magic_test_file"; then 40954cd6a3aeSmrg case $deplibs_check_method in 40964cd6a3aeSmrg "file_magic "*) 40974cd6a3aeSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40984cd6a3aeSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40994cd6a3aeSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 41004cd6a3aeSmrg $EGREP "$file_magic_regex" > /dev/null; then 41014cd6a3aeSmrg : 41024cd6a3aeSmrg else 41034cd6a3aeSmrg cat <<_LT_EOF 1>&2 41048c9fbc29Smrg 41058c9fbc29Smrg*** Warning: the command libtool uses to detect shared libraries, 41068c9fbc29Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41078c9fbc29Smrg*** The result is that libtool may fail to recognize shared libraries 41088c9fbc29Smrg*** as such. This will affect the creation of libtool libraries that 41098c9fbc29Smrg*** depend on shared libraries, but programs linked with such libtool 41108c9fbc29Smrg*** libraries will work regardless of this problem. Nevertheless, you 41118c9fbc29Smrg*** may want to report the problem to your system manager and/or to 41128c9fbc29Smrg*** bug-libtool@gnu.org 41138c9fbc29Smrg 41144cd6a3aeSmrg_LT_EOF 41158c9fbc29Smrg fi ;; 41168c9fbc29Smrg esac 41178c9fbc29Smrg fi 41188c9fbc29Smrg break 41198c9fbc29Smrg fi 41208c9fbc29Smrg done 41218c9fbc29Smrg IFS="$lt_save_ifs" 41228c9fbc29Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 41238c9fbc29Smrg ;; 41248c9fbc29Smrgesac]) 41258c9fbc29SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41268c9fbc29Smrgif test -n "$MAGIC_CMD"; then 41278c9fbc29Smrg AC_MSG_RESULT($MAGIC_CMD) 41288c9fbc29Smrgelse 41298c9fbc29Smrg AC_MSG_RESULT(no) 41308c9fbc29Smrgfi 41314cd6a3aeSmrg_LT_DECL([], [MAGIC_CMD], [0], 41324cd6a3aeSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 41334cd6a3aeSmrg])# _LT_PATH_TOOL_PREFIX 41348c9fbc29Smrg 41354cd6a3aeSmrg# Old name: 41364cd6a3aeSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41374cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 41384cd6a3aeSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41398c9fbc29Smrg 41404cd6a3aeSmrg 41414cd6a3aeSmrg# _LT_PATH_MAGIC 41424cd6a3aeSmrg# -------------- 41434e411241Smrg# find a file program which can recognize a shared library 41444cd6a3aeSmrgm4_defun([_LT_PATH_MAGIC], 41454cd6a3aeSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41468c9fbc29Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41478c9fbc29Smrg if test -n "$ac_tool_prefix"; then 41484cd6a3aeSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 41498c9fbc29Smrg else 41508c9fbc29Smrg MAGIC_CMD=: 41518c9fbc29Smrg fi 41528c9fbc29Smrgfi 41534cd6a3aeSmrg])# _LT_PATH_MAGIC 41548c9fbc29Smrg 41558c9fbc29Smrg 41564cd6a3aeSmrg# LT_PATH_LD 41578c9fbc29Smrg# ---------- 41588c9fbc29Smrg# find the pathname to the GNU or non-GNU linker 41594cd6a3aeSmrgAC_DEFUN([LT_PATH_LD], 41604cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 41618c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41628c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41634cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 41644cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl 41654cd6a3aeSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 41664cd6a3aeSmrg 41674cd6a3aeSmrgAC_ARG_WITH([gnu-ld], 41684cd6a3aeSmrg [AS_HELP_STRING([--with-gnu-ld], 41694cd6a3aeSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41704cd6a3aeSmrg [test "$withval" = no || with_gnu_ld=yes], 41714cd6a3aeSmrg [with_gnu_ld=no])dnl 41724cd6a3aeSmrg 41738c9fbc29Smrgac_prog=ld 41748c9fbc29Smrgif test "$GCC" = yes; then 41758c9fbc29Smrg # Check if gcc -print-prog-name=ld gives a path. 41768c9fbc29Smrg AC_MSG_CHECKING([for ld used by $CC]) 41778c9fbc29Smrg case $host in 41788c9fbc29Smrg *-*-mingw*) 41798c9fbc29Smrg # gcc leaves a trailing carriage return which upsets mingw 41808c9fbc29Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41818c9fbc29Smrg *) 41828c9fbc29Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 41838c9fbc29Smrg esac 41848c9fbc29Smrg case $ac_prog in 41858c9fbc29Smrg # Accept absolute paths. 41868c9fbc29Smrg [[\\/]]* | ?:[[\\/]]*) 41878c9fbc29Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41888c9fbc29Smrg # Canonicalize the pathname of ld 41894cd6a3aeSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41904cd6a3aeSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41914cd6a3aeSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41928c9fbc29Smrg done 41938c9fbc29Smrg test -z "$LD" && LD="$ac_prog" 41948c9fbc29Smrg ;; 41958c9fbc29Smrg "") 41968c9fbc29Smrg # If it fails, then pretend we aren't using GCC. 41978c9fbc29Smrg ac_prog=ld 41988c9fbc29Smrg ;; 41998c9fbc29Smrg *) 42008c9fbc29Smrg # If it is relative, then search for the first ld in PATH. 42018c9fbc29Smrg with_gnu_ld=unknown 42028c9fbc29Smrg ;; 42038c9fbc29Smrg esac 42048c9fbc29Smrgelif test "$with_gnu_ld" = yes; then 42058c9fbc29Smrg AC_MSG_CHECKING([for GNU ld]) 42068c9fbc29Smrgelse 42078c9fbc29Smrg AC_MSG_CHECKING([for non-GNU ld]) 42088c9fbc29Smrgfi 42098c9fbc29SmrgAC_CACHE_VAL(lt_cv_path_LD, 42108c9fbc29Smrg[if test -z "$LD"; then 42118c9fbc29Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 42128c9fbc29Smrg for ac_dir in $PATH; do 42138c9fbc29Smrg IFS="$lt_save_ifs" 42148c9fbc29Smrg test -z "$ac_dir" && ac_dir=. 42158c9fbc29Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42168c9fbc29Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42178c9fbc29Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42188c9fbc29Smrg # but apparently some variants of GNU ld only accept -v. 42198c9fbc29Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42208c9fbc29Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42218c9fbc29Smrg *GNU* | *'with BFD'*) 42228c9fbc29Smrg test "$with_gnu_ld" != no && break 42238c9fbc29Smrg ;; 42248c9fbc29Smrg *) 42258c9fbc29Smrg test "$with_gnu_ld" != yes && break 42268c9fbc29Smrg ;; 42278c9fbc29Smrg esac 42288c9fbc29Smrg fi 42298c9fbc29Smrg done 42308c9fbc29Smrg IFS="$lt_save_ifs" 42318c9fbc29Smrgelse 42328c9fbc29Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 42338c9fbc29Smrgfi]) 42348c9fbc29SmrgLD="$lt_cv_path_LD" 42358c9fbc29Smrgif test -n "$LD"; then 42368c9fbc29Smrg AC_MSG_RESULT($LD) 42378c9fbc29Smrgelse 42388c9fbc29Smrg AC_MSG_RESULT(no) 42398c9fbc29Smrgfi 42408c9fbc29Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42414cd6a3aeSmrg_LT_PATH_LD_GNU 42424cd6a3aeSmrgAC_SUBST([LD]) 42438c9fbc29Smrg 42444cd6a3aeSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42454cd6a3aeSmrg])# LT_PATH_LD 42468c9fbc29Smrg 42474cd6a3aeSmrg# Old names: 42484cd6a3aeSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42494cd6a3aeSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42504cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 42514cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_LD], []) 42524cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_LD], []) 42534cd6a3aeSmrg 42544cd6a3aeSmrg 42554cd6a3aeSmrg# _LT_PATH_LD_GNU 42564cd6a3aeSmrg#- -------------- 42574cd6a3aeSmrgm4_defun([_LT_PATH_LD_GNU], 42584cd6a3aeSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42598c9fbc29Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42608c9fbc29Smrgcase `$LD -v 2>&1 </dev/null` in 42618c9fbc29Smrg*GNU* | *'with BFD'*) 42628c9fbc29Smrg lt_cv_prog_gnu_ld=yes 42638c9fbc29Smrg ;; 42648c9fbc29Smrg*) 42658c9fbc29Smrg lt_cv_prog_gnu_ld=no 42668c9fbc29Smrg ;; 42678c9fbc29Smrgesac]) 42688c9fbc29Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42694cd6a3aeSmrg])# _LT_PATH_LD_GNU 42708c9fbc29Smrg 42718c9fbc29Smrg 42724cd6a3aeSmrg# _LT_CMD_RELOAD 42734cd6a3aeSmrg# -------------- 42748c9fbc29Smrg# find reload flag for linker 42758c9fbc29Smrg# -- PORTME Some linkers may need a different reload flag. 42764cd6a3aeSmrgm4_defun([_LT_CMD_RELOAD], 42778c9fbc29Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42788c9fbc29Smrg lt_cv_ld_reload_flag, 42798c9fbc29Smrg [lt_cv_ld_reload_flag='-r']) 42808c9fbc29Smrgreload_flag=$lt_cv_ld_reload_flag 42818c9fbc29Smrgcase $reload_flag in 42828c9fbc29Smrg"" | " "*) ;; 42838c9fbc29Smrg*) reload_flag=" $reload_flag" ;; 42848c9fbc29Smrgesac 42858c9fbc29Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42868c9fbc29Smrgcase $host_os in 42874cd6a3aeSmrg cygwin* | mingw* | pw32* | cegcc*) 42884cd6a3aeSmrg if test "$GCC" != yes; then 42894cd6a3aeSmrg reload_cmds=false 42904cd6a3aeSmrg fi 42914cd6a3aeSmrg ;; 42928c9fbc29Smrg darwin*) 42938c9fbc29Smrg if test "$GCC" = yes; then 42948c9fbc29Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42958c9fbc29Smrg else 42968c9fbc29Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42978c9fbc29Smrg fi 42988c9fbc29Smrg ;; 42998c9fbc29Smrgesac 43004cd6a3aeSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 43014cd6a3aeSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 43024cd6a3aeSmrg])# _LT_CMD_RELOAD 43038c9fbc29Smrg 43048c9fbc29Smrg 43054cd6a3aeSmrg# _LT_CHECK_MAGIC_METHOD 43064cd6a3aeSmrg# ---------------------- 43078c9fbc29Smrg# how to check for library dependencies 43088c9fbc29Smrg# -- PORTME fill in with the dynamic library characteristics 43094cd6a3aeSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 43104cd6a3aeSmrg[m4_require([_LT_DECL_EGREP]) 43114cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP]) 43124cd6a3aeSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 43138c9fbc29Smrglt_cv_deplibs_check_method, 43148c9fbc29Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 43158c9fbc29Smrglt_cv_file_magic_test_file= 43168c9fbc29Smrglt_cv_deplibs_check_method='unknown' 43178c9fbc29Smrg# Need to set the preceding variable on all platforms that support 43188c9fbc29Smrg# interlibrary dependencies. 43198c9fbc29Smrg# 'none' -- dependencies not supported. 43208c9fbc29Smrg# `unknown' -- same as none, but documents that we really don't know. 43218c9fbc29Smrg# 'pass_all' -- all dependencies passed with no checks. 43228c9fbc29Smrg# 'test_compile' -- check by making test program. 43238c9fbc29Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 43248c9fbc29Smrg# which responds to the $file_magic_cmd with a given extended regex. 43258c9fbc29Smrg# If you have `file' or equivalent on your system and you're not sure 43268c9fbc29Smrg# whether `pass_all' will *always* work, you probably want this one. 43278c9fbc29Smrg 43288c9fbc29Smrgcase $host_os in 43294e411241Smrgaix[[4-9]]*) 43308c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 43318c9fbc29Smrg ;; 43328c9fbc29Smrg 43338c9fbc29Smrgbeos*) 43348c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 43358c9fbc29Smrg ;; 43368c9fbc29Smrg 43378c9fbc29Smrgbsdi[[45]]*) 43388c9fbc29Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43398c9fbc29Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43408c9fbc29Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43418c9fbc29Smrg ;; 43428c9fbc29Smrg 43438c9fbc29Smrgcygwin*) 43448c9fbc29Smrg # func_win32_libid is a shell function defined in ltmain.sh 43458c9fbc29Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43468c9fbc29Smrg lt_cv_file_magic_cmd='func_win32_libid' 43478c9fbc29Smrg ;; 43488c9fbc29Smrg 43498c9fbc29Smrgmingw* | pw32*) 43508c9fbc29Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43514e411241Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43524e411241Smrg # unless we find 'file', for example because we are cross-compiling. 43534cd6a3aeSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43544cd6a3aeSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43554e411241Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43564e411241Smrg lt_cv_file_magic_cmd='func_win32_libid' 43574e411241Smrg else 43584cd6a3aeSmrg # Keep this pattern in sync with the one in func_win32_libid. 43594cd6a3aeSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43604e411241Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43614e411241Smrg fi 43628c9fbc29Smrg ;; 43638c9fbc29Smrg 43644cd6a3aeSmrgcegcc*) 43654cd6a3aeSmrg # use the weaker test based on 'objdump'. See mingw*. 43664cd6a3aeSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43674cd6a3aeSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43684cd6a3aeSmrg ;; 43694cd6a3aeSmrg 43708c9fbc29Smrgdarwin* | rhapsody*) 43718c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 43728c9fbc29Smrg ;; 43738c9fbc29Smrg 43744e411241Smrgfreebsd* | dragonfly*) 43754cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43768c9fbc29Smrg case $host_cpu in 43778c9fbc29Smrg i*86 ) 43788c9fbc29Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43798c9fbc29Smrg # Let's accept both of them until this is cleared up. 43808c9fbc29Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43818c9fbc29Smrg lt_cv_file_magic_cmd=/usr/bin/file 43828c9fbc29Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43838c9fbc29Smrg ;; 43848c9fbc29Smrg esac 43858c9fbc29Smrg else 43868c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 43878c9fbc29Smrg fi 43888c9fbc29Smrg ;; 43898c9fbc29Smrg 43908c9fbc29Smrggnu*) 43918c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 43928c9fbc29Smrg ;; 43938c9fbc29Smrg 43944cd6a3aeSmrghaiku*) 43954cd6a3aeSmrg lt_cv_deplibs_check_method=pass_all 43964cd6a3aeSmrg ;; 43974cd6a3aeSmrg 43988c9fbc29Smrghpux10.20* | hpux11*) 43998c9fbc29Smrg lt_cv_file_magic_cmd=/usr/bin/file 44008c9fbc29Smrg case $host_cpu in 44018c9fbc29Smrg ia64*) 44028c9fbc29Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 44038c9fbc29Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 44048c9fbc29Smrg ;; 44058c9fbc29Smrg hppa*64*) 44064cd6a3aeSmrg [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]'] 44078c9fbc29Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 44088c9fbc29Smrg ;; 44098c9fbc29Smrg *) 44104cd6a3aeSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 44118c9fbc29Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 44128c9fbc29Smrg ;; 44138c9fbc29Smrg esac 44148c9fbc29Smrg ;; 44158c9fbc29Smrg 44164e411241Smrginterix[[3-9]]*) 44178c9fbc29Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 44188c9fbc29Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 44198c9fbc29Smrg ;; 44208c9fbc29Smrg 44218c9fbc29Smrgirix5* | irix6* | nonstopux*) 44228c9fbc29Smrg case $LD in 44238c9fbc29Smrg *-32|*"-32 ") libmagic=32-bit;; 44248c9fbc29Smrg *-n32|*"-n32 ") libmagic=N32;; 44258c9fbc29Smrg *-64|*"-64 ") libmagic=64-bit;; 44268c9fbc29Smrg *) libmagic=never-match;; 44278c9fbc29Smrg esac 44288c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44298c9fbc29Smrg ;; 44308c9fbc29Smrg 443170728a38Smrg# This must be glibc/ELF. 44324cd6a3aeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 44338c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44348c9fbc29Smrg ;; 44358c9fbc29Smrg 44368c9fbc29Smrgnetbsd*) 44374cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44388c9fbc29Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44398c9fbc29Smrg else 44408c9fbc29Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44418c9fbc29Smrg fi 44428c9fbc29Smrg ;; 44438c9fbc29Smrg 44448c9fbc29Smrgnewos6*) 44458c9fbc29Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44468c9fbc29Smrg lt_cv_file_magic_cmd=/usr/bin/file 44478c9fbc29Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44488c9fbc29Smrg ;; 44498c9fbc29Smrg 44504cd6a3aeSmrg*nto* | *qnx*) 44514cd6a3aeSmrg lt_cv_deplibs_check_method=pass_all 44528c9fbc29Smrg ;; 44538c9fbc29Smrg 44548c9fbc29Smrgopenbsd*) 44554cd6a3aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44568c9fbc29Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44578c9fbc29Smrg else 44588c9fbc29Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44598c9fbc29Smrg fi 44608c9fbc29Smrg ;; 44618c9fbc29Smrg 44628c9fbc29Smrgosf3* | osf4* | osf5*) 44638c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44648c9fbc29Smrg ;; 44658c9fbc29Smrg 44664e411241Smrgrdos*) 44674e411241Smrg lt_cv_deplibs_check_method=pass_all 44684e411241Smrg ;; 44694e411241Smrg 44708c9fbc29Smrgsolaris*) 44718c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44728c9fbc29Smrg ;; 44738c9fbc29Smrg 44744cd6a3aeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44754cd6a3aeSmrg lt_cv_deplibs_check_method=pass_all 44764cd6a3aeSmrg ;; 44774cd6a3aeSmrg 44788c9fbc29Smrgsysv4 | sysv4.3*) 44798c9fbc29Smrg case $host_vendor in 44808c9fbc29Smrg motorola) 44818c9fbc29Smrg 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]]' 44828c9fbc29Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44838c9fbc29Smrg ;; 44848c9fbc29Smrg ncr) 44858c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44868c9fbc29Smrg ;; 44878c9fbc29Smrg sequent) 44888c9fbc29Smrg lt_cv_file_magic_cmd='/bin/file' 44898c9fbc29Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44908c9fbc29Smrg ;; 44918c9fbc29Smrg sni) 44928c9fbc29Smrg lt_cv_file_magic_cmd='/bin/file' 44938c9fbc29Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44948c9fbc29Smrg lt_cv_file_magic_test_file=/lib/libc.so 44958c9fbc29Smrg ;; 44968c9fbc29Smrg siemens) 44978c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 44988c9fbc29Smrg ;; 44998c9fbc29Smrg pc) 45008c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 45018c9fbc29Smrg ;; 45028c9fbc29Smrg esac 45038c9fbc29Smrg ;; 45048c9fbc29Smrg 45054cd6a3aeSmrgtpf*) 45068c9fbc29Smrg lt_cv_deplibs_check_method=pass_all 45078c9fbc29Smrg ;; 45088c9fbc29Smrgesac 45098c9fbc29Smrg]) 45104cd6a3aeSmrg 45114cd6a3aeSmrgfile_magic_glob= 45124cd6a3aeSmrgwant_nocaseglob=no 45134cd6a3aeSmrgif test "$build" = "$host"; then 45144cd6a3aeSmrg case $host_os in 45154cd6a3aeSmrg mingw* | pw32*) 45164cd6a3aeSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 45174cd6a3aeSmrg want_nocaseglob=yes 45184cd6a3aeSmrg else 45194cd6a3aeSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 45204cd6a3aeSmrg fi 45214cd6a3aeSmrg ;; 45224cd6a3aeSmrg esac 45234cd6a3aeSmrgfi 45244cd6a3aeSmrg 45258c9fbc29Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 45268c9fbc29Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 45278c9fbc29Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 45284cd6a3aeSmrg 45294cd6a3aeSmrg_LT_DECL([], [deplibs_check_method], [1], 45304cd6a3aeSmrg [Method to check whether dependent libraries are shared objects]) 45314cd6a3aeSmrg_LT_DECL([], [file_magic_cmd], [1], 45324cd6a3aeSmrg [Command to use when deplibs_check_method = "file_magic"]) 45334cd6a3aeSmrg_LT_DECL([], [file_magic_glob], [1], 45344cd6a3aeSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 45354cd6a3aeSmrg_LT_DECL([], [want_nocaseglob], [1], 45364cd6a3aeSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45374cd6a3aeSmrg])# _LT_CHECK_MAGIC_METHOD 45388c9fbc29Smrg 45398c9fbc29Smrg 45404cd6a3aeSmrg# LT_PATH_NM 45418c9fbc29Smrg# ---------- 45424cd6a3aeSmrg# find the pathname to a BSD- or MS-compatible name lister 45434cd6a3aeSmrgAC_DEFUN([LT_PATH_NM], 45444cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 45454cd6a3aeSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45468c9fbc29Smrg[if test -n "$NM"; then 45478c9fbc29Smrg # Let the user override the test. 45488c9fbc29Smrg lt_cv_path_NM="$NM" 45498c9fbc29Smrgelse 45508c9fbc29Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45514e411241Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45528c9fbc29Smrg lt_nm_to_check="$lt_nm_to_check nm" 45538c9fbc29Smrg fi 45548c9fbc29Smrg for lt_tmp_nm in $lt_nm_to_check; do 45558c9fbc29Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45568c9fbc29Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45578c9fbc29Smrg IFS="$lt_save_ifs" 45588c9fbc29Smrg test -z "$ac_dir" && ac_dir=. 45598c9fbc29Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45608c9fbc29Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45618c9fbc29Smrg # Check to see if the nm accepts a BSD-compat flag. 45628c9fbc29Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45638c9fbc29Smrg # nm: unknown option "B" ignored 45648c9fbc29Smrg # Tru64's nm complains that /dev/null is an invalid object file 45658c9fbc29Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45668c9fbc29Smrg */dev/null* | *'Invalid file or object type'*) 45678c9fbc29Smrg lt_cv_path_NM="$tmp_nm -B" 45688c9fbc29Smrg break 45698c9fbc29Smrg ;; 45708c9fbc29Smrg *) 45718c9fbc29Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45728c9fbc29Smrg */dev/null*) 45738c9fbc29Smrg lt_cv_path_NM="$tmp_nm -p" 45748c9fbc29Smrg break 45758c9fbc29Smrg ;; 45768c9fbc29Smrg *) 45778c9fbc29Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45788c9fbc29Smrg continue # so that we can try to find one that supports BSD flags 45798c9fbc29Smrg ;; 45808c9fbc29Smrg esac 45818c9fbc29Smrg ;; 45828c9fbc29Smrg esac 45838c9fbc29Smrg fi 45848c9fbc29Smrg done 45858c9fbc29Smrg IFS="$lt_save_ifs" 45868c9fbc29Smrg done 45874cd6a3aeSmrg : ${lt_cv_path_NM=no} 45888c9fbc29Smrgfi]) 45894cd6a3aeSmrgif test "$lt_cv_path_NM" != "no"; then 45904cd6a3aeSmrg NM="$lt_cv_path_NM" 45914cd6a3aeSmrgelse 45924cd6a3aeSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 45934cd6a3aeSmrg if test -n "$DUMPBIN"; then : 45944cd6a3aeSmrg # Let the user override the test. 45954cd6a3aeSmrg else 45964cd6a3aeSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45974cd6a3aeSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45984cd6a3aeSmrg *COFF*) 45994cd6a3aeSmrg DUMPBIN="$DUMPBIN -symbols" 46004cd6a3aeSmrg ;; 46014cd6a3aeSmrg *) 46024cd6a3aeSmrg DUMPBIN=: 46034cd6a3aeSmrg ;; 46044cd6a3aeSmrg esac 46054cd6a3aeSmrg fi 46064cd6a3aeSmrg AC_SUBST([DUMPBIN]) 46074cd6a3aeSmrg if test "$DUMPBIN" != ":"; then 46084cd6a3aeSmrg NM="$DUMPBIN" 46094cd6a3aeSmrg fi 46104cd6a3aeSmrgfi 46114cd6a3aeSmrgtest -z "$NM" && NM=nm 46124cd6a3aeSmrgAC_SUBST([NM]) 46134cd6a3aeSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 46144cd6a3aeSmrg 46154cd6a3aeSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46164cd6a3aeSmrg [lt_cv_nm_interface="BSD nm" 46174cd6a3aeSmrg echo "int some_variable = 0;" > conftest.$ac_ext 46184cd6a3aeSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46194cd6a3aeSmrg (eval "$ac_compile" 2>conftest.err) 46204cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 46214cd6a3aeSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46224cd6a3aeSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46234cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 46244cd6a3aeSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46254cd6a3aeSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 46264cd6a3aeSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46274cd6a3aeSmrg lt_cv_nm_interface="MS dumpbin" 46284cd6a3aeSmrg fi 46294cd6a3aeSmrg rm -f conftest*]) 46304cd6a3aeSmrg])# LT_PATH_NM 46314cd6a3aeSmrg 46324cd6a3aeSmrg# Old names: 46334cd6a3aeSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46344cd6a3aeSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46354cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 46364cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_NM], []) 46374cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_NM], []) 46384cd6a3aeSmrg 46394cd6a3aeSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46404cd6a3aeSmrg# -------------------------------- 46414cd6a3aeSmrg# how to determine the name of the shared library 46424cd6a3aeSmrg# associated with a specific link library. 46434cd6a3aeSmrg# -- PORTME fill in with the dynamic library characteristics 46444cd6a3aeSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46454cd6a3aeSmrg[m4_require([_LT_DECL_EGREP]) 46464cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP]) 46474cd6a3aeSmrgm4_require([_LT_DECL_DLLTOOL]) 46484cd6a3aeSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46494cd6a3aeSmrglt_cv_sharedlib_from_linklib_cmd, 46504cd6a3aeSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 46514cd6a3aeSmrg 46524cd6a3aeSmrgcase $host_os in 46534cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*) 46544cd6a3aeSmrg # two different shell functions defined in ltmain.sh 46554cd6a3aeSmrg # decide which to use based on capabilities of $DLLTOOL 46564cd6a3aeSmrg case `$DLLTOOL --help 2>&1` in 46574cd6a3aeSmrg *--identify-strict*) 46584cd6a3aeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46594cd6a3aeSmrg ;; 46604cd6a3aeSmrg *) 46614cd6a3aeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46624cd6a3aeSmrg ;; 46634cd6a3aeSmrg esac 46644cd6a3aeSmrg ;; 46654cd6a3aeSmrg*) 46664cd6a3aeSmrg # fallback: assume linklib IS sharedlib 46674cd6a3aeSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 46684cd6a3aeSmrg ;; 46694cd6a3aeSmrgesac 46704cd6a3aeSmrg]) 46714cd6a3aeSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46724cd6a3aeSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 46738c9fbc29Smrg 46744cd6a3aeSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46754cd6a3aeSmrg [Command to associate shared and link libraries]) 46764cd6a3aeSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46778c9fbc29Smrg 46784cd6a3aeSmrg 46794cd6a3aeSmrg# _LT_PATH_MANIFEST_TOOL 46804cd6a3aeSmrg# ---------------------- 46814cd6a3aeSmrg# locate the manifest tool 46824cd6a3aeSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46834cd6a3aeSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46844cd6a3aeSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46854cd6a3aeSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46864cd6a3aeSmrg [lt_cv_path_mainfest_tool=no 46874cd6a3aeSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46884cd6a3aeSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46894cd6a3aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 46904cd6a3aeSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46914cd6a3aeSmrg lt_cv_path_mainfest_tool=yes 46924cd6a3aeSmrg fi 46934cd6a3aeSmrg rm -f conftest*]) 46944cd6a3aeSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46954cd6a3aeSmrg MANIFEST_TOOL=: 46964cd6a3aeSmrgfi 46974cd6a3aeSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46984cd6a3aeSmrg])# _LT_PATH_MANIFEST_TOOL 46994cd6a3aeSmrg 47004cd6a3aeSmrg 47014cd6a3aeSmrg# LT_LIB_M 47024cd6a3aeSmrg# -------- 47038c9fbc29Smrg# check for math library 47044cd6a3aeSmrgAC_DEFUN([LT_LIB_M], 47058c9fbc29Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47068c9fbc29SmrgLIBM= 47078c9fbc29Smrgcase $host in 47084cd6a3aeSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 47098c9fbc29Smrg # These system don't have libm, or don't need it 47108c9fbc29Smrg ;; 47118c9fbc29Smrg*-ncr-sysv4.3*) 47128c9fbc29Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 47138c9fbc29Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 47148c9fbc29Smrg ;; 47158c9fbc29Smrg*) 47168c9fbc29Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 47178c9fbc29Smrg ;; 47188c9fbc29Smrgesac 47194cd6a3aeSmrgAC_SUBST([LIBM]) 47204cd6a3aeSmrg])# LT_LIB_M 47218c9fbc29Smrg 47224cd6a3aeSmrg# Old name: 47234cd6a3aeSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47244cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 47254cd6a3aeSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 47268c9fbc29Smrg 47278c9fbc29Smrg 47284cd6a3aeSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47294cd6a3aeSmrg# ------------------------------- 47304cd6a3aeSmrgm4_defun([_LT_COMPILER_NO_RTTI], 47314cd6a3aeSmrg[m4_require([_LT_TAG_COMPILER])dnl 47328c9fbc29Smrg 47334cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47348c9fbc29Smrg 47354cd6a3aeSmrgif test "$GCC" = yes; then 47364cd6a3aeSmrg case $cc_basename in 47374cd6a3aeSmrg nvcc*) 47384cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47394cd6a3aeSmrg *) 47404cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47414cd6a3aeSmrg esac 47428c9fbc29Smrg 47434cd6a3aeSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47444cd6a3aeSmrg lt_cv_prog_compiler_rtti_exceptions, 47454cd6a3aeSmrg [-fno-rtti -fno-exceptions], [], 47464cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47474cd6a3aeSmrgfi 47484cd6a3aeSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47494cd6a3aeSmrg [Compiler flag to turn off builtin functions]) 47504cd6a3aeSmrg])# _LT_COMPILER_NO_RTTI 47518c9fbc29Smrg 47528c9fbc29Smrg 47534cd6a3aeSmrg# _LT_CMD_GLOBAL_SYMBOLS 47544cd6a3aeSmrg# ---------------------- 47554cd6a3aeSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47564cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47574cd6a3aeSmrgAC_REQUIRE([AC_PROG_CC])dnl 47584cd6a3aeSmrgAC_REQUIRE([AC_PROG_AWK])dnl 47594cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 47604cd6a3aeSmrgAC_REQUIRE([LT_PATH_LD])dnl 47614cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 47624cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl 47634cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl 47648c9fbc29Smrg 47654cd6a3aeSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47664cd6a3aeSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47674cd6a3aeSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47688c9fbc29Smrg[ 47694cd6a3aeSmrg# These are sane defaults that work on at least a few old systems. 47704cd6a3aeSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 47718c9fbc29Smrg 47724cd6a3aeSmrg# Character class describing NM global symbol codes. 47734cd6a3aeSmrgsymcode='[[BCDEGRST]]' 47748c9fbc29Smrg 47754cd6a3aeSmrg# Regexp to match symbols that can be accessed directly from C. 47764cd6a3aeSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 47778c9fbc29Smrg 47784cd6a3aeSmrg# Define system-specific variables. 47798c9fbc29Smrgcase $host_os in 47804cd6a3aeSmrgaix*) 47814cd6a3aeSmrg symcode='[[BCDT]]' 47828c9fbc29Smrg ;; 47834cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*) 47844cd6a3aeSmrg symcode='[[ABCDGISTW]]' 47854cd6a3aeSmrg ;; 47864cd6a3aeSmrghpux*) 47874cd6a3aeSmrg if test "$host_cpu" = ia64; then 47884cd6a3aeSmrg symcode='[[ABCDEGRST]]' 47898c9fbc29Smrg fi 47904cd6a3aeSmrg ;; 47914cd6a3aeSmrgirix* | nonstopux*) 47924cd6a3aeSmrg symcode='[[BCDEGRST]]' 47934cd6a3aeSmrg ;; 47944cd6a3aeSmrgosf*) 47954cd6a3aeSmrg symcode='[[BCDEGQRST]]' 47964cd6a3aeSmrg ;; 47974cd6a3aeSmrgsolaris*) 47984cd6a3aeSmrg symcode='[[BDRT]]' 47994cd6a3aeSmrg ;; 48004cd6a3aeSmrgsco3.2v5*) 48014cd6a3aeSmrg symcode='[[DT]]' 48024cd6a3aeSmrg ;; 48034cd6a3aeSmrgsysv4.2uw2*) 48044cd6a3aeSmrg symcode='[[DT]]' 48054cd6a3aeSmrg ;; 48064cd6a3aeSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48074cd6a3aeSmrg symcode='[[ABDT]]' 48084cd6a3aeSmrg ;; 48094cd6a3aeSmrgsysv4) 48104cd6a3aeSmrg symcode='[[DFNSTU]]' 48114cd6a3aeSmrg ;; 48128c9fbc29Smrgesac 48138c9fbc29Smrg 48144cd6a3aeSmrg# If we're using GNU nm, then use its standard symbol codes. 48154cd6a3aeSmrgcase `$NM -V 2>&1` in 48164cd6a3aeSmrg*GNU* | *'with BFD'*) 48174cd6a3aeSmrg symcode='[[ABCDGIRSTW]]' ;; 48184cd6a3aeSmrgesac 48198c9fbc29Smrg 48204cd6a3aeSmrg# Transform an extracted symbol line into a proper C declaration. 48214cd6a3aeSmrg# Some systems (esp. on ia64) link data and code symbols differently, 48224cd6a3aeSmrg# so use this general approach. 48234cd6a3aeSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48248c9fbc29Smrg 48254cd6a3aeSmrg# Transform an extracted symbol line into symbol name and symbol address 48264cd6a3aeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 48274cd6a3aeSmrglt_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'" 48288c9fbc29Smrg 48294cd6a3aeSmrg# Handle CRLF in mingw tool chain 48304cd6a3aeSmrgopt_cr= 48314cd6a3aeSmrgcase $build_os in 48324cd6a3aeSmrgmingw*) 48334cd6a3aeSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48344cd6a3aeSmrg ;; 48354cd6a3aeSmrgesac 48368c9fbc29Smrg 48374cd6a3aeSmrg# Try without a prefix underscore, then with it. 48384cd6a3aeSmrgfor ac_symprfx in "" "_"; do 48398c9fbc29Smrg 48404cd6a3aeSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48414cd6a3aeSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48428c9fbc29Smrg 48434cd6a3aeSmrg # Write the raw and C identifiers. 48444cd6a3aeSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48454cd6a3aeSmrg # Fake it for dumpbin and say T for any non-static function 48464cd6a3aeSmrg # and D for any global variable. 48474cd6a3aeSmrg # Also find C++ and __fastcall symbols from MSVC++, 48484cd6a3aeSmrg # which start with @ or ?. 48494cd6a3aeSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48504cd6a3aeSmrg" {last_section=section; section=\$ 3};"\ 485170728a38Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48524cd6a3aeSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48534cd6a3aeSmrg" \$ 0!~/External *\|/{next};"\ 48544cd6a3aeSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48554cd6a3aeSmrg" {if(hide[section]) next};"\ 48564cd6a3aeSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48574cd6a3aeSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48584cd6a3aeSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48594cd6a3aeSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48604cd6a3aeSmrg" ' prfx=^$ac_symprfx]" 48614cd6a3aeSmrg else 48624cd6a3aeSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48634cd6a3aeSmrg fi 48644cd6a3aeSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 48658c9fbc29Smrg 48664cd6a3aeSmrg # Check to see that the pipe works correctly. 48674cd6a3aeSmrg pipe_works=no 48688c9fbc29Smrg 48694cd6a3aeSmrg rm -f conftest* 48704cd6a3aeSmrg cat > conftest.$ac_ext <<_LT_EOF 48714cd6a3aeSmrg#ifdef __cplusplus 48724cd6a3aeSmrgextern "C" { 48734cd6a3aeSmrg#endif 48744cd6a3aeSmrgchar nm_test_var; 48754cd6a3aeSmrgvoid nm_test_func(void); 48764cd6a3aeSmrgvoid nm_test_func(void){} 48774cd6a3aeSmrg#ifdef __cplusplus 48784cd6a3aeSmrg} 48794cd6a3aeSmrg#endif 48804cd6a3aeSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 48814cd6a3aeSmrg_LT_EOF 48828c9fbc29Smrg 48834cd6a3aeSmrg if AC_TRY_EVAL(ac_compile); then 48844cd6a3aeSmrg # Now try to grab the symbols. 48854cd6a3aeSmrg nlist=conftest.nm 48864cd6a3aeSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48874cd6a3aeSmrg # Try sorting and uniquifying the output. 48884cd6a3aeSmrg if sort "$nlist" | uniq > "$nlist"T; then 48894cd6a3aeSmrg mv -f "$nlist"T "$nlist" 48904cd6a3aeSmrg else 48914cd6a3aeSmrg rm -f "$nlist"T 48924cd6a3aeSmrg fi 48938c9fbc29Smrg 48944cd6a3aeSmrg # Make sure that we snagged all the symbols we need. 48954cd6a3aeSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48964cd6a3aeSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48974cd6a3aeSmrg cat <<_LT_EOF > conftest.$ac_ext 48984cd6a3aeSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 48994cd6a3aeSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 49004cd6a3aeSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 49014cd6a3aeSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 49024cd6a3aeSmrg# define LT@&t@_DLSYM_CONST 49034cd6a3aeSmrg#elif defined(__osf__) 49044cd6a3aeSmrg/* This system does not cope well with relocations in const data. */ 49054cd6a3aeSmrg# define LT@&t@_DLSYM_CONST 49064cd6a3aeSmrg#else 49074cd6a3aeSmrg# define LT@&t@_DLSYM_CONST const 49084cd6a3aeSmrg#endif 49098c9fbc29Smrg 49104cd6a3aeSmrg#ifdef __cplusplus 49114cd6a3aeSmrgextern "C" { 49124cd6a3aeSmrg#endif 49138c9fbc29Smrg 49144cd6a3aeSmrg_LT_EOF 49154cd6a3aeSmrg # Now generate the symbol file. 49164cd6a3aeSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 49178c9fbc29Smrg 49184cd6a3aeSmrg cat <<_LT_EOF >> conftest.$ac_ext 49198c9fbc29Smrg 49204cd6a3aeSmrg/* The mapping between symbol names and symbols. */ 49214cd6a3aeSmrgLT@&t@_DLSYM_CONST struct { 49224cd6a3aeSmrg const char *name; 49234cd6a3aeSmrg void *address; 49244cd6a3aeSmrg} 49254cd6a3aeSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 49264cd6a3aeSmrg{ 49274cd6a3aeSmrg { "@PROGRAM@", (void *) 0 }, 49284cd6a3aeSmrg_LT_EOF 49294cd6a3aeSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 49304cd6a3aeSmrg cat <<\_LT_EOF >> conftest.$ac_ext 49314cd6a3aeSmrg {0, (void *) 0} 49324cd6a3aeSmrg}; 49338c9fbc29Smrg 49344cd6a3aeSmrg/* This works around a problem in FreeBSD linker */ 49354cd6a3aeSmrg#ifdef FREEBSD_WORKAROUND 49364cd6a3aeSmrgstatic const void *lt_preloaded_setup() { 49374cd6a3aeSmrg return lt__PROGRAM__LTX_preloaded_symbols; 49384cd6a3aeSmrg} 49394cd6a3aeSmrg#endif 49408c9fbc29Smrg 49414cd6a3aeSmrg#ifdef __cplusplus 49424cd6a3aeSmrg} 49434cd6a3aeSmrg#endif 49444cd6a3aeSmrg_LT_EOF 49454cd6a3aeSmrg # Now try linking the two files. 49464cd6a3aeSmrg mv conftest.$ac_objext conftstm.$ac_objext 49474cd6a3aeSmrg lt_globsym_save_LIBS=$LIBS 49484cd6a3aeSmrg lt_globsym_save_CFLAGS=$CFLAGS 49494cd6a3aeSmrg LIBS="conftstm.$ac_objext" 49504cd6a3aeSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49514cd6a3aeSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49524cd6a3aeSmrg pipe_works=yes 49534cd6a3aeSmrg fi 49544cd6a3aeSmrg LIBS=$lt_globsym_save_LIBS 49554cd6a3aeSmrg CFLAGS=$lt_globsym_save_CFLAGS 49564cd6a3aeSmrg else 49574cd6a3aeSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49584cd6a3aeSmrg fi 49594cd6a3aeSmrg else 49604cd6a3aeSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49614cd6a3aeSmrg fi 49628c9fbc29Smrg else 49634cd6a3aeSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49648c9fbc29Smrg fi 49658c9fbc29Smrg else 49664cd6a3aeSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49674cd6a3aeSmrg cat conftest.$ac_ext >&5 49688c9fbc29Smrg fi 49694cd6a3aeSmrg rm -rf conftest* conftst* 49708c9fbc29Smrg 49714cd6a3aeSmrg # Do not use the global_symbol_pipe unless it works. 49724cd6a3aeSmrg if test "$pipe_works" = yes; then 49734cd6a3aeSmrg break 49744cd6a3aeSmrg else 49754cd6a3aeSmrg lt_cv_sys_global_symbol_pipe= 49764cd6a3aeSmrg fi 49774cd6a3aeSmrgdone 49784cd6a3aeSmrg]) 49794cd6a3aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49804cd6a3aeSmrg lt_cv_sys_global_symbol_to_cdecl= 49814cd6a3aeSmrgfi 49824cd6a3aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49834cd6a3aeSmrg AC_MSG_RESULT(failed) 49848c9fbc29Smrgelse 49854cd6a3aeSmrg AC_MSG_RESULT(ok) 49868c9fbc29Smrgfi 49878c9fbc29Smrg 49884cd6a3aeSmrg# Response file support. 49894cd6a3aeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49904cd6a3aeSmrg nm_file_list_spec='@' 49914cd6a3aeSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49924cd6a3aeSmrg nm_file_list_spec='@' 49934cd6a3aeSmrgfi 49948c9fbc29Smrg 49954cd6a3aeSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49964cd6a3aeSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 49974cd6a3aeSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49984cd6a3aeSmrg [Transform the output of nm in a proper C declaration]) 49994cd6a3aeSmrg_LT_DECL([global_symbol_to_c_name_address], 50004cd6a3aeSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 50014cd6a3aeSmrg [Transform the output of nm in a C name address pair]) 50024cd6a3aeSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 50034cd6a3aeSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 50044cd6a3aeSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 50054cd6a3aeSmrg_LT_DECL([], [nm_file_list_spec], [1], 50064cd6a3aeSmrg [Specify filename containing input files for $NM]) 50074cd6a3aeSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 50084cd6a3aeSmrg 50094cd6a3aeSmrg 50104cd6a3aeSmrg# _LT_COMPILER_PIC([TAGNAME]) 50114cd6a3aeSmrg# --------------------------- 50124cd6a3aeSmrgm4_defun([_LT_COMPILER_PIC], 50134cd6a3aeSmrg[m4_require([_LT_TAG_COMPILER])dnl 50144cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 50154cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50164cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 50178c9fbc29Smrg 50184cd6a3aeSmrgm4_if([$1], [CXX], [ 50194cd6a3aeSmrg # C++ specific cases for pic, static, wl, etc. 50204cd6a3aeSmrg if test "$GXX" = yes; then 50214cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50224cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50238c9fbc29Smrg 50244cd6a3aeSmrg case $host_os in 50254cd6a3aeSmrg aix*) 50264cd6a3aeSmrg # All AIX code is PIC. 50278c9fbc29Smrg if test "$host_cpu" = ia64; then 50284cd6a3aeSmrg # AIX 5 now supports IA64 processor 50294cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50308c9fbc29Smrg fi 50314cd6a3aeSmrg ;; 50328c9fbc29Smrg 50334cd6a3aeSmrg amigaos*) 50344cd6a3aeSmrg case $host_cpu in 50354cd6a3aeSmrg powerpc) 50364cd6a3aeSmrg # see comment about AmigaOS4 .so support 50374cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50384cd6a3aeSmrg ;; 50394cd6a3aeSmrg m68k) 50404cd6a3aeSmrg # FIXME: we need at least 68020 code to build shared libraries, but 50414cd6a3aeSmrg # adding the `-m68020' flag to GCC prevents building anything better, 50424cd6a3aeSmrg # like `-m68040'. 50434cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50444cd6a3aeSmrg ;; 50454cd6a3aeSmrg esac 50464cd6a3aeSmrg ;; 50478c9fbc29Smrg 50484cd6a3aeSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50494cd6a3aeSmrg # PIC is the default for these OSes. 50508c9fbc29Smrg ;; 50514cd6a3aeSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50524cd6a3aeSmrg # This hack is so that the source file can tell whether it is being 50534cd6a3aeSmrg # built for inclusion in a dll (and should export symbols for example). 50544cd6a3aeSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50554cd6a3aeSmrg # (--disable-auto-import) libraries 50564cd6a3aeSmrg m4_if([$1], [GCJ], [], 50574cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50588c9fbc29Smrg ;; 50594cd6a3aeSmrg darwin* | rhapsody*) 50604cd6a3aeSmrg # PIC is the default on this platform 50614cd6a3aeSmrg # Common symbols not allowed in MH_DYLIB files 50624cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50634cd6a3aeSmrg ;; 50644cd6a3aeSmrg *djgpp*) 50654cd6a3aeSmrg # DJGPP does not support shared libraries at all 50664cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50674cd6a3aeSmrg ;; 50684cd6a3aeSmrg haiku*) 50694cd6a3aeSmrg # PIC is the default for Haiku. 50704cd6a3aeSmrg # The "-static" flag exists, but is broken. 50714cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50724cd6a3aeSmrg ;; 50734cd6a3aeSmrg interix[[3-9]]*) 50744cd6a3aeSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50754cd6a3aeSmrg # Instead, we relocate shared libraries at runtime. 50764cd6a3aeSmrg ;; 50774cd6a3aeSmrg sysv4*MP*) 50784cd6a3aeSmrg if test -d /usr/nec; then 50794cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50808c9fbc29Smrg fi 50818c9fbc29Smrg ;; 50824cd6a3aeSmrg hpux*) 50834cd6a3aeSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50844cd6a3aeSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50854cd6a3aeSmrg # sets the default TLS model and affects inlining. 50868c9fbc29Smrg case $host_cpu in 50874cd6a3aeSmrg hppa*64*) 50884cd6a3aeSmrg ;; 50898c9fbc29Smrg *) 50904cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50914cd6a3aeSmrg ;; 50928c9fbc29Smrg esac 50934cd6a3aeSmrg ;; 50944cd6a3aeSmrg *qnx* | *nto*) 50954cd6a3aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50964cd6a3aeSmrg # it will coredump. 50974cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 50988c9fbc29Smrg ;; 50998c9fbc29Smrg *) 51004cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51018c9fbc29Smrg ;; 51028c9fbc29Smrg esac 51034cd6a3aeSmrg else 51044cd6a3aeSmrg case $host_os in 51054cd6a3aeSmrg aix[[4-9]]*) 51064cd6a3aeSmrg # All AIX code is PIC. 51074cd6a3aeSmrg if test "$host_cpu" = ia64; then 51084cd6a3aeSmrg # AIX 5 now supports IA64 processor 51094cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51104cd6a3aeSmrg else 51114cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 51124cd6a3aeSmrg fi 51138c9fbc29Smrg ;; 51144cd6a3aeSmrg chorus*) 51154cd6a3aeSmrg case $cc_basename in 51164cd6a3aeSmrg cxch68*) 51174cd6a3aeSmrg # Green Hills C++ Compiler 51184cd6a3aeSmrg # _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" 51198c9fbc29Smrg ;; 51208c9fbc29Smrg esac 51218c9fbc29Smrg ;; 51224cd6a3aeSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 51234cd6a3aeSmrg # This hack is so that the source file can tell whether it is being 51244cd6a3aeSmrg # built for inclusion in a dll (and should export symbols for example). 51254cd6a3aeSmrg m4_if([$1], [GCJ], [], 51264cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 51274cd6a3aeSmrg ;; 51284cd6a3aeSmrg dgux*) 51294cd6a3aeSmrg case $cc_basename in 51304cd6a3aeSmrg ec++*) 51314cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51324cd6a3aeSmrg ;; 51334cd6a3aeSmrg ghcx*) 51344cd6a3aeSmrg # Green Hills C++ Compiler 51354cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51364cd6a3aeSmrg ;; 51374cd6a3aeSmrg *) 51384cd6a3aeSmrg ;; 51394cd6a3aeSmrg esac 51404cd6a3aeSmrg ;; 51414cd6a3aeSmrg freebsd* | dragonfly*) 51424cd6a3aeSmrg # FreeBSD uses GNU C++ 51434cd6a3aeSmrg ;; 51444cd6a3aeSmrg hpux9* | hpux10* | hpux11*) 51454cd6a3aeSmrg case $cc_basename in 51464cd6a3aeSmrg CC*) 51474cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51484cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51494cd6a3aeSmrg if test "$host_cpu" != ia64; then 51504cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51514cd6a3aeSmrg fi 51524cd6a3aeSmrg ;; 51534cd6a3aeSmrg aCC*) 51544cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51554cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51568c9fbc29Smrg case $host_cpu in 51574cd6a3aeSmrg hppa*64*|ia64*) 51584cd6a3aeSmrg # +Z the default 51598c9fbc29Smrg ;; 51608c9fbc29Smrg *) 51614cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51628c9fbc29Smrg ;; 51638c9fbc29Smrg esac 51644cd6a3aeSmrg ;; 51654cd6a3aeSmrg *) 51664cd6a3aeSmrg ;; 51674cd6a3aeSmrg esac 51688c9fbc29Smrg ;; 51694cd6a3aeSmrg interix*) 51704cd6a3aeSmrg # This is c89, which is MS Visual C++ (no shared libs) 51714cd6a3aeSmrg # Anyone wants to do a port? 51728c9fbc29Smrg ;; 51734cd6a3aeSmrg irix5* | irix6* | nonstopux*) 51744cd6a3aeSmrg case $cc_basename in 51754cd6a3aeSmrg CC*) 51764cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51774cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51784cd6a3aeSmrg # CC pic flag -KPIC is the default. 51794cd6a3aeSmrg ;; 51804cd6a3aeSmrg *) 51814cd6a3aeSmrg ;; 51824cd6a3aeSmrg esac 51838c9fbc29Smrg ;; 51844cd6a3aeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51854cd6a3aeSmrg case $cc_basename in 51864cd6a3aeSmrg KCC*) 51874cd6a3aeSmrg # KAI C++ Compiler 51884cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51894cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51904cd6a3aeSmrg ;; 51914cd6a3aeSmrg ecpc* ) 51924cd6a3aeSmrg # old Intel C++ for x86_64 which still supported -KPIC. 51934cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51944cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51954cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51964cd6a3aeSmrg ;; 51974cd6a3aeSmrg icpc* ) 51984cd6a3aeSmrg # Intel C++, used to be incompatible with GCC. 51994cd6a3aeSmrg # ICC 10 doesn't accept -KPIC any more. 52004cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52014cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52024cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52034cd6a3aeSmrg ;; 52044cd6a3aeSmrg pgCC* | pgcpp*) 52054cd6a3aeSmrg # Portland Group C++ compiler 52064cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52074cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 52084cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52094cd6a3aeSmrg ;; 52104cd6a3aeSmrg cxx*) 52114cd6a3aeSmrg # Compaq C++ 52124cd6a3aeSmrg # Make sure the PIC flag is empty. It appears that all Alpha 52134cd6a3aeSmrg # Linux and Compaq Tru64 Unix objects are PIC. 52144cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52154cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52164cd6a3aeSmrg ;; 52174cd6a3aeSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 52184cd6a3aeSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 52194cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52204cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 52214cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52224cd6a3aeSmrg ;; 52234cd6a3aeSmrg *) 52244cd6a3aeSmrg case `$CC -V 2>&1 | sed 5q` in 52254cd6a3aeSmrg *Sun\ C*) 52264cd6a3aeSmrg # Sun C++ 5.9 52274cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52284cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52294cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52304cd6a3aeSmrg ;; 52314cd6a3aeSmrg esac 52324cd6a3aeSmrg ;; 52334cd6a3aeSmrg esac 52348c9fbc29Smrg ;; 52354cd6a3aeSmrg lynxos*) 52364cd6a3aeSmrg ;; 52374cd6a3aeSmrg m88k*) 52384cd6a3aeSmrg ;; 52394cd6a3aeSmrg mvs*) 52404cd6a3aeSmrg case $cc_basename in 52414cd6a3aeSmrg cxx*) 52424cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52434cd6a3aeSmrg ;; 52444cd6a3aeSmrg *) 52454cd6a3aeSmrg ;; 52468c9fbc29Smrg esac 52478c9fbc29Smrg ;; 52484cd6a3aeSmrg netbsd*) 52494cd6a3aeSmrg ;; 52504cd6a3aeSmrg *qnx* | *nto*) 52514cd6a3aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52524cd6a3aeSmrg # it will coredump. 52534cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52548c9fbc29Smrg ;; 52554cd6a3aeSmrg osf3* | osf4* | osf5*) 52564cd6a3aeSmrg case $cc_basename in 52574cd6a3aeSmrg KCC*) 52584cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52594cd6a3aeSmrg ;; 52604cd6a3aeSmrg RCC*) 52614cd6a3aeSmrg # Rational C++ 2.4.1 52624cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52634cd6a3aeSmrg ;; 52644cd6a3aeSmrg cxx*) 52654cd6a3aeSmrg # Digital/Compaq C++ 52664cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52674cd6a3aeSmrg # Make sure the PIC flag is empty. It appears that all Alpha 52684cd6a3aeSmrg # Linux and Compaq Tru64 Unix objects are PIC. 52694cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52704cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52714cd6a3aeSmrg ;; 52724cd6a3aeSmrg *) 52734cd6a3aeSmrg ;; 52744cd6a3aeSmrg esac 52758c9fbc29Smrg ;; 52764cd6a3aeSmrg psos*) 52774cd6a3aeSmrg ;; 52784cd6a3aeSmrg solaris*) 52794cd6a3aeSmrg case $cc_basename in 52804cd6a3aeSmrg CC* | sunCC*) 52814cd6a3aeSmrg # Sun C++ 4.2, 5.x and Centerline C++ 52824cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52834cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52844cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52854cd6a3aeSmrg ;; 52864cd6a3aeSmrg gcx*) 52874cd6a3aeSmrg # Green Hills C++ Compiler 52884cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52894cd6a3aeSmrg ;; 52904cd6a3aeSmrg *) 52914cd6a3aeSmrg ;; 52924e411241Smrg esac 52934e411241Smrg ;; 52944cd6a3aeSmrg sunos4*) 52954cd6a3aeSmrg case $cc_basename in 52964cd6a3aeSmrg CC*) 52974cd6a3aeSmrg # Sun C++ 4.x 52984cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52994cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53004cd6a3aeSmrg ;; 53014cd6a3aeSmrg lcc*) 53024cd6a3aeSmrg # Lucid 53034cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53044cd6a3aeSmrg ;; 53054cd6a3aeSmrg *) 53064cd6a3aeSmrg ;; 53074cd6a3aeSmrg esac 53084cd6a3aeSmrg ;; 53094cd6a3aeSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 53104cd6a3aeSmrg case $cc_basename in 53114cd6a3aeSmrg CC*) 53124cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53134cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53144cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53154cd6a3aeSmrg ;; 53164cd6a3aeSmrg esac 53174cd6a3aeSmrg ;; 53184cd6a3aeSmrg tandem*) 53194cd6a3aeSmrg case $cc_basename in 53204cd6a3aeSmrg NCC*) 53214cd6a3aeSmrg # NonStop-UX NCC 3.20 53224cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53234cd6a3aeSmrg ;; 53244cd6a3aeSmrg *) 53254cd6a3aeSmrg ;; 53264cd6a3aeSmrg esac 53274cd6a3aeSmrg ;; 53284cd6a3aeSmrg vxworks*) 53298c9fbc29Smrg ;; 53308c9fbc29Smrg *) 53314cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53328c9fbc29Smrg ;; 53338c9fbc29Smrg esac 53344cd6a3aeSmrg fi 53354cd6a3aeSmrg], 53364cd6a3aeSmrg[ 53374cd6a3aeSmrg if test "$GCC" = yes; then 53384cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53394cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53404cd6a3aeSmrg 53414cd6a3aeSmrg case $host_os in 53424cd6a3aeSmrg aix*) 53434cd6a3aeSmrg # All AIX code is PIC. 53444cd6a3aeSmrg if test "$host_cpu" = ia64; then 53454cd6a3aeSmrg # AIX 5 now supports IA64 processor 53464cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53474e411241Smrg fi 53484cd6a3aeSmrg ;; 53494cd6a3aeSmrg 53504cd6a3aeSmrg amigaos*) 53514cd6a3aeSmrg case $host_cpu in 53524cd6a3aeSmrg powerpc) 53534cd6a3aeSmrg # see comment about AmigaOS4 .so support 53544cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53554cd6a3aeSmrg ;; 53564cd6a3aeSmrg m68k) 53574cd6a3aeSmrg # FIXME: we need at least 68020 code to build shared libraries, but 53584cd6a3aeSmrg # adding the `-m68020' flag to GCC prevents building anything better, 53594cd6a3aeSmrg # like `-m68040'. 53604cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53614cd6a3aeSmrg ;; 53624cd6a3aeSmrg esac 53634cd6a3aeSmrg ;; 53648c9fbc29Smrg 53654cd6a3aeSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53664cd6a3aeSmrg # PIC is the default for these OSes. 53674cd6a3aeSmrg ;; 53684cd6a3aeSmrg 53694cd6a3aeSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53704cd6a3aeSmrg # This hack is so that the source file can tell whether it is being 53714cd6a3aeSmrg # built for inclusion in a dll (and should export symbols for example). 53724cd6a3aeSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53734cd6a3aeSmrg # (--disable-auto-import) libraries 53744cd6a3aeSmrg m4_if([$1], [GCJ], [], 53754cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53764cd6a3aeSmrg ;; 53778c9fbc29Smrg 53784cd6a3aeSmrg darwin* | rhapsody*) 53794cd6a3aeSmrg # PIC is the default on this platform 53804cd6a3aeSmrg # Common symbols not allowed in MH_DYLIB files 53814cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53824cd6a3aeSmrg ;; 53838c9fbc29Smrg 53844cd6a3aeSmrg haiku*) 53854cd6a3aeSmrg # PIC is the default for Haiku. 53864cd6a3aeSmrg # The "-static" flag exists, but is broken. 53874cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53884cd6a3aeSmrg ;; 53898c9fbc29Smrg 53904cd6a3aeSmrg hpux*) 53914cd6a3aeSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53924cd6a3aeSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53934cd6a3aeSmrg # sets the default TLS model and affects inlining. 53944cd6a3aeSmrg case $host_cpu in 53954cd6a3aeSmrg hppa*64*) 53964cd6a3aeSmrg # +Z the default 53978c9fbc29Smrg ;; 53988c9fbc29Smrg *) 53994cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54004cd6a3aeSmrg ;; 54014cd6a3aeSmrg esac 54024cd6a3aeSmrg ;; 54034cd6a3aeSmrg 54044cd6a3aeSmrg interix[[3-9]]*) 54054cd6a3aeSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 54064cd6a3aeSmrg # Instead, we relocate shared libraries at runtime. 54074cd6a3aeSmrg ;; 54088c9fbc29Smrg 54094cd6a3aeSmrg msdosdjgpp*) 54104cd6a3aeSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 54114cd6a3aeSmrg # on systems that don't support them. 54124cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 54134cd6a3aeSmrg enable_shared=no 54144cd6a3aeSmrg ;; 54158c9fbc29Smrg 54164cd6a3aeSmrg *nto* | *qnx*) 54174cd6a3aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54184cd6a3aeSmrg # it will coredump. 54194cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54204cd6a3aeSmrg ;; 54218c9fbc29Smrg 54224cd6a3aeSmrg sysv4*MP*) 54234cd6a3aeSmrg if test -d /usr/nec; then 54244cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 54254cd6a3aeSmrg fi 54264cd6a3aeSmrg ;; 54274cd6a3aeSmrg 54284cd6a3aeSmrg *) 54294cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54304cd6a3aeSmrg ;; 54318c9fbc29Smrg esac 54328c9fbc29Smrg 54334cd6a3aeSmrg case $cc_basename in 54344cd6a3aeSmrg nvcc*) # Cuda Compiler Driver 2.2 54354cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 543670728a38Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 543770728a38Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 543870728a38Smrg fi 54394cd6a3aeSmrg ;; 54404cd6a3aeSmrg esac 54414cd6a3aeSmrg else 54424cd6a3aeSmrg # PORTME Check for flag to pass linker flags through the system compiler. 54434cd6a3aeSmrg case $host_os in 54444cd6a3aeSmrg aix*) 54454cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54464cd6a3aeSmrg if test "$host_cpu" = ia64; then 54474cd6a3aeSmrg # AIX 5 now supports IA64 processor 54484cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54494cd6a3aeSmrg else 54504cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 54514cd6a3aeSmrg fi 54524cd6a3aeSmrg ;; 54538c9fbc29Smrg 54544cd6a3aeSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54554cd6a3aeSmrg # This hack is so that the source file can tell whether it is being 54564cd6a3aeSmrg # built for inclusion in a dll (and should export symbols for example). 54574cd6a3aeSmrg m4_if([$1], [GCJ], [], 54584cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54594cd6a3aeSmrg ;; 54608c9fbc29Smrg 54614cd6a3aeSmrg hpux9* | hpux10* | hpux11*) 54624cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54634cd6a3aeSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54644cd6a3aeSmrg # not for PA HP-UX. 54654cd6a3aeSmrg case $host_cpu in 54664cd6a3aeSmrg hppa*64*|ia64*) 54674cd6a3aeSmrg # +Z the default 54688c9fbc29Smrg ;; 54698c9fbc29Smrg *) 54704cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54714cd6a3aeSmrg ;; 54724cd6a3aeSmrg esac 54734cd6a3aeSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54744cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54754cd6a3aeSmrg ;; 54768c9fbc29Smrg 54774cd6a3aeSmrg irix5* | irix6* | nonstopux*) 54784cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54794cd6a3aeSmrg # PIC (with -KPIC) is the default. 54804cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54814cd6a3aeSmrg ;; 54828c9fbc29Smrg 54834cd6a3aeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54844cd6a3aeSmrg case $cc_basename in 54854cd6a3aeSmrg # old Intel for x86_64 which still supported -KPIC. 54864cd6a3aeSmrg ecc*) 54874cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54884cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54894cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54904cd6a3aeSmrg ;; 54914cd6a3aeSmrg # icc used to be incompatible with GCC. 54924cd6a3aeSmrg # ICC 10 doesn't accept -KPIC any more. 54934cd6a3aeSmrg icc* | ifort*) 54944cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54954cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54964cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54974cd6a3aeSmrg ;; 54984cd6a3aeSmrg # Lahey Fortran 8.1. 54994cd6a3aeSmrg lf95*) 55004cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55014cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 55024cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 55038c9fbc29Smrg ;; 55044cd6a3aeSmrg nagfor*) 55054cd6a3aeSmrg # NAG Fortran compiler 55064cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 55074cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55084cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55098c9fbc29Smrg ;; 55104cd6a3aeSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 55114cd6a3aeSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 55124cd6a3aeSmrg # which looks to be a dead project) 55134cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55144cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55154cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55164cd6a3aeSmrg ;; 55174cd6a3aeSmrg ccc*) 55184cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55194cd6a3aeSmrg # All Alpha code is PIC. 55204cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55214cd6a3aeSmrg ;; 55224cd6a3aeSmrg xl* | bgxl* | bgf* | mpixl*) 55234cd6a3aeSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 55244cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55254cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 55264cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 55278c9fbc29Smrg ;; 55288c9fbc29Smrg *) 55294cd6a3aeSmrg case `$CC -V 2>&1 | sed 5q` in 553070728a38Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 55314cd6a3aeSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 55324cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55334cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55344cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55354cd6a3aeSmrg ;; 553670728a38Smrg *Sun\ F* | *Sun*Fortran*) 553770728a38Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 553870728a38Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 553970728a38Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 554070728a38Smrg ;; 55414cd6a3aeSmrg *Sun\ C*) 55424cd6a3aeSmrg # Sun C 5.9 55434cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55444cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55454cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55464cd6a3aeSmrg ;; 554770728a38Smrg *Intel*\ [[CF]]*Compiler*) 554870728a38Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 554970728a38Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 555070728a38Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 555170728a38Smrg ;; 555270728a38Smrg *Portland\ Group*) 555370728a38Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 555470728a38Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 555570728a38Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 555670728a38Smrg ;; 55578c9fbc29Smrg esac 55584cd6a3aeSmrg ;; 55594cd6a3aeSmrg esac 55604cd6a3aeSmrg ;; 55614cd6a3aeSmrg 55624cd6a3aeSmrg newsos6) 55634cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55644cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55654cd6a3aeSmrg ;; 55668c9fbc29Smrg 55674cd6a3aeSmrg *nto* | *qnx*) 55684cd6a3aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55694cd6a3aeSmrg # it will coredump. 55704cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55714cd6a3aeSmrg ;; 55728c9fbc29Smrg 55734cd6a3aeSmrg osf3* | osf4* | osf5*) 55744cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55754cd6a3aeSmrg # All OSF/1 code is PIC. 55764cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55774cd6a3aeSmrg ;; 55788c9fbc29Smrg 55794cd6a3aeSmrg rdos*) 55804cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55814cd6a3aeSmrg ;; 55824cd6a3aeSmrg 55834cd6a3aeSmrg solaris*) 55844cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55854cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55864cd6a3aeSmrg case $cc_basename in 55874cd6a3aeSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55884cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55898c9fbc29Smrg *) 55904cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55914cd6a3aeSmrg esac 55924cd6a3aeSmrg ;; 55938c9fbc29Smrg 55944cd6a3aeSmrg sunos4*) 55954cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55964cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55974cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55984cd6a3aeSmrg ;; 55998c9fbc29Smrg 56004cd6a3aeSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 56014cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56024cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56034cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56044cd6a3aeSmrg ;; 56058c9fbc29Smrg 56064cd6a3aeSmrg sysv4*MP*) 56074cd6a3aeSmrg if test -d /usr/nec ;then 56084cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 56094cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56104cd6a3aeSmrg fi 56114cd6a3aeSmrg ;; 56128c9fbc29Smrg 56134cd6a3aeSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 56144cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56154cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56164cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56174cd6a3aeSmrg ;; 56188c9fbc29Smrg 56194cd6a3aeSmrg unicos*) 56204cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56214cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56224cd6a3aeSmrg ;; 56234cd6a3aeSmrg 56244cd6a3aeSmrg uts4*) 56254cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 56264cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56274cd6a3aeSmrg ;; 56284cd6a3aeSmrg 56294cd6a3aeSmrg *) 56304cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56314cd6a3aeSmrg ;; 56328c9fbc29Smrg esac 56334cd6a3aeSmrg fi 56344cd6a3aeSmrg]) 56354cd6a3aeSmrgcase $host_os in 56364cd6a3aeSmrg # For platforms which do not support PIC, -DPIC is meaningless: 56374cd6a3aeSmrg *djgpp*) 56384cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 56398c9fbc29Smrg ;; 56408c9fbc29Smrg *) 56414cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 56428c9fbc29Smrg ;; 56438c9fbc29Smrgesac 56448c9fbc29Smrg 56454cd6a3aeSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 56464cd6a3aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 56474cd6a3aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 56484cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 56498c9fbc29Smrg 56504cd6a3aeSmrg# 56514cd6a3aeSmrg# Check to make sure the PIC flag actually works. 56524cd6a3aeSmrg# 56534cd6a3aeSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56544cd6a3aeSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56554cd6a3aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56564cd6a3aeSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56574cd6a3aeSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56584cd6a3aeSmrg "" | " "*) ;; 56594cd6a3aeSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56604cd6a3aeSmrg esac], 56614cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56624cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 56634cd6a3aeSmrgfi 56644cd6a3aeSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56654cd6a3aeSmrg [Additional compiler flags for building library objects]) 56668c9fbc29Smrg 56674cd6a3aeSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56684cd6a3aeSmrg [How to pass a linker flag through the compiler]) 56694cd6a3aeSmrg# 56704cd6a3aeSmrg# Check to make sure the static flag actually works. 56714cd6a3aeSmrg# 56724cd6a3aeSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56734cd6a3aeSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56744cd6a3aeSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56754cd6a3aeSmrg $lt_tmp_static_flag, 56764cd6a3aeSmrg [], 56774cd6a3aeSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56784cd6a3aeSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56794cd6a3aeSmrg [Compiler flag to prevent dynamic linking]) 56804cd6a3aeSmrg])# _LT_COMPILER_PIC 56818c9fbc29Smrg 56828c9fbc29Smrg 56834cd6a3aeSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 56844cd6a3aeSmrg# ---------------------------- 56854cd6a3aeSmrg# See if the linker supports building shared libraries. 56864cd6a3aeSmrgm4_defun([_LT_LINKER_SHLIBS], 56874cd6a3aeSmrg[AC_REQUIRE([LT_PATH_LD])dnl 56884cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 56894cd6a3aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56904cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56914cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl 56924cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl 56934cd6a3aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56944cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl 56954cd6a3aeSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56964cd6a3aeSmrgm4_if([$1], [CXX], [ 56974cd6a3aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56984cd6a3aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56994cd6a3aeSmrg case $host_os in 57004cd6a3aeSmrg aix[[4-9]]*) 57014cd6a3aeSmrg # If we're using GNU nm, then we don't want the "-C" option. 57024cd6a3aeSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 57034cd6a3aeSmrg # Also, AIX nm treats weak defined symbols like other global defined 57044cd6a3aeSmrg # symbols, whereas GNU nm marks them as "W". 57054cd6a3aeSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 57064cd6a3aeSmrg _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' 57074cd6a3aeSmrg else 57084cd6a3aeSmrg _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' 57094e411241Smrg fi 57104e411241Smrg ;; 57114cd6a3aeSmrg pw32*) 57124cd6a3aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 57134cd6a3aeSmrg ;; 57144cd6a3aeSmrg cygwin* | mingw* | cegcc*) 57154cd6a3aeSmrg case $cc_basename in 571670728a38Smrg cl*) 571770728a38Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 571870728a38Smrg ;; 57194cd6a3aeSmrg *) 57204cd6a3aeSmrg _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' 57214cd6a3aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57224e411241Smrg ;; 57234e411241Smrg esac 57244cd6a3aeSmrg ;; 57254cd6a3aeSmrg *) 57264cd6a3aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57274cd6a3aeSmrg ;; 57284cd6a3aeSmrg esac 57294cd6a3aeSmrg], [ 57304cd6a3aeSmrg runpath_var= 57314cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 57324cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 57334cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)= 57344cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 57354cd6a3aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 57364cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 57374cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 57384cd6a3aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57394cd6a3aeSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 57404cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57414cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 57424cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57434cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 57444cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 57454cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 57464cd6a3aeSmrg _LT_TAGVAR(inherit_rpath, $1)=no 57474cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 57484cd6a3aeSmrg _LT_TAGVAR(module_cmds, $1)= 57494cd6a3aeSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 57504cd6a3aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 57514cd6a3aeSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 57524cd6a3aeSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57534cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57544cd6a3aeSmrg # include_expsyms should be a list of space-separated symbols to be *always* 57554cd6a3aeSmrg # included in the symbol list 57564cd6a3aeSmrg _LT_TAGVAR(include_expsyms, $1)= 57574cd6a3aeSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 57584cd6a3aeSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57594cd6a3aeSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57604cd6a3aeSmrg # as well as any symbol that contains `d'. 57614cd6a3aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57624cd6a3aeSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57634cd6a3aeSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 57644cd6a3aeSmrg # the symbol is explicitly referenced. Since portable code cannot 57654cd6a3aeSmrg # rely on this symbol name, it's probably fine to never include it in 57664cd6a3aeSmrg # preloaded symbol tables. 57674cd6a3aeSmrg # Exclude shared library initialization/finalization symbols. 57684cd6a3aeSmrgdnl Note also adjust exclude_expsyms for C++ above. 57694cd6a3aeSmrg extract_expsyms_cmds= 57704e411241Smrg 57714cd6a3aeSmrg case $host_os in 57724cd6a3aeSmrg cygwin* | mingw* | pw32* | cegcc*) 57734cd6a3aeSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57744cd6a3aeSmrg # When not using gcc, we currently assume that we are using 57754cd6a3aeSmrg # Microsoft Visual C++. 57764cd6a3aeSmrg if test "$GCC" != yes; then 57774cd6a3aeSmrg with_gnu_ld=no 57784e411241Smrg fi 57798c9fbc29Smrg ;; 57804cd6a3aeSmrg interix*) 57814cd6a3aeSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57824cd6a3aeSmrg with_gnu_ld=yes 57834cd6a3aeSmrg ;; 57844cd6a3aeSmrg openbsd*) 57854cd6a3aeSmrg with_gnu_ld=no 57864cd6a3aeSmrg ;; 57878c9fbc29Smrg esac 57888c9fbc29Smrg 57894cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 57908c9fbc29Smrg 57914cd6a3aeSmrg # On some targets, GNU ld is compatible enough with the native linker 57924cd6a3aeSmrg # that we're better off using the native interface for both. 57934cd6a3aeSmrg lt_use_gnu_ld_interface=no 57944cd6a3aeSmrg if test "$with_gnu_ld" = yes; then 57954cd6a3aeSmrg case $host_os in 57964cd6a3aeSmrg aix*) 57974cd6a3aeSmrg # The AIX port of GNU ld has always aspired to compatibility 57984cd6a3aeSmrg # with the native linker. However, as the warning in the GNU ld 57994cd6a3aeSmrg # block says, versions before 2.19.5* couldn't really create working 58004cd6a3aeSmrg # shared libraries, regardless of the interface used. 58014cd6a3aeSmrg case `$LD -v 2>&1` in 58024cd6a3aeSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 58034cd6a3aeSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 58044cd6a3aeSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 58054cd6a3aeSmrg *) 58064cd6a3aeSmrg lt_use_gnu_ld_interface=yes 58074cd6a3aeSmrg ;; 58084cd6a3aeSmrg esac 58094cd6a3aeSmrg ;; 58104cd6a3aeSmrg *) 58114cd6a3aeSmrg lt_use_gnu_ld_interface=yes 58124cd6a3aeSmrg ;; 58134cd6a3aeSmrg esac 58144cd6a3aeSmrg fi 58158c9fbc29Smrg 58164cd6a3aeSmrg if test "$lt_use_gnu_ld_interface" = yes; then 58174cd6a3aeSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 58184cd6a3aeSmrg wlarc='${wl}' 58198c9fbc29Smrg 58204cd6a3aeSmrg # Set some defaults for GNU ld with shared library support. These 58214cd6a3aeSmrg # are reset later if shared libraries are not supported. Putting them 58224cd6a3aeSmrg # here allows them to be overridden if necessary. 58234cd6a3aeSmrg runpath_var=LD_RUN_PATH 58244cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58254cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58264cd6a3aeSmrg # ancient GNU ld didn't support --whole-archive et. al. 58274cd6a3aeSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 58284cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 58294cd6a3aeSmrg else 58304cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58314cd6a3aeSmrg fi 58324cd6a3aeSmrg supports_anon_versioning=no 58334cd6a3aeSmrg case `$LD -v 2>&1` in 58344cd6a3aeSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 58354cd6a3aeSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 58364cd6a3aeSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 58374cd6a3aeSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 58384cd6a3aeSmrg *\ 2.11.*) ;; # other 2.11 versions 58394cd6a3aeSmrg *) supports_anon_versioning=yes ;; 58404cd6a3aeSmrg esac 58418c9fbc29Smrg 58424cd6a3aeSmrg # See if GNU ld supports shared libraries. 58434cd6a3aeSmrg case $host_os in 58444cd6a3aeSmrg aix[[3-9]]*) 58454cd6a3aeSmrg # On AIX/PPC, the GNU linker is very broken 58464cd6a3aeSmrg if test "$host_cpu" != ia64; then 58474cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58484cd6a3aeSmrg cat <<_LT_EOF 1>&2 58498c9fbc29Smrg 58504cd6a3aeSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 58514cd6a3aeSmrg*** to be unable to reliably create shared libraries on AIX. 58524cd6a3aeSmrg*** Therefore, libtool is disabling shared libraries support. If you 58534cd6a3aeSmrg*** really care for shared libraries, you may want to install binutils 58544cd6a3aeSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58554cd6a3aeSmrg*** You will then need to restart the configuration process. 58568c9fbc29Smrg 58574cd6a3aeSmrg_LT_EOF 58584cd6a3aeSmrg fi 58594cd6a3aeSmrg ;; 58608c9fbc29Smrg 58614cd6a3aeSmrg amigaos*) 58624cd6a3aeSmrg case $host_cpu in 58634cd6a3aeSmrg powerpc) 58644cd6a3aeSmrg # see comment about AmigaOS4 .so support 58654cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58664cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58674cd6a3aeSmrg ;; 58684cd6a3aeSmrg m68k) 58694cd6a3aeSmrg _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)' 58704cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58714cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58724cd6a3aeSmrg ;; 58734cd6a3aeSmrg esac 58744cd6a3aeSmrg ;; 58758c9fbc29Smrg 58764cd6a3aeSmrg beos*) 58774cd6a3aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58784cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58794cd6a3aeSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58804cd6a3aeSmrg # support --undefined. This deserves some investigation. FIXME 58814cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58824cd6a3aeSmrg else 58834cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58844cd6a3aeSmrg fi 58854cd6a3aeSmrg ;; 58868c9fbc29Smrg 58874cd6a3aeSmrg cygwin* | mingw* | pw32* | cegcc*) 58884cd6a3aeSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58894cd6a3aeSmrg # as there is no search path for DLLs. 58904cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58914cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58924cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58934cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 58944cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58954cd6a3aeSmrg _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' 58964cd6a3aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58974cd6a3aeSmrg 58984cd6a3aeSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58994cd6a3aeSmrg _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' 59004cd6a3aeSmrg # If the export-symbols file already is a .def file (1st line 59014cd6a3aeSmrg # is EXPORTS), use it as is; otherwise, prepend... 59024cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 59034cd6a3aeSmrg cp $export_symbols $output_objdir/$soname.def; 59044cd6a3aeSmrg else 59054cd6a3aeSmrg echo EXPORTS > $output_objdir/$soname.def; 59064cd6a3aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 59074cd6a3aeSmrg fi~ 59084cd6a3aeSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 59094cd6a3aeSmrg else 59104cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59114cd6a3aeSmrg fi 59124cd6a3aeSmrg ;; 59138c9fbc29Smrg 59144cd6a3aeSmrg haiku*) 59154cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59164cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59174cd6a3aeSmrg ;; 59188c9fbc29Smrg 59194cd6a3aeSmrg interix[[3-9]]*) 59204cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 59214cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59224cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59234cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 59244cd6a3aeSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 59254cd6a3aeSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 59264cd6a3aeSmrg # default) and relocated if they conflict, which is a slow very memory 59274cd6a3aeSmrg # consuming and fragmenting process. To avoid this, we pick a random, 59284cd6a3aeSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 59294cd6a3aeSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 59304cd6a3aeSmrg _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' 59314cd6a3aeSmrg _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' 59324cd6a3aeSmrg ;; 59338c9fbc29Smrg 59344cd6a3aeSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 59354cd6a3aeSmrg tmp_diet=no 59364cd6a3aeSmrg if test "$host_os" = linux-dietlibc; then 59374cd6a3aeSmrg case $cc_basename in 59384cd6a3aeSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 59394cd6a3aeSmrg esac 59404cd6a3aeSmrg fi 59414cd6a3aeSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 59424cd6a3aeSmrg && test "$tmp_diet" = no 59434cd6a3aeSmrg then 59444cd6a3aeSmrg tmp_addflag=' $pic_flag' 59454cd6a3aeSmrg tmp_sharedflag='-shared' 59464cd6a3aeSmrg case $cc_basename,$host_cpu in 59474cd6a3aeSmrg pgcc*) # Portland Group C compiler 59484cd6a3aeSmrg _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' 59494cd6a3aeSmrg tmp_addflag=' $pic_flag' 59504cd6a3aeSmrg ;; 59514cd6a3aeSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 59524cd6a3aeSmrg # Portland Group f77 and f90 compilers 59534cd6a3aeSmrg _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' 59544cd6a3aeSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 59554cd6a3aeSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59564cd6a3aeSmrg tmp_addflag=' -i_dynamic' ;; 59574cd6a3aeSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59584cd6a3aeSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59594cd6a3aeSmrg ifc* | ifort*) # Intel Fortran compiler 59604cd6a3aeSmrg tmp_addflag=' -nofor_main' ;; 59614cd6a3aeSmrg lf95*) # Lahey Fortran 8.1 59624cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59634cd6a3aeSmrg tmp_sharedflag='--shared' ;; 59644cd6a3aeSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59654cd6a3aeSmrg tmp_sharedflag='-qmkshrobj' 59664cd6a3aeSmrg tmp_addflag= ;; 59674cd6a3aeSmrg nvcc*) # Cuda Compiler Driver 2.2 59684cd6a3aeSmrg _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' 59694cd6a3aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59704cd6a3aeSmrg ;; 59714cd6a3aeSmrg esac 59724cd6a3aeSmrg case `$CC -V 2>&1 | sed 5q` in 59734cd6a3aeSmrg *Sun\ C*) # Sun C 5.9 59744cd6a3aeSmrg _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' 59754cd6a3aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59764cd6a3aeSmrg tmp_sharedflag='-G' ;; 59774cd6a3aeSmrg *Sun\ F*) # Sun Fortran 8.3 59784cd6a3aeSmrg tmp_sharedflag='-G' ;; 59794cd6a3aeSmrg esac 59804cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59818c9fbc29Smrg 59824cd6a3aeSmrg if test "x$supports_anon_versioning" = xyes; then 59834cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59844cd6a3aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59854cd6a3aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59864cd6a3aeSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59874cd6a3aeSmrg fi 59888c9fbc29Smrg 59894cd6a3aeSmrg case $cc_basename in 59904cd6a3aeSmrg xlf* | bgf* | bgxlf* | mpixlf*) 59914cd6a3aeSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59924cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 599370728a38Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59944cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59954cd6a3aeSmrg if test "x$supports_anon_versioning" = xyes; then 59964cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59974cd6a3aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59984cd6a3aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59994cd6a3aeSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 60004cd6a3aeSmrg fi 60014cd6a3aeSmrg ;; 60024cd6a3aeSmrg esac 60034cd6a3aeSmrg else 60044cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60054cd6a3aeSmrg fi 60064cd6a3aeSmrg ;; 60078c9fbc29Smrg 60084cd6a3aeSmrg netbsd*) 60094cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60104cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 60114cd6a3aeSmrg wlarc= 60124cd6a3aeSmrg else 60134cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60144cd6a3aeSmrg _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' 60154cd6a3aeSmrg fi 60164cd6a3aeSmrg ;; 60178c9fbc29Smrg 60184cd6a3aeSmrg solaris*) 60194cd6a3aeSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 60204cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60214cd6a3aeSmrg cat <<_LT_EOF 1>&2 60228c9fbc29Smrg 60234cd6a3aeSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 60244cd6a3aeSmrg*** create shared libraries on Solaris systems. Therefore, libtool 60254cd6a3aeSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 60264cd6a3aeSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 60274cd6a3aeSmrg*** your PATH or compiler configuration so that the native linker is 60284cd6a3aeSmrg*** used, and then restart. 60298c9fbc29Smrg 60304cd6a3aeSmrg_LT_EOF 60314cd6a3aeSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60324cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60334cd6a3aeSmrg _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' 60344cd6a3aeSmrg else 60354cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60364cd6a3aeSmrg fi 60374cd6a3aeSmrg ;; 60388c9fbc29Smrg 60394cd6a3aeSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 60404cd6a3aeSmrg case `$LD -v 2>&1` in 60414cd6a3aeSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 60424cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60434cd6a3aeSmrg cat <<_LT_EOF 1>&2 60448c9fbc29Smrg 60454cd6a3aeSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 60464cd6a3aeSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 60474cd6a3aeSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 60484cd6a3aeSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 60494cd6a3aeSmrg*** your PATH or compiler configuration so that the native linker is 60504cd6a3aeSmrg*** used, and then restart. 60518c9fbc29Smrg 60524cd6a3aeSmrg_LT_EOF 60534cd6a3aeSmrg ;; 60544cd6a3aeSmrg *) 60554cd6a3aeSmrg # For security reasons, it is highly recommended that you always 60564cd6a3aeSmrg # use absolute paths for naming shared libraries, and exclude the 60574cd6a3aeSmrg # DT_RUNPATH tag from executables and libraries. But doing so 60584cd6a3aeSmrg # requires that you compile everything twice, which is a pain. 60594cd6a3aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60604cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60614cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60624cd6a3aeSmrg _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' 60634cd6a3aeSmrg else 60644cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60654cd6a3aeSmrg fi 60664cd6a3aeSmrg ;; 60674cd6a3aeSmrg esac 60684cd6a3aeSmrg ;; 60698c9fbc29Smrg 60704cd6a3aeSmrg sunos4*) 60714cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60724cd6a3aeSmrg wlarc= 60734cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60744cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60754cd6a3aeSmrg ;; 60768c9fbc29Smrg 60774cd6a3aeSmrg *) 60784cd6a3aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60794cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60804cd6a3aeSmrg _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' 60814cd6a3aeSmrg else 60824cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60834cd6a3aeSmrg fi 60844cd6a3aeSmrg ;; 60854cd6a3aeSmrg esac 60868c9fbc29Smrg 60874cd6a3aeSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60884cd6a3aeSmrg runpath_var= 60894cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60904cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60914cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60924cd6a3aeSmrg fi 60934cd6a3aeSmrg else 60944cd6a3aeSmrg # PORTME fill in a description of your system's linker (not GNU ld) 60954cd6a3aeSmrg case $host_os in 60964cd6a3aeSmrg aix3*) 60974cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60984cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60994cd6a3aeSmrg _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' 61004cd6a3aeSmrg # Note: this linker hardcodes the directories in LIBPATH if there 61014cd6a3aeSmrg # are no directories specified by -L. 61024cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61034cd6a3aeSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 61044cd6a3aeSmrg # Neither direct hardcoding nor static linking is supported with a 61054cd6a3aeSmrg # broken collect2. 61064cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61074cd6a3aeSmrg fi 61084cd6a3aeSmrg ;; 61098c9fbc29Smrg 61104cd6a3aeSmrg aix[[4-9]]*) 61114cd6a3aeSmrg if test "$host_cpu" = ia64; then 61124cd6a3aeSmrg # On IA64, the linker does run time linking by default, so we don't 61134cd6a3aeSmrg # have to do anything special. 61144cd6a3aeSmrg aix_use_runtimelinking=no 61154cd6a3aeSmrg exp_sym_flag='-Bexport' 61164cd6a3aeSmrg no_entry_flag="" 61174cd6a3aeSmrg else 61184cd6a3aeSmrg # If we're using GNU nm, then we don't want the "-C" option. 61194cd6a3aeSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 61204cd6a3aeSmrg # Also, AIX nm treats weak defined symbols like other global 61214cd6a3aeSmrg # defined symbols, whereas GNU nm marks them as "W". 61224cd6a3aeSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 61234cd6a3aeSmrg _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' 61244cd6a3aeSmrg else 61254cd6a3aeSmrg _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' 61264cd6a3aeSmrg fi 61274cd6a3aeSmrg aix_use_runtimelinking=no 61288c9fbc29Smrg 61294cd6a3aeSmrg # Test if we are trying to use run time linking or normal 61304cd6a3aeSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 61314cd6a3aeSmrg # need to do runtime linking. 61324cd6a3aeSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 61334cd6a3aeSmrg for ld_flag in $LDFLAGS; do 61344cd6a3aeSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 61354cd6a3aeSmrg aix_use_runtimelinking=yes 61364cd6a3aeSmrg break 61374cd6a3aeSmrg fi 61384cd6a3aeSmrg done 61394cd6a3aeSmrg ;; 61404cd6a3aeSmrg esac 61418c9fbc29Smrg 61424cd6a3aeSmrg exp_sym_flag='-bexport' 61434cd6a3aeSmrg no_entry_flag='-bnoentry' 61444cd6a3aeSmrg fi 61458c9fbc29Smrg 61464cd6a3aeSmrg # When large executables or shared objects are built, AIX ld can 61474cd6a3aeSmrg # have problems creating the table of contents. If linking a library 61484cd6a3aeSmrg # or program results in "error TOC overflow" add -mminimal-toc to 61494cd6a3aeSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 61504cd6a3aeSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 61518c9fbc29Smrg 61524cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='' 61534cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 61544cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61554cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61564cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61574cd6a3aeSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 61588c9fbc29Smrg 61594cd6a3aeSmrg if test "$GCC" = yes; then 61604cd6a3aeSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61614cd6a3aeSmrg # We only want to do this on AIX 4.2 and lower, the check 61624cd6a3aeSmrg # below for broken collect2 doesn't work under 4.3+ 61634cd6a3aeSmrg collect2name=`${CC} -print-prog-name=collect2` 61644cd6a3aeSmrg if test -f "$collect2name" && 61654cd6a3aeSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61664cd6a3aeSmrg then 61674cd6a3aeSmrg # We have reworked collect2 61684cd6a3aeSmrg : 61694cd6a3aeSmrg else 61704cd6a3aeSmrg # We have old collect2 61714cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61724cd6a3aeSmrg # It fails to find uninstalled libraries when the uninstalled 61734cd6a3aeSmrg # path is not listed in the libpath. Setting hardcode_minus_L 61744cd6a3aeSmrg # to unsupported forces relinking 61754cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61764cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61774cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61784cd6a3aeSmrg fi 61794cd6a3aeSmrg ;; 61804cd6a3aeSmrg esac 61814cd6a3aeSmrg shared_flag='-shared' 61824cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 61834cd6a3aeSmrg shared_flag="$shared_flag "'${wl}-G' 61844cd6a3aeSmrg fi 61854cd6a3aeSmrg else 61864cd6a3aeSmrg # not using gcc 61874cd6a3aeSmrg if test "$host_cpu" = ia64; then 61884cd6a3aeSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61894cd6a3aeSmrg # chokes on -Wl,-G. The following line is correct: 61904cd6a3aeSmrg shared_flag='-G' 61914cd6a3aeSmrg else 61924cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 61934cd6a3aeSmrg shared_flag='${wl}-G' 61944cd6a3aeSmrg else 61954cd6a3aeSmrg shared_flag='${wl}-bM:SRE' 61964cd6a3aeSmrg fi 61974cd6a3aeSmrg fi 61984cd6a3aeSmrg fi 61998c9fbc29Smrg 62004cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 62014cd6a3aeSmrg # It seems that -bexpall does not export symbols beginning with 62024cd6a3aeSmrg # underscore (_), so it is better to generate a list of symbols to export. 62034cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 62044cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 62054cd6a3aeSmrg # Warning - without using the other runtime loading flags (-brtl), 62064cd6a3aeSmrg # -berok will link without error, but may produce a broken library. 62074cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 62084cd6a3aeSmrg # Determine the default libpath from the value encoded in an 62094cd6a3aeSmrg # empty executable. 62104cd6a3aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 62114cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62124cd6a3aeSmrg _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" 62134cd6a3aeSmrg else 62144cd6a3aeSmrg if test "$host_cpu" = ia64; then 62154cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 62164cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 62174cd6a3aeSmrg _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" 62184cd6a3aeSmrg else 62194cd6a3aeSmrg # Determine the default libpath from the value encoded in an 62204cd6a3aeSmrg # empty executable. 62214cd6a3aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 62224cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62234cd6a3aeSmrg # Warning - without using the other run time loading flags, 62244cd6a3aeSmrg # -berok will link without error, but may produce a broken library. 62254cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 62264cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 62274cd6a3aeSmrg if test "$with_gnu_ld" = yes; then 62284cd6a3aeSmrg # We only use this code for GNU lds that support --whole-archive. 62294cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 62304cd6a3aeSmrg else 62314cd6a3aeSmrg # Exported symbols can be pulled into shared objects from archives 62324cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 62334cd6a3aeSmrg fi 62344cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62354cd6a3aeSmrg # This is similar to how AIX traditionally builds its shared libraries. 62364cd6a3aeSmrg _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' 62374cd6a3aeSmrg fi 62384cd6a3aeSmrg fi 62394cd6a3aeSmrg ;; 62408c9fbc29Smrg 62414cd6a3aeSmrg amigaos*) 62424cd6a3aeSmrg case $host_cpu in 62434cd6a3aeSmrg powerpc) 62444cd6a3aeSmrg # see comment about AmigaOS4 .so support 62454cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62464cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 62474cd6a3aeSmrg ;; 62484cd6a3aeSmrg m68k) 62494cd6a3aeSmrg _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)' 62504cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62514cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62524cd6a3aeSmrg ;; 62534cd6a3aeSmrg esac 62544cd6a3aeSmrg ;; 62558c9fbc29Smrg 62564cd6a3aeSmrg bsdi[[45]]*) 62574cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62584cd6a3aeSmrg ;; 62598c9fbc29Smrg 62604cd6a3aeSmrg cygwin* | mingw* | pw32* | cegcc*) 62614cd6a3aeSmrg # When not using gcc, we currently assume that we are using 62624cd6a3aeSmrg # Microsoft Visual C++. 62634cd6a3aeSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62644cd6a3aeSmrg # no search path for DLLs. 62654cd6a3aeSmrg case $cc_basename in 62664cd6a3aeSmrg cl*) 62674cd6a3aeSmrg # Native MSVC 62684cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62694cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62704cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 62714cd6a3aeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 62724cd6a3aeSmrg # Tell ltmain to make .lib files, not .a files. 62734cd6a3aeSmrg libext=lib 62744cd6a3aeSmrg # Tell ltmain to make .dll files, not .so files. 62754cd6a3aeSmrg shrext_cmds=".dll" 62764cd6a3aeSmrg # FIXME: Setting linknames here is a bad hack. 62774cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62784cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62794cd6a3aeSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62804cd6a3aeSmrg else 62814cd6a3aeSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62824cd6a3aeSmrg fi~ 62834cd6a3aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62844cd6a3aeSmrg linknames=' 62854cd6a3aeSmrg # The linker will not automatically build a static lib if we build a DLL. 62864cd6a3aeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62874cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 628870728a38Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 62894cd6a3aeSmrg _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' 62904cd6a3aeSmrg # Don't use ranlib 62914cd6a3aeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62924cd6a3aeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62934cd6a3aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62944cd6a3aeSmrg case $lt_outputfile in 62954cd6a3aeSmrg *.exe|*.EXE) ;; 62964cd6a3aeSmrg *) 62974cd6a3aeSmrg lt_outputfile="$lt_outputfile.exe" 62984cd6a3aeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62994cd6a3aeSmrg ;; 63004cd6a3aeSmrg esac~ 63014cd6a3aeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 63024cd6a3aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 63034cd6a3aeSmrg $RM "$lt_outputfile.manifest"; 63044cd6a3aeSmrg fi' 63054cd6a3aeSmrg ;; 63064cd6a3aeSmrg *) 63074cd6a3aeSmrg # Assume MSVC wrapper 63084cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 63094cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 63104cd6a3aeSmrg # Tell ltmain to make .lib files, not .a files. 63114cd6a3aeSmrg libext=lib 63124cd6a3aeSmrg # Tell ltmain to make .dll files, not .so files. 63134cd6a3aeSmrg shrext_cmds=".dll" 63144cd6a3aeSmrg # FIXME: Setting linknames here is a bad hack. 63154cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 63164cd6a3aeSmrg # The linker will automatically build a .lib file if we build a DLL. 63174cd6a3aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 63184cd6a3aeSmrg # FIXME: Should let the user specify the lib program. 63194cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 63204cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 63214cd6a3aeSmrg ;; 63224cd6a3aeSmrg esac 63234cd6a3aeSmrg ;; 63248c9fbc29Smrg 63254cd6a3aeSmrg darwin* | rhapsody*) 63264cd6a3aeSmrg _LT_DARWIN_LINKER_FEATURES($1) 63274cd6a3aeSmrg ;; 63288c9fbc29Smrg 63294cd6a3aeSmrg dgux*) 63304cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 633170728a38Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 633270728a38Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63334cd6a3aeSmrg ;; 63348c9fbc29Smrg 63354cd6a3aeSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63364cd6a3aeSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 63374cd6a3aeSmrg # does not break anything, and helps significantly (at the cost of a little 63384cd6a3aeSmrg # extra space). 63394cd6a3aeSmrg freebsd2.2*) 63404cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63414cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63424cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63434cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63448c9fbc29Smrg ;; 63454cd6a3aeSmrg 63464cd6a3aeSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 634770728a38Smrg freebsd2.*) 63484cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63494cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63504cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63514cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63528c9fbc29Smrg ;; 63538c9fbc29Smrg 63544cd6a3aeSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63554cd6a3aeSmrg freebsd* | dragonfly*) 63564cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63574cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63584cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63594cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63604cd6a3aeSmrg ;; 63618c9fbc29Smrg 63624cd6a3aeSmrg hpux9*) 63634cd6a3aeSmrg if test "$GCC" = yes; then 63644cd6a3aeSmrg _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' 63654cd6a3aeSmrg else 63664cd6a3aeSmrg _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' 63674cd6a3aeSmrg fi 63684cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63694cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63704cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63718c9fbc29Smrg 63724cd6a3aeSmrg # hardcode_minus_L: Not really in the search PATH, 63734cd6a3aeSmrg # but as the default location of the library. 63744cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63754cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63764cd6a3aeSmrg ;; 63778c9fbc29Smrg 63784cd6a3aeSmrg hpux10*) 63794cd6a3aeSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63804cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63814cd6a3aeSmrg else 63824cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63834cd6a3aeSmrg fi 63844cd6a3aeSmrg if test "$with_gnu_ld" = no; then 63854cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63864cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63874cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63884cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63894cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63904cd6a3aeSmrg # hardcode_minus_L: Not really in the search PATH, 63914cd6a3aeSmrg # but as the default location of the library. 63924cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63934cd6a3aeSmrg fi 63944cd6a3aeSmrg ;; 63958c9fbc29Smrg 63964cd6a3aeSmrg hpux11*) 63974cd6a3aeSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63984cd6a3aeSmrg case $host_cpu in 63994cd6a3aeSmrg hppa*64*) 64004cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64014cd6a3aeSmrg ;; 64024cd6a3aeSmrg ia64*) 64034cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64044cd6a3aeSmrg ;; 64054cd6a3aeSmrg *) 64064cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 64074cd6a3aeSmrg ;; 64084cd6a3aeSmrg esac 64094cd6a3aeSmrg else 64104cd6a3aeSmrg case $host_cpu in 64114cd6a3aeSmrg hppa*64*) 64124cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64134cd6a3aeSmrg ;; 64144cd6a3aeSmrg ia64*) 64154cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64164cd6a3aeSmrg ;; 64174cd6a3aeSmrg *) 64184cd6a3aeSmrg m4_if($1, [], [ 64194cd6a3aeSmrg # Older versions of the 11.00 compiler do not understand -b yet 64204cd6a3aeSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64214cd6a3aeSmrg _LT_LINKER_OPTION([if $CC understands -b], 64224cd6a3aeSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64234cd6a3aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64244cd6a3aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64254cd6a3aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64264cd6a3aeSmrg ;; 64274cd6a3aeSmrg esac 64284cd6a3aeSmrg fi 64294cd6a3aeSmrg if test "$with_gnu_ld" = no; then 64304cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64314cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64328c9fbc29Smrg 64334cd6a3aeSmrg case $host_cpu in 64344cd6a3aeSmrg hppa*64*|ia64*) 64354cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 64364cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64374cd6a3aeSmrg ;; 64384cd6a3aeSmrg *) 64394cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 64404cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64414cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64428c9fbc29Smrg 64434cd6a3aeSmrg # hardcode_minus_L: Not really in the search PATH, 64444cd6a3aeSmrg # but as the default location of the library. 64454cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64464cd6a3aeSmrg ;; 64474cd6a3aeSmrg esac 64484cd6a3aeSmrg fi 64494cd6a3aeSmrg ;; 64508c9fbc29Smrg 64514cd6a3aeSmrg irix5* | irix6* | nonstopux*) 64524cd6a3aeSmrg if test "$GCC" = yes; then 64534cd6a3aeSmrg _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' 64544cd6a3aeSmrg # Try to use the -exported_symbol ld option, if it does not 64554cd6a3aeSmrg # work, assume that -exports_file does not work either and 64564cd6a3aeSmrg # implicitly export all symbols. 64574cd6a3aeSmrg # This should be the same for all languages, so no per-tag cache variable. 64584cd6a3aeSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64594cd6a3aeSmrg [lt_cv_irix_exported_symbol], 64604cd6a3aeSmrg [save_LDFLAGS="$LDFLAGS" 64614cd6a3aeSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64624cd6a3aeSmrg AC_LINK_IFELSE( 64634cd6a3aeSmrg [AC_LANG_SOURCE( 64644cd6a3aeSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64654cd6a3aeSmrg [C++], [[int foo (void) { return 0; }]], 64664cd6a3aeSmrg [Fortran 77], [[ 64674cd6a3aeSmrg subroutine foo 64684cd6a3aeSmrg end]], 64694cd6a3aeSmrg [Fortran], [[ 64704cd6a3aeSmrg subroutine foo 64714cd6a3aeSmrg end]])])], 64724cd6a3aeSmrg [lt_cv_irix_exported_symbol=yes], 64734cd6a3aeSmrg [lt_cv_irix_exported_symbol=no]) 64744cd6a3aeSmrg LDFLAGS="$save_LDFLAGS"]) 64754cd6a3aeSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 64764cd6a3aeSmrg _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' 64774cd6a3aeSmrg fi 64784cd6a3aeSmrg else 64794cd6a3aeSmrg _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' 64804cd6a3aeSmrg _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' 64814cd6a3aeSmrg fi 64824cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64834cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64844cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64854cd6a3aeSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 64864cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64874cd6a3aeSmrg ;; 64888c9fbc29Smrg 64894cd6a3aeSmrg netbsd*) 64904cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64914cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64924cd6a3aeSmrg else 64934cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64944cd6a3aeSmrg fi 64954cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64964cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 64974cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64984cd6a3aeSmrg ;; 64998c9fbc29Smrg 65004cd6a3aeSmrg newsos6) 65014cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65024cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65034cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65044cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65054cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65064cd6a3aeSmrg ;; 65078c9fbc29Smrg 65084cd6a3aeSmrg *nto* | *qnx*) 65094cd6a3aeSmrg ;; 65108c9fbc29Smrg 65114cd6a3aeSmrg openbsd*) 65124cd6a3aeSmrg if test -f /usr/libexec/ld.so; then 65134cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65144cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65154cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65164cd6a3aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65174cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65184cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65194cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65204cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65214cd6a3aeSmrg else 65224cd6a3aeSmrg case $host_os in 65234cd6a3aeSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65244cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65254cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65264cd6a3aeSmrg ;; 65274cd6a3aeSmrg *) 65284cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65294cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65304cd6a3aeSmrg ;; 65314cd6a3aeSmrg esac 65324cd6a3aeSmrg fi 65334cd6a3aeSmrg else 65344cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65354cd6a3aeSmrg fi 65364cd6a3aeSmrg ;; 65378c9fbc29Smrg 65384cd6a3aeSmrg os2*) 65394cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65404cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65414cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65424cd6a3aeSmrg _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' 65434cd6a3aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65444cd6a3aeSmrg ;; 65458c9fbc29Smrg 65464cd6a3aeSmrg osf3*) 65474cd6a3aeSmrg if test "$GCC" = yes; then 65484cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65494cd6a3aeSmrg _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' 65504cd6a3aeSmrg else 65514cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65524cd6a3aeSmrg _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' 65534cd6a3aeSmrg fi 65544cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65554cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65564cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65574cd6a3aeSmrg ;; 65588c9fbc29Smrg 65594cd6a3aeSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65604cd6a3aeSmrg if test "$GCC" = yes; then 65614cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65624cd6a3aeSmrg _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' 65634cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65644cd6a3aeSmrg else 65654cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65664cd6a3aeSmrg _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' 65674cd6a3aeSmrg _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~ 65684cd6a3aeSmrg $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' 65698c9fbc29Smrg 65704cd6a3aeSmrg # Both c and cxx compiler support -rpath directly 65714cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65724cd6a3aeSmrg fi 65734cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65744cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65754cd6a3aeSmrg ;; 65768c9fbc29Smrg 65774cd6a3aeSmrg solaris*) 65784cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65794cd6a3aeSmrg if test "$GCC" = yes; then 65804cd6a3aeSmrg wlarc='${wl}' 65814cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65824cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65834cd6a3aeSmrg $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' 65844cd6a3aeSmrg else 65854cd6a3aeSmrg case `$CC -V 2>&1` in 65864cd6a3aeSmrg *"Compilers 5.0"*) 65874cd6a3aeSmrg wlarc='' 65884cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65894cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65904cd6a3aeSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65914cd6a3aeSmrg ;; 65924cd6a3aeSmrg *) 65934cd6a3aeSmrg wlarc='${wl}' 65944cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65954cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65964cd6a3aeSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65974cd6a3aeSmrg ;; 65984cd6a3aeSmrg esac 65994cd6a3aeSmrg fi 66004cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 66014cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66024cd6a3aeSmrg case $host_os in 66034cd6a3aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66044cd6a3aeSmrg *) 66054cd6a3aeSmrg # The compiler driver will combine and reorder linker options, 66064cd6a3aeSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66074cd6a3aeSmrg # but is careful enough not to reorder. 66084cd6a3aeSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66094cd6a3aeSmrg if test "$GCC" = yes; then 66104cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66114cd6a3aeSmrg else 66124cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66134cd6a3aeSmrg fi 66144cd6a3aeSmrg ;; 66154cd6a3aeSmrg esac 66164cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66174cd6a3aeSmrg ;; 66188c9fbc29Smrg 66194cd6a3aeSmrg sunos4*) 66204cd6a3aeSmrg if test "x$host_vendor" = xsequent; then 66214cd6a3aeSmrg # Use $CC to link under sequent, because it throws in some extra .o 66224cd6a3aeSmrg # files that make .init and .fini sections work. 66234cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66244cd6a3aeSmrg else 66254cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 66264cd6a3aeSmrg fi 66274cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66284cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 66294cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66304cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66314cd6a3aeSmrg ;; 66328c9fbc29Smrg 66334cd6a3aeSmrg sysv4) 66344cd6a3aeSmrg case $host_vendor in 66354cd6a3aeSmrg sni) 66364cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66374cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66384cd6a3aeSmrg ;; 66394cd6a3aeSmrg siemens) 66404cd6a3aeSmrg ## LD is ld it makes a PLAMLIB 66414cd6a3aeSmrg ## CC just makes a GrossModule. 66424cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66434cd6a3aeSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66444cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 66454cd6a3aeSmrg ;; 66464cd6a3aeSmrg motorola) 66474cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66484cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66494cd6a3aeSmrg ;; 66504cd6a3aeSmrg esac 66514cd6a3aeSmrg runpath_var='LD_RUN_PATH' 66524cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66534cd6a3aeSmrg ;; 66548c9fbc29Smrg 66554cd6a3aeSmrg sysv4.3*) 66564cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66574cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66584cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66594cd6a3aeSmrg ;; 66608c9fbc29Smrg 66614cd6a3aeSmrg sysv4*MP*) 66624cd6a3aeSmrg if test -d /usr/nec; then 66634cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66644cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66654cd6a3aeSmrg runpath_var=LD_RUN_PATH 66664cd6a3aeSmrg hardcode_runpath_var=yes 66674cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 66684cd6a3aeSmrg fi 66694cd6a3aeSmrg ;; 66708c9fbc29Smrg 66714cd6a3aeSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66724cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66734cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66744cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66754cd6a3aeSmrg runpath_var='LD_RUN_PATH' 66768c9fbc29Smrg 66774cd6a3aeSmrg if test "$GCC" = yes; then 66784cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66794cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66804cd6a3aeSmrg else 66814cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66824cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66834cd6a3aeSmrg fi 66844cd6a3aeSmrg ;; 66858c9fbc29Smrg 66864cd6a3aeSmrg sysv5* | sco3.2v5* | sco5v6*) 66874cd6a3aeSmrg # Note: We can NOT use -z defs as we might desire, because we do not 66884cd6a3aeSmrg # link with -lc, and that would cause any symbols used from libc to 66894cd6a3aeSmrg # always be unresolved, which means just about no library would 66904cd6a3aeSmrg # ever link correctly. If we're not using GNU ld we use -z text 66914cd6a3aeSmrg # though, which does catch some bad symbols but isn't as heavy-handed 66924cd6a3aeSmrg # as -z defs. 66934cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66944cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66954cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66964cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66974cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66984cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66994cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67004cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 67014cd6a3aeSmrg runpath_var='LD_RUN_PATH' 67028c9fbc29Smrg 67034cd6a3aeSmrg if test "$GCC" = yes; then 67044cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67054cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67064cd6a3aeSmrg else 67074cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67084cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67094cd6a3aeSmrg fi 67104cd6a3aeSmrg ;; 67118c9fbc29Smrg 67124cd6a3aeSmrg uts4*) 67134cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67144cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67154cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67164cd6a3aeSmrg ;; 67178c9fbc29Smrg 67184cd6a3aeSmrg *) 67194cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67204cd6a3aeSmrg ;; 67214cd6a3aeSmrg esac 67228c9fbc29Smrg 67234cd6a3aeSmrg if test x$host_vendor = xsni; then 67244cd6a3aeSmrg case $host in 67254cd6a3aeSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67264cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67274cd6a3aeSmrg ;; 67284cd6a3aeSmrg esac 67294cd6a3aeSmrg fi 67304cd6a3aeSmrg fi 67314cd6a3aeSmrg]) 67324cd6a3aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67334cd6a3aeSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 67348c9fbc29Smrg 67354cd6a3aeSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 67368c9fbc29Smrg 67374cd6a3aeSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67384cd6a3aeSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67394cd6a3aeSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 67404cd6a3aeSmrg [The commands to extract the exported symbol list from a shared archive]) 67418c9fbc29Smrg 67424cd6a3aeSmrg# 67434cd6a3aeSmrg# Do we need to explicitly link libc? 67444cd6a3aeSmrg# 67454cd6a3aeSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67464cd6a3aeSmrgx|xyes) 67474cd6a3aeSmrg # Assume -lc should be added 67484cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67498c9fbc29Smrg 67504cd6a3aeSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67514cd6a3aeSmrg case $_LT_TAGVAR(archive_cmds, $1) in 67524cd6a3aeSmrg *'~'*) 67534cd6a3aeSmrg # FIXME: we may have to deal with multi-command sequences. 67544cd6a3aeSmrg ;; 67554cd6a3aeSmrg '$CC '*) 67564cd6a3aeSmrg # Test whether the compiler implicitly links with -lc since on some 67574cd6a3aeSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67584cd6a3aeSmrg # to ld, don't add -lc before -lgcc. 67594cd6a3aeSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67604cd6a3aeSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67614cd6a3aeSmrg [$RM conftest* 67624cd6a3aeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67634cd6a3aeSmrg 67644cd6a3aeSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67654cd6a3aeSmrg soname=conftest 67664cd6a3aeSmrg lib=conftest 67674cd6a3aeSmrg libobjs=conftest.$ac_objext 67684cd6a3aeSmrg deplibs= 67694cd6a3aeSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67704cd6a3aeSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67714cd6a3aeSmrg compiler_flags=-v 67724cd6a3aeSmrg linker_flags=-v 67734cd6a3aeSmrg verstring= 67744cd6a3aeSmrg output_objdir=. 67754cd6a3aeSmrg libname=conftest 67764cd6a3aeSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67774cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 67784cd6a3aeSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67794cd6a3aeSmrg then 67804cd6a3aeSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67814cd6a3aeSmrg else 67824cd6a3aeSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67834cd6a3aeSmrg fi 67844cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67854cd6a3aeSmrg else 67864cd6a3aeSmrg cat conftest.err 1>&5 67874cd6a3aeSmrg fi 67884cd6a3aeSmrg $RM conftest* 67894cd6a3aeSmrg ]) 67904cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 67914cd6a3aeSmrg ;; 67924cd6a3aeSmrg esac 67934cd6a3aeSmrg fi 67944cd6a3aeSmrg ;; 67954cd6a3aeSmrgesac 67968c9fbc29Smrg 67974cd6a3aeSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67984cd6a3aeSmrg [Whether or not to add -lc for building shared libraries]) 67994cd6a3aeSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 68004cd6a3aeSmrg [enable_shared_with_static_runtimes], [0], 68014cd6a3aeSmrg [Whether or not to disallow shared libs when runtime libs are static]) 68024cd6a3aeSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68034cd6a3aeSmrg [Compiler flag to allow reflexive dlopens]) 68044cd6a3aeSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68054cd6a3aeSmrg [Compiler flag to generate shared objects directly from archives]) 68064cd6a3aeSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 68074cd6a3aeSmrg [Whether the compiler copes with passing no objects directly]) 68084cd6a3aeSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68094cd6a3aeSmrg [Create an old-style archive from a shared archive]) 68104cd6a3aeSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68114cd6a3aeSmrg [Create a temporary old-style archive to link instead of a shared archive]) 68124cd6a3aeSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68134cd6a3aeSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68144cd6a3aeSmrg_LT_TAGDECL([], [module_cmds], [2], 68154cd6a3aeSmrg [Commands used to build a loadable module if different from building 68164cd6a3aeSmrg a shared archive.]) 68174cd6a3aeSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68184cd6a3aeSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 68194cd6a3aeSmrg [Whether we are building with GNU ld or not]) 68204cd6a3aeSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68214cd6a3aeSmrg [Flag that allows shared libraries with undefined symbols to be built]) 68224cd6a3aeSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 68234cd6a3aeSmrg [Flag that enforces no undefined symbols]) 68244cd6a3aeSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68254cd6a3aeSmrg [Flag to hardcode $libdir into a binary during linking. 68264cd6a3aeSmrg This must work even if $libdir does not exist]) 68274cd6a3aeSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68284cd6a3aeSmrg [Whether we need a single "-rpath" flag with a separated argument]) 68294cd6a3aeSmrg_LT_TAGDECL([], [hardcode_direct], [0], 68304cd6a3aeSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68314cd6a3aeSmrg DIR into the resulting binary]) 68324cd6a3aeSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68334cd6a3aeSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68344cd6a3aeSmrg DIR into the resulting binary and the resulting library dependency is 68354cd6a3aeSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68364cd6a3aeSmrg library is relocated]) 68374cd6a3aeSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68384cd6a3aeSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68394cd6a3aeSmrg into the resulting binary]) 68404cd6a3aeSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68414cd6a3aeSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68424cd6a3aeSmrg into the resulting binary]) 68434cd6a3aeSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 68444cd6a3aeSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 68454cd6a3aeSmrg into the library and all subsequent libraries and executables linked 68464cd6a3aeSmrg against it]) 68474cd6a3aeSmrg_LT_TAGDECL([], [inherit_rpath], [0], 68484cd6a3aeSmrg [Set to yes if linker adds runtime paths of dependent libraries 68494cd6a3aeSmrg to runtime path list]) 68504cd6a3aeSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 68514cd6a3aeSmrg [Whether libtool must link a program against all its dependency libraries]) 68524cd6a3aeSmrg_LT_TAGDECL([], [always_export_symbols], [0], 68534cd6a3aeSmrg [Set to "yes" if exported symbols are required]) 68544cd6a3aeSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68554cd6a3aeSmrg [The commands to list exported symbols]) 68564cd6a3aeSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 68574cd6a3aeSmrg [Symbols that should not be listed in the preloaded symbols]) 68584cd6a3aeSmrg_LT_TAGDECL([], [include_expsyms], [1], 68594cd6a3aeSmrg [Symbols that must always be exported]) 68604cd6a3aeSmrg_LT_TAGDECL([], [prelink_cmds], [2], 68614cd6a3aeSmrg [Commands necessary for linking programs (against libraries) with templates]) 68624cd6a3aeSmrg_LT_TAGDECL([], [postlink_cmds], [2], 68634cd6a3aeSmrg [Commands necessary for finishing linking programs]) 68644cd6a3aeSmrg_LT_TAGDECL([], [file_list_spec], [1], 68654cd6a3aeSmrg [Specify filename containing input files]) 68664cd6a3aeSmrgdnl FIXME: Not yet implemented 68674cd6a3aeSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68684cd6a3aeSmrgdnl [Compiler flag to generate thread safe objects]) 68694cd6a3aeSmrg])# _LT_LINKER_SHLIBS 68704cd6a3aeSmrg 68714cd6a3aeSmrg 68724cd6a3aeSmrg# _LT_LANG_C_CONFIG([TAG]) 68734cd6a3aeSmrg# ------------------------ 68744cd6a3aeSmrg# Ensure that the configuration variables for a C compiler are suitably 68754cd6a3aeSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 68764cd6a3aeSmrg# the compiler configuration to `libtool'. 68774cd6a3aeSmrgm4_defun([_LT_LANG_C_CONFIG], 68784cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])dnl 68794cd6a3aeSmrglt_save_CC="$CC" 68804cd6a3aeSmrgAC_LANG_PUSH(C) 68818c9fbc29Smrg 68824cd6a3aeSmrg# Source file extension for C test sources. 68834cd6a3aeSmrgac_ext=c 68848c9fbc29Smrg 68854cd6a3aeSmrg# Object file extension for compiled C test sources. 68864cd6a3aeSmrgobjext=o 68874cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 68888c9fbc29Smrg 68894cd6a3aeSmrg# Code to be used in simple compile tests 68904cd6a3aeSmrglt_simple_compile_test_code="int some_variable = 0;" 68918c9fbc29Smrg 68924cd6a3aeSmrg# Code to be used in simple link tests 68934cd6a3aeSmrglt_simple_link_test_code='int main(){return(0);}' 68948c9fbc29Smrg 68954cd6a3aeSmrg_LT_TAG_COMPILER 68964cd6a3aeSmrg# Save the default compiler, since it gets overwritten when the other 68974cd6a3aeSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68984cd6a3aeSmrgcompiler_DEFAULT=$CC 68998c9fbc29Smrg 69004cd6a3aeSmrg# save warnings/boilerplate of simple test code 69014cd6a3aeSmrg_LT_COMPILER_BOILERPLATE 69024cd6a3aeSmrg_LT_LINKER_BOILERPLATE 69038c9fbc29Smrg 69044cd6a3aeSmrgif test -n "$compiler"; then 69054cd6a3aeSmrg _LT_COMPILER_NO_RTTI($1) 69064cd6a3aeSmrg _LT_COMPILER_PIC($1) 69074cd6a3aeSmrg _LT_COMPILER_C_O($1) 69084cd6a3aeSmrg _LT_COMPILER_FILE_LOCKS($1) 69094cd6a3aeSmrg _LT_LINKER_SHLIBS($1) 69104cd6a3aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 69114cd6a3aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 69124cd6a3aeSmrg LT_SYS_DLOPEN_SELF 69134cd6a3aeSmrg _LT_CMD_STRIPLIB 69144cd6a3aeSmrg 69154cd6a3aeSmrg # Report which library types will actually be built 69164cd6a3aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69174cd6a3aeSmrg AC_MSG_RESULT([$can_build_shared]) 69184cd6a3aeSmrg 69194cd6a3aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 69204cd6a3aeSmrg test "$can_build_shared" = "no" && enable_shared=no 69214cd6a3aeSmrg 69224cd6a3aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 69234cd6a3aeSmrg # are all built from PIC. 69244cd6a3aeSmrg case $host_os in 69254cd6a3aeSmrg aix3*) 69264cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 69274cd6a3aeSmrg if test -n "$RANLIB"; then 69284cd6a3aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69294cd6a3aeSmrg postinstall_cmds='$RANLIB $lib' 69304cd6a3aeSmrg fi 69314cd6a3aeSmrg ;; 69328c9fbc29Smrg 69334cd6a3aeSmrg aix[[4-9]]*) 69344cd6a3aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69354cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 69364cd6a3aeSmrg fi 69374cd6a3aeSmrg ;; 69384cd6a3aeSmrg esac 69394cd6a3aeSmrg AC_MSG_RESULT([$enable_shared]) 69408c9fbc29Smrg 69414cd6a3aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 69424cd6a3aeSmrg # Make sure either enable_shared or enable_static is yes. 69434cd6a3aeSmrg test "$enable_shared" = yes || enable_static=yes 69444cd6a3aeSmrg AC_MSG_RESULT([$enable_static]) 69458c9fbc29Smrg 69464cd6a3aeSmrg _LT_CONFIG($1) 69474cd6a3aeSmrgfi 69484cd6a3aeSmrgAC_LANG_POP 69494cd6a3aeSmrgCC="$lt_save_CC" 69504cd6a3aeSmrg])# _LT_LANG_C_CONFIG 69518c9fbc29Smrg 69528c9fbc29Smrg 69534cd6a3aeSmrg# _LT_LANG_CXX_CONFIG([TAG]) 69544cd6a3aeSmrg# -------------------------- 69554cd6a3aeSmrg# Ensure that the configuration variables for a C++ compiler are suitably 69564cd6a3aeSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 69574cd6a3aeSmrg# the compiler configuration to `libtool'. 69584cd6a3aeSmrgm4_defun([_LT_LANG_CXX_CONFIG], 69594cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69604cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl 69614cd6a3aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69624cd6a3aeSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69634cd6a3aeSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69644cd6a3aeSmrg (test "X$CXX" != "Xg++"))) ; then 69654cd6a3aeSmrg AC_PROG_CXXCPP 69664cd6a3aeSmrgelse 69674cd6a3aeSmrg _lt_caught_CXX_error=yes 69684cd6a3aeSmrgfi 69698c9fbc29Smrg 69704cd6a3aeSmrgAC_LANG_PUSH(C++) 69714cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69724cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 69734cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 69744cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69754cd6a3aeSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 69764cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69774cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 69784cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69794cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69804cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69814cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69824cd6a3aeSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69834cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 69844cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 69854cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)= 69864cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 69874cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69884cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69894cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69904cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69914cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 69924cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69934cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 69948c9fbc29Smrg 69954cd6a3aeSmrg# Source file extension for C++ test sources. 69964cd6a3aeSmrgac_ext=cpp 69978c9fbc29Smrg 69984cd6a3aeSmrg# Object file extension for compiled C++ test sources. 69994cd6a3aeSmrgobjext=o 70004cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 70014cd6a3aeSmrg 70024cd6a3aeSmrg# No sense in running all these tests if we already determined that 70034cd6a3aeSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 70044cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform, 70054cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler. 70064cd6a3aeSmrgif test "$_lt_caught_CXX_error" != yes; then 70074cd6a3aeSmrg # Code to be used in simple compile tests 70084cd6a3aeSmrg lt_simple_compile_test_code="int some_variable = 0;" 70094cd6a3aeSmrg 70104cd6a3aeSmrg # Code to be used in simple link tests 70114cd6a3aeSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70124cd6a3aeSmrg 70134cd6a3aeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 70144cd6a3aeSmrg _LT_TAG_COMPILER 70154cd6a3aeSmrg 70164cd6a3aeSmrg # save warnings/boilerplate of simple test code 70174cd6a3aeSmrg _LT_COMPILER_BOILERPLATE 70184cd6a3aeSmrg _LT_LINKER_BOILERPLATE 70194cd6a3aeSmrg 70204cd6a3aeSmrg # Allow CC to be a program name with arguments. 70214cd6a3aeSmrg lt_save_CC=$CC 70224cd6a3aeSmrg lt_save_CFLAGS=$CFLAGS 70234cd6a3aeSmrg lt_save_LD=$LD 70244cd6a3aeSmrg lt_save_GCC=$GCC 70254cd6a3aeSmrg GCC=$GXX 70264cd6a3aeSmrg lt_save_with_gnu_ld=$with_gnu_ld 70274cd6a3aeSmrg lt_save_path_LD=$lt_cv_path_LD 70284cd6a3aeSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70294cd6a3aeSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70304cd6a3aeSmrg else 70314cd6a3aeSmrg $as_unset lt_cv_prog_gnu_ld 70324cd6a3aeSmrg fi 70334cd6a3aeSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 70344cd6a3aeSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 70354cd6a3aeSmrg else 70364cd6a3aeSmrg $as_unset lt_cv_path_LD 70374cd6a3aeSmrg fi 70384cd6a3aeSmrg test -z "${LDCXX+set}" || LD=$LDCXX 70394cd6a3aeSmrg CC=${CXX-"c++"} 70404cd6a3aeSmrg CFLAGS=$CXXFLAGS 70414cd6a3aeSmrg compiler=$CC 70424cd6a3aeSmrg _LT_TAGVAR(compiler, $1)=$CC 70434cd6a3aeSmrg _LT_CC_BASENAME([$compiler]) 70448c9fbc29Smrg 70454cd6a3aeSmrg if test -n "$compiler"; then 70464cd6a3aeSmrg # We don't want -fno-exception when compiling C++ code, so set the 70474cd6a3aeSmrg # no_builtin_flag separately 70484cd6a3aeSmrg if test "$GXX" = yes; then 70494cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70504cd6a3aeSmrg else 70514cd6a3aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70524cd6a3aeSmrg fi 70538c9fbc29Smrg 70544cd6a3aeSmrg if test "$GXX" = yes; then 70554cd6a3aeSmrg # Set up default GNU C++ configuration 70568c9fbc29Smrg 70574cd6a3aeSmrg LT_PATH_LD 70588c9fbc29Smrg 70594cd6a3aeSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70604cd6a3aeSmrg # archiving commands below assume that GNU ld is being used. 70614cd6a3aeSmrg if test "$with_gnu_ld" = yes; then 70624cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70634cd6a3aeSmrg _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' 70648c9fbc29Smrg 70654cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70664cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 70678c9fbc29Smrg 70684cd6a3aeSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 70694cd6a3aeSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70704cd6a3aeSmrg # investigate it a little bit more. (MM) 70714cd6a3aeSmrg wlarc='${wl}' 70728c9fbc29Smrg 70734cd6a3aeSmrg # ancient GNU ld didn't support --whole-archive et. al. 70744cd6a3aeSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70754cd6a3aeSmrg $GREP 'no-whole-archive' > /dev/null; then 70764cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70774cd6a3aeSmrg else 70784cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70794cd6a3aeSmrg fi 70804cd6a3aeSmrg else 70814cd6a3aeSmrg with_gnu_ld=no 70824cd6a3aeSmrg wlarc= 70834cd6a3aeSmrg 70844cd6a3aeSmrg # A generic and very simple default shared library creation 70854cd6a3aeSmrg # command for GNU C++ for the case where it uses the native 70864cd6a3aeSmrg # linker, instead of GNU ld. If possible, this setting should 70874cd6a3aeSmrg # overridden to take advantage of the native linker features on 70884cd6a3aeSmrg # the platform it is being used on. 70894cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70904cd6a3aeSmrg fi 70918c9fbc29Smrg 70924cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 70934cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 70944cd6a3aeSmrg # linking a shared library. 70954cd6a3aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70968c9fbc29Smrg 70974cd6a3aeSmrg else 70984cd6a3aeSmrg GXX=no 70994cd6a3aeSmrg with_gnu_ld=no 71004cd6a3aeSmrg wlarc= 71014cd6a3aeSmrg fi 71028c9fbc29Smrg 71034cd6a3aeSmrg # PORTME: fill in a description of your system's C++ link characteristics 71044cd6a3aeSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71054cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71064cd6a3aeSmrg case $host_os in 71074cd6a3aeSmrg aix3*) 71084cd6a3aeSmrg # FIXME: insert proper C++ library support 71094cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71104cd6a3aeSmrg ;; 71114cd6a3aeSmrg aix[[4-9]]*) 71124cd6a3aeSmrg if test "$host_cpu" = ia64; then 71134cd6a3aeSmrg # On IA64, the linker does run time linking by default, so we don't 71144cd6a3aeSmrg # have to do anything special. 71154cd6a3aeSmrg aix_use_runtimelinking=no 71164cd6a3aeSmrg exp_sym_flag='-Bexport' 71174cd6a3aeSmrg no_entry_flag="" 71184cd6a3aeSmrg else 71194cd6a3aeSmrg aix_use_runtimelinking=no 71204cd6a3aeSmrg 71214cd6a3aeSmrg # Test if we are trying to use run time linking or normal 71224cd6a3aeSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71234cd6a3aeSmrg # need to do runtime linking. 71244cd6a3aeSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71254cd6a3aeSmrg for ld_flag in $LDFLAGS; do 71264cd6a3aeSmrg case $ld_flag in 71274cd6a3aeSmrg *-brtl*) 71284cd6a3aeSmrg aix_use_runtimelinking=yes 71294cd6a3aeSmrg break 71304cd6a3aeSmrg ;; 71314cd6a3aeSmrg esac 71324cd6a3aeSmrg done 71334cd6a3aeSmrg ;; 71344cd6a3aeSmrg esac 71358c9fbc29Smrg 71364cd6a3aeSmrg exp_sym_flag='-bexport' 71374cd6a3aeSmrg no_entry_flag='-bnoentry' 71384cd6a3aeSmrg fi 71398c9fbc29Smrg 71404cd6a3aeSmrg # When large executables or shared objects are built, AIX ld can 71414cd6a3aeSmrg # have problems creating the table of contents. If linking a library 71424cd6a3aeSmrg # or program results in "error TOC overflow" add -mminimal-toc to 71434cd6a3aeSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71444cd6a3aeSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71454cd6a3aeSmrg 71464cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='' 71474cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71484cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71494cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71504cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71514cd6a3aeSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71524cd6a3aeSmrg 71534cd6a3aeSmrg if test "$GXX" = yes; then 71544cd6a3aeSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71554cd6a3aeSmrg # We only want to do this on AIX 4.2 and lower, the check 71564cd6a3aeSmrg # below for broken collect2 doesn't work under 4.3+ 71574cd6a3aeSmrg collect2name=`${CC} -print-prog-name=collect2` 71584cd6a3aeSmrg if test -f "$collect2name" && 71594cd6a3aeSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71604cd6a3aeSmrg then 71614cd6a3aeSmrg # We have reworked collect2 71624cd6a3aeSmrg : 71634cd6a3aeSmrg else 71644cd6a3aeSmrg # We have old collect2 71654cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71664cd6a3aeSmrg # It fails to find uninstalled libraries when the uninstalled 71674cd6a3aeSmrg # path is not listed in the libpath. Setting hardcode_minus_L 71684cd6a3aeSmrg # to unsupported forces relinking 71694cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71704cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71714cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71724cd6a3aeSmrg fi 71734cd6a3aeSmrg esac 71744cd6a3aeSmrg shared_flag='-shared' 71754cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 71764cd6a3aeSmrg shared_flag="$shared_flag "'${wl}-G' 71774cd6a3aeSmrg fi 71784cd6a3aeSmrg else 71794cd6a3aeSmrg # not using gcc 71804cd6a3aeSmrg if test "$host_cpu" = ia64; then 71814cd6a3aeSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71824cd6a3aeSmrg # chokes on -Wl,-G. The following line is correct: 71834cd6a3aeSmrg shared_flag='-G' 71844cd6a3aeSmrg else 71854cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 71864cd6a3aeSmrg shared_flag='${wl}-G' 71874cd6a3aeSmrg else 71884cd6a3aeSmrg shared_flag='${wl}-bM:SRE' 71894cd6a3aeSmrg fi 71904cd6a3aeSmrg fi 71914cd6a3aeSmrg fi 71928c9fbc29Smrg 71934cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71944cd6a3aeSmrg # It seems that -bexpall does not export symbols beginning with 71954cd6a3aeSmrg # underscore (_), so it is better to generate a list of symbols to 71964cd6a3aeSmrg # export. 71974cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 71984cd6a3aeSmrg if test "$aix_use_runtimelinking" = yes; then 71994cd6a3aeSmrg # Warning - without using the other runtime loading flags (-brtl), 72004cd6a3aeSmrg # -berok will link without error, but may produce a broken library. 72014cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 72024cd6a3aeSmrg # Determine the default libpath from the value encoded in an empty 72034cd6a3aeSmrg # executable. 72044cd6a3aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 72054cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72064cd6a3aeSmrg 72074cd6a3aeSmrg _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" 72084cd6a3aeSmrg else 72094cd6a3aeSmrg if test "$host_cpu" = ia64; then 72104cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72114cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72124cd6a3aeSmrg _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" 72134cd6a3aeSmrg else 72144cd6a3aeSmrg # Determine the default libpath from the value encoded in an 72154cd6a3aeSmrg # empty executable. 72164cd6a3aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 72174cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72184cd6a3aeSmrg # Warning - without using the other run time loading flags, 72194cd6a3aeSmrg # -berok will link without error, but may produce a broken library. 72204cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72214cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72224cd6a3aeSmrg if test "$with_gnu_ld" = yes; then 72234cd6a3aeSmrg # We only use this code for GNU lds that support --whole-archive. 72244cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72254cd6a3aeSmrg else 72264cd6a3aeSmrg # Exported symbols can be pulled into shared objects from archives 72274cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72284cd6a3aeSmrg fi 72294cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72304cd6a3aeSmrg # This is similar to how AIX traditionally builds its shared 72314cd6a3aeSmrg # libraries. 72324cd6a3aeSmrg _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' 72334cd6a3aeSmrg fi 72344cd6a3aeSmrg fi 72354cd6a3aeSmrg ;; 72364e411241Smrg 72374cd6a3aeSmrg beos*) 72384cd6a3aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72394cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72404cd6a3aeSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72414cd6a3aeSmrg # support --undefined. This deserves some investigation. FIXME 72424cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72434cd6a3aeSmrg else 72444cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72454cd6a3aeSmrg fi 72464cd6a3aeSmrg ;; 72478c9fbc29Smrg 72484cd6a3aeSmrg chorus*) 72494cd6a3aeSmrg case $cc_basename in 72504cd6a3aeSmrg *) 72514cd6a3aeSmrg # FIXME: insert proper C++ library support 72524cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72534cd6a3aeSmrg ;; 72544cd6a3aeSmrg esac 72554cd6a3aeSmrg ;; 72568c9fbc29Smrg 72574cd6a3aeSmrg cygwin* | mingw* | pw32* | cegcc*) 72584cd6a3aeSmrg case $GXX,$cc_basename in 72594cd6a3aeSmrg ,cl* | no,cl*) 72604cd6a3aeSmrg # Native MSVC 72614cd6a3aeSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72624cd6a3aeSmrg # no search path for DLLs. 72634cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72644cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72654cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 72664cd6a3aeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 72674cd6a3aeSmrg # Tell ltmain to make .lib files, not .a files. 72684cd6a3aeSmrg libext=lib 72694cd6a3aeSmrg # Tell ltmain to make .dll files, not .so files. 72704cd6a3aeSmrg shrext_cmds=".dll" 72714cd6a3aeSmrg # FIXME: Setting linknames here is a bad hack. 72724cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72734cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72744cd6a3aeSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72754cd6a3aeSmrg else 72764cd6a3aeSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72774cd6a3aeSmrg fi~ 72784cd6a3aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72794cd6a3aeSmrg linknames=' 72804cd6a3aeSmrg # The linker will not automatically build a static lib if we build a DLL. 72814cd6a3aeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72824cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72834cd6a3aeSmrg # Don't use ranlib 72844cd6a3aeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72854cd6a3aeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72864cd6a3aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72874cd6a3aeSmrg case $lt_outputfile in 72884cd6a3aeSmrg *.exe|*.EXE) ;; 72894cd6a3aeSmrg *) 72904cd6a3aeSmrg lt_outputfile="$lt_outputfile.exe" 72914cd6a3aeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72924cd6a3aeSmrg ;; 72934cd6a3aeSmrg esac~ 72944cd6a3aeSmrg func_to_tool_file "$lt_outputfile"~ 72954cd6a3aeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72964cd6a3aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72974cd6a3aeSmrg $RM "$lt_outputfile.manifest"; 72984cd6a3aeSmrg fi' 72994cd6a3aeSmrg ;; 73004cd6a3aeSmrg *) 73014cd6a3aeSmrg # g++ 73024cd6a3aeSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 73034cd6a3aeSmrg # as there is no search path for DLLs. 73044cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73054cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 73064cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 73074cd6a3aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 73084cd6a3aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 73094cd6a3aeSmrg 73104cd6a3aeSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 73114cd6a3aeSmrg _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' 73124cd6a3aeSmrg # If the export-symbols file already is a .def file (1st line 73134cd6a3aeSmrg # is EXPORTS), use it as is; otherwise, prepend... 73144cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 73154cd6a3aeSmrg cp $export_symbols $output_objdir/$soname.def; 73164cd6a3aeSmrg else 73174cd6a3aeSmrg echo EXPORTS > $output_objdir/$soname.def; 73184cd6a3aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 73194cd6a3aeSmrg fi~ 73204cd6a3aeSmrg $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' 73214cd6a3aeSmrg else 73224cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73234cd6a3aeSmrg fi 73244cd6a3aeSmrg ;; 73254cd6a3aeSmrg esac 73264cd6a3aeSmrg ;; 73274cd6a3aeSmrg darwin* | rhapsody*) 73284cd6a3aeSmrg _LT_DARWIN_LINKER_FEATURES($1) 73294cd6a3aeSmrg ;; 73308c9fbc29Smrg 73314cd6a3aeSmrg dgux*) 73324cd6a3aeSmrg case $cc_basename in 73334cd6a3aeSmrg ec++*) 73344cd6a3aeSmrg # FIXME: insert proper C++ library support 73354cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73364cd6a3aeSmrg ;; 73374cd6a3aeSmrg ghcx*) 73384cd6a3aeSmrg # Green Hills C++ Compiler 73394cd6a3aeSmrg # FIXME: insert proper C++ library support 73404cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73414cd6a3aeSmrg ;; 73424cd6a3aeSmrg *) 73434cd6a3aeSmrg # FIXME: insert proper C++ library support 73444cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73454cd6a3aeSmrg ;; 73464cd6a3aeSmrg esac 73474cd6a3aeSmrg ;; 73488c9fbc29Smrg 734970728a38Smrg freebsd2.*) 73504cd6a3aeSmrg # C++ shared libraries reported to be fairly broken before 73514cd6a3aeSmrg # switch to ELF 73524cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73534cd6a3aeSmrg ;; 73548c9fbc29Smrg 73554cd6a3aeSmrg freebsd-elf*) 73564cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73574cd6a3aeSmrg ;; 73588c9fbc29Smrg 73594cd6a3aeSmrg freebsd* | dragonfly*) 73604cd6a3aeSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73614cd6a3aeSmrg # conventions 73624cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 73634cd6a3aeSmrg ;; 73648c9fbc29Smrg 73654cd6a3aeSmrg gnu*) 73664cd6a3aeSmrg ;; 73678c9fbc29Smrg 73684cd6a3aeSmrg haiku*) 73694cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73704cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73714cd6a3aeSmrg ;; 73728c9fbc29Smrg 73734cd6a3aeSmrg hpux9*) 73744cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73754cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73764cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73774cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 73784cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73794cd6a3aeSmrg # but as the default 73804cd6a3aeSmrg # location of the library. 73814cd6a3aeSmrg 73824cd6a3aeSmrg case $cc_basename in 73834cd6a3aeSmrg CC*) 73844cd6a3aeSmrg # FIXME: insert proper C++ library support 73854cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73864cd6a3aeSmrg ;; 73874cd6a3aeSmrg aCC*) 73884cd6a3aeSmrg _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' 73894cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 73904cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 73914cd6a3aeSmrg # linking a shared library. 73924cd6a3aeSmrg # 73934cd6a3aeSmrg # There doesn't appear to be a way to prevent this compiler from 73944cd6a3aeSmrg # explicitly linking system object files so we need to strip them 73954cd6a3aeSmrg # from the output so that they don't get included in the library 73964cd6a3aeSmrg # dependencies. 73974cd6a3aeSmrg 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"' 73984cd6a3aeSmrg ;; 73994cd6a3aeSmrg *) 74004cd6a3aeSmrg if test "$GXX" = yes; then 74014cd6a3aeSmrg _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' 74024cd6a3aeSmrg else 74034cd6a3aeSmrg # FIXME: insert proper C++ library support 74044cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74054cd6a3aeSmrg fi 74064cd6a3aeSmrg ;; 74074cd6a3aeSmrg esac 74084cd6a3aeSmrg ;; 74098c9fbc29Smrg 74104cd6a3aeSmrg hpux10*|hpux11*) 74114cd6a3aeSmrg if test $with_gnu_ld = no; then 74124cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74134cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74144cd6a3aeSmrg 74154cd6a3aeSmrg case $host_cpu in 74164cd6a3aeSmrg hppa*64*|ia64*) 74174cd6a3aeSmrg ;; 74184cd6a3aeSmrg *) 74194cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74204cd6a3aeSmrg ;; 74214cd6a3aeSmrg esac 74224cd6a3aeSmrg fi 74234cd6a3aeSmrg case $host_cpu in 74244cd6a3aeSmrg hppa*64*|ia64*) 74254cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 74264cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74274cd6a3aeSmrg ;; 74284cd6a3aeSmrg *) 74294cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 74304cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74314cd6a3aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74324cd6a3aeSmrg # but as the default 74334cd6a3aeSmrg # location of the library. 74344cd6a3aeSmrg ;; 74354cd6a3aeSmrg esac 74364cd6a3aeSmrg 74374cd6a3aeSmrg case $cc_basename in 74384cd6a3aeSmrg CC*) 74394cd6a3aeSmrg # FIXME: insert proper C++ library support 74404cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74414cd6a3aeSmrg ;; 74424cd6a3aeSmrg aCC*) 74434cd6a3aeSmrg case $host_cpu in 74444cd6a3aeSmrg hppa*64*) 74454cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74464cd6a3aeSmrg ;; 74474cd6a3aeSmrg ia64*) 74484cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74494cd6a3aeSmrg ;; 74504cd6a3aeSmrg *) 74514cd6a3aeSmrg _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' 74524cd6a3aeSmrg ;; 74534cd6a3aeSmrg esac 74544cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 74554cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 74564cd6a3aeSmrg # linking a shared library. 74574cd6a3aeSmrg # 74584cd6a3aeSmrg # There doesn't appear to be a way to prevent this compiler from 74594cd6a3aeSmrg # explicitly linking system object files so we need to strip them 74604cd6a3aeSmrg # from the output so that they don't get included in the library 74614cd6a3aeSmrg # dependencies. 74624cd6a3aeSmrg 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"' 74634cd6a3aeSmrg ;; 74644cd6a3aeSmrg *) 74654cd6a3aeSmrg if test "$GXX" = yes; then 74664cd6a3aeSmrg if test $with_gnu_ld = no; then 74674cd6a3aeSmrg case $host_cpu in 74684cd6a3aeSmrg hppa*64*) 74694cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74704cd6a3aeSmrg ;; 74714cd6a3aeSmrg ia64*) 74724cd6a3aeSmrg _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' 74734cd6a3aeSmrg ;; 74744cd6a3aeSmrg *) 74754cd6a3aeSmrg _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' 74764cd6a3aeSmrg ;; 74774cd6a3aeSmrg esac 74784cd6a3aeSmrg fi 74794cd6a3aeSmrg else 74804cd6a3aeSmrg # FIXME: insert proper C++ library support 74814cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74824cd6a3aeSmrg fi 74834cd6a3aeSmrg ;; 74844cd6a3aeSmrg esac 74854cd6a3aeSmrg ;; 74868c9fbc29Smrg 74874cd6a3aeSmrg interix[[3-9]]*) 74884cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 74894cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74904cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74914cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74924cd6a3aeSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74934cd6a3aeSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74944cd6a3aeSmrg # default) and relocated if they conflict, which is a slow very memory 74954cd6a3aeSmrg # consuming and fragmenting process. To avoid this, we pick a random, 74964cd6a3aeSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74974cd6a3aeSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74984cd6a3aeSmrg _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' 74994cd6a3aeSmrg _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' 75004cd6a3aeSmrg ;; 75014cd6a3aeSmrg irix5* | irix6*) 75024cd6a3aeSmrg case $cc_basename in 75034cd6a3aeSmrg CC*) 75044cd6a3aeSmrg # SGI C++ 75054cd6a3aeSmrg _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' 75064cd6a3aeSmrg 75074cd6a3aeSmrg # Archives containing C++ object files must be created using 75084cd6a3aeSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75094cd6a3aeSmrg # necessary to make sure instantiated templates are included 75104cd6a3aeSmrg # in the archive. 75114cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75124cd6a3aeSmrg ;; 75134cd6a3aeSmrg *) 75144cd6a3aeSmrg if test "$GXX" = yes; then 75154cd6a3aeSmrg if test "$with_gnu_ld" = no; then 75164cd6a3aeSmrg _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' 75174cd6a3aeSmrg else 75184cd6a3aeSmrg _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' 75194cd6a3aeSmrg fi 75204cd6a3aeSmrg fi 75214cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75224cd6a3aeSmrg ;; 75234cd6a3aeSmrg esac 75244cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75254cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75264cd6a3aeSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 75274cd6a3aeSmrg ;; 75288c9fbc29Smrg 75294cd6a3aeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75304cd6a3aeSmrg case $cc_basename in 75314cd6a3aeSmrg KCC*) 75324cd6a3aeSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 75338c9fbc29Smrg 75344cd6a3aeSmrg # KCC will only create a shared library if the output file 75354cd6a3aeSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75364cd6a3aeSmrg # to its proper name (with version) after linking. 75374cd6a3aeSmrg _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' 75384cd6a3aeSmrg _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' 75394cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 75404cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 75414cd6a3aeSmrg # linking a shared library. 75424cd6a3aeSmrg # 75434cd6a3aeSmrg # There doesn't appear to be a way to prevent this compiler from 75444cd6a3aeSmrg # explicitly linking system object files so we need to strip them 75454cd6a3aeSmrg # from the output so that they don't get included in the library 75464cd6a3aeSmrg # dependencies. 75474cd6a3aeSmrg 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"' 75484cd6a3aeSmrg 75494cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75504cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75514cd6a3aeSmrg 75524cd6a3aeSmrg # Archives containing C++ object files must be created using 75534cd6a3aeSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75544cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75554cd6a3aeSmrg ;; 75564cd6a3aeSmrg icpc* | ecpc* ) 75574cd6a3aeSmrg # Intel C++ 75584cd6a3aeSmrg with_gnu_ld=yes 75594cd6a3aeSmrg # version 8.0 and above of icpc choke on multiply defined symbols 75604cd6a3aeSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75614cd6a3aeSmrg # earlier do not add the objects themselves. 75624cd6a3aeSmrg case `$CC -V 2>&1` in 75634cd6a3aeSmrg *"Version 7."*) 75644cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75654cd6a3aeSmrg _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' 75664cd6a3aeSmrg ;; 75674cd6a3aeSmrg *) # Version 8.0 or newer 75684cd6a3aeSmrg tmp_idyn= 75694cd6a3aeSmrg case $host_cpu in 75704cd6a3aeSmrg ia64*) tmp_idyn=' -i_dynamic';; 75714cd6a3aeSmrg esac 75724cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75734cd6a3aeSmrg _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' 75744cd6a3aeSmrg ;; 75754cd6a3aeSmrg esac 75764cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75774cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75784cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75794cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75804cd6a3aeSmrg ;; 75814cd6a3aeSmrg pgCC* | pgcpp*) 75824cd6a3aeSmrg # Portland Group C++ compiler 75834cd6a3aeSmrg case `$CC -V` in 75844cd6a3aeSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75854cd6a3aeSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75864cd6a3aeSmrg rm -rf $tpldir~ 75874cd6a3aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75884cd6a3aeSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75894cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75904cd6a3aeSmrg rm -rf $tpldir~ 75914cd6a3aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75924cd6a3aeSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75934cd6a3aeSmrg $RANLIB $oldlib' 75944cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75954cd6a3aeSmrg rm -rf $tpldir~ 75964cd6a3aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75974cd6a3aeSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75984cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75994cd6a3aeSmrg rm -rf $tpldir~ 76004cd6a3aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 76014cd6a3aeSmrg $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' 76024cd6a3aeSmrg ;; 76034cd6a3aeSmrg *) # Version 6 and above use weak symbols 76044cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76054cd6a3aeSmrg _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' 76064cd6a3aeSmrg ;; 76074cd6a3aeSmrg esac 76088c9fbc29Smrg 76094cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76104cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76114cd6a3aeSmrg _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' 76124cd6a3aeSmrg ;; 76134cd6a3aeSmrg cxx*) 76144cd6a3aeSmrg # Compaq C++ 76154cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76164cd6a3aeSmrg _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' 76178c9fbc29Smrg 76184cd6a3aeSmrg runpath_var=LD_RUN_PATH 76194cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76204cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76218c9fbc29Smrg 76224cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 76234cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 76244cd6a3aeSmrg # linking a shared library. 76254cd6a3aeSmrg # 76264cd6a3aeSmrg # There doesn't appear to be a way to prevent this compiler from 76274cd6a3aeSmrg # explicitly linking system object files so we need to strip them 76284cd6a3aeSmrg # from the output so that they don't get included in the library 76294cd6a3aeSmrg # dependencies. 76304cd6a3aeSmrg 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' 76314cd6a3aeSmrg ;; 76324cd6a3aeSmrg xl* | mpixl* | bgxl*) 76334cd6a3aeSmrg # IBM XL 8.0 on PPC, with GNU ld 76344cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76354cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76364cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76374cd6a3aeSmrg if test "x$supports_anon_versioning" = xyes; then 76384cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76394cd6a3aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76404cd6a3aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76414cd6a3aeSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76424cd6a3aeSmrg fi 76434cd6a3aeSmrg ;; 76444cd6a3aeSmrg *) 76454cd6a3aeSmrg case `$CC -V 2>&1 | sed 5q` in 76464cd6a3aeSmrg *Sun\ C*) 76474cd6a3aeSmrg # Sun C++ 5.9 76484cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76494cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76504cd6a3aeSmrg _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' 76514cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76524cd6a3aeSmrg _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' 76534cd6a3aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76544cd6a3aeSmrg 76554cd6a3aeSmrg # Not sure whether something based on 76564cd6a3aeSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76574cd6a3aeSmrg # would be better. 76584cd6a3aeSmrg output_verbose_link_cmd='func_echo_all' 76594cd6a3aeSmrg 76604cd6a3aeSmrg # Archives containing C++ object files must be created using 76614cd6a3aeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76624cd6a3aeSmrg # necessary to make sure instantiated templates are included 76634cd6a3aeSmrg # in the archive. 76644cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76654cd6a3aeSmrg ;; 76664cd6a3aeSmrg esac 76674cd6a3aeSmrg ;; 76684cd6a3aeSmrg esac 76694cd6a3aeSmrg ;; 76708c9fbc29Smrg 76714cd6a3aeSmrg lynxos*) 76724cd6a3aeSmrg # FIXME: insert proper C++ library support 76734cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76744cd6a3aeSmrg ;; 76758c9fbc29Smrg 76764cd6a3aeSmrg m88k*) 76774cd6a3aeSmrg # FIXME: insert proper C++ library support 76784cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76794cd6a3aeSmrg ;; 76808c9fbc29Smrg 76814cd6a3aeSmrg mvs*) 76824cd6a3aeSmrg case $cc_basename in 76834cd6a3aeSmrg cxx*) 76844cd6a3aeSmrg # FIXME: insert proper C++ library support 76854cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76864cd6a3aeSmrg ;; 76874cd6a3aeSmrg *) 76884cd6a3aeSmrg # FIXME: insert proper C++ library support 76894cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76904cd6a3aeSmrg ;; 76914cd6a3aeSmrg esac 76924cd6a3aeSmrg ;; 76938c9fbc29Smrg 76944cd6a3aeSmrg netbsd*) 76954cd6a3aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76964cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76974cd6a3aeSmrg wlarc= 76984cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76994cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 77004cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77014cd6a3aeSmrg fi 77024cd6a3aeSmrg # Workaround some broken pre-1.5 toolchains 77034cd6a3aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 77044cd6a3aeSmrg ;; 77058c9fbc29Smrg 77064cd6a3aeSmrg *nto* | *qnx*) 77074cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 77084cd6a3aeSmrg ;; 77098c9fbc29Smrg 77104cd6a3aeSmrg openbsd2*) 77114cd6a3aeSmrg # C++ shared libraries are fairly broken 77124cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77134cd6a3aeSmrg ;; 77148c9fbc29Smrg 77154cd6a3aeSmrg openbsd*) 77164cd6a3aeSmrg if test -f /usr/libexec/ld.so; then 77174cd6a3aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 77184cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77194cd6a3aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 77204cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 77214cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77224cd6a3aeSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 77234cd6a3aeSmrg _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' 77244cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77254cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 77264cd6a3aeSmrg fi 77274cd6a3aeSmrg output_verbose_link_cmd=func_echo_all 77284cd6a3aeSmrg else 77294cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77304cd6a3aeSmrg fi 77314cd6a3aeSmrg ;; 77328c9fbc29Smrg 77334cd6a3aeSmrg osf3* | osf4* | osf5*) 77344cd6a3aeSmrg case $cc_basename in 77354cd6a3aeSmrg KCC*) 77364cd6a3aeSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 77374cd6a3aeSmrg 77384cd6a3aeSmrg # KCC will only create a shared library if the output file 77394cd6a3aeSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 77404cd6a3aeSmrg # to its proper name (with version) after linking. 77414cd6a3aeSmrg _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' 77424cd6a3aeSmrg 77434cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77444cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77454cd6a3aeSmrg 77464cd6a3aeSmrg # Archives containing C++ object files must be created using 77474cd6a3aeSmrg # the KAI C++ compiler. 77484cd6a3aeSmrg case $host in 77494cd6a3aeSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77504cd6a3aeSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77514cd6a3aeSmrg esac 77524cd6a3aeSmrg ;; 77534cd6a3aeSmrg RCC*) 77544cd6a3aeSmrg # Rational C++ 2.4.1 77554cd6a3aeSmrg # FIXME: insert proper C++ library support 77564cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77574cd6a3aeSmrg ;; 77584cd6a3aeSmrg cxx*) 77594cd6a3aeSmrg case $host in 77604cd6a3aeSmrg osf3*) 77614cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77624cd6a3aeSmrg _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' 77634cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77644cd6a3aeSmrg ;; 77654cd6a3aeSmrg *) 77664cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77674cd6a3aeSmrg _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' 77684cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77694cd6a3aeSmrg echo "-hidden">> $lib.exp~ 77704cd6a3aeSmrg $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~ 77714cd6a3aeSmrg $RM $lib.exp' 77724cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77734cd6a3aeSmrg ;; 77744cd6a3aeSmrg esac 77758c9fbc29Smrg 77764cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77778c9fbc29Smrg 77784cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 77794cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 77804cd6a3aeSmrg # linking a shared library. 77814cd6a3aeSmrg # 77824cd6a3aeSmrg # There doesn't appear to be a way to prevent this compiler from 77834cd6a3aeSmrg # explicitly linking system object files so we need to strip them 77844cd6a3aeSmrg # from the output so that they don't get included in the library 77854cd6a3aeSmrg # dependencies. 77864cd6a3aeSmrg 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"' 77874cd6a3aeSmrg ;; 77884cd6a3aeSmrg *) 77894cd6a3aeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77904cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77914cd6a3aeSmrg case $host in 77924cd6a3aeSmrg osf3*) 77934cd6a3aeSmrg _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' 77944cd6a3aeSmrg ;; 77954cd6a3aeSmrg *) 77964cd6a3aeSmrg _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' 77974cd6a3aeSmrg ;; 77984cd6a3aeSmrg esac 77994cd6a3aeSmrg 78004cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 78014cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 78024cd6a3aeSmrg 78034cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 78044cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 78054cd6a3aeSmrg # linking a shared library. 78064cd6a3aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78074cd6a3aeSmrg 78084cd6a3aeSmrg else 78094cd6a3aeSmrg # FIXME: insert proper C++ library support 78104cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78114cd6a3aeSmrg fi 78124cd6a3aeSmrg ;; 78134cd6a3aeSmrg esac 78144cd6a3aeSmrg ;; 78158c9fbc29Smrg 78164cd6a3aeSmrg psos*) 78174cd6a3aeSmrg # FIXME: insert proper C++ library support 78184cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78194cd6a3aeSmrg ;; 78208c9fbc29Smrg 78214cd6a3aeSmrg sunos4*) 78224cd6a3aeSmrg case $cc_basename in 78234cd6a3aeSmrg CC*) 78244cd6a3aeSmrg # Sun C++ 4.x 78254cd6a3aeSmrg # FIXME: insert proper C++ library support 78264cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78274cd6a3aeSmrg ;; 78284cd6a3aeSmrg lcc*) 78294cd6a3aeSmrg # Lucid 78304cd6a3aeSmrg # FIXME: insert proper C++ library support 78314cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78324cd6a3aeSmrg ;; 78334cd6a3aeSmrg *) 78344cd6a3aeSmrg # FIXME: insert proper C++ library support 78354cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78364cd6a3aeSmrg ;; 78374cd6a3aeSmrg esac 78384cd6a3aeSmrg ;; 78398c9fbc29Smrg 78404cd6a3aeSmrg solaris*) 78414cd6a3aeSmrg case $cc_basename in 78424cd6a3aeSmrg CC* | sunCC*) 78434cd6a3aeSmrg # Sun C++ 4.2, 5.x and Centerline C++ 78444cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78454cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78464cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78474cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78484cd6a3aeSmrg $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' 78494cd6a3aeSmrg 78504cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78514cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78524cd6a3aeSmrg case $host_os in 78534cd6a3aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78544cd6a3aeSmrg *) 78554cd6a3aeSmrg # The compiler driver will combine and reorder linker options, 78564cd6a3aeSmrg # but understands `-z linker_flag'. 78574cd6a3aeSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78584cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78594cd6a3aeSmrg ;; 78604cd6a3aeSmrg esac 78614cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78628c9fbc29Smrg 78634cd6a3aeSmrg output_verbose_link_cmd='func_echo_all' 78648c9fbc29Smrg 78654cd6a3aeSmrg # Archives containing C++ object files must be created using 78664cd6a3aeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78674cd6a3aeSmrg # necessary to make sure instantiated templates are included 78684cd6a3aeSmrg # in the archive. 78694cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78704cd6a3aeSmrg ;; 78714cd6a3aeSmrg gcx*) 78724cd6a3aeSmrg # Green Hills C++ Compiler 78734cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78748c9fbc29Smrg 78754cd6a3aeSmrg # The C++ compiler must be used to create the archive. 78764cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78774cd6a3aeSmrg ;; 78784cd6a3aeSmrg *) 78794cd6a3aeSmrg # GNU C++ compiler with Solaris linker 78804cd6a3aeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78814cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78824cd6a3aeSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78834cd6a3aeSmrg _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' 78844cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78854cd6a3aeSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78864cd6a3aeSmrg 78874cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 78884cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 78894cd6a3aeSmrg # linking a shared library. 78904cd6a3aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78914cd6a3aeSmrg else 78924cd6a3aeSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78934cd6a3aeSmrg # platform. 78944cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78954cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78964cd6a3aeSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78974cd6a3aeSmrg 78984cd6a3aeSmrg # Commands to make compiler produce verbose output that lists 78994cd6a3aeSmrg # what "hidden" libraries, object files and flags are used when 79004cd6a3aeSmrg # linking a shared library. 79014cd6a3aeSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 79024cd6a3aeSmrg fi 79034cd6a3aeSmrg 79044cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 79054cd6a3aeSmrg case $host_os in 79064cd6a3aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 79074cd6a3aeSmrg *) 79084cd6a3aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 79094cd6a3aeSmrg ;; 79104cd6a3aeSmrg esac 79114cd6a3aeSmrg fi 79124cd6a3aeSmrg ;; 79134cd6a3aeSmrg esac 79144cd6a3aeSmrg ;; 79158c9fbc29Smrg 79164cd6a3aeSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 79174cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79184cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79194cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79204cd6a3aeSmrg runpath_var='LD_RUN_PATH' 79218c9fbc29Smrg 79224cd6a3aeSmrg case $cc_basename in 79234cd6a3aeSmrg CC*) 79244cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79254cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79264cd6a3aeSmrg ;; 79274cd6a3aeSmrg *) 79284cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79294cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79304cd6a3aeSmrg ;; 79314cd6a3aeSmrg esac 79324cd6a3aeSmrg ;; 79338c9fbc29Smrg 79344cd6a3aeSmrg sysv5* | sco3.2v5* | sco5v6*) 79354cd6a3aeSmrg # Note: We can NOT use -z defs as we might desire, because we do not 79364cd6a3aeSmrg # link with -lc, and that would cause any symbols used from libc to 79374cd6a3aeSmrg # always be unresolved, which means just about no library would 79384cd6a3aeSmrg # ever link correctly. If we're not using GNU ld we use -z text 79394cd6a3aeSmrg # though, which does catch some bad symbols but isn't as heavy-handed 79404cd6a3aeSmrg # as -z defs. 79414cd6a3aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79424cd6a3aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 79434cd6a3aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79444cd6a3aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79454cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79464cd6a3aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79474cd6a3aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79484cd6a3aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79494cd6a3aeSmrg runpath_var='LD_RUN_PATH' 79508c9fbc29Smrg 79514cd6a3aeSmrg case $cc_basename in 79524cd6a3aeSmrg CC*) 79534cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79544cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79554cd6a3aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79564cd6a3aeSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79574cd6a3aeSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79584cd6a3aeSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 79594cd6a3aeSmrg ;; 79604cd6a3aeSmrg *) 79614cd6a3aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79624cd6a3aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79634cd6a3aeSmrg ;; 79644cd6a3aeSmrg esac 79654cd6a3aeSmrg ;; 79668c9fbc29Smrg 79674cd6a3aeSmrg tandem*) 79684cd6a3aeSmrg case $cc_basename in 79694cd6a3aeSmrg NCC*) 79704cd6a3aeSmrg # NonStop-UX NCC 3.20 79714cd6a3aeSmrg # FIXME: insert proper C++ library support 79724cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 79734cd6a3aeSmrg ;; 79744cd6a3aeSmrg *) 79754cd6a3aeSmrg # FIXME: insert proper C++ library support 79764cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 79774cd6a3aeSmrg ;; 79784cd6a3aeSmrg esac 79794cd6a3aeSmrg ;; 79808c9fbc29Smrg 79814cd6a3aeSmrg vxworks*) 79824cd6a3aeSmrg # FIXME: insert proper C++ library support 79834cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 79844cd6a3aeSmrg ;; 79858c9fbc29Smrg 79864cd6a3aeSmrg *) 79874cd6a3aeSmrg # FIXME: insert proper C++ library support 79884cd6a3aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 79894cd6a3aeSmrg ;; 79904cd6a3aeSmrg esac 79918c9fbc29Smrg 79924cd6a3aeSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79934cd6a3aeSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 79944cd6a3aeSmrg 79954cd6a3aeSmrg _LT_TAGVAR(GCC, $1)="$GXX" 79964cd6a3aeSmrg _LT_TAGVAR(LD, $1)="$LD" 79974cd6a3aeSmrg 79984cd6a3aeSmrg ## CAVEAT EMPTOR: 79994cd6a3aeSmrg ## There is no encapsulation within the following macros, do not change 80004cd6a3aeSmrg ## the running order or otherwise move them around unless you know exactly 80014cd6a3aeSmrg ## what you are doing... 80024cd6a3aeSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 80034cd6a3aeSmrg _LT_COMPILER_PIC($1) 80044cd6a3aeSmrg _LT_COMPILER_C_O($1) 80054cd6a3aeSmrg _LT_COMPILER_FILE_LOCKS($1) 80064cd6a3aeSmrg _LT_LINKER_SHLIBS($1) 80074cd6a3aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 80084cd6a3aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80094cd6a3aeSmrg 80104cd6a3aeSmrg _LT_CONFIG($1) 80114cd6a3aeSmrg fi # test -n "$compiler" 80124cd6a3aeSmrg 80134cd6a3aeSmrg CC=$lt_save_CC 80144cd6a3aeSmrg CFLAGS=$lt_save_CFLAGS 80154cd6a3aeSmrg LDCXX=$LD 80164cd6a3aeSmrg LD=$lt_save_LD 80174cd6a3aeSmrg GCC=$lt_save_GCC 80184cd6a3aeSmrg with_gnu_ld=$lt_save_with_gnu_ld 80194cd6a3aeSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 80204cd6a3aeSmrg lt_cv_path_LD=$lt_save_path_LD 80214cd6a3aeSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 80224cd6a3aeSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 80234cd6a3aeSmrgfi # test "$_lt_caught_CXX_error" != yes 80248c9fbc29Smrg 80254cd6a3aeSmrgAC_LANG_POP 80264cd6a3aeSmrg])# _LT_LANG_CXX_CONFIG 80278c9fbc29Smrg 80288c9fbc29Smrg 80294cd6a3aeSmrg# _LT_FUNC_STRIPNAME_CNF 80304cd6a3aeSmrg# ---------------------- 80314cd6a3aeSmrg# func_stripname_cnf prefix suffix name 80324cd6a3aeSmrg# strip PREFIX and SUFFIX off of NAME. 80334cd6a3aeSmrg# PREFIX and SUFFIX must not contain globbing or regex special 80344cd6a3aeSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 80354cd6a3aeSmrg# dot (in which case that matches only a dot). 80364cd6a3aeSmrg# 80374cd6a3aeSmrg# This function is identical to the (non-XSI) version of func_stripname, 80384cd6a3aeSmrg# except this one can be used by m4 code that may be executed by configure, 80394cd6a3aeSmrg# rather than the libtool script. 80404cd6a3aeSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 80414cd6a3aeSmrgAC_REQUIRE([_LT_DECL_SED]) 80424cd6a3aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 80434cd6a3aeSmrgfunc_stripname_cnf () 80444cd6a3aeSmrg{ 80454cd6a3aeSmrg case ${2} in 80464cd6a3aeSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80474cd6a3aeSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 80484cd6a3aeSmrg esac 80494cd6a3aeSmrg} # func_stripname_cnf 80504cd6a3aeSmrg])# _LT_FUNC_STRIPNAME_CNF 80518c9fbc29Smrg 80524cd6a3aeSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80538c9fbc29Smrg# --------------------------------- 80544cd6a3aeSmrg# Figure out "hidden" library dependencies from verbose 80554cd6a3aeSmrg# compiler output when linking a shared library. 80564cd6a3aeSmrg# Parse the compiler output and extract the necessary 80574cd6a3aeSmrg# objects, libraries and library flags. 80584cd6a3aeSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80594cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80604cd6a3aeSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80614cd6a3aeSmrg# Dependencies to place before and after the object being linked: 80624cd6a3aeSmrg_LT_TAGVAR(predep_objects, $1)= 80634cd6a3aeSmrg_LT_TAGVAR(postdep_objects, $1)= 80644cd6a3aeSmrg_LT_TAGVAR(predeps, $1)= 80654cd6a3aeSmrg_LT_TAGVAR(postdeps, $1)= 80664cd6a3aeSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 80678c9fbc29Smrg 80684cd6a3aeSmrgdnl we can't use the lt_simple_compile_test_code here, 80694cd6a3aeSmrgdnl because it contains code intended for an executable, 80704cd6a3aeSmrgdnl not a library. It's possible we should let each 80714cd6a3aeSmrgdnl tag define a new lt_????_link_test_code variable, 80724cd6a3aeSmrgdnl but it's only used here... 80734cd6a3aeSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80744cd6a3aeSmrgint a; 80754cd6a3aeSmrgvoid foo (void) { a = 0; } 80764cd6a3aeSmrg_LT_EOF 80774cd6a3aeSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80784cd6a3aeSmrgclass Foo 80794cd6a3aeSmrg{ 80804cd6a3aeSmrgpublic: 80814cd6a3aeSmrg Foo (void) { a = 0; } 80824cd6a3aeSmrgprivate: 80834cd6a3aeSmrg int a; 80844cd6a3aeSmrg}; 80854cd6a3aeSmrg_LT_EOF 80864cd6a3aeSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80874cd6a3aeSmrg subroutine foo 80884cd6a3aeSmrg implicit none 80894cd6a3aeSmrg integer*4 a 80904cd6a3aeSmrg a=0 80914cd6a3aeSmrg return 80924cd6a3aeSmrg end 80934cd6a3aeSmrg_LT_EOF 80944cd6a3aeSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80954cd6a3aeSmrg subroutine foo 80964cd6a3aeSmrg implicit none 80974cd6a3aeSmrg integer a 80984cd6a3aeSmrg a=0 80994cd6a3aeSmrg return 81004cd6a3aeSmrg end 81014cd6a3aeSmrg_LT_EOF 81024cd6a3aeSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 81034cd6a3aeSmrgpublic class foo { 81044cd6a3aeSmrg private int a; 81054cd6a3aeSmrg public void bar (void) { 81064cd6a3aeSmrg a = 0; 81074cd6a3aeSmrg } 81084cd6a3aeSmrg}; 81094cd6a3aeSmrg_LT_EOF 811070728a38Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 811170728a38Smrgpackage foo 811270728a38Smrgfunc foo() { 811370728a38Smrg} 811470728a38Smrg_LT_EOF 81154cd6a3aeSmrg]) 81168c9fbc29Smrg 81174cd6a3aeSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 81184cd6a3aeSmrgcase "$CC $CFLAGS " in #( 81194cd6a3aeSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 81204cd6a3aeSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 812170728a38Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 81228c9fbc29Smrgesac 81238c9fbc29Smrg 81244cd6a3aeSmrgdnl Parse the compiler output and extract the necessary 81254cd6a3aeSmrgdnl objects, libraries and library flags. 81264cd6a3aeSmrgif AC_TRY_EVAL(ac_compile); then 81274cd6a3aeSmrg # Parse the compiler output and extract the necessary 81284cd6a3aeSmrg # objects, libraries and library flags. 81298c9fbc29Smrg 81304cd6a3aeSmrg # Sentinel used to keep track of whether or not we are before 81314cd6a3aeSmrg # the conftest object file. 81324cd6a3aeSmrg pre_test_object_deps_done=no 81338c9fbc29Smrg 81344cd6a3aeSmrg for p in `eval "$output_verbose_link_cmd"`; do 81354cd6a3aeSmrg case ${prev}${p} in 81368c9fbc29Smrg 81374cd6a3aeSmrg -L* | -R* | -l*) 81384cd6a3aeSmrg # Some compilers place space between "-{L,R}" and the path. 81394cd6a3aeSmrg # Remove the space. 81404cd6a3aeSmrg if test $p = "-L" || 81414cd6a3aeSmrg test $p = "-R"; then 81424cd6a3aeSmrg prev=$p 81434cd6a3aeSmrg continue 81444cd6a3aeSmrg fi 81458c9fbc29Smrg 81464cd6a3aeSmrg # Expand the sysroot to ease extracting the directories later. 81474cd6a3aeSmrg if test -z "$prev"; then 81484cd6a3aeSmrg case $p in 81494cd6a3aeSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 81504cd6a3aeSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81514cd6a3aeSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81524cd6a3aeSmrg esac 81534cd6a3aeSmrg fi 81544cd6a3aeSmrg case $p in 81554cd6a3aeSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81564cd6a3aeSmrg esac 81574cd6a3aeSmrg if test "$pre_test_object_deps_done" = no; then 81584cd6a3aeSmrg case ${prev} in 81594cd6a3aeSmrg -L | -R) 81604cd6a3aeSmrg # Internal compiler library paths should come after those 81614cd6a3aeSmrg # provided the user. The postdeps already come after the 81624cd6a3aeSmrg # user supplied libs so there is no need to process them. 81634cd6a3aeSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81644cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81654cd6a3aeSmrg else 81664cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81674cd6a3aeSmrg fi 81684cd6a3aeSmrg ;; 81694cd6a3aeSmrg # The "-l" case would never come before the object being 81704cd6a3aeSmrg # linked, so don't bother handling this case. 81714cd6a3aeSmrg esac 81724cd6a3aeSmrg else 81734cd6a3aeSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81744cd6a3aeSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81754cd6a3aeSmrg else 81764cd6a3aeSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81774cd6a3aeSmrg fi 81784cd6a3aeSmrg fi 81794cd6a3aeSmrg prev= 81804cd6a3aeSmrg ;; 81818c9fbc29Smrg 81824cd6a3aeSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 81834cd6a3aeSmrg *.$objext) 81844cd6a3aeSmrg # This assumes that the test object file only shows up 81854cd6a3aeSmrg # once in the compiler output. 81864cd6a3aeSmrg if test "$p" = "conftest.$objext"; then 81874cd6a3aeSmrg pre_test_object_deps_done=yes 81884cd6a3aeSmrg continue 81894cd6a3aeSmrg fi 81908c9fbc29Smrg 81914cd6a3aeSmrg if test "$pre_test_object_deps_done" = no; then 81924cd6a3aeSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81934cd6a3aeSmrg _LT_TAGVAR(predep_objects, $1)="$p" 81944cd6a3aeSmrg else 81954cd6a3aeSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81964cd6a3aeSmrg fi 81974cd6a3aeSmrg else 81984cd6a3aeSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 81994cd6a3aeSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 82004cd6a3aeSmrg else 82014cd6a3aeSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 82024cd6a3aeSmrg fi 82034cd6a3aeSmrg fi 82044cd6a3aeSmrg ;; 82058c9fbc29Smrg 82064cd6a3aeSmrg *) ;; # Ignore the rest. 82078c9fbc29Smrg 82084cd6a3aeSmrg esac 82094cd6a3aeSmrg done 82108c9fbc29Smrg 82114cd6a3aeSmrg # Clean up. 82124cd6a3aeSmrg rm -f a.out a.exe 82138c9fbc29Smrgelse 82144cd6a3aeSmrg echo "libtool.m4: error: problem compiling $1 test program" 82158c9fbc29Smrgfi 82168c9fbc29Smrg 82174cd6a3aeSmrg$RM -f confest.$objext 82184cd6a3aeSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 82198c9fbc29Smrg 82204cd6a3aeSmrg# PORTME: override above test on systems where it is broken 82214cd6a3aeSmrgm4_if([$1], [CXX], 82224cd6a3aeSmrg[case $host_os in 82234cd6a3aeSmrginterix[[3-9]]*) 82244cd6a3aeSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 82254cd6a3aeSmrg # hack all around it, let's just trust "g++" to DTRT. 82264cd6a3aeSmrg _LT_TAGVAR(predep_objects,$1)= 82274cd6a3aeSmrg _LT_TAGVAR(postdep_objects,$1)= 82284cd6a3aeSmrg _LT_TAGVAR(postdeps,$1)= 82294cd6a3aeSmrg ;; 82308c9fbc29Smrg 82314cd6a3aeSmrglinux*) 82324cd6a3aeSmrg case `$CC -V 2>&1 | sed 5q` in 82334cd6a3aeSmrg *Sun\ C*) 82344cd6a3aeSmrg # Sun C++ 5.9 82358c9fbc29Smrg 82364cd6a3aeSmrg # The more standards-conforming stlport4 library is 82374cd6a3aeSmrg # incompatible with the Cstd library. Avoid specifying 82384cd6a3aeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 82394cd6a3aeSmrg # -library=stlport4 depends on it. 82404cd6a3aeSmrg case " $CXX $CXXFLAGS " in 82414cd6a3aeSmrg *" -library=stlport4 "*) 82424cd6a3aeSmrg solaris_use_stlport4=yes 82438c9fbc29Smrg ;; 82444cd6a3aeSmrg esac 82454cd6a3aeSmrg 82464cd6a3aeSmrg if test "$solaris_use_stlport4" != yes; then 82474cd6a3aeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82484cd6a3aeSmrg fi 82494cd6a3aeSmrg ;; 82504cd6a3aeSmrg esac 82514cd6a3aeSmrg ;; 82524cd6a3aeSmrg 82534cd6a3aeSmrgsolaris*) 82544cd6a3aeSmrg case $cc_basename in 82554cd6a3aeSmrg CC* | sunCC*) 82564cd6a3aeSmrg # The more standards-conforming stlport4 library is 82574cd6a3aeSmrg # incompatible with the Cstd library. Avoid specifying 82584cd6a3aeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 82594cd6a3aeSmrg # -library=stlport4 depends on it. 82604cd6a3aeSmrg case " $CXX $CXXFLAGS " in 82614cd6a3aeSmrg *" -library=stlport4 "*) 82624cd6a3aeSmrg solaris_use_stlport4=yes 82638c9fbc29Smrg ;; 82648c9fbc29Smrg esac 82654cd6a3aeSmrg 82664cd6a3aeSmrg # Adding this requires a known-good setup of shared libraries for 82674cd6a3aeSmrg # Sun compiler versions before 5.6, else PIC objects from an old 82684cd6a3aeSmrg # archive will be linked into the output, leading to subtle bugs. 82694cd6a3aeSmrg if test "$solaris_use_stlport4" != yes; then 82704cd6a3aeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82714cd6a3aeSmrg fi 82724cd6a3aeSmrg ;; 82734cd6a3aeSmrg esac 82744cd6a3aeSmrg ;; 82754cd6a3aeSmrgesac 82764cd6a3aeSmrg]) 82774cd6a3aeSmrg 82784cd6a3aeSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 82794cd6a3aeSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82804cd6a3aeSmrgesac 82814cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82824cd6a3aeSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82834cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 82844cd6a3aeSmrgfi 82854cd6a3aeSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82864cd6a3aeSmrg [The directories searched by this compiler when creating a shared library]) 82874cd6a3aeSmrg_LT_TAGDECL([], [predep_objects], [1], 82884cd6a3aeSmrg [Dependencies to place before and after the objects being linked to 82894cd6a3aeSmrg create a shared library]) 82904cd6a3aeSmrg_LT_TAGDECL([], [postdep_objects], [1]) 82914cd6a3aeSmrg_LT_TAGDECL([], [predeps], [1]) 82924cd6a3aeSmrg_LT_TAGDECL([], [postdeps], [1]) 82934cd6a3aeSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82944cd6a3aeSmrg [The library search path used internally by the compiler when linking 82954cd6a3aeSmrg a shared library]) 82964cd6a3aeSmrg])# _LT_SYS_HIDDEN_LIBDEPS 82974cd6a3aeSmrg 82984cd6a3aeSmrg 82994cd6a3aeSmrg# _LT_LANG_F77_CONFIG([TAG]) 83004cd6a3aeSmrg# -------------------------- 83014cd6a3aeSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 83024cd6a3aeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83034cd6a3aeSmrg# to write the compiler configuration to `libtool'. 83044cd6a3aeSmrgm4_defun([_LT_LANG_F77_CONFIG], 83054cd6a3aeSmrg[AC_LANG_PUSH(Fortran 77) 83064cd6a3aeSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 83074cd6a3aeSmrg _lt_disable_F77=yes 83084cd6a3aeSmrgfi 83094cd6a3aeSmrg 83104cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83114cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 83124cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 83134cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83144cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83154cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 83164cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83174cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83184cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 83194cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 83204cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 83214cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 83224cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)= 83234cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 83244cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 83254cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83264cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83274cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 83284cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 83294cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 83304cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83314cd6a3aeSmrg 83324cd6a3aeSmrg# Source file extension for f77 test sources. 83334cd6a3aeSmrgac_ext=f 83344cd6a3aeSmrg 83354cd6a3aeSmrg# Object file extension for compiled f77 test sources. 83364cd6a3aeSmrgobjext=o 83374cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 83384cd6a3aeSmrg 83394cd6a3aeSmrg# No sense in running all these tests if we already determined that 83404cd6a3aeSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 83414cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform, 83424cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler. 83434cd6a3aeSmrgif test "$_lt_disable_F77" != yes; then 83444cd6a3aeSmrg # Code to be used in simple compile tests 83454cd6a3aeSmrg lt_simple_compile_test_code="\ 83464cd6a3aeSmrg subroutine t 83474cd6a3aeSmrg return 83484cd6a3aeSmrg end 83494cd6a3aeSmrg" 83504cd6a3aeSmrg 83514cd6a3aeSmrg # Code to be used in simple link tests 83524cd6a3aeSmrg lt_simple_link_test_code="\ 83534cd6a3aeSmrg program t 83544cd6a3aeSmrg end 83554cd6a3aeSmrg" 83564cd6a3aeSmrg 83574cd6a3aeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83584cd6a3aeSmrg _LT_TAG_COMPILER 83594cd6a3aeSmrg 83604cd6a3aeSmrg # save warnings/boilerplate of simple test code 83614cd6a3aeSmrg _LT_COMPILER_BOILERPLATE 83624cd6a3aeSmrg _LT_LINKER_BOILERPLATE 83634cd6a3aeSmrg 83644cd6a3aeSmrg # Allow CC to be a program name with arguments. 83654cd6a3aeSmrg lt_save_CC="$CC" 83664cd6a3aeSmrg lt_save_GCC=$GCC 83674cd6a3aeSmrg lt_save_CFLAGS=$CFLAGS 83684cd6a3aeSmrg CC=${F77-"f77"} 83694cd6a3aeSmrg CFLAGS=$FFLAGS 83704cd6a3aeSmrg compiler=$CC 83714cd6a3aeSmrg _LT_TAGVAR(compiler, $1)=$CC 83724cd6a3aeSmrg _LT_CC_BASENAME([$compiler]) 83734cd6a3aeSmrg GCC=$G77 83744cd6a3aeSmrg if test -n "$compiler"; then 83754cd6a3aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83764cd6a3aeSmrg AC_MSG_RESULT([$can_build_shared]) 83774cd6a3aeSmrg 83784cd6a3aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 83794cd6a3aeSmrg test "$can_build_shared" = "no" && enable_shared=no 83804cd6a3aeSmrg 83814cd6a3aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 83824cd6a3aeSmrg # are all built from PIC. 83838c9fbc29Smrg case $host_os in 83844cd6a3aeSmrg aix3*) 83854cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 83864cd6a3aeSmrg if test -n "$RANLIB"; then 83874cd6a3aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83884cd6a3aeSmrg postinstall_cmds='$RANLIB $lib' 83894cd6a3aeSmrg fi 83904cd6a3aeSmrg ;; 83914e411241Smrg aix[[4-9]]*) 83924cd6a3aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83934cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 83948c9fbc29Smrg fi 83954cd6a3aeSmrg ;; 83968c9fbc29Smrg esac 83974cd6a3aeSmrg AC_MSG_RESULT([$enable_shared]) 83984cd6a3aeSmrg 83994cd6a3aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 84004cd6a3aeSmrg # Make sure either enable_shared or enable_static is yes. 84014cd6a3aeSmrg test "$enable_shared" = yes || enable_static=yes 84024cd6a3aeSmrg AC_MSG_RESULT([$enable_static]) 84034cd6a3aeSmrg 84044cd6a3aeSmrg _LT_TAGVAR(GCC, $1)="$G77" 84054cd6a3aeSmrg _LT_TAGVAR(LD, $1)="$LD" 84064cd6a3aeSmrg 84074cd6a3aeSmrg ## CAVEAT EMPTOR: 84084cd6a3aeSmrg ## There is no encapsulation within the following macros, do not change 84094cd6a3aeSmrg ## the running order or otherwise move them around unless you know exactly 84104cd6a3aeSmrg ## what you are doing... 84114cd6a3aeSmrg _LT_COMPILER_PIC($1) 84124cd6a3aeSmrg _LT_COMPILER_C_O($1) 84134cd6a3aeSmrg _LT_COMPILER_FILE_LOCKS($1) 84144cd6a3aeSmrg _LT_LINKER_SHLIBS($1) 84154cd6a3aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 84164cd6a3aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 84174cd6a3aeSmrg 84184cd6a3aeSmrg _LT_CONFIG($1) 84194cd6a3aeSmrg fi # test -n "$compiler" 84204cd6a3aeSmrg 84214cd6a3aeSmrg GCC=$lt_save_GCC 84224cd6a3aeSmrg CC="$lt_save_CC" 84234cd6a3aeSmrg CFLAGS="$lt_save_CFLAGS" 84244cd6a3aeSmrgfi # test "$_lt_disable_F77" != yes 84254cd6a3aeSmrg 84264cd6a3aeSmrgAC_LANG_POP 84274cd6a3aeSmrg])# _LT_LANG_F77_CONFIG 84284cd6a3aeSmrg 84294cd6a3aeSmrg 84304cd6a3aeSmrg# _LT_LANG_FC_CONFIG([TAG]) 84314cd6a3aeSmrg# ------------------------- 84324cd6a3aeSmrg# Ensure that the configuration variables for a Fortran compiler are 84334cd6a3aeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 84344cd6a3aeSmrg# to write the compiler configuration to `libtool'. 84354cd6a3aeSmrgm4_defun([_LT_LANG_FC_CONFIG], 84364cd6a3aeSmrg[AC_LANG_PUSH(Fortran) 84374cd6a3aeSmrg 84384cd6a3aeSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 84394cd6a3aeSmrg _lt_disable_FC=yes 84404cd6a3aeSmrgfi 84414cd6a3aeSmrg 84424cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84434cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 84444cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 84454cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 84464cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 84474cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 84484cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 84494cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84504cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84514cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84524cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 84534cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 84544cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)= 84554cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 84564cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84574cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84584cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84594cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84604cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 84614cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84624cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 84634cd6a3aeSmrg 84644cd6a3aeSmrg# Source file extension for fc test sources. 84654cd6a3aeSmrgac_ext=${ac_fc_srcext-f} 84664cd6a3aeSmrg 84674cd6a3aeSmrg# Object file extension for compiled fc test sources. 84684cd6a3aeSmrgobjext=o 84694cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 84704cd6a3aeSmrg 84714cd6a3aeSmrg# No sense in running all these tests if we already determined that 84724cd6a3aeSmrg# the FC compiler isn't working. Some variables (like enable_shared) 84734cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform, 84744cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler. 84754cd6a3aeSmrgif test "$_lt_disable_FC" != yes; then 84764cd6a3aeSmrg # Code to be used in simple compile tests 84774cd6a3aeSmrg lt_simple_compile_test_code="\ 84784cd6a3aeSmrg subroutine t 84794cd6a3aeSmrg return 84804cd6a3aeSmrg end 84814cd6a3aeSmrg" 84824cd6a3aeSmrg 84834cd6a3aeSmrg # Code to be used in simple link tests 84844cd6a3aeSmrg lt_simple_link_test_code="\ 84854cd6a3aeSmrg program t 84864cd6a3aeSmrg end 84874cd6a3aeSmrg" 84884cd6a3aeSmrg 84894cd6a3aeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84904cd6a3aeSmrg _LT_TAG_COMPILER 84914cd6a3aeSmrg 84924cd6a3aeSmrg # save warnings/boilerplate of simple test code 84934cd6a3aeSmrg _LT_COMPILER_BOILERPLATE 84944cd6a3aeSmrg _LT_LINKER_BOILERPLATE 84954cd6a3aeSmrg 84964cd6a3aeSmrg # Allow CC to be a program name with arguments. 84974cd6a3aeSmrg lt_save_CC="$CC" 84984cd6a3aeSmrg lt_save_GCC=$GCC 84994cd6a3aeSmrg lt_save_CFLAGS=$CFLAGS 85004cd6a3aeSmrg CC=${FC-"f95"} 85014cd6a3aeSmrg CFLAGS=$FCFLAGS 85024cd6a3aeSmrg compiler=$CC 85034cd6a3aeSmrg GCC=$ac_cv_fc_compiler_gnu 85044cd6a3aeSmrg 85054cd6a3aeSmrg _LT_TAGVAR(compiler, $1)=$CC 85064cd6a3aeSmrg _LT_CC_BASENAME([$compiler]) 85074cd6a3aeSmrg 85084cd6a3aeSmrg if test -n "$compiler"; then 85094cd6a3aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 85104cd6a3aeSmrg AC_MSG_RESULT([$can_build_shared]) 85114cd6a3aeSmrg 85124cd6a3aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 85134cd6a3aeSmrg test "$can_build_shared" = "no" && enable_shared=no 85144cd6a3aeSmrg 85154cd6a3aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 85164cd6a3aeSmrg # are all built from PIC. 85174cd6a3aeSmrg case $host_os in 85184cd6a3aeSmrg aix3*) 85194cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 85204cd6a3aeSmrg if test -n "$RANLIB"; then 85214cd6a3aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 85224cd6a3aeSmrg postinstall_cmds='$RANLIB $lib' 85234cd6a3aeSmrg fi 85244cd6a3aeSmrg ;; 85254cd6a3aeSmrg aix[[4-9]]*) 85264cd6a3aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 85274cd6a3aeSmrg test "$enable_shared" = yes && enable_static=no 85284cd6a3aeSmrg fi 85294cd6a3aeSmrg ;; 85304cd6a3aeSmrg esac 85314cd6a3aeSmrg AC_MSG_RESULT([$enable_shared]) 85324cd6a3aeSmrg 85334cd6a3aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 85344cd6a3aeSmrg # Make sure either enable_shared or enable_static is yes. 85354cd6a3aeSmrg test "$enable_shared" = yes || enable_static=yes 85364cd6a3aeSmrg AC_MSG_RESULT([$enable_static]) 85374cd6a3aeSmrg 85384cd6a3aeSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85394cd6a3aeSmrg _LT_TAGVAR(LD, $1)="$LD" 85404cd6a3aeSmrg 85414cd6a3aeSmrg ## CAVEAT EMPTOR: 85424cd6a3aeSmrg ## There is no encapsulation within the following macros, do not change 85434cd6a3aeSmrg ## the running order or otherwise move them around unless you know exactly 85444cd6a3aeSmrg ## what you are doing... 85454cd6a3aeSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 85464cd6a3aeSmrg _LT_COMPILER_PIC($1) 85474cd6a3aeSmrg _LT_COMPILER_C_O($1) 85484cd6a3aeSmrg _LT_COMPILER_FILE_LOCKS($1) 85494cd6a3aeSmrg _LT_LINKER_SHLIBS($1) 85504cd6a3aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 85514cd6a3aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 85524cd6a3aeSmrg 85534cd6a3aeSmrg _LT_CONFIG($1) 85544cd6a3aeSmrg fi # test -n "$compiler" 85554cd6a3aeSmrg 85564cd6a3aeSmrg GCC=$lt_save_GCC 85574cd6a3aeSmrg CC=$lt_save_CC 85584cd6a3aeSmrg CFLAGS=$lt_save_CFLAGS 85594cd6a3aeSmrgfi # test "$_lt_disable_FC" != yes 85604cd6a3aeSmrg 85614cd6a3aeSmrgAC_LANG_POP 85624cd6a3aeSmrg])# _LT_LANG_FC_CONFIG 85634cd6a3aeSmrg 85644cd6a3aeSmrg 85654cd6a3aeSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 85664cd6a3aeSmrg# -------------------------- 85674cd6a3aeSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 85684cd6a3aeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85694cd6a3aeSmrg# to write the compiler configuration to `libtool'. 85704cd6a3aeSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 85714cd6a3aeSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 85724cd6a3aeSmrgAC_LANG_SAVE 85734cd6a3aeSmrg 85744cd6a3aeSmrg# Source file extension for Java test sources. 85754cd6a3aeSmrgac_ext=java 85764cd6a3aeSmrg 85774cd6a3aeSmrg# Object file extension for compiled Java test sources. 85784cd6a3aeSmrgobjext=o 85794cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 85804cd6a3aeSmrg 85814cd6a3aeSmrg# Code to be used in simple compile tests 85824cd6a3aeSmrglt_simple_compile_test_code="class foo {}" 85834cd6a3aeSmrg 85844cd6a3aeSmrg# Code to be used in simple link tests 85854cd6a3aeSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 85864cd6a3aeSmrg 85874cd6a3aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85884cd6a3aeSmrg_LT_TAG_COMPILER 85894cd6a3aeSmrg 85904cd6a3aeSmrg# save warnings/boilerplate of simple test code 85914cd6a3aeSmrg_LT_COMPILER_BOILERPLATE 85924cd6a3aeSmrg_LT_LINKER_BOILERPLATE 85934cd6a3aeSmrg 85944cd6a3aeSmrg# Allow CC to be a program name with arguments. 85954cd6a3aeSmrglt_save_CC=$CC 85964cd6a3aeSmrglt_save_CFLAGS=$CFLAGS 85974cd6a3aeSmrglt_save_GCC=$GCC 85984cd6a3aeSmrgGCC=yes 85994cd6a3aeSmrgCC=${GCJ-"gcj"} 86004cd6a3aeSmrgCFLAGS=$GCJFLAGS 86014cd6a3aeSmrgcompiler=$CC 86024cd6a3aeSmrg_LT_TAGVAR(compiler, $1)=$CC 86034cd6a3aeSmrg_LT_TAGVAR(LD, $1)="$LD" 86044cd6a3aeSmrg_LT_CC_BASENAME([$compiler]) 86054cd6a3aeSmrg 86064cd6a3aeSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 86074cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86084cd6a3aeSmrg 86094cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86104cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86114cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86124cd6a3aeSmrg 86134cd6a3aeSmrgif test -n "$compiler"; then 86144cd6a3aeSmrg _LT_COMPILER_NO_RTTI($1) 86154cd6a3aeSmrg _LT_COMPILER_PIC($1) 86164cd6a3aeSmrg _LT_COMPILER_C_O($1) 86174cd6a3aeSmrg _LT_COMPILER_FILE_LOCKS($1) 86184cd6a3aeSmrg _LT_LINKER_SHLIBS($1) 86194cd6a3aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 86204cd6a3aeSmrg 86214cd6a3aeSmrg _LT_CONFIG($1) 86224cd6a3aeSmrgfi 86234cd6a3aeSmrg 86244cd6a3aeSmrgAC_LANG_RESTORE 86254cd6a3aeSmrg 86264cd6a3aeSmrgGCC=$lt_save_GCC 86274cd6a3aeSmrgCC=$lt_save_CC 86284cd6a3aeSmrgCFLAGS=$lt_save_CFLAGS 86294cd6a3aeSmrg])# _LT_LANG_GCJ_CONFIG 86304cd6a3aeSmrg 86314cd6a3aeSmrg 863270728a38Smrg# _LT_LANG_GO_CONFIG([TAG]) 863370728a38Smrg# -------------------------- 863470728a38Smrg# Ensure that the configuration variables for the GNU Go compiler 863570728a38Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 863670728a38Smrg# to write the compiler configuration to `libtool'. 863770728a38Smrgm4_defun([_LT_LANG_GO_CONFIG], 863870728a38Smrg[AC_REQUIRE([LT_PROG_GO])dnl 863970728a38SmrgAC_LANG_SAVE 864070728a38Smrg 864170728a38Smrg# Source file extension for Go test sources. 864270728a38Smrgac_ext=go 864370728a38Smrg 864470728a38Smrg# Object file extension for compiled Go test sources. 864570728a38Smrgobjext=o 864670728a38Smrg_LT_TAGVAR(objext, $1)=$objext 864770728a38Smrg 864870728a38Smrg# Code to be used in simple compile tests 864970728a38Smrglt_simple_compile_test_code="package main; func main() { }" 865070728a38Smrg 865170728a38Smrg# Code to be used in simple link tests 865270728a38Smrglt_simple_link_test_code='package main; func main() { }' 865370728a38Smrg 865470728a38Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 865570728a38Smrg_LT_TAG_COMPILER 865670728a38Smrg 865770728a38Smrg# save warnings/boilerplate of simple test code 865870728a38Smrg_LT_COMPILER_BOILERPLATE 865970728a38Smrg_LT_LINKER_BOILERPLATE 866070728a38Smrg 866170728a38Smrg# Allow CC to be a program name with arguments. 866270728a38Smrglt_save_CC=$CC 866370728a38Smrglt_save_CFLAGS=$CFLAGS 866470728a38Smrglt_save_GCC=$GCC 866570728a38SmrgGCC=yes 866670728a38SmrgCC=${GOC-"gccgo"} 866770728a38SmrgCFLAGS=$GOFLAGS 866870728a38Smrgcompiler=$CC 866970728a38Smrg_LT_TAGVAR(compiler, $1)=$CC 867070728a38Smrg_LT_TAGVAR(LD, $1)="$LD" 867170728a38Smrg_LT_CC_BASENAME([$compiler]) 867270728a38Smrg 867370728a38Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 867470728a38Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 867570728a38Smrg 867670728a38Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 867770728a38Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 867870728a38Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 867970728a38Smrg 868070728a38Smrgif test -n "$compiler"; then 868170728a38Smrg _LT_COMPILER_NO_RTTI($1) 868270728a38Smrg _LT_COMPILER_PIC($1) 868370728a38Smrg _LT_COMPILER_C_O($1) 868470728a38Smrg _LT_COMPILER_FILE_LOCKS($1) 868570728a38Smrg _LT_LINKER_SHLIBS($1) 868670728a38Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 868770728a38Smrg 868870728a38Smrg _LT_CONFIG($1) 868970728a38Smrgfi 869070728a38Smrg 869170728a38SmrgAC_LANG_RESTORE 869270728a38Smrg 869370728a38SmrgGCC=$lt_save_GCC 869470728a38SmrgCC=$lt_save_CC 869570728a38SmrgCFLAGS=$lt_save_CFLAGS 869670728a38Smrg])# _LT_LANG_GO_CONFIG 869770728a38Smrg 869870728a38Smrg 86994cd6a3aeSmrg# _LT_LANG_RC_CONFIG([TAG]) 87004cd6a3aeSmrg# ------------------------- 87014cd6a3aeSmrg# Ensure that the configuration variables for the Windows resource compiler 87024cd6a3aeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 87034cd6a3aeSmrg# to write the compiler configuration to `libtool'. 87044cd6a3aeSmrgm4_defun([_LT_LANG_RC_CONFIG], 87054cd6a3aeSmrg[AC_REQUIRE([LT_PROG_RC])dnl 87064cd6a3aeSmrgAC_LANG_SAVE 87074cd6a3aeSmrg 87084cd6a3aeSmrg# Source file extension for RC test sources. 87094cd6a3aeSmrgac_ext=rc 87104cd6a3aeSmrg 87114cd6a3aeSmrg# Object file extension for compiled RC test sources. 87124cd6a3aeSmrgobjext=o 87134cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext 87144cd6a3aeSmrg 87154cd6a3aeSmrg# Code to be used in simple compile tests 87164cd6a3aeSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 87174cd6a3aeSmrg 87184cd6a3aeSmrg# Code to be used in simple link tests 87194cd6a3aeSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 87204cd6a3aeSmrg 87214cd6a3aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 87224cd6a3aeSmrg_LT_TAG_COMPILER 87234cd6a3aeSmrg 87244cd6a3aeSmrg# save warnings/boilerplate of simple test code 87254cd6a3aeSmrg_LT_COMPILER_BOILERPLATE 87264cd6a3aeSmrg_LT_LINKER_BOILERPLATE 87274cd6a3aeSmrg 87284cd6a3aeSmrg# Allow CC to be a program name with arguments. 87294cd6a3aeSmrglt_save_CC="$CC" 87304cd6a3aeSmrglt_save_CFLAGS=$CFLAGS 87314cd6a3aeSmrglt_save_GCC=$GCC 87324cd6a3aeSmrgGCC= 87334cd6a3aeSmrgCC=${RC-"windres"} 87344cd6a3aeSmrgCFLAGS= 87354cd6a3aeSmrgcompiler=$CC 87364cd6a3aeSmrg_LT_TAGVAR(compiler, $1)=$CC 87374cd6a3aeSmrg_LT_CC_BASENAME([$compiler]) 87384cd6a3aeSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 87394cd6a3aeSmrg 87404cd6a3aeSmrgif test -n "$compiler"; then 87414cd6a3aeSmrg : 87424cd6a3aeSmrg _LT_CONFIG($1) 87434cd6a3aeSmrgfi 87444cd6a3aeSmrg 87454cd6a3aeSmrgGCC=$lt_save_GCC 87464cd6a3aeSmrgAC_LANG_RESTORE 87474cd6a3aeSmrgCC=$lt_save_CC 87484cd6a3aeSmrgCFLAGS=$lt_save_CFLAGS 87494cd6a3aeSmrg])# _LT_LANG_RC_CONFIG 87504cd6a3aeSmrg 87514cd6a3aeSmrg 87524cd6a3aeSmrg# LT_PROG_GCJ 87534cd6a3aeSmrg# ----------- 87544cd6a3aeSmrgAC_DEFUN([LT_PROG_GCJ], 87554cd6a3aeSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 87564cd6a3aeSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 87574cd6a3aeSmrg [AC_CHECK_TOOL(GCJ, gcj,) 87584cd6a3aeSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 87594cd6a3aeSmrg AC_SUBST(GCJFLAGS)])])[]dnl 87604cd6a3aeSmrg]) 87614cd6a3aeSmrg 87624cd6a3aeSmrg# Old name: 87634cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 87644cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 87654cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 87664cd6a3aeSmrg 87674cd6a3aeSmrg 876870728a38Smrg# LT_PROG_GO 876970728a38Smrg# ---------- 877070728a38SmrgAC_DEFUN([LT_PROG_GO], 877170728a38Smrg[AC_CHECK_TOOL(GOC, gccgo,) 877270728a38Smrg]) 877370728a38Smrg 877470728a38Smrg 87754cd6a3aeSmrg# LT_PROG_RC 87764cd6a3aeSmrg# ---------- 87774cd6a3aeSmrgAC_DEFUN([LT_PROG_RC], 87784cd6a3aeSmrg[AC_CHECK_TOOL(RC, windres,) 87794cd6a3aeSmrg]) 87804cd6a3aeSmrg 87814cd6a3aeSmrg# Old name: 87824cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 87834cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 87844cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 87854cd6a3aeSmrg 87864cd6a3aeSmrg 87874cd6a3aeSmrg# _LT_DECL_EGREP 87884cd6a3aeSmrg# -------------- 87894cd6a3aeSmrg# If we don't have a new enough Autoconf to choose the best grep 87904cd6a3aeSmrg# available, choose the one first in the user's PATH. 87914cd6a3aeSmrgm4_defun([_LT_DECL_EGREP], 87924cd6a3aeSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 87934cd6a3aeSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 87944cd6a3aeSmrgtest -z "$GREP" && GREP=grep 87954cd6a3aeSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 87964cd6a3aeSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 87974cd6a3aeSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 87984cd6a3aeSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 87994cd6a3aeSmrgAC_SUBST([GREP]) 88004cd6a3aeSmrg]) 88014cd6a3aeSmrg 88024cd6a3aeSmrg 88034cd6a3aeSmrg# _LT_DECL_OBJDUMP 88044cd6a3aeSmrg# -------------- 88054cd6a3aeSmrg# If we don't have a new enough Autoconf to choose the best objdump 88064cd6a3aeSmrg# available, choose the one first in the user's PATH. 88074cd6a3aeSmrgm4_defun([_LT_DECL_OBJDUMP], 88084cd6a3aeSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 88094cd6a3aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 88104cd6a3aeSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 88114cd6a3aeSmrgAC_SUBST([OBJDUMP]) 88124cd6a3aeSmrg]) 88134cd6a3aeSmrg 88144cd6a3aeSmrg# _LT_DECL_DLLTOOL 88154cd6a3aeSmrg# ---------------- 88164cd6a3aeSmrg# Ensure DLLTOOL variable is set. 88174cd6a3aeSmrgm4_defun([_LT_DECL_DLLTOOL], 88184cd6a3aeSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 88194cd6a3aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 88204cd6a3aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 88214cd6a3aeSmrgAC_SUBST([DLLTOOL]) 88224cd6a3aeSmrg]) 88234cd6a3aeSmrg 88244cd6a3aeSmrg# _LT_DECL_SED 88254cd6a3aeSmrg# ------------ 88264cd6a3aeSmrg# Check for a fully-functional sed program, that truncates 88274cd6a3aeSmrg# as few characters as possible. Prefer GNU sed if found. 88284cd6a3aeSmrgm4_defun([_LT_DECL_SED], 88294cd6a3aeSmrg[AC_PROG_SED 88304cd6a3aeSmrgtest -z "$SED" && SED=sed 88314cd6a3aeSmrgXsed="$SED -e 1s/^X//" 88324cd6a3aeSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 88334cd6a3aeSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 88344cd6a3aeSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 88354cd6a3aeSmrg])# _LT_DECL_SED 88364cd6a3aeSmrg 88374cd6a3aeSmrgm4_ifndef([AC_PROG_SED], [ 88384cd6a3aeSmrg# NOTE: This macro has been submitted for inclusion into # 88394cd6a3aeSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 88404cd6a3aeSmrg# a released version of Autoconf we should remove this # 88414cd6a3aeSmrg# macro and use it instead. # 88424cd6a3aeSmrg 88434cd6a3aeSmrgm4_defun([AC_PROG_SED], 88444cd6a3aeSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 88454cd6a3aeSmrgAC_CACHE_VAL(lt_cv_path_SED, 88464cd6a3aeSmrg[# Loop through the user's path and test for sed and gsed. 88474cd6a3aeSmrg# Then use that list of sed's as ones to test for truncation. 88484cd6a3aeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 88494cd6a3aeSmrgfor as_dir in $PATH 88504cd6a3aeSmrgdo 88514cd6a3aeSmrg IFS=$as_save_IFS 88524cd6a3aeSmrg test -z "$as_dir" && as_dir=. 88534cd6a3aeSmrg for lt_ac_prog in sed gsed; do 88544cd6a3aeSmrg for ac_exec_ext in '' $ac_executable_extensions; do 88554cd6a3aeSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 88564cd6a3aeSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 88574cd6a3aeSmrg fi 88584cd6a3aeSmrg done 88594cd6a3aeSmrg done 88604cd6a3aeSmrgdone 88614cd6a3aeSmrgIFS=$as_save_IFS 88624cd6a3aeSmrglt_ac_max=0 88634cd6a3aeSmrglt_ac_count=0 88644cd6a3aeSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 88654cd6a3aeSmrg# along with /bin/sed that truncates output. 88664cd6a3aeSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 88674cd6a3aeSmrg test ! -f $lt_ac_sed && continue 88684cd6a3aeSmrg cat /dev/null > conftest.in 88694cd6a3aeSmrg lt_ac_count=0 88704cd6a3aeSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 88714cd6a3aeSmrg # Check for GNU sed and select it if it is found. 88724cd6a3aeSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 88734cd6a3aeSmrg lt_cv_path_SED=$lt_ac_sed 88744cd6a3aeSmrg break 88758c9fbc29Smrg fi 88764cd6a3aeSmrg while true; do 88774cd6a3aeSmrg cat conftest.in conftest.in >conftest.tmp 88784cd6a3aeSmrg mv conftest.tmp conftest.in 88794cd6a3aeSmrg cp conftest.in conftest.nl 88804cd6a3aeSmrg echo >>conftest.nl 88814cd6a3aeSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 88824cd6a3aeSmrg cmp -s conftest.out conftest.nl || break 88834cd6a3aeSmrg # 10000 chars as input seems more than enough 88844cd6a3aeSmrg test $lt_ac_count -gt 10 && break 88854cd6a3aeSmrg lt_ac_count=`expr $lt_ac_count + 1` 88864cd6a3aeSmrg if test $lt_ac_count -gt $lt_ac_max; then 88874cd6a3aeSmrg lt_ac_max=$lt_ac_count 88884cd6a3aeSmrg lt_cv_path_SED=$lt_ac_sed 88894cd6a3aeSmrg fi 88904cd6a3aeSmrg done 88914cd6a3aeSmrgdone 88924cd6a3aeSmrg]) 88934cd6a3aeSmrgSED=$lt_cv_path_SED 88944cd6a3aeSmrgAC_SUBST([SED]) 88954cd6a3aeSmrgAC_MSG_RESULT([$SED]) 88964cd6a3aeSmrg])#AC_PROG_SED 88974cd6a3aeSmrg])#m4_ifndef 88984cd6a3aeSmrg 88994cd6a3aeSmrg# Old name: 89004cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 89014cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 89024cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 89034cd6a3aeSmrg 89044cd6a3aeSmrg 89054cd6a3aeSmrg# _LT_CHECK_SHELL_FEATURES 89064cd6a3aeSmrg# ------------------------ 89074cd6a3aeSmrg# Find out whether the shell is Bourne or XSI compatible, 89084cd6a3aeSmrg# or has some other useful features. 89094cd6a3aeSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 89104cd6a3aeSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 89114cd6a3aeSmrg# Try some XSI features 89124cd6a3aeSmrgxsi_shell=no 89134cd6a3aeSmrg( _lt_dummy="a/b/c" 89144cd6a3aeSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 89154cd6a3aeSmrg = c,a/b,b/c, \ 89164cd6a3aeSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 89174cd6a3aeSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 89184cd6a3aeSmrg && xsi_shell=yes 89194cd6a3aeSmrgAC_MSG_RESULT([$xsi_shell]) 89204cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 89214cd6a3aeSmrg 89224cd6a3aeSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 89234cd6a3aeSmrglt_shell_append=no 89244cd6a3aeSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 89254cd6a3aeSmrg >/dev/null 2>&1 \ 89264cd6a3aeSmrg && lt_shell_append=yes 89274cd6a3aeSmrgAC_MSG_RESULT([$lt_shell_append]) 89284cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 89294cd6a3aeSmrg 89304cd6a3aeSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 89314cd6a3aeSmrg lt_unset=unset 89324cd6a3aeSmrgelse 89334cd6a3aeSmrg lt_unset=false 89344cd6a3aeSmrgfi 89354cd6a3aeSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89364cd6a3aeSmrg 89374cd6a3aeSmrg# test EBCDIC or ASCII 89384cd6a3aeSmrgcase `echo X|tr X '\101'` in 89394cd6a3aeSmrg A) # ASCII based system 89404cd6a3aeSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 89414cd6a3aeSmrg lt_SP2NL='tr \040 \012' 89424cd6a3aeSmrg lt_NL2SP='tr \015\012 \040\040' 89434cd6a3aeSmrg ;; 89444cd6a3aeSmrg *) # EBCDIC based system 89454cd6a3aeSmrg lt_SP2NL='tr \100 \n' 89464cd6a3aeSmrg lt_NL2SP='tr \r\n \100\100' 89474cd6a3aeSmrg ;; 89484cd6a3aeSmrgesac 89494cd6a3aeSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 89504cd6a3aeSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 89514cd6a3aeSmrg])# _LT_CHECK_SHELL_FEATURES 89524cd6a3aeSmrg 89534cd6a3aeSmrg 89544cd6a3aeSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 89554cd6a3aeSmrg# ------------------------------------------------------ 89564cd6a3aeSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 89574cd6a3aeSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 89584cd6a3aeSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 89594cd6a3aeSmrg[dnl { 89604cd6a3aeSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 89614cd6a3aeSmrg$1 ()\ 89624cd6a3aeSmrg{\ 89634cd6a3aeSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 89644cd6a3aeSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 89654cd6a3aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89664cd6a3aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89674cd6a3aeSmrgtest 0 -eq $? || _lt_function_replace_fail=: 89684cd6a3aeSmrg]) 89694cd6a3aeSmrg 89704cd6a3aeSmrg 89714cd6a3aeSmrg# _LT_PROG_REPLACE_SHELLFNS 89724cd6a3aeSmrg# ------------------------- 89734cd6a3aeSmrg# Replace existing portable implementations of several shell functions with 89744cd6a3aeSmrg# equivalent extended shell implementations where those features are available.. 89754cd6a3aeSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 89764cd6a3aeSmrg[if test x"$xsi_shell" = xyes; then 89774cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 89784cd6a3aeSmrg case ${1} in 89794cd6a3aeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 89804cd6a3aeSmrg * ) func_dirname_result="${3}" ;; 89814cd6a3aeSmrg esac]) 89824cd6a3aeSmrg 89834cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 89844cd6a3aeSmrg func_basename_result="${1##*/}"]) 89854cd6a3aeSmrg 89864cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 89874cd6a3aeSmrg case ${1} in 89884cd6a3aeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 89894cd6a3aeSmrg * ) func_dirname_result="${3}" ;; 89904cd6a3aeSmrg esac 89914cd6a3aeSmrg func_basename_result="${1##*/}"]) 89924cd6a3aeSmrg 89934cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 89944cd6a3aeSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 89954cd6a3aeSmrg # positional parameters, so assign one to ordinary parameter first. 89964cd6a3aeSmrg func_stripname_result=${3} 89974cd6a3aeSmrg func_stripname_result=${func_stripname_result#"${1}"} 89984cd6a3aeSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 89994cd6a3aeSmrg 90004cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 90014cd6a3aeSmrg func_split_long_opt_name=${1%%=*} 90024cd6a3aeSmrg func_split_long_opt_arg=${1#*=}]) 90034cd6a3aeSmrg 90044cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 90054cd6a3aeSmrg func_split_short_opt_arg=${1#??} 90064cd6a3aeSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 90074cd6a3aeSmrg 90084cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 90094cd6a3aeSmrg case ${1} in 90104cd6a3aeSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 90114cd6a3aeSmrg *) func_lo2o_result=${1} ;; 90124cd6a3aeSmrg esac]) 90134cd6a3aeSmrg 90144cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 90154cd6a3aeSmrg 90164cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 90174cd6a3aeSmrg 90184cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 90194cd6a3aeSmrgfi 90204cd6a3aeSmrg 90214cd6a3aeSmrgif test x"$lt_shell_append" = xyes; then 90224cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90234cd6a3aeSmrg 90244cd6a3aeSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 90254cd6a3aeSmrg func_quote_for_eval "${2}" 90264cd6a3aeSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 90274cd6a3aeSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90284cd6a3aeSmrg 90294cd6a3aeSmrg # Save a `func_append' function call where possible by direct use of '+=' 90304cd6a3aeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 90314cd6a3aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90324cd6a3aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90334cd6a3aeSmrg test 0 -eq $? || _lt_function_replace_fail=: 90344cd6a3aeSmrgelse 90354cd6a3aeSmrg # Save a `func_append' function call even when '+=' is not available 90364cd6a3aeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 90374cd6a3aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90384cd6a3aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90394cd6a3aeSmrg test 0 -eq $? || _lt_function_replace_fail=: 90404cd6a3aeSmrgfi 90414cd6a3aeSmrg 90424cd6a3aeSmrgif test x"$_lt_function_replace_fail" = x":"; then 90434cd6a3aeSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 90444cd6a3aeSmrgfi 90454cd6a3aeSmrg]) 90464cd6a3aeSmrg 90474cd6a3aeSmrg# _LT_PATH_CONVERSION_FUNCTIONS 90484cd6a3aeSmrg# ----------------------------- 90494cd6a3aeSmrg# Determine which file name conversion functions should be used by 90504cd6a3aeSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 90514cd6a3aeSmrg# for certain cross-compile configurations and native mingw. 90524cd6a3aeSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 90534cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 90544cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 90554cd6a3aeSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 90564cd6a3aeSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 90574cd6a3aeSmrg[case $host in 90584cd6a3aeSmrg *-*-mingw* ) 90594cd6a3aeSmrg case $build in 90604cd6a3aeSmrg *-*-mingw* ) # actually msys 90614cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 90624cd6a3aeSmrg ;; 90634cd6a3aeSmrg *-*-cygwin* ) 90644cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 90654cd6a3aeSmrg ;; 90664cd6a3aeSmrg * ) # otherwise, assume *nix 90674cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 90684cd6a3aeSmrg ;; 90694cd6a3aeSmrg esac 90704cd6a3aeSmrg ;; 90714cd6a3aeSmrg *-*-cygwin* ) 90724cd6a3aeSmrg case $build in 90734cd6a3aeSmrg *-*-mingw* ) # actually msys 90744cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 90754cd6a3aeSmrg ;; 90764cd6a3aeSmrg *-*-cygwin* ) 90774cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 90784cd6a3aeSmrg ;; 90794cd6a3aeSmrg * ) # otherwise, assume *nix 90804cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 90814cd6a3aeSmrg ;; 90824cd6a3aeSmrg esac 90834cd6a3aeSmrg ;; 90844cd6a3aeSmrg * ) # unhandled hosts (and "normal" native builds) 90854cd6a3aeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 90864cd6a3aeSmrg ;; 90874cd6a3aeSmrgesac 90884cd6a3aeSmrg]) 90894cd6a3aeSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 90904cd6a3aeSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 90914cd6a3aeSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 90924cd6a3aeSmrg [0], [convert $build file names to $host format])dnl 90934cd6a3aeSmrg 90944cd6a3aeSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 90954cd6a3aeSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 90964cd6a3aeSmrg[#assume ordinary cross tools, or native build. 90974cd6a3aeSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 90984cd6a3aeSmrgcase $host in 90994cd6a3aeSmrg *-*-mingw* ) 91004cd6a3aeSmrg case $build in 91014cd6a3aeSmrg *-*-mingw* ) # actually msys 91024cd6a3aeSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 91034cd6a3aeSmrg ;; 91044cd6a3aeSmrg esac 91054cd6a3aeSmrg ;; 91064cd6a3aeSmrgesac 91074cd6a3aeSmrg]) 91084cd6a3aeSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 91094cd6a3aeSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 91104cd6a3aeSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 91114cd6a3aeSmrg [0], [convert $build files to toolchain format])dnl 91124cd6a3aeSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 91134cd6a3aeSmrg 91144cd6a3aeSmrg# Helper functions for option handling. -*- Autoconf -*- 91154cd6a3aeSmrg# 91164cd6a3aeSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 91174cd6a3aeSmrg# Inc. 91184cd6a3aeSmrg# Written by Gary V. Vaughan, 2004 91194cd6a3aeSmrg# 91204cd6a3aeSmrg# This file is free software; the Free Software Foundation gives 91214cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without 91224cd6a3aeSmrg# modifications, as long as this notice is preserved. 91234cd6a3aeSmrg 91244cd6a3aeSmrg# serial 7 ltoptions.m4 91254cd6a3aeSmrg 91264cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 91274cd6a3aeSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 91284cd6a3aeSmrg 91298c9fbc29Smrg 91304cd6a3aeSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 91314cd6a3aeSmrg# ------------------------------------------ 91324cd6a3aeSmrgm4_define([_LT_MANGLE_OPTION], 91334cd6a3aeSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 91348c9fbc29Smrg 91358c9fbc29Smrg 91364cd6a3aeSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 91374cd6a3aeSmrg# --------------------------------------- 91384cd6a3aeSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 91394cd6a3aeSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 91404cd6a3aeSmrg# saved as a flag. 91414cd6a3aeSmrgm4_define([_LT_SET_OPTION], 91424cd6a3aeSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 91434cd6a3aeSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 91444cd6a3aeSmrg _LT_MANGLE_DEFUN([$1], [$2]), 91454cd6a3aeSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 91464cd6a3aeSmrg]) 91478c9fbc29Smrg 91488c9fbc29Smrg 91494cd6a3aeSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 91504cd6a3aeSmrg# ------------------------------------------------------------ 91514cd6a3aeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 91524cd6a3aeSmrgm4_define([_LT_IF_OPTION], 91534cd6a3aeSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 91544cd6a3aeSmrg 91554cd6a3aeSmrg 91564cd6a3aeSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 91574cd6a3aeSmrg# ------------------------------------------------------- 91584cd6a3aeSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 91594cd6a3aeSmrg# are set. 91604cd6a3aeSmrgm4_define([_LT_UNLESS_OPTIONS], 91614cd6a3aeSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91624cd6a3aeSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 91634cd6a3aeSmrg [m4_define([$0_found])])])[]dnl 91644cd6a3aeSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 91654cd6a3aeSmrg])[]dnl 91664cd6a3aeSmrg]) 91678c9fbc29Smrg 91688c9fbc29Smrg 91694cd6a3aeSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 91704cd6a3aeSmrg# ---------------------------------------- 91714cd6a3aeSmrg# OPTION-LIST is a space-separated list of Libtool options associated 91724cd6a3aeSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 91734cd6a3aeSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 91744cd6a3aeSmrg# the unknown option and exit. 91754cd6a3aeSmrgm4_defun([_LT_SET_OPTIONS], 91764cd6a3aeSmrg[# Set options 91774cd6a3aeSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91784cd6a3aeSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 91794cd6a3aeSmrg 91804cd6a3aeSmrgm4_if([$1],[LT_INIT],[ 91814cd6a3aeSmrg dnl 91824cd6a3aeSmrg dnl Simply set some default values (i.e off) if boolean options were not 91834cd6a3aeSmrg dnl specified: 91844cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 91854cd6a3aeSmrg ]) 91864cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 91874cd6a3aeSmrg ]) 91884cd6a3aeSmrg dnl 91894cd6a3aeSmrg dnl If no reference was made to various pairs of opposing options, then 91904cd6a3aeSmrg dnl we run the default mode handler for the pair. For example, if neither 91914cd6a3aeSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 91924cd6a3aeSmrg dnl archives by default: 91934cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 91944cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 91954cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 91964cd6a3aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 91974cd6a3aeSmrg [_LT_ENABLE_FAST_INSTALL]) 91984cd6a3aeSmrg ]) 91994cd6a3aeSmrg])# _LT_SET_OPTIONS 92004cd6a3aeSmrg 92014cd6a3aeSmrg 92024cd6a3aeSmrg 92034cd6a3aeSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 92044cd6a3aeSmrg# ----------------------------------------- 92054cd6a3aeSmrgm4_define([_LT_MANGLE_DEFUN], 92064cd6a3aeSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92074cd6a3aeSmrg 92084cd6a3aeSmrg 92094cd6a3aeSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 92104cd6a3aeSmrg# ----------------------------------------------- 92114cd6a3aeSmrgm4_define([LT_OPTION_DEFINE], 92124cd6a3aeSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 92134cd6a3aeSmrg])# LT_OPTION_DEFINE 92144cd6a3aeSmrg 92154cd6a3aeSmrg 92164cd6a3aeSmrg# dlopen 92174cd6a3aeSmrg# ------ 92184cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 92194cd6a3aeSmrg]) 92204cd6a3aeSmrg 92214cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 92224cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 92234cd6a3aeSmrgAC_DIAGNOSE([obsolete], 92244cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92254cd6a3aeSmrgput the `dlopen' option into LT_INIT's first parameter.]) 92264cd6a3aeSmrg]) 92274cd6a3aeSmrg 92284cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 92294cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 92304cd6a3aeSmrg 92314cd6a3aeSmrg 92324cd6a3aeSmrg# win32-dll 92334cd6a3aeSmrg# --------- 92344cd6a3aeSmrg# Declare package support for building win32 dll's. 92354cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 92364cd6a3aeSmrg[enable_win32_dll=yes 92374cd6a3aeSmrg 92384cd6a3aeSmrgcase $host in 92394cd6a3aeSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 92404cd6a3aeSmrg AC_CHECK_TOOL(AS, as, false) 92414cd6a3aeSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 92424cd6a3aeSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 92434cd6a3aeSmrg ;; 92444cd6a3aeSmrgesac 92454cd6a3aeSmrg 92464cd6a3aeSmrgtest -z "$AS" && AS=as 92474cd6a3aeSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 92484cd6a3aeSmrg 92494cd6a3aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 92504cd6a3aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 92514cd6a3aeSmrg 92524cd6a3aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 92534cd6a3aeSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 92544cd6a3aeSmrg])# win32-dll 92554cd6a3aeSmrg 92564cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 92574cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 92584cd6a3aeSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 92594cd6a3aeSmrgAC_DIAGNOSE([obsolete], 92604cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92614cd6a3aeSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 92624cd6a3aeSmrg]) 92634cd6a3aeSmrg 92644cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 92654cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 92664cd6a3aeSmrg 92674cd6a3aeSmrg 92684cd6a3aeSmrg# _LT_ENABLE_SHARED([DEFAULT]) 92694cd6a3aeSmrg# ---------------------------- 92704cd6a3aeSmrg# implement the --enable-shared flag, and supports the `shared' and 92714cd6a3aeSmrg# `disable-shared' LT_INIT options. 92724cd6a3aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92734cd6a3aeSmrgm4_define([_LT_ENABLE_SHARED], 92744cd6a3aeSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 92754cd6a3aeSmrgAC_ARG_ENABLE([shared], 92764cd6a3aeSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 92774cd6a3aeSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 92784cd6a3aeSmrg [p=${PACKAGE-default} 92794cd6a3aeSmrg case $enableval in 92804cd6a3aeSmrg yes) enable_shared=yes ;; 92814cd6a3aeSmrg no) enable_shared=no ;; 92824cd6a3aeSmrg *) 92838c9fbc29Smrg enable_shared=no 92844cd6a3aeSmrg # Look at the argument we got. We use all the common list separators. 92854cd6a3aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92864cd6a3aeSmrg for pkg in $enableval; do 92874cd6a3aeSmrg IFS="$lt_save_ifs" 92884cd6a3aeSmrg if test "X$pkg" = "X$p"; then 92894cd6a3aeSmrg enable_shared=yes 92904cd6a3aeSmrg fi 92914cd6a3aeSmrg done 92924cd6a3aeSmrg IFS="$lt_save_ifs" 92938c9fbc29Smrg ;; 92944cd6a3aeSmrg esac], 92954cd6a3aeSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 92968c9fbc29Smrg 92974cd6a3aeSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 92984cd6a3aeSmrg [Whether or not to build shared libraries]) 92994cd6a3aeSmrg])# _LT_ENABLE_SHARED 93008c9fbc29Smrg 93014cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 93024cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 93034cd6a3aeSmrg 93044cd6a3aeSmrg# Old names: 93054cd6a3aeSmrgAC_DEFUN([AC_ENABLE_SHARED], 93064cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 93074cd6a3aeSmrg]) 93084cd6a3aeSmrg 93094cd6a3aeSmrgAC_DEFUN([AC_DISABLE_SHARED], 93104cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 93114cd6a3aeSmrg]) 93124cd6a3aeSmrg 93134cd6a3aeSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 93144cd6a3aeSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 93154cd6a3aeSmrg 93164cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 93174cd6a3aeSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 93184cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 93198c9fbc29Smrg 93204cd6a3aeSmrg 93214cd6a3aeSmrg 93224cd6a3aeSmrg# _LT_ENABLE_STATIC([DEFAULT]) 93234cd6a3aeSmrg# ---------------------------- 93244cd6a3aeSmrg# implement the --enable-static flag, and support the `static' and 93254cd6a3aeSmrg# `disable-static' LT_INIT options. 93264cd6a3aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93274cd6a3aeSmrgm4_define([_LT_ENABLE_STATIC], 93284cd6a3aeSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 93294cd6a3aeSmrgAC_ARG_ENABLE([static], 93304cd6a3aeSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 93314cd6a3aeSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 93324cd6a3aeSmrg [p=${PACKAGE-default} 93334cd6a3aeSmrg case $enableval in 93344cd6a3aeSmrg yes) enable_static=yes ;; 93354cd6a3aeSmrg no) enable_static=no ;; 93368c9fbc29Smrg *) 93374cd6a3aeSmrg enable_static=no 93384cd6a3aeSmrg # Look at the argument we got. We use all the common list separators. 93394cd6a3aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93404cd6a3aeSmrg for pkg in $enableval; do 93414cd6a3aeSmrg IFS="$lt_save_ifs" 93424cd6a3aeSmrg if test "X$pkg" = "X$p"; then 93434cd6a3aeSmrg enable_static=yes 93444cd6a3aeSmrg fi 93454cd6a3aeSmrg done 93464cd6a3aeSmrg IFS="$lt_save_ifs" 93478c9fbc29Smrg ;; 93484cd6a3aeSmrg esac], 93494cd6a3aeSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 93508c9fbc29Smrg 93514cd6a3aeSmrg _LT_DECL([build_old_libs], [enable_static], [0], 93524cd6a3aeSmrg [Whether or not to build static libraries]) 93534cd6a3aeSmrg])# _LT_ENABLE_STATIC 93548c9fbc29Smrg 93554cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 93564cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 93578c9fbc29Smrg 93584cd6a3aeSmrg# Old names: 93594cd6a3aeSmrgAC_DEFUN([AC_ENABLE_STATIC], 93604cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 93614cd6a3aeSmrg]) 93628c9fbc29Smrg 93634cd6a3aeSmrgAC_DEFUN([AC_DISABLE_STATIC], 93644cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 93654cd6a3aeSmrg]) 93668c9fbc29Smrg 93674cd6a3aeSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 93684cd6a3aeSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 93698c9fbc29Smrg 93704cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 93714cd6a3aeSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 93724cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 93738c9fbc29Smrg 93744e411241Smrg 93758c9fbc29Smrg 93764cd6a3aeSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 93774cd6a3aeSmrg# ---------------------------------- 93784cd6a3aeSmrg# implement the --enable-fast-install flag, and support the `fast-install' 93794cd6a3aeSmrg# and `disable-fast-install' LT_INIT options. 93804cd6a3aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93814cd6a3aeSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 93824cd6a3aeSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 93834cd6a3aeSmrgAC_ARG_ENABLE([fast-install], 93844cd6a3aeSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 93854cd6a3aeSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 93864cd6a3aeSmrg [p=${PACKAGE-default} 93874cd6a3aeSmrg case $enableval in 93884cd6a3aeSmrg yes) enable_fast_install=yes ;; 93894cd6a3aeSmrg no) enable_fast_install=no ;; 93904cd6a3aeSmrg *) 93914cd6a3aeSmrg enable_fast_install=no 93924cd6a3aeSmrg # Look at the argument we got. We use all the common list separators. 93934cd6a3aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93944cd6a3aeSmrg for pkg in $enableval; do 93954cd6a3aeSmrg IFS="$lt_save_ifs" 93964cd6a3aeSmrg if test "X$pkg" = "X$p"; then 93974cd6a3aeSmrg enable_fast_install=yes 93984cd6a3aeSmrg fi 93994cd6a3aeSmrg done 94004cd6a3aeSmrg IFS="$lt_save_ifs" 94018c9fbc29Smrg ;; 94024cd6a3aeSmrg esac], 94034cd6a3aeSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 94048c9fbc29Smrg 94054cd6a3aeSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 94064cd6a3aeSmrg [Whether or not to optimize for fast installation])dnl 94074cd6a3aeSmrg])# _LT_ENABLE_FAST_INSTALL 94084cd6a3aeSmrg 94094cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 94104cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 94114cd6a3aeSmrg 94124cd6a3aeSmrg# Old names: 94134cd6a3aeSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 94144cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 94154cd6a3aeSmrgAC_DIAGNOSE([obsolete], 94164cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94174cd6a3aeSmrgthe `fast-install' option into LT_INIT's first parameter.]) 94184cd6a3aeSmrg]) 94194cd6a3aeSmrg 94204cd6a3aeSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 94214cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 94224cd6a3aeSmrgAC_DIAGNOSE([obsolete], 94234cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94244cd6a3aeSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 94254cd6a3aeSmrg]) 94264cd6a3aeSmrg 94274cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 94284cd6a3aeSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 94294cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 94304cd6a3aeSmrg 94314cd6a3aeSmrg 94324cd6a3aeSmrg# _LT_WITH_PIC([MODE]) 94334cd6a3aeSmrg# -------------------- 94344cd6a3aeSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 94354cd6a3aeSmrg# LT_INIT options. 94364cd6a3aeSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 94374cd6a3aeSmrgm4_define([_LT_WITH_PIC], 94384cd6a3aeSmrg[AC_ARG_WITH([pic], 943970728a38Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 94404cd6a3aeSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 944170728a38Smrg [lt_p=${PACKAGE-default} 944270728a38Smrg case $withval in 944370728a38Smrg yes|no) pic_mode=$withval ;; 944470728a38Smrg *) 944570728a38Smrg pic_mode=default 944670728a38Smrg # Look at the argument we got. We use all the common list separators. 944770728a38Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 944870728a38Smrg for lt_pkg in $withval; do 944970728a38Smrg IFS="$lt_save_ifs" 945070728a38Smrg if test "X$lt_pkg" = "X$lt_p"; then 945170728a38Smrg pic_mode=yes 945270728a38Smrg fi 945370728a38Smrg done 945470728a38Smrg IFS="$lt_save_ifs" 945570728a38Smrg ;; 945670728a38Smrg esac], 94574cd6a3aeSmrg [pic_mode=default]) 94584cd6a3aeSmrg 94594cd6a3aeSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 94604cd6a3aeSmrg 94614cd6a3aeSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 94624cd6a3aeSmrg])# _LT_WITH_PIC 94634cd6a3aeSmrg 94644cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 94654cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 94664cd6a3aeSmrg 94674cd6a3aeSmrg# Old name: 94684cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 94694cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 94704cd6a3aeSmrgAC_DIAGNOSE([obsolete], 94714cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 94724cd6a3aeSmrgput the `pic-only' option into LT_INIT's first parameter.]) 94734cd6a3aeSmrg]) 94744cd6a3aeSmrg 94754cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility: 94764cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 94774cd6a3aeSmrg 94784cd6a3aeSmrg 94794cd6a3aeSmrgm4_define([_LTDL_MODE], []) 94804cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 94814cd6a3aeSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 94824cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 94834cd6a3aeSmrg [m4_define([_LTDL_MODE], [recursive])]) 94844cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 94854cd6a3aeSmrg [m4_define([_LTDL_MODE], [subproject])]) 94864cd6a3aeSmrg 94874cd6a3aeSmrgm4_define([_LTDL_TYPE], []) 94884cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 94894cd6a3aeSmrg [m4_define([_LTDL_TYPE], [installable])]) 94904cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 94914cd6a3aeSmrg [m4_define([_LTDL_TYPE], [convenience])]) 94924cd6a3aeSmrg 94934cd6a3aeSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 94944cd6a3aeSmrg# 94954cd6a3aeSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 94964cd6a3aeSmrg# Written by Gary V. Vaughan, 2004 94974cd6a3aeSmrg# 94984cd6a3aeSmrg# This file is free software; the Free Software Foundation gives 94994cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without 95004cd6a3aeSmrg# modifications, as long as this notice is preserved. 95014cd6a3aeSmrg 95024cd6a3aeSmrg# serial 6 ltsugar.m4 95034cd6a3aeSmrg 95044cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 95054cd6a3aeSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 95064cd6a3aeSmrg 95074cd6a3aeSmrg 95084cd6a3aeSmrg# lt_join(SEP, ARG1, [ARG2...]) 95094cd6a3aeSmrg# ----------------------------- 95104cd6a3aeSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 95114cd6a3aeSmrg# associated separator. 95124cd6a3aeSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 95134cd6a3aeSmrg# versions in m4sugar had bugs. 95144cd6a3aeSmrgm4_define([lt_join], 95154cd6a3aeSmrg[m4_if([$#], [1], [], 95164cd6a3aeSmrg [$#], [2], [[$2]], 95174cd6a3aeSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 95184cd6a3aeSmrgm4_define([_lt_join], 95194cd6a3aeSmrg[m4_if([$#$2], [2], [], 95204cd6a3aeSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 95214cd6a3aeSmrg 95224cd6a3aeSmrg 95234cd6a3aeSmrg# lt_car(LIST) 95244cd6a3aeSmrg# lt_cdr(LIST) 95254cd6a3aeSmrg# ------------ 95264cd6a3aeSmrg# Manipulate m4 lists. 95274cd6a3aeSmrg# These macros are necessary as long as will still need to support 95284cd6a3aeSmrg# Autoconf-2.59 which quotes differently. 95294cd6a3aeSmrgm4_define([lt_car], [[$1]]) 95304cd6a3aeSmrgm4_define([lt_cdr], 95314cd6a3aeSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 95324cd6a3aeSmrg [$#], 1, [], 95334cd6a3aeSmrg [m4_dquote(m4_shift($@))])]) 95344cd6a3aeSmrgm4_define([lt_unquote], $1) 95354cd6a3aeSmrg 95364cd6a3aeSmrg 95374cd6a3aeSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 95384cd6a3aeSmrg# ------------------------------------------ 95394cd6a3aeSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 95404cd6a3aeSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 95414cd6a3aeSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 95424cd6a3aeSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 95434cd6a3aeSmrg# than defined and empty). 95444cd6a3aeSmrg# 95454cd6a3aeSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 95464cd6a3aeSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 95474cd6a3aeSmrgm4_define([lt_append], 95484cd6a3aeSmrg[m4_define([$1], 95494cd6a3aeSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 95504cd6a3aeSmrg 95514cd6a3aeSmrg 95524cd6a3aeSmrg 95534cd6a3aeSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 95544cd6a3aeSmrg# ---------------------------------------------------------- 95554cd6a3aeSmrg# Produce a SEP delimited list of all paired combinations of elements of 95564cd6a3aeSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 95574cd6a3aeSmrg# has the form PREFIXmINFIXSUFFIXn. 95584cd6a3aeSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 95594cd6a3aeSmrgm4_define([lt_combine], 95604cd6a3aeSmrg[m4_if(m4_eval([$# > 3]), [1], 95614cd6a3aeSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 95624cd6a3aeSmrg[[m4_foreach([_Lt_prefix], [$2], 95634cd6a3aeSmrg [m4_foreach([_Lt_suffix], 95644cd6a3aeSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 95654cd6a3aeSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 95664cd6a3aeSmrg 95674cd6a3aeSmrg 95684cd6a3aeSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 95694cd6a3aeSmrg# ----------------------------------------------------------------------- 95704cd6a3aeSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 95714cd6a3aeSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 95724cd6a3aeSmrgm4_define([lt_if_append_uniq], 95734cd6a3aeSmrg[m4_ifdef([$1], 95744cd6a3aeSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 95754cd6a3aeSmrg [lt_append([$1], [$2], [$3])$4], 95764cd6a3aeSmrg [$5])], 95774cd6a3aeSmrg [lt_append([$1], [$2], [$3])$4])]) 95784cd6a3aeSmrg 95794cd6a3aeSmrg 95804cd6a3aeSmrg# lt_dict_add(DICT, KEY, VALUE) 95814cd6a3aeSmrg# ----------------------------- 95824cd6a3aeSmrgm4_define([lt_dict_add], 95834cd6a3aeSmrg[m4_define([$1($2)], [$3])]) 95848c9fbc29Smrg 95858c9fbc29Smrg 95864cd6a3aeSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 95874cd6a3aeSmrg# -------------------------------------------- 95884cd6a3aeSmrgm4_define([lt_dict_add_subkey], 95894cd6a3aeSmrg[m4_define([$1($2:$3)], [$4])]) 95908c9fbc29Smrg 95918c9fbc29Smrg 95924cd6a3aeSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 95934cd6a3aeSmrg# ---------------------------------- 95944cd6a3aeSmrgm4_define([lt_dict_fetch], 95954cd6a3aeSmrg[m4_ifval([$3], 95964cd6a3aeSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 95974cd6a3aeSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 95988c9fbc29Smrg 95994cd6a3aeSmrg 96004cd6a3aeSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 96014cd6a3aeSmrg# ----------------------------------------------------------------- 96024cd6a3aeSmrgm4_define([lt_if_dict_fetch], 96034cd6a3aeSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 96044cd6a3aeSmrg [$5], 96054cd6a3aeSmrg [$6])]) 96064cd6a3aeSmrg 96074cd6a3aeSmrg 96084cd6a3aeSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 96094cd6a3aeSmrg# -------------------------------------------------------------- 96104cd6a3aeSmrgm4_define([lt_dict_filter], 96114cd6a3aeSmrg[m4_if([$5], [], [], 96124cd6a3aeSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 96134cd6a3aeSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 96144cd6a3aeSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 96158c9fbc29Smrg]) 96168c9fbc29Smrg 96174cd6a3aeSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 96188c9fbc29Smrg# 96194cd6a3aeSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 96204cd6a3aeSmrg# Written by Scott James Remnant, 2004 96218c9fbc29Smrg# 96224cd6a3aeSmrg# This file is free software; the Free Software Foundation gives 96234cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without 96244cd6a3aeSmrg# modifications, as long as this notice is preserved. 96258c9fbc29Smrg 96264cd6a3aeSmrg# @configure_input@ 96278c9fbc29Smrg 962870728a38Smrg# serial 3337 ltversion.m4 96294cd6a3aeSmrg# This file is part of GNU Libtool 96308c9fbc29Smrg 963170728a38Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 963270728a38Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 96338c9fbc29Smrg 96344cd6a3aeSmrgAC_DEFUN([LTVERSION_VERSION], 963570728a38Smrg[macro_version='2.4.2' 963670728a38Smrgmacro_revision='1.3337' 96374cd6a3aeSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 96384cd6a3aeSmrg_LT_DECL(, macro_revision, 0) 96394cd6a3aeSmrg]) 96408c9fbc29Smrg 96414cd6a3aeSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 96424cd6a3aeSmrg# 96434cd6a3aeSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 96444cd6a3aeSmrg# Written by Scott James Remnant, 2004. 96454cd6a3aeSmrg# 96464cd6a3aeSmrg# This file is free software; the Free Software Foundation gives 96474cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without 96484cd6a3aeSmrg# modifications, as long as this notice is preserved. 96498c9fbc29Smrg 96504cd6a3aeSmrg# serial 5 lt~obsolete.m4 96518c9fbc29Smrg 96524cd6a3aeSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 96534cd6a3aeSmrg# 96544cd6a3aeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 96554cd6a3aeSmrg# which have later been changed to m4_define as they aren't part of the 96564cd6a3aeSmrg# exported API, or moved to Autoconf or Automake where they belong. 96574cd6a3aeSmrg# 96584cd6a3aeSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 96594cd6a3aeSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 96604cd6a3aeSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 96614cd6a3aeSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 96624cd6a3aeSmrg# and doesn't know about Autoconf macros at all.) 96634cd6a3aeSmrg# 96644cd6a3aeSmrg# So we provide this file, which has a silly filename so it's always 96654cd6a3aeSmrg# included after everything else. This provides aclocal with the 96664cd6a3aeSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 96674cd6a3aeSmrg# because those macros already exist, or will be overwritten later. 96684cd6a3aeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 96694cd6a3aeSmrg# 96704cd6a3aeSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 96714cd6a3aeSmrg# Yes, that means every name once taken will need to remain here until 96724cd6a3aeSmrg# we give up compatibility with versions before 1.7, at which point 96734cd6a3aeSmrg# we need to keep only those names which we still refer to. 96744cd6a3aeSmrg 96754cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 96764cd6a3aeSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 96774cd6a3aeSmrg 96784cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 96794cd6a3aeSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 96804cd6a3aeSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 96814cd6a3aeSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 96824cd6a3aeSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 96834cd6a3aeSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 96844cd6a3aeSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 96854cd6a3aeSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 96864cd6a3aeSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 96874cd6a3aeSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 96884cd6a3aeSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 96894cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 96904cd6a3aeSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 96914cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 96924cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 96934cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 96944cd6a3aeSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 96954cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 96964cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 96974cd6a3aeSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 96984cd6a3aeSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 96994cd6a3aeSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 97004cd6a3aeSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 97014cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 97024cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 97034cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 97044cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 97054cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 97064cd6a3aeSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 97074cd6a3aeSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 97084cd6a3aeSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 97094cd6a3aeSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 97104cd6a3aeSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 97114cd6a3aeSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 97124cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 97134cd6a3aeSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 97144cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 97154cd6a3aeSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 97164cd6a3aeSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 97174cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 97184cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 97194cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 97204cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 97214cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 97224cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 97234cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 97244cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 97254cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 97264cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 97274cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 97284cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 97294cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 97304cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 97314cd6a3aeSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 97324cd6a3aeSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 97334cd6a3aeSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 97344cd6a3aeSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 97354cd6a3aeSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97364cd6a3aeSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 97374cd6a3aeSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 97384cd6a3aeSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 97398c9fbc29Smrg 974070728a38Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 974170728a38Smrg# 974270728a38Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 974370728a38Smrg# 974470728a38Smrg# This program is free software; you can redistribute it and/or modify 974570728a38Smrg# it under the terms of the GNU General Public License as published by 974670728a38Smrg# the Free Software Foundation; either version 2 of the License, or 974770728a38Smrg# (at your option) any later version. 974870728a38Smrg# 974970728a38Smrg# This program is distributed in the hope that it will be useful, but 975070728a38Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 975170728a38Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 975270728a38Smrg# General Public License for more details. 975370728a38Smrg# 975470728a38Smrg# You should have received a copy of the GNU General Public License 975570728a38Smrg# along with this program; if not, write to the Free Software 975670728a38Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 975770728a38Smrg# 975870728a38Smrg# As a special exception to the GNU General Public License, if you 975970728a38Smrg# distribute this file as part of a program that contains a 976070728a38Smrg# configuration script generated by Autoconf, you may include it under 976170728a38Smrg# the same distribution terms that you use for the rest of that program. 976270728a38Smrg 976370728a38Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 976470728a38Smrg# ---------------------------------- 976570728a38SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 976670728a38Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 976770728a38Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 976870728a38SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 976970728a38Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 977070728a38Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 977170728a38Smrgfi 977270728a38Smrgif test -n "$PKG_CONFIG"; then 977370728a38Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 977470728a38Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 977570728a38Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 977670728a38Smrg AC_MSG_RESULT([yes]) 977770728a38Smrg else 977870728a38Smrg AC_MSG_RESULT([no]) 977970728a38Smrg PKG_CONFIG="" 978070728a38Smrg fi 978170728a38Smrg 978270728a38Smrgfi[]dnl 978370728a38Smrg])# PKG_PROG_PKG_CONFIG 978470728a38Smrg 978570728a38Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 978670728a38Smrg# 978770728a38Smrg# Check to see whether a particular set of modules exists. Similar 978870728a38Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 978970728a38Smrg# 979070728a38Smrg# 979170728a38Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 979270728a38Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 979370728a38Smrg# PKG_CHECK_EXISTS manually 979470728a38Smrg# -------------------------------------------------------------- 979570728a38SmrgAC_DEFUN([PKG_CHECK_EXISTS], 979670728a38Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 979770728a38Smrgif test -n "$PKG_CONFIG" && \ 979870728a38Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 979970728a38Smrg m4_ifval([$2], [$2], [:]) 980070728a38Smrgm4_ifvaln([$3], [else 980170728a38Smrg $3])dnl 980270728a38Smrgfi]) 980370728a38Smrg 980470728a38Smrg 980570728a38Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 980670728a38Smrg# --------------------------------------------- 980770728a38Smrgm4_define([_PKG_CONFIG], 980870728a38Smrg[if test -n "$$1"; then 980970728a38Smrg pkg_cv_[]$1="$$1" 981070728a38Smrg elif test -n "$PKG_CONFIG"; then 981170728a38Smrg PKG_CHECK_EXISTS([$3], 981270728a38Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 981370728a38Smrg [pkg_failed=yes]) 981470728a38Smrg else 981570728a38Smrg pkg_failed=untried 981670728a38Smrgfi[]dnl 981770728a38Smrg])# _PKG_CONFIG 981870728a38Smrg 981970728a38Smrg# _PKG_SHORT_ERRORS_SUPPORTED 982070728a38Smrg# ----------------------------- 982170728a38SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 982270728a38Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 982370728a38Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 982470728a38Smrg _pkg_short_errors_supported=yes 982570728a38Smrgelse 982670728a38Smrg _pkg_short_errors_supported=no 982770728a38Smrgfi[]dnl 982870728a38Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 982970728a38Smrg 983070728a38Smrg 983170728a38Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 983270728a38Smrg# [ACTION-IF-NOT-FOUND]) 983370728a38Smrg# 983470728a38Smrg# 983570728a38Smrg# Note that if there is a possibility the first call to 983670728a38Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 983770728a38Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 983870728a38Smrg# 983970728a38Smrg# 984070728a38Smrg# -------------------------------------------------------------- 984170728a38SmrgAC_DEFUN([PKG_CHECK_MODULES], 984270728a38Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 984370728a38SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 984470728a38SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 984570728a38Smrg 984670728a38Smrgpkg_failed=no 984770728a38SmrgAC_MSG_CHECKING([for $1]) 984870728a38Smrg 984970728a38Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 985070728a38Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 985170728a38Smrg 985270728a38Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 985370728a38Smrgand $1[]_LIBS to avoid the need to call pkg-config. 985470728a38SmrgSee the pkg-config man page for more details.]) 985570728a38Smrg 985670728a38Smrgif test $pkg_failed = yes; then 985770728a38Smrg _PKG_SHORT_ERRORS_SUPPORTED 985870728a38Smrg if test $_pkg_short_errors_supported = yes; then 985970728a38Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 986070728a38Smrg else 986170728a38Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 986270728a38Smrg fi 986370728a38Smrg # Put the nasty error message in config.log where it belongs 986470728a38Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 986570728a38Smrg 986670728a38Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 986770728a38Smrg[Package requirements ($2) were not met: 986870728a38Smrg 986970728a38Smrg$$1_PKG_ERRORS 987070728a38Smrg 987170728a38SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 987270728a38Smrginstalled software in a non-standard prefix. 987370728a38Smrg 987470728a38Smrg_PKG_TEXT 987570728a38Smrg])], 987670728a38Smrg [AC_MSG_RESULT([no]) 987770728a38Smrg $4]) 987870728a38Smrgelif test $pkg_failed = untried; then 987970728a38Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 988070728a38Smrg[The pkg-config script could not be found or is too old. Make sure it 988170728a38Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 988270728a38Smrgpath to pkg-config. 988370728a38Smrg 988470728a38Smrg_PKG_TEXT 988570728a38Smrg 988670728a38SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 988770728a38Smrg [$4]) 988870728a38Smrgelse 988970728a38Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 989070728a38Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 989170728a38Smrg AC_MSG_RESULT([yes]) 989270728a38Smrg ifelse([$3], , :, [$3]) 989370728a38Smrgfi[]dnl 989470728a38Smrg])# PKG_CHECK_MODULES 989570728a38Smrg 98964cd6a3aeSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98974cd6a3aeSmrgdnl 98984cd6a3aeSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 989970728a38Smrgdnl 99004cd6a3aeSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 99014cd6a3aeSmrgdnl copy of this software and associated documentation files (the "Software"), 99024cd6a3aeSmrgdnl to deal in the Software without restriction, including without limitation 99034cd6a3aeSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99044cd6a3aeSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 99054cd6a3aeSmrgdnl Software is furnished to do so, subject to the following conditions: 99064cd6a3aeSmrgdnl 99074cd6a3aeSmrgdnl The above copyright notice and this permission notice (including the next 99084cd6a3aeSmrgdnl paragraph) shall be included in all copies or substantial portions of the 99094cd6a3aeSmrgdnl Software. 99104cd6a3aeSmrgdnl 99114cd6a3aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99124cd6a3aeSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99134cd6a3aeSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99144cd6a3aeSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99154cd6a3aeSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99164cd6a3aeSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99174cd6a3aeSmrgdnl DEALINGS IN THE SOFTWARE. 99188c9fbc29Smrg 99194cd6a3aeSmrg# XORG_MACROS_VERSION(required-version) 99204cd6a3aeSmrg# ------------------------------------- 99214cd6a3aeSmrg# Minimum version: 1.1.0 99224cd6a3aeSmrg# 99234cd6a3aeSmrg# If you're using a macro added in Version 1.1 or newer, include this in 99244cd6a3aeSmrg# your configure.ac with the minimum required version, such as: 99254cd6a3aeSmrg# XORG_MACROS_VERSION(1.1) 99264cd6a3aeSmrg# 99274cd6a3aeSmrg# To ensure that this macro is defined, also add: 99284cd6a3aeSmrg# m4_ifndef([XORG_MACROS_VERSION], 99294cd6a3aeSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 99304cd6a3aeSmrg# 99314cd6a3aeSmrg# 993270728a38Smrg# See the "minimum version" comment for each macro you use to see what 99334cd6a3aeSmrg# version you require. 99344cd6a3aeSmrgm4_defun([XORG_MACROS_VERSION],[ 993570728a38Smrgm4_define([vers_have], [1.19.0]) 99364cd6a3aeSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99374cd6a3aeSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99384cd6a3aeSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99394cd6a3aeSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99404cd6a3aeSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99414cd6a3aeSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99424cd6a3aeSmrgm4_undefine([vers_have]) 99434cd6a3aeSmrgm4_undefine([maj_have]) 99444cd6a3aeSmrgm4_undefine([maj_needed]) 99454cd6a3aeSmrg]) # XORG_MACROS_VERSION 99468c9fbc29Smrg 99474cd6a3aeSmrg# XORG_PROG_RAWCPP() 99484cd6a3aeSmrg# ------------------ 99494cd6a3aeSmrg# Minimum version: 1.0.0 99504cd6a3aeSmrg# 99514cd6a3aeSmrg# Find cpp program and necessary flags for use in pre-processing text files 99524cd6a3aeSmrg# such as man pages and config files 99534cd6a3aeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99544cd6a3aeSmrgAC_REQUIRE([AC_PROG_CPP]) 995570728a38SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99564cd6a3aeSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 99578c9fbc29Smrg 99584cd6a3aeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99594cd6a3aeSmrg# which is not the best choice for supporting other OS'es, but covers most 99604cd6a3aeSmrg# of the ones we need for now. 99614cd6a3aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99624cd6a3aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99634cd6a3aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99644cd6a3aeSmrg AC_MSG_RESULT([no]) 99654cd6a3aeSmrgelse 99664cd6a3aeSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99674cd6a3aeSmrg RAWCPPFLAGS=-undef 99684cd6a3aeSmrg AC_MSG_RESULT([yes]) 99694cd6a3aeSmrg # under Cygwin unix is still defined even with -undef 99704cd6a3aeSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99714cd6a3aeSmrg RAWCPPFLAGS="-undef -ansi" 99724cd6a3aeSmrg AC_MSG_RESULT([yes, with -ansi]) 99738c9fbc29Smrg else 99744cd6a3aeSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99758c9fbc29Smrg fi 99764cd6a3aeSmrgfi 99774cd6a3aeSmrgrm -f conftest.$ac_ext 99788c9fbc29Smrg 99794cd6a3aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99804cd6a3aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99814cd6a3aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99824cd6a3aeSmrg AC_MSG_RESULT([no]) 99834cd6a3aeSmrgelse 99844cd6a3aeSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 998570728a38Smrg TRADITIONALCPPFLAGS="-traditional" 99864cd6a3aeSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99874cd6a3aeSmrg AC_MSG_RESULT([yes]) 99884cd6a3aeSmrg else 99894cd6a3aeSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99904cd6a3aeSmrg fi 99914cd6a3aeSmrgfi 99924cd6a3aeSmrgrm -f conftest.$ac_ext 99934cd6a3aeSmrgAC_SUBST(RAWCPPFLAGS) 999470728a38SmrgAC_SUBST(TRADITIONALCPPFLAGS) 99954cd6a3aeSmrg]) # XORG_PROG_RAWCPP 99968c9fbc29Smrg 99974cd6a3aeSmrg# XORG_MANPAGE_SECTIONS() 99984cd6a3aeSmrg# ----------------------- 99994cd6a3aeSmrg# Minimum version: 1.0.0 100004cd6a3aeSmrg# 100014cd6a3aeSmrg# Determine which sections man pages go in for the different man page types 100024cd6a3aeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 100034cd6a3aeSmrg# Not sure if there's any better way than just hardcoding by OS name. 100044cd6a3aeSmrg# Override default settings by setting environment variables 100054cd6a3aeSmrg# Added MAN_SUBSTS in version 1.8 100064cd6a3aeSmrg# Added AC_PROG_SED in version 1.8 100078c9fbc29Smrg 100084cd6a3aeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100094cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100104cd6a3aeSmrgAC_REQUIRE([AC_PROG_SED]) 100118c9fbc29Smrg 100124cd6a3aeSmrgif test x$APP_MAN_SUFFIX = x ; then 100134cd6a3aeSmrg APP_MAN_SUFFIX=1 100144cd6a3aeSmrgfi 100154cd6a3aeSmrgif test x$APP_MAN_DIR = x ; then 100164cd6a3aeSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 100174cd6a3aeSmrgfi 100188c9fbc29Smrg 100194cd6a3aeSmrgif test x$LIB_MAN_SUFFIX = x ; then 100204cd6a3aeSmrg LIB_MAN_SUFFIX=3 100214cd6a3aeSmrgfi 100224cd6a3aeSmrgif test x$LIB_MAN_DIR = x ; then 100234cd6a3aeSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100244cd6a3aeSmrgfi 100258c9fbc29Smrg 100264cd6a3aeSmrgif test x$FILE_MAN_SUFFIX = x ; then 100274cd6a3aeSmrg case $host_os in 100284cd6a3aeSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 100294cd6a3aeSmrg *) FILE_MAN_SUFFIX=5 ;; 100304cd6a3aeSmrg esac 100314cd6a3aeSmrgfi 100324cd6a3aeSmrgif test x$FILE_MAN_DIR = x ; then 100334cd6a3aeSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100344cd6a3aeSmrgfi 100358c9fbc29Smrg 100364cd6a3aeSmrgif test x$MISC_MAN_SUFFIX = x ; then 100374cd6a3aeSmrg case $host_os in 100384cd6a3aeSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 100394cd6a3aeSmrg *) MISC_MAN_SUFFIX=7 ;; 100404cd6a3aeSmrg esac 100414cd6a3aeSmrgfi 100424cd6a3aeSmrgif test x$MISC_MAN_DIR = x ; then 100434cd6a3aeSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100444cd6a3aeSmrgfi 100458c9fbc29Smrg 100464cd6a3aeSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 100474cd6a3aeSmrg case $host_os in 100484cd6a3aeSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 100494cd6a3aeSmrg *) DRIVER_MAN_SUFFIX=4 ;; 100508c9fbc29Smrg esac 100514cd6a3aeSmrgfi 100524cd6a3aeSmrgif test x$DRIVER_MAN_DIR = x ; then 100534cd6a3aeSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100544cd6a3aeSmrgfi 100558c9fbc29Smrg 100564cd6a3aeSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 100578c9fbc29Smrg case $host_os in 100584cd6a3aeSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 100594cd6a3aeSmrg *) ADMIN_MAN_SUFFIX=8 ;; 100604cd6a3aeSmrg esac 100614cd6a3aeSmrgfi 100624cd6a3aeSmrgif test x$ADMIN_MAN_DIR = x ; then 100634cd6a3aeSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 100644cd6a3aeSmrgfi 100658c9fbc29Smrg 100668c9fbc29Smrg 100674cd6a3aeSmrgAC_SUBST([APP_MAN_SUFFIX]) 100684cd6a3aeSmrgAC_SUBST([LIB_MAN_SUFFIX]) 100694cd6a3aeSmrgAC_SUBST([FILE_MAN_SUFFIX]) 100704cd6a3aeSmrgAC_SUBST([MISC_MAN_SUFFIX]) 100714cd6a3aeSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100724cd6a3aeSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100734cd6a3aeSmrgAC_SUBST([APP_MAN_DIR]) 100744cd6a3aeSmrgAC_SUBST([LIB_MAN_DIR]) 100754cd6a3aeSmrgAC_SUBST([FILE_MAN_DIR]) 100764cd6a3aeSmrgAC_SUBST([MISC_MAN_DIR]) 100774cd6a3aeSmrgAC_SUBST([DRIVER_MAN_DIR]) 100784cd6a3aeSmrgAC_SUBST([ADMIN_MAN_DIR]) 100798c9fbc29Smrg 100804cd6a3aeSmrgXORG_MAN_PAGE="X Version 11" 100814cd6a3aeSmrgAC_SUBST([XORG_MAN_PAGE]) 100824cd6a3aeSmrgMAN_SUBSTS="\ 100834cd6a3aeSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100844cd6a3aeSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100854cd6a3aeSmrg -e 's|__xservername__|Xorg|g' \ 100864cd6a3aeSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 100874cd6a3aeSmrg -e 's|__projectroot__|\$(prefix)|g' \ 100884cd6a3aeSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100894cd6a3aeSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100904cd6a3aeSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100914cd6a3aeSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100924cd6a3aeSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100934cd6a3aeSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100944cd6a3aeSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100954cd6a3aeSmrgAC_SUBST([MAN_SUBSTS]) 100968c9fbc29Smrg 100974cd6a3aeSmrg]) # XORG_MANPAGE_SECTIONS 100988c9fbc29Smrg 100994cd6a3aeSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 101004cd6a3aeSmrg# ------------------------ 101014cd6a3aeSmrg# Minimum version: 1.7.0 101024cd6a3aeSmrg# 101034cd6a3aeSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 101044cd6a3aeSmrg# provided by xorg-sgml-doctools, if installed. 101054cd6a3aeSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101064cd6a3aeSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101074cd6a3aeSmrgXORG_SGML_PATH= 101084cd6a3aeSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101094cd6a3aeSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101104cd6a3aeSmrg [m4_ifval([$1],[:], 101114cd6a3aeSmrg [if test x"$cross_compiling" != x"yes" ; then 101124cd6a3aeSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101134cd6a3aeSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 101144cd6a3aeSmrg fi]) 101154cd6a3aeSmrg ]) 101168c9fbc29Smrg 101174cd6a3aeSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101184cd6a3aeSmrg# the path and the name of the doc stylesheet 101194cd6a3aeSmrgif test "x$XORG_SGML_PATH" != "x" ; then 101204cd6a3aeSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101214cd6a3aeSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101224cd6a3aeSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101234cd6a3aeSmrgelse 101244cd6a3aeSmrg AC_MSG_RESULT([no]) 101254cd6a3aeSmrgfi 101268c9fbc29Smrg 101274cd6a3aeSmrgAC_SUBST(XORG_SGML_PATH) 101284cd6a3aeSmrgAC_SUBST(STYLESHEET_SRCDIR) 101294cd6a3aeSmrgAC_SUBST(XSL_STYLESHEET) 101304cd6a3aeSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101314cd6a3aeSmrg]) # XORG_CHECK_SGML_DOCTOOLS 101328c9fbc29Smrg 101334cd6a3aeSmrg# XORG_CHECK_LINUXDOC 101344cd6a3aeSmrg# ------------------- 101354cd6a3aeSmrg# Minimum version: 1.0.0 101364cd6a3aeSmrg# 101374cd6a3aeSmrg# Defines the variable MAKE_TEXT if the necessary tools and 101384cd6a3aeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101394cd6a3aeSmrg# Whether or not the necessary tools and files are found can be checked 101404cd6a3aeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101414cd6a3aeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101424cd6a3aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101434cd6a3aeSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 101448c9fbc29Smrg 101454cd6a3aeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 101468c9fbc29Smrg 101474cd6a3aeSmrgAC_MSG_CHECKING([whether to build documentation]) 101488c9fbc29Smrg 101494cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101504cd6a3aeSmrg BUILDDOC=yes 101514cd6a3aeSmrgelse 101524cd6a3aeSmrg BUILDDOC=no 101534cd6a3aeSmrgfi 101548c9fbc29Smrg 101554cd6a3aeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 101568c9fbc29Smrg 101574cd6a3aeSmrgAC_MSG_RESULT([$BUILDDOC]) 101588c9fbc29Smrg 101594cd6a3aeSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 101608c9fbc29Smrg 101614cd6a3aeSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101624cd6a3aeSmrg BUILDPDFDOC=yes 101634cd6a3aeSmrgelse 101644cd6a3aeSmrg BUILDPDFDOC=no 101654cd6a3aeSmrgfi 101668c9fbc29Smrg 101674cd6a3aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101688c9fbc29Smrg 101694cd6a3aeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101704cd6a3aeSmrg 101714cd6a3aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101724cd6a3aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101734cd6a3aeSmrgMAKE_PDF="$PS2PDF" 101744cd6a3aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101754cd6a3aeSmrg 101764cd6a3aeSmrgAC_SUBST(MAKE_TEXT) 101774cd6a3aeSmrgAC_SUBST(MAKE_PS) 101784cd6a3aeSmrgAC_SUBST(MAKE_PDF) 101794cd6a3aeSmrgAC_SUBST(MAKE_HTML) 101804cd6a3aeSmrg]) # XORG_CHECK_LINUXDOC 101814cd6a3aeSmrg 101824cd6a3aeSmrg# XORG_CHECK_DOCBOOK 101834cd6a3aeSmrg# ------------------- 101844cd6a3aeSmrg# Minimum version: 1.0.0 101854cd6a3aeSmrg# 101864cd6a3aeSmrg# Checks for the ability to build output formats from SGML DocBook source. 101874cd6a3aeSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101884cd6a3aeSmrg# indicates whether the necessary tools and files are found and, if set, 101894cd6a3aeSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101904cd6a3aeSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101914cd6a3aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101928c9fbc29Smrg 101934cd6a3aeSmrgBUILDTXTDOC=no 101944cd6a3aeSmrgBUILDPDFDOC=no 101954cd6a3aeSmrgBUILDPSDOC=no 101964cd6a3aeSmrgBUILDHTMLDOC=no 101978c9fbc29Smrg 101984cd6a3aeSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 101994cd6a3aeSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 102004cd6a3aeSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 102014cd6a3aeSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 102028c9fbc29Smrg 102034cd6a3aeSmrgAC_MSG_CHECKING([whether to build text documentation]) 102044cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102054cd6a3aeSmrg test x$BUILD_TXTDOC != xno; then 102064cd6a3aeSmrg BUILDTXTDOC=yes 102074cd6a3aeSmrgfi 102084cd6a3aeSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102094cd6a3aeSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 102108c9fbc29Smrg 102114cd6a3aeSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102124cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102134cd6a3aeSmrg test x$BUILD_PDFDOC != xno; then 102144cd6a3aeSmrg BUILDPDFDOC=yes 102154cd6a3aeSmrgfi 102164cd6a3aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102174cd6a3aeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 102188c9fbc29Smrg 102194cd6a3aeSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102204cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102214cd6a3aeSmrg test x$BUILD_PSDOC != xno; then 102224cd6a3aeSmrg BUILDPSDOC=yes 102234cd6a3aeSmrgfi 102244cd6a3aeSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102254cd6a3aeSmrgAC_MSG_RESULT([$BUILDPSDOC]) 102268c9fbc29Smrg 102274cd6a3aeSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102284cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102294cd6a3aeSmrg test x$BUILD_HTMLDOC != xno; then 102304cd6a3aeSmrg BUILDHTMLDOC=yes 102314cd6a3aeSmrgfi 102324cd6a3aeSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102334cd6a3aeSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 102348c9fbc29Smrg 102354cd6a3aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102364cd6a3aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102374cd6a3aeSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102384cd6a3aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 102398c9fbc29Smrg 102404cd6a3aeSmrgAC_SUBST(MAKE_TEXT) 102414cd6a3aeSmrgAC_SUBST(MAKE_PS) 102424cd6a3aeSmrgAC_SUBST(MAKE_PDF) 102434cd6a3aeSmrgAC_SUBST(MAKE_HTML) 102444cd6a3aeSmrg]) # XORG_CHECK_DOCBOOK 102458c9fbc29Smrg 102464cd6a3aeSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102474cd6a3aeSmrg# ---------------- 102484cd6a3aeSmrg# Minimum version: 1.5.0 102494cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 102504cd6a3aeSmrg# 102514cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 102524cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 102534cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 102544cd6a3aeSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102554cd6a3aeSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102564cd6a3aeSmrg# --with-xmlto assumes 'auto'. 102574cd6a3aeSmrg# 102584cd6a3aeSmrg# Interface to module: 102594cd6a3aeSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102604cd6a3aeSmrg# XMLTO: returns the path of the xmlto program found 102614cd6a3aeSmrg# returns the path set by the user in the environment 102624cd6a3aeSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102634cd6a3aeSmrg# 'no' user instructs the module not to use xmlto 102644cd6a3aeSmrg# 102654cd6a3aeSmrg# Added in version 1.10.0 102664cd6a3aeSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102674cd6a3aeSmrg# xmlto for text output requires either lynx, links, or w3m browsers 102684cd6a3aeSmrg# 102694cd6a3aeSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102704cd6a3aeSmrg# 102714cd6a3aeSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102724cd6a3aeSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102734cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 102744cd6a3aeSmrgAC_ARG_WITH(xmlto, 102754cd6a3aeSmrg AS_HELP_STRING([--with-xmlto], 102764cd6a3aeSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102774cd6a3aeSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102784cd6a3aeSmrgm4_undefine([_defopt]) 102794cd6a3aeSmrg 102804cd6a3aeSmrgif test "x$use_xmlto" = x"auto"; then 102814cd6a3aeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 102824cd6a3aeSmrg if test "x$XMLTO" = "x"; then 102834cd6a3aeSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102844cd6a3aeSmrg have_xmlto=no 102854cd6a3aeSmrg else 102864cd6a3aeSmrg have_xmlto=yes 102874cd6a3aeSmrg fi 102884cd6a3aeSmrgelif test "x$use_xmlto" = x"yes" ; then 102894cd6a3aeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 102904cd6a3aeSmrg if test "x$XMLTO" = "x"; then 102914cd6a3aeSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102924cd6a3aeSmrg fi 102934cd6a3aeSmrg have_xmlto=yes 102944cd6a3aeSmrgelif test "x$use_xmlto" = x"no" ; then 102954cd6a3aeSmrg if test "x$XMLTO" != "x"; then 102964cd6a3aeSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102974cd6a3aeSmrg fi 102984cd6a3aeSmrg have_xmlto=no 102994cd6a3aeSmrgelse 103004cd6a3aeSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 103014cd6a3aeSmrgfi 103028c9fbc29Smrg 103034cd6a3aeSmrg# Test for a minimum version of xmlto, if provided. 103044cd6a3aeSmrgm4_ifval([$1], 103054cd6a3aeSmrg[if test "$have_xmlto" = yes; then 103064cd6a3aeSmrg # scrape the xmlto version 103074cd6a3aeSmrg AC_MSG_CHECKING([the xmlto version]) 103084cd6a3aeSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103094cd6a3aeSmrg AC_MSG_RESULT([$xmlto_version]) 103104cd6a3aeSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103114cd6a3aeSmrg [if test "x$use_xmlto" = xauto; then 103124cd6a3aeSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103134cd6a3aeSmrg have_xmlto=no 103144cd6a3aeSmrg else 103154cd6a3aeSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103164cd6a3aeSmrg fi]) 103174cd6a3aeSmrgfi]) 103188c9fbc29Smrg 103194cd6a3aeSmrg# Test for the ability of xmlto to generate a text target 103204cd6a3aeSmrghave_xmlto_text=no 103214cd6a3aeSmrgcat > conftest.xml << "EOF" 103224cd6a3aeSmrgEOF 103234cd6a3aeSmrgAS_IF([test "$have_xmlto" = yes], 103244cd6a3aeSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103254cd6a3aeSmrg [have_xmlto_text=yes], 103264cd6a3aeSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 103274cd6a3aeSmrgrm -f conftest.xml 103284cd6a3aeSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103294cd6a3aeSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103304cd6a3aeSmrg]) # XORG_WITH_XMLTO 103314cd6a3aeSmrg 103324cd6a3aeSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103334cd6a3aeSmrg# -------------------------------------------- 103344cd6a3aeSmrg# Minimum version: 1.12.0 103354cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.12.0 103364cd6a3aeSmrg# 103374cd6a3aeSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103384cd6a3aeSmrg# XML-based language used for the transformation of XML documents. 103394cd6a3aeSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103404cd6a3aeSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103414cd6a3aeSmrg# The XSLT processor is often used as a standalone tool for transformations. 103424cd6a3aeSmrg# It should not be assumed that this tool is used only to work with documnetation. 103434cd6a3aeSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103444cd6a3aeSmrg# 103454cd6a3aeSmrg# Interface to module: 103464cd6a3aeSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103474cd6a3aeSmrg# XSLTPROC: returns the path of the xsltproc program found 103484cd6a3aeSmrg# returns the path set by the user in the environment 103494cd6a3aeSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103504cd6a3aeSmrg# 'no' user instructs the module not to use xsltproc 103514cd6a3aeSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103524cd6a3aeSmrg# 103534cd6a3aeSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103544cd6a3aeSmrg# 103554cd6a3aeSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103564cd6a3aeSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103574cd6a3aeSmrg# Preserves the interface, should it be implemented later 103584cd6a3aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103594cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 103604cd6a3aeSmrgAC_ARG_WITH(xsltproc, 103614cd6a3aeSmrg AS_HELP_STRING([--with-xsltproc], 103624cd6a3aeSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103634cd6a3aeSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103644cd6a3aeSmrgm4_undefine([_defopt]) 103654cd6a3aeSmrg 103664cd6a3aeSmrgif test "x$use_xsltproc" = x"auto"; then 103674cd6a3aeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103684cd6a3aeSmrg if test "x$XSLTPROC" = "x"; then 103694cd6a3aeSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 103704cd6a3aeSmrg have_xsltproc=no 103714cd6a3aeSmrg else 103724cd6a3aeSmrg have_xsltproc=yes 103734cd6a3aeSmrg fi 103744cd6a3aeSmrgelif test "x$use_xsltproc" = x"yes" ; then 103754cd6a3aeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103764cd6a3aeSmrg if test "x$XSLTPROC" = "x"; then 103774cd6a3aeSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103784cd6a3aeSmrg fi 103794cd6a3aeSmrg have_xsltproc=yes 103804cd6a3aeSmrgelif test "x$use_xsltproc" = x"no" ; then 103814cd6a3aeSmrg if test "x$XSLTPROC" != "x"; then 103824cd6a3aeSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103834cd6a3aeSmrg fi 103844cd6a3aeSmrg have_xsltproc=no 103854cd6a3aeSmrgelse 103864cd6a3aeSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103874cd6a3aeSmrgfi 103888c9fbc29Smrg 103894cd6a3aeSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103904cd6a3aeSmrg]) # XORG_WITH_XSLTPROC 103918c9fbc29Smrg 103924cd6a3aeSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103934cd6a3aeSmrg# ---------------------------------------- 103944cd6a3aeSmrg# Minimum version: 1.15.0 103954cd6a3aeSmrg# 103964cd6a3aeSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 103974cd6a3aeSmrg# scanning arbitrary text files, extracting information from those text files, 103984cd6a3aeSmrg# and printing reports based on that information. 103994cd6a3aeSmrg# 104004cd6a3aeSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 104014cd6a3aeSmrg# 104024cd6a3aeSmrg# Interface to module: 104034cd6a3aeSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 104044cd6a3aeSmrg# PERL: returns the path of the perl program found 104054cd6a3aeSmrg# returns the path set by the user in the environment 104064cd6a3aeSmrg# --with-perl: 'yes' user instructs the module to use perl 104074cd6a3aeSmrg# 'no' user instructs the module not to use perl 104084cd6a3aeSmrg# have_perl: returns yes if perl found in PATH or no 104094cd6a3aeSmrg# 104104cd6a3aeSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104114cd6a3aeSmrg# 104124cd6a3aeSmrgAC_DEFUN([XORG_WITH_PERL],[ 104134cd6a3aeSmrgAC_ARG_VAR([PERL], [Path to perl command]) 104144cd6a3aeSmrg# Preserves the interface, should it be implemented later 104154cd6a3aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104164cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 104174cd6a3aeSmrgAC_ARG_WITH(perl, 104184cd6a3aeSmrg AS_HELP_STRING([--with-perl], 104194cd6a3aeSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 104204cd6a3aeSmrg [use_perl=$withval], [use_perl=]_defopt) 104214cd6a3aeSmrgm4_undefine([_defopt]) 104224cd6a3aeSmrg 104234cd6a3aeSmrgif test "x$use_perl" = x"auto"; then 104244cd6a3aeSmrg AC_PATH_PROG([PERL], [perl]) 104254cd6a3aeSmrg if test "x$PERL" = "x"; then 104264cd6a3aeSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104274cd6a3aeSmrg have_perl=no 104284cd6a3aeSmrg else 104294cd6a3aeSmrg have_perl=yes 104304cd6a3aeSmrg fi 104314cd6a3aeSmrgelif test "x$use_perl" = x"yes" ; then 104324cd6a3aeSmrg AC_PATH_PROG([PERL], [perl]) 104334cd6a3aeSmrg if test "x$PERL" = "x"; then 104344cd6a3aeSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104354cd6a3aeSmrg fi 104364cd6a3aeSmrg have_perl=yes 104374cd6a3aeSmrgelif test "x$use_perl" = x"no" ; then 104384cd6a3aeSmrg if test "x$PERL" != "x"; then 104394cd6a3aeSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104404cd6a3aeSmrg fi 104414cd6a3aeSmrg have_perl=no 104424cd6a3aeSmrgelse 104434cd6a3aeSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104444cd6a3aeSmrgfi 104458c9fbc29Smrg 104464cd6a3aeSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104474cd6a3aeSmrg]) # XORG_WITH_PERL 104488c9fbc29Smrg 104494cd6a3aeSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104504cd6a3aeSmrg# ---------------- 104514cd6a3aeSmrg# Minimum version: 1.5.0 104524cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 104534cd6a3aeSmrg# 104544cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 104554cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 104564cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104574cd6a3aeSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104584cd6a3aeSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104594cd6a3aeSmrg# --with-asciidoc assumes 'auto'. 104604cd6a3aeSmrg# 104614cd6a3aeSmrg# Interface to module: 104624cd6a3aeSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104634cd6a3aeSmrg# ASCIIDOC: returns the path of the asciidoc program found 104644cd6a3aeSmrg# returns the path set by the user in the environment 104654cd6a3aeSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104664cd6a3aeSmrg# 'no' user instructs the module not to use asciidoc 104674cd6a3aeSmrg# 104684cd6a3aeSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 104694cd6a3aeSmrg# 104704cd6a3aeSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 104714cd6a3aeSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 104724cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 104734cd6a3aeSmrgAC_ARG_WITH(asciidoc, 104744cd6a3aeSmrg AS_HELP_STRING([--with-asciidoc], 104754cd6a3aeSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104764cd6a3aeSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104774cd6a3aeSmrgm4_undefine([_defopt]) 104784cd6a3aeSmrg 104794cd6a3aeSmrgif test "x$use_asciidoc" = x"auto"; then 104804cd6a3aeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104814cd6a3aeSmrg if test "x$ASCIIDOC" = "x"; then 104824cd6a3aeSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104834cd6a3aeSmrg have_asciidoc=no 104844cd6a3aeSmrg else 104854cd6a3aeSmrg have_asciidoc=yes 104864cd6a3aeSmrg fi 104874cd6a3aeSmrgelif test "x$use_asciidoc" = x"yes" ; then 104884cd6a3aeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104894cd6a3aeSmrg if test "x$ASCIIDOC" = "x"; then 104904cd6a3aeSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104914cd6a3aeSmrg fi 104924cd6a3aeSmrg have_asciidoc=yes 104934cd6a3aeSmrgelif test "x$use_asciidoc" = x"no" ; then 104944cd6a3aeSmrg if test "x$ASCIIDOC" != "x"; then 104954cd6a3aeSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104964cd6a3aeSmrg fi 104974cd6a3aeSmrg have_asciidoc=no 104984cd6a3aeSmrgelse 104994cd6a3aeSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 105004cd6a3aeSmrgfi 105014cd6a3aeSmrgm4_ifval([$1], 105024cd6a3aeSmrg[if test "$have_asciidoc" = yes; then 105034cd6a3aeSmrg # scrape the asciidoc version 105044cd6a3aeSmrg AC_MSG_CHECKING([the asciidoc version]) 105054cd6a3aeSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105064cd6a3aeSmrg AC_MSG_RESULT([$asciidoc_version]) 105074cd6a3aeSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105084cd6a3aeSmrg [if test "x$use_asciidoc" = xauto; then 105094cd6a3aeSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105104cd6a3aeSmrg have_asciidoc=no 105114cd6a3aeSmrg else 105124cd6a3aeSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105134cd6a3aeSmrg fi]) 105144cd6a3aeSmrgfi]) 105154cd6a3aeSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105164cd6a3aeSmrg]) # XORG_WITH_ASCIIDOC 105178c9fbc29Smrg 105184cd6a3aeSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1051970728a38Smrg# ------------------------------------------- 105204cd6a3aeSmrg# Minimum version: 1.5.0 105214cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1052270728a38Smrg# Minimum version for optional DOT checking: 1.18.0 105234cd6a3aeSmrg# 105244cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 105254cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 105264cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 105274cd6a3aeSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105284cd6a3aeSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105294cd6a3aeSmrg# --with-doxygen assumes 'auto'. 105304cd6a3aeSmrg# 105314cd6a3aeSmrg# Interface to module: 105324cd6a3aeSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105334cd6a3aeSmrg# DOXYGEN: returns the path of the doxygen program found 105344cd6a3aeSmrg# returns the path set by the user in the environment 105354cd6a3aeSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105364cd6a3aeSmrg# 'no' user instructs the module not to use doxygen 105374cd6a3aeSmrg# 105384cd6a3aeSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 105394cd6a3aeSmrg# 105404cd6a3aeSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105414cd6a3aeSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1054270728a38SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 105434cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 105444cd6a3aeSmrgAC_ARG_WITH(doxygen, 105454cd6a3aeSmrg AS_HELP_STRING([--with-doxygen], 105464cd6a3aeSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105474cd6a3aeSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105484cd6a3aeSmrgm4_undefine([_defopt]) 105494cd6a3aeSmrg 105504cd6a3aeSmrgif test "x$use_doxygen" = x"auto"; then 105514cd6a3aeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105524cd6a3aeSmrg if test "x$DOXYGEN" = "x"; then 105534cd6a3aeSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105544cd6a3aeSmrg have_doxygen=no 105554cd6a3aeSmrg else 105564cd6a3aeSmrg have_doxygen=yes 105574cd6a3aeSmrg fi 105584cd6a3aeSmrgelif test "x$use_doxygen" = x"yes" ; then 105594cd6a3aeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105604cd6a3aeSmrg if test "x$DOXYGEN" = "x"; then 105614cd6a3aeSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105624cd6a3aeSmrg fi 105634cd6a3aeSmrg have_doxygen=yes 105644cd6a3aeSmrgelif test "x$use_doxygen" = x"no" ; then 105654cd6a3aeSmrg if test "x$DOXYGEN" != "x"; then 105664cd6a3aeSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105674cd6a3aeSmrg fi 105684cd6a3aeSmrg have_doxygen=no 105694cd6a3aeSmrgelse 105704cd6a3aeSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 105714cd6a3aeSmrgfi 105724cd6a3aeSmrgm4_ifval([$1], 105734cd6a3aeSmrg[if test "$have_doxygen" = yes; then 105744cd6a3aeSmrg # scrape the doxygen version 105754cd6a3aeSmrg AC_MSG_CHECKING([the doxygen version]) 105764cd6a3aeSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105774cd6a3aeSmrg AC_MSG_RESULT([$doxygen_version]) 105784cd6a3aeSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105794cd6a3aeSmrg [if test "x$use_doxygen" = xauto; then 105804cd6a3aeSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105814cd6a3aeSmrg have_doxygen=no 105824cd6a3aeSmrg else 105834cd6a3aeSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105844cd6a3aeSmrg fi]) 105854cd6a3aeSmrgfi]) 1058670728a38Smrg 1058770728a38Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1058870728a38Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1058970728a38Smrgdnl HAVE_DOT = @HAVE_DOT@ 1059070728a38SmrgHAVE_DOT=no 1059170728a38Smrgif test "x$have_doxygen" = "xyes"; then 1059270728a38Smrg AC_PATH_PROG([DOT], [dot]) 1059370728a38Smrg if test "x$DOT" != "x"; then 1059470728a38Smrg HAVE_DOT=yes 1059570728a38Smrg fi 1059670728a38Smrgfi 1059770728a38Smrg 1059870728a38SmrgAC_SUBST([HAVE_DOT]) 1059970728a38SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 106004cd6a3aeSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 106014cd6a3aeSmrg]) # XORG_WITH_DOXYGEN 106028c9fbc29Smrg 106034cd6a3aeSmrg# XORG_WITH_GROFF([DEFAULT]) 106044cd6a3aeSmrg# ---------------- 106054cd6a3aeSmrg# Minimum version: 1.6.0 106064cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 106074cd6a3aeSmrg# 106084cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 106094cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 106104cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 106114cd6a3aeSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 106124cd6a3aeSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 106134cd6a3aeSmrg# --with-groff assumes 'auto'. 106144cd6a3aeSmrg# 106154cd6a3aeSmrg# Interface to module: 106164cd6a3aeSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 106174cd6a3aeSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 106184cd6a3aeSmrg# HAVE_GROFF_MS: the -ms macros package 106194cd6a3aeSmrg# GROFF: returns the path of the groff program found 106204cd6a3aeSmrg# returns the path set by the user in the environment 106214cd6a3aeSmrg# --with-groff: 'yes' user instructs the module to use groff 106224cd6a3aeSmrg# 'no' user instructs the module not to use groff 106234cd6a3aeSmrg# 106244cd6a3aeSmrg# Added in version 1.9.0: 106254cd6a3aeSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106264cd6a3aeSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106274cd6a3aeSmrg# psselect from the psutils package. 106284cd6a3aeSmrg# the ghostcript package. Refer to the grohtml man pages 106294cd6a3aeSmrg# 106304cd6a3aeSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106314cd6a3aeSmrg# 106324cd6a3aeSmrg# OS and distros often splits groff in a basic and full package, the former 106334cd6a3aeSmrg# having the groff program and the later having devices, fonts and macros 106344cd6a3aeSmrg# Checking for the groff executable is not enough. 106354cd6a3aeSmrg# 106364cd6a3aeSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 106374cd6a3aeSmrg# unset HAVE_GROFF or GROFF env variables. 106384cd6a3aeSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106394cd6a3aeSmrg# 106404cd6a3aeSmrgAC_DEFUN([XORG_WITH_GROFF],[ 106414cd6a3aeSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106424cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 106434cd6a3aeSmrgAC_ARG_WITH(groff, 106444cd6a3aeSmrg AS_HELP_STRING([--with-groff], 106454cd6a3aeSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106464cd6a3aeSmrg [use_groff=$withval], [use_groff=]_defopt) 106474cd6a3aeSmrgm4_undefine([_defopt]) 106484cd6a3aeSmrg 106494cd6a3aeSmrgif test "x$use_groff" = x"auto"; then 106504cd6a3aeSmrg AC_PATH_PROG([GROFF], [groff]) 106514cd6a3aeSmrg if test "x$GROFF" = "x"; then 106524cd6a3aeSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106534cd6a3aeSmrg have_groff=no 106544cd6a3aeSmrg else 106554cd6a3aeSmrg have_groff=yes 106564cd6a3aeSmrg fi 106574cd6a3aeSmrgelif test "x$use_groff" = x"yes" ; then 106584cd6a3aeSmrg AC_PATH_PROG([GROFF], [groff]) 106594cd6a3aeSmrg if test "x$GROFF" = "x"; then 106604cd6a3aeSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106614cd6a3aeSmrg fi 106624cd6a3aeSmrg have_groff=yes 106634cd6a3aeSmrgelif test "x$use_groff" = x"no" ; then 106644cd6a3aeSmrg if test "x$GROFF" != "x"; then 106654cd6a3aeSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106664cd6a3aeSmrg fi 106674cd6a3aeSmrg have_groff=no 106684cd6a3aeSmrgelse 106694cd6a3aeSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 106704cd6a3aeSmrgfi 106718c9fbc29Smrg 106724cd6a3aeSmrg# We have groff, test for the presence of the macro packages 106734cd6a3aeSmrgif test "x$have_groff" = x"yes"; then 106744cd6a3aeSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 106754cd6a3aeSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 106764cd6a3aeSmrg groff_ms_works=yes 106774cd6a3aeSmrg else 106784cd6a3aeSmrg groff_ms_works=no 106794cd6a3aeSmrg fi 106804cd6a3aeSmrg AC_MSG_RESULT([$groff_ms_works]) 106814cd6a3aeSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 106824cd6a3aeSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 106834cd6a3aeSmrg groff_mm_works=yes 106844cd6a3aeSmrg else 106854cd6a3aeSmrg groff_mm_works=no 106864cd6a3aeSmrg fi 106874cd6a3aeSmrg AC_MSG_RESULT([$groff_mm_works]) 106884cd6a3aeSmrgfi 106898c9fbc29Smrg 106904cd6a3aeSmrg# We have groff, test for HTML dependencies, one command per package 106914cd6a3aeSmrgif test "x$have_groff" = x"yes"; then 106924cd6a3aeSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106934cd6a3aeSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106944cd6a3aeSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106954cd6a3aeSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106964cd6a3aeSmrg have_groff_html=yes 106974cd6a3aeSmrg else 106984cd6a3aeSmrg have_groff_html=no 106994cd6a3aeSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 107004cd6a3aeSmrg fi 107014cd6a3aeSmrgfi 107028c9fbc29Smrg 107034cd6a3aeSmrg# Set Automake conditionals for Makefiles 107044cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 107054cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 107064cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 107074cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 107084cd6a3aeSmrg]) # XORG_WITH_GROFF 107094cd6a3aeSmrg 107104cd6a3aeSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 107114cd6a3aeSmrg# --------------------------------------- 107124cd6a3aeSmrg# Minimum version: 1.6.0 107134cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 107144cd6a3aeSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 107154cd6a3aeSmrg# 107164cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 107174cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 107184cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 107194cd6a3aeSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 107204cd6a3aeSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 107214cd6a3aeSmrg# --with-fop assumes 'auto'. 107224cd6a3aeSmrg# 107234cd6a3aeSmrg# Interface to module: 107244cd6a3aeSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107254cd6a3aeSmrg# FOP: returns the path of the fop program found 107264cd6a3aeSmrg# returns the path set by the user in the environment 107274cd6a3aeSmrg# --with-fop: 'yes' user instructs the module to use fop 107284cd6a3aeSmrg# 'no' user instructs the module not to use fop 107294cd6a3aeSmrg# 107304cd6a3aeSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107314cd6a3aeSmrg# 107324cd6a3aeSmrgAC_DEFUN([XORG_WITH_FOP],[ 107334cd6a3aeSmrgAC_ARG_VAR([FOP], [Path to fop command]) 107344cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 107354cd6a3aeSmrgAC_ARG_WITH(fop, 107364cd6a3aeSmrg AS_HELP_STRING([--with-fop], 107374cd6a3aeSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107384cd6a3aeSmrg [use_fop=$withval], [use_fop=]_defopt) 107394cd6a3aeSmrgm4_undefine([_defopt]) 107404cd6a3aeSmrg 107414cd6a3aeSmrgif test "x$use_fop" = x"auto"; then 107424cd6a3aeSmrg AC_PATH_PROG([FOP], [fop]) 107434cd6a3aeSmrg if test "x$FOP" = "x"; then 107444cd6a3aeSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107454cd6a3aeSmrg have_fop=no 107464cd6a3aeSmrg else 107474cd6a3aeSmrg have_fop=yes 107484cd6a3aeSmrg fi 107494cd6a3aeSmrgelif test "x$use_fop" = x"yes" ; then 107504cd6a3aeSmrg AC_PATH_PROG([FOP], [fop]) 107514cd6a3aeSmrg if test "x$FOP" = "x"; then 107524cd6a3aeSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107534cd6a3aeSmrg fi 107544cd6a3aeSmrg have_fop=yes 107554cd6a3aeSmrgelif test "x$use_fop" = x"no" ; then 107564cd6a3aeSmrg if test "x$FOP" != "x"; then 107574cd6a3aeSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107584cd6a3aeSmrg fi 107594cd6a3aeSmrg have_fop=no 107604cd6a3aeSmrgelse 107614cd6a3aeSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 107624cd6a3aeSmrgfi 107638c9fbc29Smrg 107644cd6a3aeSmrg# Test for a minimum version of fop, if provided. 107654cd6a3aeSmrgm4_ifval([$1], 107664cd6a3aeSmrg[if test "$have_fop" = yes; then 107674cd6a3aeSmrg # scrape the fop version 107684cd6a3aeSmrg AC_MSG_CHECKING([for fop minimum version]) 107694cd6a3aeSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 107704cd6a3aeSmrg AC_MSG_RESULT([$fop_version]) 107714cd6a3aeSmrg AS_VERSION_COMPARE([$fop_version], [$1], 107724cd6a3aeSmrg [if test "x$use_fop" = xauto; then 107734cd6a3aeSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 107744cd6a3aeSmrg have_fop=no 107754cd6a3aeSmrg else 107764cd6a3aeSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 107774cd6a3aeSmrg fi]) 107784cd6a3aeSmrgfi]) 107794cd6a3aeSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 107804cd6a3aeSmrg]) # XORG_WITH_FOP 107818c9fbc29Smrg 1078270728a38Smrg# XORG_WITH_M4([MIN-VERSION]) 1078370728a38Smrg# --------------------------- 1078470728a38Smrg# Minimum version: 1.19.0 1078570728a38Smrg# 1078670728a38Smrg# This macro attempts to locate an m4 macro processor which supports 1078770728a38Smrg# -I option and is only useful for modules relying on M4 in order to 1078870728a38Smrg# expand macros in source code files. 1078970728a38Smrg# 1079070728a38Smrg# Interface to module: 1079170728a38Smrg# M4: returns the path of the m4 program found 1079270728a38Smrg# returns the path set by the user in the environment 1079370728a38Smrg# 1079470728a38SmrgAC_DEFUN([XORG_WITH_M4], [ 1079570728a38SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1079670728a38Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1079770728a38Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1079870728a38Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1079970728a38Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1080070728a38Smrg [$PATH:/usr/gnu/bin])]) 1080170728a38Smrg 1080270728a38SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1080370728a38Smrg]) # XORG_WITH_M4 1080470728a38Smrg 108054cd6a3aeSmrg# XORG_WITH_PS2PDF([DEFAULT]) 108064cd6a3aeSmrg# ---------------- 108074cd6a3aeSmrg# Minimum version: 1.6.0 108084cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 108094cd6a3aeSmrg# 108104cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 108114cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the 108124cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 108134cd6a3aeSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 108144cd6a3aeSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 108154cd6a3aeSmrg# --with-ps2pdf assumes 'auto'. 108164cd6a3aeSmrg# 108174cd6a3aeSmrg# Interface to module: 108184cd6a3aeSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 108194cd6a3aeSmrg# PS2PDF: returns the path of the ps2pdf program found 108204cd6a3aeSmrg# returns the path set by the user in the environment 108214cd6a3aeSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 108224cd6a3aeSmrg# 'no' user instructs the module not to use ps2pdf 108234cd6a3aeSmrg# 108244cd6a3aeSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 108254cd6a3aeSmrg# 108264cd6a3aeSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 108274cd6a3aeSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 108284cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 108294cd6a3aeSmrgAC_ARG_WITH(ps2pdf, 108304cd6a3aeSmrg AS_HELP_STRING([--with-ps2pdf], 108314cd6a3aeSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 108324cd6a3aeSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 108334cd6a3aeSmrgm4_undefine([_defopt]) 108344cd6a3aeSmrg 108354cd6a3aeSmrgif test "x$use_ps2pdf" = x"auto"; then 108364cd6a3aeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108374cd6a3aeSmrg if test "x$PS2PDF" = "x"; then 108384cd6a3aeSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 108394cd6a3aeSmrg have_ps2pdf=no 108404cd6a3aeSmrg else 108414cd6a3aeSmrg have_ps2pdf=yes 108424cd6a3aeSmrg fi 108434cd6a3aeSmrgelif test "x$use_ps2pdf" = x"yes" ; then 108444cd6a3aeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108454cd6a3aeSmrg if test "x$PS2PDF" = "x"; then 108464cd6a3aeSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108474cd6a3aeSmrg fi 108484cd6a3aeSmrg have_ps2pdf=yes 108494cd6a3aeSmrgelif test "x$use_ps2pdf" = x"no" ; then 108504cd6a3aeSmrg if test "x$PS2PDF" != "x"; then 108514cd6a3aeSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108524cd6a3aeSmrg fi 108534cd6a3aeSmrg have_ps2pdf=no 108544cd6a3aeSmrgelse 108554cd6a3aeSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108564cd6a3aeSmrgfi 108574cd6a3aeSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108584cd6a3aeSmrg]) # XORG_WITH_PS2PDF 108598c9fbc29Smrg 108604cd6a3aeSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 108614cd6a3aeSmrg# ---------------- 108624cd6a3aeSmrg# Minimum version: 1.6.0 108634cd6a3aeSmrg# 108644cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes 108654cd6a3aeSmrg# not at the appropriate level. This macro enables a builder to skip all 108664cd6a3aeSmrg# documentation targets except traditional man pages. 108674cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108684cd6a3aeSmrg# maximum flexibilty in controlling documentation building. 108694cd6a3aeSmrg# Refer to: 108704cd6a3aeSmrg# XORG_WITH_XMLTO --with-xmlto 108714cd6a3aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 108724cd6a3aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 108734cd6a3aeSmrg# XORG_WITH_FOP --with-fop 108744cd6a3aeSmrg# XORG_WITH_GROFF --with-groff 108754cd6a3aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 108764cd6a3aeSmrg# 108774cd6a3aeSmrg# Interface to module: 108784cd6a3aeSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 108794cd6a3aeSmrg# --enable-docs: 'yes' user instructs the module to generate docs 108804cd6a3aeSmrg# 'no' user instructs the module not to generate docs 108814cd6a3aeSmrg# parm1: specify the default value, yes or no. 108824cd6a3aeSmrg# 108834cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 108844cd6a3aeSmrgm4_define([docs_default], m4_default([$1], [yes])) 108854cd6a3aeSmrgAC_ARG_ENABLE(docs, 108864cd6a3aeSmrg AS_HELP_STRING([--enable-docs], 108874cd6a3aeSmrg [Enable building the documentation (default: ]docs_default[)]), 108884cd6a3aeSmrg [build_docs=$enableval], [build_docs=]docs_default) 108894cd6a3aeSmrgm4_undefine([docs_default]) 108904cd6a3aeSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 108914cd6a3aeSmrgAC_MSG_CHECKING([whether to build documentation]) 108924cd6a3aeSmrgAC_MSG_RESULT([$build_docs]) 108934cd6a3aeSmrg]) # XORG_ENABLE_DOCS 108944cd6a3aeSmrg 108954cd6a3aeSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 108964cd6a3aeSmrg# ---------------- 108974cd6a3aeSmrg# Minimum version: 1.6.0 108984cd6a3aeSmrg# 108994cd6a3aeSmrg# This macro enables a builder to skip all developer documentation. 109004cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109014cd6a3aeSmrg# maximum flexibilty in controlling documentation building. 109024cd6a3aeSmrg# Refer to: 109034cd6a3aeSmrg# XORG_WITH_XMLTO --with-xmlto 109044cd6a3aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 109054cd6a3aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 109064cd6a3aeSmrg# XORG_WITH_FOP --with-fop 109074cd6a3aeSmrg# XORG_WITH_GROFF --with-groff 109084cd6a3aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 109094cd6a3aeSmrg# 109104cd6a3aeSmrg# Interface to module: 109114cd6a3aeSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 109124cd6a3aeSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 109134cd6a3aeSmrg# 'no' user instructs the module not to generate developer docs 109144cd6a3aeSmrg# parm1: specify the default value, yes or no. 109154cd6a3aeSmrg# 109164cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 109174cd6a3aeSmrgm4_define([devel_default], m4_default([$1], [yes])) 109184cd6a3aeSmrgAC_ARG_ENABLE(devel-docs, 109194cd6a3aeSmrg AS_HELP_STRING([--enable-devel-docs], 109204cd6a3aeSmrg [Enable building the developer documentation (default: ]devel_default[)]), 109214cd6a3aeSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 109224cd6a3aeSmrgm4_undefine([devel_default]) 109234cd6a3aeSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 109244cd6a3aeSmrgAC_MSG_CHECKING([whether to build developer documentation]) 109254cd6a3aeSmrgAC_MSG_RESULT([$build_devel_docs]) 109264cd6a3aeSmrg]) # XORG_ENABLE_DEVEL_DOCS 109274cd6a3aeSmrg 109284cd6a3aeSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 109294cd6a3aeSmrg# ---------------- 109304cd6a3aeSmrg# Minimum version: 1.6.0 109314cd6a3aeSmrg# 109324cd6a3aeSmrg# This macro enables a builder to skip all functional specification targets. 109334cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109344cd6a3aeSmrg# maximum flexibilty in controlling documentation building. 109354cd6a3aeSmrg# Refer to: 109364cd6a3aeSmrg# XORG_WITH_XMLTO --with-xmlto 109374cd6a3aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 109384cd6a3aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 109394cd6a3aeSmrg# XORG_WITH_FOP --with-fop 109404cd6a3aeSmrg# XORG_WITH_GROFF --with-groff 109414cd6a3aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 109424cd6a3aeSmrg# 109434cd6a3aeSmrg# Interface to module: 109444cd6a3aeSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109454cd6a3aeSmrg# --enable-specs: 'yes' user instructs the module to generate specs 109464cd6a3aeSmrg# 'no' user instructs the module not to generate specs 109474cd6a3aeSmrg# parm1: specify the default value, yes or no. 109484cd6a3aeSmrg# 109494cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109504cd6a3aeSmrgm4_define([spec_default], m4_default([$1], [yes])) 109514cd6a3aeSmrgAC_ARG_ENABLE(specs, 109524cd6a3aeSmrg AS_HELP_STRING([--enable-specs], 109534cd6a3aeSmrg [Enable building the specs (default: ]spec_default[)]), 109544cd6a3aeSmrg [build_specs=$enableval], [build_specs=]spec_default) 109554cd6a3aeSmrgm4_undefine([spec_default]) 109564cd6a3aeSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109574cd6a3aeSmrgAC_MSG_CHECKING([whether to build functional specifications]) 109584cd6a3aeSmrgAC_MSG_RESULT([$build_specs]) 109594cd6a3aeSmrg]) # XORG_ENABLE_SPECS 109604cd6a3aeSmrg 109614cd6a3aeSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109624cd6a3aeSmrg# ---------------------------------------------- 109634cd6a3aeSmrg# Minimum version: 1.13.0 109644cd6a3aeSmrg# 109654cd6a3aeSmrg# This macro enables a builder to enable/disable unit testing 109664cd6a3aeSmrg# It makes no assumption about the test cases implementation 109674cd6a3aeSmrg# Test cases may or may not use Automake "Support for test suites" 109684cd6a3aeSmrg# They may or may not use the software utility library GLib 109694cd6a3aeSmrg# 109704cd6a3aeSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 109714cd6a3aeSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 109724cd6a3aeSmrg# The variable enable_unit_tests is used by other macros in this file. 109734cd6a3aeSmrg# 109744cd6a3aeSmrg# Interface to module: 109754cd6a3aeSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 109764cd6a3aeSmrg# enable_unit_tests: used in configure.ac for additional configuration 109774cd6a3aeSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 109784cd6a3aeSmrg# 'no' user instructs the module not to build tests 109794cd6a3aeSmrg# parm1: specify the default value, yes or no. 109804cd6a3aeSmrg# 109814cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 109824cd6a3aeSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 109834cd6a3aeSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 109844cd6a3aeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109854cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 109864cd6a3aeSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 109874cd6a3aeSmrg [Enable building unit test cases (default: ]_defopt[)]), 109884cd6a3aeSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 109894cd6a3aeSmrgm4_undefine([_defopt]) 109904cd6a3aeSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 109914cd6a3aeSmrgAC_MSG_CHECKING([whether to build unit test cases]) 109924cd6a3aeSmrgAC_MSG_RESULT([$enable_unit_tests]) 109934cd6a3aeSmrg]) # XORG_ENABLE_UNIT_TESTS 109944cd6a3aeSmrg 1099570728a38Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1099670728a38Smrg# ------------------------------------------------------ 1099770728a38Smrg# Minimum version: 1.17.0 1099870728a38Smrg# 1099970728a38Smrg# This macro enables a builder to enable/disable integration testing 1100070728a38Smrg# It makes no assumption about the test cases' implementation 1100170728a38Smrg# Test cases may or may not use Automake "Support for test suites" 1100270728a38Smrg# 1100370728a38Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1100470728a38Smrg# usually requires less dependencies and may be built and run under less 1100570728a38Smrg# stringent environments than integration tests. 1100670728a38Smrg# 1100770728a38Smrg# Interface to module: 1100870728a38Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1100970728a38Smrg# enable_integration_tests: used in configure.ac for additional configuration 1101070728a38Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1101170728a38Smrg# 'no' user instructs the module not to build tests 1101270728a38Smrg# parm1: specify the default value, yes or no. 1101370728a38Smrg# 1101470728a38SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1101570728a38SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1101670728a38Smrgm4_define([_defopt], m4_default([$1], [auto])) 1101770728a38SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1101870728a38Smrg [Enable building integration test cases (default: ]_defopt[)]), 1101970728a38Smrg [enable_integration_tests=$enableval], 1102070728a38Smrg [enable_integration_tests=]_defopt) 1102170728a38Smrgm4_undefine([_defopt]) 1102270728a38SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1102370728a38Smrg [test "x$enable_integration_tests" != xno]) 1102470728a38SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1102570728a38SmrgAC_MSG_RESULT([$enable_integration_tests]) 1102670728a38Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1102770728a38Smrg 110284cd6a3aeSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 110294cd6a3aeSmrg# ---------------------------------------- 110304cd6a3aeSmrg# Minimum version: 1.13.0 110314cd6a3aeSmrg# 110324cd6a3aeSmrg# GLib is a library which provides advanced data structures and functions. 110334cd6a3aeSmrg# This macro enables a module to test for the presence of Glib. 110344cd6a3aeSmrg# 110354cd6a3aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 110364cd6a3aeSmrg# Otherwise the value of $enable_unit_tests is blank. 110374cd6a3aeSmrg# 1103870728a38Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1103970728a38Smrg# test support usually requires less dependencies and may be built and run under 1104070728a38Smrg# less stringent environments than integration tests. 1104170728a38Smrg# 110424cd6a3aeSmrg# Interface to module: 110434cd6a3aeSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 110444cd6a3aeSmrg# with_glib: used in configure.ac to know if GLib has been found 110454cd6a3aeSmrg# --with-glib: 'yes' user instructs the module to use glib 110464cd6a3aeSmrg# 'no' user instructs the module not to use glib 110474cd6a3aeSmrg# 110484cd6a3aeSmrgAC_DEFUN([XORG_WITH_GLIB],[ 110494cd6a3aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110504cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 110514cd6a3aeSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110524cd6a3aeSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 110534cd6a3aeSmrg [with_glib=$withval], [with_glib=]_defopt) 110544cd6a3aeSmrgm4_undefine([_defopt]) 110554cd6a3aeSmrg 110564cd6a3aeSmrghave_glib=no 110574cd6a3aeSmrg# Do not probe GLib if user explicitly disabled unit testing 110584cd6a3aeSmrgif test "x$enable_unit_tests" != x"no"; then 110594cd6a3aeSmrg # Do not probe GLib if user explicitly disabled it 110604cd6a3aeSmrg if test "x$with_glib" != x"no"; then 110614cd6a3aeSmrg m4_ifval( 110624cd6a3aeSmrg [$1], 110634cd6a3aeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110644cd6a3aeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110654cd6a3aeSmrg ) 110664cd6a3aeSmrg fi 110674cd6a3aeSmrgfi 110688c9fbc29Smrg 110694cd6a3aeSmrg# Not having GLib when unit testing has been explicitly requested is an error 110704cd6a3aeSmrgif test "x$enable_unit_tests" = x"yes"; then 110714cd6a3aeSmrg if test "x$have_glib" = x"no"; then 110724cd6a3aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110734cd6a3aeSmrg fi 110744cd6a3aeSmrgfi 110758c9fbc29Smrg 110764cd6a3aeSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 110774cd6a3aeSmrgif test "x$enable_unit_tests" = x"no"; then 110784cd6a3aeSmrg if test "x$with_glib" = x"yes"; then 110794cd6a3aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110804cd6a3aeSmrg fi 110814cd6a3aeSmrgfi 110828c9fbc29Smrg 110834cd6a3aeSmrg# Not having GLib when it has been explicitly requested is an error 110844cd6a3aeSmrgif test "x$with_glib" = x"yes"; then 110854cd6a3aeSmrg if test "x$have_glib" = x"no"; then 110864cd6a3aeSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 110878c9fbc29Smrg fi 110884cd6a3aeSmrgfi 110898c9fbc29Smrg 110904cd6a3aeSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 110914cd6a3aeSmrg]) # XORG_WITH_GLIB 110924cd6a3aeSmrg 110934cd6a3aeSmrg# XORG_LD_WRAP([required|optional]) 110944cd6a3aeSmrg# --------------------------------- 110954cd6a3aeSmrg# Minimum version: 1.13.0 110968c9fbc29Smrg# 110974cd6a3aeSmrg# Check if linker supports -wrap, passed via compiler flags 110988c9fbc29Smrg# 110994cd6a3aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 111004cd6a3aeSmrg# Otherwise the value of $enable_unit_tests is blank. 111014cd6a3aeSmrg# 111024cd6a3aeSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 111034cd6a3aeSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 111044cd6a3aeSmrg# available, an argument of "optional" allows use when some unit tests require 111054cd6a3aeSmrg# ld -wrap and others do not. 111064cd6a3aeSmrg# 111074cd6a3aeSmrgAC_DEFUN([XORG_LD_WRAP],[ 111084cd6a3aeSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 111094cd6a3aeSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 111104cd6a3aeSmrg void __wrap_exit(int status) { return; }], 111114cd6a3aeSmrg [exit(0);])]) 111124cd6a3aeSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 111134cd6a3aeSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 111144cd6a3aeSmrg if test "x$have_ld_wrap" = x"no"; then 111154cd6a3aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 111168c9fbc29Smrg fi 111174cd6a3aeSmrgfi 111184cd6a3aeSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 111194cd6a3aeSmrg# 111204cd6a3aeSmrg]) # XORG_LD_WRAP 111218c9fbc29Smrg 111224cd6a3aeSmrg# XORG_CHECK_LINKER_FLAGS 111234cd6a3aeSmrg# ----------------------- 111244cd6a3aeSmrg# SYNOPSIS 111254cd6a3aeSmrg# 111264cd6a3aeSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 111274cd6a3aeSmrg# 111284cd6a3aeSmrg# DESCRIPTION 111294cd6a3aeSmrg# 111304cd6a3aeSmrg# Check whether the given linker FLAGS work with the current language's 111314cd6a3aeSmrg# linker, or whether they give an error. 111324cd6a3aeSmrg# 111334cd6a3aeSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 111344cd6a3aeSmrg# success/failure. 111354cd6a3aeSmrg# 111364cd6a3aeSmrg# PROGRAM-SOURCE is the program source to link with, if needed 111374cd6a3aeSmrg# 111384cd6a3aeSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 111394cd6a3aeSmrg# 111404cd6a3aeSmrg# LICENSE 111414cd6a3aeSmrg# 111424cd6a3aeSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 111434cd6a3aeSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111444cd6a3aeSmrg# Copyright (c) 2009 Matteo Frigo 111454cd6a3aeSmrg# 111464cd6a3aeSmrg# This program is free software: you can redistribute it and/or modify it 111474cd6a3aeSmrg# under the terms of the GNU General Public License as published by the 111484cd6a3aeSmrg# Free Software Foundation, either version 3 of the License, or (at your 111494cd6a3aeSmrg# option) any later version. 111504cd6a3aeSmrg# 111514cd6a3aeSmrg# This program is distributed in the hope that it will be useful, but 111524cd6a3aeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111534cd6a3aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111544cd6a3aeSmrg# Public License for more details. 111554cd6a3aeSmrg# 111564cd6a3aeSmrg# You should have received a copy of the GNU General Public License along 111574cd6a3aeSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111584cd6a3aeSmrg# 111594cd6a3aeSmrg# As a special exception, the respective Autoconf Macro's copyright owner 111604cd6a3aeSmrg# gives unlimited permission to copy, distribute and modify the configure 111614cd6a3aeSmrg# scripts that are the output of Autoconf when processing the Macro. You 111624cd6a3aeSmrg# need not follow the terms of the GNU General Public License when using 111634cd6a3aeSmrg# or distributing such scripts, even though portions of the text of the 111644cd6a3aeSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 111654cd6a3aeSmrg# all other use of the material that constitutes the Autoconf Macro. 111664cd6a3aeSmrg# 111674cd6a3aeSmrg# This special exception to the GPL applies to versions of the Autoconf 111684cd6a3aeSmrg# Macro released by the Autoconf Archive. When you make and distribute a 111694cd6a3aeSmrg# modified version of the Autoconf Macro, you may extend this special 111704cd6a3aeSmrg# exception to the GPL to apply to your modified version as well.# 111714cd6a3aeSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 111724cd6a3aeSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 111734cd6a3aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 111744cd6a3aeSmrgAS_LITERAL_IF([$1], 111754cd6a3aeSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 111764cd6a3aeSmrg ax_save_FLAGS=$LDFLAGS 111774cd6a3aeSmrg LDFLAGS="$1" 111784cd6a3aeSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 111794cd6a3aeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111804cd6a3aeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111814cd6a3aeSmrg LDFLAGS=$ax_save_FLAGS])], 111824cd6a3aeSmrg [ax_save_FLAGS=$LDFLAGS 111834cd6a3aeSmrg LDFLAGS="$1" 111844cd6a3aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 111854cd6a3aeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111864cd6a3aeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111874cd6a3aeSmrg LDFLAGS=$ax_save_FLAGS]) 111884cd6a3aeSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 111894cd6a3aeSmrgAC_MSG_RESULT($xorg_check_linker_flags) 111904cd6a3aeSmrgif test "x$xorg_check_linker_flags" = xyes; then 111914cd6a3aeSmrg m4_default([$2], :) 111924cd6a3aeSmrgelse 111934cd6a3aeSmrg m4_default([$3], :) 111944cd6a3aeSmrgfi 111954cd6a3aeSmrg]) # XORG_CHECK_LINKER_FLAGS 111968c9fbc29Smrg 111974cd6a3aeSmrg# XORG_MEMORY_CHECK_FLAGS 111984cd6a3aeSmrg# ----------------------- 111994cd6a3aeSmrg# Minimum version: 1.16.0 112004cd6a3aeSmrg# 112014cd6a3aeSmrg# This macro attempts to find appropriate memory checking functionality 112024cd6a3aeSmrg# for various platforms which unit testing code may use to catch various 112034cd6a3aeSmrg# forms of memory allocation and access errors in testing. 112044cd6a3aeSmrg# 112054cd6a3aeSmrg# Interface to module: 112064cd6a3aeSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 112074cd6a3aeSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 112084cd6a3aeSmrg# 112094cd6a3aeSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 112104cd6a3aeSmrg# 112114cd6a3aeSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 112128c9fbc29Smrg 112134cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 112144cd6a3aeSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 112154cd6a3aeSmrg [Environment variables to enable memory checking in tests]) 112168c9fbc29Smrg 112174cd6a3aeSmrg# Check for different types of support on different platforms 112184cd6a3aeSmrgcase $host_os in 112194cd6a3aeSmrg solaris*) 112204cd6a3aeSmrg AC_CHECK_LIB([umem], [umem_alloc], 112214cd6a3aeSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 112224cd6a3aeSmrg ;; 112234cd6a3aeSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 112244cd6a3aeSmrg # both directly and inverted, so should not be 0 or 255. 112254cd6a3aeSmrg malloc_debug_env='MALLOC_PERTURB_=15' 112264cd6a3aeSmrg ;; 112274cd6a3aeSmrg darwin*) 112284cd6a3aeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 112294cd6a3aeSmrg ;; 112304cd6a3aeSmrg *bsd*) 112314cd6a3aeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 112324cd6a3aeSmrg ;; 112334cd6a3aeSmrgesac 112348c9fbc29Smrg 112354cd6a3aeSmrg# User supplied flags override default flags 112364cd6a3aeSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 112374cd6a3aeSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 112384cd6a3aeSmrgfi 112398c9fbc29Smrg 112404cd6a3aeSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 112414cd6a3aeSmrg]) # XORG_WITH_LINT 112428c9fbc29Smrg 112434cd6a3aeSmrg# XORG_CHECK_MALLOC_ZERO 112444cd6a3aeSmrg# ---------------------- 112454cd6a3aeSmrg# Minimum version: 1.0.0 112464cd6a3aeSmrg# 112474cd6a3aeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112484cd6a3aeSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 112494cd6a3aeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112504cd6a3aeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112514cd6a3aeSmrgAC_ARG_ENABLE(malloc0returnsnull, 112524cd6a3aeSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 112534cd6a3aeSmrg [malloc(0) returns NULL (default: auto)]), 112544cd6a3aeSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112554cd6a3aeSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 112564cd6a3aeSmrg 112574cd6a3aeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112584cd6a3aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1125970728a38SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1126070728a38Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112614cd6a3aeSmrg#include <stdlib.h> 112624cd6a3aeSmrg],[ 112634cd6a3aeSmrg char *m0, *r0, *c0, *p; 112644cd6a3aeSmrg m0 = malloc(0); 112654cd6a3aeSmrg p = malloc(10); 112664cd6a3aeSmrg r0 = realloc(p,0); 112674cd6a3aeSmrg c0 = calloc(0,10); 112684cd6a3aeSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 112694cd6a3aeSmrg])], 1127070728a38Smrg [xorg_cv_malloc0_returns_null=yes], 1127170728a38Smrg [xorg_cv_malloc0_returns_null=no])]) 1127270728a38SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 112734cd6a3aeSmrgfi 112744cd6a3aeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 112758c9fbc29Smrg 112764cd6a3aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 112774cd6a3aeSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 112784cd6a3aeSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 112794cd6a3aeSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 112804cd6a3aeSmrgelse 112814cd6a3aeSmrg MALLOC_ZERO_CFLAGS="" 112824cd6a3aeSmrg XMALLOC_ZERO_CFLAGS="" 112834cd6a3aeSmrg XTMALLOC_ZERO_CFLAGS="" 112844cd6a3aeSmrgfi 112854e411241Smrg 112864cd6a3aeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 112874cd6a3aeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 112884cd6a3aeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 112894cd6a3aeSmrg]) # XORG_CHECK_MALLOC_ZERO 112904e411241Smrg 112914cd6a3aeSmrg# XORG_WITH_LINT() 112924e411241Smrg# ---------------- 112934cd6a3aeSmrg# Minimum version: 1.1.0 112944cd6a3aeSmrg# 112954cd6a3aeSmrg# This macro enables the use of a tool that flags some suspicious and 112964cd6a3aeSmrg# non-portable constructs (likely to be bugs) in C language source code. 112974cd6a3aeSmrg# It will attempt to locate the tool and use appropriate options. 112984cd6a3aeSmrg# There are various lint type tools on different platforms. 112994cd6a3aeSmrg# 113004cd6a3aeSmrg# Interface to module: 113014cd6a3aeSmrg# LINT: returns the path to the tool found on the platform 113024cd6a3aeSmrg# or the value set to LINT on the configure cmd line 113034cd6a3aeSmrg# also an Automake conditional 113044cd6a3aeSmrg# LINT_FLAGS: an Automake variable with appropriate flags 113054cd6a3aeSmrg# 113064cd6a3aeSmrg# --with-lint: 'yes' user instructs the module to use lint 113074cd6a3aeSmrg# 'no' user instructs the module not to use lint (default) 113084cd6a3aeSmrg# 113094cd6a3aeSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 113104cd6a3aeSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 113114cd6a3aeSmrg# 113124cd6a3aeSmrgAC_DEFUN([XORG_WITH_LINT],[ 113134cd6a3aeSmrg 113144cd6a3aeSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 113154cd6a3aeSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 113164cd6a3aeSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 113174cd6a3aeSmrg [Use a lint-style source code checker (default: disabled)])], 113184cd6a3aeSmrg [use_lint=$withval], [use_lint=no]) 113194cd6a3aeSmrg 113204cd6a3aeSmrg# Obtain platform specific info like program name and options 113214cd6a3aeSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 113224cd6a3aeSmrgcase $host_os in 113234cd6a3aeSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 113244cd6a3aeSmrg lint_name=splint 113254cd6a3aeSmrg lint_options="-badflag" 113264cd6a3aeSmrg ;; 113274cd6a3aeSmrg *freebsd* | *netbsd*) 113284cd6a3aeSmrg lint_name=lint 113294cd6a3aeSmrg lint_options="-u -b" 113304cd6a3aeSmrg ;; 113314cd6a3aeSmrg *solaris*) 113324cd6a3aeSmrg lint_name=lint 113334cd6a3aeSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 113344cd6a3aeSmrg ;; 113354cd6a3aeSmrgesac 113364cd6a3aeSmrg 113374cd6a3aeSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 113384cd6a3aeSmrgif test "x$use_lint" = x"yes" ; then 113394cd6a3aeSmrg AC_PATH_PROG([LINT], [$lint_name]) 113404cd6a3aeSmrg if test "x$LINT" = "x"; then 113414cd6a3aeSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 113424cd6a3aeSmrg fi 113434cd6a3aeSmrgelif test "x$use_lint" = x"no" ; then 113444cd6a3aeSmrg if test "x$LINT" != "x"; then 113454cd6a3aeSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113464cd6a3aeSmrg fi 113474e411241Smrgelse 113484cd6a3aeSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 113494e411241Smrgfi 113504e411241Smrg 113514cd6a3aeSmrg# User supplied flags override default flags 113524cd6a3aeSmrgif test "x$LINT_FLAGS" != "x"; then 113534cd6a3aeSmrg lint_options=$LINT_FLAGS 113544cd6a3aeSmrgfi 113554e411241Smrg 113564cd6a3aeSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113574cd6a3aeSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 113584cd6a3aeSmrg 113594cd6a3aeSmrg]) # XORG_WITH_LINT 113604cd6a3aeSmrg 113614cd6a3aeSmrg# XORG_LINT_LIBRARY(LIBNAME) 113624cd6a3aeSmrg# -------------------------- 113634cd6a3aeSmrg# Minimum version: 1.1.0 113644cd6a3aeSmrg# 113654cd6a3aeSmrg# Sets up flags for building lint libraries for checking programs that call 113664cd6a3aeSmrg# functions in the library. 113674cd6a3aeSmrg# 113684cd6a3aeSmrg# Interface to module: 113694cd6a3aeSmrg# LINTLIB - Automake variable with the name of lint library file to make 113704cd6a3aeSmrg# MAKE_LINT_LIB - Automake conditional 113714cd6a3aeSmrg# 113724cd6a3aeSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 113734cd6a3aeSmrg# - 'no' user instructs the module not to create a lint library (default) 113748c9fbc29Smrg 113754cd6a3aeSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 113764cd6a3aeSmrgAC_REQUIRE([XORG_WITH_LINT]) 113774cd6a3aeSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 113784cd6a3aeSmrg [Create lint library (default: disabled)])], 113794cd6a3aeSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 113804cd6a3aeSmrg 113814cd6a3aeSmrgif test "x$make_lint_lib" = x"yes" ; then 113824cd6a3aeSmrg LINTLIB=llib-l$1.ln 113834cd6a3aeSmrg if test "x$LINT" = "x"; then 113844cd6a3aeSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 113854cd6a3aeSmrg fi 113864cd6a3aeSmrgelif test "x$make_lint_lib" != x"no" ; then 113874cd6a3aeSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 113884cd6a3aeSmrgfi 113894cd6a3aeSmrg 113904cd6a3aeSmrgAC_SUBST(LINTLIB) 113914cd6a3aeSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 113924cd6a3aeSmrg 113934cd6a3aeSmrg]) # XORG_LINT_LIBRARY 113944cd6a3aeSmrg 113954cd6a3aeSmrg# XORG_COMPILER_BRAND 113964cd6a3aeSmrg# ------------------- 113974cd6a3aeSmrg# Minimum version: 1.14.0 113988c9fbc29Smrg# 113994cd6a3aeSmrg# Checks for various brands of compilers and sets flags as appropriate: 114004cd6a3aeSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 114014cd6a3aeSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 114024cd6a3aeSmrg# clang compiler - sets CLANGCC to "yes" 114034cd6a3aeSmrg# Intel compiler - sets INTELCC to "yes" 114044cd6a3aeSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 114058c9fbc29Smrg# 114064cd6a3aeSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 114074cd6a3aeSmrgAC_LANG_CASE( 114084cd6a3aeSmrg [C], [ 114094cd6a3aeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 114104cd6a3aeSmrg ], 114114cd6a3aeSmrg [C++], [ 114124cd6a3aeSmrg AC_REQUIRE([AC_PROG_CXX]) 114134cd6a3aeSmrg ] 114144cd6a3aeSmrg) 114154cd6a3aeSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 114164cd6a3aeSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 114174cd6a3aeSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 114184cd6a3aeSmrg]) # XORG_COMPILER_BRAND 114194cd6a3aeSmrg 114204cd6a3aeSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 114214cd6a3aeSmrg# --------------- 114224cd6a3aeSmrg# Minimum version: 1.16.0 114238c9fbc29Smrg# 114244cd6a3aeSmrg# Test if the compiler works when passed the given flag as a command line argument. 114254cd6a3aeSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 114264cd6a3aeSmrg# next flag in the list until there are no more options. 114278c9fbc29Smrg# 114284cd6a3aeSmrg# Note that this does not guarantee that the compiler supports the flag as some 114294cd6a3aeSmrg# compilers will simply ignore arguments that they do not understand, but we do 114304cd6a3aeSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 114314cd6a3aeSmrg# -Werror=unused-command-line-argument 114324cd6a3aeSmrg# 114334cd6a3aeSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 114344cd6a3aeSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114354cd6a3aeSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114364cd6a3aeSmrg 114374cd6a3aeSmrgAC_LANG_COMPILER_REQUIRE 114384cd6a3aeSmrg 114394cd6a3aeSmrgAC_LANG_CASE( 114404cd6a3aeSmrg [C], [ 114414cd6a3aeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 114424cd6a3aeSmrg define([PREFIX], [C]) 1144370728a38Smrg define([CACHE_PREFIX], [cc]) 1144470728a38Smrg define([COMPILER], [$CC]) 114454cd6a3aeSmrg ], 114464cd6a3aeSmrg [C++], [ 114474cd6a3aeSmrg define([PREFIX], [CXX]) 1144870728a38Smrg define([CACHE_PREFIX], [cxx]) 1144970728a38Smrg define([COMPILER], [$CXX]) 114504cd6a3aeSmrg ] 114514cd6a3aeSmrg) 114528c9fbc29Smrg 114534cd6a3aeSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114544cd6a3aeSmrg 1145570728a38Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 114564cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1145770728a38Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1145870728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114594cd6a3aeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1146070728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1146170728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1146270728a38Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 114634cd6a3aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114648c9fbc29Smrgfi 114654cd6a3aeSmrg 1146670728a38Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1146770728a38Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 114684cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114698c9fbc29Smrg fi 114704cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1147170728a38Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1147270728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 114734cd6a3aeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1147470728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1147570728a38Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1147670728a38Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 114774cd6a3aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114784cd6a3aeSmrgfi 114798c9fbc29Smrg 114804cd6a3aeSmrgfound="no" 114814cd6a3aeSmrgm4_foreach([flag], m4_cdr($@), [ 114824cd6a3aeSmrg if test $found = "no" ; then 1148370728a38Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 114844cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114854cd6a3aeSmrg fi 114864cd6a3aeSmrg 1148770728a38Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 114884cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114894cd6a3aeSmrg fi 114904cd6a3aeSmrg 114914cd6a3aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 114924cd6a3aeSmrg 114934cd6a3aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1149470728a38Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1149570728a38Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1149670728a38Smrg AC_CACHE_VAL($cacheid, 114974cd6a3aeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1149870728a38Smrg [eval $cacheid=yes], 1149970728a38Smrg [eval $cacheid=no])]) 115004cd6a3aeSmrg 115014cd6a3aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 115024cd6a3aeSmrg 1150370728a38Smrg eval supported=\$$cacheid 115044cd6a3aeSmrg AC_MSG_RESULT([$supported]) 115054cd6a3aeSmrg if test "$supported" = "yes" ; then 115064cd6a3aeSmrg $1="$$1 ]flag[" 115074cd6a3aeSmrg found="yes" 115084cd6a3aeSmrg fi 115094cd6a3aeSmrg fi 115104cd6a3aeSmrg]) 115114cd6a3aeSmrg]) # XORG_TESTSET_CFLAG 115124cd6a3aeSmrg 115134cd6a3aeSmrg# XORG_COMPILER_FLAGS 115144cd6a3aeSmrg# --------------- 115154cd6a3aeSmrg# Minimum version: 1.16.0 115168c9fbc29Smrg# 115174cd6a3aeSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 115184cd6a3aeSmrg# arguments supported by the selected compiler which do NOT alter the generated 115194cd6a3aeSmrg# code. These arguments will cause the compiler to print various warnings 115204cd6a3aeSmrg# during compilation AND turn a conservative set of warnings into errors. 115218c9fbc29Smrg# 115224cd6a3aeSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 115234cd6a3aeSmrg# future versions of util-macros as options are added to new compilers. 115248c9fbc29Smrg# 115254cd6a3aeSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 115264cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115274cd6a3aeSmrg 115284cd6a3aeSmrgAC_ARG_ENABLE(selective-werror, 115294cd6a3aeSmrg AS_HELP_STRING([--disable-selective-werror], 115304cd6a3aeSmrg [Turn off selective compiler errors. (default: enabled)]), 115314cd6a3aeSmrg [SELECTIVE_WERROR=$enableval], 115324cd6a3aeSmrg [SELECTIVE_WERROR=yes]) 115334cd6a3aeSmrg 115344cd6a3aeSmrgAC_LANG_CASE( 115354cd6a3aeSmrg [C], [ 115364cd6a3aeSmrg define([PREFIX], [C]) 115374cd6a3aeSmrg ], 115384cd6a3aeSmrg [C++], [ 115394cd6a3aeSmrg define([PREFIX], [CXX]) 115404cd6a3aeSmrg ] 115414cd6a3aeSmrg) 115424cd6a3aeSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 115434cd6a3aeSmrgif test "x$SUNCC" = "xyes"; then 115444cd6a3aeSmrg [BASE_]PREFIX[FLAGS]="-v" 115454cd6a3aeSmrgelse 115464cd6a3aeSmrg [BASE_]PREFIX[FLAGS]="" 115474cd6a3aeSmrgfi 115488c9fbc29Smrg 115494cd6a3aeSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 115504cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 115514cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 115524cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 115534cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 115544cd6a3aeSmrg 115554cd6a3aeSmrgAC_LANG_CASE( 115564cd6a3aeSmrg [C], [ 115574cd6a3aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 115584cd6a3aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 115594cd6a3aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 115604cd6a3aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1156170728a38Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 115624cd6a3aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 115634cd6a3aeSmrg ] 115644cd6a3aeSmrg) 115658c9fbc29Smrg 115664cd6a3aeSmrg# This chunk adds additional warnings that could catch undesired effects. 115674cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 115684cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 115694cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 115704cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 115714cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 115724cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1157370728a38SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 115744cd6a3aeSmrg 115754cd6a3aeSmrg# These are currently disabled because they are noisy. They will be enabled 115764cd6a3aeSmrg# in the future once the codebase is sufficiently modernized to silence 115774cd6a3aeSmrg# them. For now, I don't want them to drown out the other warnings. 115784cd6a3aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 115794cd6a3aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1158070728a38Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 115814cd6a3aeSmrg 115824cd6a3aeSmrg# Turn some warnings into errors, so we don't accidently get successful builds 115834cd6a3aeSmrg# when there are problems that should be fixed. 115844cd6a3aeSmrg 115854cd6a3aeSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 115864cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 115874cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 115884cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 115894cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 115904cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 115914cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 115924cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 115934cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 115944cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 115954cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 115964cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 115974cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 115984cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 115994e411241Smrgelse 116004cd6a3aeSmrgAC_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]) 116014cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 116024cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 116034cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 116044cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 116054cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 116064cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 116074cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 116084cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 116094cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 116104cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 116114cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 116124cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 116134cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 116144cd6a3aeSmrgfi 116154e411241Smrg 116164cd6a3aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116174cd6a3aeSmrg]) # XORG_COMPILER_FLAGS 116184e411241Smrg 116194cd6a3aeSmrg# XORG_CWARNFLAGS 116204cd6a3aeSmrg# --------------- 116214cd6a3aeSmrg# Minimum version: 1.2.0 116224cd6a3aeSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 116238c9fbc29Smrg# 116244cd6a3aeSmrg# Defines CWARNFLAGS to enable C compiler warnings. 116258c9fbc29Smrg# 116264cd6a3aeSmrg# This function is deprecated because it defines -fno-strict-aliasing 116274cd6a3aeSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 116284cd6a3aeSmrg# is needed, then it should be added explicitly in the module when 116294cd6a3aeSmrg# it is updated to use BASE_CFLAGS. 116308c9fbc29Smrg# 116314cd6a3aeSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 116324cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116334cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 116344cd6a3aeSmrgAC_LANG_CASE( 116354cd6a3aeSmrg [C], [ 116364cd6a3aeSmrg CWARNFLAGS="$BASE_CFLAGS" 116374cd6a3aeSmrg if test "x$GCC" = xyes ; then 116384cd6a3aeSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 116394cd6a3aeSmrg fi 116404cd6a3aeSmrg AC_SUBST(CWARNFLAGS) 116414cd6a3aeSmrg ] 116424cd6a3aeSmrg) 116434cd6a3aeSmrg]) # XORG_CWARNFLAGS 116448c9fbc29Smrg 116454cd6a3aeSmrg# XORG_STRICT_OPTION 116464cd6a3aeSmrg# ----------------------- 116474cd6a3aeSmrg# Minimum version: 1.3.0 116484cd6a3aeSmrg# 116494cd6a3aeSmrg# Add configure option to enable strict compilation flags, such as treating 116504cd6a3aeSmrg# warnings as fatal errors. 116514cd6a3aeSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 116524cd6a3aeSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116534cd6a3aeSmrg# 116544cd6a3aeSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116554cd6a3aeSmrg# when strict compilation is unconditionally desired. 116564cd6a3aeSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116574cd6a3aeSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116584cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116598c9fbc29Smrg 116604cd6a3aeSmrgAC_ARG_ENABLE(strict-compilation, 116614cd6a3aeSmrg AS_HELP_STRING([--enable-strict-compilation], 116624cd6a3aeSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116634cd6a3aeSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 116648c9fbc29Smrg 116654cd6a3aeSmrgAC_LANG_CASE( 116664cd6a3aeSmrg [C], [ 116674cd6a3aeSmrg define([PREFIX], [C]) 116684cd6a3aeSmrg ], 116694cd6a3aeSmrg [C++], [ 116704cd6a3aeSmrg define([PREFIX], [CXX]) 116714cd6a3aeSmrg ] 116724cd6a3aeSmrg) 116734e411241Smrg 116744cd6a3aeSmrg[STRICT_]PREFIX[FLAGS]="" 116754cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 116764cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 116778c9fbc29Smrg 116784cd6a3aeSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 116794cd6a3aeSmrg# activate it with -Werror, so we add it here explicitly. 116804cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 116814e411241Smrg 116824cd6a3aeSmrgif test "x$STRICT_COMPILE" = "xyes"; then 116834cd6a3aeSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 116844cd6a3aeSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 116854cd6a3aeSmrgfi 116864cd6a3aeSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 116874cd6a3aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116884cd6a3aeSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 116894cd6a3aeSmrg]) # XORG_STRICT_OPTION 116904e411241Smrg 116914cd6a3aeSmrg# XORG_DEFAULT_OPTIONS 116924cd6a3aeSmrg# -------------------- 116934cd6a3aeSmrg# Minimum version: 1.3.0 116944cd6a3aeSmrg# 116954cd6a3aeSmrg# Defines default options for X.Org modules. 116964cd6a3aeSmrg# 116974cd6a3aeSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 116984cd6a3aeSmrgAC_REQUIRE([AC_PROG_INSTALL]) 116994cd6a3aeSmrgXORG_COMPILER_FLAGS 117004cd6a3aeSmrgXORG_CWARNFLAGS 117014cd6a3aeSmrgXORG_STRICT_OPTION 117024cd6a3aeSmrgXORG_RELEASE_VERSION 117034cd6a3aeSmrgXORG_CHANGELOG 117044cd6a3aeSmrgXORG_INSTALL 117054cd6a3aeSmrgXORG_MANPAGE_SECTIONS 117064cd6a3aeSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 117074cd6a3aeSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 117084cd6a3aeSmrg]) # XORG_DEFAULT_OPTIONS 117098c9fbc29Smrg 117104cd6a3aeSmrg# XORG_INSTALL() 117114cd6a3aeSmrg# ---------------- 117124cd6a3aeSmrg# Minimum version: 1.4.0 117134cd6a3aeSmrg# 117144cd6a3aeSmrg# Defines the variable INSTALL_CMD as the command to copy 117154cd6a3aeSmrg# INSTALL from $prefix/share/util-macros. 117164cd6a3aeSmrg# 117174cd6a3aeSmrgAC_DEFUN([XORG_INSTALL], [ 117184cd6a3aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 117194cd6a3aeSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 117204cd6a3aeSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 117214cd6a3aeSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 117224cd6a3aeSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 117234cd6a3aeSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 117244cd6a3aeSmrgAC_SUBST([INSTALL_CMD]) 117254cd6a3aeSmrg]) # XORG_INSTALL 117264cd6a3aeSmrgdnl Copyright 2005 Red Hat, Inc 117274cd6a3aeSmrgdnl 117284cd6a3aeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 117294cd6a3aeSmrgdnl documentation for any purpose is hereby granted without fee, provided that 117304cd6a3aeSmrgdnl the above copyright notice appear in all copies and that both that 117314cd6a3aeSmrgdnl copyright notice and this permission notice appear in supporting 117324cd6a3aeSmrgdnl documentation. 117334cd6a3aeSmrgdnl 117344cd6a3aeSmrgdnl The above copyright notice and this permission notice shall be included 117354cd6a3aeSmrgdnl in all copies or substantial portions of the Software. 117364cd6a3aeSmrgdnl 117374cd6a3aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 117384cd6a3aeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 117394cd6a3aeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 117404cd6a3aeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 117414cd6a3aeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 117424cd6a3aeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 117434cd6a3aeSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 117444cd6a3aeSmrgdnl 117454cd6a3aeSmrgdnl Except as contained in this notice, the name of the copyright holders shall 117464cd6a3aeSmrgdnl not be used in advertising or otherwise to promote the sale, use or 117474cd6a3aeSmrgdnl other dealings in this Software without prior written authorization 117484cd6a3aeSmrgdnl from the copyright holders. 117494cd6a3aeSmrgdnl 117508c9fbc29Smrg 117514cd6a3aeSmrg# XORG_RELEASE_VERSION 117524cd6a3aeSmrg# -------------------- 117534cd6a3aeSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1175470728a38Smrg 117554cd6a3aeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117564cd6a3aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117574cd6a3aeSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117584cd6a3aeSmrg [Major version of this package]) 117594cd6a3aeSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117604cd6a3aeSmrg if test "x$PVM" = "x"; then 117614cd6a3aeSmrg PVM="0" 117624cd6a3aeSmrg fi 117634cd6a3aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117644cd6a3aeSmrg [$PVM], 117654cd6a3aeSmrg [Minor version of this package]) 117664cd6a3aeSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117674cd6a3aeSmrg if test "x$PVP" = "x"; then 117684cd6a3aeSmrg PVP="0" 117694cd6a3aeSmrg fi 117704cd6a3aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 117714cd6a3aeSmrg [$PVP], 117724cd6a3aeSmrg [Patch version of this package]) 117734cd6a3aeSmrg]) 117748c9fbc29Smrg 117754cd6a3aeSmrg# XORG_CHANGELOG() 117764cd6a3aeSmrg# ---------------- 117774cd6a3aeSmrg# Minimum version: 1.2.0 117784cd6a3aeSmrg# 117794cd6a3aeSmrg# Defines the variable CHANGELOG_CMD as the command to generate 117804cd6a3aeSmrg# ChangeLog from git. 117814cd6a3aeSmrg# 117824cd6a3aeSmrg# 117834cd6a3aeSmrgAC_DEFUN([XORG_CHANGELOG], [ 117844cd6a3aeSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 117854cd6a3aeSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 117864cd6a3aeSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 117874cd6a3aeSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 117884cd6a3aeSmrgAC_SUBST([CHANGELOG_CMD]) 117894cd6a3aeSmrg]) # XORG_CHANGELOG 117908c9fbc29Smrg 11791