aclocal.m4 revision df9ffc95
1df9ffc95Smrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 2df9ffc95Smrg 3df9ffc95Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 409885543Smrg 509885543Smrg# This file is free software; the Free Software Foundation 609885543Smrg# gives unlimited permission to copy and/or distribute it, 709885543Smrg# with or without modifications, as long as this notice is preserved. 809885543Smrg 909885543Smrg# This program is distributed in the hope that it will be useful, 1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1209885543Smrg# PARTICULAR PURPOSE. 1309885543Smrg 14df9ffc95Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 157104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION], 167104f784Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17df9ffc95Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18df9ffc95Smrg[m4_warning([this file was generated for autoconf 2.69. 197104f784SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 207104f784SmrgIf you have problems, you may need to regenerate the build system entirely. 21df9ffc95SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 227104f784Smrg 237b58d2e0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24e4f6584cSmrg# 257b58d2e0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26b12e5c03Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27b12e5c03Smrg# Foundation, Inc. 287b58d2e0Smrg# Written by Gordon Matzigkeit, 1996 29e4f6584cSmrg# 307b58d2e0Smrg# This file is free software; the Free Software Foundation gives 317b58d2e0Smrg# unlimited permission to copy and/or distribute it, with or without 327b58d2e0Smrg# modifications, as long as this notice is preserved. 332ec8c4b4Smrg 347b58d2e0Smrgm4_define([_LT_COPYING], [dnl 357b58d2e0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36b12e5c03Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37b12e5c03Smrg# Foundation, Inc. 387b58d2e0Smrg# Written by Gordon Matzigkeit, 1996 39e4f6584cSmrg# 407b58d2e0Smrg# This file is part of GNU Libtool. 41e4f6584cSmrg# 427b58d2e0Smrg# GNU Libtool is free software; you can redistribute it and/or 437b58d2e0Smrg# modify it under the terms of the GNU General Public License as 447b58d2e0Smrg# published by the Free Software Foundation; either version 2 of 457b58d2e0Smrg# the License, or (at your option) any later version. 46e4f6584cSmrg# 477b58d2e0Smrg# As a special exception to the GNU General Public License, 487b58d2e0Smrg# if you distribute this file as part of a program or library that 497b58d2e0Smrg# is built using GNU Libtool, you may include this file under the 507b58d2e0Smrg# same distribution terms that you use for the rest of that program. 51e4f6584cSmrg# 527b58d2e0Smrg# GNU Libtool is distributed in the hope that it will be useful, 537b58d2e0Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 547b58d2e0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 557b58d2e0Smrg# GNU General Public License for more details. 56e4f6584cSmrg# 577b58d2e0Smrg# You should have received a copy of the GNU General Public License 587b58d2e0Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 597b58d2e0Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 607b58d2e0Smrg# obtained by writing to the Free Software Foundation, Inc., 617b58d2e0Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62e4f6584cSmrg]) 63b698ba48Smrg 64b12e5c03Smrg# serial 57 LT_INIT 652ec8c4b4Smrg 6609885543Smrg 677b58d2e0Smrg# LT_PREREQ(VERSION) 687b58d2e0Smrg# ------------------ 697b58d2e0Smrg# Complain and exit if this libtool version is less that VERSION. 707b58d2e0Smrgm4_defun([LT_PREREQ], 717b58d2e0Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 727b58d2e0Smrg [m4_default([$3], 737b58d2e0Smrg [m4_fatal([Libtool version $1 or higher is required], 747b58d2e0Smrg 63)])], 757b58d2e0Smrg [$2])]) 7609885543Smrg 7709885543Smrg 787b58d2e0Smrg# _LT_CHECK_BUILDDIR 797b58d2e0Smrg# ------------------ 807b58d2e0Smrg# Complain if the absolute build directory name contains unusual characters 817b58d2e0Smrgm4_defun([_LT_CHECK_BUILDDIR], 827b58d2e0Smrg[case `pwd` in 837b58d2e0Smrg *\ * | *\ *) 847b58d2e0Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 857b58d2e0Smrgesac 867b58d2e0Smrg]) 8709885543Smrg 8809885543Smrg 897b58d2e0Smrg# LT_INIT([OPTIONS]) 907b58d2e0Smrg# ------------------ 917b58d2e0SmrgAC_DEFUN([LT_INIT], 927b58d2e0Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93b12e5c03SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 947b58d2e0SmrgAC_BEFORE([$0], [LT_LANG])dnl 957b58d2e0SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 967b58d2e0SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 977b58d2e0Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 9809885543Smrg 997b58d2e0Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1007b58d2e0Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1017b58d2e0Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1027b58d2e0Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1037b58d2e0Smrgdnl unless we require an AC_DEFUNed macro: 1047b58d2e0SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1057b58d2e0SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1067b58d2e0SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1077b58d2e0SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1087b58d2e0Smrgm4_require([_LT_PROG_LTMAIN])dnl 109b698ba48Smrg 110b12e5c03Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111b12e5c03Smrg 1127b58d2e0Smrgdnl Parse OPTIONS 1137b58d2e0Smrg_LT_SET_OPTIONS([$0], [$1]) 11409885543Smrg 1157b58d2e0Smrg# This can be used to rebuild libtool when needed 1167b58d2e0SmrgLIBTOOL_DEPS="$ltmain" 11709885543Smrg 1187b58d2e0Smrg# Always use our own libtool. 1197b58d2e0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1207b58d2e0SmrgAC_SUBST(LIBTOOL)dnl 121b698ba48Smrg 1227b58d2e0Smrg_LT_SETUP 12309885543Smrg 1247b58d2e0Smrg# Only expand once: 1257b58d2e0Smrgm4_define([LT_INIT]) 1267b58d2e0Smrg])# LT_INIT 12709885543Smrg 1287b58d2e0Smrg# Old names: 1297b58d2e0SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1307b58d2e0SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1317b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 1327b58d2e0Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1337b58d2e0Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134b698ba48Smrg 1357b58d2e0Smrg 1367b58d2e0Smrg# _LT_CC_BASENAME(CC) 1377b58d2e0Smrg# ------------------- 1387b58d2e0Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1397b58d2e0Smrgm4_defun([_LT_CC_BASENAME], 1407b58d2e0Smrg[for cc_temp in $1""; do 1417b58d2e0Smrg case $cc_temp in 1427b58d2e0Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1437b58d2e0Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1447b58d2e0Smrg \-*) ;; 1457b58d2e0Smrg *) break;; 1467b58d2e0Smrg esac 1477b58d2e0Smrgdone 148b12e5c03Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149e4f6584cSmrg]) 150b698ba48Smrg 15109885543Smrg 1527b58d2e0Smrg# _LT_FILEUTILS_DEFAULTS 1537b58d2e0Smrg# ---------------------- 1547b58d2e0Smrg# It is okay to use these file commands and assume they have been set 1557b58d2e0Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1567b58d2e0Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1577b58d2e0Smrg[: ${CP="cp -f"} 1587b58d2e0Smrg: ${MV="mv -f"} 1597b58d2e0Smrg: ${RM="rm -f"} 1607b58d2e0Smrg])# _LT_FILEUTILS_DEFAULTS 1617104f784Smrg 1622ec8c4b4Smrg 1637b58d2e0Smrg# _LT_SETUP 1647b58d2e0Smrg# --------- 1657b58d2e0Smrgm4_defun([_LT_SETUP], 1667b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1677b58d2e0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168b12e5c03SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169b12e5c03SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170b12e5c03Smrg 171b12e5c03Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172b12e5c03Smrgdnl 1737b58d2e0Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1747b58d2e0Smrg_LT_DECL([], [host], [0])dnl 1757b58d2e0Smrg_LT_DECL([], [host_os], [0])dnl 1767b58d2e0Smrgdnl 1777b58d2e0Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1787b58d2e0Smrg_LT_DECL([], [build], [0])dnl 1797b58d2e0Smrg_LT_DECL([], [build_os], [0])dnl 1807b58d2e0Smrgdnl 1817b58d2e0SmrgAC_REQUIRE([AC_PROG_CC])dnl 1827b58d2e0SmrgAC_REQUIRE([LT_PATH_LD])dnl 1837b58d2e0SmrgAC_REQUIRE([LT_PATH_NM])dnl 1847b58d2e0Smrgdnl 1857b58d2e0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1867b58d2e0Smrgtest -z "$LN_S" && LN_S="ln -s" 1877b58d2e0Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1887b58d2e0Smrgdnl 1897b58d2e0SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1907b58d2e0Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1917b58d2e0Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1927b58d2e0Smrgdnl 1937b58d2e0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1947b58d2e0Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195b12e5c03Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1967b58d2e0Smrgm4_require([_LT_CMD_RELOAD])dnl 1977b58d2e0Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198b12e5c03Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1997b58d2e0Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2007b58d2e0Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201b12e5c03Smrgm4_require([_LT_WITH_SYSROOT])dnl 2027b58d2e0Smrg 2037b58d2e0Smrg_LT_CONFIG_LIBTOOL_INIT([ 2047b58d2e0Smrg# See if we are running on zsh, and set the options which allow our 2057b58d2e0Smrg# commands through without removal of \ escapes INIT. 2067b58d2e0Smrgif test -n "\${ZSH_VERSION+set}" ; then 2077b58d2e0Smrg setopt NO_GLOB_SUBST 208e4f6584cSmrgfi 209e4f6584cSmrg]) 2107b58d2e0Smrgif test -n "${ZSH_VERSION+set}" ; then 2117b58d2e0Smrg setopt NO_GLOB_SUBST 2127b58d2e0Smrgfi 2132ec8c4b4Smrg 2147b58d2e0Smrg_LT_CHECK_OBJDIR 2152ec8c4b4Smrg 2167b58d2e0Smrgm4_require([_LT_TAG_COMPILER])dnl 2172ec8c4b4Smrg 2187b58d2e0Smrgcase $host_os in 2197b58d2e0Smrgaix3*) 2207b58d2e0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2217b58d2e0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2227b58d2e0Smrg # vanish in a puff of smoke. 2237b58d2e0Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2247b58d2e0Smrg COLLECT_NAMES= 2257b58d2e0Smrg export COLLECT_NAMES 2267b58d2e0Smrg fi 2277b58d2e0Smrg ;; 2287b58d2e0Smrgesac 22909885543Smrg 2307b58d2e0Smrg# Global variables: 2317b58d2e0Smrgofile=libtool 2327b58d2e0Smrgcan_build_shared=yes 23309885543Smrg 2347b58d2e0Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2357b58d2e0Smrg# which needs '.lib'). 2367b58d2e0Smrglibext=a 23709885543Smrg 2387b58d2e0Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 23909885543Smrg 2407b58d2e0Smrgold_CC="$CC" 2417b58d2e0Smrgold_CFLAGS="$CFLAGS" 24209885543Smrg 2437b58d2e0Smrg# Set sane defaults for various variables 2447b58d2e0Smrgtest -z "$CC" && CC=cc 2457b58d2e0Smrgtest -z "$LTCC" && LTCC=$CC 2467b58d2e0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2477b58d2e0Smrgtest -z "$LD" && LD=ld 2487b58d2e0Smrgtest -z "$ac_objext" && ac_objext=o 2497104f784Smrg 2507b58d2e0Smrg_LT_CC_BASENAME([$compiler]) 25109885543Smrg 2527b58d2e0Smrg# Only perform the check for file, if the check method requires it 2537b58d2e0Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2547b58d2e0Smrgcase $deplibs_check_method in 2557b58d2e0Smrgfile_magic*) 2567b58d2e0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2577b58d2e0Smrg _LT_PATH_MAGIC 258e4f6584cSmrg fi 2597b58d2e0Smrg ;; 2607b58d2e0Smrgesac 26109885543Smrg 2627b58d2e0Smrg# Use C for the default configuration in the libtool script 2637b58d2e0SmrgLT_SUPPORTED_TAG([CC]) 2647b58d2e0Smrg_LT_LANG_C_CONFIG 2657b58d2e0Smrg_LT_LANG_DEFAULT_CONFIG 2667b58d2e0Smrg_LT_CONFIG_COMMANDS 2677b58d2e0Smrg])# _LT_SETUP 26809885543Smrg 26909885543Smrg 270b12e5c03Smrg# _LT_PREPARE_SED_QUOTE_VARS 271b12e5c03Smrg# -------------------------- 272b12e5c03Smrg# Define a few sed substitution that help us do robust quoting. 273b12e5c03Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274b12e5c03Smrg[# Backslashify metacharacters that are still active within 275b12e5c03Smrg# double-quoted strings. 276b12e5c03Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277b12e5c03Smrg 278b12e5c03Smrg# Same as above, but do not quote variable references. 279b12e5c03Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280b12e5c03Smrg 281b12e5c03Smrg# Sed substitution to delay expansion of an escaped shell variable in a 282b12e5c03Smrg# double_quote_subst'ed string. 283b12e5c03Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284b12e5c03Smrg 285b12e5c03Smrg# Sed substitution to delay expansion of an escaped single quote. 286b12e5c03Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287b12e5c03Smrg 288b12e5c03Smrg# Sed substitution to avoid accidental globbing in evaled expressions 289b12e5c03Smrgno_glob_subst='s/\*/\\\*/g' 290b12e5c03Smrg]) 291b12e5c03Smrg 2927b58d2e0Smrg# _LT_PROG_LTMAIN 2937b58d2e0Smrg# --------------- 2947b58d2e0Smrg# Note that this code is called both from `configure', and `config.status' 2957b58d2e0Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2967b58d2e0Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2977b58d2e0Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2987b58d2e0Smrgm4_defun([_LT_PROG_LTMAIN], 2997b58d2e0Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3007b58d2e0Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3017b58d2e0Smrgltmain="$ac_aux_dir/ltmain.sh" 3027b58d2e0Smrg])# _LT_PROG_LTMAIN 30309885543Smrg 30409885543Smrg 30509885543Smrg 3067b58d2e0Smrg# So that we can recreate a full libtool script including additional 3077b58d2e0Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3087b58d2e0Smrg# in macros and then make a single call at the end using the `libtool' 3097b58d2e0Smrg# label. 31009885543Smrg 31109885543Smrg 3127b58d2e0Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3137b58d2e0Smrg# ---------------------------------------- 3147b58d2e0Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3157b58d2e0Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3167b58d2e0Smrg[m4_ifval([$1], 3177b58d2e0Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3187b58d2e0Smrg [$1 3197b58d2e0Smrg])])]) 32009885543Smrg 3217b58d2e0Smrg# Initialize. 3227b58d2e0Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 32309885543Smrg 32409885543Smrg 3257b58d2e0Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3267b58d2e0Smrg# ------------------------------ 3277b58d2e0Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3287b58d2e0Smrgm4_define([_LT_CONFIG_LIBTOOL], 3297b58d2e0Smrg[m4_ifval([$1], 3307b58d2e0Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3317b58d2e0Smrg [$1 3327b58d2e0Smrg])])]) 33309885543Smrg 3347b58d2e0Smrg# Initialize. 3357b58d2e0Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 33609885543Smrg 33709885543Smrg 3387b58d2e0Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3397b58d2e0Smrg# ----------------------------------------------------- 3407b58d2e0Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3417b58d2e0Smrg[_LT_CONFIG_LIBTOOL([$1]) 3427b58d2e0Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3437b58d2e0Smrg]) 34409885543Smrg 34509885543Smrg 3467b58d2e0Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3477b58d2e0Smrg# ----------------------------- 3487b58d2e0Smrg# Add leading comment marks to the start of each line, and a trailing 3497b58d2e0Smrg# full-stop to the whole comment if one is not present already. 3507b58d2e0Smrgm4_define([_LT_FORMAT_COMMENT], 3517b58d2e0Smrg[m4_ifval([$1], [ 3527b58d2e0Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3537b58d2e0Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3547b58d2e0Smrg)]) 35509885543Smrg 35609885543Smrg 35709885543Smrg 35809885543Smrg 359b698ba48Smrg 3607b58d2e0Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3617b58d2e0Smrg# ------------------------------------------------------------------- 3627b58d2e0Smrg# CONFIGNAME is the name given to the value in the libtool script. 3637b58d2e0Smrg# VARNAME is the (base) name used in the configure script. 3647b58d2e0Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3657b58d2e0Smrg# VARNAME. Any other value will be used directly. 3667b58d2e0Smrgm4_define([_LT_DECL], 3677b58d2e0Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3687b58d2e0Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3697b58d2e0Smrg [m4_ifval([$1], [$1], [$2])]) 3707b58d2e0Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3717b58d2e0Smrg m4_ifval([$4], 3727b58d2e0Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3737b58d2e0Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3747b58d2e0Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375e4f6584cSmrg]) 37609885543Smrg 377e4f6584cSmrg 3787b58d2e0Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3797b58d2e0Smrg# -------------------------------------------------------- 3807b58d2e0Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3812ec8c4b4Smrg 38209885543Smrg 3837b58d2e0Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3847b58d2e0Smrg# ------------------------------------------------ 3857b58d2e0Smrgm4_define([lt_decl_tag_varnames], 3867b58d2e0Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 38709885543Smrg 38809885543Smrg 3897b58d2e0Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3907b58d2e0Smrg# --------------------------------------------------------- 3917b58d2e0Smrgm4_define([_lt_decl_filter], 3927b58d2e0Smrg[m4_case([$#], 3937b58d2e0Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3947b58d2e0Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3957b58d2e0Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3967b58d2e0Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3977b58d2e0Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398e4f6584cSmrg]) 39909885543Smrg 4002ec8c4b4Smrg 4017b58d2e0Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4027b58d2e0Smrg# -------------------------------------------------- 4037b58d2e0Smrgm4_define([lt_decl_quote_varnames], 4047b58d2e0Smrg[_lt_decl_filter([value], [1], $@)]) 40509885543Smrg 40609885543Smrg 4077b58d2e0Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4087b58d2e0Smrg# --------------------------------------------------- 4097b58d2e0Smrgm4_define([lt_decl_dquote_varnames], 4107b58d2e0Smrg[_lt_decl_filter([value], [2], $@)]) 41109885543Smrg 41209885543Smrg 4137b58d2e0Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4147b58d2e0Smrg# --------------------------------------------------- 4157b58d2e0Smrgm4_define([lt_decl_varnames_tagged], 4167b58d2e0Smrg[m4_assert([$# <= 2])dnl 4177b58d2e0Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4187b58d2e0Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4197b58d2e0Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4207b58d2e0Smrgm4_define([_lt_decl_varnames_tagged], 4217b58d2e0Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 42209885543Smrg 42309885543Smrg 4247b58d2e0Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4257b58d2e0Smrg# ------------------------------------------------ 4267b58d2e0Smrgm4_define([lt_decl_all_varnames], 4277b58d2e0Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4287b58d2e0Smrg m4_if([$2], [], 4297b58d2e0Smrg m4_quote(lt_decl_varnames), 4307b58d2e0Smrg m4_quote(m4_shift($@))))[]dnl 4317b58d2e0Smrg]) 4327b58d2e0Smrgm4_define([_lt_decl_all_varnames], 4337b58d2e0Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4347b58d2e0Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4357b58d2e0Smrg]) 43609885543Smrg 43709885543Smrg 4387b58d2e0Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4397b58d2e0Smrg# ------------------------------------ 4407b58d2e0Smrg# Quote a variable value, and forward it to `config.status' so that its 4417b58d2e0Smrg# declaration there will have the same value as in `configure'. VARNAME 4427b58d2e0Smrg# must have a single quote delimited value for this to work. 4437b58d2e0Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444b12e5c03Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 44509885543Smrg 4467b58d2e0Smrg 4477b58d2e0Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4487b58d2e0Smrg# ------------------------------ 4497b58d2e0Smrg# We delimit libtool config variables with single quotes, so when 4507b58d2e0Smrg# we write them to config.status, we have to be sure to quote all 4517b58d2e0Smrg# embedded single quotes properly. In configure, this macro expands 4527b58d2e0Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453e4f6584cSmrg# 454b12e5c03Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4557b58d2e0Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4567b58d2e0Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4577b58d2e0Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45809885543Smrg 45909885543Smrg 4607b58d2e0Smrg# _LT_LIBTOOL_TAGS 4617b58d2e0Smrg# ---------------- 4627b58d2e0Smrg# Output comment and list of tags supported by the script 4637b58d2e0Smrgm4_defun([_LT_LIBTOOL_TAGS], 4647b58d2e0Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4657b58d2e0Smrgavailable_tags="_LT_TAGS"dnl 4667b58d2e0Smrg]) 46709885543Smrg 46809885543Smrg 4697b58d2e0Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4707b58d2e0Smrg# ----------------------------------- 4717b58d2e0Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4727b58d2e0Smrg# expand to a commented shell variable setting: 473e4f6584cSmrg# 4747b58d2e0Smrg# # Some comment about what VAR is for. 4757b58d2e0Smrg# visible_name=$lt_internal_name 4767b58d2e0Smrgm4_define([_LT_LIBTOOL_DECLARE], 4777b58d2e0Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4787b58d2e0Smrg [description])))[]dnl 4797b58d2e0Smrgm4_pushdef([_libtool_name], 4807b58d2e0Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4817b58d2e0Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4827b58d2e0Smrg [0], [_libtool_name=[$]$1], 4837b58d2e0Smrg [1], [_libtool_name=$lt_[]$1], 4847b58d2e0Smrg [2], [_libtool_name=$lt_[]$1], 4857b58d2e0Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4867b58d2e0Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487e4f6584cSmrg]) 48809885543Smrg 48909885543Smrg 4907b58d2e0Smrg# _LT_LIBTOOL_CONFIG_VARS 4917b58d2e0Smrg# ----------------------- 4927b58d2e0Smrg# Produce commented declarations of non-tagged libtool config variables 4937b58d2e0Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4947b58d2e0Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4957b58d2e0Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4967b58d2e0Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4977b58d2e0Smrg[m4_foreach([_lt_var], 4987b58d2e0Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4997b58d2e0Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 50009885543Smrg 50109885543Smrg 5027b58d2e0Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5037b58d2e0Smrg# ------------------------- 5047b58d2e0Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5057b58d2e0Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5067b58d2e0Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50709885543Smrg 50809885543Smrg 5097b58d2e0Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5107b58d2e0Smrg# ------------------------------ 5117b58d2e0Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 51209885543Smrg 51309885543Smrg 5147b58d2e0Smrg# _LT_CONFIG_COMMANDS 5157b58d2e0Smrg# ------------------- 5167b58d2e0Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5177b58d2e0Smrg# variables for single and double quote escaping we saved from calls 5187b58d2e0Smrg# to _LT_DECL, we can put quote escaped variables declarations 5197b58d2e0Smrg# into `config.status', and then the shell code to quote escape them in 5207b58d2e0Smrg# for loops in `config.status'. Finally, any additional code accumulated 5217b58d2e0Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5227b58d2e0Smrgm4_defun([_LT_CONFIG_COMMANDS], 5237b58d2e0Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5247b58d2e0Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5257b58d2e0Smrg dnl instead of duplicating it all over again into config.status, 5267b58d2e0Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5277b58d2e0Smrg dnl needs to know what name is stored there: 5287b58d2e0Smrg [AC_CONFIG_COMMANDS([libtool], 5297b58d2e0Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5307b58d2e0Smrg dnl If the libtool generation code is destined for config.status, 5317b58d2e0Smrg dnl expand the accumulated commands and init code now: 5327b58d2e0Smrg [AC_CONFIG_COMMANDS([libtool], 5337b58d2e0Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5347b58d2e0Smrg])#_LT_CONFIG_COMMANDS 53509885543Smrg 536e4f6584cSmrg 5377b58d2e0Smrg# Initialize. 5387b58d2e0Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5397b58d2e0Smrg[ 54009885543Smrg 5417b58d2e0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5427b58d2e0Smrg# if CDPATH is set. 5437b58d2e0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544e4f6584cSmrg 5457b58d2e0Smrgsed_quote_subst='$sed_quote_subst' 5467b58d2e0Smrgdouble_quote_subst='$double_quote_subst' 5477b58d2e0Smrgdelay_variable_subst='$delay_variable_subst' 5487b58d2e0Smrg_LT_CONFIG_STATUS_DECLARATIONS 5497b58d2e0SmrgLTCC='$LTCC' 5507b58d2e0SmrgLTCFLAGS='$LTCFLAGS' 5517b58d2e0Smrgcompiler='$compiler_DEFAULT' 55209885543Smrg 553b12e5c03Smrg# A function that is used when there is no print builtin or printf. 554b12e5c03Smrgfunc_fallback_echo () 555b12e5c03Smrg{ 556b12e5c03Smrg eval 'cat <<_LTECHO_EOF 557b12e5c03Smrg\$[]1 558b12e5c03Smrg_LTECHO_EOF' 559b12e5c03Smrg} 560b12e5c03Smrg 5617b58d2e0Smrg# Quote evaled strings. 5627b58d2e0Smrgfor var in lt_decl_all_varnames([[ \ 5637b58d2e0Smrg]], lt_decl_quote_varnames); do 564b12e5c03Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5657b58d2e0Smrg *[[\\\\\\\`\\"\\\$]]*) 566b12e5c03Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5677b58d2e0Smrg ;; 5687b58d2e0Smrg *) 5697b58d2e0Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5707b58d2e0Smrg ;; 5717b58d2e0Smrg esac 5727b58d2e0Smrgdone 57309885543Smrg 5747b58d2e0Smrg# Double-quote double-evaled strings. 5757b58d2e0Smrgfor var in lt_decl_all_varnames([[ \ 5767b58d2e0Smrg]], lt_decl_dquote_varnames); do 577b12e5c03Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5787b58d2e0Smrg *[[\\\\\\\`\\"\\\$]]*) 579b12e5c03Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5807b58d2e0Smrg ;; 5817b58d2e0Smrg *) 5827b58d2e0Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5837b58d2e0Smrg ;; 5847b58d2e0Smrg esac 5857b58d2e0Smrgdone 58609885543Smrg 5877b58d2e0Smrg_LT_OUTPUT_LIBTOOL_INIT 5887b58d2e0Smrg]) 58909885543Smrg 590b12e5c03Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591b12e5c03Smrg# ------------------------------------ 592b12e5c03Smrg# Generate a child script FILE with all initialization necessary to 593b12e5c03Smrg# reuse the environment learned by the parent script, and make the 594b12e5c03Smrg# file executable. If COMMENT is supplied, it is inserted after the 595b12e5c03Smrg# `#!' sequence but before initialization text begins. After this 596b12e5c03Smrg# macro, additional text can be appended to FILE to form the body of 597b12e5c03Smrg# the child script. The macro ends with non-zero status if the 598b12e5c03Smrg# file could not be fully written (such as if the disk is full). 599b12e5c03Smrgm4_ifdef([AS_INIT_GENERATED], 600b12e5c03Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601b12e5c03Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 602b12e5c03Smrg[m4_require([AS_PREPARE])]dnl 603b12e5c03Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604b12e5c03Smrg[lt_write_fail=0 605b12e5c03Smrgcat >$1 <<_ASEOF || lt_write_fail=1 606b12e5c03Smrg#! $SHELL 607b12e5c03Smrg# Generated by $as_me. 608b12e5c03Smrg$2 609b12e5c03SmrgSHELL=\${CONFIG_SHELL-$SHELL} 610b12e5c03Smrgexport SHELL 611b12e5c03Smrg_ASEOF 612b12e5c03Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613b12e5c03SmrgAS_SHELL_SANITIZE 614b12e5c03Smrg_AS_PREPARE 615b12e5c03Smrgexec AS_MESSAGE_FD>&1 616b12e5c03Smrg_ASEOF 617b12e5c03Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618b12e5c03Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 61909885543Smrg 6207b58d2e0Smrg# LT_OUTPUT 6217b58d2e0Smrg# --------- 6227b58d2e0Smrg# This macro allows early generation of the libtool script (before 6237b58d2e0Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6247b58d2e0Smrg# tests. 6257b58d2e0SmrgAC_DEFUN([LT_OUTPUT], 6267b58d2e0Smrg[: ${CONFIG_LT=./config.lt} 6277b58d2e0SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628b12e5c03Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629b12e5c03Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 63009885543Smrg 6317b58d2e0Smrgcat >>"$CONFIG_LT" <<\_LTEOF 632b12e5c03Smrglt_cl_silent=false 6337b58d2e0Smrgexec AS_MESSAGE_LOG_FD>>config.log 6347b58d2e0Smrg{ 6357b58d2e0Smrg echo 6367b58d2e0Smrg AS_BOX([Running $as_me.]) 6377b58d2e0Smrg} >&AS_MESSAGE_LOG_FD 6382ec8c4b4Smrg 6397b58d2e0Smrglt_cl_help="\ 6407b58d2e0Smrg\`$as_me' creates a local libtool stub from the current configuration, 6417b58d2e0Smrgfor use in further configure time tests before the real libtool is 6427b58d2e0Smrggenerated. 64309885543Smrg 6447b58d2e0SmrgUsage: $[0] [[OPTIONS]] 64509885543Smrg 6467b58d2e0Smrg -h, --help print this help, then exit 6477b58d2e0Smrg -V, --version print version number, then exit 6487b58d2e0Smrg -q, --quiet do not print progress messages 6497b58d2e0Smrg -d, --debug don't remove temporary files 65009885543Smrg 6517b58d2e0SmrgReport bugs to <bug-libtool@gnu.org>." 65209885543Smrg 6537b58d2e0Smrglt_cl_version="\ 6547b58d2e0Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6557b58d2e0Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6567b58d2e0Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 65709885543Smrg 658b12e5c03SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6597b58d2e0SmrgThis config.lt script is free software; the Free Software Foundation 6607b58d2e0Smrggives unlimited permision to copy, distribute and modify it." 66109885543Smrg 6627b58d2e0Smrgwhile test $[#] != 0 6637b58d2e0Smrgdo 6647b58d2e0Smrg case $[1] in 6657b58d2e0Smrg --version | --v* | -V ) 6667b58d2e0Smrg echo "$lt_cl_version"; exit 0 ;; 6677b58d2e0Smrg --help | --h* | -h ) 6687b58d2e0Smrg echo "$lt_cl_help"; exit 0 ;; 6697b58d2e0Smrg --debug | --d* | -d ) 6707b58d2e0Smrg debug=: ;; 6717b58d2e0Smrg --quiet | --q* | --silent | --s* | -q ) 6727b58d2e0Smrg lt_cl_silent=: ;; 673e4f6584cSmrg 6747b58d2e0Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6757b58d2e0SmrgTry \`$[0] --help' for more information.]) ;; 676e4f6584cSmrg 6777b58d2e0Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6787b58d2e0SmrgTry \`$[0] --help' for more information.]) ;; 6797b58d2e0Smrg esac 6807b58d2e0Smrg shift 6817b58d2e0Smrgdone 6827b58d2e0Smrg 6837b58d2e0Smrgif $lt_cl_silent; then 6847b58d2e0Smrg exec AS_MESSAGE_FD>/dev/null 68509885543Smrgfi 6867b58d2e0Smrg_LTEOF 68709885543Smrg 6887b58d2e0Smrgcat >>"$CONFIG_LT" <<_LTEOF 6897b58d2e0Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6907b58d2e0Smrg_LTEOF 69109885543Smrg 6927b58d2e0Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6937b58d2e0SmrgAC_MSG_NOTICE([creating $ofile]) 6947b58d2e0Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6957b58d2e0SmrgAS_EXIT(0) 6967b58d2e0Smrg_LTEOF 6977b58d2e0Smrgchmod +x "$CONFIG_LT" 69809885543Smrg 6997b58d2e0Smrg# configure is writing to config.log, but config.lt does its own redirection, 7007b58d2e0Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7017b58d2e0Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7027b58d2e0Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703b12e5c03Smrglt_cl_success=: 704b12e5c03Smrgtest "$silent" = yes && 705b12e5c03Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 706b12e5c03Smrgexec AS_MESSAGE_LOG_FD>/dev/null 707b12e5c03Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708b12e5c03Smrgexec AS_MESSAGE_LOG_FD>>config.log 709b12e5c03Smrg$lt_cl_success || AS_EXIT(1) 7107b58d2e0Smrg])# LT_OUTPUT 711e4f6584cSmrg 712e4f6584cSmrg 7137b58d2e0Smrg# _LT_CONFIG(TAG) 7147b58d2e0Smrg# --------------- 7157b58d2e0Smrg# If TAG is the built-in tag, create an initial libtool script with a 7167b58d2e0Smrg# default configuration from the untagged config vars. Otherwise add code 7177b58d2e0Smrg# to config.status for appending the configuration named by TAG from the 7187b58d2e0Smrg# matching tagged config vars. 7197b58d2e0Smrgm4_defun([_LT_CONFIG], 7207b58d2e0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7217b58d2e0Smrg_LT_CONFIG_SAVE_COMMANDS([ 7227b58d2e0Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7237b58d2e0Smrg m4_if(_LT_TAG, [C], [ 7247b58d2e0Smrg # See if we are running on zsh, and set the options which allow our 7257b58d2e0Smrg # commands through without removal of \ escapes. 7267b58d2e0Smrg if test -n "${ZSH_VERSION+set}" ; then 7277b58d2e0Smrg setopt NO_GLOB_SUBST 7287b58d2e0Smrg fi 72909885543Smrg 7307b58d2e0Smrg cfgfile="${ofile}T" 7317b58d2e0Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7327b58d2e0Smrg $RM "$cfgfile" 73309885543Smrg 7347b58d2e0Smrg cat <<_LT_EOF >> "$cfgfile" 7357b58d2e0Smrg#! $SHELL 73609885543Smrg 7377b58d2e0Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7387b58d2e0Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7397b58d2e0Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7407b58d2e0Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7417b58d2e0Smrg# 7427b58d2e0Smrg_LT_COPYING 7437b58d2e0Smrg_LT_LIBTOOL_TAGS 744e4f6584cSmrg 7457b58d2e0Smrg# ### BEGIN LIBTOOL CONFIG 7467b58d2e0Smrg_LT_LIBTOOL_CONFIG_VARS 7477b58d2e0Smrg_LT_LIBTOOL_TAG_VARS 7487b58d2e0Smrg# ### END LIBTOOL CONFIG 7497b58d2e0Smrg 7507b58d2e0Smrg_LT_EOF 7517b58d2e0Smrg 7527b58d2e0Smrg case $host_os in 7537b58d2e0Smrg aix3*) 7547b58d2e0Smrg cat <<\_LT_EOF >> "$cfgfile" 7557b58d2e0Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7567b58d2e0Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7577b58d2e0Smrg# vanish in a puff of smoke. 7587b58d2e0Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7597b58d2e0Smrg COLLECT_NAMES= 7607b58d2e0Smrg export COLLECT_NAMES 76109885543Smrgfi 7627b58d2e0Smrg_LT_EOF 7637b58d2e0Smrg ;; 7647b58d2e0Smrg esac 76509885543Smrg 7667b58d2e0Smrg _LT_PROG_LTMAIN 76709885543Smrg 7687b58d2e0Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7697b58d2e0Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7707b58d2e0Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7717b58d2e0Smrg # is reportedly fixed, but why not run on old versions too? 772b12e5c03Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773b12e5c03Smrg || (rm -f "$cfgfile"; exit 1) 77409885543Smrg 775b12e5c03Smrg _LT_PROG_REPLACE_SHELLFNS 77609885543Smrg 777b12e5c03Smrg mv -f "$cfgfile" "$ofile" || 7787b58d2e0Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7797b58d2e0Smrg chmod +x "$ofile" 7807b58d2e0Smrg], 7817b58d2e0Smrg[cat <<_LT_EOF >> "$ofile" 78209885543Smrg 7837b58d2e0Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7847b58d2e0Smrgdnl in a comment (ie after a #). 7857b58d2e0Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7867b58d2e0Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7877b58d2e0Smrg# ### END LIBTOOL TAG CONFIG: $1 7887b58d2e0Smrg_LT_EOF 7897b58d2e0Smrg])dnl /m4_if 7907b58d2e0Smrg], 7917b58d2e0Smrg[m4_if([$1], [], [ 7927b58d2e0Smrg PACKAGE='$PACKAGE' 7937b58d2e0Smrg VERSION='$VERSION' 7947b58d2e0Smrg TIMESTAMP='$TIMESTAMP' 7957b58d2e0Smrg RM='$RM' 7967b58d2e0Smrg ofile='$ofile'], []) 7977b58d2e0Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7987b58d2e0Smrg])# _LT_CONFIG 79909885543Smrg 80009885543Smrg 8017b58d2e0Smrg# LT_SUPPORTED_TAG(TAG) 8027b58d2e0Smrg# --------------------- 8037b58d2e0Smrg# Trace this macro to discover what tags are supported by the libtool 8047b58d2e0Smrg# --tag option, using: 8057b58d2e0Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8067b58d2e0SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 80709885543Smrg 80809885543Smrg 8097b58d2e0Smrg# C support is built-in for now 8107b58d2e0Smrgm4_define([_LT_LANG_C_enabled], []) 8117b58d2e0Smrgm4_define([_LT_TAGS], []) 81209885543Smrg 81309885543Smrg 8147b58d2e0Smrg# LT_LANG(LANG) 8157b58d2e0Smrg# ------------- 8167b58d2e0Smrg# Enable libtool support for the given language if not already enabled. 8177b58d2e0SmrgAC_DEFUN([LT_LANG], 8187b58d2e0Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8197b58d2e0Smrgm4_case([$1], 8207b58d2e0Smrg [C], [_LT_LANG(C)], 8217b58d2e0Smrg [C++], [_LT_LANG(CXX)], 822b12e5c03Smrg [Go], [_LT_LANG(GO)], 8237b58d2e0Smrg [Java], [_LT_LANG(GCJ)], 8247b58d2e0Smrg [Fortran 77], [_LT_LANG(F77)], 8257b58d2e0Smrg [Fortran], [_LT_LANG(FC)], 8267b58d2e0Smrg [Windows Resource], [_LT_LANG(RC)], 8277b58d2e0Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8287b58d2e0Smrg [_LT_LANG($1)], 8297b58d2e0Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8307b58d2e0Smrg])# LT_LANG 83109885543Smrg 83209885543Smrg 8337b58d2e0Smrg# _LT_LANG(LANGNAME) 8347b58d2e0Smrg# ------------------ 8357b58d2e0Smrgm4_defun([_LT_LANG], 8367b58d2e0Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8377b58d2e0Smrg [LT_SUPPORTED_TAG([$1])dnl 8387b58d2e0Smrg m4_append([_LT_TAGS], [$1 ])dnl 8397b58d2e0Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8407b58d2e0Smrg _LT_LANG_$1_CONFIG($1)])dnl 8417b58d2e0Smrg])# _LT_LANG 842e4f6584cSmrg 84309885543Smrg 844b12e5c03Smrgm4_ifndef([AC_PROG_GO], [ 845b12e5c03Smrg# NOTE: This macro has been submitted for inclusion into # 846b12e5c03Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847b12e5c03Smrg# a released version of Autoconf we should remove this # 848b12e5c03Smrg# macro and use it instead. # 849b12e5c03Smrgm4_defun([AC_PROG_GO], 850b12e5c03Smrg[AC_LANG_PUSH(Go)dnl 851b12e5c03SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852b12e5c03SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853b12e5c03Smrg_AC_ARG_VAR_LDFLAGS()dnl 854b12e5c03SmrgAC_CHECK_TOOL(GOC, gccgo) 855b12e5c03Smrgif test -z "$GOC"; then 856b12e5c03Smrg if test -n "$ac_tool_prefix"; then 857b12e5c03Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858b12e5c03Smrg fi 859b12e5c03Smrgfi 860b12e5c03Smrgif test -z "$GOC"; then 861b12e5c03Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862b12e5c03Smrgfi 863b12e5c03Smrg])#m4_defun 864b12e5c03Smrg])#m4_ifndef 865b12e5c03Smrg 866b12e5c03Smrg 8677b58d2e0Smrg# _LT_LANG_DEFAULT_CONFIG 8687b58d2e0Smrg# ----------------------- 8697b58d2e0Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8707b58d2e0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8717b58d2e0Smrg [LT_LANG(CXX)], 8727b58d2e0Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873e4f6584cSmrg 8747b58d2e0SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8757b58d2e0Smrg [LT_LANG(F77)], 8767b58d2e0Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 87709885543Smrg 8787b58d2e0SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8797b58d2e0Smrg [LT_LANG(FC)], 8807b58d2e0Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881e4f6584cSmrg 8827b58d2e0Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8837b58d2e0Smrgdnl pulling things in needlessly. 8847b58d2e0SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8857b58d2e0Smrg [LT_LANG(GCJ)], 8867b58d2e0Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8877b58d2e0Smrg [LT_LANG(GCJ)], 8887b58d2e0Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8897b58d2e0Smrg [LT_LANG(GCJ)], 8907b58d2e0Smrg [m4_ifdef([AC_PROG_GCJ], 8917b58d2e0Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8927b58d2e0Smrg m4_ifdef([A][M_PROG_GCJ], 8937b58d2e0Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8947b58d2e0Smrg m4_ifdef([LT_PROG_GCJ], 8957b58d2e0Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 89609885543Smrg 897b12e5c03SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898b12e5c03Smrg [LT_LANG(GO)], 899b12e5c03Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900b12e5c03Smrg 9017b58d2e0SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9027b58d2e0Smrg [LT_LANG(RC)], 9037b58d2e0Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9047b58d2e0Smrg])# _LT_LANG_DEFAULT_CONFIG 9057b58d2e0Smrg 9067b58d2e0Smrg# Obsolete macros: 9077b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9087b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9097b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9107b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911b12e5c03SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9127b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 9137b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9147b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9157b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9167b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917b12e5c03Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9187b58d2e0Smrg 9197b58d2e0Smrg 9207b58d2e0Smrg# _LT_TAG_COMPILER 921e4f6584cSmrg# ---------------- 9227b58d2e0Smrgm4_defun([_LT_TAG_COMPILER], 9237b58d2e0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 924e4f6584cSmrg 9257b58d2e0Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9267b58d2e0Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9277b58d2e0Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9287b58d2e0Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 92909885543Smrg 9307b58d2e0Smrg# If no C compiler was specified, use CC. 9317b58d2e0SmrgLTCC=${LTCC-"$CC"} 932e4f6584cSmrg 9337b58d2e0Smrg# If no C compiler flags were specified, use CFLAGS. 9347b58d2e0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 93509885543Smrg 9367b58d2e0Smrg# Allow CC to be a program name with arguments. 9377b58d2e0Smrgcompiler=$CC 9387b58d2e0Smrg])# _LT_TAG_COMPILER 939e4f6584cSmrg 94009885543Smrg 9417b58d2e0Smrg# _LT_COMPILER_BOILERPLATE 9427b58d2e0Smrg# ------------------------ 9437b58d2e0Smrg# Check for compiler boilerplate output or warnings with 9447b58d2e0Smrg# the simple compiler test code. 9457b58d2e0Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9467b58d2e0Smrg[m4_require([_LT_DECL_SED])dnl 9477b58d2e0Smrgac_outfile=conftest.$ac_objext 9487b58d2e0Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9497b58d2e0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9507b58d2e0Smrg_lt_compiler_boilerplate=`cat conftest.err` 9517b58d2e0Smrg$RM conftest* 9527b58d2e0Smrg])# _LT_COMPILER_BOILERPLATE 953e4f6584cSmrg 954e4f6584cSmrg 9557b58d2e0Smrg# _LT_LINKER_BOILERPLATE 956e4f6584cSmrg# ---------------------- 9577b58d2e0Smrg# Check for linker boilerplate output or warnings with 9587b58d2e0Smrg# the simple link test code. 9597b58d2e0Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9607b58d2e0Smrg[m4_require([_LT_DECL_SED])dnl 9617b58d2e0Smrgac_outfile=conftest.$ac_objext 9627b58d2e0Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9637b58d2e0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9647b58d2e0Smrg_lt_linker_boilerplate=`cat conftest.err` 9657b58d2e0Smrg$RM -r conftest* 9667b58d2e0Smrg])# _LT_LINKER_BOILERPLATE 96709885543Smrg 9687b58d2e0Smrg# _LT_REQUIRED_DARWIN_CHECKS 9697b58d2e0Smrg# ------------------------- 9707b58d2e0Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9717b58d2e0Smrg case $host_os in 9727b58d2e0Smrg rhapsody* | darwin*) 9737b58d2e0Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9747b58d2e0Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9757b58d2e0Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9767b58d2e0Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9777b58d2e0Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9787b58d2e0Smrg _LT_DECL([], [DSYMUTIL], [1], 9797b58d2e0Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9807b58d2e0Smrg _LT_DECL([], [NMEDIT], [1], 9817b58d2e0Smrg [Tool to change global to local symbols on Mac OS X]) 9827b58d2e0Smrg _LT_DECL([], [LIPO], [1], 9837b58d2e0Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9847b58d2e0Smrg _LT_DECL([], [OTOOL], [1], 9857b58d2e0Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9867b58d2e0Smrg _LT_DECL([], [OTOOL64], [1], 9877b58d2e0Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 98809885543Smrg 9897b58d2e0Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9907b58d2e0Smrg [lt_cv_apple_cc_single_mod=no 9917b58d2e0Smrg if test -z "${LT_MULTI_MODULE}"; then 9927b58d2e0Smrg # By default we will add the -single_module flag. You can override 9937b58d2e0Smrg # by either setting the environment variable LT_MULTI_MODULE 9947b58d2e0Smrg # non-empty at configure time, or by adding -multi_module to the 9957b58d2e0Smrg # link flags. 9967b58d2e0Smrg rm -rf libconftest.dylib* 9977b58d2e0Smrg echo "int foo(void){return 1;}" > conftest.c 9987b58d2e0Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9997b58d2e0Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10007b58d2e0Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10017b58d2e0Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10027b58d2e0Smrg _lt_result=$? 1003b12e5c03Smrg # If there is a non-empty error log, and "single_module" 1004b12e5c03Smrg # appears in it, assume the flag caused a linker warning 1005b12e5c03Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006b12e5c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007b12e5c03Smrg # Otherwise, if the output was created with a 0 exit code from 1008b12e5c03Smrg # the compiler, it worked. 1009b12e5c03Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10107b58d2e0Smrg lt_cv_apple_cc_single_mod=yes 1011e4f6584cSmrg else 10127b58d2e0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013e4f6584cSmrg fi 10147b58d2e0Smrg rm -rf libconftest.dylib* 10157b58d2e0Smrg rm -f conftest.* 10167b58d2e0Smrg fi]) 1017b12e5c03Smrg 10187b58d2e0Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10197b58d2e0Smrg [lt_cv_ld_exported_symbols_list], 10207b58d2e0Smrg [lt_cv_ld_exported_symbols_list=no 10217b58d2e0Smrg save_LDFLAGS=$LDFLAGS 10227b58d2e0Smrg echo "_main" > conftest.sym 10237b58d2e0Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10247b58d2e0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10257b58d2e0Smrg [lt_cv_ld_exported_symbols_list=yes], 10267b58d2e0Smrg [lt_cv_ld_exported_symbols_list=no]) 10277b58d2e0Smrg LDFLAGS="$save_LDFLAGS" 10287b58d2e0Smrg ]) 1029b12e5c03Smrg 1030b12e5c03Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031b12e5c03Smrg [lt_cv_ld_force_load=no 1032b12e5c03Smrg cat > conftest.c << _LT_EOF 1033b12e5c03Smrgint forced_loaded() { return 2;} 1034b12e5c03Smrg_LT_EOF 1035b12e5c03Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036b12e5c03Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037b12e5c03Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038b12e5c03Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039b12e5c03Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040b12e5c03Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041b12e5c03Smrg cat > conftest.c << _LT_EOF 1042b12e5c03Smrgint main() { return 0;} 1043b12e5c03Smrg_LT_EOF 1044b12e5c03Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045b12e5c03Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046b12e5c03Smrg _lt_result=$? 1047b12e5c03Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048b12e5c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049b12e5c03Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050b12e5c03Smrg lt_cv_ld_force_load=yes 1051b12e5c03Smrg else 1052b12e5c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053b12e5c03Smrg fi 1054b12e5c03Smrg rm -f conftest.err libconftest.a conftest conftest.c 1055b12e5c03Smrg rm -rf conftest.dSYM 1056b12e5c03Smrg ]) 10577b58d2e0Smrg case $host_os in 10587b58d2e0Smrg rhapsody* | darwin1.[[012]]) 10597b58d2e0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10607b58d2e0Smrg darwin1.*) 10617b58d2e0Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10627b58d2e0Smrg darwin*) # darwin 5.x on 10637b58d2e0Smrg # if running on 10.5 or later, the deployment target defaults 10647b58d2e0Smrg # to the OS version, if on x86, and 10.4, the deployment 10657b58d2e0Smrg # target defaults to 10.4. Don't you love it? 10667b58d2e0Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10677b58d2e0Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10687b58d2e0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10697b58d2e0Smrg 10.[[012]]*) 10707b58d2e0Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10717b58d2e0Smrg 10.*) 10727b58d2e0Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10737b58d2e0Smrg esac 10747b58d2e0Smrg ;; 10757b58d2e0Smrg esac 10767b58d2e0Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10777b58d2e0Smrg _lt_dar_single_mod='$single_module' 1078e4f6584cSmrg fi 10797b58d2e0Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10807b58d2e0Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10817b58d2e0Smrg else 10827b58d2e0Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10837b58d2e0Smrg fi 1084b12e5c03Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10857b58d2e0Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10867b58d2e0Smrg else 10877b58d2e0Smrg _lt_dsymutil= 10887b58d2e0Smrg fi 10897b58d2e0Smrg ;; 10907b58d2e0Smrg esac 10917b58d2e0Smrg]) 109209885543Smrg 1093e4f6584cSmrg 1094b12e5c03Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095b12e5c03Smrg# --------------------------------- 10967b58d2e0Smrg# Checks for linker and compiler features on darwin 10977b58d2e0Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10987b58d2e0Smrg[ 10997b58d2e0Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11007b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11017b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11027b58d2e0Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11037b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104b12e5c03Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1105b12e5c03Smrg _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\"`' 1106b12e5c03Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107b12e5c03Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108b12e5c03Smrg else 1109b12e5c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110b12e5c03Smrg fi 11117b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11127b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11137b58d2e0Smrg case $cc_basename in 11147b58d2e0Smrg ifort*) _lt_dar_can_shared=yes ;; 11157b58d2e0Smrg *) _lt_dar_can_shared=$GCC ;; 11167b58d2e0Smrg esac 11177b58d2e0Smrg if test "$_lt_dar_can_shared" = "yes"; then 1118b12e5c03Smrg output_verbose_link_cmd=func_echo_all 11197b58d2e0Smrg _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}" 11207b58d2e0Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11217b58d2e0Smrg _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}" 11227b58d2e0Smrg _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}" 11237b58d2e0Smrg m4_if([$1], [CXX], 11247b58d2e0Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11257b58d2e0Smrg _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}" 11267b58d2e0Smrg _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}" 11277b58d2e0Smrg fi 11287b58d2e0Smrg],[]) 11297b58d2e0Smrg else 11307b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11317b58d2e0Smrg fi 11327b58d2e0Smrg]) 113309885543Smrg 1134b12e5c03Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135b12e5c03Smrg# ---------------------------------- 11367b58d2e0Smrg# Links a minimal program and checks the executable 11377b58d2e0Smrg# for the system default hardcoded library path. In most cases, 11387b58d2e0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11397b58d2e0Smrg# the location of the communication and MPI libs are included too. 11407b58d2e0Smrg# If we don't find anything, use the default library path according 11417b58d2e0Smrg# to the aix ld manual. 1142b12e5c03Smrg# Store the results from the different compilers for each TAGNAME. 1143b12e5c03Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11447b58d2e0Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11457b58d2e0Smrg[m4_require([_LT_DECL_SED])dnl 1146b12e5c03Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147b12e5c03Smrg aix_libpath=$lt_cv_aix_libpath 1148b12e5c03Smrgelse 1149b12e5c03Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150b12e5c03Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151b12e5c03Smrg lt_aix_libpath_sed='[ 1152b12e5c03Smrg /Import File Strings/,/^$/ { 1153b12e5c03Smrg /^0/ { 1154b12e5c03Smrg s/^0 *\([^ ]*\) *$/\1/ 1155b12e5c03Smrg p 1156b12e5c03Smrg } 1157b12e5c03Smrg }]' 1158b12e5c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159b12e5c03Smrg # Check for a 64-bit object if we didn't find anything. 1160b12e5c03Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161b12e5c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162b12e5c03Smrg fi],[]) 1163b12e5c03Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164b12e5c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165b12e5c03Smrg fi 1166b12e5c03Smrg ]) 1167b12e5c03Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168b12e5c03Smrgfi 11697b58d2e0Smrg])# _LT_SYS_MODULE_PATH_AIX 1170e4f6584cSmrg 1171b698ba48Smrg 11727b58d2e0Smrg# _LT_SHELL_INIT(ARG) 11737b58d2e0Smrg# ------------------- 11747b58d2e0Smrgm4_define([_LT_SHELL_INIT], 1175b12e5c03Smrg[m4_divert_text([M4SH-INIT], [$1 1176b12e5c03Smrg])])# _LT_SHELL_INIT 1177b12e5c03Smrg 1178b698ba48Smrg 1179b698ba48Smrg 11807b58d2e0Smrg# _LT_PROG_ECHO_BACKSLASH 11817b58d2e0Smrg# ----------------------- 1182b12e5c03Smrg# Find how we can fake an echo command that does not interpret backslash. 1183b12e5c03Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184b12e5c03Smrg# of the generated configure script which will find a shell with a builtin 1185b12e5c03Smrg# printf (which we can use as an echo command). 11867b58d2e0Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187b12e5c03Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188b12e5c03SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189b12e5c03SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190b12e5c03Smrg 1191b12e5c03SmrgAC_MSG_CHECKING([how to print strings]) 1192b12e5c03Smrg# Test print first, because it will be a builtin if present. 1193b12e5c03Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194b12e5c03Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195b12e5c03Smrg ECHO='print -r --' 1196b12e5c03Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197b12e5c03Smrg ECHO='printf %s\n' 11987b58d2e0Smrgelse 1199b12e5c03Smrg # Use this function as a fallback that always works. 1200b12e5c03Smrg func_fallback_echo () 1201b12e5c03Smrg { 1202b12e5c03Smrg eval 'cat <<_LTECHO_EOF 1203b12e5c03Smrg$[]1 1204b12e5c03Smrg_LTECHO_EOF' 1205b12e5c03Smrg } 1206b12e5c03Smrg ECHO='func_fallback_echo' 1207e4f6584cSmrgfi 120809885543Smrg 1209b12e5c03Smrg# func_echo_all arg... 1210b12e5c03Smrg# Invoke $ECHO with all args, space-separated. 1211b12e5c03Smrgfunc_echo_all () 1212b12e5c03Smrg{ 1213b12e5c03Smrg $ECHO "$*" 1214b12e5c03Smrg} 121509885543Smrg 1216b12e5c03Smrgcase "$ECHO" in 1217b12e5c03Smrg printf*) AC_MSG_RESULT([printf]) ;; 1218b12e5c03Smrg print*) AC_MSG_RESULT([print -r]) ;; 1219b12e5c03Smrg *) AC_MSG_RESULT([cat]) ;; 1220b12e5c03Smrgesac 122109885543Smrg 1222b12e5c03Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223b12e5c03Smrg[_AS_DETECT_SUGGESTED([ 1224b12e5c03Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225b12e5c03Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226b12e5c03Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227b12e5c03Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228b12e5c03Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1229b12e5c03Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230b12e5c03Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123109885543Smrg 12327b58d2e0Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233b12e5c03Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12347b58d2e0Smrg])# _LT_PROG_ECHO_BACKSLASH 123509885543Smrg 123609885543Smrg 1237b12e5c03Smrg# _LT_WITH_SYSROOT 1238b12e5c03Smrg# ---------------- 1239b12e5c03SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240b12e5c03Smrg[AC_MSG_CHECKING([for sysroot]) 1241b12e5c03SmrgAC_ARG_WITH([sysroot], 1242b12e5c03Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243b12e5c03Smrg (or the compiler's sysroot if not specified).], 1244b12e5c03Smrg[], [with_sysroot=no]) 1245b12e5c03Smrg 1246b12e5c03Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247b12e5c03Smrgdnl in case the user passed a directory name. 1248b12e5c03Smrglt_sysroot= 1249b12e5c03Smrgcase ${with_sysroot} in #( 1250b12e5c03Smrg yes) 1251b12e5c03Smrg if test "$GCC" = yes; then 1252b12e5c03Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253b12e5c03Smrg fi 1254b12e5c03Smrg ;; #( 1255b12e5c03Smrg /*) 1256b12e5c03Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257b12e5c03Smrg ;; #( 1258b12e5c03Smrg no|'') 1259b12e5c03Smrg ;; #( 1260b12e5c03Smrg *) 1261b12e5c03Smrg AC_MSG_RESULT([${with_sysroot}]) 1262b12e5c03Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263b12e5c03Smrg ;; 1264b12e5c03Smrgesac 1265b12e5c03Smrg 1266b12e5c03Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267b12e5c03Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268b12e5c03Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269b12e5c03Smrg 12707b58d2e0Smrg# _LT_ENABLE_LOCK 12717b58d2e0Smrg# --------------- 12727b58d2e0Smrgm4_defun([_LT_ENABLE_LOCK], 12737b58d2e0Smrg[AC_ARG_ENABLE([libtool-lock], 12747b58d2e0Smrg [AS_HELP_STRING([--disable-libtool-lock], 12757b58d2e0Smrg [avoid locking (might break parallel builds)])]) 12767b58d2e0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277e4f6584cSmrg 12787b58d2e0Smrg# Some flags need to be propagated to the compiler or linker for good 12797b58d2e0Smrg# libtool support. 12807b58d2e0Smrgcase $host in 12817b58d2e0Smrgia64-*-hpux*) 12827b58d2e0Smrg # Find out which ABI we are using. 12837b58d2e0Smrg echo 'int i;' > conftest.$ac_ext 12847b58d2e0Smrg if AC_TRY_EVAL(ac_compile); then 12857b58d2e0Smrg case `/usr/bin/file conftest.$ac_objext` in 12867b58d2e0Smrg *ELF-32*) 12877b58d2e0Smrg HPUX_IA64_MODE="32" 12887b58d2e0Smrg ;; 12897b58d2e0Smrg *ELF-64*) 12907b58d2e0Smrg HPUX_IA64_MODE="64" 12917b58d2e0Smrg ;; 12927b58d2e0Smrg esac 12937b58d2e0Smrg fi 12947b58d2e0Smrg rm -rf conftest* 12957b58d2e0Smrg ;; 12967b58d2e0Smrg*-*-irix6*) 12977b58d2e0Smrg # Find out which ABI we are using. 1298b12e5c03Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12997b58d2e0Smrg if AC_TRY_EVAL(ac_compile); then 13007b58d2e0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 13017b58d2e0Smrg case `/usr/bin/file conftest.$ac_objext` in 13027b58d2e0Smrg *32-bit*) 13037b58d2e0Smrg LD="${LD-ld} -melf32bsmip" 13047b58d2e0Smrg ;; 13057b58d2e0Smrg *N32*) 13067b58d2e0Smrg LD="${LD-ld} -melf32bmipn32" 13077b58d2e0Smrg ;; 13087b58d2e0Smrg *64-bit*) 13097b58d2e0Smrg LD="${LD-ld} -melf64bmip" 13107b58d2e0Smrg ;; 13117b58d2e0Smrg esac 13127b58d2e0Smrg else 13137b58d2e0Smrg case `/usr/bin/file conftest.$ac_objext` in 13147b58d2e0Smrg *32-bit*) 13157b58d2e0Smrg LD="${LD-ld} -32" 13167b58d2e0Smrg ;; 13177b58d2e0Smrg *N32*) 13187b58d2e0Smrg LD="${LD-ld} -n32" 13197b58d2e0Smrg ;; 13207b58d2e0Smrg *64-bit*) 13217b58d2e0Smrg LD="${LD-ld} -64" 13227b58d2e0Smrg ;; 13237b58d2e0Smrg esac 13247b58d2e0Smrg fi 13257b58d2e0Smrg fi 13267b58d2e0Smrg rm -rf conftest* 13277b58d2e0Smrg ;; 132809885543Smrg 1329df9ffc95Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13307b58d2e0Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13317b58d2e0Smrg # Find out which ABI we are using. 13327b58d2e0Smrg echo 'int i;' > conftest.$ac_ext 13337b58d2e0Smrg if AC_TRY_EVAL(ac_compile); then 13347b58d2e0Smrg case `/usr/bin/file conftest.o` in 13357b58d2e0Smrg *32-bit*) 13367b58d2e0Smrg case $host in 13377b58d2e0Smrg x86_64-*kfreebsd*-gnu) 13387b58d2e0Smrg LD="${LD-ld} -m elf_i386_fbsd" 13397b58d2e0Smrg ;; 13407b58d2e0Smrg x86_64-*linux*) 1341df9ffc95Smrg case `/usr/bin/file conftest.o` in 1342df9ffc95Smrg *x86-64*) 1343df9ffc95Smrg LD="${LD-ld} -m elf32_x86_64" 1344df9ffc95Smrg ;; 1345df9ffc95Smrg *) 1346df9ffc95Smrg LD="${LD-ld} -m elf_i386" 1347df9ffc95Smrg ;; 1348df9ffc95Smrg esac 1349df9ffc95Smrg ;; 1350df9ffc95Smrg powerpc64le-*) 1351df9ffc95Smrg LD="${LD-ld} -m elf32lppclinux" 13527b58d2e0Smrg ;; 1353df9ffc95Smrg powerpc64-*) 13547b58d2e0Smrg LD="${LD-ld} -m elf32ppclinux" 13557b58d2e0Smrg ;; 13567b58d2e0Smrg s390x-*linux*) 13577b58d2e0Smrg LD="${LD-ld} -m elf_s390" 13587b58d2e0Smrg ;; 13597b58d2e0Smrg sparc64-*linux*) 13607b58d2e0Smrg LD="${LD-ld} -m elf32_sparc" 13617b58d2e0Smrg ;; 13627b58d2e0Smrg esac 13637b58d2e0Smrg ;; 13647b58d2e0Smrg *64-bit*) 13657b58d2e0Smrg case $host in 13667b58d2e0Smrg x86_64-*kfreebsd*-gnu) 13677b58d2e0Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13687b58d2e0Smrg ;; 13697b58d2e0Smrg x86_64-*linux*) 13707b58d2e0Smrg LD="${LD-ld} -m elf_x86_64" 13717b58d2e0Smrg ;; 1372df9ffc95Smrg powerpcle-*) 1373df9ffc95Smrg LD="${LD-ld} -m elf64lppc" 1374df9ffc95Smrg ;; 1375df9ffc95Smrg powerpc-*) 13767b58d2e0Smrg LD="${LD-ld} -m elf64ppc" 13777b58d2e0Smrg ;; 13787b58d2e0Smrg s390*-*linux*|s390*-*tpf*) 13797b58d2e0Smrg LD="${LD-ld} -m elf64_s390" 13807b58d2e0Smrg ;; 13817b58d2e0Smrg sparc*-*linux*) 13827b58d2e0Smrg LD="${LD-ld} -m elf64_sparc" 13837b58d2e0Smrg ;; 13847b58d2e0Smrg esac 13857b58d2e0Smrg ;; 13867b58d2e0Smrg esac 13877b58d2e0Smrg fi 13887b58d2e0Smrg rm -rf conftest* 13897b58d2e0Smrg ;; 1390e4f6584cSmrg 13917b58d2e0Smrg*-*-sco3.2v5*) 13927b58d2e0Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13937b58d2e0Smrg SAVE_CFLAGS="$CFLAGS" 13947b58d2e0Smrg CFLAGS="$CFLAGS -belf" 13957b58d2e0Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13967b58d2e0Smrg [AC_LANG_PUSH(C) 13977b58d2e0Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13987b58d2e0Smrg AC_LANG_POP]) 13997b58d2e0Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 14007b58d2e0Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14017b58d2e0Smrg CFLAGS="$SAVE_CFLAGS" 14027b58d2e0Smrg fi 14037b58d2e0Smrg ;; 1404b12e5c03Smrg*-*solaris*) 14057b58d2e0Smrg # Find out which ABI we are using. 14067b58d2e0Smrg echo 'int i;' > conftest.$ac_ext 14077b58d2e0Smrg if AC_TRY_EVAL(ac_compile); then 14087b58d2e0Smrg case `/usr/bin/file conftest.o` in 14097b58d2e0Smrg *64-bit*) 14107b58d2e0Smrg case $lt_cv_prog_gnu_ld in 1411b12e5c03Smrg yes*) 1412b12e5c03Smrg case $host in 1413b12e5c03Smrg i?86-*-solaris*) 1414b12e5c03Smrg LD="${LD-ld} -m elf_x86_64" 1415b12e5c03Smrg ;; 1416b12e5c03Smrg sparc*-*-solaris*) 1417b12e5c03Smrg LD="${LD-ld} -m elf64_sparc" 1418b12e5c03Smrg ;; 1419b12e5c03Smrg esac 1420b12e5c03Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1421b12e5c03Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1422b12e5c03Smrg LD="${LD-ld}_sol2" 1423b12e5c03Smrg fi 1424b12e5c03Smrg ;; 14257b58d2e0Smrg *) 14267b58d2e0Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14277b58d2e0Smrg LD="${LD-ld} -64" 14287b58d2e0Smrg fi 14297b58d2e0Smrg ;; 14307b58d2e0Smrg esac 14317b58d2e0Smrg ;; 14327b58d2e0Smrg esac 14337b58d2e0Smrg fi 14347b58d2e0Smrg rm -rf conftest* 14357b58d2e0Smrg ;; 143609885543Smrgesac 1437e4f6584cSmrg 14387b58d2e0Smrgneed_locks="$enable_libtool_lock" 14397b58d2e0Smrg])# _LT_ENABLE_LOCK 1440e4f6584cSmrg 1441e4f6584cSmrg 1442b12e5c03Smrg# _LT_PROG_AR 1443b12e5c03Smrg# ----------- 1444b12e5c03Smrgm4_defun([_LT_PROG_AR], 1445b12e5c03Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1446b12e5c03Smrg: ${AR=ar} 1447b12e5c03Smrg: ${AR_FLAGS=cru} 1448b12e5c03Smrg_LT_DECL([], [AR], [1], [The archiver]) 1449b12e5c03Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1450b12e5c03Smrg 1451b12e5c03SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1452b12e5c03Smrg [lt_cv_ar_at_file=no 1453b12e5c03Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1454b12e5c03Smrg [echo conftest.$ac_objext > conftest.lst 1455b12e5c03Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1456b12e5c03Smrg AC_TRY_EVAL([lt_ar_try]) 1457b12e5c03Smrg if test "$ac_status" -eq 0; then 1458b12e5c03Smrg # Ensure the archiver fails upon bogus file names. 1459b12e5c03Smrg rm -f conftest.$ac_objext libconftest.a 1460b12e5c03Smrg AC_TRY_EVAL([lt_ar_try]) 1461b12e5c03Smrg if test "$ac_status" -ne 0; then 1462b12e5c03Smrg lt_cv_ar_at_file=@ 1463b12e5c03Smrg fi 1464b12e5c03Smrg fi 1465b12e5c03Smrg rm -f conftest.* libconftest.a 1466b12e5c03Smrg ]) 1467b12e5c03Smrg ]) 1468b12e5c03Smrg 1469b12e5c03Smrgif test "x$lt_cv_ar_at_file" = xno; then 1470b12e5c03Smrg archiver_list_spec= 1471b12e5c03Smrgelse 1472b12e5c03Smrg archiver_list_spec=$lt_cv_ar_at_file 1473b12e5c03Smrgfi 1474b12e5c03Smrg_LT_DECL([], [archiver_list_spec], [1], 1475b12e5c03Smrg [How to feed a file listing to the archiver]) 1476b12e5c03Smrg])# _LT_PROG_AR 1477b12e5c03Smrg 1478b12e5c03Smrg 14797b58d2e0Smrg# _LT_CMD_OLD_ARCHIVE 14807b58d2e0Smrg# ------------------- 14817b58d2e0Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1482b12e5c03Smrg[_LT_PROG_AR 1483e4f6584cSmrg 14847b58d2e0SmrgAC_CHECK_TOOL(STRIP, strip, :) 14857b58d2e0Smrgtest -z "$STRIP" && STRIP=: 14867b58d2e0Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 148709885543Smrg 14887b58d2e0SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14897b58d2e0Smrgtest -z "$RANLIB" && RANLIB=: 14907b58d2e0Smrg_LT_DECL([], [RANLIB], [1], 14917b58d2e0Smrg [Commands used to install an old-style archive]) 14922ec8c4b4Smrg 14937b58d2e0Smrg# Determine commands to create old-style static archives. 14947b58d2e0Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14957b58d2e0Smrgold_postinstall_cmds='chmod 644 $oldlib' 14967b58d2e0Smrgold_postuninstall_cmds= 149709885543Smrg 14987b58d2e0Smrgif test -n "$RANLIB"; then 14997b58d2e0Smrg case $host_os in 15007b58d2e0Smrg openbsd*) 1501b12e5c03Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15027b58d2e0Smrg ;; 15037b58d2e0Smrg *) 1504b12e5c03Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15057b58d2e0Smrg ;; 15067b58d2e0Smrg esac 1507b12e5c03Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15087b58d2e0Smrgfi 1509b12e5c03Smrg 1510b12e5c03Smrgcase $host_os in 1511b12e5c03Smrg darwin*) 1512b12e5c03Smrg lock_old_archive_extraction=yes ;; 1513b12e5c03Smrg *) 1514b12e5c03Smrg lock_old_archive_extraction=no ;; 1515b12e5c03Smrgesac 15167b58d2e0Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15177b58d2e0Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15187b58d2e0Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15197b58d2e0Smrg [Commands used to build an old-style archive]) 1520b12e5c03Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1521b12e5c03Smrg [Whether to use a lock for old archive extraction]) 15227b58d2e0Smrg])# _LT_CMD_OLD_ARCHIVE 152309885543Smrg 1524e4f6584cSmrg 15257b58d2e0Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15267b58d2e0Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15277b58d2e0Smrg# ---------------------------------------------------------------- 15287b58d2e0Smrg# Check whether the given compiler option works 15297b58d2e0SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15307b58d2e0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15317b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 15327b58d2e0SmrgAC_CACHE_CHECK([$1], [$2], 15337b58d2e0Smrg [$2=no 15347b58d2e0Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15357b58d2e0Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15367b58d2e0Smrg lt_compiler_flag="$3" 15377b58d2e0Smrg # Insert the option either (1) after the last *FLAGS variable, or 15387b58d2e0Smrg # (2) before a word containing "conftest.", or (3) at the end. 15397b58d2e0Smrg # Note that $ac_compile itself does not contain backslashes and begins 15407b58d2e0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15417b58d2e0Smrg # The option is referenced via a variable to avoid confusing sed. 15427b58d2e0Smrg lt_compile=`echo "$ac_compile" | $SED \ 15437b58d2e0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15447b58d2e0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15457b58d2e0Smrg -e 's:$: $lt_compiler_flag:'` 1546b12e5c03Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15477b58d2e0Smrg (eval "$lt_compile" 2>conftest.err) 15487b58d2e0Smrg ac_status=$? 15497b58d2e0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1550b12e5c03Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15517b58d2e0Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 15527b58d2e0Smrg # The compiler can only warn and ignore the option if not recognized 15537b58d2e0Smrg # So say no if there are warnings other than the usual output. 1554b12e5c03Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15557b58d2e0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15567b58d2e0Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15577b58d2e0Smrg $2=yes 15587b58d2e0Smrg fi 15597b58d2e0Smrg fi 15607b58d2e0Smrg $RM conftest* 1561e4f6584cSmrg]) 156209885543Smrg 15637b58d2e0Smrgif test x"[$]$2" = xyes; then 15647b58d2e0Smrg m4_if([$5], , :, [$5]) 15657b58d2e0Smrgelse 15667b58d2e0Smrg m4_if([$6], , :, [$6]) 1567e4f6584cSmrgfi 15687b58d2e0Smrg])# _LT_COMPILER_OPTION 1569e4f6584cSmrg 15707b58d2e0Smrg# Old name: 15717b58d2e0SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15727b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 15737b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 157409885543Smrg 157509885543Smrg 15767b58d2e0Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15777b58d2e0Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15787b58d2e0Smrg# ---------------------------------------------------- 15797b58d2e0Smrg# Check whether the given linker option works 15807b58d2e0SmrgAC_DEFUN([_LT_LINKER_OPTION], 15817b58d2e0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15827b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 15837b58d2e0SmrgAC_CACHE_CHECK([$1], [$2], 15847b58d2e0Smrg [$2=no 15857b58d2e0Smrg save_LDFLAGS="$LDFLAGS" 15867b58d2e0Smrg LDFLAGS="$LDFLAGS $3" 15877b58d2e0Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15887b58d2e0Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15897b58d2e0Smrg # The linker can only warn and ignore the option if not recognized 15907b58d2e0Smrg # So say no if there are warnings 15917b58d2e0Smrg if test -s conftest.err; then 15927b58d2e0Smrg # Append any errors to the config.log. 15937b58d2e0Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1594b12e5c03Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15957b58d2e0Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15967b58d2e0Smrg if diff conftest.exp conftest.er2 >/dev/null; then 15977b58d2e0Smrg $2=yes 15987b58d2e0Smrg fi 15997b58d2e0Smrg else 16007b58d2e0Smrg $2=yes 16017b58d2e0Smrg fi 16027b58d2e0Smrg fi 16037b58d2e0Smrg $RM -r conftest* 16047b58d2e0Smrg LDFLAGS="$save_LDFLAGS" 16057b58d2e0Smrg]) 160609885543Smrg 16077b58d2e0Smrgif test x"[$]$2" = xyes; then 16087b58d2e0Smrg m4_if([$4], , :, [$4]) 16097b58d2e0Smrgelse 16107b58d2e0Smrg m4_if([$5], , :, [$5]) 16117b58d2e0Smrgfi 16127b58d2e0Smrg])# _LT_LINKER_OPTION 161309885543Smrg 16147b58d2e0Smrg# Old name: 16157b58d2e0SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16167b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 16177b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 161809885543Smrg 161909885543Smrg 16207b58d2e0Smrg# LT_CMD_MAX_LEN 16217b58d2e0Smrg#--------------- 16227b58d2e0SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16237b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16247b58d2e0Smrg# find the maximum length of command line arguments 16257b58d2e0SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16267b58d2e0SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16277b58d2e0Smrg i=0 16287b58d2e0Smrg teststring="ABCD" 1629e4f6584cSmrg 16307b58d2e0Smrg case $build_os in 16317b58d2e0Smrg msdosdjgpp*) 16327b58d2e0Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16337b58d2e0Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16347b58d2e0Smrg # during glob expansion). Even if it were fixed, the result of this 16357b58d2e0Smrg # check would be larger than it should be. 16367b58d2e0Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16377b58d2e0Smrg ;; 163809885543Smrg 16397b58d2e0Smrg gnu*) 16407b58d2e0Smrg # Under GNU Hurd, this test is not required because there is 16417b58d2e0Smrg # no limit to the length of command line arguments. 16427b58d2e0Smrg # Libtool will interpret -1 as no limit whatsoever 16437b58d2e0Smrg lt_cv_sys_max_cmd_len=-1; 16447b58d2e0Smrg ;; 164509885543Smrg 16467b58d2e0Smrg cygwin* | mingw* | cegcc*) 16477b58d2e0Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16487b58d2e0Smrg # about 5 minutes as the teststring grows exponentially. 16497b58d2e0Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 16507b58d2e0Smrg # you end up with a "frozen" computer, even though with patience 16517b58d2e0Smrg # the test eventually succeeds (with a max line length of 256k). 16527b58d2e0Smrg # Instead, let's just punt: use the minimum linelength reported by 16537b58d2e0Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 16547b58d2e0Smrg lt_cv_sys_max_cmd_len=8192; 16557b58d2e0Smrg ;; 165609885543Smrg 1657b12e5c03Smrg mint*) 1658b12e5c03Smrg # On MiNT this can take a long time and run out of memory. 1659b12e5c03Smrg lt_cv_sys_max_cmd_len=8192; 1660b12e5c03Smrg ;; 1661b12e5c03Smrg 16627b58d2e0Smrg amigaos*) 16637b58d2e0Smrg # On AmigaOS with pdksh, this test takes hours, literally. 16647b58d2e0Smrg # So we just punt and use a minimum line length of 8192. 16657b58d2e0Smrg lt_cv_sys_max_cmd_len=8192; 16667b58d2e0Smrg ;; 166709885543Smrg 16687b58d2e0Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16697b58d2e0Smrg # This has been around since 386BSD, at least. Likely further. 16707b58d2e0Smrg if test -x /sbin/sysctl; then 16717b58d2e0Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16727b58d2e0Smrg elif test -x /usr/sbin/sysctl; then 16737b58d2e0Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16747b58d2e0Smrg else 16757b58d2e0Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16767b58d2e0Smrg fi 16777b58d2e0Smrg # And add a safety zone 16787b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16797b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16807b58d2e0Smrg ;; 1681e4f6584cSmrg 16827b58d2e0Smrg interix*) 16837b58d2e0Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16847b58d2e0Smrg lt_cv_sys_max_cmd_len=196608 16857b58d2e0Smrg ;; 168609885543Smrg 1687b12e5c03Smrg os2*) 1688b12e5c03Smrg # The test takes a long time on OS/2. 1689b12e5c03Smrg lt_cv_sys_max_cmd_len=8192 1690b12e5c03Smrg ;; 1691b12e5c03Smrg 16927b58d2e0Smrg osf*) 16937b58d2e0Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16947b58d2e0Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16957b58d2e0Smrg # nice to cause kernel panics so lets avoid the loop below. 16967b58d2e0Smrg # First set a reasonable default. 16977b58d2e0Smrg lt_cv_sys_max_cmd_len=16384 16987b58d2e0Smrg # 16997b58d2e0Smrg if test -x /sbin/sysconfig; then 17007b58d2e0Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17017b58d2e0Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17027b58d2e0Smrg esac 17037b58d2e0Smrg fi 17047b58d2e0Smrg ;; 17057b58d2e0Smrg sco3.2v5*) 17067b58d2e0Smrg lt_cv_sys_max_cmd_len=102400 17077b58d2e0Smrg ;; 17087b58d2e0Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17097b58d2e0Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17107b58d2e0Smrg if test -n "$kargmax"; then 17117b58d2e0Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17127b58d2e0Smrg else 17137b58d2e0Smrg lt_cv_sys_max_cmd_len=32768 17147b58d2e0Smrg fi 17157b58d2e0Smrg ;; 17167b58d2e0Smrg *) 17177b58d2e0Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1718df9ffc95Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1719df9ffc95Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17207b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17217b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17227b58d2e0Smrg else 17237b58d2e0Smrg # Make teststring a little bigger before we do anything with it. 17247b58d2e0Smrg # a 1K string should be a reasonable start. 17257b58d2e0Smrg for i in 1 2 3 4 5 6 7 8 ; do 17267b58d2e0Smrg teststring=$teststring$teststring 17277b58d2e0Smrg done 17287b58d2e0Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17297b58d2e0Smrg # If test is not a shell built-in, we'll probably end up computing a 17307b58d2e0Smrg # maximum length that is only half of the actual maximum length, but 17317b58d2e0Smrg # we can't tell. 1732b12e5c03Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1733b12e5c03Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17347b58d2e0Smrg test $i != 17 # 1/2 MB should be enough 17357b58d2e0Smrg do 17367b58d2e0Smrg i=`expr $i + 1` 17377b58d2e0Smrg teststring=$teststring$teststring 17387b58d2e0Smrg done 17397b58d2e0Smrg # Only check the string length outside the loop. 17407b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17417b58d2e0Smrg teststring= 17427b58d2e0Smrg # Add a significant safety factor because C++ compilers can tack on 17437b58d2e0Smrg # massive amounts of additional arguments before passing them to the 17447b58d2e0Smrg # linker. It appears as though 1/2 is a usable value. 17457b58d2e0Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17467b58d2e0Smrg fi 17477b58d2e0Smrg ;; 17487b58d2e0Smrg esac 17497b58d2e0Smrg]) 17507b58d2e0Smrgif test -n $lt_cv_sys_max_cmd_len ; then 17517b58d2e0Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17527b58d2e0Smrgelse 17537b58d2e0Smrg AC_MSG_RESULT(none) 17547b58d2e0Smrgfi 17557b58d2e0Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17567b58d2e0Smrg_LT_DECL([], [max_cmd_len], [0], 17577b58d2e0Smrg [What is the maximum length of a command?]) 17587b58d2e0Smrg])# LT_CMD_MAX_LEN 175909885543Smrg 17607b58d2e0Smrg# Old name: 17617b58d2e0SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17627b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 17637b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 176409885543Smrg 1765b698ba48Smrg 17667b58d2e0Smrg# _LT_HEADER_DLFCN 17677b58d2e0Smrg# ---------------- 17687b58d2e0Smrgm4_defun([_LT_HEADER_DLFCN], 17697b58d2e0Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17707b58d2e0Smrg])# _LT_HEADER_DLFCN 1771b698ba48Smrg 1772b698ba48Smrg 17737b58d2e0Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17747b58d2e0Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17757b58d2e0Smrg# ---------------------------------------------------------------- 17767b58d2e0Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17777b58d2e0Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17787b58d2e0Smrgif test "$cross_compiling" = yes; then : 17797b58d2e0Smrg [$4] 17807b58d2e0Smrgelse 17817b58d2e0Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17827b58d2e0Smrg lt_status=$lt_dlunknown 17837b58d2e0Smrg cat > conftest.$ac_ext <<_LT_EOF 1784b12e5c03Smrg[#line $LINENO "configure" 17857b58d2e0Smrg#include "confdefs.h" 1786b698ba48Smrg 17877b58d2e0Smrg#if HAVE_DLFCN_H 17887b58d2e0Smrg#include <dlfcn.h> 17897b58d2e0Smrg#endif 1790b698ba48Smrg 17917b58d2e0Smrg#include <stdio.h> 1792e4f6584cSmrg 17937b58d2e0Smrg#ifdef RTLD_GLOBAL 17947b58d2e0Smrg# define LT_DLGLOBAL RTLD_GLOBAL 17957b58d2e0Smrg#else 17967b58d2e0Smrg# ifdef DL_GLOBAL 17977b58d2e0Smrg# define LT_DLGLOBAL DL_GLOBAL 17987b58d2e0Smrg# else 17997b58d2e0Smrg# define LT_DLGLOBAL 0 18007b58d2e0Smrg# endif 18017b58d2e0Smrg#endif 1802e4f6584cSmrg 18037b58d2e0Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18047b58d2e0Smrg find out it does not work in some platform. */ 18057b58d2e0Smrg#ifndef LT_DLLAZY_OR_NOW 18067b58d2e0Smrg# ifdef RTLD_LAZY 18077b58d2e0Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18087b58d2e0Smrg# else 18097b58d2e0Smrg# ifdef DL_LAZY 18107b58d2e0Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18117b58d2e0Smrg# else 18127b58d2e0Smrg# ifdef RTLD_NOW 18137b58d2e0Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18147b58d2e0Smrg# else 18157b58d2e0Smrg# ifdef DL_NOW 18167b58d2e0Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18177b58d2e0Smrg# else 18187b58d2e0Smrg# define LT_DLLAZY_OR_NOW 0 18197b58d2e0Smrg# endif 18207b58d2e0Smrg# endif 18217b58d2e0Smrg# endif 18227b58d2e0Smrg# endif 18237b58d2e0Smrg#endif 1824e4f6584cSmrg 1825b12e5c03Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1826b12e5c03Smrg correspondingly for the symbols needed. */ 1827b12e5c03Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1828b12e5c03Smrgint fnord () __attribute__((visibility("default"))); 1829b12e5c03Smrg#endif 1830b12e5c03Smrg 1831b12e5c03Smrgint fnord () { return 42; } 18327b58d2e0Smrgint main () 18337b58d2e0Smrg{ 18347b58d2e0Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18357b58d2e0Smrg int status = $lt_dlunknown; 1836b698ba48Smrg 18377b58d2e0Smrg if (self) 18387b58d2e0Smrg { 18397b58d2e0Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1840b12e5c03Smrg else 1841b12e5c03Smrg { 1842b12e5c03Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1843b12e5c03Smrg else puts (dlerror ()); 1844b12e5c03Smrg } 18457b58d2e0Smrg /* dlclose (self); */ 18467b58d2e0Smrg } 18477b58d2e0Smrg else 18487b58d2e0Smrg puts (dlerror ()); 184909885543Smrg 18507b58d2e0Smrg return status; 18517b58d2e0Smrg}] 18527b58d2e0Smrg_LT_EOF 18537b58d2e0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18547b58d2e0Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18557b58d2e0Smrg lt_status=$? 18567b58d2e0Smrg case x$lt_status in 18577b58d2e0Smrg x$lt_dlno_uscore) $1 ;; 18587b58d2e0Smrg x$lt_dlneed_uscore) $2 ;; 18597b58d2e0Smrg x$lt_dlunknown|x*) $3 ;; 18607b58d2e0Smrg esac 18617b58d2e0Smrg else : 18627b58d2e0Smrg # compilation failed 18637b58d2e0Smrg $3 18647b58d2e0Smrg fi 18657b58d2e0Smrgfi 18667b58d2e0Smrgrm -fr conftest* 18677b58d2e0Smrg])# _LT_TRY_DLOPEN_SELF 1868e4f6584cSmrg 1869e4f6584cSmrg 18707b58d2e0Smrg# LT_SYS_DLOPEN_SELF 18717b58d2e0Smrg# ------------------ 18727b58d2e0SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18737b58d2e0Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18747b58d2e0Smrgif test "x$enable_dlopen" != xyes; then 18757b58d2e0Smrg enable_dlopen=unknown 18767b58d2e0Smrg enable_dlopen_self=unknown 18777b58d2e0Smrg enable_dlopen_self_static=unknown 18787b58d2e0Smrgelse 18797b58d2e0Smrg lt_cv_dlopen=no 18807b58d2e0Smrg lt_cv_dlopen_libs= 1881e4f6584cSmrg 18827b58d2e0Smrg case $host_os in 18837b58d2e0Smrg beos*) 18847b58d2e0Smrg lt_cv_dlopen="load_add_on" 18857b58d2e0Smrg lt_cv_dlopen_libs= 18867b58d2e0Smrg lt_cv_dlopen_self=yes 18877b58d2e0Smrg ;; 1888e4f6584cSmrg 18897b58d2e0Smrg mingw* | pw32* | cegcc*) 18907b58d2e0Smrg lt_cv_dlopen="LoadLibrary" 18917b58d2e0Smrg lt_cv_dlopen_libs= 18927b58d2e0Smrg ;; 1893e4f6584cSmrg 18947b58d2e0Smrg cygwin*) 18957b58d2e0Smrg lt_cv_dlopen="dlopen" 18967b58d2e0Smrg lt_cv_dlopen_libs= 18977b58d2e0Smrg ;; 189809885543Smrg 18997b58d2e0Smrg darwin*) 19007b58d2e0Smrg # if libdl is installed we need to link against it 19017b58d2e0Smrg AC_CHECK_LIB([dl], [dlopen], 19027b58d2e0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 19037b58d2e0Smrg lt_cv_dlopen="dyld" 19047b58d2e0Smrg lt_cv_dlopen_libs= 19057b58d2e0Smrg lt_cv_dlopen_self=yes 19067b58d2e0Smrg ]) 19077b58d2e0Smrg ;; 190809885543Smrg 19097b58d2e0Smrg *) 19107b58d2e0Smrg AC_CHECK_FUNC([shl_load], 19117b58d2e0Smrg [lt_cv_dlopen="shl_load"], 19127b58d2e0Smrg [AC_CHECK_LIB([dld], [shl_load], 19137b58d2e0Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19147b58d2e0Smrg [AC_CHECK_FUNC([dlopen], 19157b58d2e0Smrg [lt_cv_dlopen="dlopen"], 19167b58d2e0Smrg [AC_CHECK_LIB([dl], [dlopen], 19177b58d2e0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19187b58d2e0Smrg [AC_CHECK_LIB([svld], [dlopen], 19197b58d2e0Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19207b58d2e0Smrg [AC_CHECK_LIB([dld], [dld_link], 19217b58d2e0Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19227b58d2e0Smrg ]) 19237b58d2e0Smrg ]) 19247b58d2e0Smrg ]) 19257b58d2e0Smrg ]) 19267b58d2e0Smrg ]) 19277b58d2e0Smrg ;; 19287b58d2e0Smrg esac 192909885543Smrg 19307b58d2e0Smrg if test "x$lt_cv_dlopen" != xno; then 19317b58d2e0Smrg enable_dlopen=yes 19327b58d2e0Smrg else 19337b58d2e0Smrg enable_dlopen=no 19347b58d2e0Smrg fi 193509885543Smrg 19367b58d2e0Smrg case $lt_cv_dlopen in 19377b58d2e0Smrg dlopen) 19387b58d2e0Smrg save_CPPFLAGS="$CPPFLAGS" 19397b58d2e0Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 194009885543Smrg 19417b58d2e0Smrg save_LDFLAGS="$LDFLAGS" 19427b58d2e0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 194309885543Smrg 19447b58d2e0Smrg save_LIBS="$LIBS" 19457b58d2e0Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 194609885543Smrg 19477b58d2e0Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 19487b58d2e0Smrg lt_cv_dlopen_self, [dnl 19497b58d2e0Smrg _LT_TRY_DLOPEN_SELF( 19507b58d2e0Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19517b58d2e0Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19527b58d2e0Smrg ]) 195309885543Smrg 19547b58d2e0Smrg if test "x$lt_cv_dlopen_self" = xyes; then 19557b58d2e0Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19567b58d2e0Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19577b58d2e0Smrg lt_cv_dlopen_self_static, [dnl 19587b58d2e0Smrg _LT_TRY_DLOPEN_SELF( 19597b58d2e0Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19607b58d2e0Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19617b58d2e0Smrg ]) 19627b58d2e0Smrg fi 1963b698ba48Smrg 19647b58d2e0Smrg CPPFLAGS="$save_CPPFLAGS" 19657b58d2e0Smrg LDFLAGS="$save_LDFLAGS" 19667b58d2e0Smrg LIBS="$save_LIBS" 19677b58d2e0Smrg ;; 19687b58d2e0Smrg esac 1969b698ba48Smrg 19707b58d2e0Smrg case $lt_cv_dlopen_self in 19717b58d2e0Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19727b58d2e0Smrg *) enable_dlopen_self=unknown ;; 19737b58d2e0Smrg esac 1974b698ba48Smrg 19757b58d2e0Smrg case $lt_cv_dlopen_self_static in 19767b58d2e0Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19777b58d2e0Smrg *) enable_dlopen_self_static=unknown ;; 19787b58d2e0Smrg esac 19797b58d2e0Smrgfi 19807b58d2e0Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19817b58d2e0Smrg [Whether dlopen is supported]) 19827b58d2e0Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19837b58d2e0Smrg [Whether dlopen of programs is supported]) 19847b58d2e0Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19857b58d2e0Smrg [Whether dlopen of statically linked programs is supported]) 19867b58d2e0Smrg])# LT_SYS_DLOPEN_SELF 1987b698ba48Smrg 19887b58d2e0Smrg# Old name: 19897b58d2e0SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19907b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 19917b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1992b698ba48Smrg 1993b698ba48Smrg 19947b58d2e0Smrg# _LT_COMPILER_C_O([TAGNAME]) 19957b58d2e0Smrg# --------------------------- 19967b58d2e0Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19977b58d2e0Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19987b58d2e0Smrgm4_defun([_LT_COMPILER_C_O], 19997b58d2e0Smrg[m4_require([_LT_DECL_SED])dnl 20007b58d2e0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20017b58d2e0Smrgm4_require([_LT_TAG_COMPILER])dnl 20027b58d2e0SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20037b58d2e0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20047b58d2e0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20057b58d2e0Smrg $RM -r conftest 2>/dev/null 20067b58d2e0Smrg mkdir conftest 20077b58d2e0Smrg cd conftest 20087b58d2e0Smrg mkdir out 20097b58d2e0Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2010b698ba48Smrg 20117b58d2e0Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20127b58d2e0Smrg # Insert the option either (1) after the last *FLAGS variable, or 20137b58d2e0Smrg # (2) before a word containing "conftest.", or (3) at the end. 20147b58d2e0Smrg # Note that $ac_compile itself does not contain backslashes and begins 20157b58d2e0Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20167b58d2e0Smrg lt_compile=`echo "$ac_compile" | $SED \ 20177b58d2e0Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20187b58d2e0Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20197b58d2e0Smrg -e 's:$: $lt_compiler_flag:'` 2020b12e5c03Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20217b58d2e0Smrg (eval "$lt_compile" 2>out/conftest.err) 20227b58d2e0Smrg ac_status=$? 20237b58d2e0Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2024b12e5c03Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20257b58d2e0Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20267b58d2e0Smrg then 20277b58d2e0Smrg # The compiler can only warn and ignore the option if not recognized 20287b58d2e0Smrg # So say no if there are warnings 2029b12e5c03Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20307b58d2e0Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20317b58d2e0Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20327b58d2e0Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20337b58d2e0Smrg fi 20347b58d2e0Smrg fi 20357b58d2e0Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20367b58d2e0Smrg $RM conftest* 20377b58d2e0Smrg # SGI C++ compiler will create directory out/ii_files/ for 20387b58d2e0Smrg # template instantiation 20397b58d2e0Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20407b58d2e0Smrg $RM out/* && rmdir out 20417b58d2e0Smrg cd .. 20427b58d2e0Smrg $RM -r conftest 20437b58d2e0Smrg $RM conftest* 20447b58d2e0Smrg]) 20457b58d2e0Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20467b58d2e0Smrg [Does compiler simultaneously support -c and -o options?]) 20477b58d2e0Smrg])# _LT_COMPILER_C_O 2048b698ba48Smrg 2049b698ba48Smrg 20507b58d2e0Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20517b58d2e0Smrg# ---------------------------------- 20527b58d2e0Smrg# Check to see if we can do hard links to lock some files if needed 20537b58d2e0Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20547b58d2e0Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20557b58d2e0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20567b58d2e0Smrg_LT_COMPILER_C_O([$1]) 2057b698ba48Smrg 20587b58d2e0Smrghard_links="nottested" 20597b58d2e0Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20607b58d2e0Smrg # do not overwrite the value of need_locks provided by the user 20617b58d2e0Smrg AC_MSG_CHECKING([if we can lock with hard links]) 20627b58d2e0Smrg hard_links=yes 20637b58d2e0Smrg $RM conftest* 20647b58d2e0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20657b58d2e0Smrg touch conftest.a 20667b58d2e0Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 20677b58d2e0Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20687b58d2e0Smrg AC_MSG_RESULT([$hard_links]) 20697b58d2e0Smrg if test "$hard_links" = no; then 20707b58d2e0Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20717b58d2e0Smrg need_locks=warn 20727b58d2e0Smrg fi 20737b58d2e0Smrgelse 20747b58d2e0Smrg need_locks=no 20757b58d2e0Smrgfi 20767b58d2e0Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20777b58d2e0Smrg])# _LT_COMPILER_FILE_LOCKS 2078b698ba48Smrg 2079b698ba48Smrg 20807b58d2e0Smrg# _LT_CHECK_OBJDIR 2081e4f6584cSmrg# ---------------- 20827b58d2e0Smrgm4_defun([_LT_CHECK_OBJDIR], 20837b58d2e0Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20847b58d2e0Smrg[rm -f .libs 2>/dev/null 20857b58d2e0Smrgmkdir .libs 2>/dev/null 20867b58d2e0Smrgif test -d .libs; then 20877b58d2e0Smrg lt_cv_objdir=.libs 20887b58d2e0Smrgelse 20897b58d2e0Smrg # MS-DOS does not allow filenames that begin with a dot. 20907b58d2e0Smrg lt_cv_objdir=_libs 20917b58d2e0Smrgfi 20927b58d2e0Smrgrmdir .libs 2>/dev/null]) 20937b58d2e0Smrgobjdir=$lt_cv_objdir 20947b58d2e0Smrg_LT_DECL([], [objdir], [0], 20957b58d2e0Smrg [The name of the directory that contains temporary libtool files])dnl 20967b58d2e0Smrgm4_pattern_allow([LT_OBJDIR])dnl 20977b58d2e0SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20987b58d2e0Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20997b58d2e0Smrg])# _LT_CHECK_OBJDIR 210009885543Smrg 2101b698ba48Smrg 21027b58d2e0Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21037b58d2e0Smrg# -------------------------------------- 21047b58d2e0Smrg# Check hardcoding attributes. 21057b58d2e0Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21067b58d2e0Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21077b58d2e0Smrg_LT_TAGVAR(hardcode_action, $1)= 21087b58d2e0Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21097b58d2e0Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21107b58d2e0Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 211109885543Smrg 21127b58d2e0Smrg # We can hardcode non-existent directories. 21137b58d2e0Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21147b58d2e0Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21157b58d2e0Smrg # have to relink, otherwise we might link with an installed library 21167b58d2e0Smrg # when we should be linking with a yet-to-be-installed one 21177b58d2e0Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21187b58d2e0Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21197b58d2e0Smrg # Linking always hardcodes the temporary library directory. 21207b58d2e0Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21217b58d2e0Smrg else 21227b58d2e0Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21237b58d2e0Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21247b58d2e0Smrg fi 21257b58d2e0Smrgelse 21267b58d2e0Smrg # We cannot hardcode anything, or else we can only hardcode existing 21277b58d2e0Smrg # directories. 21287b58d2e0Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21297b58d2e0Smrgfi 21307b58d2e0SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 213109885543Smrg 21327b58d2e0Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21337b58d2e0Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21347b58d2e0Smrg # Fast installation is not supported 21357b58d2e0Smrg enable_fast_install=no 21367b58d2e0Smrgelif test "$shlibpath_overrides_runpath" = yes || 21377b58d2e0Smrg test "$enable_shared" = no; then 21387b58d2e0Smrg # Fast installation is not necessary 21397b58d2e0Smrg enable_fast_install=needless 21407b58d2e0Smrgfi 21417b58d2e0Smrg_LT_TAGDECL([], [hardcode_action], [0], 21427b58d2e0Smrg [How to hardcode a shared library path into an executable]) 21437b58d2e0Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2144b698ba48Smrg 2145b698ba48Smrg 21467b58d2e0Smrg# _LT_CMD_STRIPLIB 21477b58d2e0Smrg# ---------------- 21487b58d2e0Smrgm4_defun([_LT_CMD_STRIPLIB], 21497b58d2e0Smrg[m4_require([_LT_DECL_EGREP]) 21507b58d2e0Smrgstriplib= 21517b58d2e0Smrgold_striplib= 21527b58d2e0SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21537b58d2e0Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21547b58d2e0Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21557b58d2e0Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21567b58d2e0Smrg AC_MSG_RESULT([yes]) 21577b58d2e0Smrgelse 21587b58d2e0Smrg# FIXME - insert some real tests, host_os isn't really good enough 21597b58d2e0Smrg case $host_os in 21607b58d2e0Smrg darwin*) 21617b58d2e0Smrg if test -n "$STRIP" ; then 21627b58d2e0Smrg striplib="$STRIP -x" 21637b58d2e0Smrg old_striplib="$STRIP -S" 21647b58d2e0Smrg AC_MSG_RESULT([yes]) 21657b58d2e0Smrg else 21667b58d2e0Smrg AC_MSG_RESULT([no]) 21677b58d2e0Smrg fi 21687b58d2e0Smrg ;; 21697b58d2e0Smrg *) 21707b58d2e0Smrg AC_MSG_RESULT([no]) 21717b58d2e0Smrg ;; 21727b58d2e0Smrg esac 21737b58d2e0Smrgfi 21747b58d2e0Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21757b58d2e0Smrg_LT_DECL([], [striplib], [1]) 21767b58d2e0Smrg])# _LT_CMD_STRIPLIB 2177b698ba48Smrg 2178e4f6584cSmrg 21797b58d2e0Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21807b58d2e0Smrg# ----------------------------- 21817b58d2e0Smrg# PORTME Fill in your ld.so characteristics 21827b58d2e0Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21837b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21847b58d2e0Smrgm4_require([_LT_DECL_EGREP])dnl 21857b58d2e0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21867b58d2e0Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21877b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 2188b12e5c03Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21897b58d2e0SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21907b58d2e0Smrgm4_if([$1], 21917b58d2e0Smrg [], [ 21927b58d2e0Smrgif test "$GCC" = yes; then 21937b58d2e0Smrg case $host_os in 21947b58d2e0Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21957b58d2e0Smrg *) lt_awk_arg="/^libraries:/" ;; 21967b58d2e0Smrg esac 2197b12e5c03Smrg case $host_os in 2198b12e5c03Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2199b12e5c03Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2200b12e5c03Smrg esac 2201b12e5c03Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2202b12e5c03Smrg case $lt_search_path_spec in 2203b12e5c03Smrg *\;*) 22047b58d2e0Smrg # if the path contains ";" then we assume it to be the separator 22057b58d2e0Smrg # otherwise default to the standard path separator (i.e. ":") - it is 22067b58d2e0Smrg # assumed that no part of a normal pathname contains ";" but that should 22077b58d2e0Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2208b12e5c03Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2209b12e5c03Smrg ;; 2210b12e5c03Smrg *) 2211b12e5c03Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2212b12e5c03Smrg ;; 2213b12e5c03Smrg esac 22147b58d2e0Smrg # Ok, now we have the path, separated by spaces, we can step through it 22157b58d2e0Smrg # and add multilib dir if necessary. 22167b58d2e0Smrg lt_tmp_lt_search_path_spec= 22177b58d2e0Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22187b58d2e0Smrg for lt_sys_path in $lt_search_path_spec; do 22197b58d2e0Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22207b58d2e0Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22217b58d2e0Smrg else 22227b58d2e0Smrg test -d "$lt_sys_path" && \ 22237b58d2e0Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22247b58d2e0Smrg fi 22257b58d2e0Smrg done 2226b12e5c03Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22277b58d2e0SmrgBEGIN {RS=" "; FS="/|\n";} { 22287b58d2e0Smrg lt_foo=""; 22297b58d2e0Smrg lt_count=0; 22307b58d2e0Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22317b58d2e0Smrg if ($lt_i != "" && $lt_i != ".") { 22327b58d2e0Smrg if ($lt_i == "..") { 22337b58d2e0Smrg lt_count++; 22347b58d2e0Smrg } else { 22357b58d2e0Smrg if (lt_count == 0) { 22367b58d2e0Smrg lt_foo="/" $lt_i lt_foo; 22377b58d2e0Smrg } else { 22387b58d2e0Smrg lt_count--; 22397b58d2e0Smrg } 22407b58d2e0Smrg } 22417b58d2e0Smrg } 22427b58d2e0Smrg } 22437b58d2e0Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22447b58d2e0Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22457b58d2e0Smrg}'` 2246b12e5c03Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2247b12e5c03Smrg # for these hosts. 2248b12e5c03Smrg case $host_os in 2249b12e5c03Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2250b12e5c03Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2251b12e5c03Smrg esac 2252b12e5c03Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22537b58d2e0Smrgelse 22547b58d2e0Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22557b58d2e0Smrgfi]) 22567b58d2e0Smrglibrary_names_spec= 22577b58d2e0Smrglibname_spec='lib$name' 22587b58d2e0Smrgsoname_spec= 22597b58d2e0Smrgshrext_cmds=".so" 22607b58d2e0Smrgpostinstall_cmds= 22617b58d2e0Smrgpostuninstall_cmds= 22627b58d2e0Smrgfinish_cmds= 22637b58d2e0Smrgfinish_eval= 22647b58d2e0Smrgshlibpath_var= 22657b58d2e0Smrgshlibpath_overrides_runpath=unknown 22667b58d2e0Smrgversion_type=none 22677b58d2e0Smrgdynamic_linker="$host_os ld.so" 22687b58d2e0Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22697b58d2e0Smrgneed_lib_prefix=unknown 22707b58d2e0Smrghardcode_into_libs=no 2271e4f6584cSmrg 22727b58d2e0Smrg# when you set need_version to no, make sure it does not cause -set_version 22737b58d2e0Smrg# flags to be left without arguments 22747b58d2e0Smrgneed_version=unknown 2275b698ba48Smrg 22767b58d2e0Smrgcase $host_os in 22777b58d2e0Smrgaix3*) 2278b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 22797b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22807b58d2e0Smrg shlibpath_var=LIBPATH 2281b698ba48Smrg 22827b58d2e0Smrg # AIX 3 has no versioning support, so we append a major version to the name. 22837b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 22847b58d2e0Smrg ;; 2285e4f6584cSmrg 22867b58d2e0Smrgaix[[4-9]]*) 2287b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 22887b58d2e0Smrg need_lib_prefix=no 22897b58d2e0Smrg need_version=no 22907b58d2e0Smrg hardcode_into_libs=yes 22917b58d2e0Smrg if test "$host_cpu" = ia64; then 22927b58d2e0Smrg # AIX 5 supports IA64 22937b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22947b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 22957b58d2e0Smrg else 22967b58d2e0Smrg # With GCC up to 2.95.x, collect2 would create an import file 22977b58d2e0Smrg # for dependence libraries. The import file would start with 22987b58d2e0Smrg # the line `#! .'. This would cause the generated library to 22997b58d2e0Smrg # depend on `.', always an invalid library. This was fixed in 23007b58d2e0Smrg # development snapshots of GCC prior to 3.0. 23017b58d2e0Smrg case $host_os in 23027b58d2e0Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 23037b58d2e0Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 23047b58d2e0Smrg echo ' yes ' 23057b58d2e0Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 23067b58d2e0Smrg : 23077b58d2e0Smrg else 23087b58d2e0Smrg can_build_shared=no 23097b58d2e0Smrg fi 23102ec8c4b4Smrg ;; 2311b698ba48Smrg esac 23127b58d2e0Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 23137b58d2e0Smrg # soname into executable. Probably we can add versioning support to 23147b58d2e0Smrg # collect2, so additional links can be useful in future. 23157b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 23167b58d2e0Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23177b58d2e0Smrg # instead of lib<name>.a to let people know that these are not 23187b58d2e0Smrg # typical AIX shared libraries. 23197b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23207b58d2e0Smrg else 23217b58d2e0Smrg # We preserve .a as extension for shared libraries through AIX4.2 23227b58d2e0Smrg # and later when we are not doing run time linking. 23237b58d2e0Smrg library_names_spec='${libname}${release}.a $libname.a' 23247b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 23257b58d2e0Smrg fi 23267b58d2e0Smrg shlibpath_var=LIBPATH 23277b58d2e0Smrg fi 2328e4f6584cSmrg ;; 2329b698ba48Smrg 23307b58d2e0Smrgamigaos*) 23317b58d2e0Smrg case $host_cpu in 23327b58d2e0Smrg powerpc) 23337b58d2e0Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23347b58d2e0Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23357b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23367b58d2e0Smrg ;; 23377b58d2e0Smrg m68k) 23387b58d2e0Smrg library_names_spec='$libname.ixlibrary $libname.a' 23397b58d2e0Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2340b12e5c03Smrg 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' 23417b58d2e0Smrg ;; 23427b58d2e0Smrg esac 23437b58d2e0Smrg ;; 2344e4f6584cSmrg 23457b58d2e0Smrgbeos*) 23467b58d2e0Smrg library_names_spec='${libname}${shared_ext}' 23477b58d2e0Smrg dynamic_linker="$host_os ld.so" 23487b58d2e0Smrg shlibpath_var=LIBRARY_PATH 23497b58d2e0Smrg ;; 2350e4f6584cSmrg 23517b58d2e0Smrgbsdi[[45]]*) 2352b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 23537b58d2e0Smrg need_version=no 23547b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23557b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 23567b58d2e0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23577b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 23587b58d2e0Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23597b58d2e0Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23607b58d2e0Smrg # the default ld.so.conf also contains /usr/contrib/lib and 23617b58d2e0Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23627b58d2e0Smrg # libtool to hard-code these into programs 23637b58d2e0Smrg ;; 2364e4f6584cSmrg 23657b58d2e0Smrgcygwin* | mingw* | pw32* | cegcc*) 23667b58d2e0Smrg version_type=windows 23677b58d2e0Smrg shrext_cmds=".dll" 23687b58d2e0Smrg need_version=no 23697b58d2e0Smrg need_lib_prefix=no 2370e4f6584cSmrg 2371b12e5c03Smrg case $GCC,$cc_basename in 2372b12e5c03Smrg yes,*) 2373b12e5c03Smrg # gcc 23747b58d2e0Smrg library_names_spec='$libname.dll.a' 23757b58d2e0Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23767b58d2e0Smrg postinstall_cmds='base_file=`basename \${file}`~ 23777b58d2e0Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23787b58d2e0Smrg dldir=$destdir/`dirname \$dlpath`~ 23797b58d2e0Smrg test -d \$dldir || mkdir -p \$dldir~ 23807b58d2e0Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23817b58d2e0Smrg chmod a+x \$dldir/$dlname~ 23827b58d2e0Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23837b58d2e0Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23847b58d2e0Smrg fi' 23857b58d2e0Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23867b58d2e0Smrg dlpath=$dir/\$dldll~ 23877b58d2e0Smrg $RM \$dlpath' 23887b58d2e0Smrg shlibpath_overrides_runpath=yes 2389e4f6584cSmrg 23907b58d2e0Smrg case $host_os in 23917b58d2e0Smrg cygwin*) 23927b58d2e0Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23937b58d2e0Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2394b12e5c03Smrgm4_if([$1], [],[ 2395b12e5c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23967b58d2e0Smrg ;; 23977b58d2e0Smrg mingw* | cegcc*) 23987b58d2e0Smrg # MinGW DLLs use traditional 'lib' prefix 23997b58d2e0Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24007b58d2e0Smrg ;; 24017b58d2e0Smrg pw32*) 24027b58d2e0Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 24037b58d2e0Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24047b58d2e0Smrg ;; 24057b58d2e0Smrg esac 2406b12e5c03Smrg dynamic_linker='Win32 ld.exe' 2407b12e5c03Smrg ;; 2408b12e5c03Smrg 2409b12e5c03Smrg *,cl*) 2410b12e5c03Smrg # Native MSVC 2411b12e5c03Smrg libname_spec='$name' 2412b12e5c03Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2413b12e5c03Smrg library_names_spec='${libname}.dll.lib' 2414b12e5c03Smrg 2415b12e5c03Smrg case $build_os in 2416b12e5c03Smrg mingw*) 2417b12e5c03Smrg sys_lib_search_path_spec= 2418b12e5c03Smrg lt_save_ifs=$IFS 2419b12e5c03Smrg IFS=';' 2420b12e5c03Smrg for lt_path in $LIB 2421b12e5c03Smrg do 2422b12e5c03Smrg IFS=$lt_save_ifs 2423b12e5c03Smrg # Let DOS variable expansion print the short 8.3 style file name. 2424b12e5c03Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2425b12e5c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2426b12e5c03Smrg done 2427b12e5c03Smrg IFS=$lt_save_ifs 2428b12e5c03Smrg # Convert to MSYS style. 2429b12e5c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2430b12e5c03Smrg ;; 2431b12e5c03Smrg cygwin*) 2432b12e5c03Smrg # Convert to unix form, then to dos form, then back to unix form 2433b12e5c03Smrg # but this time dos style (no spaces!) so that the unix form looks 2434b12e5c03Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2435b12e5c03Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2436b12e5c03Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2437b12e5c03Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2438b12e5c03Smrg ;; 2439b12e5c03Smrg *) 2440b12e5c03Smrg sys_lib_search_path_spec="$LIB" 2441b12e5c03Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2442b12e5c03Smrg # It is most probably a Windows format PATH. 2443b12e5c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2444b12e5c03Smrg else 2445b12e5c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2446b12e5c03Smrg fi 2447b12e5c03Smrg # FIXME: find the short name or the path components, as spaces are 2448b12e5c03Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2449b12e5c03Smrg ;; 2450b12e5c03Smrg esac 2451b12e5c03Smrg 2452b12e5c03Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2453b12e5c03Smrg postinstall_cmds='base_file=`basename \${file}`~ 2454b12e5c03Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2455b12e5c03Smrg dldir=$destdir/`dirname \$dlpath`~ 2456b12e5c03Smrg test -d \$dldir || mkdir -p \$dldir~ 2457b12e5c03Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2458b12e5c03Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2459b12e5c03Smrg dlpath=$dir/\$dldll~ 2460b12e5c03Smrg $RM \$dlpath' 2461b12e5c03Smrg shlibpath_overrides_runpath=yes 2462b12e5c03Smrg dynamic_linker='Win32 link.exe' 24637b58d2e0Smrg ;; 2464e4f6584cSmrg 24657b58d2e0Smrg *) 2466b12e5c03Smrg # Assume MSVC wrapper 24677b58d2e0Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2468b12e5c03Smrg dynamic_linker='Win32 ld.exe' 24697b58d2e0Smrg ;; 24707b58d2e0Smrg esac 24717b58d2e0Smrg # FIXME: first we should search . and the directory the executable is in 24727b58d2e0Smrg shlibpath_var=PATH 24737b58d2e0Smrg ;; 2474e4f6584cSmrg 24757b58d2e0Smrgdarwin* | rhapsody*) 24767b58d2e0Smrg dynamic_linker="$host_os dyld" 24777b58d2e0Smrg version_type=darwin 24787b58d2e0Smrg need_lib_prefix=no 24797b58d2e0Smrg need_version=no 24807b58d2e0Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24817b58d2e0Smrg soname_spec='${libname}${release}${major}$shared_ext' 24827b58d2e0Smrg shlibpath_overrides_runpath=yes 24837b58d2e0Smrg shlibpath_var=DYLD_LIBRARY_PATH 24847b58d2e0Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24857b58d2e0Smrgm4_if([$1], [],[ 24867b58d2e0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24877b58d2e0Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24887b58d2e0Smrg ;; 2489e4f6584cSmrg 24907b58d2e0Smrgdgux*) 2491b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 24927b58d2e0Smrg need_lib_prefix=no 24937b58d2e0Smrg need_version=no 24947b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24957b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 24967b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 24977b58d2e0Smrg ;; 2498e4f6584cSmrg 24997b58d2e0Smrgfreebsd* | dragonfly*) 25007b58d2e0Smrg # DragonFly does not have aout. When/if they implement a new 25017b58d2e0Smrg # versioning mechanism, adjust this. 25027b58d2e0Smrg if test -x /usr/bin/objformat; then 25037b58d2e0Smrg objformat=`/usr/bin/objformat` 25047b58d2e0Smrg else 25057b58d2e0Smrg case $host_os in 2506b12e5c03Smrg freebsd[[23]].*) objformat=aout ;; 25077b58d2e0Smrg *) objformat=elf ;; 25087b58d2e0Smrg esac 25097b58d2e0Smrg fi 25107b58d2e0Smrg version_type=freebsd-$objformat 25117b58d2e0Smrg case $version_type in 25127b58d2e0Smrg freebsd-elf*) 25137b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25147b58d2e0Smrg need_version=no 25157b58d2e0Smrg need_lib_prefix=no 25167b58d2e0Smrg ;; 25177b58d2e0Smrg freebsd-*) 25187b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25197b58d2e0Smrg need_version=yes 25207b58d2e0Smrg ;; 2521e4f6584cSmrg esac 25227b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 25237b58d2e0Smrg case $host_os in 2524b12e5c03Smrg freebsd2.*) 25257b58d2e0Smrg shlibpath_overrides_runpath=yes 25267b58d2e0Smrg ;; 25277b58d2e0Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25287b58d2e0Smrg shlibpath_overrides_runpath=yes 25297b58d2e0Smrg hardcode_into_libs=yes 25307b58d2e0Smrg ;; 25317b58d2e0Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25327b58d2e0Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25337b58d2e0Smrg shlibpath_overrides_runpath=no 25347b58d2e0Smrg hardcode_into_libs=yes 25357b58d2e0Smrg ;; 25367b58d2e0Smrg *) # from 4.6 on, and DragonFly 25377b58d2e0Smrg shlibpath_overrides_runpath=yes 25387b58d2e0Smrg hardcode_into_libs=yes 25397b58d2e0Smrg ;; 25407b58d2e0Smrg esac 25417b58d2e0Smrg ;; 2542e4f6584cSmrg 2543b12e5c03Smrghaiku*) 2544b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 2545b12e5c03Smrg need_lib_prefix=no 2546b12e5c03Smrg need_version=no 2547b12e5c03Smrg dynamic_linker="$host_os runtime_loader" 2548b12e5c03Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2549b12e5c03Smrg soname_spec='${libname}${release}${shared_ext}$major' 2550b12e5c03Smrg shlibpath_var=LIBRARY_PATH 2551b12e5c03Smrg shlibpath_overrides_runpath=yes 2552b12e5c03Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25537b58d2e0Smrg hardcode_into_libs=yes 25547b58d2e0Smrg ;; 2555e4f6584cSmrg 25567b58d2e0Smrghpux9* | hpux10* | hpux11*) 25577b58d2e0Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 25587b58d2e0Smrg # link against other versions. 25597b58d2e0Smrg version_type=sunos 25607b58d2e0Smrg need_lib_prefix=no 25617b58d2e0Smrg need_version=no 25627b58d2e0Smrg case $host_cpu in 25637b58d2e0Smrg ia64*) 25647b58d2e0Smrg shrext_cmds='.so' 25657b58d2e0Smrg hardcode_into_libs=yes 25667b58d2e0Smrg dynamic_linker="$host_os dld.so" 25677b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 25687b58d2e0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25697b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25707b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 25717b58d2e0Smrg if test "X$HPUX_IA64_MODE" = X32; then 25727b58d2e0Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25737b58d2e0Smrg else 25747b58d2e0Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2575b698ba48Smrg fi 25767b58d2e0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25777b58d2e0Smrg ;; 25787b58d2e0Smrg hppa*64*) 25797b58d2e0Smrg shrext_cmds='.sl' 25807b58d2e0Smrg hardcode_into_libs=yes 25817b58d2e0Smrg dynamic_linker="$host_os dld.sl" 25827b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25837b58d2e0Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25847b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25857b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 25867b58d2e0Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25877b58d2e0Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25887b58d2e0Smrg ;; 25897b58d2e0Smrg *) 25907b58d2e0Smrg shrext_cmds='.sl' 25917b58d2e0Smrg dynamic_linker="$host_os dld.sl" 25927b58d2e0Smrg shlibpath_var=SHLIB_PATH 25937b58d2e0Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25947b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25957b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 25967b58d2e0Smrg ;; 25977b58d2e0Smrg esac 2598b12e5c03Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25997b58d2e0Smrg postinstall_cmds='chmod 555 $lib' 2600b12e5c03Smrg # or fails outright, so override atomically: 2601b12e5c03Smrg install_override_mode=555 26027b58d2e0Smrg ;; 2603e4f6584cSmrg 26047b58d2e0Smrginterix[[3-9]]*) 2605b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 26067b58d2e0Smrg need_lib_prefix=no 26077b58d2e0Smrg need_version=no 26087b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26097b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 26107b58d2e0Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26117b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 26127b58d2e0Smrg shlibpath_overrides_runpath=no 26137b58d2e0Smrg hardcode_into_libs=yes 26147b58d2e0Smrg ;; 2615e4f6584cSmrg 26167b58d2e0Smrgirix5* | irix6* | nonstopux*) 2617e4f6584cSmrg case $host_os in 26187b58d2e0Smrg nonstopux*) version_type=nonstopux ;; 26197b58d2e0Smrg *) 26207b58d2e0Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2621b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 26227b58d2e0Smrg else 26237b58d2e0Smrg version_type=irix 26247b58d2e0Smrg fi ;; 26257b58d2e0Smrg esac 26267b58d2e0Smrg need_lib_prefix=no 26277b58d2e0Smrg need_version=no 26287b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 26297b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26307b58d2e0Smrg case $host_os in 26317b58d2e0Smrg irix5* | nonstopux*) 26327b58d2e0Smrg libsuff= shlibsuff= 26337b58d2e0Smrg ;; 26347b58d2e0Smrg *) 26357b58d2e0Smrg case $LD in # libtool.m4 will add one of these switches to LD 26367b58d2e0Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26377b58d2e0Smrg libsuff= shlibsuff= libmagic=32-bit;; 26387b58d2e0Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26397b58d2e0Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26407b58d2e0Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26417b58d2e0Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26427b58d2e0Smrg *) libsuff= shlibsuff= libmagic=never-match;; 26437b58d2e0Smrg esac 2644b698ba48Smrg ;; 2645e4f6584cSmrg esac 26467b58d2e0Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26477b58d2e0Smrg shlibpath_overrides_runpath=no 26487b58d2e0Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26497b58d2e0Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26507b58d2e0Smrg hardcode_into_libs=yes 26517b58d2e0Smrg ;; 2652b698ba48Smrg 26537b58d2e0Smrg# No shared lib support for Linux oldld, aout, or coff. 26547b58d2e0Smrglinux*oldld* | linux*aout* | linux*coff*) 26557b58d2e0Smrg dynamic_linker=no 26567b58d2e0Smrg ;; 2657b698ba48Smrg 2658b12e5c03Smrg# This must be glibc/ELF. 2659df9ffc95Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2660b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 26617b58d2e0Smrg need_lib_prefix=no 26627b58d2e0Smrg need_version=no 26637b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26647b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 26657b58d2e0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26667b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 26677b58d2e0Smrg shlibpath_overrides_runpath=no 2668b12e5c03Smrg 26697b58d2e0Smrg # Some binutils ld are patched to set DT_RUNPATH 2670b12e5c03Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2671b12e5c03Smrg [lt_cv_shlibpath_overrides_runpath=no 2672b12e5c03Smrg save_LDFLAGS=$LDFLAGS 2673b12e5c03Smrg save_libdir=$libdir 2674b12e5c03Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2675b12e5c03Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2676b12e5c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2677b12e5c03Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2678b12e5c03Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2679b12e5c03Smrg LDFLAGS=$save_LDFLAGS 2680b12e5c03Smrg libdir=$save_libdir 2681b12e5c03Smrg ]) 2682b12e5c03Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2683b698ba48Smrg 26847b58d2e0Smrg # This implies no fast_install, which is unacceptable. 26857b58d2e0Smrg # Some rework will be needed to allow for fast_install 26867b58d2e0Smrg # before this can be enabled. 26877b58d2e0Smrg hardcode_into_libs=yes 2688b698ba48Smrg 26897b58d2e0Smrg # Append ld.so.conf contents to the search path 26907b58d2e0Smrg if test -f /etc/ld.so.conf; then 2691b12e5c03Smrg 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' ' '` 2692df9ffc95Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 26937b58d2e0Smrg fi 2694b698ba48Smrg 26957b58d2e0Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 26967b58d2e0Smrg # powerpc, because MkLinux only supported shared libraries with the 26977b58d2e0Smrg # GNU dynamic linker. Since this was broken with cross compilers, 26987b58d2e0Smrg # most powerpc-linux boxes support dynamic linking these days and 26997b58d2e0Smrg # people can always --disable-shared, the test was removed, and we 27007b58d2e0Smrg # assume the GNU/Linux dynamic linker is in use. 27017b58d2e0Smrg dynamic_linker='GNU/Linux ld.so' 27027b58d2e0Smrg ;; 2703e4f6584cSmrg 2704df9ffc95Smrgnetbsdelf*-gnu) 2705df9ffc95Smrg version_type=linux 2706df9ffc95Smrg need_lib_prefix=no 2707df9ffc95Smrg need_version=no 2708df9ffc95Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2709df9ffc95Smrg soname_spec='${libname}${release}${shared_ext}$major' 2710df9ffc95Smrg shlibpath_var=LD_LIBRARY_PATH 2711df9ffc95Smrg shlibpath_overrides_runpath=no 2712df9ffc95Smrg hardcode_into_libs=yes 2713df9ffc95Smrg dynamic_linker='NetBSD ld.elf_so' 2714df9ffc95Smrg ;; 2715df9ffc95Smrg 27167b58d2e0Smrgnetbsd*) 27177b58d2e0Smrg version_type=sunos 27187b58d2e0Smrg need_lib_prefix=no 27197b58d2e0Smrg need_version=no 27207b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27217b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27227b58d2e0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27237b58d2e0Smrg dynamic_linker='NetBSD (a.out) ld.so' 27247b58d2e0Smrg else 27257b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27267b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 27277b58d2e0Smrg dynamic_linker='NetBSD ld.elf_so' 27287b58d2e0Smrg fi 27297b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 27307b58d2e0Smrg shlibpath_overrides_runpath=yes 27317b58d2e0Smrg hardcode_into_libs=yes 27327b58d2e0Smrg ;; 2733e4f6584cSmrg 27347b58d2e0Smrgnewsos6) 2735b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 27367b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27377b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 27387b58d2e0Smrg shlibpath_overrides_runpath=yes 27397b58d2e0Smrg ;; 2740e4f6584cSmrg 27417b58d2e0Smrg*nto* | *qnx*) 27427b58d2e0Smrg version_type=qnx 27437b58d2e0Smrg need_lib_prefix=no 27447b58d2e0Smrg need_version=no 27457b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27467b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 27477b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 27487b58d2e0Smrg shlibpath_overrides_runpath=no 27497b58d2e0Smrg hardcode_into_libs=yes 27507b58d2e0Smrg dynamic_linker='ldqnx.so' 27517b58d2e0Smrg ;; 2752e4f6584cSmrg 27537b58d2e0Smrgopenbsd*) 27547b58d2e0Smrg version_type=sunos 27557b58d2e0Smrg sys_lib_dlsearch_path_spec="/usr/lib" 27567b58d2e0Smrg need_lib_prefix=no 27577b58d2e0Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27587b58d2e0Smrg case $host_os in 27597b58d2e0Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27607b58d2e0Smrg *) need_version=no ;; 27617b58d2e0Smrg esac 27627b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27637b58d2e0Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27647b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 27657b58d2e0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27667b58d2e0Smrg case $host_os in 27677b58d2e0Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 27687b58d2e0Smrg shlibpath_overrides_runpath=no 27697b58d2e0Smrg ;; 27707b58d2e0Smrg *) 27717b58d2e0Smrg shlibpath_overrides_runpath=yes 27727b58d2e0Smrg ;; 27737b58d2e0Smrg esac 27747b58d2e0Smrg else 27757b58d2e0Smrg shlibpath_overrides_runpath=yes 27767b58d2e0Smrg fi 27777b58d2e0Smrg ;; 2778e4f6584cSmrg 27797b58d2e0Smrgos2*) 27807b58d2e0Smrg libname_spec='$name' 27817b58d2e0Smrg shrext_cmds=".dll" 27827b58d2e0Smrg need_lib_prefix=no 27837b58d2e0Smrg library_names_spec='$libname${shared_ext} $libname.a' 27847b58d2e0Smrg dynamic_linker='OS/2 ld.exe' 27857b58d2e0Smrg shlibpath_var=LIBPATH 27867b58d2e0Smrg ;; 2787e4f6584cSmrg 27887b58d2e0Smrgosf3* | osf4* | osf5*) 27897b58d2e0Smrg version_type=osf 27907b58d2e0Smrg need_lib_prefix=no 27917b58d2e0Smrg need_version=no 27927b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 27937b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27947b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 27957b58d2e0Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27967b58d2e0Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27977b58d2e0Smrg ;; 2798e4f6584cSmrg 27997b58d2e0Smrgrdos*) 28007b58d2e0Smrg dynamic_linker=no 28017b58d2e0Smrg ;; 2802e4f6584cSmrg 28037b58d2e0Smrgsolaris*) 2804b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 28057b58d2e0Smrg need_lib_prefix=no 28067b58d2e0Smrg need_version=no 28077b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28087b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 28097b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28107b58d2e0Smrg shlibpath_overrides_runpath=yes 28117b58d2e0Smrg hardcode_into_libs=yes 28127b58d2e0Smrg # ldd complains unless libraries are executable 28137b58d2e0Smrg postinstall_cmds='chmod +x $lib' 28147b58d2e0Smrg ;; 2815e4f6584cSmrg 28167b58d2e0Smrgsunos4*) 28177b58d2e0Smrg version_type=sunos 28187b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28197b58d2e0Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28207b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28217b58d2e0Smrg shlibpath_overrides_runpath=yes 28227b58d2e0Smrg if test "$with_gnu_ld" = yes; then 28237b58d2e0Smrg need_lib_prefix=no 28247b58d2e0Smrg fi 28257b58d2e0Smrg need_version=yes 28267b58d2e0Smrg ;; 2827e4f6584cSmrg 28287b58d2e0Smrgsysv4 | sysv4.3*) 2829b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 28307b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28317b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 28327b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28337b58d2e0Smrg case $host_vendor in 28347b58d2e0Smrg sni) 28357b58d2e0Smrg shlibpath_overrides_runpath=no 28367b58d2e0Smrg need_lib_prefix=no 28377b58d2e0Smrg runpath_var=LD_RUN_PATH 28387b58d2e0Smrg ;; 28397b58d2e0Smrg siemens) 28407b58d2e0Smrg need_lib_prefix=no 28417b58d2e0Smrg ;; 28427b58d2e0Smrg motorola) 28437b58d2e0Smrg need_lib_prefix=no 28447b58d2e0Smrg need_version=no 28457b58d2e0Smrg shlibpath_overrides_runpath=no 28467b58d2e0Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28477b58d2e0Smrg ;; 28487b58d2e0Smrg esac 28497b58d2e0Smrg ;; 2850e4f6584cSmrg 28517b58d2e0Smrgsysv4*MP*) 28527b58d2e0Smrg if test -d /usr/nec ;then 2853b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 28547b58d2e0Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28557b58d2e0Smrg soname_spec='$libname${shared_ext}.$major' 28567b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28577b58d2e0Smrg fi 28587b58d2e0Smrg ;; 2859e4f6584cSmrg 28607b58d2e0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28617b58d2e0Smrg version_type=freebsd-elf 28627b58d2e0Smrg need_lib_prefix=no 28637b58d2e0Smrg need_version=no 28647b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28657b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 28667b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28677b58d2e0Smrg shlibpath_overrides_runpath=yes 28687b58d2e0Smrg hardcode_into_libs=yes 28697b58d2e0Smrg if test "$with_gnu_ld" = yes; then 28707b58d2e0Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28717b58d2e0Smrg else 28727b58d2e0Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28737b58d2e0Smrg case $host_os in 28747b58d2e0Smrg sco3.2v5*) 28757b58d2e0Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28767b58d2e0Smrg ;; 28777b58d2e0Smrg esac 28787b58d2e0Smrg fi 28797b58d2e0Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28807b58d2e0Smrg ;; 2881e4f6584cSmrg 28827b58d2e0Smrgtpf*) 28837b58d2e0Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2884b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 28857b58d2e0Smrg need_lib_prefix=no 28867b58d2e0Smrg need_version=no 28877b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28887b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28897b58d2e0Smrg shlibpath_overrides_runpath=no 28907b58d2e0Smrg hardcode_into_libs=yes 28917b58d2e0Smrg ;; 2892e4f6584cSmrg 28937b58d2e0Smrguts4*) 2894b12e5c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 28957b58d2e0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28967b58d2e0Smrg soname_spec='${libname}${release}${shared_ext}$major' 28977b58d2e0Smrg shlibpath_var=LD_LIBRARY_PATH 28987b58d2e0Smrg ;; 2899e4f6584cSmrg 29007b58d2e0Smrg*) 29017b58d2e0Smrg dynamic_linker=no 29027b58d2e0Smrg ;; 29037b58d2e0Smrgesac 29047b58d2e0SmrgAC_MSG_RESULT([$dynamic_linker]) 29057b58d2e0Smrgtest "$dynamic_linker" = no && can_build_shared=no 2906e4f6584cSmrg 29077b58d2e0Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 29087b58d2e0Smrgif test "$GCC" = yes; then 29097b58d2e0Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29107b58d2e0Smrgfi 2911e4f6584cSmrg 29127b58d2e0Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29137b58d2e0Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29147b58d2e0Smrgfi 29157b58d2e0Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29167b58d2e0Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29177b58d2e0Smrgfi 2918e4f6584cSmrg 29197b58d2e0Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29207b58d2e0Smrg [Variables whose values should be saved in libtool wrapper scripts and 29217b58d2e0Smrg restored at link time]) 29227b58d2e0Smrg_LT_DECL([], [need_lib_prefix], [0], 29237b58d2e0Smrg [Do we need the "lib" prefix for modules?]) 29247b58d2e0Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29257b58d2e0Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29267b58d2e0Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29277b58d2e0Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29287b58d2e0Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29297b58d2e0Smrg [Is shlibpath searched before the hard-coded library search path?]) 29307b58d2e0Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29317b58d2e0Smrg_LT_DECL([], [library_names_spec], [1], 29327b58d2e0Smrg [[List of archive names. First name is the real one, the rest are links. 29337b58d2e0Smrg The last name is the one that the linker finds with -lNAME]]) 29347b58d2e0Smrg_LT_DECL([], [soname_spec], [1], 29357b58d2e0Smrg [[The coded name of the library, if different from the real name]]) 2936b12e5c03Smrg_LT_DECL([], [install_override_mode], [1], 2937b12e5c03Smrg [Permission mode override for installation of shared libraries]) 29387b58d2e0Smrg_LT_DECL([], [postinstall_cmds], [2], 29397b58d2e0Smrg [Command to use after installation of a shared archive]) 29407b58d2e0Smrg_LT_DECL([], [postuninstall_cmds], [2], 29417b58d2e0Smrg [Command to use after uninstallation of a shared archive]) 29427b58d2e0Smrg_LT_DECL([], [finish_cmds], [2], 29437b58d2e0Smrg [Commands used to finish a libtool library installation in a directory]) 29447b58d2e0Smrg_LT_DECL([], [finish_eval], [1], 29457b58d2e0Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29467b58d2e0Smrg not shown]]) 29477b58d2e0Smrg_LT_DECL([], [hardcode_into_libs], [0], 29487b58d2e0Smrg [Whether we should hardcode library paths into libraries]) 29497b58d2e0Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29507b58d2e0Smrg [Compile-time system search path for libraries]) 29517b58d2e0Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29527b58d2e0Smrg [Run-time system search path for libraries]) 29537b58d2e0Smrg])# _LT_SYS_DYNAMIC_LINKER 2954e4f6584cSmrg 2955e4f6584cSmrg 29567b58d2e0Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29577b58d2e0Smrg# -------------------------- 29587b58d2e0Smrg# find a file program which can recognize shared library 29597b58d2e0SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29607b58d2e0Smrg[m4_require([_LT_DECL_EGREP])dnl 29617b58d2e0SmrgAC_MSG_CHECKING([for $1]) 29627b58d2e0SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29637b58d2e0Smrg[case $MAGIC_CMD in 29647b58d2e0Smrg[[\\/*] | ?:[\\/]*]) 29657b58d2e0Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29667b58d2e0Smrg ;; 29677b58d2e0Smrg*) 29687b58d2e0Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29697b58d2e0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29707b58d2e0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29717b58d2e0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29727b58d2e0Smrgdnl not every word. This closes a longstanding sh security hole. 29737b58d2e0Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29747b58d2e0Smrg for ac_dir in $ac_dummy; do 29757b58d2e0Smrg IFS="$lt_save_ifs" 29767b58d2e0Smrg test -z "$ac_dir" && ac_dir=. 29777b58d2e0Smrg if test -f $ac_dir/$1; then 29787b58d2e0Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29797b58d2e0Smrg if test -n "$file_magic_test_file"; then 29807b58d2e0Smrg case $deplibs_check_method in 29817b58d2e0Smrg "file_magic "*) 29827b58d2e0Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29837b58d2e0Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29847b58d2e0Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29857b58d2e0Smrg $EGREP "$file_magic_regex" > /dev/null; then 29867b58d2e0Smrg : 29877b58d2e0Smrg else 29887b58d2e0Smrg cat <<_LT_EOF 1>&2 2989e4f6584cSmrg 29907b58d2e0Smrg*** Warning: the command libtool uses to detect shared libraries, 29917b58d2e0Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29927b58d2e0Smrg*** The result is that libtool may fail to recognize shared libraries 29937b58d2e0Smrg*** as such. This will affect the creation of libtool libraries that 29947b58d2e0Smrg*** depend on shared libraries, but programs linked with such libtool 29957b58d2e0Smrg*** libraries will work regardless of this problem. Nevertheless, you 29967b58d2e0Smrg*** may want to report the problem to your system manager and/or to 29977b58d2e0Smrg*** bug-libtool@gnu.org 2998e4f6584cSmrg 29997b58d2e0Smrg_LT_EOF 30007b58d2e0Smrg fi ;; 30017b58d2e0Smrg esac 30027b58d2e0Smrg fi 30037b58d2e0Smrg break 30047b58d2e0Smrg fi 30057b58d2e0Smrg done 30067b58d2e0Smrg IFS="$lt_save_ifs" 30077b58d2e0Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 30087b58d2e0Smrg ;; 30097b58d2e0Smrgesac]) 30107b58d2e0SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 30117b58d2e0Smrgif test -n "$MAGIC_CMD"; then 30127b58d2e0Smrg AC_MSG_RESULT($MAGIC_CMD) 30137b58d2e0Smrgelse 30147b58d2e0Smrg AC_MSG_RESULT(no) 30157b58d2e0Smrgfi 30167b58d2e0Smrg_LT_DECL([], [MAGIC_CMD], [0], 30177b58d2e0Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30187b58d2e0Smrg])# _LT_PATH_TOOL_PREFIX 3019b698ba48Smrg 30207b58d2e0Smrg# Old name: 30217b58d2e0SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30227b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 30237b58d2e0Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3024b698ba48Smrg 3025b698ba48Smrg 30267b58d2e0Smrg# _LT_PATH_MAGIC 30277b58d2e0Smrg# -------------- 30287b58d2e0Smrg# find a file program which can recognize a shared library 30297b58d2e0Smrgm4_defun([_LT_PATH_MAGIC], 30307b58d2e0Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30317b58d2e0Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30327b58d2e0Smrg if test -n "$ac_tool_prefix"; then 30337b58d2e0Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30347b58d2e0Smrg else 30357b58d2e0Smrg MAGIC_CMD=: 30367b58d2e0Smrg fi 30377b58d2e0Smrgfi 30387b58d2e0Smrg])# _LT_PATH_MAGIC 3039b698ba48Smrg 3040b698ba48Smrg 30417b58d2e0Smrg# LT_PATH_LD 30427b58d2e0Smrg# ---------- 30437b58d2e0Smrg# find the pathname to the GNU or non-GNU linker 30447b58d2e0SmrgAC_DEFUN([LT_PATH_LD], 30457b58d2e0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 30467b58d2e0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30477b58d2e0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30487b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 30497b58d2e0Smrgm4_require([_LT_DECL_EGREP])dnl 3050b12e5c03Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 305109885543Smrg 30527b58d2e0SmrgAC_ARG_WITH([gnu-ld], 30537b58d2e0Smrg [AS_HELP_STRING([--with-gnu-ld], 30547b58d2e0Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30557b58d2e0Smrg [test "$withval" = no || with_gnu_ld=yes], 30567b58d2e0Smrg [with_gnu_ld=no])dnl 30577b58d2e0Smrg 30587b58d2e0Smrgac_prog=ld 30597b58d2e0Smrgif test "$GCC" = yes; then 30607b58d2e0Smrg # Check if gcc -print-prog-name=ld gives a path. 30617b58d2e0Smrg AC_MSG_CHECKING([for ld used by $CC]) 30627b58d2e0Smrg case $host in 30637b58d2e0Smrg *-*-mingw*) 30647b58d2e0Smrg # gcc leaves a trailing carriage return which upsets mingw 30657b58d2e0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30667b58d2e0Smrg *) 30677b58d2e0Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3068e4f6584cSmrg esac 30697b58d2e0Smrg case $ac_prog in 30707b58d2e0Smrg # Accept absolute paths. 30717b58d2e0Smrg [[\\/]]* | ?:[[\\/]]*) 30727b58d2e0Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 30737b58d2e0Smrg # Canonicalize the pathname of ld 30747b58d2e0Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30757b58d2e0Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30767b58d2e0Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30777b58d2e0Smrg done 30787b58d2e0Smrg test -z "$LD" && LD="$ac_prog" 30797b58d2e0Smrg ;; 30807b58d2e0Smrg "") 30817b58d2e0Smrg # If it fails, then pretend we aren't using GCC. 30827b58d2e0Smrg ac_prog=ld 30837b58d2e0Smrg ;; 30847b58d2e0Smrg *) 30857b58d2e0Smrg # If it is relative, then search for the first ld in PATH. 30867b58d2e0Smrg with_gnu_ld=unknown 30877b58d2e0Smrg ;; 30887b58d2e0Smrg esac 30897b58d2e0Smrgelif test "$with_gnu_ld" = yes; then 30907b58d2e0Smrg AC_MSG_CHECKING([for GNU ld]) 30917b58d2e0Smrgelse 30927b58d2e0Smrg AC_MSG_CHECKING([for non-GNU ld]) 30937b58d2e0Smrgfi 30947b58d2e0SmrgAC_CACHE_VAL(lt_cv_path_LD, 30957b58d2e0Smrg[if test -z "$LD"; then 30967b58d2e0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30977b58d2e0Smrg for ac_dir in $PATH; do 30987b58d2e0Smrg IFS="$lt_save_ifs" 30997b58d2e0Smrg test -z "$ac_dir" && ac_dir=. 31007b58d2e0Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 31017b58d2e0Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 31027b58d2e0Smrg # Check to see if the program is GNU ld. I'd rather use --version, 31037b58d2e0Smrg # but apparently some variants of GNU ld only accept -v. 31047b58d2e0Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 31057b58d2e0Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 31067b58d2e0Smrg *GNU* | *'with BFD'*) 31077b58d2e0Smrg test "$with_gnu_ld" != no && break 31087b58d2e0Smrg ;; 31097b58d2e0Smrg *) 31107b58d2e0Smrg test "$with_gnu_ld" != yes && break 31117b58d2e0Smrg ;; 31127b58d2e0Smrg esac 3113e4f6584cSmrg fi 31147b58d2e0Smrg done 31157b58d2e0Smrg IFS="$lt_save_ifs" 31167b58d2e0Smrgelse 31177b58d2e0Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 31187b58d2e0Smrgfi]) 31197b58d2e0SmrgLD="$lt_cv_path_LD" 31207b58d2e0Smrgif test -n "$LD"; then 31217b58d2e0Smrg AC_MSG_RESULT($LD) 31227b58d2e0Smrgelse 31237b58d2e0Smrg AC_MSG_RESULT(no) 31247b58d2e0Smrgfi 31257b58d2e0Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31267b58d2e0Smrg_LT_PATH_LD_GNU 31277b58d2e0SmrgAC_SUBST([LD]) 312809885543Smrg 31297b58d2e0Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31307b58d2e0Smrg])# LT_PATH_LD 313109885543Smrg 31327b58d2e0Smrg# Old names: 31337b58d2e0SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31347b58d2e0SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31357b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 31367b58d2e0Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31377b58d2e0Smrgdnl AC_DEFUN([AC_PROG_LD], []) 313809885543Smrg 31397104f784Smrg 31407b58d2e0Smrg# _LT_PATH_LD_GNU 31417b58d2e0Smrg#- -------------- 31427b58d2e0Smrgm4_defun([_LT_PATH_LD_GNU], 31437b58d2e0Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31447b58d2e0Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31457b58d2e0Smrgcase `$LD -v 2>&1 </dev/null` in 31467b58d2e0Smrg*GNU* | *'with BFD'*) 31477b58d2e0Smrg lt_cv_prog_gnu_ld=yes 31487b58d2e0Smrg ;; 31497b58d2e0Smrg*) 31507b58d2e0Smrg lt_cv_prog_gnu_ld=no 31517b58d2e0Smrg ;; 31527b58d2e0Smrgesac]) 31537b58d2e0Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31547b58d2e0Smrg])# _LT_PATH_LD_GNU 315509885543Smrg 31567104f784Smrg 31577b58d2e0Smrg# _LT_CMD_RELOAD 31587b58d2e0Smrg# -------------- 31597b58d2e0Smrg# find reload flag for linker 31607b58d2e0Smrg# -- PORTME Some linkers may need a different reload flag. 31617b58d2e0Smrgm4_defun([_LT_CMD_RELOAD], 31627b58d2e0Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 31637b58d2e0Smrg lt_cv_ld_reload_flag, 31647b58d2e0Smrg [lt_cv_ld_reload_flag='-r']) 31657b58d2e0Smrgreload_flag=$lt_cv_ld_reload_flag 31667b58d2e0Smrgcase $reload_flag in 31677b58d2e0Smrg"" | " "*) ;; 31687b58d2e0Smrg*) reload_flag=" $reload_flag" ;; 3169e4f6584cSmrgesac 31707b58d2e0Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31717b58d2e0Smrgcase $host_os in 3172b12e5c03Smrg cygwin* | mingw* | pw32* | cegcc*) 3173b12e5c03Smrg if test "$GCC" != yes; then 3174b12e5c03Smrg reload_cmds=false 3175b12e5c03Smrg fi 3176b12e5c03Smrg ;; 31777b58d2e0Smrg darwin*) 31787b58d2e0Smrg if test "$GCC" = yes; then 31797b58d2e0Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31807b58d2e0Smrg else 31817b58d2e0Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31827b58d2e0Smrg fi 31837b58d2e0Smrg ;; 31847b58d2e0Smrgesac 3185b12e5c03Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3186b12e5c03Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31877b58d2e0Smrg])# _LT_CMD_RELOAD 31887104f784Smrg 318909885543Smrg 31907b58d2e0Smrg# _LT_CHECK_MAGIC_METHOD 31917b58d2e0Smrg# ---------------------- 31927b58d2e0Smrg# how to check for library dependencies 31937b58d2e0Smrg# -- PORTME fill in with the dynamic library characteristics 31947b58d2e0Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31957b58d2e0Smrg[m4_require([_LT_DECL_EGREP]) 31967b58d2e0Smrgm4_require([_LT_DECL_OBJDUMP]) 31977b58d2e0SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31987b58d2e0Smrglt_cv_deplibs_check_method, 31997b58d2e0Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 32007b58d2e0Smrglt_cv_file_magic_test_file= 32017b58d2e0Smrglt_cv_deplibs_check_method='unknown' 32027b58d2e0Smrg# Need to set the preceding variable on all platforms that support 32037b58d2e0Smrg# interlibrary dependencies. 32047b58d2e0Smrg# 'none' -- dependencies not supported. 32057b58d2e0Smrg# `unknown' -- same as none, but documents that we really don't know. 32067b58d2e0Smrg# 'pass_all' -- all dependencies passed with no checks. 32077b58d2e0Smrg# 'test_compile' -- check by making test program. 32087b58d2e0Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 32097b58d2e0Smrg# which responds to the $file_magic_cmd with a given extended regex. 32107b58d2e0Smrg# If you have `file' or equivalent on your system and you're not sure 32117b58d2e0Smrg# whether `pass_all' will *always* work, you probably want this one. 321209885543Smrg 32137b58d2e0Smrgcase $host_os in 32147b58d2e0Smrgaix[[4-9]]*) 32157b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 32167b58d2e0Smrg ;; 321709885543Smrg 32187b58d2e0Smrgbeos*) 32197b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 32207b58d2e0Smrg ;; 322109885543Smrg 32227b58d2e0Smrgbsdi[[45]]*) 32237b58d2e0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32247b58d2e0Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 32257b58d2e0Smrg lt_cv_file_magic_test_file=/shlib/libc.so 32267b58d2e0Smrg ;; 322709885543Smrg 32287b58d2e0Smrgcygwin*) 32297b58d2e0Smrg # func_win32_libid is a shell function defined in ltmain.sh 32307b58d2e0Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32317b58d2e0Smrg lt_cv_file_magic_cmd='func_win32_libid' 32327b58d2e0Smrg ;; 3233b698ba48Smrg 32347b58d2e0Smrgmingw* | pw32*) 32357b58d2e0Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 32367b58d2e0Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32377b58d2e0Smrg # unless we find 'file', for example because we are cross-compiling. 3238b12e5c03Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3239b12e5c03Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32407b58d2e0Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32417b58d2e0Smrg lt_cv_file_magic_cmd='func_win32_libid' 32427b58d2e0Smrg else 3243b12e5c03Smrg # Keep this pattern in sync with the one in func_win32_libid. 3244b12e5c03Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32457b58d2e0Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32467b58d2e0Smrg fi 32477b58d2e0Smrg ;; 324809885543Smrg 3249b12e5c03Smrgcegcc*) 32507b58d2e0Smrg # use the weaker test based on 'objdump'. See mingw*. 32517b58d2e0Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32527b58d2e0Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32537b58d2e0Smrg ;; 32547b58d2e0Smrg 32557b58d2e0Smrgdarwin* | rhapsody*) 32567b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 32577b58d2e0Smrg ;; 32587b58d2e0Smrg 32597b58d2e0Smrgfreebsd* | dragonfly*) 32607b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32617b58d2e0Smrg case $host_cpu in 32627b58d2e0Smrg i*86 ) 32637b58d2e0Smrg # Not sure whether the presence of OpenBSD here was a mistake. 32647b58d2e0Smrg # Let's accept both of them until this is cleared up. 32657b58d2e0Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32667b58d2e0Smrg lt_cv_file_magic_cmd=/usr/bin/file 32677b58d2e0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 32687b58d2e0Smrg ;; 32697b58d2e0Smrg esac 32707b58d2e0Smrg else 32717b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 3272e4f6584cSmrg fi 32737b58d2e0Smrg ;; 327409885543Smrg 3275b12e5c03Smrghaiku*) 3276b12e5c03Smrg lt_cv_deplibs_check_method=pass_all 3277b12e5c03Smrg ;; 3278b12e5c03Smrg 32797b58d2e0Smrghpux10.20* | hpux11*) 32807b58d2e0Smrg lt_cv_file_magic_cmd=/usr/bin/file 32817b58d2e0Smrg case $host_cpu in 32827b58d2e0Smrg ia64*) 32837b58d2e0Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32847b58d2e0Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32857b58d2e0Smrg ;; 32867b58d2e0Smrg hppa*64*) 3287b12e5c03Smrg [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]'] 32887b58d2e0Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32897b58d2e0Smrg ;; 32907b58d2e0Smrg *) 3291b12e5c03Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32927b58d2e0Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 32937b58d2e0Smrg ;; 32947b58d2e0Smrg esac 32957b58d2e0Smrg ;; 329609885543Smrg 32977b58d2e0Smrginterix[[3-9]]*) 32987b58d2e0Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32997b58d2e0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 33007b58d2e0Smrg ;; 330109885543Smrg 33027b58d2e0Smrgirix5* | irix6* | nonstopux*) 33037b58d2e0Smrg case $LD in 33047b58d2e0Smrg *-32|*"-32 ") libmagic=32-bit;; 33057b58d2e0Smrg *-n32|*"-n32 ") libmagic=N32;; 33067b58d2e0Smrg *-64|*"-64 ") libmagic=64-bit;; 33077b58d2e0Smrg *) libmagic=never-match;; 33087b58d2e0Smrg esac 33097b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33107b58d2e0Smrg ;; 3311e4f6584cSmrg 3312b12e5c03Smrg# This must be glibc/ELF. 3313df9ffc95Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 33147b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33157b58d2e0Smrg ;; 33167b58d2e0Smrg 3317df9ffc95Smrgnetbsd* | netbsdelf*-gnu) 33187b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33197b58d2e0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33207b58d2e0Smrg else 33217b58d2e0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3322e4f6584cSmrg fi 3323e4f6584cSmrg ;; 33247b58d2e0Smrg 33257b58d2e0Smrgnewos6*) 33267b58d2e0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33277b58d2e0Smrg lt_cv_file_magic_cmd=/usr/bin/file 33287b58d2e0Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 33297b58d2e0Smrg ;; 33307b58d2e0Smrg 33317b58d2e0Smrg*nto* | *qnx*) 33327b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33337b58d2e0Smrg ;; 33347b58d2e0Smrg 33357b58d2e0Smrgopenbsd*) 33367b58d2e0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33377b58d2e0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33387b58d2e0Smrg else 33397b58d2e0Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3340e4f6584cSmrg fi 3341b698ba48Smrg ;; 3342b698ba48Smrg 33437b58d2e0Smrgosf3* | osf4* | osf5*) 33447b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 3345b698ba48Smrg ;; 334609885543Smrg 33477b58d2e0Smrgrdos*) 33487b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 3349b698ba48Smrg ;; 335009885543Smrg 33517b58d2e0Smrgsolaris*) 33527b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33537b58d2e0Smrg ;; 335409885543Smrg 33557b58d2e0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33567b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33577b58d2e0Smrg ;; 335809885543Smrg 33597b58d2e0Smrgsysv4 | sysv4.3*) 33607b58d2e0Smrg case $host_vendor in 33617b58d2e0Smrg motorola) 33627b58d2e0Smrg 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]]' 33637b58d2e0Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3364e4f6584cSmrg ;; 33657b58d2e0Smrg ncr) 33667b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33677b58d2e0Smrg ;; 33687b58d2e0Smrg sequent) 33697b58d2e0Smrg lt_cv_file_magic_cmd='/bin/file' 33707b58d2e0Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33717b58d2e0Smrg ;; 33727b58d2e0Smrg sni) 33737b58d2e0Smrg lt_cv_file_magic_cmd='/bin/file' 33747b58d2e0Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33757b58d2e0Smrg lt_cv_file_magic_test_file=/lib/libc.so 33767b58d2e0Smrg ;; 33777b58d2e0Smrg siemens) 33787b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33797b58d2e0Smrg ;; 33807b58d2e0Smrg pc) 33817b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 3382e4f6584cSmrg ;; 3383e4f6584cSmrg esac 33847b58d2e0Smrg ;; 338509885543Smrg 33867b58d2e0Smrgtpf*) 33877b58d2e0Smrg lt_cv_deplibs_check_method=pass_all 33887b58d2e0Smrg ;; 33897b58d2e0Smrgesac 3390e4f6584cSmrg]) 339109885543Smrg 3392b12e5c03Smrgfile_magic_glob= 3393b12e5c03Smrgwant_nocaseglob=no 3394b12e5c03Smrgif test "$build" = "$host"; then 3395b12e5c03Smrg case $host_os in 3396b12e5c03Smrg mingw* | pw32*) 3397b12e5c03Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3398b12e5c03Smrg want_nocaseglob=yes 3399b12e5c03Smrg else 3400b12e5c03Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3401b12e5c03Smrg fi 3402b12e5c03Smrg ;; 3403b12e5c03Smrg esac 3404b12e5c03Smrgfi 3405b12e5c03Smrg 3406b12e5c03Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3407b12e5c03Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3408b12e5c03Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3409b12e5c03Smrg 3410b12e5c03Smrg_LT_DECL([], [deplibs_check_method], [1], 3411b12e5c03Smrg [Method to check whether dependent libraries are shared objects]) 3412b12e5c03Smrg_LT_DECL([], [file_magic_cmd], [1], 3413b12e5c03Smrg [Command to use when deplibs_check_method = "file_magic"]) 3414b12e5c03Smrg_LT_DECL([], [file_magic_glob], [1], 3415b12e5c03Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3416b12e5c03Smrg_LT_DECL([], [want_nocaseglob], [1], 3417b12e5c03Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3418b12e5c03Smrg])# _LT_CHECK_MAGIC_METHOD 341909885543Smrg 342009885543Smrg 34217b58d2e0Smrg# LT_PATH_NM 34227b58d2e0Smrg# ---------- 34237b58d2e0Smrg# find the pathname to a BSD- or MS-compatible name lister 34247b58d2e0SmrgAC_DEFUN([LT_PATH_NM], 34257b58d2e0Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34267b58d2e0SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34277b58d2e0Smrg[if test -n "$NM"; then 34287b58d2e0Smrg # Let the user override the test. 34297b58d2e0Smrg lt_cv_path_NM="$NM" 3430e4f6584cSmrgelse 34317b58d2e0Smrg lt_nm_to_check="${ac_tool_prefix}nm" 34327b58d2e0Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34337b58d2e0Smrg lt_nm_to_check="$lt_nm_to_check nm" 34347b58d2e0Smrg fi 34357b58d2e0Smrg for lt_tmp_nm in $lt_nm_to_check; do 34367b58d2e0Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34377b58d2e0Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34387b58d2e0Smrg IFS="$lt_save_ifs" 34397b58d2e0Smrg test -z "$ac_dir" && ac_dir=. 34407b58d2e0Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 34417b58d2e0Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34427b58d2e0Smrg # Check to see if the nm accepts a BSD-compat flag. 34437b58d2e0Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34447b58d2e0Smrg # nm: unknown option "B" ignored 34457b58d2e0Smrg # Tru64's nm complains that /dev/null is an invalid object file 34467b58d2e0Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34477b58d2e0Smrg */dev/null* | *'Invalid file or object type'*) 34487b58d2e0Smrg lt_cv_path_NM="$tmp_nm -B" 34497b58d2e0Smrg break 34507b58d2e0Smrg ;; 34517b58d2e0Smrg *) 34527b58d2e0Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34537b58d2e0Smrg */dev/null*) 34547b58d2e0Smrg lt_cv_path_NM="$tmp_nm -p" 34557b58d2e0Smrg break 34567b58d2e0Smrg ;; 34577b58d2e0Smrg *) 34587b58d2e0Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34597b58d2e0Smrg continue # so that we can try to find one that supports BSD flags 34607b58d2e0Smrg ;; 34617b58d2e0Smrg esac 34627b58d2e0Smrg ;; 34637b58d2e0Smrg esac 34647b58d2e0Smrg fi 34657b58d2e0Smrg done 34667b58d2e0Smrg IFS="$lt_save_ifs" 34677b58d2e0Smrg done 34687b58d2e0Smrg : ${lt_cv_path_NM=no} 34697b58d2e0Smrgfi]) 34707b58d2e0Smrgif test "$lt_cv_path_NM" != "no"; then 34717b58d2e0Smrg NM="$lt_cv_path_NM" 34727b58d2e0Smrgelse 34737b58d2e0Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3474b12e5c03Smrg if test -n "$DUMPBIN"; then : 3475b12e5c03Smrg # Let the user override the test. 3476b12e5c03Smrg else 3477b12e5c03Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3478b12e5c03Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3479b12e5c03Smrg *COFF*) 3480b12e5c03Smrg DUMPBIN="$DUMPBIN -symbols" 3481b12e5c03Smrg ;; 3482b12e5c03Smrg *) 3483b12e5c03Smrg DUMPBIN=: 3484b12e5c03Smrg ;; 3485b12e5c03Smrg esac 3486b12e5c03Smrg fi 34877b58d2e0Smrg AC_SUBST([DUMPBIN]) 34887b58d2e0Smrg if test "$DUMPBIN" != ":"; then 34897b58d2e0Smrg NM="$DUMPBIN" 34907b58d2e0Smrg fi 34917b58d2e0Smrgfi 34927b58d2e0Smrgtest -z "$NM" && NM=nm 34937b58d2e0SmrgAC_SUBST([NM]) 34947b58d2e0Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 349509885543Smrg 34967b58d2e0SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34977b58d2e0Smrg [lt_cv_nm_interface="BSD nm" 34987b58d2e0Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3499b12e5c03Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 35007b58d2e0Smrg (eval "$ac_compile" 2>conftest.err) 35017b58d2e0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3502b12e5c03Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 35037b58d2e0Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 35047b58d2e0Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3505b12e5c03Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 35067b58d2e0Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 35077b58d2e0Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35087b58d2e0Smrg lt_cv_nm_interface="MS dumpbin" 35097b58d2e0Smrg fi 35107b58d2e0Smrg rm -f conftest*]) 35117b58d2e0Smrg])# LT_PATH_NM 351209885543Smrg 35137b58d2e0Smrg# Old names: 35147b58d2e0SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35157b58d2e0SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35167b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 35177b58d2e0Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35187b58d2e0Smrgdnl AC_DEFUN([AC_PROG_NM], []) 351909885543Smrg 3520b12e5c03Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3521b12e5c03Smrg# -------------------------------- 3522b12e5c03Smrg# how to determine the name of the shared library 3523b12e5c03Smrg# associated with a specific link library. 3524b12e5c03Smrg# -- PORTME fill in with the dynamic library characteristics 3525b12e5c03Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3526b12e5c03Smrg[m4_require([_LT_DECL_EGREP]) 3527b12e5c03Smrgm4_require([_LT_DECL_OBJDUMP]) 3528b12e5c03Smrgm4_require([_LT_DECL_DLLTOOL]) 3529b12e5c03SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3530b12e5c03Smrglt_cv_sharedlib_from_linklib_cmd, 3531b12e5c03Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3532b12e5c03Smrg 3533b12e5c03Smrgcase $host_os in 3534b12e5c03Smrgcygwin* | mingw* | pw32* | cegcc*) 3535b12e5c03Smrg # two different shell functions defined in ltmain.sh 3536b12e5c03Smrg # decide which to use based on capabilities of $DLLTOOL 3537b12e5c03Smrg case `$DLLTOOL --help 2>&1` in 3538b12e5c03Smrg *--identify-strict*) 3539b12e5c03Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3540b12e5c03Smrg ;; 3541b12e5c03Smrg *) 3542b12e5c03Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3543b12e5c03Smrg ;; 3544b12e5c03Smrg esac 3545b12e5c03Smrg ;; 3546b12e5c03Smrg*) 3547b12e5c03Smrg # fallback: assume linklib IS sharedlib 3548b12e5c03Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3549b12e5c03Smrg ;; 3550b12e5c03Smrgesac 3551b12e5c03Smrg]) 3552b12e5c03Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3553b12e5c03Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3554b12e5c03Smrg 3555b12e5c03Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3556b12e5c03Smrg [Command to associate shared and link libraries]) 3557b12e5c03Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3558b12e5c03Smrg 3559b12e5c03Smrg 3560b12e5c03Smrg# _LT_PATH_MANIFEST_TOOL 3561b12e5c03Smrg# ---------------------- 3562b12e5c03Smrg# locate the manifest tool 3563b12e5c03Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3564b12e5c03Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3565b12e5c03Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3566b12e5c03SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3567b12e5c03Smrg [lt_cv_path_mainfest_tool=no 3568b12e5c03Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3569b12e5c03Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3570b12e5c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3571b12e5c03Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3572b12e5c03Smrg lt_cv_path_mainfest_tool=yes 3573b12e5c03Smrg fi 3574b12e5c03Smrg rm -f conftest*]) 3575b12e5c03Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3576b12e5c03Smrg MANIFEST_TOOL=: 3577b12e5c03Smrgfi 3578b12e5c03Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3579b12e5c03Smrg])# _LT_PATH_MANIFEST_TOOL 3580b12e5c03Smrg 358109885543Smrg 35827b58d2e0Smrg# LT_LIB_M 35837b58d2e0Smrg# -------- 35847b58d2e0Smrg# check for math library 35857b58d2e0SmrgAC_DEFUN([LT_LIB_M], 35867b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35877b58d2e0SmrgLIBM= 35887b58d2e0Smrgcase $host in 3589b12e5c03Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35907b58d2e0Smrg # These system don't have libm, or don't need it 35917b58d2e0Smrg ;; 35927b58d2e0Smrg*-ncr-sysv4.3*) 35937b58d2e0Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35947b58d2e0Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35957b58d2e0Smrg ;; 35967b58d2e0Smrg*) 35977b58d2e0Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 35987b58d2e0Smrg ;; 35997b58d2e0Smrgesac 36007b58d2e0SmrgAC_SUBST([LIBM]) 36017b58d2e0Smrg])# LT_LIB_M 36022ec8c4b4Smrg 36037b58d2e0Smrg# Old name: 36047b58d2e0SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 36057b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 36067b58d2e0Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360709885543Smrg 360809885543Smrg 36097b58d2e0Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36107b58d2e0Smrg# ------------------------------- 36117b58d2e0Smrgm4_defun([_LT_COMPILER_NO_RTTI], 36127b58d2e0Smrg[m4_require([_LT_TAG_COMPILER])dnl 361309885543Smrg 36147b58d2e0Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 361509885543Smrg 36167b58d2e0Smrgif test "$GCC" = yes; then 3617b12e5c03Smrg case $cc_basename in 3618b12e5c03Smrg nvcc*) 3619b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3620b12e5c03Smrg *) 3621b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3622b12e5c03Smrg esac 362309885543Smrg 36247b58d2e0Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36257b58d2e0Smrg lt_cv_prog_compiler_rtti_exceptions, 36267b58d2e0Smrg [-fno-rtti -fno-exceptions], [], 36277b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36287b58d2e0Smrgfi 36297b58d2e0Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36307b58d2e0Smrg [Compiler flag to turn off builtin functions]) 36317b58d2e0Smrg])# _LT_COMPILER_NO_RTTI 363209885543Smrg 363309885543Smrg 36347b58d2e0Smrg# _LT_CMD_GLOBAL_SYMBOLS 36357b58d2e0Smrg# ---------------------- 36367b58d2e0Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36377b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36387b58d2e0SmrgAC_REQUIRE([AC_PROG_CC])dnl 3639b12e5c03SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36407b58d2e0SmrgAC_REQUIRE([LT_PATH_NM])dnl 36417b58d2e0SmrgAC_REQUIRE([LT_PATH_LD])dnl 36427b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 36437b58d2e0Smrgm4_require([_LT_DECL_EGREP])dnl 36447b58d2e0Smrgm4_require([_LT_TAG_COMPILER])dnl 364509885543Smrg 36467b58d2e0Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36477b58d2e0SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36487b58d2e0SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36497b58d2e0Smrg[ 36507b58d2e0Smrg# These are sane defaults that work on at least a few old systems. 36517b58d2e0Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 365209885543Smrg 36537b58d2e0Smrg# Character class describing NM global symbol codes. 36547b58d2e0Smrgsymcode='[[BCDEGRST]]' 365509885543Smrg 36567b58d2e0Smrg# Regexp to match symbols that can be accessed directly from C. 36577b58d2e0Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 365809885543Smrg 36597b58d2e0Smrg# Define system-specific variables. 36607b58d2e0Smrgcase $host_os in 36617b58d2e0Smrgaix*) 36627b58d2e0Smrg symcode='[[BCDT]]' 36637b58d2e0Smrg ;; 36647b58d2e0Smrgcygwin* | mingw* | pw32* | cegcc*) 36657b58d2e0Smrg symcode='[[ABCDGISTW]]' 36667b58d2e0Smrg ;; 36677b58d2e0Smrghpux*) 36687b58d2e0Smrg if test "$host_cpu" = ia64; then 36697b58d2e0Smrg symcode='[[ABCDEGRST]]' 3670e4f6584cSmrg fi 36717b58d2e0Smrg ;; 36727b58d2e0Smrgirix* | nonstopux*) 36737b58d2e0Smrg symcode='[[BCDEGRST]]' 36747b58d2e0Smrg ;; 36757b58d2e0Smrgosf*) 36767b58d2e0Smrg symcode='[[BCDEGQRST]]' 36777b58d2e0Smrg ;; 36787b58d2e0Smrgsolaris*) 36797b58d2e0Smrg symcode='[[BDRT]]' 36807b58d2e0Smrg ;; 36817b58d2e0Smrgsco3.2v5*) 36827b58d2e0Smrg symcode='[[DT]]' 36837b58d2e0Smrg ;; 36847b58d2e0Smrgsysv4.2uw2*) 36857b58d2e0Smrg symcode='[[DT]]' 36867b58d2e0Smrg ;; 36877b58d2e0Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36887b58d2e0Smrg symcode='[[ABDT]]' 36897b58d2e0Smrg ;; 36907b58d2e0Smrgsysv4) 36917b58d2e0Smrg symcode='[[DFNSTU]]' 36927b58d2e0Smrg ;; 36937b58d2e0Smrgesac 369409885543Smrg 36957b58d2e0Smrg# If we're using GNU nm, then use its standard symbol codes. 36967b58d2e0Smrgcase `$NM -V 2>&1` in 36977b58d2e0Smrg*GNU* | *'with BFD'*) 36987b58d2e0Smrg symcode='[[ABCDGIRSTW]]' ;; 36997b58d2e0Smrgesac 370009885543Smrg 37017b58d2e0Smrg# Transform an extracted symbol line into a proper C declaration. 37027b58d2e0Smrg# Some systems (esp. on ia64) link data and code symbols differently, 37037b58d2e0Smrg# so use this general approach. 37047b58d2e0Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 370509885543Smrg 37067b58d2e0Smrg# Transform an extracted symbol line into symbol name and symbol address 3707b12e5c03Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3708b12e5c03Smrglt_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'" 370909885543Smrg 37107b58d2e0Smrg# Handle CRLF in mingw tool chain 37117b58d2e0Smrgopt_cr= 37127b58d2e0Smrgcase $build_os in 37137b58d2e0Smrgmingw*) 37147b58d2e0Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37157b58d2e0Smrg ;; 37167b58d2e0Smrgesac 371709885543Smrg 37187b58d2e0Smrg# Try without a prefix underscore, then with it. 37197b58d2e0Smrgfor ac_symprfx in "" "_"; do 372009885543Smrg 37217b58d2e0Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37227b58d2e0Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 372309885543Smrg 37247b58d2e0Smrg # Write the raw and C identifiers. 37257b58d2e0Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37267b58d2e0Smrg # Fake it for dumpbin and say T for any non-static function 37277b58d2e0Smrg # and D for any global variable. 37287b58d2e0Smrg # Also find C++ and __fastcall symbols from MSVC++, 37297b58d2e0Smrg # which start with @ or ?. 37307b58d2e0Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37317b58d2e0Smrg" {last_section=section; section=\$ 3};"\ 3732b12e5c03Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37337b58d2e0Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37347b58d2e0Smrg" \$ 0!~/External *\|/{next};"\ 37357b58d2e0Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37367b58d2e0Smrg" {if(hide[section]) next};"\ 37377b58d2e0Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37387b58d2e0Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37397b58d2e0Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37407b58d2e0Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37417b58d2e0Smrg" ' prfx=^$ac_symprfx]" 3742e4f6584cSmrg else 37437b58d2e0Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3744b698ba48Smrg fi 3745b12e5c03Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 374609885543Smrg 37477b58d2e0Smrg # Check to see that the pipe works correctly. 37487b58d2e0Smrg pipe_works=no 374909885543Smrg 37507b58d2e0Smrg rm -f conftest* 37517b58d2e0Smrg cat > conftest.$ac_ext <<_LT_EOF 37527b58d2e0Smrg#ifdef __cplusplus 37537b58d2e0Smrgextern "C" { 37547b58d2e0Smrg#endif 37557b58d2e0Smrgchar nm_test_var; 37567b58d2e0Smrgvoid nm_test_func(void); 37577b58d2e0Smrgvoid nm_test_func(void){} 37587b58d2e0Smrg#ifdef __cplusplus 37597b58d2e0Smrg} 37607b58d2e0Smrg#endif 37617b58d2e0Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37627b58d2e0Smrg_LT_EOF 376309885543Smrg 37647b58d2e0Smrg if AC_TRY_EVAL(ac_compile); then 37657b58d2e0Smrg # Now try to grab the symbols. 37667b58d2e0Smrg nlist=conftest.nm 3767b12e5c03Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37687b58d2e0Smrg # Try sorting and uniquifying the output. 37697b58d2e0Smrg if sort "$nlist" | uniq > "$nlist"T; then 37707b58d2e0Smrg mv -f "$nlist"T "$nlist" 37717b58d2e0Smrg else 37727b58d2e0Smrg rm -f "$nlist"T 37737b58d2e0Smrg fi 377409885543Smrg 37757b58d2e0Smrg # Make sure that we snagged all the symbols we need. 37767b58d2e0Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37777b58d2e0Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37787b58d2e0Smrg cat <<_LT_EOF > conftest.$ac_ext 3779b12e5c03Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3780b12e5c03Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3781b12e5c03Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3782b12e5c03Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3783b12e5c03Smrg# define LT@&t@_DLSYM_CONST 3784b12e5c03Smrg#elif defined(__osf__) 3785b12e5c03Smrg/* This system does not cope well with relocations in const data. */ 3786b12e5c03Smrg# define LT@&t@_DLSYM_CONST 3787b12e5c03Smrg#else 3788b12e5c03Smrg# define LT@&t@_DLSYM_CONST const 3789b12e5c03Smrg#endif 3790b12e5c03Smrg 37917b58d2e0Smrg#ifdef __cplusplus 37927b58d2e0Smrgextern "C" { 37937b58d2e0Smrg#endif 379409885543Smrg 37957b58d2e0Smrg_LT_EOF 37967b58d2e0Smrg # Now generate the symbol file. 37977b58d2e0Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 379809885543Smrg 37997b58d2e0Smrg cat <<_LT_EOF >> conftest.$ac_ext 380009885543Smrg 38017b58d2e0Smrg/* The mapping between symbol names and symbols. */ 3802b12e5c03SmrgLT@&t@_DLSYM_CONST struct { 38037b58d2e0Smrg const char *name; 38047b58d2e0Smrg void *address; 38057b58d2e0Smrg} 38067b58d2e0Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38077b58d2e0Smrg{ 38087b58d2e0Smrg { "@PROGRAM@", (void *) 0 }, 38097b58d2e0Smrg_LT_EOF 38107b58d2e0Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38117b58d2e0Smrg cat <<\_LT_EOF >> conftest.$ac_ext 38127b58d2e0Smrg {0, (void *) 0} 38137b58d2e0Smrg}; 381409885543Smrg 38157b58d2e0Smrg/* This works around a problem in FreeBSD linker */ 38167b58d2e0Smrg#ifdef FREEBSD_WORKAROUND 38177b58d2e0Smrgstatic const void *lt_preloaded_setup() { 38187b58d2e0Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38197b58d2e0Smrg} 38207b58d2e0Smrg#endif 382109885543Smrg 38227b58d2e0Smrg#ifdef __cplusplus 38237b58d2e0Smrg} 38247b58d2e0Smrg#endif 38257b58d2e0Smrg_LT_EOF 38267b58d2e0Smrg # Now try linking the two files. 38277b58d2e0Smrg mv conftest.$ac_objext conftstm.$ac_objext 3828b12e5c03Smrg lt_globsym_save_LIBS=$LIBS 3829b12e5c03Smrg lt_globsym_save_CFLAGS=$CFLAGS 38307b58d2e0Smrg LIBS="conftstm.$ac_objext" 38317b58d2e0Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38327b58d2e0Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38337b58d2e0Smrg pipe_works=yes 38347b58d2e0Smrg fi 3835b12e5c03Smrg LIBS=$lt_globsym_save_LIBS 3836b12e5c03Smrg CFLAGS=$lt_globsym_save_CFLAGS 38377b58d2e0Smrg else 38387b58d2e0Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38397b58d2e0Smrg fi 38407b58d2e0Smrg else 38417b58d2e0Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38427b58d2e0Smrg fi 38437b58d2e0Smrg else 38447b58d2e0Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 38457b58d2e0Smrg fi 38467b58d2e0Smrg else 38477b58d2e0Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38487b58d2e0Smrg cat conftest.$ac_ext >&5 38497b58d2e0Smrg fi 38507b58d2e0Smrg rm -rf conftest* conftst* 385109885543Smrg 38527b58d2e0Smrg # Do not use the global_symbol_pipe unless it works. 38537b58d2e0Smrg if test "$pipe_works" = yes; then 38547b58d2e0Smrg break 38557b58d2e0Smrg else 38567b58d2e0Smrg lt_cv_sys_global_symbol_pipe= 3857e4f6584cSmrg fi 38587b58d2e0Smrgdone 38597b58d2e0Smrg]) 38607b58d2e0Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38617b58d2e0Smrg lt_cv_sys_global_symbol_to_cdecl= 38627b58d2e0Smrgfi 38637b58d2e0Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38647b58d2e0Smrg AC_MSG_RESULT(failed) 3865e4f6584cSmrgelse 38667b58d2e0Smrg AC_MSG_RESULT(ok) 3867e4f6584cSmrgfi 386809885543Smrg 3869b12e5c03Smrg# Response file support. 3870b12e5c03Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3871b12e5c03Smrg nm_file_list_spec='@' 3872b12e5c03Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3873b12e5c03Smrg nm_file_list_spec='@' 3874b12e5c03Smrgfi 3875b12e5c03Smrg 38767b58d2e0Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38777b58d2e0Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 38787b58d2e0Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38797b58d2e0Smrg [Transform the output of nm in a proper C declaration]) 38807b58d2e0Smrg_LT_DECL([global_symbol_to_c_name_address], 38817b58d2e0Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38827b58d2e0Smrg [Transform the output of nm in a C name address pair]) 38837b58d2e0Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38847b58d2e0Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38857b58d2e0Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3886b12e5c03Smrg_LT_DECL([], [nm_file_list_spec], [1], 3887b12e5c03Smrg [Specify filename containing input files for $NM]) 38887b58d2e0Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 388909885543Smrg 389009885543Smrg 38917b58d2e0Smrg# _LT_COMPILER_PIC([TAGNAME]) 38927b58d2e0Smrg# --------------------------- 38937b58d2e0Smrgm4_defun([_LT_COMPILER_PIC], 38947b58d2e0Smrg[m4_require([_LT_TAG_COMPILER])dnl 38957b58d2e0Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38967b58d2e0Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38977b58d2e0Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 389809885543Smrg 38997b58d2e0Smrgm4_if([$1], [CXX], [ 39007b58d2e0Smrg # C++ specific cases for pic, static, wl, etc. 39017b58d2e0Smrg if test "$GXX" = yes; then 39027b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39037b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 390409885543Smrg 3905e4f6584cSmrg case $host_os in 39067b58d2e0Smrg aix*) 39077b58d2e0Smrg # All AIX code is PIC. 39087b58d2e0Smrg if test "$host_cpu" = ia64; then 39097b58d2e0Smrg # AIX 5 now supports IA64 processor 39107b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3911e4f6584cSmrg fi 3912e4f6584cSmrg ;; 391309885543Smrg 39147b58d2e0Smrg amigaos*) 39157b58d2e0Smrg case $host_cpu in 39167b58d2e0Smrg powerpc) 39177b58d2e0Smrg # see comment about AmigaOS4 .so support 39187b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39197b58d2e0Smrg ;; 39207b58d2e0Smrg m68k) 39217b58d2e0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39227b58d2e0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39237b58d2e0Smrg # like `-m68040'. 39247b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39257b58d2e0Smrg ;; 39267b58d2e0Smrg esac 39277b58d2e0Smrg ;; 392809885543Smrg 39297b58d2e0Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39307b58d2e0Smrg # PIC is the default for these OSes. 3931e4f6584cSmrg ;; 39327b58d2e0Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39337b58d2e0Smrg # This hack is so that the source file can tell whether it is being 39347b58d2e0Smrg # built for inclusion in a dll (and should export symbols for example). 39357b58d2e0Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39367b58d2e0Smrg # (--disable-auto-import) libraries 39377b58d2e0Smrg m4_if([$1], [GCJ], [], 39387b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39397b58d2e0Smrg ;; 39407b58d2e0Smrg darwin* | rhapsody*) 39417b58d2e0Smrg # PIC is the default on this platform 39427b58d2e0Smrg # Common symbols not allowed in MH_DYLIB files 39437b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39447b58d2e0Smrg ;; 39457b58d2e0Smrg *djgpp*) 39467b58d2e0Smrg # DJGPP does not support shared libraries at all 39477b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39487b58d2e0Smrg ;; 3949b12e5c03Smrg haiku*) 3950b12e5c03Smrg # PIC is the default for Haiku. 3951b12e5c03Smrg # The "-static" flag exists, but is broken. 3952b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3953b12e5c03Smrg ;; 39547b58d2e0Smrg interix[[3-9]]*) 39557b58d2e0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39567b58d2e0Smrg # Instead, we relocate shared libraries at runtime. 39577b58d2e0Smrg ;; 39587b58d2e0Smrg sysv4*MP*) 39597b58d2e0Smrg if test -d /usr/nec; then 39607b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3961e4f6584cSmrg fi 3962e4f6584cSmrg ;; 39637b58d2e0Smrg hpux*) 39647b58d2e0Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39657b58d2e0Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39667b58d2e0Smrg # sets the default TLS model and affects inlining. 39677b58d2e0Smrg case $host_cpu in 39687b58d2e0Smrg hppa*64*) 39697b58d2e0Smrg ;; 39707b58d2e0Smrg *) 39717b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39727b58d2e0Smrg ;; 39737b58d2e0Smrg esac 39747b58d2e0Smrg ;; 39757b58d2e0Smrg *qnx* | *nto*) 39767b58d2e0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39777b58d2e0Smrg # it will coredump. 39787b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39797b58d2e0Smrg ;; 39807b58d2e0Smrg *) 39817b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3982e4f6584cSmrg ;; 3983e4f6584cSmrg esac 3984e4f6584cSmrg else 3985e4f6584cSmrg case $host_os in 39867b58d2e0Smrg aix[[4-9]]*) 39877b58d2e0Smrg # All AIX code is PIC. 39887b58d2e0Smrg if test "$host_cpu" = ia64; then 39897b58d2e0Smrg # AIX 5 now supports IA64 processor 39907b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3991e4f6584cSmrg else 39927b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39937b58d2e0Smrg fi 3994e4f6584cSmrg ;; 39957b58d2e0Smrg chorus*) 39967b58d2e0Smrg case $cc_basename in 39977b58d2e0Smrg cxch68*) 39987b58d2e0Smrg # Green Hills C++ Compiler 39997b58d2e0Smrg # _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" 40007b58d2e0Smrg ;; 40017b58d2e0Smrg esac 4002e4f6584cSmrg ;; 4003b12e5c03Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4004b12e5c03Smrg # This hack is so that the source file can tell whether it is being 4005b12e5c03Smrg # built for inclusion in a dll (and should export symbols for example). 4006b12e5c03Smrg m4_if([$1], [GCJ], [], 4007b12e5c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4008b12e5c03Smrg ;; 40097b58d2e0Smrg dgux*) 40107b58d2e0Smrg case $cc_basename in 40117b58d2e0Smrg ec++*) 40127b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40137b58d2e0Smrg ;; 40147b58d2e0Smrg ghcx*) 40157b58d2e0Smrg # Green Hills C++ Compiler 40167b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40177b58d2e0Smrg ;; 40187b58d2e0Smrg *) 40197b58d2e0Smrg ;; 40207b58d2e0Smrg esac 4021e4f6584cSmrg ;; 40227b58d2e0Smrg freebsd* | dragonfly*) 40237b58d2e0Smrg # FreeBSD uses GNU C++ 40247b58d2e0Smrg ;; 40257b58d2e0Smrg hpux9* | hpux10* | hpux11*) 40267b58d2e0Smrg case $cc_basename in 40277b58d2e0Smrg CC*) 40287b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40297b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40307b58d2e0Smrg if test "$host_cpu" != ia64; then 40317b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40327b58d2e0Smrg fi 40337b58d2e0Smrg ;; 40347b58d2e0Smrg aCC*) 40357b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40367b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40377b58d2e0Smrg case $host_cpu in 40387b58d2e0Smrg hppa*64*|ia64*) 40397b58d2e0Smrg # +Z the default 40407b58d2e0Smrg ;; 40417b58d2e0Smrg *) 40427b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40437b58d2e0Smrg ;; 40447b58d2e0Smrg esac 40457b58d2e0Smrg ;; 40467b58d2e0Smrg *) 40477b58d2e0Smrg ;; 40487b58d2e0Smrg esac 40497b58d2e0Smrg ;; 40507b58d2e0Smrg interix*) 40517b58d2e0Smrg # This is c89, which is MS Visual C++ (no shared libs) 40527b58d2e0Smrg # Anyone wants to do a port? 40537b58d2e0Smrg ;; 40547b58d2e0Smrg irix5* | irix6* | nonstopux*) 40557b58d2e0Smrg case $cc_basename in 40567b58d2e0Smrg CC*) 40577b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40587b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40597b58d2e0Smrg # CC pic flag -KPIC is the default. 40607b58d2e0Smrg ;; 40617b58d2e0Smrg *) 40627b58d2e0Smrg ;; 40637b58d2e0Smrg esac 40647b58d2e0Smrg ;; 4065df9ffc95Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 40667b58d2e0Smrg case $cc_basename in 40677b58d2e0Smrg KCC*) 40687b58d2e0Smrg # KAI C++ Compiler 40697b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40707b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40717b58d2e0Smrg ;; 40727b58d2e0Smrg ecpc* ) 40737b58d2e0Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40747b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40757b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40767b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40777b58d2e0Smrg ;; 40787b58d2e0Smrg icpc* ) 40797b58d2e0Smrg # Intel C++, used to be incompatible with GCC. 40807b58d2e0Smrg # ICC 10 doesn't accept -KPIC any more. 40817b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40827b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40837b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40847b58d2e0Smrg ;; 40857b58d2e0Smrg pgCC* | pgcpp*) 40867b58d2e0Smrg # Portland Group C++ compiler 40877b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40887b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40897b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40907b58d2e0Smrg ;; 40917b58d2e0Smrg cxx*) 40927b58d2e0Smrg # Compaq C++ 40937b58d2e0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40947b58d2e0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40957b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40967b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40977b58d2e0Smrg ;; 4098b12e5c03Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4099b12e5c03Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 41007b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41017b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 41027b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 41037b58d2e0Smrg ;; 41047b58d2e0Smrg *) 41057b58d2e0Smrg case `$CC -V 2>&1 | sed 5q` in 41067b58d2e0Smrg *Sun\ C*) 41077b58d2e0Smrg # Sun C++ 5.9 41087b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41097b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41107b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41117b58d2e0Smrg ;; 41127b58d2e0Smrg esac 41137b58d2e0Smrg ;; 41147b58d2e0Smrg esac 41157b58d2e0Smrg ;; 41167b58d2e0Smrg lynxos*) 41177b58d2e0Smrg ;; 41187b58d2e0Smrg m88k*) 41197b58d2e0Smrg ;; 41207b58d2e0Smrg mvs*) 41217b58d2e0Smrg case $cc_basename in 41227b58d2e0Smrg cxx*) 41237b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41247b58d2e0Smrg ;; 41257b58d2e0Smrg *) 41267b58d2e0Smrg ;; 41277b58d2e0Smrg esac 41287b58d2e0Smrg ;; 4129df9ffc95Smrg netbsd* | netbsdelf*-gnu) 41307b58d2e0Smrg ;; 41317b58d2e0Smrg *qnx* | *nto*) 41327b58d2e0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41337b58d2e0Smrg # it will coredump. 41347b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41357b58d2e0Smrg ;; 41367b58d2e0Smrg osf3* | osf4* | osf5*) 41377b58d2e0Smrg case $cc_basename in 41387b58d2e0Smrg KCC*) 41397b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41407b58d2e0Smrg ;; 41417b58d2e0Smrg RCC*) 41427b58d2e0Smrg # Rational C++ 2.4.1 41437b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41447b58d2e0Smrg ;; 41457b58d2e0Smrg cxx*) 41467b58d2e0Smrg # Digital/Compaq C++ 41477b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41487b58d2e0Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41497b58d2e0Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41507b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41517b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41527b58d2e0Smrg ;; 41537b58d2e0Smrg *) 41547b58d2e0Smrg ;; 41557b58d2e0Smrg esac 41567b58d2e0Smrg ;; 41577b58d2e0Smrg psos*) 41587b58d2e0Smrg ;; 41597b58d2e0Smrg solaris*) 41607b58d2e0Smrg case $cc_basename in 4161b12e5c03Smrg CC* | sunCC*) 41627b58d2e0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41637b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41647b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41657b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41667b58d2e0Smrg ;; 41677b58d2e0Smrg gcx*) 41687b58d2e0Smrg # Green Hills C++ Compiler 41697b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41707b58d2e0Smrg ;; 41717b58d2e0Smrg *) 41727b58d2e0Smrg ;; 41737b58d2e0Smrg esac 41747b58d2e0Smrg ;; 41757b58d2e0Smrg sunos4*) 41767b58d2e0Smrg case $cc_basename in 41777b58d2e0Smrg CC*) 41787b58d2e0Smrg # Sun C++ 4.x 41797b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41807b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41817b58d2e0Smrg ;; 41827b58d2e0Smrg lcc*) 41837b58d2e0Smrg # Lucid 41847b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41857b58d2e0Smrg ;; 41867b58d2e0Smrg *) 41877b58d2e0Smrg ;; 41887b58d2e0Smrg esac 41897b58d2e0Smrg ;; 41907b58d2e0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41917b58d2e0Smrg case $cc_basename in 41927b58d2e0Smrg CC*) 41937b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41947b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41957b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41967b58d2e0Smrg ;; 41977b58d2e0Smrg esac 41987b58d2e0Smrg ;; 41997b58d2e0Smrg tandem*) 42007b58d2e0Smrg case $cc_basename in 42017b58d2e0Smrg NCC*) 42027b58d2e0Smrg # NonStop-UX NCC 3.20 42037b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 42047b58d2e0Smrg ;; 42057b58d2e0Smrg *) 42067b58d2e0Smrg ;; 42077b58d2e0Smrg esac 42087b58d2e0Smrg ;; 42097b58d2e0Smrg vxworks*) 42107b58d2e0Smrg ;; 42117b58d2e0Smrg *) 42127b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42137b58d2e0Smrg ;; 42147b58d2e0Smrg esac 42157b58d2e0Smrg fi 42167b58d2e0Smrg], 42177b58d2e0Smrg[ 42187b58d2e0Smrg if test "$GCC" = yes; then 42197b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42207b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 422109885543Smrg 42227b58d2e0Smrg case $host_os in 42237b58d2e0Smrg aix*) 42247b58d2e0Smrg # All AIX code is PIC. 42257b58d2e0Smrg if test "$host_cpu" = ia64; then 42267b58d2e0Smrg # AIX 5 now supports IA64 processor 42277b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42287b58d2e0Smrg fi 42297b58d2e0Smrg ;; 423009885543Smrg 42317b58d2e0Smrg amigaos*) 42327b58d2e0Smrg case $host_cpu in 42337b58d2e0Smrg powerpc) 42347b58d2e0Smrg # see comment about AmigaOS4 .so support 42357b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42367b58d2e0Smrg ;; 42377b58d2e0Smrg m68k) 42387b58d2e0Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42397b58d2e0Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42407b58d2e0Smrg # like `-m68040'. 42417b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42427b58d2e0Smrg ;; 42437b58d2e0Smrg esac 42447b58d2e0Smrg ;; 424509885543Smrg 42467b58d2e0Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42477b58d2e0Smrg # PIC is the default for these OSes. 42487b58d2e0Smrg ;; 424909885543Smrg 42507b58d2e0Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42517b58d2e0Smrg # This hack is so that the source file can tell whether it is being 42527b58d2e0Smrg # built for inclusion in a dll (and should export symbols for example). 42537b58d2e0Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42547b58d2e0Smrg # (--disable-auto-import) libraries 42557b58d2e0Smrg m4_if([$1], [GCJ], [], 42567b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42577b58d2e0Smrg ;; 4258e4f6584cSmrg 42597b58d2e0Smrg darwin* | rhapsody*) 42607b58d2e0Smrg # PIC is the default on this platform 42617b58d2e0Smrg # Common symbols not allowed in MH_DYLIB files 42627b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42637b58d2e0Smrg ;; 4264e4f6584cSmrg 4265b12e5c03Smrg haiku*) 4266b12e5c03Smrg # PIC is the default for Haiku. 4267b12e5c03Smrg # The "-static" flag exists, but is broken. 4268b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4269b12e5c03Smrg ;; 4270b12e5c03Smrg 42717b58d2e0Smrg hpux*) 42727b58d2e0Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42737b58d2e0Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42747b58d2e0Smrg # sets the default TLS model and affects inlining. 42757b58d2e0Smrg case $host_cpu in 42767b58d2e0Smrg hppa*64*) 42777b58d2e0Smrg # +Z the default 42787b58d2e0Smrg ;; 42797b58d2e0Smrg *) 42807b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42817b58d2e0Smrg ;; 42827b58d2e0Smrg esac 42837b58d2e0Smrg ;; 428409885543Smrg 42857b58d2e0Smrg interix[[3-9]]*) 42867b58d2e0Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42877b58d2e0Smrg # Instead, we relocate shared libraries at runtime. 42887b58d2e0Smrg ;; 428909885543Smrg 42907b58d2e0Smrg msdosdjgpp*) 42917b58d2e0Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42927b58d2e0Smrg # on systems that don't support them. 42937b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42947b58d2e0Smrg enable_shared=no 42957b58d2e0Smrg ;; 429609885543Smrg 42977b58d2e0Smrg *nto* | *qnx*) 42987b58d2e0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42997b58d2e0Smrg # it will coredump. 43007b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43017b58d2e0Smrg ;; 430209885543Smrg 43037b58d2e0Smrg sysv4*MP*) 43047b58d2e0Smrg if test -d /usr/nec; then 43057b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43067b58d2e0Smrg fi 43077b58d2e0Smrg ;; 430809885543Smrg 43097b58d2e0Smrg *) 43107b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43117b58d2e0Smrg ;; 43127b58d2e0Smrg esac 4313b12e5c03Smrg 4314b12e5c03Smrg case $cc_basename in 4315b12e5c03Smrg nvcc*) # Cuda Compiler Driver 2.2 4316b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4317b12e5c03Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4318b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4319b12e5c03Smrg fi 4320b12e5c03Smrg ;; 4321b12e5c03Smrg esac 4322e4f6584cSmrg else 43237b58d2e0Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43247b58d2e0Smrg case $host_os in 43257b58d2e0Smrg aix*) 43267b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43277b58d2e0Smrg if test "$host_cpu" = ia64; then 43287b58d2e0Smrg # AIX 5 now supports IA64 processor 43297b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43307b58d2e0Smrg else 43317b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43327b58d2e0Smrg fi 43337b58d2e0Smrg ;; 433409885543Smrg 43357b58d2e0Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43367b58d2e0Smrg # This hack is so that the source file can tell whether it is being 43377b58d2e0Smrg # built for inclusion in a dll (and should export symbols for example). 43387b58d2e0Smrg m4_if([$1], [GCJ], [], 43397b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4340e4f6584cSmrg ;; 43417b58d2e0Smrg 43427b58d2e0Smrg hpux9* | hpux10* | hpux11*) 43437b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43447b58d2e0Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43457b58d2e0Smrg # not for PA HP-UX. 43467b58d2e0Smrg case $host_cpu in 43477b58d2e0Smrg hppa*64*|ia64*) 43487b58d2e0Smrg # +Z the default 4349e4f6584cSmrg ;; 4350e4f6584cSmrg *) 43517b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4352e4f6584cSmrg ;; 4353e4f6584cSmrg esac 43547b58d2e0Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43557b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43567b58d2e0Smrg ;; 435709885543Smrg 43587b58d2e0Smrg irix5* | irix6* | nonstopux*) 43597b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43607b58d2e0Smrg # PIC (with -KPIC) is the default. 43617b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43627b58d2e0Smrg ;; 436309885543Smrg 4364df9ffc95Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43657b58d2e0Smrg case $cc_basename in 43667b58d2e0Smrg # old Intel for x86_64 which still supported -KPIC. 43677b58d2e0Smrg ecc*) 43687b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43697b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43707b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43717b58d2e0Smrg ;; 43727b58d2e0Smrg # icc used to be incompatible with GCC. 43737b58d2e0Smrg # ICC 10 doesn't accept -KPIC any more. 43747b58d2e0Smrg icc* | ifort*) 43757b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43767b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43777b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43787b58d2e0Smrg ;; 43797b58d2e0Smrg # Lahey Fortran 8.1. 43807b58d2e0Smrg lf95*) 43817b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43827b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43837b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43847b58d2e0Smrg ;; 4385b12e5c03Smrg nagfor*) 4386b12e5c03Smrg # NAG Fortran compiler 4387b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4388b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4389b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390b12e5c03Smrg ;; 4391b12e5c03Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43927b58d2e0Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43937b58d2e0Smrg # which looks to be a dead project) 43947b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43957b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43967b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43977b58d2e0Smrg ;; 43987b58d2e0Smrg ccc*) 43997b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44007b58d2e0Smrg # All Alpha code is PIC. 44017b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44027b58d2e0Smrg ;; 4403b12e5c03Smrg xl* | bgxl* | bgf* | mpixl*) 4404b12e5c03Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 44057b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44067b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44077b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44087b58d2e0Smrg ;; 44097b58d2e0Smrg *) 44107b58d2e0Smrg case `$CC -V 2>&1 | sed 5q` in 4411b12e5c03Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4412b12e5c03Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4413b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4416b12e5c03Smrg ;; 4417b12e5c03Smrg *Sun\ F* | *Sun*Fortran*) 4418b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4419b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4420b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4421b12e5c03Smrg ;; 44227b58d2e0Smrg *Sun\ C*) 44237b58d2e0Smrg # Sun C 5.9 44247b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44257b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44267b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44277b58d2e0Smrg ;; 4428b12e5c03Smrg *Intel*\ [[CF]]*Compiler*) 4429b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4430b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4431b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4432b12e5c03Smrg ;; 4433b12e5c03Smrg *Portland\ Group*) 4434b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4435b12e5c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44367b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44377b58d2e0Smrg ;; 44387b58d2e0Smrg esac 44397b58d2e0Smrg ;; 44407b58d2e0Smrg esac 44417b58d2e0Smrg ;; 444209885543Smrg 44437b58d2e0Smrg newsos6) 44447b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44457b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44467b58d2e0Smrg ;; 444709885543Smrg 44487b58d2e0Smrg *nto* | *qnx*) 44497b58d2e0Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44507b58d2e0Smrg # it will coredump. 44517b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44527b58d2e0Smrg ;; 445309885543Smrg 44547b58d2e0Smrg osf3* | osf4* | osf5*) 44557b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44567b58d2e0Smrg # All OSF/1 code is PIC. 44577b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44587b58d2e0Smrg ;; 445909885543Smrg 44607b58d2e0Smrg rdos*) 44617b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44627b58d2e0Smrg ;; 446309885543Smrg 44647b58d2e0Smrg solaris*) 44657b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44667b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44677b58d2e0Smrg case $cc_basename in 4468b12e5c03Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44697b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44707b58d2e0Smrg *) 44717b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44727b58d2e0Smrg esac 44737b58d2e0Smrg ;; 447409885543Smrg 44757b58d2e0Smrg sunos4*) 44767b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44777b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44787b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44797b58d2e0Smrg ;; 448009885543Smrg 44817b58d2e0Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44827b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44837b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44847b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44857b58d2e0Smrg ;; 448609885543Smrg 44877b58d2e0Smrg sysv4*MP*) 44887b58d2e0Smrg if test -d /usr/nec ;then 44897b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44907b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44917b58d2e0Smrg fi 44927b58d2e0Smrg ;; 449309885543Smrg 44947b58d2e0Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44957b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44967b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44977b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44987b58d2e0Smrg ;; 449909885543Smrg 45007b58d2e0Smrg unicos*) 45017b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45027b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45037b58d2e0Smrg ;; 450409885543Smrg 45057b58d2e0Smrg uts4*) 45067b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45077b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45087b58d2e0Smrg ;; 450909885543Smrg 45107b58d2e0Smrg *) 45117b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4512e4f6584cSmrg ;; 4513e4f6584cSmrg esac 4514e4f6584cSmrg fi 45157b58d2e0Smrg]) 45167b58d2e0Smrgcase $host_os in 45177b58d2e0Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45187b58d2e0Smrg *djgpp*) 45197b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4520e4f6584cSmrg ;; 4521e4f6584cSmrg *) 45227b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4523e4f6584cSmrg ;; 45247b58d2e0Smrgesac 4525b12e5c03Smrg 4526b12e5c03SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4527b12e5c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4528b12e5c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4529b12e5c03Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 453009885543Smrg 45317b58d2e0Smrg# 45327b58d2e0Smrg# Check to make sure the PIC flag actually works. 45337b58d2e0Smrg# 45347b58d2e0Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45357b58d2e0Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45367b58d2e0Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45377b58d2e0Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45387b58d2e0Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45397b58d2e0Smrg "" | " "*) ;; 45407b58d2e0Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45417b58d2e0Smrg esac], 45427b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45437b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45447b58d2e0Smrgfi 45457b58d2e0Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45467b58d2e0Smrg [Additional compiler flags for building library objects]) 454709885543Smrg 4548b12e5c03Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4549b12e5c03Smrg [How to pass a linker flag through the compiler]) 45507b58d2e0Smrg# 45517b58d2e0Smrg# Check to make sure the static flag actually works. 45527b58d2e0Smrg# 45537b58d2e0Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45547b58d2e0Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45557b58d2e0Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45567b58d2e0Smrg $lt_tmp_static_flag, 45577b58d2e0Smrg [], 45587b58d2e0Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45597b58d2e0Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45607b58d2e0Smrg [Compiler flag to prevent dynamic linking]) 45617b58d2e0Smrg])# _LT_COMPILER_PIC 456209885543Smrg 45632ec8c4b4Smrg 45647b58d2e0Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45657b58d2e0Smrg# ---------------------------- 45667b58d2e0Smrg# See if the linker supports building shared libraries. 45677b58d2e0Smrgm4_defun([_LT_LINKER_SHLIBS], 45687b58d2e0Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45697b58d2e0SmrgAC_REQUIRE([LT_PATH_NM])dnl 4570b12e5c03Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45717b58d2e0Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45727b58d2e0Smrgm4_require([_LT_DECL_EGREP])dnl 45737b58d2e0Smrgm4_require([_LT_DECL_SED])dnl 45747b58d2e0Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45757b58d2e0Smrgm4_require([_LT_TAG_COMPILER])dnl 45767b58d2e0SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45777b58d2e0Smrgm4_if([$1], [CXX], [ 45787b58d2e0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4579b12e5c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45807b58d2e0Smrg case $host_os in 45817b58d2e0Smrg aix[[4-9]]*) 45827b58d2e0Smrg # If we're using GNU nm, then we don't want the "-C" option. 45837b58d2e0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4584b12e5c03Smrg # Also, AIX nm treats weak defined symbols like other global defined 4585b12e5c03Smrg # symbols, whereas GNU nm marks them as "W". 45867b58d2e0Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4587b12e5c03Smrg _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' 45887b58d2e0Smrg else 45897b58d2e0Smrg _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' 45907b58d2e0Smrg fi 45917b58d2e0Smrg ;; 45927b58d2e0Smrg pw32*) 45937b58d2e0Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4594b12e5c03Smrg ;; 45957b58d2e0Smrg cygwin* | mingw* | cegcc*) 4596b12e5c03Smrg case $cc_basename in 4597b12e5c03Smrg cl*) 4598b12e5c03Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4599b12e5c03Smrg ;; 4600b12e5c03Smrg *) 4601b12e5c03Smrg _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' 4602b12e5c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4603b12e5c03Smrg ;; 4604b12e5c03Smrg esac 4605b12e5c03Smrg ;; 4606df9ffc95Smrg linux* | k*bsd*-gnu | gnu*) 4607df9ffc95Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4608df9ffc95Smrg ;; 46097b58d2e0Smrg *) 46107b58d2e0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4611b12e5c03Smrg ;; 46127b58d2e0Smrg esac 46137b58d2e0Smrg], [ 46147b58d2e0Smrg runpath_var= 46157b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46167b58d2e0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46177b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)= 46187b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46197b58d2e0Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46207b58d2e0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46217b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46227b58d2e0Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46237b58d2e0Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46247b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46257b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46267b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46277b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46287b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46297b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46307b58d2e0Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46317b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46327b58d2e0Smrg _LT_TAGVAR(module_cmds, $1)= 46337b58d2e0Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46347b58d2e0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46357b58d2e0Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46367b58d2e0Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46377b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46387b58d2e0Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46397b58d2e0Smrg # included in the symbol list 46407b58d2e0Smrg _LT_TAGVAR(include_expsyms, $1)= 46417b58d2e0Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46427b58d2e0Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46437b58d2e0Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46447b58d2e0Smrg # as well as any symbol that contains `d'. 46457b58d2e0Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46467b58d2e0Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46477b58d2e0Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46487b58d2e0Smrg # the symbol is explicitly referenced. Since portable code cannot 46497b58d2e0Smrg # rely on this symbol name, it's probably fine to never include it in 46507b58d2e0Smrg # preloaded symbol tables. 46517b58d2e0Smrg # Exclude shared library initialization/finalization symbols. 46527b58d2e0Smrgdnl Note also adjust exclude_expsyms for C++ above. 46537b58d2e0Smrg extract_expsyms_cmds= 46542ec8c4b4Smrg 46557b58d2e0Smrg case $host_os in 46567b58d2e0Smrg cygwin* | mingw* | pw32* | cegcc*) 46577b58d2e0Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46587b58d2e0Smrg # When not using gcc, we currently assume that we are using 46597b58d2e0Smrg # Microsoft Visual C++. 46607b58d2e0Smrg if test "$GCC" != yes; then 46617b58d2e0Smrg with_gnu_ld=no 46627b58d2e0Smrg fi 4663e4f6584cSmrg ;; 46647b58d2e0Smrg interix*) 46657b58d2e0Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46667b58d2e0Smrg with_gnu_ld=yes 4667e4f6584cSmrg ;; 46687b58d2e0Smrg openbsd*) 46697b58d2e0Smrg with_gnu_ld=no 4670e4f6584cSmrg ;; 4671df9ffc95Smrg linux* | k*bsd*-gnu | gnu*) 4672df9ffc95Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4673df9ffc95Smrg ;; 4674b698ba48Smrg esac 46752ec8c4b4Smrg 46767b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4677b12e5c03Smrg 4678b12e5c03Smrg # On some targets, GNU ld is compatible enough with the native linker 4679b12e5c03Smrg # that we're better off using the native interface for both. 4680b12e5c03Smrg lt_use_gnu_ld_interface=no 46817b58d2e0Smrg if test "$with_gnu_ld" = yes; then 4682b12e5c03Smrg case $host_os in 4683b12e5c03Smrg aix*) 4684b12e5c03Smrg # The AIX port of GNU ld has always aspired to compatibility 4685b12e5c03Smrg # with the native linker. However, as the warning in the GNU ld 4686b12e5c03Smrg # block says, versions before 2.19.5* couldn't really create working 4687b12e5c03Smrg # shared libraries, regardless of the interface used. 4688b12e5c03Smrg case `$LD -v 2>&1` in 4689b12e5c03Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4690b12e5c03Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4691b12e5c03Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4692b12e5c03Smrg *) 4693b12e5c03Smrg lt_use_gnu_ld_interface=yes 4694b12e5c03Smrg ;; 4695b12e5c03Smrg esac 4696b12e5c03Smrg ;; 4697b12e5c03Smrg *) 4698b12e5c03Smrg lt_use_gnu_ld_interface=yes 4699b12e5c03Smrg ;; 4700b12e5c03Smrg esac 4701b12e5c03Smrg fi 4702b12e5c03Smrg 4703b12e5c03Smrg if test "$lt_use_gnu_ld_interface" = yes; then 47047b58d2e0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 47057b58d2e0Smrg wlarc='${wl}' 4706e4f6584cSmrg 47077b58d2e0Smrg # Set some defaults for GNU ld with shared library support. These 47087b58d2e0Smrg # are reset later if shared libraries are not supported. Putting them 47097b58d2e0Smrg # here allows them to be overridden if necessary. 47107b58d2e0Smrg runpath_var=LD_RUN_PATH 47117b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47127b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47137b58d2e0Smrg # ancient GNU ld didn't support --whole-archive et. al. 47147b58d2e0Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47157b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47167b58d2e0Smrg else 47177b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47187b58d2e0Smrg fi 47197b58d2e0Smrg supports_anon_versioning=no 47207b58d2e0Smrg case `$LD -v 2>&1` in 47217b58d2e0Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47227b58d2e0Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47237b58d2e0Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47247b58d2e0Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47257b58d2e0Smrg *\ 2.11.*) ;; # other 2.11 versions 47267b58d2e0Smrg *) supports_anon_versioning=yes ;; 47277b58d2e0Smrg esac 4728e4f6584cSmrg 47297b58d2e0Smrg # See if GNU ld supports shared libraries. 47307b58d2e0Smrg case $host_os in 47317b58d2e0Smrg aix[[3-9]]*) 47327b58d2e0Smrg # On AIX/PPC, the GNU linker is very broken 47337b58d2e0Smrg if test "$host_cpu" != ia64; then 47347b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47357b58d2e0Smrg cat <<_LT_EOF 1>&2 4736e4f6584cSmrg 4737b12e5c03Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47387b58d2e0Smrg*** to be unable to reliably create shared libraries on AIX. 47397b58d2e0Smrg*** Therefore, libtool is disabling shared libraries support. If you 4740b12e5c03Smrg*** really care for shared libraries, you may want to install binutils 4741b12e5c03Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4742b12e5c03Smrg*** You will then need to restart the configuration process. 474309885543Smrg 47447b58d2e0Smrg_LT_EOF 47457b58d2e0Smrg fi 47467b58d2e0Smrg ;; 474709885543Smrg 47487b58d2e0Smrg amigaos*) 47497b58d2e0Smrg case $host_cpu in 47507b58d2e0Smrg powerpc) 47517b58d2e0Smrg # see comment about AmigaOS4 .so support 47527b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47537b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47547b58d2e0Smrg ;; 47557b58d2e0Smrg m68k) 47567b58d2e0Smrg _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)' 47577b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47587b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47597b58d2e0Smrg ;; 47607b58d2e0Smrg esac 47617b58d2e0Smrg ;; 47622ec8c4b4Smrg 47637b58d2e0Smrg beos*) 47647b58d2e0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47657b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47667b58d2e0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47677b58d2e0Smrg # support --undefined. This deserves some investigation. FIXME 47687b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47697b58d2e0Smrg else 47707b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47717b58d2e0Smrg fi 47727b58d2e0Smrg ;; 4773e4f6584cSmrg 47747b58d2e0Smrg cygwin* | mingw* | pw32* | cegcc*) 47757b58d2e0Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47767b58d2e0Smrg # as there is no search path for DLLs. 47777b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4778b12e5c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47797b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47807b58d2e0Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47817b58d2e0Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4782b12e5c03Smrg _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' 4783b12e5c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4784e4f6584cSmrg 47857b58d2e0Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47867b58d2e0Smrg _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' 47877b58d2e0Smrg # If the export-symbols file already is a .def file (1st line 47887b58d2e0Smrg # is EXPORTS), use it as is; otherwise, prepend... 47897b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47907b58d2e0Smrg cp $export_symbols $output_objdir/$soname.def; 47917b58d2e0Smrg else 47927b58d2e0Smrg echo EXPORTS > $output_objdir/$soname.def; 47937b58d2e0Smrg cat $export_symbols >> $output_objdir/$soname.def; 47947b58d2e0Smrg fi~ 47957b58d2e0Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47967b58d2e0Smrg else 47977b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47987b58d2e0Smrg fi 47997b58d2e0Smrg ;; 4800e4f6584cSmrg 4801b12e5c03Smrg haiku*) 4802b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4803b12e5c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4804b12e5c03Smrg ;; 4805b12e5c03Smrg 48067b58d2e0Smrg interix[[3-9]]*) 48077b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 48087b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48097b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48107b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48117b58d2e0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48127b58d2e0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48137b58d2e0Smrg # default) and relocated if they conflict, which is a slow very memory 48147b58d2e0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 48157b58d2e0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48167b58d2e0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48177b58d2e0Smrg _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' 48187b58d2e0Smrg _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' 48197b58d2e0Smrg ;; 4820e4f6584cSmrg 48217b58d2e0Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48227b58d2e0Smrg tmp_diet=no 48237b58d2e0Smrg if test "$host_os" = linux-dietlibc; then 48247b58d2e0Smrg case $cc_basename in 48257b58d2e0Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48267b58d2e0Smrg esac 48277b58d2e0Smrg fi 48287b58d2e0Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48297b58d2e0Smrg && test "$tmp_diet" = no 48307b58d2e0Smrg then 4831b12e5c03Smrg tmp_addflag=' $pic_flag' 48327b58d2e0Smrg tmp_sharedflag='-shared' 48337b58d2e0Smrg case $cc_basename,$host_cpu in 48347b58d2e0Smrg pgcc*) # Portland Group C compiler 4835b12e5c03Smrg _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' 48367b58d2e0Smrg tmp_addflag=' $pic_flag' 48377b58d2e0Smrg ;; 4838b12e5c03Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4839b12e5c03Smrg # Portland Group f77 and f90 compilers 4840b12e5c03Smrg _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' 48417b58d2e0Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48427b58d2e0Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48437b58d2e0Smrg tmp_addflag=' -i_dynamic' ;; 48447b58d2e0Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48457b58d2e0Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48467b58d2e0Smrg ifc* | ifort*) # Intel Fortran compiler 48477b58d2e0Smrg tmp_addflag=' -nofor_main' ;; 48487b58d2e0Smrg lf95*) # Lahey Fortran 8.1 48497b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48507b58d2e0Smrg tmp_sharedflag='--shared' ;; 4851b12e5c03Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48527b58d2e0Smrg tmp_sharedflag='-qmkshrobj' 48537b58d2e0Smrg tmp_addflag= ;; 4854b12e5c03Smrg nvcc*) # Cuda Compiler Driver 2.2 4855b12e5c03Smrg _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' 4856b12e5c03Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4857b12e5c03Smrg ;; 48587b58d2e0Smrg esac 48597b58d2e0Smrg case `$CC -V 2>&1 | sed 5q` in 48607b58d2e0Smrg *Sun\ C*) # Sun C 5.9 4861b12e5c03Smrg _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' 48627b58d2e0Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48637b58d2e0Smrg tmp_sharedflag='-G' ;; 48647b58d2e0Smrg *Sun\ F*) # Sun Fortran 8.3 48657b58d2e0Smrg tmp_sharedflag='-G' ;; 48667b58d2e0Smrg esac 48677b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48682ec8c4b4Smrg 48697b58d2e0Smrg if test "x$supports_anon_versioning" = xyes; then 48707b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48717b58d2e0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48727b58d2e0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48737b58d2e0Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48747b58d2e0Smrg fi 48752ec8c4b4Smrg 48767b58d2e0Smrg case $cc_basename in 4877b12e5c03Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48787b58d2e0Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48797b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4880b12e5c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4881b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48827b58d2e0Smrg if test "x$supports_anon_versioning" = xyes; then 48837b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48847b58d2e0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48857b58d2e0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4886b12e5c03Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48877b58d2e0Smrg fi 48887b58d2e0Smrg ;; 48897b58d2e0Smrg esac 48907b58d2e0Smrg else 48917b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48927b58d2e0Smrg fi 48937b58d2e0Smrg ;; 48942ec8c4b4Smrg 4895df9ffc95Smrg netbsd* | netbsdelf*-gnu) 48967b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48977b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48987b58d2e0Smrg wlarc= 48997b58d2e0Smrg else 4900b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4901b12e5c03Smrg _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' 49027b58d2e0Smrg fi 49037b58d2e0Smrg ;; 49042ec8c4b4Smrg 49057b58d2e0Smrg solaris*) 49067b58d2e0Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 49077b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49087b58d2e0Smrg cat <<_LT_EOF 1>&2 49092ec8c4b4Smrg 49107b58d2e0Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49117b58d2e0Smrg*** create shared libraries on Solaris systems. Therefore, libtool 49127b58d2e0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49137b58d2e0Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 49147b58d2e0Smrg*** your PATH or compiler configuration so that the native linker is 49157b58d2e0Smrg*** used, and then restart. 49162ec8c4b4Smrg 49177b58d2e0Smrg_LT_EOF 49187b58d2e0Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4919b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4920b12e5c03Smrg _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' 49217b58d2e0Smrg else 49227b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49237b58d2e0Smrg fi 49247b58d2e0Smrg ;; 4925e4f6584cSmrg 49267b58d2e0Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49277b58d2e0Smrg case `$LD -v 2>&1` in 49287b58d2e0Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49297b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49307b58d2e0Smrg cat <<_LT_EOF 1>&2 4931e4f6584cSmrg 49327b58d2e0Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49337b58d2e0Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49347b58d2e0Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49357b58d2e0Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49367b58d2e0Smrg*** your PATH or compiler configuration so that the native linker is 49377b58d2e0Smrg*** used, and then restart. 4938e4f6584cSmrg 49397b58d2e0Smrg_LT_EOF 49407b58d2e0Smrg ;; 49417b58d2e0Smrg *) 49427b58d2e0Smrg # For security reasons, it is highly recommended that you always 49437b58d2e0Smrg # use absolute paths for naming shared libraries, and exclude the 49447b58d2e0Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49457b58d2e0Smrg # requires that you compile everything twice, which is a pain. 49467b58d2e0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49477b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49487b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49497b58d2e0Smrg _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' 49507b58d2e0Smrg else 49517b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49527b58d2e0Smrg fi 49537b58d2e0Smrg ;; 49547b58d2e0Smrg esac 49557b58d2e0Smrg ;; 49562ec8c4b4Smrg 49577b58d2e0Smrg sunos4*) 49587b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49597b58d2e0Smrg wlarc= 49607b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49617b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49627b58d2e0Smrg ;; 49632ec8c4b4Smrg 49647b58d2e0Smrg *) 49657b58d2e0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4966b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4967b12e5c03Smrg _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' 49687b58d2e0Smrg else 49697b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49707b58d2e0Smrg fi 49717b58d2e0Smrg ;; 49727b58d2e0Smrg esac 49732ec8c4b4Smrg 49747b58d2e0Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49757b58d2e0Smrg runpath_var= 49767b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49777b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49787b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49797b58d2e0Smrg fi 4980e4f6584cSmrg else 49817b58d2e0Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49827b58d2e0Smrg case $host_os in 49837b58d2e0Smrg aix3*) 49847b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49857b58d2e0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49867b58d2e0Smrg _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' 49877b58d2e0Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49887b58d2e0Smrg # are no directories specified by -L. 49897b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49907b58d2e0Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49917b58d2e0Smrg # Neither direct hardcoding nor static linking is supported with a 49927b58d2e0Smrg # broken collect2. 49937b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49947b58d2e0Smrg fi 49957b58d2e0Smrg ;; 49962ec8c4b4Smrg 49977b58d2e0Smrg aix[[4-9]]*) 49987b58d2e0Smrg if test "$host_cpu" = ia64; then 49997b58d2e0Smrg # On IA64, the linker does run time linking by default, so we don't 50007b58d2e0Smrg # have to do anything special. 50017b58d2e0Smrg aix_use_runtimelinking=no 50027b58d2e0Smrg exp_sym_flag='-Bexport' 50037b58d2e0Smrg no_entry_flag="" 50047b58d2e0Smrg else 50057b58d2e0Smrg # If we're using GNU nm, then we don't want the "-C" option. 50067b58d2e0Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5007b12e5c03Smrg # Also, AIX nm treats weak defined symbols like other global 5008b12e5c03Smrg # defined symbols, whereas GNU nm marks them as "W". 50097b58d2e0Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5010b12e5c03Smrg _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' 50117b58d2e0Smrg else 50127b58d2e0Smrg _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' 50137b58d2e0Smrg fi 50147b58d2e0Smrg aix_use_runtimelinking=no 50152ec8c4b4Smrg 50167b58d2e0Smrg # Test if we are trying to use run time linking or normal 50177b58d2e0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50187b58d2e0Smrg # need to do runtime linking. 50197b58d2e0Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50207b58d2e0Smrg for ld_flag in $LDFLAGS; do 50217b58d2e0Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50227b58d2e0Smrg aix_use_runtimelinking=yes 50237b58d2e0Smrg break 50247b58d2e0Smrg fi 50257b58d2e0Smrg done 50267b58d2e0Smrg ;; 50277b58d2e0Smrg esac 502809885543Smrg 50297b58d2e0Smrg exp_sym_flag='-bexport' 50307b58d2e0Smrg no_entry_flag='-bnoentry' 5031b698ba48Smrg fi 50322ec8c4b4Smrg 50337b58d2e0Smrg # When large executables or shared objects are built, AIX ld can 50347b58d2e0Smrg # have problems creating the table of contents. If linking a library 50357b58d2e0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50367b58d2e0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50377b58d2e0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50382ec8c4b4Smrg 50397b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='' 50407b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50417b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50427b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50437b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50447b58d2e0Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50452ec8c4b4Smrg 50467b58d2e0Smrg if test "$GCC" = yes; then 50477b58d2e0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50487b58d2e0Smrg # We only want to do this on AIX 4.2 and lower, the check 50497b58d2e0Smrg # below for broken collect2 doesn't work under 4.3+ 50507b58d2e0Smrg collect2name=`${CC} -print-prog-name=collect2` 50517b58d2e0Smrg if test -f "$collect2name" && 50527b58d2e0Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50537b58d2e0Smrg then 50547b58d2e0Smrg # We have reworked collect2 50557b58d2e0Smrg : 50567b58d2e0Smrg else 50577b58d2e0Smrg # We have old collect2 50587b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50597b58d2e0Smrg # It fails to find uninstalled libraries when the uninstalled 50607b58d2e0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50617b58d2e0Smrg # to unsupported forces relinking 50627b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50637b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50647b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5065b698ba48Smrg fi 50667b58d2e0Smrg ;; 50677b58d2e0Smrg esac 50687b58d2e0Smrg shared_flag='-shared' 50697b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 50707b58d2e0Smrg shared_flag="$shared_flag "'${wl}-G' 50712ec8c4b4Smrg fi 5072df9ffc95Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5073b698ba48Smrg else 50747b58d2e0Smrg # not using gcc 50757b58d2e0Smrg if test "$host_cpu" = ia64; then 50767b58d2e0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50777b58d2e0Smrg # chokes on -Wl,-G. The following line is correct: 50787b58d2e0Smrg shared_flag='-G' 50797b58d2e0Smrg else 50807b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 50817b58d2e0Smrg shared_flag='${wl}-G' 50827b58d2e0Smrg else 50837b58d2e0Smrg shared_flag='${wl}-bM:SRE' 50847b58d2e0Smrg fi 50857b58d2e0Smrg fi 5086b698ba48Smrg fi 508709885543Smrg 50887b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50897b58d2e0Smrg # It seems that -bexpall does not export symbols beginning with 50907b58d2e0Smrg # underscore (_), so it is better to generate a list of symbols to export. 50917b58d2e0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50927b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 50937b58d2e0Smrg # Warning - without using the other runtime loading flags (-brtl), 50947b58d2e0Smrg # -berok will link without error, but may produce a broken library. 50957b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50967b58d2e0Smrg # Determine the default libpath from the value encoded in an 50977b58d2e0Smrg # empty executable. 5098b12e5c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50997b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5100b12e5c03Smrg _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" 51017b58d2e0Smrg else 51027b58d2e0Smrg if test "$host_cpu" = ia64; then 51037b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 51047b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 51057b58d2e0Smrg _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" 51067b58d2e0Smrg else 51077b58d2e0Smrg # Determine the default libpath from the value encoded in an 51087b58d2e0Smrg # empty executable. 5109b12e5c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 51107b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51117b58d2e0Smrg # Warning - without using the other run time loading flags, 51127b58d2e0Smrg # -berok will link without error, but may produce a broken library. 51137b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51147b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5115b12e5c03Smrg if test "$with_gnu_ld" = yes; then 5116b12e5c03Smrg # We only use this code for GNU lds that support --whole-archive. 5117b12e5c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5118b12e5c03Smrg else 5119b12e5c03Smrg # Exported symbols can be pulled into shared objects from archives 5120b12e5c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5121b12e5c03Smrg fi 51227b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51237b58d2e0Smrg # This is similar to how AIX traditionally builds its shared libraries. 51247b58d2e0Smrg _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' 51257b58d2e0Smrg fi 5126b698ba48Smrg fi 5127b698ba48Smrg ;; 5128e4f6584cSmrg 5129b698ba48Smrg amigaos*) 5130e4f6584cSmrg case $host_cpu in 5131e4f6584cSmrg powerpc) 5132e4f6584cSmrg # see comment about AmigaOS4 .so support 51337b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51347b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5135e4f6584cSmrg ;; 5136e4f6584cSmrg m68k) 51377b58d2e0Smrg _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)' 51387b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51397b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5140e4f6584cSmrg ;; 5141e4f6584cSmrg esac 5142b698ba48Smrg ;; 5143e4f6584cSmrg 51447b58d2e0Smrg bsdi[[45]]*) 51457b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5146b698ba48Smrg ;; 51477b58d2e0Smrg 51487b58d2e0Smrg cygwin* | mingw* | pw32* | cegcc*) 51497b58d2e0Smrg # When not using gcc, we currently assume that we are using 51507b58d2e0Smrg # Microsoft Visual C++. 51517b58d2e0Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51527b58d2e0Smrg # no search path for DLLs. 5153b12e5c03Smrg case $cc_basename in 5154b12e5c03Smrg cl*) 5155b12e5c03Smrg # Native MSVC 5156b12e5c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5157b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5158b12e5c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5159b12e5c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5160b12e5c03Smrg # Tell ltmain to make .lib files, not .a files. 5161b12e5c03Smrg libext=lib 5162b12e5c03Smrg # Tell ltmain to make .dll files, not .so files. 5163b12e5c03Smrg shrext_cmds=".dll" 5164b12e5c03Smrg # FIXME: Setting linknames here is a bad hack. 5165b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5166b12e5c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5167b12e5c03Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5168b12e5c03Smrg else 5169b12e5c03Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5170b12e5c03Smrg fi~ 5171b12e5c03Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5172b12e5c03Smrg linknames=' 5173b12e5c03Smrg # The linker will not automatically build a static lib if we build a DLL. 5174b12e5c03Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5175b12e5c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176b12e5c03Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5177b12e5c03Smrg _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' 5178b12e5c03Smrg # Don't use ranlib 5179b12e5c03Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5180b12e5c03Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5181b12e5c03Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5182b12e5c03Smrg case $lt_outputfile in 5183b12e5c03Smrg *.exe|*.EXE) ;; 5184b12e5c03Smrg *) 5185b12e5c03Smrg lt_outputfile="$lt_outputfile.exe" 5186b12e5c03Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5187b12e5c03Smrg ;; 5188b12e5c03Smrg esac~ 5189b12e5c03Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5190b12e5c03Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5191b12e5c03Smrg $RM "$lt_outputfile.manifest"; 5192b12e5c03Smrg fi' 5193b12e5c03Smrg ;; 5194b12e5c03Smrg *) 5195b12e5c03Smrg # Assume MSVC wrapper 5196b12e5c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5197b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5198b12e5c03Smrg # Tell ltmain to make .lib files, not .a files. 5199b12e5c03Smrg libext=lib 5200b12e5c03Smrg # Tell ltmain to make .dll files, not .so files. 5201b12e5c03Smrg shrext_cmds=".dll" 5202b12e5c03Smrg # FIXME: Setting linknames here is a bad hack. 5203b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5204b12e5c03Smrg # The linker will automatically build a .lib file if we build a DLL. 5205b12e5c03Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5206b12e5c03Smrg # FIXME: Should let the user specify the lib program. 5207b12e5c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5208b12e5c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5209b12e5c03Smrg ;; 5210b12e5c03Smrg esac 5211b698ba48Smrg ;; 52127b58d2e0Smrg 5213b698ba48Smrg darwin* | rhapsody*) 52147b58d2e0Smrg _LT_DARWIN_LINKER_FEATURES($1) 5215b698ba48Smrg ;; 52167b58d2e0Smrg 52177b58d2e0Smrg dgux*) 52187b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52197b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52207b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5221b698ba48Smrg ;; 52227b58d2e0Smrg 52237b58d2e0Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52247b58d2e0Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52257b58d2e0Smrg # does not break anything, and helps significantly (at the cost of a little 52267b58d2e0Smrg # extra space). 52277b58d2e0Smrg freebsd2.2*) 52287b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52297b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52307b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52317b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5232b698ba48Smrg ;; 52337b58d2e0Smrg 52347b58d2e0Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5235b12e5c03Smrg freebsd2.*) 52367b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52377b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52387b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52397b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5240e4f6584cSmrg ;; 52417b58d2e0Smrg 52427b58d2e0Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52437b58d2e0Smrg freebsd* | dragonfly*) 5244b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52457b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52467b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52477b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5248b698ba48Smrg ;; 52497b58d2e0Smrg 52507b58d2e0Smrg hpux9*) 52517b58d2e0Smrg if test "$GCC" = yes; then 5252b12e5c03Smrg _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' 52537b58d2e0Smrg else 52547b58d2e0Smrg _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' 52557b58d2e0Smrg fi 52567b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52577b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52587b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52597b58d2e0Smrg 52607b58d2e0Smrg # hardcode_minus_L: Not really in the search PATH, 52617b58d2e0Smrg # but as the default location of the library. 52627b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52637b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52647b58d2e0Smrg ;; 52657b58d2e0Smrg 52667b58d2e0Smrg hpux10*) 5267b12e5c03Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5268b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52697b58d2e0Smrg else 52707b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52717b58d2e0Smrg fi 52727b58d2e0Smrg if test "$with_gnu_ld" = no; then 52737b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52747b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52757b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52767b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52777b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52787b58d2e0Smrg # hardcode_minus_L: Not really in the search PATH, 52797b58d2e0Smrg # but as the default location of the library. 52807b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52817b58d2e0Smrg fi 52827b58d2e0Smrg ;; 52837b58d2e0Smrg 52847b58d2e0Smrg hpux11*) 5285b12e5c03Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52867b58d2e0Smrg case $host_cpu in 52877b58d2e0Smrg hppa*64*) 52887b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52897b58d2e0Smrg ;; 52907b58d2e0Smrg ia64*) 5291b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52927b58d2e0Smrg ;; 52937b58d2e0Smrg *) 5294b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5295b698ba48Smrg ;; 5296b698ba48Smrg esac 52977b58d2e0Smrg else 52987b58d2e0Smrg case $host_cpu in 52997b58d2e0Smrg hppa*64*) 53007b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 53017b58d2e0Smrg ;; 53027b58d2e0Smrg ia64*) 53037b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 53047b58d2e0Smrg ;; 53057b58d2e0Smrg *) 5306b12e5c03Smrg m4_if($1, [], [ 5307b12e5c03Smrg # Older versions of the 11.00 compiler do not understand -b yet 5308b12e5c03Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5309b12e5c03Smrg _LT_LINKER_OPTION([if $CC understands -b], 5310b12e5c03Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5311b12e5c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5312b12e5c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5313b12e5c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53147b58d2e0Smrg ;; 5315b698ba48Smrg esac 53167b58d2e0Smrg fi 53177b58d2e0Smrg if test "$with_gnu_ld" = no; then 53187b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53197b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53207b58d2e0Smrg 53217b58d2e0Smrg case $host_cpu in 53227b58d2e0Smrg hppa*64*|ia64*) 53237b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53247b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53257b58d2e0Smrg ;; 53267b58d2e0Smrg *) 53277b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53287b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53297b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53307b58d2e0Smrg 53317b58d2e0Smrg # hardcode_minus_L: Not really in the search PATH, 53327b58d2e0Smrg # but as the default location of the library. 53337b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53347b58d2e0Smrg ;; 5335b698ba48Smrg esac 53367b58d2e0Smrg fi 53377b58d2e0Smrg ;; 53387b58d2e0Smrg 53397b58d2e0Smrg irix5* | irix6* | nonstopux*) 53407b58d2e0Smrg if test "$GCC" = yes; then 5341b12e5c03Smrg _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' 53427b58d2e0Smrg # Try to use the -exported_symbol ld option, if it does not 53437b58d2e0Smrg # work, assume that -exports_file does not work either and 53447b58d2e0Smrg # implicitly export all symbols. 5345b12e5c03Smrg # This should be the same for all languages, so no per-tag cache variable. 5346b12e5c03Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5347b12e5c03Smrg [lt_cv_irix_exported_symbol], 5348b12e5c03Smrg [save_LDFLAGS="$LDFLAGS" 5349b12e5c03Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5350b12e5c03Smrg AC_LINK_IFELSE( 5351b12e5c03Smrg [AC_LANG_SOURCE( 5352b12e5c03Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5353b12e5c03Smrg [C++], [[int foo (void) { return 0; }]], 5354b12e5c03Smrg [Fortran 77], [[ 5355b12e5c03Smrg subroutine foo 5356b12e5c03Smrg end]], 5357b12e5c03Smrg [Fortran], [[ 5358b12e5c03Smrg subroutine foo 5359b12e5c03Smrg end]])])], 5360b12e5c03Smrg [lt_cv_irix_exported_symbol=yes], 5361b12e5c03Smrg [lt_cv_irix_exported_symbol=no]) 5362b12e5c03Smrg LDFLAGS="$save_LDFLAGS"]) 5363b12e5c03Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5364b12e5c03Smrg _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' 5365b12e5c03Smrg fi 53667b58d2e0Smrg else 5367b12e5c03Smrg _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' 5368b12e5c03Smrg _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' 53697b58d2e0Smrg fi 53707b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53717b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53727b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53737b58d2e0Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53747b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53757b58d2e0Smrg ;; 53767b58d2e0Smrg 5377df9ffc95Smrg netbsd* | netbsdelf*-gnu) 53787b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53797b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53807b58d2e0Smrg else 53817b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53827b58d2e0Smrg fi 53837b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53847b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53857b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53867b58d2e0Smrg ;; 53877b58d2e0Smrg 53887b58d2e0Smrg newsos6) 53897b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53907b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53917b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53927b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53937b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53947b58d2e0Smrg ;; 53957b58d2e0Smrg 53967b58d2e0Smrg *nto* | *qnx*) 53977b58d2e0Smrg ;; 53987b58d2e0Smrg 53997b58d2e0Smrg openbsd*) 54007b58d2e0Smrg if test -f /usr/libexec/ld.so; then 54017b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54027b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54037b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54047b58d2e0Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 54057b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54067b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 54077b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54087b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54097b58d2e0Smrg else 54107b58d2e0Smrg case $host_os in 54117b58d2e0Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54127b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54137b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54147b58d2e0Smrg ;; 54157b58d2e0Smrg *) 54167b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54177b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54187b58d2e0Smrg ;; 54197b58d2e0Smrg esac 54207b58d2e0Smrg fi 54217b58d2e0Smrg else 54227b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54237b58d2e0Smrg fi 54247b58d2e0Smrg ;; 54257b58d2e0Smrg 54267b58d2e0Smrg os2*) 54277b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54287b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54297b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5430b12e5c03Smrg _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' 54317b58d2e0Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54327b58d2e0Smrg ;; 54337b58d2e0Smrg 54347b58d2e0Smrg osf3*) 54357b58d2e0Smrg if test "$GCC" = yes; then 54367b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5437b12e5c03Smrg _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' 54387b58d2e0Smrg else 54397b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440b12e5c03Smrg _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' 54417b58d2e0Smrg fi 54427b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54437b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54447b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54457b58d2e0Smrg ;; 54467b58d2e0Smrg 54477b58d2e0Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54487b58d2e0Smrg if test "$GCC" = yes; then 54497b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5450b12e5c03Smrg _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' 54517b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54527b58d2e0Smrg else 54537b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5454b12e5c03Smrg _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' 54557b58d2e0Smrg _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~ 5456b12e5c03Smrg $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' 54577b58d2e0Smrg 54587b58d2e0Smrg # Both c and cxx compiler support -rpath directly 54597b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54607b58d2e0Smrg fi 54617b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54627b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54637b58d2e0Smrg ;; 54647b58d2e0Smrg 54657b58d2e0Smrg solaris*) 54667b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54677b58d2e0Smrg if test "$GCC" = yes; then 54687b58d2e0Smrg wlarc='${wl}' 5469b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54707b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5471b12e5c03Smrg $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' 54727b58d2e0Smrg else 54737b58d2e0Smrg case `$CC -V 2>&1` in 54747b58d2e0Smrg *"Compilers 5.0"*) 54757b58d2e0Smrg wlarc='' 54767b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54777b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54787b58d2e0Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54797b58d2e0Smrg ;; 54807b58d2e0Smrg *) 54817b58d2e0Smrg wlarc='${wl}' 54827b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54837b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54847b58d2e0Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54857b58d2e0Smrg ;; 5486b698ba48Smrg esac 54877b58d2e0Smrg fi 54887b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54897b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54907b58d2e0Smrg case $host_os in 54917b58d2e0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54927b58d2e0Smrg *) 54937b58d2e0Smrg # The compiler driver will combine and reorder linker options, 54947b58d2e0Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54957b58d2e0Smrg # but is careful enough not to reorder. 54967b58d2e0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54977b58d2e0Smrg if test "$GCC" = yes; then 54987b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54997b58d2e0Smrg else 55007b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 55017b58d2e0Smrg fi 5502b698ba48Smrg ;; 55037b58d2e0Smrg esac 55047b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55057b58d2e0Smrg ;; 55067b58d2e0Smrg 55077b58d2e0Smrg sunos4*) 55087b58d2e0Smrg if test "x$host_vendor" = xsequent; then 55097b58d2e0Smrg # Use $CC to link under sequent, because it throws in some extra .o 55107b58d2e0Smrg # files that make .init and .fini sections work. 55117b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55127b58d2e0Smrg else 55137b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55147b58d2e0Smrg fi 55157b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55167b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55177b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55187b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55197b58d2e0Smrg ;; 55207b58d2e0Smrg 55217b58d2e0Smrg sysv4) 55227b58d2e0Smrg case $host_vendor in 55237b58d2e0Smrg sni) 55247b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55257b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5526b698ba48Smrg ;; 55277b58d2e0Smrg siemens) 55287b58d2e0Smrg ## LD is ld it makes a PLAMLIB 55297b58d2e0Smrg ## CC just makes a GrossModule. 55307b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55317b58d2e0Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55327b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55337b58d2e0Smrg ;; 55347b58d2e0Smrg motorola) 55357b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55367b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5537b698ba48Smrg ;; 55387b58d2e0Smrg esac 55397b58d2e0Smrg runpath_var='LD_RUN_PATH' 55407b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55417b58d2e0Smrg ;; 55427b58d2e0Smrg 55437b58d2e0Smrg sysv4.3*) 55447b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55457b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55467b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55477b58d2e0Smrg ;; 55487b58d2e0Smrg 55497b58d2e0Smrg sysv4*MP*) 55507b58d2e0Smrg if test -d /usr/nec; then 55517b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55527b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55537b58d2e0Smrg runpath_var=LD_RUN_PATH 55547b58d2e0Smrg hardcode_runpath_var=yes 55557b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55567b58d2e0Smrg fi 55577b58d2e0Smrg ;; 55587b58d2e0Smrg 55597b58d2e0Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55607b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55617b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55627b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55637b58d2e0Smrg runpath_var='LD_RUN_PATH' 55647b58d2e0Smrg 55657b58d2e0Smrg if test "$GCC" = yes; then 55667b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55677b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55687b58d2e0Smrg else 55697b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55707b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55717b58d2e0Smrg fi 55727b58d2e0Smrg ;; 55737b58d2e0Smrg 55747b58d2e0Smrg sysv5* | sco3.2v5* | sco5v6*) 55757b58d2e0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55767b58d2e0Smrg # link with -lc, and that would cause any symbols used from libc to 55777b58d2e0Smrg # always be unresolved, which means just about no library would 55787b58d2e0Smrg # ever link correctly. If we're not using GNU ld we use -z text 55797b58d2e0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55807b58d2e0Smrg # as -z defs. 55817b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55827b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55837b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55847b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55857b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55867b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55877b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55887b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55897b58d2e0Smrg runpath_var='LD_RUN_PATH' 55907b58d2e0Smrg 55917b58d2e0Smrg if test "$GCC" = yes; then 55927b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55937b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55947b58d2e0Smrg else 55957b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55967b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55977b58d2e0Smrg fi 55987b58d2e0Smrg ;; 55997b58d2e0Smrg 56007b58d2e0Smrg uts4*) 56017b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56027b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56037b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56047b58d2e0Smrg ;; 56057b58d2e0Smrg 56067b58d2e0Smrg *) 56077b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56087b58d2e0Smrg ;; 56097b58d2e0Smrg esac 56107b58d2e0Smrg 56117b58d2e0Smrg if test x$host_vendor = xsni; then 56127b58d2e0Smrg case $host in 56137b58d2e0Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56147b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56157b58d2e0Smrg ;; 56167b58d2e0Smrg esac 56177b58d2e0Smrg fi 56187b58d2e0Smrg fi 56197b58d2e0Smrg]) 56207b58d2e0SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56217b58d2e0Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56227b58d2e0Smrg 56237b58d2e0Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56247b58d2e0Smrg 56257b58d2e0Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56267b58d2e0Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56277b58d2e0Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56287b58d2e0Smrg [The commands to extract the exported symbol list from a shared archive]) 56297b58d2e0Smrg 56307b58d2e0Smrg# 56317b58d2e0Smrg# Do we need to explicitly link libc? 56327b58d2e0Smrg# 56337b58d2e0Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56347b58d2e0Smrgx|xyes) 56357b58d2e0Smrg # Assume -lc should be added 56367b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56377b58d2e0Smrg 56387b58d2e0Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56397b58d2e0Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56407b58d2e0Smrg *'~'*) 56417b58d2e0Smrg # FIXME: we may have to deal with multi-command sequences. 56427b58d2e0Smrg ;; 56437b58d2e0Smrg '$CC '*) 56447b58d2e0Smrg # Test whether the compiler implicitly links with -lc since on some 56457b58d2e0Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56467b58d2e0Smrg # to ld, don't add -lc before -lgcc. 5647b12e5c03Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5648b12e5c03Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5649b12e5c03Smrg [$RM conftest* 5650b12e5c03Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5651b12e5c03Smrg 5652b12e5c03Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5653b12e5c03Smrg soname=conftest 5654b12e5c03Smrg lib=conftest 5655b12e5c03Smrg libobjs=conftest.$ac_objext 5656b12e5c03Smrg deplibs= 5657b12e5c03Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5658b12e5c03Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5659b12e5c03Smrg compiler_flags=-v 5660b12e5c03Smrg linker_flags=-v 5661b12e5c03Smrg verstring= 5662b12e5c03Smrg output_objdir=. 5663b12e5c03Smrg libname=conftest 5664b12e5c03Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5665b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5666b12e5c03Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5667b12e5c03Smrg then 5668b12e5c03Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5669b12e5c03Smrg else 5670b12e5c03Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5671b12e5c03Smrg fi 5672b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5673b12e5c03Smrg else 5674b12e5c03Smrg cat conftest.err 1>&5 5675b12e5c03Smrg fi 5676b12e5c03Smrg $RM conftest* 5677b12e5c03Smrg ]) 5678b12e5c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56797b58d2e0Smrg ;; 56807b58d2e0Smrg esac 56817b58d2e0Smrg fi 56827b58d2e0Smrg ;; 56837b58d2e0Smrgesac 56847b58d2e0Smrg 56857b58d2e0Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56867b58d2e0Smrg [Whether or not to add -lc for building shared libraries]) 56877b58d2e0Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56887b58d2e0Smrg [enable_shared_with_static_runtimes], [0], 56897b58d2e0Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56907b58d2e0Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56917b58d2e0Smrg [Compiler flag to allow reflexive dlopens]) 56927b58d2e0Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56937b58d2e0Smrg [Compiler flag to generate shared objects directly from archives]) 56947b58d2e0Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56957b58d2e0Smrg [Whether the compiler copes with passing no objects directly]) 56967b58d2e0Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56977b58d2e0Smrg [Create an old-style archive from a shared archive]) 56987b58d2e0Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56997b58d2e0Smrg [Create a temporary old-style archive to link instead of a shared archive]) 57007b58d2e0Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 57017b58d2e0Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 57027b58d2e0Smrg_LT_TAGDECL([], [module_cmds], [2], 57037b58d2e0Smrg [Commands used to build a loadable module if different from building 57047b58d2e0Smrg a shared archive.]) 57057b58d2e0Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 57067b58d2e0Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 57077b58d2e0Smrg [Whether we are building with GNU ld or not]) 57087b58d2e0Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57097b58d2e0Smrg [Flag that allows shared libraries with undefined symbols to be built]) 57107b58d2e0Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 57117b58d2e0Smrg [Flag that enforces no undefined symbols]) 57127b58d2e0Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57137b58d2e0Smrg [Flag to hardcode $libdir into a binary during linking. 57147b58d2e0Smrg This must work even if $libdir does not exist]) 57157b58d2e0Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57167b58d2e0Smrg [Whether we need a single "-rpath" flag with a separated argument]) 57177b58d2e0Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57187b58d2e0Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57197b58d2e0Smrg DIR into the resulting binary]) 57207b58d2e0Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57217b58d2e0Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57227b58d2e0Smrg DIR into the resulting binary and the resulting library dependency is 57237b58d2e0Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57247b58d2e0Smrg library is relocated]) 57257b58d2e0Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57267b58d2e0Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57277b58d2e0Smrg into the resulting binary]) 57287b58d2e0Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57297b58d2e0Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57307b58d2e0Smrg into the resulting binary]) 57317b58d2e0Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57327b58d2e0Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57337b58d2e0Smrg into the library and all subsequent libraries and executables linked 57347b58d2e0Smrg against it]) 57357b58d2e0Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57367b58d2e0Smrg [Set to yes if linker adds runtime paths of dependent libraries 57377b58d2e0Smrg to runtime path list]) 57387b58d2e0Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57397b58d2e0Smrg [Whether libtool must link a program against all its dependency libraries]) 57407b58d2e0Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57417b58d2e0Smrg [Set to "yes" if exported symbols are required]) 57427b58d2e0Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57437b58d2e0Smrg [The commands to list exported symbols]) 57447b58d2e0Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57457b58d2e0Smrg [Symbols that should not be listed in the preloaded symbols]) 57467b58d2e0Smrg_LT_TAGDECL([], [include_expsyms], [1], 57477b58d2e0Smrg [Symbols that must always be exported]) 57487b58d2e0Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57497b58d2e0Smrg [Commands necessary for linking programs (against libraries) with templates]) 5750b12e5c03Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5751b12e5c03Smrg [Commands necessary for finishing linking programs]) 57527b58d2e0Smrg_LT_TAGDECL([], [file_list_spec], [1], 57537b58d2e0Smrg [Specify filename containing input files]) 57547b58d2e0Smrgdnl FIXME: Not yet implemented 57557b58d2e0Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57567b58d2e0Smrgdnl [Compiler flag to generate thread safe objects]) 57577b58d2e0Smrg])# _LT_LINKER_SHLIBS 57587b58d2e0Smrg 57597b58d2e0Smrg 57607b58d2e0Smrg# _LT_LANG_C_CONFIG([TAG]) 57617b58d2e0Smrg# ------------------------ 57627b58d2e0Smrg# Ensure that the configuration variables for a C compiler are suitably 57637b58d2e0Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57647b58d2e0Smrg# the compiler configuration to `libtool'. 57657b58d2e0Smrgm4_defun([_LT_LANG_C_CONFIG], 57667b58d2e0Smrg[m4_require([_LT_DECL_EGREP])dnl 57677b58d2e0Smrglt_save_CC="$CC" 57687b58d2e0SmrgAC_LANG_PUSH(C) 57697b58d2e0Smrg 57707b58d2e0Smrg# Source file extension for C test sources. 57717b58d2e0Smrgac_ext=c 57727b58d2e0Smrg 57737b58d2e0Smrg# Object file extension for compiled C test sources. 57747b58d2e0Smrgobjext=o 57757b58d2e0Smrg_LT_TAGVAR(objext, $1)=$objext 57767b58d2e0Smrg 57777b58d2e0Smrg# Code to be used in simple compile tests 57787b58d2e0Smrglt_simple_compile_test_code="int some_variable = 0;" 57797b58d2e0Smrg 57807b58d2e0Smrg# Code to be used in simple link tests 57817b58d2e0Smrglt_simple_link_test_code='int main(){return(0);}' 57827b58d2e0Smrg 57837b58d2e0Smrg_LT_TAG_COMPILER 57847b58d2e0Smrg# Save the default compiler, since it gets overwritten when the other 57857b58d2e0Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57867b58d2e0Smrgcompiler_DEFAULT=$CC 57877b58d2e0Smrg 57887b58d2e0Smrg# save warnings/boilerplate of simple test code 57897b58d2e0Smrg_LT_COMPILER_BOILERPLATE 57907b58d2e0Smrg_LT_LINKER_BOILERPLATE 57917b58d2e0Smrg 57927b58d2e0Smrgif test -n "$compiler"; then 57937b58d2e0Smrg _LT_COMPILER_NO_RTTI($1) 57947b58d2e0Smrg _LT_COMPILER_PIC($1) 57957b58d2e0Smrg _LT_COMPILER_C_O($1) 57967b58d2e0Smrg _LT_COMPILER_FILE_LOCKS($1) 57977b58d2e0Smrg _LT_LINKER_SHLIBS($1) 57987b58d2e0Smrg _LT_SYS_DYNAMIC_LINKER($1) 57997b58d2e0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 58007b58d2e0Smrg LT_SYS_DLOPEN_SELF 58017b58d2e0Smrg _LT_CMD_STRIPLIB 58027b58d2e0Smrg 58037b58d2e0Smrg # Report which library types will actually be built 58047b58d2e0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 58057b58d2e0Smrg AC_MSG_RESULT([$can_build_shared]) 58067b58d2e0Smrg 58077b58d2e0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 58087b58d2e0Smrg test "$can_build_shared" = "no" && enable_shared=no 58097b58d2e0Smrg 58107b58d2e0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 58117b58d2e0Smrg # are all built from PIC. 58127b58d2e0Smrg case $host_os in 58137b58d2e0Smrg aix3*) 58147b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 58157b58d2e0Smrg if test -n "$RANLIB"; then 58167b58d2e0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58177b58d2e0Smrg postinstall_cmds='$RANLIB $lib' 58187b58d2e0Smrg fi 58197b58d2e0Smrg ;; 58207b58d2e0Smrg 58217b58d2e0Smrg aix[[4-9]]*) 58227b58d2e0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58237b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 58247b58d2e0Smrg fi 58257b58d2e0Smrg ;; 58267b58d2e0Smrg esac 58277b58d2e0Smrg AC_MSG_RESULT([$enable_shared]) 58287b58d2e0Smrg 58297b58d2e0Smrg AC_MSG_CHECKING([whether to build static libraries]) 58307b58d2e0Smrg # Make sure either enable_shared or enable_static is yes. 58317b58d2e0Smrg test "$enable_shared" = yes || enable_static=yes 58327b58d2e0Smrg AC_MSG_RESULT([$enable_static]) 58337b58d2e0Smrg 58347b58d2e0Smrg _LT_CONFIG($1) 58357b58d2e0Smrgfi 58367b58d2e0SmrgAC_LANG_POP 58377b58d2e0SmrgCC="$lt_save_CC" 58387b58d2e0Smrg])# _LT_LANG_C_CONFIG 58397b58d2e0Smrg 58407b58d2e0Smrg 58417b58d2e0Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58427b58d2e0Smrg# -------------------------- 58437b58d2e0Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58447b58d2e0Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58457b58d2e0Smrg# the compiler configuration to `libtool'. 58467b58d2e0Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5847b12e5c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58487b58d2e0Smrgm4_require([_LT_DECL_EGREP])dnl 5849b12e5c03Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5850b12e5c03Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5851b12e5c03Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5852b12e5c03Smrg (test "X$CXX" != "Xg++"))) ; then 5853b12e5c03Smrg AC_PROG_CXXCPP 5854b12e5c03Smrgelse 5855b12e5c03Smrg _lt_caught_CXX_error=yes 5856b12e5c03Smrgfi 58577b58d2e0Smrg 58587b58d2e0SmrgAC_LANG_PUSH(C++) 58597b58d2e0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58607b58d2e0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58617b58d2e0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58627b58d2e0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58637b58d2e0Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58647b58d2e0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58657b58d2e0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58667b58d2e0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58677b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58687b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58697b58d2e0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58707b58d2e0Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58717b58d2e0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58727b58d2e0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58737b58d2e0Smrg_LT_TAGVAR(module_cmds, $1)= 58747b58d2e0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58757b58d2e0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58767b58d2e0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5877b12e5c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5878b12e5c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58797b58d2e0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58807b58d2e0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58817b58d2e0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58827b58d2e0Smrg 58837b58d2e0Smrg# Source file extension for C++ test sources. 58847b58d2e0Smrgac_ext=cpp 58857b58d2e0Smrg 58867b58d2e0Smrg# Object file extension for compiled C++ test sources. 58877b58d2e0Smrgobjext=o 58887b58d2e0Smrg_LT_TAGVAR(objext, $1)=$objext 58897b58d2e0Smrg 58907b58d2e0Smrg# No sense in running all these tests if we already determined that 58917b58d2e0Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58927b58d2e0Smrg# are currently assumed to apply to all compilers on this platform, 58937b58d2e0Smrg# and will be corrupted by setting them based on a non-working compiler. 58947b58d2e0Smrgif test "$_lt_caught_CXX_error" != yes; then 58957b58d2e0Smrg # Code to be used in simple compile tests 58967b58d2e0Smrg lt_simple_compile_test_code="int some_variable = 0;" 58977b58d2e0Smrg 58987b58d2e0Smrg # Code to be used in simple link tests 58997b58d2e0Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 59007b58d2e0Smrg 59017b58d2e0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 59027b58d2e0Smrg _LT_TAG_COMPILER 59037b58d2e0Smrg 59047b58d2e0Smrg # save warnings/boilerplate of simple test code 59057b58d2e0Smrg _LT_COMPILER_BOILERPLATE 59067b58d2e0Smrg _LT_LINKER_BOILERPLATE 59077b58d2e0Smrg 59087b58d2e0Smrg # Allow CC to be a program name with arguments. 59097b58d2e0Smrg lt_save_CC=$CC 5910b12e5c03Smrg lt_save_CFLAGS=$CFLAGS 59117b58d2e0Smrg lt_save_LD=$LD 59127b58d2e0Smrg lt_save_GCC=$GCC 59137b58d2e0Smrg GCC=$GXX 59147b58d2e0Smrg lt_save_with_gnu_ld=$with_gnu_ld 59157b58d2e0Smrg lt_save_path_LD=$lt_cv_path_LD 59167b58d2e0Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59177b58d2e0Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59187b58d2e0Smrg else 59197b58d2e0Smrg $as_unset lt_cv_prog_gnu_ld 5920b698ba48Smrg fi 59217b58d2e0Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59227b58d2e0Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59237b58d2e0Smrg else 59247b58d2e0Smrg $as_unset lt_cv_path_LD 59257b58d2e0Smrg fi 59267b58d2e0Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59277b58d2e0Smrg CC=${CXX-"c++"} 5928b12e5c03Smrg CFLAGS=$CXXFLAGS 59297b58d2e0Smrg compiler=$CC 59307b58d2e0Smrg _LT_TAGVAR(compiler, $1)=$CC 59317b58d2e0Smrg _LT_CC_BASENAME([$compiler]) 59322ec8c4b4Smrg 59337b58d2e0Smrg if test -n "$compiler"; then 59347b58d2e0Smrg # We don't want -fno-exception when compiling C++ code, so set the 59357b58d2e0Smrg # no_builtin_flag separately 59367b58d2e0Smrg if test "$GXX" = yes; then 59377b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59387b58d2e0Smrg else 59397b58d2e0Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59407b58d2e0Smrg fi 59417b58d2e0Smrg 59427b58d2e0Smrg if test "$GXX" = yes; then 59437b58d2e0Smrg # Set up default GNU C++ configuration 59447b58d2e0Smrg 59457b58d2e0Smrg LT_PATH_LD 59467b58d2e0Smrg 59477b58d2e0Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59487b58d2e0Smrg # archiving commands below assume that GNU ld is being used. 59497b58d2e0Smrg if test "$with_gnu_ld" = yes; then 5950b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5951b12e5c03Smrg _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' 59527b58d2e0Smrg 59537b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59547b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59557b58d2e0Smrg 59567b58d2e0Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59577b58d2e0Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59587b58d2e0Smrg # investigate it a little bit more. (MM) 59597b58d2e0Smrg wlarc='${wl}' 59607b58d2e0Smrg 59617b58d2e0Smrg # ancient GNU ld didn't support --whole-archive et. al. 59627b58d2e0Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59637b58d2e0Smrg $GREP 'no-whole-archive' > /dev/null; then 59647b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59657b58d2e0Smrg else 59667b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59677b58d2e0Smrg fi 59687b58d2e0Smrg else 59697b58d2e0Smrg with_gnu_ld=no 59707b58d2e0Smrg wlarc= 59717b58d2e0Smrg 59727b58d2e0Smrg # A generic and very simple default shared library creation 59737b58d2e0Smrg # command for GNU C++ for the case where it uses the native 59747b58d2e0Smrg # linker, instead of GNU ld. If possible, this setting should 59757b58d2e0Smrg # overridden to take advantage of the native linker features on 59767b58d2e0Smrg # the platform it is being used on. 59777b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5978b698ba48Smrg fi 59792ec8c4b4Smrg 59807b58d2e0Smrg # Commands to make compiler produce verbose output that lists 59817b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 59827b58d2e0Smrg # linking a shared library. 5983b12e5c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 59847b58d2e0Smrg 59857b58d2e0Smrg else 59867b58d2e0Smrg GXX=no 59877b58d2e0Smrg with_gnu_ld=no 59887b58d2e0Smrg wlarc= 59897b58d2e0Smrg fi 59907b58d2e0Smrg 59917b58d2e0Smrg # PORTME: fill in a description of your system's C++ link characteristics 59927b58d2e0Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59937b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59947b58d2e0Smrg case $host_os in 59957b58d2e0Smrg aix3*) 59967b58d2e0Smrg # FIXME: insert proper C++ library support 59977b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5998e4f6584cSmrg ;; 59997b58d2e0Smrg aix[[4-9]]*) 60007b58d2e0Smrg if test "$host_cpu" = ia64; then 60017b58d2e0Smrg # On IA64, the linker does run time linking by default, so we don't 60027b58d2e0Smrg # have to do anything special. 60037b58d2e0Smrg aix_use_runtimelinking=no 60047b58d2e0Smrg exp_sym_flag='-Bexport' 60057b58d2e0Smrg no_entry_flag="" 60067b58d2e0Smrg else 60077b58d2e0Smrg aix_use_runtimelinking=no 60082ec8c4b4Smrg 60097b58d2e0Smrg # Test if we are trying to use run time linking or normal 60107b58d2e0Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60117b58d2e0Smrg # need to do runtime linking. 60127b58d2e0Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60137b58d2e0Smrg for ld_flag in $LDFLAGS; do 60147b58d2e0Smrg case $ld_flag in 60157b58d2e0Smrg *-brtl*) 60167b58d2e0Smrg aix_use_runtimelinking=yes 60177b58d2e0Smrg break 60187b58d2e0Smrg ;; 60197b58d2e0Smrg esac 60207b58d2e0Smrg done 60217b58d2e0Smrg ;; 60227b58d2e0Smrg esac 60232ec8c4b4Smrg 60247b58d2e0Smrg exp_sym_flag='-bexport' 60257b58d2e0Smrg no_entry_flag='-bnoentry' 60267b58d2e0Smrg fi 60272ec8c4b4Smrg 60287b58d2e0Smrg # When large executables or shared objects are built, AIX ld can 60297b58d2e0Smrg # have problems creating the table of contents. If linking a library 60307b58d2e0Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60317b58d2e0Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60327b58d2e0Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6033e4f6584cSmrg 60347b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='' 60357b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60367b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60377b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60387b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60397b58d2e0Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60402ec8c4b4Smrg 60417b58d2e0Smrg if test "$GXX" = yes; then 60427b58d2e0Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60437b58d2e0Smrg # We only want to do this on AIX 4.2 and lower, the check 60447b58d2e0Smrg # below for broken collect2 doesn't work under 4.3+ 60457b58d2e0Smrg collect2name=`${CC} -print-prog-name=collect2` 60467b58d2e0Smrg if test -f "$collect2name" && 60477b58d2e0Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60487b58d2e0Smrg then 60497b58d2e0Smrg # We have reworked collect2 60507b58d2e0Smrg : 60517b58d2e0Smrg else 60527b58d2e0Smrg # We have old collect2 60537b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60547b58d2e0Smrg # It fails to find uninstalled libraries when the uninstalled 60557b58d2e0Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60567b58d2e0Smrg # to unsupported forces relinking 60577b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60587b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60597b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60607b58d2e0Smrg fi 60617b58d2e0Smrg esac 60627b58d2e0Smrg shared_flag='-shared' 60637b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 60647b58d2e0Smrg shared_flag="$shared_flag "'${wl}-G' 60657b58d2e0Smrg fi 60667b58d2e0Smrg else 60677b58d2e0Smrg # not using gcc 60687b58d2e0Smrg if test "$host_cpu" = ia64; then 60697b58d2e0Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60707b58d2e0Smrg # chokes on -Wl,-G. The following line is correct: 60717b58d2e0Smrg shared_flag='-G' 60727b58d2e0Smrg else 60737b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 60747b58d2e0Smrg shared_flag='${wl}-G' 60757b58d2e0Smrg else 60767b58d2e0Smrg shared_flag='${wl}-bM:SRE' 60777b58d2e0Smrg fi 60787b58d2e0Smrg fi 60797b58d2e0Smrg fi 60802ec8c4b4Smrg 60817b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60827b58d2e0Smrg # It seems that -bexpall does not export symbols beginning with 60837b58d2e0Smrg # underscore (_), so it is better to generate a list of symbols to 60847b58d2e0Smrg # export. 60857b58d2e0Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60867b58d2e0Smrg if test "$aix_use_runtimelinking" = yes; then 60877b58d2e0Smrg # Warning - without using the other runtime loading flags (-brtl), 60887b58d2e0Smrg # -berok will link without error, but may produce a broken library. 60897b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60907b58d2e0Smrg # Determine the default libpath from the value encoded in an empty 60917b58d2e0Smrg # executable. 6092b12e5c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60937b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60942ec8c4b4Smrg 6095b12e5c03Smrg _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" 60967b58d2e0Smrg else 60977b58d2e0Smrg if test "$host_cpu" = ia64; then 60987b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60997b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61007b58d2e0Smrg _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" 61017b58d2e0Smrg else 61027b58d2e0Smrg # Determine the default libpath from the value encoded in an 61037b58d2e0Smrg # empty executable. 6104b12e5c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61057b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61067b58d2e0Smrg # Warning - without using the other run time loading flags, 61077b58d2e0Smrg # -berok will link without error, but may produce a broken library. 61087b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61097b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6110b12e5c03Smrg if test "$with_gnu_ld" = yes; then 6111b12e5c03Smrg # We only use this code for GNU lds that support --whole-archive. 6112b12e5c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6113b12e5c03Smrg else 6114b12e5c03Smrg # Exported symbols can be pulled into shared objects from archives 6115b12e5c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6116b12e5c03Smrg fi 61177b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61187b58d2e0Smrg # This is similar to how AIX traditionally builds its shared 61197b58d2e0Smrg # libraries. 61207b58d2e0Smrg _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' 61217b58d2e0Smrg fi 61227b58d2e0Smrg fi 61237b58d2e0Smrg ;; 6124e4f6584cSmrg 61257b58d2e0Smrg beos*) 61267b58d2e0Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61277b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61287b58d2e0Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61297b58d2e0Smrg # support --undefined. This deserves some investigation. FIXME 61307b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61317b58d2e0Smrg else 61327b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61337b58d2e0Smrg fi 61347b58d2e0Smrg ;; 61352ec8c4b4Smrg 61367b58d2e0Smrg chorus*) 61377b58d2e0Smrg case $cc_basename in 61387b58d2e0Smrg *) 61397b58d2e0Smrg # FIXME: insert proper C++ library support 61407b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61417b58d2e0Smrg ;; 61427b58d2e0Smrg esac 61437b58d2e0Smrg ;; 61442ec8c4b4Smrg 61457b58d2e0Smrg cygwin* | mingw* | pw32* | cegcc*) 6146b12e5c03Smrg case $GXX,$cc_basename in 6147b12e5c03Smrg ,cl* | no,cl*) 6148b12e5c03Smrg # Native MSVC 6149b12e5c03Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6150b12e5c03Smrg # no search path for DLLs. 6151b12e5c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6152b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6153b12e5c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6154b12e5c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6155b12e5c03Smrg # Tell ltmain to make .lib files, not .a files. 6156b12e5c03Smrg libext=lib 6157b12e5c03Smrg # Tell ltmain to make .dll files, not .so files. 6158b12e5c03Smrg shrext_cmds=".dll" 6159b12e5c03Smrg # FIXME: Setting linknames here is a bad hack. 6160b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6161b12e5c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6162b12e5c03Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6163b12e5c03Smrg else 6164b12e5c03Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6165b12e5c03Smrg fi~ 6166b12e5c03Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6167b12e5c03Smrg linknames=' 6168b12e5c03Smrg # The linker will not automatically build a static lib if we build a DLL. 6169b12e5c03Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6170b12e5c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6171b12e5c03Smrg # Don't use ranlib 6172b12e5c03Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6173b12e5c03Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6174b12e5c03Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6175b12e5c03Smrg case $lt_outputfile in 6176b12e5c03Smrg *.exe|*.EXE) ;; 6177b12e5c03Smrg *) 6178b12e5c03Smrg lt_outputfile="$lt_outputfile.exe" 6179b12e5c03Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6180b12e5c03Smrg ;; 6181b12e5c03Smrg esac~ 6182b12e5c03Smrg func_to_tool_file "$lt_outputfile"~ 6183b12e5c03Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6184b12e5c03Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6185b12e5c03Smrg $RM "$lt_outputfile.manifest"; 6186b12e5c03Smrg fi' 6187b12e5c03Smrg ;; 6188b12e5c03Smrg *) 6189b12e5c03Smrg # g++ 6190b12e5c03Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6191b12e5c03Smrg # as there is no search path for DLLs. 6192b12e5c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6193b12e5c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6194b12e5c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6195b12e5c03Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6196b12e5c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6197b12e5c03Smrg 6198b12e5c03Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6199b12e5c03Smrg _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' 6200b12e5c03Smrg # If the export-symbols file already is a .def file (1st line 6201b12e5c03Smrg # is EXPORTS), use it as is; otherwise, prepend... 6202b12e5c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6203b12e5c03Smrg cp $export_symbols $output_objdir/$soname.def; 6204b12e5c03Smrg else 6205b12e5c03Smrg echo EXPORTS > $output_objdir/$soname.def; 6206b12e5c03Smrg cat $export_symbols >> $output_objdir/$soname.def; 6207b12e5c03Smrg fi~ 6208b12e5c03Smrg $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' 6209b12e5c03Smrg else 6210b12e5c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6211b12e5c03Smrg fi 6212b12e5c03Smrg ;; 6213b12e5c03Smrg esac 6214b12e5c03Smrg ;; 62157b58d2e0Smrg darwin* | rhapsody*) 62167b58d2e0Smrg _LT_DARWIN_LINKER_FEATURES($1) 6217b698ba48Smrg ;; 62182ec8c4b4Smrg 62197b58d2e0Smrg dgux*) 62207b58d2e0Smrg case $cc_basename in 62217b58d2e0Smrg ec++*) 62227b58d2e0Smrg # FIXME: insert proper C++ library support 62237b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62247b58d2e0Smrg ;; 62257b58d2e0Smrg ghcx*) 62267b58d2e0Smrg # Green Hills C++ Compiler 62277b58d2e0Smrg # FIXME: insert proper C++ library support 62287b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62297b58d2e0Smrg ;; 62307b58d2e0Smrg *) 62317b58d2e0Smrg # FIXME: insert proper C++ library support 62327b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62337b58d2e0Smrg ;; 62347b58d2e0Smrg esac 62357b58d2e0Smrg ;; 62362ec8c4b4Smrg 6237b12e5c03Smrg freebsd2.*) 62387b58d2e0Smrg # C++ shared libraries reported to be fairly broken before 62397b58d2e0Smrg # switch to ELF 62407b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6241b698ba48Smrg ;; 62427b58d2e0Smrg 62437b58d2e0Smrg freebsd-elf*) 62447b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6245e4f6584cSmrg ;; 62467b58d2e0Smrg 62477b58d2e0Smrg freebsd* | dragonfly*) 62487b58d2e0Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62497b58d2e0Smrg # conventions 62507b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6251b698ba48Smrg ;; 62527b58d2e0Smrg 6253b12e5c03Smrg haiku*) 6254b12e5c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6255b12e5c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6256b12e5c03Smrg ;; 6257b12e5c03Smrg 62587b58d2e0Smrg hpux9*) 62597b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62607b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62617b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62627b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62637b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62647b58d2e0Smrg # but as the default 62657b58d2e0Smrg # location of the library. 62667b58d2e0Smrg 62677b58d2e0Smrg case $cc_basename in 62687b58d2e0Smrg CC*) 62697b58d2e0Smrg # FIXME: insert proper C++ library support 62707b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62717b58d2e0Smrg ;; 62727b58d2e0Smrg aCC*) 62737b58d2e0Smrg _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' 62747b58d2e0Smrg # Commands to make compiler produce verbose output that lists 62757b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 62767b58d2e0Smrg # linking a shared library. 62777b58d2e0Smrg # 62787b58d2e0Smrg # There doesn't appear to be a way to prevent this compiler from 62797b58d2e0Smrg # explicitly linking system object files so we need to strip them 62807b58d2e0Smrg # from the output so that they don't get included in the library 62817b58d2e0Smrg # dependencies. 6282b12e5c03Smrg 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"' 62837b58d2e0Smrg ;; 62847b58d2e0Smrg *) 62857b58d2e0Smrg if test "$GXX" = yes; then 6286b12e5c03Smrg _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' 62877b58d2e0Smrg else 62887b58d2e0Smrg # FIXME: insert proper C++ library support 62897b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62907b58d2e0Smrg fi 62917b58d2e0Smrg ;; 62927b58d2e0Smrg esac 6293b698ba48Smrg ;; 62942ec8c4b4Smrg 62957b58d2e0Smrg hpux10*|hpux11*) 62967b58d2e0Smrg if test $with_gnu_ld = no; then 62977b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62987b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6299e4f6584cSmrg 63007b58d2e0Smrg case $host_cpu in 63017b58d2e0Smrg hppa*64*|ia64*) 63027b58d2e0Smrg ;; 63037b58d2e0Smrg *) 63047b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63057b58d2e0Smrg ;; 63067b58d2e0Smrg esac 63077b58d2e0Smrg fi 63087b58d2e0Smrg case $host_cpu in 63097b58d2e0Smrg hppa*64*|ia64*) 63107b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63117b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63127b58d2e0Smrg ;; 63137b58d2e0Smrg *) 63147b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63157b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63167b58d2e0Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63177b58d2e0Smrg # but as the default 63187b58d2e0Smrg # location of the library. 63197b58d2e0Smrg ;; 63207b58d2e0Smrg esac 6321e4f6584cSmrg 63227b58d2e0Smrg case $cc_basename in 63237b58d2e0Smrg CC*) 63247b58d2e0Smrg # FIXME: insert proper C++ library support 63257b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63267b58d2e0Smrg ;; 63277b58d2e0Smrg aCC*) 63287b58d2e0Smrg case $host_cpu in 63297b58d2e0Smrg hppa*64*) 63307b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63317b58d2e0Smrg ;; 63327b58d2e0Smrg ia64*) 63337b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63347b58d2e0Smrg ;; 63357b58d2e0Smrg *) 63367b58d2e0Smrg _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' 63377b58d2e0Smrg ;; 63387b58d2e0Smrg esac 63397b58d2e0Smrg # Commands to make compiler produce verbose output that lists 63407b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 63417b58d2e0Smrg # linking a shared library. 63427b58d2e0Smrg # 63437b58d2e0Smrg # There doesn't appear to be a way to prevent this compiler from 63447b58d2e0Smrg # explicitly linking system object files so we need to strip them 63457b58d2e0Smrg # from the output so that they don't get included in the library 63467b58d2e0Smrg # dependencies. 6347b12e5c03Smrg 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"' 63487b58d2e0Smrg ;; 63497b58d2e0Smrg *) 63507b58d2e0Smrg if test "$GXX" = yes; then 63517b58d2e0Smrg if test $with_gnu_ld = no; then 63527b58d2e0Smrg case $host_cpu in 63537b58d2e0Smrg hppa*64*) 63547b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63557b58d2e0Smrg ;; 63567b58d2e0Smrg ia64*) 6357b12e5c03Smrg _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' 63587b58d2e0Smrg ;; 63597b58d2e0Smrg *) 6360b12e5c03Smrg _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' 63617b58d2e0Smrg ;; 63627b58d2e0Smrg esac 63637b58d2e0Smrg fi 63647b58d2e0Smrg else 63657b58d2e0Smrg # FIXME: insert proper C++ library support 63667b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63677b58d2e0Smrg fi 63687b58d2e0Smrg ;; 63697b58d2e0Smrg esac 63707b58d2e0Smrg ;; 63712ec8c4b4Smrg 63727b58d2e0Smrg interix[[3-9]]*) 63737b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63747b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63757b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63767b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63777b58d2e0Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63787b58d2e0Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63797b58d2e0Smrg # default) and relocated if they conflict, which is a slow very memory 63807b58d2e0Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63817b58d2e0Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63827b58d2e0Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63837b58d2e0Smrg _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' 63847b58d2e0Smrg _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' 63857b58d2e0Smrg ;; 63867b58d2e0Smrg irix5* | irix6*) 63877b58d2e0Smrg case $cc_basename in 63887b58d2e0Smrg CC*) 63897b58d2e0Smrg # SGI C++ 6390b12e5c03Smrg _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' 63912ec8c4b4Smrg 63927b58d2e0Smrg # Archives containing C++ object files must be created using 63937b58d2e0Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63947b58d2e0Smrg # necessary to make sure instantiated templates are included 63957b58d2e0Smrg # in the archive. 63967b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63977b58d2e0Smrg ;; 63987b58d2e0Smrg *) 63997b58d2e0Smrg if test "$GXX" = yes; then 64007b58d2e0Smrg if test "$with_gnu_ld" = no; then 6401b12e5c03Smrg _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' 64027b58d2e0Smrg else 6403b12e5c03Smrg _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' 64047b58d2e0Smrg fi 64057b58d2e0Smrg fi 64067b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64077b58d2e0Smrg ;; 64087b58d2e0Smrg esac 64097b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64107b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64117b58d2e0Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64127b58d2e0Smrg ;; 64132ec8c4b4Smrg 6414df9ffc95Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 64157b58d2e0Smrg case $cc_basename in 64167b58d2e0Smrg KCC*) 64177b58d2e0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64182ec8c4b4Smrg 64197b58d2e0Smrg # KCC will only create a shared library if the output file 64207b58d2e0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64217b58d2e0Smrg # to its proper name (with version) after linking. 64227b58d2e0Smrg _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' 64237b58d2e0Smrg _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' 64247b58d2e0Smrg # Commands to make compiler produce verbose output that lists 64257b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 64267b58d2e0Smrg # linking a shared library. 64277b58d2e0Smrg # 64287b58d2e0Smrg # There doesn't appear to be a way to prevent this compiler from 64297b58d2e0Smrg # explicitly linking system object files so we need to strip them 64307b58d2e0Smrg # from the output so that they don't get included in the library 64317b58d2e0Smrg # dependencies. 6432b12e5c03Smrg 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"' 64332ec8c4b4Smrg 64347b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64357b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64362ec8c4b4Smrg 64377b58d2e0Smrg # Archives containing C++ object files must be created using 64387b58d2e0Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64397b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64407b58d2e0Smrg ;; 64417b58d2e0Smrg icpc* | ecpc* ) 64427b58d2e0Smrg # Intel C++ 64437b58d2e0Smrg with_gnu_ld=yes 64447b58d2e0Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64457b58d2e0Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64467b58d2e0Smrg # earlier do not add the objects themselves. 64477b58d2e0Smrg case `$CC -V 2>&1` in 64487b58d2e0Smrg *"Version 7."*) 64497b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64507b58d2e0Smrg _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' 64517b58d2e0Smrg ;; 64527b58d2e0Smrg *) # Version 8.0 or newer 64537b58d2e0Smrg tmp_idyn= 64547b58d2e0Smrg case $host_cpu in 64557b58d2e0Smrg ia64*) tmp_idyn=' -i_dynamic';; 64567b58d2e0Smrg esac 64577b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64587b58d2e0Smrg _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' 64597b58d2e0Smrg ;; 64607b58d2e0Smrg esac 64617b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64627b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64637b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64647b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64657b58d2e0Smrg ;; 64667b58d2e0Smrg pgCC* | pgcpp*) 64677b58d2e0Smrg # Portland Group C++ compiler 64687b58d2e0Smrg case `$CC -V` in 6469b12e5c03Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64707b58d2e0Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64717b58d2e0Smrg rm -rf $tpldir~ 64727b58d2e0Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6473b12e5c03Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64747b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64757b58d2e0Smrg rm -rf $tpldir~ 64767b58d2e0Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6477b12e5c03Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64787b58d2e0Smrg $RANLIB $oldlib' 64797b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64807b58d2e0Smrg rm -rf $tpldir~ 64817b58d2e0Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6482b12e5c03Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64837b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64847b58d2e0Smrg rm -rf $tpldir~ 64857b58d2e0Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6486b12e5c03Smrg $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' 64877b58d2e0Smrg ;; 6488b12e5c03Smrg *) # Version 6 and above use weak symbols 64897b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64907b58d2e0Smrg _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' 64917b58d2e0Smrg ;; 64927b58d2e0Smrg esac 64932ec8c4b4Smrg 64947b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64957b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6496b12e5c03Smrg _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' 64977b58d2e0Smrg ;; 64987b58d2e0Smrg cxx*) 64997b58d2e0Smrg # Compaq C++ 65007b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 65017b58d2e0Smrg _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' 65022ec8c4b4Smrg 65037b58d2e0Smrg runpath_var=LD_RUN_PATH 65047b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65057b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65062ec8c4b4Smrg 65077b58d2e0Smrg # Commands to make compiler produce verbose output that lists 65087b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 65097b58d2e0Smrg # linking a shared library. 65107b58d2e0Smrg # 65117b58d2e0Smrg # There doesn't appear to be a way to prevent this compiler from 65127b58d2e0Smrg # explicitly linking system object files so we need to strip them 65137b58d2e0Smrg # from the output so that they don't get included in the library 65147b58d2e0Smrg # dependencies. 6515b12e5c03Smrg 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' 65167b58d2e0Smrg ;; 6517b12e5c03Smrg xl* | mpixl* | bgxl*) 65187b58d2e0Smrg # IBM XL 8.0 on PPC, with GNU ld 65197b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65207b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65217b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65227b58d2e0Smrg if test "x$supports_anon_versioning" = xyes; then 65237b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65247b58d2e0Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65257b58d2e0Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65267b58d2e0Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65277b58d2e0Smrg fi 65287b58d2e0Smrg ;; 65297b58d2e0Smrg *) 65307b58d2e0Smrg case `$CC -V 2>&1 | sed 5q` in 65317b58d2e0Smrg *Sun\ C*) 65327b58d2e0Smrg # Sun C++ 5.9 65337b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65347b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65357b58d2e0Smrg _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' 65367b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6537b12e5c03Smrg _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' 65387b58d2e0Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6539e4f6584cSmrg 65407b58d2e0Smrg # Not sure whether something based on 65417b58d2e0Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65427b58d2e0Smrg # would be better. 6543b12e5c03Smrg output_verbose_link_cmd='func_echo_all' 654409885543Smrg 65457b58d2e0Smrg # Archives containing C++ object files must be created using 65467b58d2e0Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65477b58d2e0Smrg # necessary to make sure instantiated templates are included 65487b58d2e0Smrg # in the archive. 65497b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65507b58d2e0Smrg ;; 65517b58d2e0Smrg esac 65527b58d2e0Smrg ;; 65537b58d2e0Smrg esac 65547b58d2e0Smrg ;; 655509885543Smrg 65567b58d2e0Smrg lynxos*) 65577b58d2e0Smrg # FIXME: insert proper C++ library support 65587b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65597b58d2e0Smrg ;; 656009885543Smrg 65617b58d2e0Smrg m88k*) 65627b58d2e0Smrg # FIXME: insert proper C++ library support 65637b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65647b58d2e0Smrg ;; 6565e4f6584cSmrg 65667b58d2e0Smrg mvs*) 65677b58d2e0Smrg case $cc_basename in 65687b58d2e0Smrg cxx*) 65697b58d2e0Smrg # FIXME: insert proper C++ library support 65707b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65717b58d2e0Smrg ;; 65727b58d2e0Smrg *) 65737b58d2e0Smrg # FIXME: insert proper C++ library support 65747b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65757b58d2e0Smrg ;; 65767b58d2e0Smrg esac 65777b58d2e0Smrg ;; 657809885543Smrg 65797b58d2e0Smrg netbsd*) 65807b58d2e0Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65817b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65827b58d2e0Smrg wlarc= 65837b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65847b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65857b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65867b58d2e0Smrg fi 65877b58d2e0Smrg # Workaround some broken pre-1.5 toolchains 65887b58d2e0Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65897b58d2e0Smrg ;; 659009885543Smrg 65917b58d2e0Smrg *nto* | *qnx*) 65927b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65937b58d2e0Smrg ;; 659409885543Smrg 65957b58d2e0Smrg openbsd2*) 65967b58d2e0Smrg # C++ shared libraries are fairly broken 6597e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65987b58d2e0Smrg ;; 65997b58d2e0Smrg 66007b58d2e0Smrg openbsd*) 66017b58d2e0Smrg if test -f /usr/libexec/ld.so; then 66027b58d2e0Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66037b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66047b58d2e0Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66057b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66067b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66077b58d2e0Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66087b58d2e0Smrg _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' 66097b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66107b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66117b58d2e0Smrg fi 6612b12e5c03Smrg output_verbose_link_cmd=func_echo_all 66137b58d2e0Smrg else 66147b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66157b58d2e0Smrg fi 66167b58d2e0Smrg ;; 661709885543Smrg 66187b58d2e0Smrg osf3* | osf4* | osf5*) 66197b58d2e0Smrg case $cc_basename in 66207b58d2e0Smrg KCC*) 66217b58d2e0Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 662209885543Smrg 66237b58d2e0Smrg # KCC will only create a shared library if the output file 66247b58d2e0Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66257b58d2e0Smrg # to its proper name (with version) after linking. 66267b58d2e0Smrg _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' 662709885543Smrg 66287b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66297b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 663009885543Smrg 66317b58d2e0Smrg # Archives containing C++ object files must be created using 66327b58d2e0Smrg # the KAI C++ compiler. 66337b58d2e0Smrg case $host in 66347b58d2e0Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66357b58d2e0Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66367b58d2e0Smrg esac 66377b58d2e0Smrg ;; 66387b58d2e0Smrg RCC*) 66397b58d2e0Smrg # Rational C++ 2.4.1 66407b58d2e0Smrg # FIXME: insert proper C++ library support 66417b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66427b58d2e0Smrg ;; 66437b58d2e0Smrg cxx*) 66447b58d2e0Smrg case $host in 66457b58d2e0Smrg osf3*) 66467b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6647b12e5c03Smrg _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' 66487b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66497b58d2e0Smrg ;; 66507b58d2e0Smrg *) 66517b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6652b12e5c03Smrg _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' 66537b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66547b58d2e0Smrg echo "-hidden">> $lib.exp~ 6655b12e5c03Smrg $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~ 66567b58d2e0Smrg $RM $lib.exp' 66577b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66587b58d2e0Smrg ;; 66597b58d2e0Smrg esac 666009885543Smrg 66617b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6662e4f6584cSmrg 66637b58d2e0Smrg # Commands to make compiler produce verbose output that lists 66647b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 66657b58d2e0Smrg # linking a shared library. 66667b58d2e0Smrg # 66677b58d2e0Smrg # There doesn't appear to be a way to prevent this compiler from 66687b58d2e0Smrg # explicitly linking system object files so we need to strip them 66697b58d2e0Smrg # from the output so that they don't get included in the library 66707b58d2e0Smrg # dependencies. 6671b12e5c03Smrg 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"' 66727b58d2e0Smrg ;; 66737b58d2e0Smrg *) 66747b58d2e0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66757b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66767b58d2e0Smrg case $host in 66777b58d2e0Smrg osf3*) 6678b12e5c03Smrg _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' 66797b58d2e0Smrg ;; 66807b58d2e0Smrg *) 6681b12e5c03Smrg _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' 66827b58d2e0Smrg ;; 66837b58d2e0Smrg esac 668409885543Smrg 66857b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66867b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66872ec8c4b4Smrg 66887b58d2e0Smrg # Commands to make compiler produce verbose output that lists 66897b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 66907b58d2e0Smrg # linking a shared library. 6691b12e5c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66922ec8c4b4Smrg 66937b58d2e0Smrg else 66947b58d2e0Smrg # FIXME: insert proper C++ library support 66957b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66967b58d2e0Smrg fi 66977b58d2e0Smrg ;; 66987b58d2e0Smrg esac 66997b58d2e0Smrg ;; 6700e4f6584cSmrg 67017b58d2e0Smrg psos*) 67027b58d2e0Smrg # FIXME: insert proper C++ library support 6703e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67047b58d2e0Smrg ;; 67057b58d2e0Smrg 67067b58d2e0Smrg sunos4*) 67077b58d2e0Smrg case $cc_basename in 67087b58d2e0Smrg CC*) 67097b58d2e0Smrg # Sun C++ 4.x 67107b58d2e0Smrg # FIXME: insert proper C++ library support 67117b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67127b58d2e0Smrg ;; 67137b58d2e0Smrg lcc*) 67147b58d2e0Smrg # Lucid 67157b58d2e0Smrg # FIXME: insert proper C++ library support 67167b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67177b58d2e0Smrg ;; 67187b58d2e0Smrg *) 67197b58d2e0Smrg # FIXME: insert proper C++ library support 67207b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67217b58d2e0Smrg ;; 67227b58d2e0Smrg esac 67237b58d2e0Smrg ;; 67247b58d2e0Smrg 67257b58d2e0Smrg solaris*) 67267b58d2e0Smrg case $cc_basename in 6727b12e5c03Smrg CC* | sunCC*) 67287b58d2e0Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67297b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67307b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67317b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67327b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67337b58d2e0Smrg $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' 67342ec8c4b4Smrg 67357b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67367b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67377b58d2e0Smrg case $host_os in 67387b58d2e0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67397b58d2e0Smrg *) 67407b58d2e0Smrg # The compiler driver will combine and reorder linker options, 67417b58d2e0Smrg # but understands `-z linker_flag'. 67427b58d2e0Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67437b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67447b58d2e0Smrg ;; 67457b58d2e0Smrg esac 67467b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67472ec8c4b4Smrg 6748b12e5c03Smrg output_verbose_link_cmd='func_echo_all' 674909885543Smrg 67507b58d2e0Smrg # Archives containing C++ object files must be created using 67517b58d2e0Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67527b58d2e0Smrg # necessary to make sure instantiated templates are included 67537b58d2e0Smrg # in the archive. 67547b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67557b58d2e0Smrg ;; 67567b58d2e0Smrg gcx*) 67577b58d2e0Smrg # Green Hills C++ Compiler 67587b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 675909885543Smrg 67607b58d2e0Smrg # The C++ compiler must be used to create the archive. 67617b58d2e0Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67627b58d2e0Smrg ;; 67637b58d2e0Smrg *) 67647b58d2e0Smrg # GNU C++ compiler with Solaris linker 67657b58d2e0Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67667b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67677b58d2e0Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6768b12e5c03Smrg _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' 67697b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770b12e5c03Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 677109885543Smrg 67727b58d2e0Smrg # Commands to make compiler produce verbose output that lists 67737b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 67747b58d2e0Smrg # linking a shared library. 6775b12e5c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67767b58d2e0Smrg else 67777b58d2e0Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67787b58d2e0Smrg # platform. 67797b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67807b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67817b58d2e0Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 678209885543Smrg 67837b58d2e0Smrg # Commands to make compiler produce verbose output that lists 67847b58d2e0Smrg # what "hidden" libraries, object files and flags are used when 67857b58d2e0Smrg # linking a shared library. 6786b12e5c03Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67877b58d2e0Smrg fi 678809885543Smrg 67897b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67907b58d2e0Smrg case $host_os in 67917b58d2e0Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67927b58d2e0Smrg *) 67937b58d2e0Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67947b58d2e0Smrg ;; 67957b58d2e0Smrg esac 67967b58d2e0Smrg fi 67977b58d2e0Smrg ;; 67987b58d2e0Smrg esac 67997b58d2e0Smrg ;; 68007b58d2e0Smrg 68017b58d2e0Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 68027b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68037b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68047b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68057b58d2e0Smrg runpath_var='LD_RUN_PATH' 68067b58d2e0Smrg 68077b58d2e0Smrg case $cc_basename in 68087b58d2e0Smrg CC*) 68097b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68107b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68117b58d2e0Smrg ;; 6812b698ba48Smrg *) 68137b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68147b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68157b58d2e0Smrg ;; 6816b698ba48Smrg esac 6817b698ba48Smrg ;; 681809885543Smrg 68197b58d2e0Smrg sysv5* | sco3.2v5* | sco5v6*) 68207b58d2e0Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68217b58d2e0Smrg # link with -lc, and that would cause any symbols used from libc to 68227b58d2e0Smrg # always be unresolved, which means just about no library would 68237b58d2e0Smrg # ever link correctly. If we're not using GNU ld we use -z text 68247b58d2e0Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68257b58d2e0Smrg # as -z defs. 68267b58d2e0Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68277b58d2e0Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68287b58d2e0Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68297b58d2e0Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68307b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68317b58d2e0Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68327b58d2e0Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68337b58d2e0Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68347b58d2e0Smrg runpath_var='LD_RUN_PATH' 683509885543Smrg 68367b58d2e0Smrg case $cc_basename in 68377b58d2e0Smrg CC*) 68387b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68397b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6840b12e5c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6841b12e5c03Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6842b12e5c03Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6843b12e5c03Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68447b58d2e0Smrg ;; 68457b58d2e0Smrg *) 68467b58d2e0Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68477b58d2e0Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68487b58d2e0Smrg ;; 68497b58d2e0Smrg esac 6850b698ba48Smrg ;; 68517b58d2e0Smrg 68527b58d2e0Smrg tandem*) 68537b58d2e0Smrg case $cc_basename in 68547b58d2e0Smrg NCC*) 68557b58d2e0Smrg # NonStop-UX NCC 3.20 68567b58d2e0Smrg # FIXME: insert proper C++ library support 68577b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68587b58d2e0Smrg ;; 68597b58d2e0Smrg *) 68607b58d2e0Smrg # FIXME: insert proper C++ library support 68617b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68627b58d2e0Smrg ;; 68637b58d2e0Smrg esac 68647b58d2e0Smrg ;; 68657b58d2e0Smrg 68667b58d2e0Smrg vxworks*) 68677b58d2e0Smrg # FIXME: insert proper C++ library support 68687b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68697b58d2e0Smrg ;; 68707b58d2e0Smrg 68717b58d2e0Smrg *) 68727b58d2e0Smrg # FIXME: insert proper C++ library support 68737b58d2e0Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68747b58d2e0Smrg ;; 6875b698ba48Smrg esac 687609885543Smrg 68777b58d2e0Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68787b58d2e0Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 687909885543Smrg 68807b58d2e0Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68817b58d2e0Smrg _LT_TAGVAR(LD, $1)="$LD" 68827b58d2e0Smrg 68837b58d2e0Smrg ## CAVEAT EMPTOR: 68847b58d2e0Smrg ## There is no encapsulation within the following macros, do not change 68857b58d2e0Smrg ## the running order or otherwise move them around unless you know exactly 68867b58d2e0Smrg ## what you are doing... 68877b58d2e0Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68887b58d2e0Smrg _LT_COMPILER_PIC($1) 68897b58d2e0Smrg _LT_COMPILER_C_O($1) 68907b58d2e0Smrg _LT_COMPILER_FILE_LOCKS($1) 68917b58d2e0Smrg _LT_LINKER_SHLIBS($1) 68927b58d2e0Smrg _LT_SYS_DYNAMIC_LINKER($1) 68937b58d2e0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68947b58d2e0Smrg 68957b58d2e0Smrg _LT_CONFIG($1) 68967b58d2e0Smrg fi # test -n "$compiler" 68977b58d2e0Smrg 68987b58d2e0Smrg CC=$lt_save_CC 6899b12e5c03Smrg CFLAGS=$lt_save_CFLAGS 69007b58d2e0Smrg LDCXX=$LD 69017b58d2e0Smrg LD=$lt_save_LD 69027b58d2e0Smrg GCC=$lt_save_GCC 69037b58d2e0Smrg with_gnu_ld=$lt_save_with_gnu_ld 69047b58d2e0Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 69057b58d2e0Smrg lt_cv_path_LD=$lt_save_path_LD 69067b58d2e0Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69077b58d2e0Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69087b58d2e0Smrgfi # test "$_lt_caught_CXX_error" != yes 690909885543Smrg 69107b58d2e0SmrgAC_LANG_POP 69117b58d2e0Smrg])# _LT_LANG_CXX_CONFIG 691209885543Smrg 691309885543Smrg 6914b12e5c03Smrg# _LT_FUNC_STRIPNAME_CNF 6915b12e5c03Smrg# ---------------------- 6916b12e5c03Smrg# func_stripname_cnf prefix suffix name 6917b12e5c03Smrg# strip PREFIX and SUFFIX off of NAME. 6918b12e5c03Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6919b12e5c03Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6920b12e5c03Smrg# dot (in which case that matches only a dot). 6921b12e5c03Smrg# 6922b12e5c03Smrg# This function is identical to the (non-XSI) version of func_stripname, 6923b12e5c03Smrg# except this one can be used by m4 code that may be executed by configure, 6924b12e5c03Smrg# rather than the libtool script. 6925b12e5c03Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6926b12e5c03SmrgAC_REQUIRE([_LT_DECL_SED]) 6927b12e5c03SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6928b12e5c03Smrgfunc_stripname_cnf () 6929b12e5c03Smrg{ 6930b12e5c03Smrg case ${2} in 6931b12e5c03Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6932b12e5c03Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6933b12e5c03Smrg esac 6934b12e5c03Smrg} # func_stripname_cnf 6935b12e5c03Smrg])# _LT_FUNC_STRIPNAME_CNF 6936b12e5c03Smrg 69377b58d2e0Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69387b58d2e0Smrg# --------------------------------- 69397b58d2e0Smrg# Figure out "hidden" library dependencies from verbose 69407b58d2e0Smrg# compiler output when linking a shared library. 69417b58d2e0Smrg# Parse the compiler output and extract the necessary 69427b58d2e0Smrg# objects, libraries and library flags. 69437b58d2e0Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69447b58d2e0Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6945b12e5c03SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69467b58d2e0Smrg# Dependencies to place before and after the object being linked: 69477b58d2e0Smrg_LT_TAGVAR(predep_objects, $1)= 69487b58d2e0Smrg_LT_TAGVAR(postdep_objects, $1)= 69497b58d2e0Smrg_LT_TAGVAR(predeps, $1)= 69507b58d2e0Smrg_LT_TAGVAR(postdeps, $1)= 69517b58d2e0Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 695209885543Smrg 69537b58d2e0Smrgdnl we can't use the lt_simple_compile_test_code here, 69547b58d2e0Smrgdnl because it contains code intended for an executable, 69557b58d2e0Smrgdnl not a library. It's possible we should let each 69567b58d2e0Smrgdnl tag define a new lt_????_link_test_code variable, 69577b58d2e0Smrgdnl but it's only used here... 69587b58d2e0Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69597b58d2e0Smrgint a; 69607b58d2e0Smrgvoid foo (void) { a = 0; } 69617b58d2e0Smrg_LT_EOF 69627b58d2e0Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69637b58d2e0Smrgclass Foo 69647b58d2e0Smrg{ 69657b58d2e0Smrgpublic: 69667b58d2e0Smrg Foo (void) { a = 0; } 69677b58d2e0Smrgprivate: 69687b58d2e0Smrg int a; 69697b58d2e0Smrg}; 69707b58d2e0Smrg_LT_EOF 69717b58d2e0Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69727b58d2e0Smrg subroutine foo 69737b58d2e0Smrg implicit none 69747b58d2e0Smrg integer*4 a 69757b58d2e0Smrg a=0 69767b58d2e0Smrg return 69777b58d2e0Smrg end 69787b58d2e0Smrg_LT_EOF 69797b58d2e0Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69807b58d2e0Smrg subroutine foo 69817b58d2e0Smrg implicit none 69827b58d2e0Smrg integer a 69837b58d2e0Smrg a=0 69847b58d2e0Smrg return 69857b58d2e0Smrg end 69867b58d2e0Smrg_LT_EOF 69877b58d2e0Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69887b58d2e0Smrgpublic class foo { 69897b58d2e0Smrg private int a; 69907b58d2e0Smrg public void bar (void) { 69917b58d2e0Smrg a = 0; 69927b58d2e0Smrg } 69937b58d2e0Smrg}; 69947b58d2e0Smrg_LT_EOF 6995b12e5c03Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6996b12e5c03Smrgpackage foo 6997b12e5c03Smrgfunc foo() { 6998b12e5c03Smrg} 6999b12e5c03Smrg_LT_EOF 70007b58d2e0Smrg]) 7001b12e5c03Smrg 7002b12e5c03Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7003b12e5c03Smrgcase "$CC $CFLAGS " in #( 7004b12e5c03Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7005b12e5c03Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7006b12e5c03Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7007b12e5c03Smrgesac 7008b12e5c03Smrg 70097b58d2e0Smrgdnl Parse the compiler output and extract the necessary 70107b58d2e0Smrgdnl objects, libraries and library flags. 70117b58d2e0Smrgif AC_TRY_EVAL(ac_compile); then 70127b58d2e0Smrg # Parse the compiler output and extract the necessary 70137b58d2e0Smrg # objects, libraries and library flags. 701409885543Smrg 70157b58d2e0Smrg # Sentinel used to keep track of whether or not we are before 70167b58d2e0Smrg # the conftest object file. 70177b58d2e0Smrg pre_test_object_deps_done=no 701809885543Smrg 70197b58d2e0Smrg for p in `eval "$output_verbose_link_cmd"`; do 7020b12e5c03Smrg case ${prev}${p} in 702109885543Smrg 70227b58d2e0Smrg -L* | -R* | -l*) 70237b58d2e0Smrg # Some compilers place space between "-{L,R}" and the path. 70247b58d2e0Smrg # Remove the space. 70257b58d2e0Smrg if test $p = "-L" || 70267b58d2e0Smrg test $p = "-R"; then 70277b58d2e0Smrg prev=$p 70287b58d2e0Smrg continue 70297b58d2e0Smrg fi 703009885543Smrg 7031b12e5c03Smrg # Expand the sysroot to ease extracting the directories later. 7032b12e5c03Smrg if test -z "$prev"; then 7033b12e5c03Smrg case $p in 7034b12e5c03Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7035b12e5c03Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7036b12e5c03Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7037b12e5c03Smrg esac 7038b12e5c03Smrg fi 7039b12e5c03Smrg case $p in 7040b12e5c03Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7041b12e5c03Smrg esac 70427b58d2e0Smrg if test "$pre_test_object_deps_done" = no; then 7043b12e5c03Smrg case ${prev} in 7044b12e5c03Smrg -L | -R) 70457b58d2e0Smrg # Internal compiler library paths should come after those 70467b58d2e0Smrg # provided the user. The postdeps already come after the 70477b58d2e0Smrg # user supplied libs so there is no need to process them. 70487b58d2e0Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70497b58d2e0Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70507b58d2e0Smrg else 70517b58d2e0Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70527b58d2e0Smrg fi 70537b58d2e0Smrg ;; 70547b58d2e0Smrg # The "-l" case would never come before the object being 70557b58d2e0Smrg # linked, so don't bother handling this case. 70567b58d2e0Smrg esac 70577b58d2e0Smrg else 70587b58d2e0Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70597b58d2e0Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70607b58d2e0Smrg else 70617b58d2e0Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70627b58d2e0Smrg fi 70637b58d2e0Smrg fi 7064b12e5c03Smrg prev= 70657b58d2e0Smrg ;; 706609885543Smrg 7067b12e5c03Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70687b58d2e0Smrg *.$objext) 70697b58d2e0Smrg # This assumes that the test object file only shows up 70707b58d2e0Smrg # once in the compiler output. 70717b58d2e0Smrg if test "$p" = "conftest.$objext"; then 70727b58d2e0Smrg pre_test_object_deps_done=yes 70737b58d2e0Smrg continue 70747b58d2e0Smrg fi 70757b58d2e0Smrg 70767b58d2e0Smrg if test "$pre_test_object_deps_done" = no; then 70777b58d2e0Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70787b58d2e0Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70797b58d2e0Smrg else 70807b58d2e0Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70817b58d2e0Smrg fi 70827b58d2e0Smrg else 70837b58d2e0Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70847b58d2e0Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70857b58d2e0Smrg else 70867b58d2e0Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70877b58d2e0Smrg fi 70887b58d2e0Smrg fi 70897b58d2e0Smrg ;; 709009885543Smrg 70917b58d2e0Smrg *) ;; # Ignore the rest. 709209885543Smrg 70937b58d2e0Smrg esac 70947b58d2e0Smrg done 709509885543Smrg 70967b58d2e0Smrg # Clean up. 70977b58d2e0Smrg rm -f a.out a.exe 70987b58d2e0Smrgelse 70997b58d2e0Smrg echo "libtool.m4: error: problem compiling $1 test program" 71007b58d2e0Smrgfi 710109885543Smrg 71027b58d2e0Smrg$RM -f confest.$objext 7103b12e5c03SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 710409885543Smrg 71057b58d2e0Smrg# PORTME: override above test on systems where it is broken 71067b58d2e0Smrgm4_if([$1], [CXX], 71077b58d2e0Smrg[case $host_os in 71087b58d2e0Smrginterix[[3-9]]*) 71097b58d2e0Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71107b58d2e0Smrg # hack all around it, let's just trust "g++" to DTRT. 71117b58d2e0Smrg _LT_TAGVAR(predep_objects,$1)= 71127b58d2e0Smrg _LT_TAGVAR(postdep_objects,$1)= 71137b58d2e0Smrg _LT_TAGVAR(postdeps,$1)= 71147b58d2e0Smrg ;; 711509885543Smrg 71167b58d2e0Smrglinux*) 71177b58d2e0Smrg case `$CC -V 2>&1 | sed 5q` in 71187b58d2e0Smrg *Sun\ C*) 71197b58d2e0Smrg # Sun C++ 5.9 71207b58d2e0Smrg 71217b58d2e0Smrg # The more standards-conforming stlport4 library is 71227b58d2e0Smrg # incompatible with the Cstd library. Avoid specifying 71237b58d2e0Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71247b58d2e0Smrg # -library=stlport4 depends on it. 71257b58d2e0Smrg case " $CXX $CXXFLAGS " in 71267b58d2e0Smrg *" -library=stlport4 "*) 71277b58d2e0Smrg solaris_use_stlport4=yes 7128b698ba48Smrg ;; 71297b58d2e0Smrg esac 713009885543Smrg 71317b58d2e0Smrg if test "$solaris_use_stlport4" != yes; then 71327b58d2e0Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71337b58d2e0Smrg fi 71347b58d2e0Smrg ;; 71357b58d2e0Smrg esac 71367b58d2e0Smrg ;; 713709885543Smrg 71387b58d2e0Smrgsolaris*) 71397b58d2e0Smrg case $cc_basename in 7140b12e5c03Smrg CC* | sunCC*) 71417b58d2e0Smrg # The more standards-conforming stlport4 library is 71427b58d2e0Smrg # incompatible with the Cstd library. Avoid specifying 71437b58d2e0Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71447b58d2e0Smrg # -library=stlport4 depends on it. 71457b58d2e0Smrg case " $CXX $CXXFLAGS " in 71467b58d2e0Smrg *" -library=stlport4 "*) 71477b58d2e0Smrg solaris_use_stlport4=yes 7148b698ba48Smrg ;; 71497b58d2e0Smrg esac 715009885543Smrg 71517b58d2e0Smrg # Adding this requires a known-good setup of shared libraries for 71527b58d2e0Smrg # Sun compiler versions before 5.6, else PIC objects from an old 71537b58d2e0Smrg # archive will be linked into the output, leading to subtle bugs. 71547b58d2e0Smrg if test "$solaris_use_stlport4" != yes; then 71557b58d2e0Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71567b58d2e0Smrg fi 71577b58d2e0Smrg ;; 71587b58d2e0Smrg esac 71597b58d2e0Smrg ;; 71607b58d2e0Smrgesac 71617b58d2e0Smrg]) 716209885543Smrg 71637b58d2e0Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 71647b58d2e0Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71657b58d2e0Smrgesac 71667b58d2e0Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71677b58d2e0Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71687b58d2e0Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71697b58d2e0Smrgfi 71707b58d2e0Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71717b58d2e0Smrg [The directories searched by this compiler when creating a shared library]) 71727b58d2e0Smrg_LT_TAGDECL([], [predep_objects], [1], 71737b58d2e0Smrg [Dependencies to place before and after the objects being linked to 71747b58d2e0Smrg create a shared library]) 71757b58d2e0Smrg_LT_TAGDECL([], [postdep_objects], [1]) 71767b58d2e0Smrg_LT_TAGDECL([], [predeps], [1]) 71777b58d2e0Smrg_LT_TAGDECL([], [postdeps], [1]) 71787b58d2e0Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71797b58d2e0Smrg [The library search path used internally by the compiler when linking 71807b58d2e0Smrg a shared library]) 71817b58d2e0Smrg])# _LT_SYS_HIDDEN_LIBDEPS 718209885543Smrg 71832ec8c4b4Smrg 71847b58d2e0Smrg# _LT_LANG_F77_CONFIG([TAG]) 71857b58d2e0Smrg# -------------------------- 71867b58d2e0Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 71877b58d2e0Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71887b58d2e0Smrg# to write the compiler configuration to `libtool'. 71897b58d2e0Smrgm4_defun([_LT_LANG_F77_CONFIG], 7190b12e5c03Smrg[AC_LANG_PUSH(Fortran 77) 7191b12e5c03Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7192b12e5c03Smrg _lt_disable_F77=yes 7193b12e5c03Smrgfi 71947b58d2e0Smrg 71957b58d2e0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71967b58d2e0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71977b58d2e0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71987b58d2e0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71997b58d2e0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 72007b58d2e0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 72017b58d2e0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 72027b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 72037b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 72047b58d2e0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 72057b58d2e0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 72067b58d2e0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 72077b58d2e0Smrg_LT_TAGVAR(module_cmds, $1)= 72087b58d2e0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 72097b58d2e0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72107b58d2e0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7211b12e5c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7212b12e5c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72137b58d2e0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 72147b58d2e0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72157b58d2e0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 721609885543Smrg 72177b58d2e0Smrg# Source file extension for f77 test sources. 72187b58d2e0Smrgac_ext=f 721909885543Smrg 72207b58d2e0Smrg# Object file extension for compiled f77 test sources. 72217b58d2e0Smrgobjext=o 72227b58d2e0Smrg_LT_TAGVAR(objext, $1)=$objext 7223e4f6584cSmrg 72247b58d2e0Smrg# No sense in running all these tests if we already determined that 72257b58d2e0Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 72267b58d2e0Smrg# are currently assumed to apply to all compilers on this platform, 72277b58d2e0Smrg# and will be corrupted by setting them based on a non-working compiler. 72287b58d2e0Smrgif test "$_lt_disable_F77" != yes; then 72297b58d2e0Smrg # Code to be used in simple compile tests 72307b58d2e0Smrg lt_simple_compile_test_code="\ 72317b58d2e0Smrg subroutine t 72327b58d2e0Smrg return 72337b58d2e0Smrg end 72347b58d2e0Smrg" 723509885543Smrg 72367b58d2e0Smrg # Code to be used in simple link tests 72377b58d2e0Smrg lt_simple_link_test_code="\ 72387b58d2e0Smrg program t 72397b58d2e0Smrg end 72407b58d2e0Smrg" 724109885543Smrg 72427b58d2e0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72437b58d2e0Smrg _LT_TAG_COMPILER 724409885543Smrg 72457b58d2e0Smrg # save warnings/boilerplate of simple test code 72467b58d2e0Smrg _LT_COMPILER_BOILERPLATE 72477b58d2e0Smrg _LT_LINKER_BOILERPLATE 724809885543Smrg 72497b58d2e0Smrg # Allow CC to be a program name with arguments. 72507b58d2e0Smrg lt_save_CC="$CC" 72517b58d2e0Smrg lt_save_GCC=$GCC 7252b12e5c03Smrg lt_save_CFLAGS=$CFLAGS 72537b58d2e0Smrg CC=${F77-"f77"} 7254b12e5c03Smrg CFLAGS=$FFLAGS 72557b58d2e0Smrg compiler=$CC 72567b58d2e0Smrg _LT_TAGVAR(compiler, $1)=$CC 72577b58d2e0Smrg _LT_CC_BASENAME([$compiler]) 72587b58d2e0Smrg GCC=$G77 72597b58d2e0Smrg if test -n "$compiler"; then 72607b58d2e0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72617b58d2e0Smrg AC_MSG_RESULT([$can_build_shared]) 726209885543Smrg 72637b58d2e0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72647b58d2e0Smrg test "$can_build_shared" = "no" && enable_shared=no 726509885543Smrg 72667b58d2e0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72677b58d2e0Smrg # are all built from PIC. 72687b58d2e0Smrg case $host_os in 72697b58d2e0Smrg aix3*) 72707b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 72717b58d2e0Smrg if test -n "$RANLIB"; then 72727b58d2e0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72737b58d2e0Smrg postinstall_cmds='$RANLIB $lib' 72747b58d2e0Smrg fi 72757b58d2e0Smrg ;; 72767b58d2e0Smrg aix[[4-9]]*) 72777b58d2e0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72787b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 72797104f784Smrg fi 72807b58d2e0Smrg ;; 72817b58d2e0Smrg esac 72827b58d2e0Smrg AC_MSG_RESULT([$enable_shared]) 728309885543Smrg 72847b58d2e0Smrg AC_MSG_CHECKING([whether to build static libraries]) 72857b58d2e0Smrg # Make sure either enable_shared or enable_static is yes. 72867b58d2e0Smrg test "$enable_shared" = yes || enable_static=yes 72877b58d2e0Smrg AC_MSG_RESULT([$enable_static]) 728809885543Smrg 72897b58d2e0Smrg _LT_TAGVAR(GCC, $1)="$G77" 72907b58d2e0Smrg _LT_TAGVAR(LD, $1)="$LD" 729109885543Smrg 72927b58d2e0Smrg ## CAVEAT EMPTOR: 72937b58d2e0Smrg ## There is no encapsulation within the following macros, do not change 72947b58d2e0Smrg ## the running order or otherwise move them around unless you know exactly 72957b58d2e0Smrg ## what you are doing... 72967b58d2e0Smrg _LT_COMPILER_PIC($1) 72977b58d2e0Smrg _LT_COMPILER_C_O($1) 72987b58d2e0Smrg _LT_COMPILER_FILE_LOCKS($1) 72997b58d2e0Smrg _LT_LINKER_SHLIBS($1) 73007b58d2e0Smrg _LT_SYS_DYNAMIC_LINKER($1) 73017b58d2e0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 730209885543Smrg 73037b58d2e0Smrg _LT_CONFIG($1) 73047b58d2e0Smrg fi # test -n "$compiler" 730509885543Smrg 73067b58d2e0Smrg GCC=$lt_save_GCC 73077b58d2e0Smrg CC="$lt_save_CC" 7308b12e5c03Smrg CFLAGS="$lt_save_CFLAGS" 73097b58d2e0Smrgfi # test "$_lt_disable_F77" != yes 73107b58d2e0Smrg 73117b58d2e0SmrgAC_LANG_POP 73127b58d2e0Smrg])# _LT_LANG_F77_CONFIG 731309885543Smrg 731409885543Smrg 73157b58d2e0Smrg# _LT_LANG_FC_CONFIG([TAG]) 73167b58d2e0Smrg# ------------------------- 73177b58d2e0Smrg# Ensure that the configuration variables for a Fortran compiler are 73187b58d2e0Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73197b58d2e0Smrg# to write the compiler configuration to `libtool'. 73207b58d2e0Smrgm4_defun([_LT_LANG_FC_CONFIG], 7321b12e5c03Smrg[AC_LANG_PUSH(Fortran) 7322b12e5c03Smrg 7323b12e5c03Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7324b12e5c03Smrg _lt_disable_FC=yes 7325b12e5c03Smrgfi 7326e4f6584cSmrg 73277b58d2e0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73287b58d2e0Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 73297b58d2e0Smrg_LT_TAGVAR(always_export_symbols, $1)=no 73307b58d2e0Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73317b58d2e0Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73327b58d2e0Smrg_LT_TAGVAR(hardcode_direct, $1)=no 73337b58d2e0Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73347b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73357b58d2e0Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73367b58d2e0Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73377b58d2e0Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 73387b58d2e0Smrg_LT_TAGVAR(inherit_rpath, $1)=no 73397b58d2e0Smrg_LT_TAGVAR(module_cmds, $1)= 73407b58d2e0Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 73417b58d2e0Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73427b58d2e0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7343b12e5c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7344b12e5c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73457b58d2e0Smrg_LT_TAGVAR(no_undefined_flag, $1)= 73467b58d2e0Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73477b58d2e0Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7348e4f6584cSmrg 73497b58d2e0Smrg# Source file extension for fc test sources. 73507b58d2e0Smrgac_ext=${ac_fc_srcext-f} 7351e4f6584cSmrg 73527b58d2e0Smrg# Object file extension for compiled fc test sources. 73537b58d2e0Smrgobjext=o 73547b58d2e0Smrg_LT_TAGVAR(objext, $1)=$objext 735509885543Smrg 73567b58d2e0Smrg# No sense in running all these tests if we already determined that 73577b58d2e0Smrg# the FC compiler isn't working. Some variables (like enable_shared) 73587b58d2e0Smrg# are currently assumed to apply to all compilers on this platform, 73597b58d2e0Smrg# and will be corrupted by setting them based on a non-working compiler. 73607b58d2e0Smrgif test "$_lt_disable_FC" != yes; then 73617b58d2e0Smrg # Code to be used in simple compile tests 73627b58d2e0Smrg lt_simple_compile_test_code="\ 73637b58d2e0Smrg subroutine t 73647b58d2e0Smrg return 73657b58d2e0Smrg end 73667b58d2e0Smrg" 736709885543Smrg 73687b58d2e0Smrg # Code to be used in simple link tests 73697b58d2e0Smrg lt_simple_link_test_code="\ 73707b58d2e0Smrg program t 73717b58d2e0Smrg end 73727b58d2e0Smrg" 737309885543Smrg 73747b58d2e0Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73757b58d2e0Smrg _LT_TAG_COMPILER 737609885543Smrg 73777b58d2e0Smrg # save warnings/boilerplate of simple test code 73787b58d2e0Smrg _LT_COMPILER_BOILERPLATE 73797b58d2e0Smrg _LT_LINKER_BOILERPLATE 73807b58d2e0Smrg 73817b58d2e0Smrg # Allow CC to be a program name with arguments. 73827b58d2e0Smrg lt_save_CC="$CC" 73837b58d2e0Smrg lt_save_GCC=$GCC 7384b12e5c03Smrg lt_save_CFLAGS=$CFLAGS 73857b58d2e0Smrg CC=${FC-"f95"} 7386b12e5c03Smrg CFLAGS=$FCFLAGS 73877b58d2e0Smrg compiler=$CC 73887b58d2e0Smrg GCC=$ac_cv_fc_compiler_gnu 7389e4f6584cSmrg 73907b58d2e0Smrg _LT_TAGVAR(compiler, $1)=$CC 73917b58d2e0Smrg _LT_CC_BASENAME([$compiler]) 7392e4f6584cSmrg 73937b58d2e0Smrg if test -n "$compiler"; then 73947b58d2e0Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73957b58d2e0Smrg AC_MSG_RESULT([$can_build_shared]) 739609885543Smrg 73977b58d2e0Smrg AC_MSG_CHECKING([whether to build shared libraries]) 73987b58d2e0Smrg test "$can_build_shared" = "no" && enable_shared=no 739909885543Smrg 74007b58d2e0Smrg # On AIX, shared libraries and static libraries use the same namespace, and 74017b58d2e0Smrg # are all built from PIC. 74027b58d2e0Smrg case $host_os in 74037b58d2e0Smrg aix3*) 74047b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 74057b58d2e0Smrg if test -n "$RANLIB"; then 74067b58d2e0Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 74077b58d2e0Smrg postinstall_cmds='$RANLIB $lib' 74087b58d2e0Smrg fi 74097b58d2e0Smrg ;; 74107b58d2e0Smrg aix[[4-9]]*) 74117b58d2e0Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74127b58d2e0Smrg test "$enable_shared" = yes && enable_static=no 74137b58d2e0Smrg fi 74147b58d2e0Smrg ;; 74157b58d2e0Smrg esac 74167b58d2e0Smrg AC_MSG_RESULT([$enable_shared]) 74177b58d2e0Smrg 74187b58d2e0Smrg AC_MSG_CHECKING([whether to build static libraries]) 74197b58d2e0Smrg # Make sure either enable_shared or enable_static is yes. 74207b58d2e0Smrg test "$enable_shared" = yes || enable_static=yes 74217b58d2e0Smrg AC_MSG_RESULT([$enable_static]) 74227b58d2e0Smrg 74237b58d2e0Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74247b58d2e0Smrg _LT_TAGVAR(LD, $1)="$LD" 74257b58d2e0Smrg 74267b58d2e0Smrg ## CAVEAT EMPTOR: 74277b58d2e0Smrg ## There is no encapsulation within the following macros, do not change 74287b58d2e0Smrg ## the running order or otherwise move them around unless you know exactly 74297b58d2e0Smrg ## what you are doing... 74307b58d2e0Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74317b58d2e0Smrg _LT_COMPILER_PIC($1) 74327b58d2e0Smrg _LT_COMPILER_C_O($1) 74337b58d2e0Smrg _LT_COMPILER_FILE_LOCKS($1) 74347b58d2e0Smrg _LT_LINKER_SHLIBS($1) 74357b58d2e0Smrg _LT_SYS_DYNAMIC_LINKER($1) 74367b58d2e0Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74377b58d2e0Smrg 74387b58d2e0Smrg _LT_CONFIG($1) 74397b58d2e0Smrg fi # test -n "$compiler" 74407b58d2e0Smrg 74417b58d2e0Smrg GCC=$lt_save_GCC 7442b12e5c03Smrg CC=$lt_save_CC 7443b12e5c03Smrg CFLAGS=$lt_save_CFLAGS 74447b58d2e0Smrgfi # test "$_lt_disable_FC" != yes 74457b58d2e0Smrg 74467b58d2e0SmrgAC_LANG_POP 74477b58d2e0Smrg])# _LT_LANG_FC_CONFIG 74487b58d2e0Smrg 74497b58d2e0Smrg 74507b58d2e0Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 74517b58d2e0Smrg# -------------------------- 74527b58d2e0Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74537b58d2e0Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74547b58d2e0Smrg# to write the compiler configuration to `libtool'. 74557b58d2e0Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 74567b58d2e0Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74577b58d2e0SmrgAC_LANG_SAVE 74587b58d2e0Smrg 74597b58d2e0Smrg# Source file extension for Java test sources. 74607b58d2e0Smrgac_ext=java 74617b58d2e0Smrg 74627b58d2e0Smrg# Object file extension for compiled Java test sources. 7463e4f6584cSmrgobjext=o 7464e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 746509885543Smrg 7466e4f6584cSmrg# Code to be used in simple compile tests 74677b58d2e0Smrglt_simple_compile_test_code="class foo {}" 746809885543Smrg 7469e4f6584cSmrg# Code to be used in simple link tests 74707b58d2e0Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 747109885543Smrg 74727b58d2e0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7473e4f6584cSmrg_LT_TAG_COMPILER 747409885543Smrg 7475e4f6584cSmrg# save warnings/boilerplate of simple test code 7476e4f6584cSmrg_LT_COMPILER_BOILERPLATE 7477e4f6584cSmrg_LT_LINKER_BOILERPLATE 747809885543Smrg 74797b58d2e0Smrg# Allow CC to be a program name with arguments. 7480b12e5c03Smrglt_save_CC=$CC 7481b12e5c03Smrglt_save_CFLAGS=$CFLAGS 74827b58d2e0Smrglt_save_GCC=$GCC 74837b58d2e0SmrgGCC=yes 74847b58d2e0SmrgCC=${GCJ-"gcj"} 7485b12e5c03SmrgCFLAGS=$GCJFLAGS 74867b58d2e0Smrgcompiler=$CC 74877b58d2e0Smrg_LT_TAGVAR(compiler, $1)=$CC 74887b58d2e0Smrg_LT_TAGVAR(LD, $1)="$LD" 74897b58d2e0Smrg_LT_CC_BASENAME([$compiler]) 74907b58d2e0Smrg 74917b58d2e0Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74927b58d2e0Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74937b58d2e0Smrg 74947b58d2e0Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7495b12e5c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7496b12e5c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74977b58d2e0Smrg 7498e4f6584cSmrgif test -n "$compiler"; then 7499e4f6584cSmrg _LT_COMPILER_NO_RTTI($1) 7500e4f6584cSmrg _LT_COMPILER_PIC($1) 7501e4f6584cSmrg _LT_COMPILER_C_O($1) 7502e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 7503e4f6584cSmrg _LT_LINKER_SHLIBS($1) 7504e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7505e4f6584cSmrg 75067b58d2e0Smrg _LT_CONFIG($1) 75077b58d2e0Smrgfi 7508e4f6584cSmrg 75097b58d2e0SmrgAC_LANG_RESTORE 7510e4f6584cSmrg 75117b58d2e0SmrgGCC=$lt_save_GCC 7512b12e5c03SmrgCC=$lt_save_CC 7513b12e5c03SmrgCFLAGS=$lt_save_CFLAGS 75147b58d2e0Smrg])# _LT_LANG_GCJ_CONFIG 75152ec8c4b4Smrg 7516e4f6584cSmrg 7517b12e5c03Smrg# _LT_LANG_GO_CONFIG([TAG]) 7518b12e5c03Smrg# -------------------------- 7519b12e5c03Smrg# Ensure that the configuration variables for the GNU Go compiler 7520b12e5c03Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7521b12e5c03Smrg# to write the compiler configuration to `libtool'. 7522b12e5c03Smrgm4_defun([_LT_LANG_GO_CONFIG], 7523b12e5c03Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7524b12e5c03SmrgAC_LANG_SAVE 7525b12e5c03Smrg 7526b12e5c03Smrg# Source file extension for Go test sources. 7527b12e5c03Smrgac_ext=go 7528b12e5c03Smrg 7529b12e5c03Smrg# Object file extension for compiled Go test sources. 7530b12e5c03Smrgobjext=o 7531b12e5c03Smrg_LT_TAGVAR(objext, $1)=$objext 7532b12e5c03Smrg 7533b12e5c03Smrg# Code to be used in simple compile tests 7534b12e5c03Smrglt_simple_compile_test_code="package main; func main() { }" 7535b12e5c03Smrg 7536b12e5c03Smrg# Code to be used in simple link tests 7537b12e5c03Smrglt_simple_link_test_code='package main; func main() { }' 7538b12e5c03Smrg 7539b12e5c03Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7540b12e5c03Smrg_LT_TAG_COMPILER 7541b12e5c03Smrg 7542b12e5c03Smrg# save warnings/boilerplate of simple test code 7543b12e5c03Smrg_LT_COMPILER_BOILERPLATE 7544b12e5c03Smrg_LT_LINKER_BOILERPLATE 7545b12e5c03Smrg 7546b12e5c03Smrg# Allow CC to be a program name with arguments. 7547b12e5c03Smrglt_save_CC=$CC 7548b12e5c03Smrglt_save_CFLAGS=$CFLAGS 7549b12e5c03Smrglt_save_GCC=$GCC 7550b12e5c03SmrgGCC=yes 7551b12e5c03SmrgCC=${GOC-"gccgo"} 7552b12e5c03SmrgCFLAGS=$GOFLAGS 7553b12e5c03Smrgcompiler=$CC 7554b12e5c03Smrg_LT_TAGVAR(compiler, $1)=$CC 7555b12e5c03Smrg_LT_TAGVAR(LD, $1)="$LD" 7556b12e5c03Smrg_LT_CC_BASENAME([$compiler]) 7557b12e5c03Smrg 7558b12e5c03Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7559b12e5c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7560b12e5c03Smrg 7561b12e5c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7562b12e5c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7563b12e5c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7564b12e5c03Smrg 7565b12e5c03Smrgif test -n "$compiler"; then 7566b12e5c03Smrg _LT_COMPILER_NO_RTTI($1) 7567b12e5c03Smrg _LT_COMPILER_PIC($1) 7568b12e5c03Smrg _LT_COMPILER_C_O($1) 7569b12e5c03Smrg _LT_COMPILER_FILE_LOCKS($1) 7570b12e5c03Smrg _LT_LINKER_SHLIBS($1) 7571b12e5c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7572b12e5c03Smrg 7573b12e5c03Smrg _LT_CONFIG($1) 7574b12e5c03Smrgfi 7575b12e5c03Smrg 7576b12e5c03SmrgAC_LANG_RESTORE 7577b12e5c03Smrg 7578b12e5c03SmrgGCC=$lt_save_GCC 7579b12e5c03SmrgCC=$lt_save_CC 7580b12e5c03SmrgCFLAGS=$lt_save_CFLAGS 7581b12e5c03Smrg])# _LT_LANG_GO_CONFIG 7582b12e5c03Smrg 7583b12e5c03Smrg 75847b58d2e0Smrg# _LT_LANG_RC_CONFIG([TAG]) 75857b58d2e0Smrg# ------------------------- 75867b58d2e0Smrg# Ensure that the configuration variables for the Windows resource compiler 75877b58d2e0Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75887b58d2e0Smrg# to write the compiler configuration to `libtool'. 75897b58d2e0Smrgm4_defun([_LT_LANG_RC_CONFIG], 75907b58d2e0Smrg[AC_REQUIRE([LT_PROG_RC])dnl 75917b58d2e0SmrgAC_LANG_SAVE 759209885543Smrg 75937b58d2e0Smrg# Source file extension for RC test sources. 75947b58d2e0Smrgac_ext=rc 75957104f784Smrg 75967b58d2e0Smrg# Object file extension for compiled RC test sources. 75977b58d2e0Smrgobjext=o 75987b58d2e0Smrg_LT_TAGVAR(objext, $1)=$objext 75997104f784Smrg 76007b58d2e0Smrg# Code to be used in simple compile tests 76017b58d2e0Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 76027104f784Smrg 76037b58d2e0Smrg# Code to be used in simple link tests 76047b58d2e0Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 76057104f784Smrg 76067b58d2e0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 76077b58d2e0Smrg_LT_TAG_COMPILER 7608e4f6584cSmrg 76097b58d2e0Smrg# save warnings/boilerplate of simple test code 76107b58d2e0Smrg_LT_COMPILER_BOILERPLATE 76117b58d2e0Smrg_LT_LINKER_BOILERPLATE 7612e4f6584cSmrg 76137b58d2e0Smrg# Allow CC to be a program name with arguments. 76147b58d2e0Smrglt_save_CC="$CC" 7615b12e5c03Smrglt_save_CFLAGS=$CFLAGS 76167b58d2e0Smrglt_save_GCC=$GCC 76177b58d2e0SmrgGCC= 76187b58d2e0SmrgCC=${RC-"windres"} 7619b12e5c03SmrgCFLAGS= 76207b58d2e0Smrgcompiler=$CC 76217b58d2e0Smrg_LT_TAGVAR(compiler, $1)=$CC 76227b58d2e0Smrg_LT_CC_BASENAME([$compiler]) 76237b58d2e0Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7624e4f6584cSmrg 76257b58d2e0Smrgif test -n "$compiler"; then 76267b58d2e0Smrg : 76277b58d2e0Smrg _LT_CONFIG($1) 76287b58d2e0Smrgfi 76297b58d2e0Smrg 76307b58d2e0SmrgGCC=$lt_save_GCC 76317b58d2e0SmrgAC_LANG_RESTORE 7632b12e5c03SmrgCC=$lt_save_CC 7633b12e5c03SmrgCFLAGS=$lt_save_CFLAGS 76347b58d2e0Smrg])# _LT_LANG_RC_CONFIG 76357b58d2e0Smrg 76367b58d2e0Smrg 76377b58d2e0Smrg# LT_PROG_GCJ 76387b58d2e0Smrg# ----------- 76397b58d2e0SmrgAC_DEFUN([LT_PROG_GCJ], 76407b58d2e0Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76417b58d2e0Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76427b58d2e0Smrg [AC_CHECK_TOOL(GCJ, gcj,) 76437b58d2e0Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76447b58d2e0Smrg AC_SUBST(GCJFLAGS)])])[]dnl 76457b58d2e0Smrg]) 76467b58d2e0Smrg 76477b58d2e0Smrg# Old name: 76487b58d2e0SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76497b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 76507b58d2e0Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7651e4f6584cSmrg 7652e4f6584cSmrg 7653b12e5c03Smrg# LT_PROG_GO 7654b12e5c03Smrg# ---------- 7655b12e5c03SmrgAC_DEFUN([LT_PROG_GO], 7656b12e5c03Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7657b12e5c03Smrg]) 7658b12e5c03Smrg 7659b12e5c03Smrg 76607b58d2e0Smrg# LT_PROG_RC 76617b58d2e0Smrg# ---------- 76627b58d2e0SmrgAC_DEFUN([LT_PROG_RC], 76637b58d2e0Smrg[AC_CHECK_TOOL(RC, windres,) 76647b58d2e0Smrg]) 7665e4f6584cSmrg 76667b58d2e0Smrg# Old name: 76677b58d2e0SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76687b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 76697b58d2e0Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7670e4f6584cSmrg 7671e4f6584cSmrg 76727b58d2e0Smrg# _LT_DECL_EGREP 76737b58d2e0Smrg# -------------- 76747b58d2e0Smrg# If we don't have a new enough Autoconf to choose the best grep 76757b58d2e0Smrg# available, choose the one first in the user's PATH. 76767b58d2e0Smrgm4_defun([_LT_DECL_EGREP], 76777b58d2e0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76787b58d2e0SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76797b58d2e0Smrgtest -z "$GREP" && GREP=grep 76807b58d2e0Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76817b58d2e0Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76827b58d2e0Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76837b58d2e0Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76847b58d2e0SmrgAC_SUBST([GREP]) 76857b58d2e0Smrg]) 7686e4f6584cSmrg 7687e4f6584cSmrg 76887b58d2e0Smrg# _LT_DECL_OBJDUMP 76897b58d2e0Smrg# -------------- 76907b58d2e0Smrg# If we don't have a new enough Autoconf to choose the best objdump 76917b58d2e0Smrg# available, choose the one first in the user's PATH. 76927b58d2e0Smrgm4_defun([_LT_DECL_OBJDUMP], 76937b58d2e0Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76947b58d2e0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76957b58d2e0Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76967b58d2e0SmrgAC_SUBST([OBJDUMP]) 76977b58d2e0Smrg]) 76982ec8c4b4Smrg 7699b12e5c03Smrg# _LT_DECL_DLLTOOL 7700b12e5c03Smrg# ---------------- 7701b12e5c03Smrg# Ensure DLLTOOL variable is set. 7702b12e5c03Smrgm4_defun([_LT_DECL_DLLTOOL], 7703b12e5c03Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7704b12e5c03Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7705b12e5c03Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7706b12e5c03SmrgAC_SUBST([DLLTOOL]) 7707b12e5c03Smrg]) 770809885543Smrg 77097b58d2e0Smrg# _LT_DECL_SED 77107b58d2e0Smrg# ------------ 77117b58d2e0Smrg# Check for a fully-functional sed program, that truncates 77127b58d2e0Smrg# as few characters as possible. Prefer GNU sed if found. 77137b58d2e0Smrgm4_defun([_LT_DECL_SED], 77147b58d2e0Smrg[AC_PROG_SED 77157b58d2e0Smrgtest -z "$SED" && SED=sed 77167b58d2e0SmrgXsed="$SED -e 1s/^X//" 77177b58d2e0Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77187b58d2e0Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77197b58d2e0Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77207b58d2e0Smrg])# _LT_DECL_SED 772109885543Smrg 77227b58d2e0Smrgm4_ifndef([AC_PROG_SED], [ 77237b58d2e0Smrg# NOTE: This macro has been submitted for inclusion into # 77247b58d2e0Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77257b58d2e0Smrg# a released version of Autoconf we should remove this # 77267b58d2e0Smrg# macro and use it instead. # 772709885543Smrg 77287b58d2e0Smrgm4_defun([AC_PROG_SED], 77297b58d2e0Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77307b58d2e0SmrgAC_CACHE_VAL(lt_cv_path_SED, 77317b58d2e0Smrg[# Loop through the user's path and test for sed and gsed. 77327b58d2e0Smrg# Then use that list of sed's as ones to test for truncation. 77337b58d2e0Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77347b58d2e0Smrgfor as_dir in $PATH 77357b58d2e0Smrgdo 77367b58d2e0Smrg IFS=$as_save_IFS 77377b58d2e0Smrg test -z "$as_dir" && as_dir=. 77387b58d2e0Smrg for lt_ac_prog in sed gsed; do 77397b58d2e0Smrg for ac_exec_ext in '' $ac_executable_extensions; do 77407b58d2e0Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77417b58d2e0Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77427b58d2e0Smrg fi 77437b58d2e0Smrg done 77447b58d2e0Smrg done 77457b58d2e0Smrgdone 77467b58d2e0SmrgIFS=$as_save_IFS 77477b58d2e0Smrglt_ac_max=0 77487b58d2e0Smrglt_ac_count=0 77497b58d2e0Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77507b58d2e0Smrg# along with /bin/sed that truncates output. 77517b58d2e0Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77527b58d2e0Smrg test ! -f $lt_ac_sed && continue 77537b58d2e0Smrg cat /dev/null > conftest.in 77547b58d2e0Smrg lt_ac_count=0 77557b58d2e0Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77567b58d2e0Smrg # Check for GNU sed and select it if it is found. 77577b58d2e0Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77587b58d2e0Smrg lt_cv_path_SED=$lt_ac_sed 77597b58d2e0Smrg break 77607b58d2e0Smrg fi 77617b58d2e0Smrg while true; do 77627b58d2e0Smrg cat conftest.in conftest.in >conftest.tmp 77637b58d2e0Smrg mv conftest.tmp conftest.in 77647b58d2e0Smrg cp conftest.in conftest.nl 77657b58d2e0Smrg echo >>conftest.nl 77667b58d2e0Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77677b58d2e0Smrg cmp -s conftest.out conftest.nl || break 77687b58d2e0Smrg # 10000 chars as input seems more than enough 77697b58d2e0Smrg test $lt_ac_count -gt 10 && break 77707b58d2e0Smrg lt_ac_count=`expr $lt_ac_count + 1` 77717b58d2e0Smrg if test $lt_ac_count -gt $lt_ac_max; then 77727b58d2e0Smrg lt_ac_max=$lt_ac_count 77737b58d2e0Smrg lt_cv_path_SED=$lt_ac_sed 77747b58d2e0Smrg fi 77757b58d2e0Smrg done 77767b58d2e0Smrgdone 77777b58d2e0Smrg]) 77787b58d2e0SmrgSED=$lt_cv_path_SED 77797b58d2e0SmrgAC_SUBST([SED]) 77807b58d2e0SmrgAC_MSG_RESULT([$SED]) 77817b58d2e0Smrg])#AC_PROG_SED 77827b58d2e0Smrg])#m4_ifndef 778309885543Smrg 77847b58d2e0Smrg# Old name: 77857b58d2e0SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77867b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 77877b58d2e0Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 778809885543Smrg 7789e4f6584cSmrg 77907b58d2e0Smrg# _LT_CHECK_SHELL_FEATURES 77917b58d2e0Smrg# ------------------------ 77927b58d2e0Smrg# Find out whether the shell is Bourne or XSI compatible, 77937b58d2e0Smrg# or has some other useful features. 77947b58d2e0Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77957b58d2e0Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77967b58d2e0Smrg# Try some XSI features 77977b58d2e0Smrgxsi_shell=no 77987b58d2e0Smrg( _lt_dummy="a/b/c" 7799b12e5c03Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7800b12e5c03Smrg = c,a/b,b/c, \ 78017b58d2e0Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 78027b58d2e0Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 78037b58d2e0Smrg && xsi_shell=yes 78047b58d2e0SmrgAC_MSG_RESULT([$xsi_shell]) 78057b58d2e0Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7806e4f6584cSmrg 78077b58d2e0SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 78087b58d2e0Smrglt_shell_append=no 78097b58d2e0Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 78107b58d2e0Smrg >/dev/null 2>&1 \ 78117b58d2e0Smrg && lt_shell_append=yes 78127b58d2e0SmrgAC_MSG_RESULT([$lt_shell_append]) 78137b58d2e0Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7814e4f6584cSmrg 78157b58d2e0Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78167b58d2e0Smrg lt_unset=unset 78177b58d2e0Smrgelse 78187b58d2e0Smrg lt_unset=false 78197b58d2e0Smrgfi 78207b58d2e0Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7821e4f6584cSmrg 7822b12e5c03Smrg# test EBCDIC or ASCII 7823b12e5c03Smrgcase `echo X|tr X '\101'` in 7824b12e5c03Smrg A) # ASCII based system 7825b12e5c03Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7826b12e5c03Smrg lt_SP2NL='tr \040 \012' 7827b12e5c03Smrg lt_NL2SP='tr \015\012 \040\040' 7828b12e5c03Smrg ;; 7829b12e5c03Smrg *) # EBCDIC based system 7830b12e5c03Smrg lt_SP2NL='tr \100 \n' 7831b12e5c03Smrg lt_NL2SP='tr \r\n \100\100' 7832b12e5c03Smrg ;; 7833b12e5c03Smrgesac 7834b12e5c03Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7835b12e5c03Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7836b12e5c03Smrg])# _LT_CHECK_SHELL_FEATURES 78377b58d2e0Smrg 78387b58d2e0Smrg 7839b12e5c03Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7840b12e5c03Smrg# ------------------------------------------------------ 7841b12e5c03Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7842b12e5c03Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7843b12e5c03Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7844b12e5c03Smrg[dnl { 7845b12e5c03Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7846b12e5c03Smrg$1 ()\ 7847b12e5c03Smrg{\ 7848b12e5c03Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7849b12e5c03Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7850b12e5c03Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7851b12e5c03Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7852b12e5c03Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7853b12e5c03Smrg]) 78547b58d2e0Smrg 785509885543Smrg 7856b12e5c03Smrg# _LT_PROG_REPLACE_SHELLFNS 7857b12e5c03Smrg# ------------------------- 7858b12e5c03Smrg# Replace existing portable implementations of several shell functions with 7859b12e5c03Smrg# equivalent extended shell implementations where those features are available.. 7860b12e5c03Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7861b12e5c03Smrg[if test x"$xsi_shell" = xyes; then 7862b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7863b12e5c03Smrg case ${1} in 7864b12e5c03Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7865b12e5c03Smrg * ) func_dirname_result="${3}" ;; 7866b12e5c03Smrg esac]) 7867b12e5c03Smrg 7868b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7869b12e5c03Smrg func_basename_result="${1##*/}"]) 7870b12e5c03Smrg 7871b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7872b12e5c03Smrg case ${1} in 7873b12e5c03Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7874b12e5c03Smrg * ) func_dirname_result="${3}" ;; 7875b12e5c03Smrg esac 7876b12e5c03Smrg func_basename_result="${1##*/}"]) 787709885543Smrg 7878b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7879b12e5c03Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7880b12e5c03Smrg # positional parameters, so assign one to ordinary parameter first. 7881b12e5c03Smrg func_stripname_result=${3} 7882b12e5c03Smrg func_stripname_result=${func_stripname_result#"${1}"} 7883b12e5c03Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 788409885543Smrg 7885b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7886b12e5c03Smrg func_split_long_opt_name=${1%%=*} 7887b12e5c03Smrg func_split_long_opt_arg=${1#*=}]) 788809885543Smrg 7889b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7890b12e5c03Smrg func_split_short_opt_arg=${1#??} 7891b12e5c03Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 789209885543Smrg 7893b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7894b12e5c03Smrg case ${1} in 7895b12e5c03Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7896b12e5c03Smrg *) func_lo2o_result=${1} ;; 7897b12e5c03Smrg esac]) 789809885543Smrg 7899b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7900e4f6584cSmrg 7901b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7902e4f6584cSmrg 7903b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7904b12e5c03Smrgfi 7905e4f6584cSmrg 7906b12e5c03Smrgif test x"$lt_shell_append" = xyes; then 7907b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7908e4f6584cSmrg 7909b12e5c03Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7910b12e5c03Smrg func_quote_for_eval "${2}" 7911b12e5c03Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7912b12e5c03Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 791309885543Smrg 7914b12e5c03Smrg # Save a `func_append' function call where possible by direct use of '+=' 7915b12e5c03Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7916b12e5c03Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7917b12e5c03Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7918b12e5c03Smrg test 0 -eq $? || _lt_function_replace_fail=: 7919b12e5c03Smrgelse 7920b12e5c03Smrg # Save a `func_append' function call even when '+=' is not available 7921b12e5c03Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7922b12e5c03Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7923b12e5c03Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7924b12e5c03Smrg test 0 -eq $? || _lt_function_replace_fail=: 7925b12e5c03Smrgfi 7926e4f6584cSmrg 7927b12e5c03Smrgif test x"$_lt_function_replace_fail" = x":"; then 7928b12e5c03Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7929b12e5c03Smrgfi 7930b12e5c03Smrg]) 79317b58d2e0Smrg 7932b12e5c03Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7933b12e5c03Smrg# ----------------------------- 7934b12e5c03Smrg# Determine which file name conversion functions should be used by 7935b12e5c03Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7936b12e5c03Smrg# for certain cross-compile configurations and native mingw. 7937b12e5c03Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7938b12e5c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7939b12e5c03SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7940b12e5c03SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7941b12e5c03SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7942b12e5c03Smrg[case $host in 7943b12e5c03Smrg *-*-mingw* ) 7944b12e5c03Smrg case $build in 7945b12e5c03Smrg *-*-mingw* ) # actually msys 7946b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7947b12e5c03Smrg ;; 7948b12e5c03Smrg *-*-cygwin* ) 7949b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7950b12e5c03Smrg ;; 7951b12e5c03Smrg * ) # otherwise, assume *nix 7952b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7953b12e5c03Smrg ;; 7954b12e5c03Smrg esac 79557b58d2e0Smrg ;; 7956b12e5c03Smrg *-*-cygwin* ) 7957b12e5c03Smrg case $build in 7958b12e5c03Smrg *-*-mingw* ) # actually msys 7959b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7960b12e5c03Smrg ;; 7961b12e5c03Smrg *-*-cygwin* ) 7962b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7963b12e5c03Smrg ;; 7964b12e5c03Smrg * ) # otherwise, assume *nix 7965b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7966b12e5c03Smrg ;; 7967b12e5c03Smrg esac 7968b12e5c03Smrg ;; 7969b12e5c03Smrg * ) # unhandled hosts (and "normal" native builds) 7970b12e5c03Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7971b12e5c03Smrg ;; 7972b12e5c03Smrgesac 7973b12e5c03Smrg]) 7974b12e5c03Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7975b12e5c03SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7976b12e5c03Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7977b12e5c03Smrg [0], [convert $build file names to $host format])dnl 7978b12e5c03Smrg 7979b12e5c03SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7980b12e5c03SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7981b12e5c03Smrg[#assume ordinary cross tools, or native build. 7982b12e5c03Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7983b12e5c03Smrgcase $host in 7984b12e5c03Smrg *-*-mingw* ) 7985b12e5c03Smrg case $build in 7986b12e5c03Smrg *-*-mingw* ) # actually msys 7987b12e5c03Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7988b12e5c03Smrg ;; 7989b12e5c03Smrg esac 7990b12e5c03Smrg ;; 7991b12e5c03Smrgesac 79927b58d2e0Smrg]) 7993b12e5c03Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7994b12e5c03SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7995b12e5c03Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7996b12e5c03Smrg [0], [convert $build files to toolchain format])dnl 7997b12e5c03Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 799809885543Smrg 79997b58d2e0Smrg# Helper functions for option handling. -*- Autoconf -*- 80007b58d2e0Smrg# 8001b12e5c03Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 8002b12e5c03Smrg# Inc. 80037b58d2e0Smrg# Written by Gary V. Vaughan, 2004 80047b58d2e0Smrg# 80057b58d2e0Smrg# This file is free software; the Free Software Foundation gives 80067b58d2e0Smrg# unlimited permission to copy and/or distribute it, with or without 80077b58d2e0Smrg# modifications, as long as this notice is preserved. 8008e4f6584cSmrg 8009b12e5c03Smrg# serial 7 ltoptions.m4 8010e4f6584cSmrg 80117b58d2e0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 80127b58d2e0SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8013e4f6584cSmrg 801409885543Smrg 80157b58d2e0Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80167b58d2e0Smrg# ------------------------------------------ 80177b58d2e0Smrgm4_define([_LT_MANGLE_OPTION], 80187b58d2e0Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 801909885543Smrg 802009885543Smrg 80217b58d2e0Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80227b58d2e0Smrg# --------------------------------------- 80237b58d2e0Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80247b58d2e0Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80257b58d2e0Smrg# saved as a flag. 80267b58d2e0Smrgm4_define([_LT_SET_OPTION], 80277b58d2e0Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80287b58d2e0Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80297b58d2e0Smrg _LT_MANGLE_DEFUN([$1], [$2]), 80307b58d2e0Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80317b58d2e0Smrg]) 8032e4f6584cSmrg 8033e4f6584cSmrg 80347b58d2e0Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80357b58d2e0Smrg# ------------------------------------------------------------ 80367b58d2e0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80377b58d2e0Smrgm4_define([_LT_IF_OPTION], 80387b58d2e0Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 803909885543Smrg 804009885543Smrg 80417b58d2e0Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80427b58d2e0Smrg# ------------------------------------------------------- 80437b58d2e0Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80447b58d2e0Smrg# are set. 80457b58d2e0Smrgm4_define([_LT_UNLESS_OPTIONS], 80467b58d2e0Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80477b58d2e0Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80487b58d2e0Smrg [m4_define([$0_found])])])[]dnl 80497b58d2e0Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80507b58d2e0Smrg])[]dnl 80517b58d2e0Smrg]) 805209885543Smrg 8053e4f6584cSmrg 80547b58d2e0Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80557b58d2e0Smrg# ---------------------------------------- 80567b58d2e0Smrg# OPTION-LIST is a space-separated list of Libtool options associated 80577b58d2e0Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80587b58d2e0Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80597b58d2e0Smrg# the unknown option and exit. 80607b58d2e0Smrgm4_defun([_LT_SET_OPTIONS], 80617b58d2e0Smrg[# Set options 80627b58d2e0Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80637b58d2e0Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 806409885543Smrg 80657b58d2e0Smrgm4_if([$1],[LT_INIT],[ 80667b58d2e0Smrg dnl 80677b58d2e0Smrg dnl Simply set some default values (i.e off) if boolean options were not 80687b58d2e0Smrg dnl specified: 80697b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80707b58d2e0Smrg ]) 80717b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80727b58d2e0Smrg ]) 80737b58d2e0Smrg dnl 80747b58d2e0Smrg dnl If no reference was made to various pairs of opposing options, then 80757b58d2e0Smrg dnl we run the default mode handler for the pair. For example, if neither 80767b58d2e0Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80777b58d2e0Smrg dnl archives by default: 80787b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80797b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80807b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80817b58d2e0Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80827b58d2e0Smrg [_LT_ENABLE_FAST_INSTALL]) 80837b58d2e0Smrg ]) 80847b58d2e0Smrg])# _LT_SET_OPTIONS 808509885543Smrg 808609885543Smrg 808709885543Smrg 80887b58d2e0Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80897b58d2e0Smrg# ----------------------------------------- 80907b58d2e0Smrgm4_define([_LT_MANGLE_DEFUN], 80917b58d2e0Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 80927b58d2e0Smrg 80937b58d2e0Smrg 80947b58d2e0Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80957b58d2e0Smrg# ----------------------------------------------- 80967b58d2e0Smrgm4_define([LT_OPTION_DEFINE], 80977b58d2e0Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80987b58d2e0Smrg])# LT_OPTION_DEFINE 80997b58d2e0Smrg 81007b58d2e0Smrg 81017b58d2e0Smrg# dlopen 81027b58d2e0Smrg# ------ 81037b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 81047b58d2e0Smrg]) 8105e4f6584cSmrg 81067b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 81077b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 81087b58d2e0SmrgAC_DIAGNOSE([obsolete], 81097b58d2e0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81107b58d2e0Smrgput the `dlopen' option into LT_INIT's first parameter.]) 81117b58d2e0Smrg]) 8112e4f6584cSmrg 81137b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 81147b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8115e4f6584cSmrg 8116e4f6584cSmrg 81177b58d2e0Smrg# win32-dll 81187b58d2e0Smrg# --------- 81197b58d2e0Smrg# Declare package support for building win32 dll's. 81207b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81217b58d2e0Smrg[enable_win32_dll=yes 8122e4f6584cSmrg 81237b58d2e0Smrgcase $host in 8124b12e5c03Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81257b58d2e0Smrg AC_CHECK_TOOL(AS, as, false) 81267b58d2e0Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81277b58d2e0Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81287b58d2e0Smrg ;; 81297b58d2e0Smrgesac 8130e4f6584cSmrg 81317b58d2e0Smrgtest -z "$AS" && AS=as 8132b12e5c03Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8133e4f6584cSmrg 81347b58d2e0Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8135b12e5c03Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8136e4f6584cSmrg 81377b58d2e0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8138b12e5c03Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81397b58d2e0Smrg])# win32-dll 8140e4f6584cSmrg 81417b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81427b58d2e0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81437b58d2e0Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81447b58d2e0SmrgAC_DIAGNOSE([obsolete], 81457b58d2e0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81467b58d2e0Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 81477b58d2e0Smrg]) 8148e4f6584cSmrg 81497b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 81507b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8151e4f6584cSmrg 8152e4f6584cSmrg 81537b58d2e0Smrg# _LT_ENABLE_SHARED([DEFAULT]) 81547b58d2e0Smrg# ---------------------------- 81557b58d2e0Smrg# implement the --enable-shared flag, and supports the `shared' and 81567b58d2e0Smrg# `disable-shared' LT_INIT options. 81577b58d2e0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81587b58d2e0Smrgm4_define([_LT_ENABLE_SHARED], 81597b58d2e0Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81607b58d2e0SmrgAC_ARG_ENABLE([shared], 81617b58d2e0Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81627b58d2e0Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81637b58d2e0Smrg [p=${PACKAGE-default} 81647b58d2e0Smrg case $enableval in 81657b58d2e0Smrg yes) enable_shared=yes ;; 81667b58d2e0Smrg no) enable_shared=no ;; 81677b58d2e0Smrg *) 81687b58d2e0Smrg enable_shared=no 81697b58d2e0Smrg # Look at the argument we got. We use all the common list separators. 81707b58d2e0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81717b58d2e0Smrg for pkg in $enableval; do 81727b58d2e0Smrg IFS="$lt_save_ifs" 81737b58d2e0Smrg if test "X$pkg" = "X$p"; then 81747b58d2e0Smrg enable_shared=yes 81757b58d2e0Smrg fi 81767b58d2e0Smrg done 81777b58d2e0Smrg IFS="$lt_save_ifs" 81787b58d2e0Smrg ;; 81797b58d2e0Smrg esac], 81807b58d2e0Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8181e4f6584cSmrg 81827b58d2e0Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81837b58d2e0Smrg [Whether or not to build shared libraries]) 81847b58d2e0Smrg])# _LT_ENABLE_SHARED 8185e4f6584cSmrg 81867b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81877b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8188e4f6584cSmrg 81897b58d2e0Smrg# Old names: 81907b58d2e0SmrgAC_DEFUN([AC_ENABLE_SHARED], 81917b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81927b58d2e0Smrg]) 8193e4f6584cSmrg 81947b58d2e0SmrgAC_DEFUN([AC_DISABLE_SHARED], 81957b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81967b58d2e0Smrg]) 8197e4f6584cSmrg 81987b58d2e0SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81997b58d2e0SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 82007b58d2e0Smrg 82017b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 82027b58d2e0Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 82037b58d2e0Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8204e4f6584cSmrg 8205e4f6584cSmrg 8206e4f6584cSmrg 82077b58d2e0Smrg# _LT_ENABLE_STATIC([DEFAULT]) 82087b58d2e0Smrg# ---------------------------- 82097b58d2e0Smrg# implement the --enable-static flag, and support the `static' and 82107b58d2e0Smrg# `disable-static' LT_INIT options. 82117b58d2e0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82127b58d2e0Smrgm4_define([_LT_ENABLE_STATIC], 82137b58d2e0Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82147b58d2e0SmrgAC_ARG_ENABLE([static], 82157b58d2e0Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82167b58d2e0Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82177b58d2e0Smrg [p=${PACKAGE-default} 82187b58d2e0Smrg case $enableval in 82197b58d2e0Smrg yes) enable_static=yes ;; 82207b58d2e0Smrg no) enable_static=no ;; 82217b58d2e0Smrg *) 82227b58d2e0Smrg enable_static=no 82237b58d2e0Smrg # Look at the argument we got. We use all the common list separators. 82247b58d2e0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82257b58d2e0Smrg for pkg in $enableval; do 82267b58d2e0Smrg IFS="$lt_save_ifs" 82277b58d2e0Smrg if test "X$pkg" = "X$p"; then 82287b58d2e0Smrg enable_static=yes 82297b58d2e0Smrg fi 82307b58d2e0Smrg done 82317b58d2e0Smrg IFS="$lt_save_ifs" 8232e4f6584cSmrg ;; 82337b58d2e0Smrg esac], 82347b58d2e0Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 823509885543Smrg 82367b58d2e0Smrg _LT_DECL([build_old_libs], [enable_static], [0], 82377b58d2e0Smrg [Whether or not to build static libraries]) 82387b58d2e0Smrg])# _LT_ENABLE_STATIC 823909885543Smrg 82407b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82417b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 824209885543Smrg 82437b58d2e0Smrg# Old names: 82447b58d2e0SmrgAC_DEFUN([AC_ENABLE_STATIC], 82457b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82467b58d2e0Smrg]) 824709885543Smrg 82487b58d2e0SmrgAC_DEFUN([AC_DISABLE_STATIC], 82497b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82507b58d2e0Smrg]) 825109885543Smrg 82527b58d2e0SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82537b58d2e0SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 825409885543Smrg 82557b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 82567b58d2e0Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82577b58d2e0Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8258e4f6584cSmrg 8259e4f6584cSmrg 8260e4f6584cSmrg 82617b58d2e0Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82627b58d2e0Smrg# ---------------------------------- 82637b58d2e0Smrg# implement the --enable-fast-install flag, and support the `fast-install' 82647b58d2e0Smrg# and `disable-fast-install' LT_INIT options. 82657b58d2e0Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82667b58d2e0Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 82677b58d2e0Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82687b58d2e0SmrgAC_ARG_ENABLE([fast-install], 82697b58d2e0Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82707b58d2e0Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82717b58d2e0Smrg [p=${PACKAGE-default} 82727b58d2e0Smrg case $enableval in 82737b58d2e0Smrg yes) enable_fast_install=yes ;; 82747b58d2e0Smrg no) enable_fast_install=no ;; 82757b58d2e0Smrg *) 82767b58d2e0Smrg enable_fast_install=no 82777b58d2e0Smrg # Look at the argument we got. We use all the common list separators. 82787b58d2e0Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82797b58d2e0Smrg for pkg in $enableval; do 82807b58d2e0Smrg IFS="$lt_save_ifs" 82817b58d2e0Smrg if test "X$pkg" = "X$p"; then 82827b58d2e0Smrg enable_fast_install=yes 82837b58d2e0Smrg fi 82847b58d2e0Smrg done 82857b58d2e0Smrg IFS="$lt_save_ifs" 82867b58d2e0Smrg ;; 82877b58d2e0Smrg esac], 82887b58d2e0Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8289e4f6584cSmrg 82907b58d2e0Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 82917b58d2e0Smrg [Whether or not to optimize for fast installation])dnl 82927b58d2e0Smrg])# _LT_ENABLE_FAST_INSTALL 829309885543Smrg 82947b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82957b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 829609885543Smrg 82977b58d2e0Smrg# Old names: 82987b58d2e0SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82997b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 83007b58d2e0SmrgAC_DIAGNOSE([obsolete], 83017b58d2e0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83027b58d2e0Smrgthe `fast-install' option into LT_INIT's first parameter.]) 83037b58d2e0Smrg]) 830409885543Smrg 83057b58d2e0SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 83067b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 83077b58d2e0SmrgAC_DIAGNOSE([obsolete], 83087b58d2e0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83097b58d2e0Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 83107b58d2e0Smrg]) 831109885543Smrg 83127b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 83137b58d2e0Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83147b58d2e0Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83157b58d2e0Smrg 83167b58d2e0Smrg 83177b58d2e0Smrg# _LT_WITH_PIC([MODE]) 83187b58d2e0Smrg# -------------------- 83197b58d2e0Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83207b58d2e0Smrg# LT_INIT options. 83217b58d2e0Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83227b58d2e0Smrgm4_define([_LT_WITH_PIC], 83237b58d2e0Smrg[AC_ARG_WITH([pic], 8324b12e5c03Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83257b58d2e0Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8326b12e5c03Smrg [lt_p=${PACKAGE-default} 8327b12e5c03Smrg case $withval in 8328b12e5c03Smrg yes|no) pic_mode=$withval ;; 8329b12e5c03Smrg *) 8330b12e5c03Smrg pic_mode=default 8331b12e5c03Smrg # Look at the argument we got. We use all the common list separators. 8332b12e5c03Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8333b12e5c03Smrg for lt_pkg in $withval; do 8334b12e5c03Smrg IFS="$lt_save_ifs" 8335b12e5c03Smrg if test "X$lt_pkg" = "X$lt_p"; then 8336b12e5c03Smrg pic_mode=yes 8337b12e5c03Smrg fi 8338b12e5c03Smrg done 8339b12e5c03Smrg IFS="$lt_save_ifs" 8340b12e5c03Smrg ;; 8341b12e5c03Smrg esac], 83427b58d2e0Smrg [pic_mode=default]) 83437b58d2e0Smrg 83447b58d2e0Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83457b58d2e0Smrg 83467b58d2e0Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83477b58d2e0Smrg])# _LT_WITH_PIC 83487b58d2e0Smrg 83497b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83507b58d2e0SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 83517b58d2e0Smrg 83527b58d2e0Smrg# Old name: 83537b58d2e0SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83547b58d2e0Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83557b58d2e0SmrgAC_DIAGNOSE([obsolete], 83567b58d2e0Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83577b58d2e0Smrgput the `pic-only' option into LT_INIT's first parameter.]) 8358e4f6584cSmrg]) 835909885543Smrg 83607b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 83617b58d2e0Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 836209885543Smrg 836309885543Smrg 83647b58d2e0Smrgm4_define([_LTDL_MODE], []) 83657b58d2e0SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83667b58d2e0Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83677b58d2e0SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83687b58d2e0Smrg [m4_define([_LTDL_MODE], [recursive])]) 83697b58d2e0SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83707b58d2e0Smrg [m4_define([_LTDL_MODE], [subproject])]) 837109885543Smrg 83727b58d2e0Smrgm4_define([_LTDL_TYPE], []) 83737b58d2e0SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83747b58d2e0Smrg [m4_define([_LTDL_TYPE], [installable])]) 83757b58d2e0SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83767b58d2e0Smrg [m4_define([_LTDL_TYPE], [convenience])]) 837709885543Smrg 83787b58d2e0Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 83797b58d2e0Smrg# 83807b58d2e0Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83817b58d2e0Smrg# Written by Gary V. Vaughan, 2004 83827b58d2e0Smrg# 83837b58d2e0Smrg# This file is free software; the Free Software Foundation gives 83847b58d2e0Smrg# unlimited permission to copy and/or distribute it, with or without 83857b58d2e0Smrg# modifications, as long as this notice is preserved. 838609885543Smrg 83877b58d2e0Smrg# serial 6 ltsugar.m4 838809885543Smrg 83897b58d2e0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83907b58d2e0SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 839109885543Smrg 8392e4f6584cSmrg 83937b58d2e0Smrg# lt_join(SEP, ARG1, [ARG2...]) 83947b58d2e0Smrg# ----------------------------- 83957b58d2e0Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83967b58d2e0Smrg# associated separator. 83977b58d2e0Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83987b58d2e0Smrg# versions in m4sugar had bugs. 83997b58d2e0Smrgm4_define([lt_join], 84007b58d2e0Smrg[m4_if([$#], [1], [], 84017b58d2e0Smrg [$#], [2], [[$2]], 84027b58d2e0Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 84037b58d2e0Smrgm4_define([_lt_join], 84047b58d2e0Smrg[m4_if([$#$2], [2], [], 84057b58d2e0Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 840609885543Smrg 840709885543Smrg 84087b58d2e0Smrg# lt_car(LIST) 84097b58d2e0Smrg# lt_cdr(LIST) 84107b58d2e0Smrg# ------------ 84117b58d2e0Smrg# Manipulate m4 lists. 84127b58d2e0Smrg# These macros are necessary as long as will still need to support 84137b58d2e0Smrg# Autoconf-2.59 which quotes differently. 84147b58d2e0Smrgm4_define([lt_car], [[$1]]) 84157b58d2e0Smrgm4_define([lt_cdr], 84167b58d2e0Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84177b58d2e0Smrg [$#], 1, [], 84187b58d2e0Smrg [m4_dquote(m4_shift($@))])]) 84197b58d2e0Smrgm4_define([lt_unquote], $1) 842009885543Smrg 842109885543Smrg 84227b58d2e0Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84237b58d2e0Smrg# ------------------------------------------ 84247b58d2e0Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84257b58d2e0Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84267b58d2e0Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84277b58d2e0Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84287b58d2e0Smrg# than defined and empty). 84297b58d2e0Smrg# 84307b58d2e0Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84317b58d2e0Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84327b58d2e0Smrgm4_define([lt_append], 84337b58d2e0Smrg[m4_define([$1], 84347b58d2e0Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 843509885543Smrg 843609885543Smrg 843709885543Smrg 84387b58d2e0Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84397b58d2e0Smrg# ---------------------------------------------------------- 84407b58d2e0Smrg# Produce a SEP delimited list of all paired combinations of elements of 84417b58d2e0Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84427b58d2e0Smrg# has the form PREFIXmINFIXSUFFIXn. 84437b58d2e0Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84447b58d2e0Smrgm4_define([lt_combine], 84457b58d2e0Smrg[m4_if(m4_eval([$# > 3]), [1], 84467b58d2e0Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84477b58d2e0Smrg[[m4_foreach([_Lt_prefix], [$2], 84487b58d2e0Smrg [m4_foreach([_Lt_suffix], 84497b58d2e0Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84507b58d2e0Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 845109885543Smrg 84527b58d2e0Smrg 84537b58d2e0Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84547b58d2e0Smrg# ----------------------------------------------------------------------- 84557b58d2e0Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84567b58d2e0Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84577b58d2e0Smrgm4_define([lt_if_append_uniq], 84587b58d2e0Smrg[m4_ifdef([$1], 84597b58d2e0Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84607b58d2e0Smrg [lt_append([$1], [$2], [$3])$4], 84617b58d2e0Smrg [$5])], 84627b58d2e0Smrg [lt_append([$1], [$2], [$3])$4])]) 8463e4f6584cSmrg 8464e4f6584cSmrg 84657b58d2e0Smrg# lt_dict_add(DICT, KEY, VALUE) 84667b58d2e0Smrg# ----------------------------- 84677b58d2e0Smrgm4_define([lt_dict_add], 84687b58d2e0Smrg[m4_define([$1($2)], [$3])]) 846909885543Smrg 847009885543Smrg 84717b58d2e0Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84727b58d2e0Smrg# -------------------------------------------- 84737b58d2e0Smrgm4_define([lt_dict_add_subkey], 84747b58d2e0Smrg[m4_define([$1($2:$3)], [$4])]) 847509885543Smrg 847609885543Smrg 84777b58d2e0Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84787b58d2e0Smrg# ---------------------------------- 84797b58d2e0Smrgm4_define([lt_dict_fetch], 84807b58d2e0Smrg[m4_ifval([$3], 84817b58d2e0Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84827b58d2e0Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 848309885543Smrg 848409885543Smrg 84857b58d2e0Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84867b58d2e0Smrg# ----------------------------------------------------------------- 84877b58d2e0Smrgm4_define([lt_if_dict_fetch], 84887b58d2e0Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84897b58d2e0Smrg [$5], 84907b58d2e0Smrg [$6])]) 8491e4f6584cSmrg 849209885543Smrg 84937b58d2e0Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84947b58d2e0Smrg# -------------------------------------------------------------- 84957b58d2e0Smrgm4_define([lt_dict_filter], 84967b58d2e0Smrg[m4_if([$5], [], [], 84977b58d2e0Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84987b58d2e0Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84997b58d2e0Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 85007b58d2e0Smrg]) 850109885543Smrg 85027b58d2e0Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 85037b58d2e0Smrg# 85047b58d2e0Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 85057b58d2e0Smrg# Written by Scott James Remnant, 2004 85067b58d2e0Smrg# 85077b58d2e0Smrg# This file is free software; the Free Software Foundation gives 85087b58d2e0Smrg# unlimited permission to copy and/or distribute it, with or without 85097b58d2e0Smrg# modifications, as long as this notice is preserved. 851009885543Smrg 8511b12e5c03Smrg# @configure_input@ 851209885543Smrg 8513b12e5c03Smrg# serial 3337 ltversion.m4 85147b58d2e0Smrg# This file is part of GNU Libtool 851509885543Smrg 8516b12e5c03Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8517b12e5c03Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 851809885543Smrg 85197b58d2e0SmrgAC_DEFUN([LTVERSION_VERSION], 8520b12e5c03Smrg[macro_version='2.4.2' 8521b12e5c03Smrgmacro_revision='1.3337' 85227b58d2e0Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85237b58d2e0Smrg_LT_DECL(, macro_revision, 0) 85247b58d2e0Smrg]) 8525e4f6584cSmrg 85267b58d2e0Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85277b58d2e0Smrg# 8528b12e5c03Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85297b58d2e0Smrg# Written by Scott James Remnant, 2004. 85307b58d2e0Smrg# 85317b58d2e0Smrg# This file is free software; the Free Software Foundation gives 85327b58d2e0Smrg# unlimited permission to copy and/or distribute it, with or without 85337b58d2e0Smrg# modifications, as long as this notice is preserved. 85347b58d2e0Smrg 8535b12e5c03Smrg# serial 5 lt~obsolete.m4 85367b58d2e0Smrg 85377b58d2e0Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 85387b58d2e0Smrg# 85397b58d2e0Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85407b58d2e0Smrg# which have later been changed to m4_define as they aren't part of the 85417b58d2e0Smrg# exported API, or moved to Autoconf or Automake where they belong. 85427b58d2e0Smrg# 85437b58d2e0Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85447b58d2e0Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85457b58d2e0Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 85467b58d2e0Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85477b58d2e0Smrg# and doesn't know about Autoconf macros at all.) 85487b58d2e0Smrg# 85497b58d2e0Smrg# So we provide this file, which has a silly filename so it's always 85507b58d2e0Smrg# included after everything else. This provides aclocal with the 85517b58d2e0Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85527b58d2e0Smrg# because those macros already exist, or will be overwritten later. 85537b58d2e0Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85547b58d2e0Smrg# 85557b58d2e0Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85567b58d2e0Smrg# Yes, that means every name once taken will need to remain here until 85577b58d2e0Smrg# we give up compatibility with versions before 1.7, at which point 85587b58d2e0Smrg# we need to keep only those names which we still refer to. 85597b58d2e0Smrg 85607b58d2e0Smrg# This is to help aclocal find these macros, as it can't see m4_define. 85617b58d2e0SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85627b58d2e0Smrg 85637b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85647b58d2e0Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85657b58d2e0Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85667b58d2e0Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85677b58d2e0Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85687b58d2e0Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85697b58d2e0Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85707b58d2e0Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85717b58d2e0Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85727b58d2e0Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85737b58d2e0Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85747b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85757b58d2e0Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85767b58d2e0Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85777b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85787b58d2e0Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85797b58d2e0Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85807b58d2e0Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85817b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85827b58d2e0Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85837b58d2e0Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85847b58d2e0Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85857b58d2e0Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85867b58d2e0Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85877b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85887b58d2e0Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85897b58d2e0Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85907b58d2e0Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85917b58d2e0Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85927b58d2e0Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85937b58d2e0Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85947b58d2e0Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85957b58d2e0Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85967b58d2e0Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85977b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85987b58d2e0Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85997b58d2e0Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 86007b58d2e0Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 86017b58d2e0Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 86027b58d2e0Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 86037b58d2e0Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 86047b58d2e0Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 86057b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 86067b58d2e0Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 86077b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 86087b58d2e0Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 86097b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 86107b58d2e0Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86117b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86127b58d2e0Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86137b58d2e0Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86147b58d2e0Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86157b58d2e0Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86167b58d2e0Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8617b12e5c03Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8618b12e5c03Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8619b12e5c03Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8620b12e5c03Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8621b12e5c03Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8622b12e5c03Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8623b12e5c03Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86247b58d2e0Smrg 86257b58d2e0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 86267b58d2e0Smrg# serial 1 (pkg-config-0.24) 86277b58d2e0Smrg# 86287b58d2e0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 86297b58d2e0Smrg# 86307b58d2e0Smrg# This program is free software; you can redistribute it and/or modify 86317b58d2e0Smrg# it under the terms of the GNU General Public License as published by 86327b58d2e0Smrg# the Free Software Foundation; either version 2 of the License, or 86337b58d2e0Smrg# (at your option) any later version. 86347b58d2e0Smrg# 86357b58d2e0Smrg# This program is distributed in the hope that it will be useful, but 86367b58d2e0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 86377b58d2e0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 86387b58d2e0Smrg# General Public License for more details. 86397b58d2e0Smrg# 86407b58d2e0Smrg# You should have received a copy of the GNU General Public License 86417b58d2e0Smrg# along with this program; if not, write to the Free Software 86427b58d2e0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86437b58d2e0Smrg# 86447b58d2e0Smrg# As a special exception to the GNU General Public License, if you 86457b58d2e0Smrg# distribute this file as part of a program that contains a 86467b58d2e0Smrg# configuration script generated by Autoconf, you may include it under 86477b58d2e0Smrg# the same distribution terms that you use for the rest of that program. 8648e4f6584cSmrg 86497b58d2e0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 86507b58d2e0Smrg# ---------------------------------- 86517b58d2e0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 86527b58d2e0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8653df9ffc95Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8654df9ffc95Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 86557b58d2e0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 86567b58d2e0SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86577b58d2e0SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8658e4f6584cSmrg 86597b58d2e0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 86607b58d2e0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86617b58d2e0Smrgfi 86627b58d2e0Smrgif test -n "$PKG_CONFIG"; then 86637b58d2e0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 86647b58d2e0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 86657b58d2e0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 86667b58d2e0Smrg AC_MSG_RESULT([yes]) 86677b58d2e0Smrg else 86687b58d2e0Smrg AC_MSG_RESULT([no]) 86697b58d2e0Smrg PKG_CONFIG="" 86707b58d2e0Smrg fi 86717b58d2e0Smrgfi[]dnl 86727b58d2e0Smrg])# PKG_PROG_PKG_CONFIG 8673e4f6584cSmrg 86747b58d2e0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86757b58d2e0Smrg# 86767b58d2e0Smrg# Check to see whether a particular set of modules exists. Similar 86777b58d2e0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86787b58d2e0Smrg# 86797b58d2e0Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86807b58d2e0Smrg# only at the first occurence in configure.ac, so if the first place 86817b58d2e0Smrg# it's called might be skipped (such as if it is within an "if", you 86827b58d2e0Smrg# have to call PKG_CHECK_EXISTS manually 86837b58d2e0Smrg# -------------------------------------------------------------- 86847b58d2e0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 86857b58d2e0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 86867b58d2e0Smrgif test -n "$PKG_CONFIG" && \ 86877b58d2e0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86887b58d2e0Smrg m4_default([$2], [:]) 86897b58d2e0Smrgm4_ifvaln([$3], [else 86907b58d2e0Smrg $3])dnl 86917b58d2e0Smrgfi]) 8692e4f6584cSmrg 86937b58d2e0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 86947b58d2e0Smrg# --------------------------------------------- 86957b58d2e0Smrgm4_define([_PKG_CONFIG], 86967b58d2e0Smrg[if test -n "$$1"; then 86977b58d2e0Smrg pkg_cv_[]$1="$$1" 86987b58d2e0Smrg elif test -n "$PKG_CONFIG"; then 86997b58d2e0Smrg PKG_CHECK_EXISTS([$3], 8700df9ffc95Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8701df9ffc95Smrg test "x$?" != "x0" && pkg_failed=yes ], 87027b58d2e0Smrg [pkg_failed=yes]) 87037b58d2e0Smrg else 87047b58d2e0Smrg pkg_failed=untried 87057b58d2e0Smrgfi[]dnl 87067b58d2e0Smrg])# _PKG_CONFIG 870709885543Smrg 87087b58d2e0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 87097b58d2e0Smrg# ----------------------------- 87107b58d2e0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 87117b58d2e0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 87127b58d2e0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 87137b58d2e0Smrg _pkg_short_errors_supported=yes 87147b58d2e0Smrgelse 87157b58d2e0Smrg _pkg_short_errors_supported=no 87167b58d2e0Smrgfi[]dnl 87177b58d2e0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8718e4f6584cSmrg 8719e4f6584cSmrg 87207b58d2e0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 87217b58d2e0Smrg# [ACTION-IF-NOT-FOUND]) 87227b58d2e0Smrg# 87237b58d2e0Smrg# 87247b58d2e0Smrg# Note that if there is a possibility the first call to 87257b58d2e0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 87267b58d2e0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87277b58d2e0Smrg# 87287b58d2e0Smrg# 87297b58d2e0Smrg# -------------------------------------------------------------- 87307b58d2e0SmrgAC_DEFUN([PKG_CHECK_MODULES], 87317b58d2e0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 87327b58d2e0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 87337b58d2e0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8734e4f6584cSmrg 87357b58d2e0Smrgpkg_failed=no 87367b58d2e0SmrgAC_MSG_CHECKING([for $1]) 8737e4f6584cSmrg 87387b58d2e0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 87397b58d2e0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8740e4f6584cSmrg 87417b58d2e0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 87427b58d2e0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 87437b58d2e0SmrgSee the pkg-config man page for more details.]) 8744e4f6584cSmrg 87457b58d2e0Smrgif test $pkg_failed = yes; then 87467b58d2e0Smrg AC_MSG_RESULT([no]) 87477b58d2e0Smrg _PKG_SHORT_ERRORS_SUPPORTED 87487b58d2e0Smrg if test $_pkg_short_errors_supported = yes; then 8749df9ffc95Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 87507b58d2e0Smrg else 8751df9ffc95Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 87527b58d2e0Smrg fi 87537b58d2e0Smrg # Put the nasty error message in config.log where it belongs 87547b58d2e0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8755e4f6584cSmrg 87567b58d2e0Smrg m4_default([$4], [AC_MSG_ERROR( 87577b58d2e0Smrg[Package requirements ($2) were not met: 8758e4f6584cSmrg 87597b58d2e0Smrg$$1_PKG_ERRORS 8760e4f6584cSmrg 87617b58d2e0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 87627b58d2e0Smrginstalled software in a non-standard prefix. 8763e4f6584cSmrg 8764df9ffc95Smrg_PKG_TEXT])[]dnl 87657b58d2e0Smrg ]) 87667b58d2e0Smrgelif test $pkg_failed = untried; then 87677b58d2e0Smrg AC_MSG_RESULT([no]) 87687b58d2e0Smrg m4_default([$4], [AC_MSG_FAILURE( 87697b58d2e0Smrg[The pkg-config script could not be found or is too old. Make sure it 87707b58d2e0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 87717b58d2e0Smrgpath to pkg-config. 8772e4f6584cSmrg 87737b58d2e0Smrg_PKG_TEXT 8774e4f6584cSmrg 8775df9ffc95SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 87767b58d2e0Smrg ]) 87777b58d2e0Smrgelse 87787b58d2e0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 87797b58d2e0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 87807b58d2e0Smrg AC_MSG_RESULT([yes]) 87817b58d2e0Smrg $3 87827b58d2e0Smrgfi[]dnl 87837b58d2e0Smrg])# PKG_CHECK_MODULES 8784e4f6584cSmrg 8785df9ffc95Smrg 8786df9ffc95Smrg# PKG_INSTALLDIR(DIRECTORY) 8787df9ffc95Smrg# ------------------------- 8788df9ffc95Smrg# Substitutes the variable pkgconfigdir as the location where a module 8789df9ffc95Smrg# should install pkg-config .pc files. By default the directory is 8790df9ffc95Smrg# $libdir/pkgconfig, but the default can be changed by passing 8791df9ffc95Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 8792df9ffc95Smrg# parameter. 8793df9ffc95SmrgAC_DEFUN([PKG_INSTALLDIR], 8794df9ffc95Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 8795df9ffc95Smrgm4_pushdef([pkg_description], 8796df9ffc95Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 8797df9ffc95SmrgAC_ARG_WITH([pkgconfigdir], 8798df9ffc95Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 8799df9ffc95Smrg [with_pkgconfigdir=]pkg_default) 8800df9ffc95SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 8801df9ffc95Smrgm4_popdef([pkg_default]) 8802df9ffc95Smrgm4_popdef([pkg_description]) 8803df9ffc95Smrg]) dnl PKG_INSTALLDIR 8804df9ffc95Smrg 8805df9ffc95Smrg 8806df9ffc95Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 8807df9ffc95Smrg# ------------------------- 8808df9ffc95Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 8809df9ffc95Smrg# module should install arch-independent pkg-config .pc files. By 8810df9ffc95Smrg# default the directory is $datadir/pkgconfig, but the default can be 8811df9ffc95Smrg# changed by passing DIRECTORY. The user can override through the 8812df9ffc95Smrg# --with-noarch-pkgconfigdir parameter. 8813df9ffc95SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 8814df9ffc95Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 8815df9ffc95Smrgm4_pushdef([pkg_description], 8816df9ffc95Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 8817df9ffc95SmrgAC_ARG_WITH([noarch-pkgconfigdir], 8818df9ffc95Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 8819df9ffc95Smrg [with_noarch_pkgconfigdir=]pkg_default) 8820df9ffc95SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 8821df9ffc95Smrgm4_popdef([pkg_default]) 8822df9ffc95Smrgm4_popdef([pkg_description]) 8823df9ffc95Smrg]) dnl PKG_NOARCH_INSTALLDIR 8824df9ffc95Smrg 8825df9ffc95Smrg 8826df9ffc95Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 8827df9ffc95Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8828df9ffc95Smrg# ------------------------------------------- 8829df9ffc95Smrg# Retrieves the value of the pkg-config variable for the given module. 8830df9ffc95SmrgAC_DEFUN([PKG_CHECK_VAR], 8831df9ffc95Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8832df9ffc95SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 8833df9ffc95Smrg 8834df9ffc95Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 8835df9ffc95SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 8836df9ffc95Smrg 8837df9ffc95SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 8838df9ffc95Smrg])# PKG_CHECK_VAR 8839df9ffc95Smrg 88407b58d2e0Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 88417b58d2e0Smrgdnl 8842b12e5c03Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8843df9ffc95Smrgdnl 88447b58d2e0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 88457b58d2e0Smrgdnl copy of this software and associated documentation files (the "Software"), 88467b58d2e0Smrgdnl to deal in the Software without restriction, including without limitation 88477b58d2e0Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 88487b58d2e0Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 88497b58d2e0Smrgdnl Software is furnished to do so, subject to the following conditions: 88507b58d2e0Smrgdnl 88517b58d2e0Smrgdnl The above copyright notice and this permission notice (including the next 88527b58d2e0Smrgdnl paragraph) shall be included in all copies or substantial portions of the 88537b58d2e0Smrgdnl Software. 88547b58d2e0Smrgdnl 88557b58d2e0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 88567b58d2e0Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 88577b58d2e0Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 88587b58d2e0Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 88597b58d2e0Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 88607b58d2e0Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 88617b58d2e0Smrgdnl DEALINGS IN THE SOFTWARE. 8862e4f6584cSmrg 88637b58d2e0Smrg# XORG_MACROS_VERSION(required-version) 88647b58d2e0Smrg# ------------------------------------- 88657b58d2e0Smrg# Minimum version: 1.1.0 88667b58d2e0Smrg# 88677b58d2e0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 88687b58d2e0Smrg# your configure.ac with the minimum required version, such as: 88697b58d2e0Smrg# XORG_MACROS_VERSION(1.1) 88707b58d2e0Smrg# 88717b58d2e0Smrg# To ensure that this macro is defined, also add: 88727b58d2e0Smrg# m4_ifndef([XORG_MACROS_VERSION], 88737b58d2e0Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 88747b58d2e0Smrg# 88757b58d2e0Smrg# 8876df9ffc95Smrg# See the "minimum version" comment for each macro you use to see what 88777b58d2e0Smrg# version you require. 88787b58d2e0Smrgm4_defun([XORG_MACROS_VERSION],[ 8879df9ffc95Smrgm4_define([vers_have], [1.19.0]) 88807b58d2e0Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88817b58d2e0Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88827b58d2e0Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88837b58d2e0Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88847b58d2e0Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88857b58d2e0Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88867b58d2e0Smrgm4_undefine([vers_have]) 88877b58d2e0Smrgm4_undefine([maj_have]) 88887b58d2e0Smrgm4_undefine([maj_needed]) 88897b58d2e0Smrg]) # XORG_MACROS_VERSION 8890e4f6584cSmrg 88917b58d2e0Smrg# XORG_PROG_RAWCPP() 88927b58d2e0Smrg# ------------------ 88937b58d2e0Smrg# Minimum version: 1.0.0 88947b58d2e0Smrg# 88957b58d2e0Smrg# Find cpp program and necessary flags for use in pre-processing text files 88967b58d2e0Smrg# such as man pages and config files 88977b58d2e0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 88987b58d2e0SmrgAC_REQUIRE([AC_PROG_CPP]) 8899df9ffc95SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 89007b58d2e0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8901e4f6584cSmrg 89027b58d2e0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 89037b58d2e0Smrg# which is not the best choice for supporting other OS'es, but covers most 89047b58d2e0Smrg# of the ones we need for now. 89057b58d2e0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8906b12e5c03SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 89077b58d2e0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89087b58d2e0Smrg AC_MSG_RESULT([no]) 89097b58d2e0Smrgelse 89107b58d2e0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89117b58d2e0Smrg RAWCPPFLAGS=-undef 89127b58d2e0Smrg AC_MSG_RESULT([yes]) 89137b58d2e0Smrg # under Cygwin unix is still defined even with -undef 89147b58d2e0Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89157b58d2e0Smrg RAWCPPFLAGS="-undef -ansi" 89167b58d2e0Smrg AC_MSG_RESULT([yes, with -ansi]) 89177b58d2e0Smrg else 89187b58d2e0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 89197b58d2e0Smrg fi 89207b58d2e0Smrgfi 89217b58d2e0Smrgrm -f conftest.$ac_ext 8922e4f6584cSmrg 89237b58d2e0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8924b12e5c03SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 89257b58d2e0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 89267b58d2e0Smrg AC_MSG_RESULT([no]) 89277b58d2e0Smrgelse 89287b58d2e0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8929df9ffc95Smrg TRADITIONALCPPFLAGS="-traditional" 89307b58d2e0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 89317b58d2e0Smrg AC_MSG_RESULT([yes]) 89327b58d2e0Smrg else 89337b58d2e0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 893409885543Smrg fi 89357b58d2e0Smrgfi 89367b58d2e0Smrgrm -f conftest.$ac_ext 89377b58d2e0SmrgAC_SUBST(RAWCPPFLAGS) 8938df9ffc95SmrgAC_SUBST(TRADITIONALCPPFLAGS) 89397b58d2e0Smrg]) # XORG_PROG_RAWCPP 8940e4f6584cSmrg 89417b58d2e0Smrg# XORG_MANPAGE_SECTIONS() 89427b58d2e0Smrg# ----------------------- 89437b58d2e0Smrg# Minimum version: 1.0.0 89447b58d2e0Smrg# 89457b58d2e0Smrg# Determine which sections man pages go in for the different man page types 89467b58d2e0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 89477b58d2e0Smrg# Not sure if there's any better way than just hardcoding by OS name. 89487b58d2e0Smrg# Override default settings by setting environment variables 89497b58d2e0Smrg# Added MAN_SUBSTS in version 1.8 89507b58d2e0Smrg# Added AC_PROG_SED in version 1.8 8951e4f6584cSmrg 89527b58d2e0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 89537b58d2e0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 89547b58d2e0SmrgAC_REQUIRE([AC_PROG_SED]) 8955e4f6584cSmrg 89567b58d2e0Smrgif test x$APP_MAN_SUFFIX = x ; then 89577b58d2e0Smrg APP_MAN_SUFFIX=1 89587b58d2e0Smrgfi 89597b58d2e0Smrgif test x$APP_MAN_DIR = x ; then 89607b58d2e0Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 89617b58d2e0Smrgfi 8962e4f6584cSmrg 89637b58d2e0Smrgif test x$LIB_MAN_SUFFIX = x ; then 89647b58d2e0Smrg LIB_MAN_SUFFIX=3 89657b58d2e0Smrgfi 89667b58d2e0Smrgif test x$LIB_MAN_DIR = x ; then 89677b58d2e0Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 89687b58d2e0Smrgfi 8969e4f6584cSmrg 89707b58d2e0Smrgif test x$FILE_MAN_SUFFIX = x ; then 89717b58d2e0Smrg case $host_os in 89727b58d2e0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 89737b58d2e0Smrg *) FILE_MAN_SUFFIX=5 ;; 89747b58d2e0Smrg esac 89757b58d2e0Smrgfi 89767b58d2e0Smrgif test x$FILE_MAN_DIR = x ; then 89777b58d2e0Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 89787b58d2e0Smrgfi 897909885543Smrg 89807b58d2e0Smrgif test x$MISC_MAN_SUFFIX = x ; then 89817b58d2e0Smrg case $host_os in 89827b58d2e0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 89837b58d2e0Smrg *) MISC_MAN_SUFFIX=7 ;; 89847b58d2e0Smrg esac 89857b58d2e0Smrgfi 89867b58d2e0Smrgif test x$MISC_MAN_DIR = x ; then 89877b58d2e0Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 89887b58d2e0Smrgfi 89897104f784Smrg 89907b58d2e0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 89917b58d2e0Smrg case $host_os in 89927b58d2e0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 89937b58d2e0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 89947b58d2e0Smrg esac 89957b58d2e0Smrgfi 89967b58d2e0Smrgif test x$DRIVER_MAN_DIR = x ; then 89977b58d2e0Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 89987b58d2e0Smrgfi 899909885543Smrg 90007b58d2e0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 90017b58d2e0Smrg case $host_os in 90027b58d2e0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 90037b58d2e0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 90047b58d2e0Smrg esac 90057b58d2e0Smrgfi 90067b58d2e0Smrgif test x$ADMIN_MAN_DIR = x ; then 90077b58d2e0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 90087b58d2e0Smrgfi 90097104f784Smrg 901009885543Smrg 90117b58d2e0SmrgAC_SUBST([APP_MAN_SUFFIX]) 90127b58d2e0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 90137b58d2e0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 90147b58d2e0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 90157b58d2e0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 90167b58d2e0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 90177b58d2e0SmrgAC_SUBST([APP_MAN_DIR]) 90187b58d2e0SmrgAC_SUBST([LIB_MAN_DIR]) 90197b58d2e0SmrgAC_SUBST([FILE_MAN_DIR]) 90207b58d2e0SmrgAC_SUBST([MISC_MAN_DIR]) 90217b58d2e0SmrgAC_SUBST([DRIVER_MAN_DIR]) 90227b58d2e0SmrgAC_SUBST([ADMIN_MAN_DIR]) 902309885543Smrg 90247b58d2e0SmrgXORG_MAN_PAGE="X Version 11" 90257b58d2e0SmrgAC_SUBST([XORG_MAN_PAGE]) 90267b58d2e0SmrgMAN_SUBSTS="\ 90277b58d2e0Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90287b58d2e0Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90297b58d2e0Smrg -e 's|__xservername__|Xorg|g' \ 90307b58d2e0Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 90317b58d2e0Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9032b12e5c03Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 90337b58d2e0Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 90347b58d2e0Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 90357b58d2e0Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 90367b58d2e0Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 90377b58d2e0Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 90387b58d2e0Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 90397b58d2e0SmrgAC_SUBST([MAN_SUBSTS]) 904009885543Smrg 90417b58d2e0Smrg]) # XORG_MANPAGE_SECTIONS 904209885543Smrg 90437b58d2e0Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 90447b58d2e0Smrg# ------------------------ 90457b58d2e0Smrg# Minimum version: 1.7.0 90467b58d2e0Smrg# 90477b58d2e0Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 90487b58d2e0Smrg# provided by xorg-sgml-doctools, if installed. 90497b58d2e0SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 90507b58d2e0SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 90517b58d2e0SmrgXORG_SGML_PATH= 90527b58d2e0SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 90537b58d2e0Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 90547b58d2e0Smrg [m4_ifval([$1],[:], 90557b58d2e0Smrg [if test x"$cross_compiling" != x"yes" ; then 90567b58d2e0Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 90577b58d2e0Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 90587b58d2e0Smrg fi]) 90597b58d2e0Smrg ]) 906009885543Smrg 90617b58d2e0Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 90627b58d2e0Smrg# the path and the name of the doc stylesheet 90637b58d2e0Smrgif test "x$XORG_SGML_PATH" != "x" ; then 90647b58d2e0Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 90657b58d2e0Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 90667b58d2e0Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 90677b58d2e0Smrgelse 90687b58d2e0Smrg AC_MSG_RESULT([no]) 90697b58d2e0Smrgfi 907009885543Smrg 90717b58d2e0SmrgAC_SUBST(XORG_SGML_PATH) 90727b58d2e0SmrgAC_SUBST(STYLESHEET_SRCDIR) 90737b58d2e0SmrgAC_SUBST(XSL_STYLESHEET) 90747b58d2e0SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90757b58d2e0Smrg]) # XORG_CHECK_SGML_DOCTOOLS 907609885543Smrg 90777b58d2e0Smrg# XORG_CHECK_LINUXDOC 90787b58d2e0Smrg# ------------------- 90797b58d2e0Smrg# Minimum version: 1.0.0 90807b58d2e0Smrg# 90817b58d2e0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 90827b58d2e0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 90837b58d2e0Smrg# Whether or not the necessary tools and files are found can be checked 90847b58d2e0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 90857b58d2e0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90867b58d2e0SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90877b58d2e0SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 908809885543Smrg 90897b58d2e0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 909009885543Smrg 90917b58d2e0SmrgAC_MSG_CHECKING([whether to build documentation]) 9092e4f6584cSmrg 90937b58d2e0Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 90947b58d2e0Smrg BUILDDOC=yes 90957b58d2e0Smrgelse 90967b58d2e0Smrg BUILDDOC=no 909709885543Smrgfi 909809885543Smrg 90997b58d2e0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 910009885543Smrg 91017b58d2e0SmrgAC_MSG_RESULT([$BUILDDOC]) 910209885543Smrg 91037b58d2e0SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 910409885543Smrg 91057b58d2e0Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 91067b58d2e0Smrg BUILDPDFDOC=yes 91077b58d2e0Smrgelse 91087b58d2e0Smrg BUILDPDFDOC=no 91097b58d2e0Smrgfi 911009885543Smrg 91117b58d2e0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 911209885543Smrg 91137b58d2e0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 911409885543Smrg 91157b58d2e0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 91167b58d2e0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 91177b58d2e0SmrgMAKE_PDF="$PS2PDF" 91187b58d2e0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 911909885543Smrg 91207b58d2e0SmrgAC_SUBST(MAKE_TEXT) 91217b58d2e0SmrgAC_SUBST(MAKE_PS) 91227b58d2e0SmrgAC_SUBST(MAKE_PDF) 91237b58d2e0SmrgAC_SUBST(MAKE_HTML) 91247b58d2e0Smrg]) # XORG_CHECK_LINUXDOC 9125b698ba48Smrg 91267b58d2e0Smrg# XORG_CHECK_DOCBOOK 91277b58d2e0Smrg# ------------------- 91287b58d2e0Smrg# Minimum version: 1.0.0 91297b58d2e0Smrg# 91307b58d2e0Smrg# Checks for the ability to build output formats from SGML DocBook source. 91317b58d2e0Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 91327b58d2e0Smrg# indicates whether the necessary tools and files are found and, if set, 91337b58d2e0Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 91347b58d2e0SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 91357b58d2e0SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 913609885543Smrg 91377b58d2e0SmrgBUILDTXTDOC=no 91387b58d2e0SmrgBUILDPDFDOC=no 91397b58d2e0SmrgBUILDPSDOC=no 91407b58d2e0SmrgBUILDHTMLDOC=no 914109885543Smrg 91427b58d2e0SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 91437b58d2e0SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 91447b58d2e0SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 91457b58d2e0SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9146e4f6584cSmrg 91477b58d2e0SmrgAC_MSG_CHECKING([whether to build text documentation]) 91487b58d2e0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 91497b58d2e0Smrg test x$BUILD_TXTDOC != xno; then 91507b58d2e0Smrg BUILDTXTDOC=yes 915109885543Smrgfi 91527b58d2e0SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 91537b58d2e0SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9154e4f6584cSmrg 91557b58d2e0SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 91567b58d2e0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 91577b58d2e0Smrg test x$BUILD_PDFDOC != xno; then 91587b58d2e0Smrg BUILDPDFDOC=yes 91597b58d2e0Smrgfi 91607b58d2e0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 91617b58d2e0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9162e4f6584cSmrg 91637b58d2e0SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 91647b58d2e0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 91657b58d2e0Smrg test x$BUILD_PSDOC != xno; then 91667b58d2e0Smrg BUILDPSDOC=yes 91677b58d2e0Smrgfi 91687b58d2e0SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 91697b58d2e0SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9170e4f6584cSmrg 91717b58d2e0SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91727b58d2e0Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 91737b58d2e0Smrg test x$BUILD_HTMLDOC != xno; then 91747b58d2e0Smrg BUILDHTMLDOC=yes 91757b58d2e0Smrgfi 91767b58d2e0SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 91777b58d2e0SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9178e4f6584cSmrg 91797b58d2e0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 91807b58d2e0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 91817b58d2e0SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 91827b58d2e0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9183e4f6584cSmrg 91847b58d2e0SmrgAC_SUBST(MAKE_TEXT) 91857b58d2e0SmrgAC_SUBST(MAKE_PS) 91867b58d2e0SmrgAC_SUBST(MAKE_PDF) 91877b58d2e0SmrgAC_SUBST(MAKE_HTML) 91887b58d2e0Smrg]) # XORG_CHECK_DOCBOOK 9189e4f6584cSmrg 9190b12e5c03Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 91917b58d2e0Smrg# ---------------- 91927b58d2e0Smrg# Minimum version: 1.5.0 9193b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 91947b58d2e0Smrg# 91957b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 91967b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 91977b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 91987b58d2e0Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9199b12e5c03Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9200b12e5c03Smrg# --with-xmlto assumes 'auto'. 92017b58d2e0Smrg# 92027b58d2e0Smrg# Interface to module: 92037b58d2e0Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 92047b58d2e0Smrg# XMLTO: returns the path of the xmlto program found 92057b58d2e0Smrg# returns the path set by the user in the environment 92067b58d2e0Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 92077b58d2e0Smrg# 'no' user instructs the module not to use xmlto 92087b58d2e0Smrg# 92097b58d2e0Smrg# Added in version 1.10.0 92107b58d2e0Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 92117b58d2e0Smrg# xmlto for text output requires either lynx, links, or w3m browsers 92127b58d2e0Smrg# 92137b58d2e0Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 92147b58d2e0Smrg# 92157b58d2e0SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 92167b58d2e0SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9217b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 92187b58d2e0SmrgAC_ARG_WITH(xmlto, 92197b58d2e0Smrg AS_HELP_STRING([--with-xmlto], 9220b12e5c03Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9221b12e5c03Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9222b12e5c03Smrgm4_undefine([_defopt]) 922309885543Smrg 92247b58d2e0Smrgif test "x$use_xmlto" = x"auto"; then 92257b58d2e0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92267b58d2e0Smrg if test "x$XMLTO" = "x"; then 92277b58d2e0Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 92287b58d2e0Smrg have_xmlto=no 92297b58d2e0Smrg else 92307b58d2e0Smrg have_xmlto=yes 92317b58d2e0Smrg fi 92327b58d2e0Smrgelif test "x$use_xmlto" = x"yes" ; then 92337b58d2e0Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92347b58d2e0Smrg if test "x$XMLTO" = "x"; then 92357b58d2e0Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 92367b58d2e0Smrg fi 92377b58d2e0Smrg have_xmlto=yes 92387b58d2e0Smrgelif test "x$use_xmlto" = x"no" ; then 92397b58d2e0Smrg if test "x$XMLTO" != "x"; then 92407b58d2e0Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 92417b58d2e0Smrg fi 92427b58d2e0Smrg have_xmlto=no 92437b58d2e0Smrgelse 92447b58d2e0Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 92457b58d2e0Smrgfi 924609885543Smrg 92477b58d2e0Smrg# Test for a minimum version of xmlto, if provided. 92487b58d2e0Smrgm4_ifval([$1], 92497b58d2e0Smrg[if test "$have_xmlto" = yes; then 92507b58d2e0Smrg # scrape the xmlto version 92517b58d2e0Smrg AC_MSG_CHECKING([the xmlto version]) 92527b58d2e0Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 92537b58d2e0Smrg AC_MSG_RESULT([$xmlto_version]) 92547b58d2e0Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 92557b58d2e0Smrg [if test "x$use_xmlto" = xauto; then 92567b58d2e0Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 92577b58d2e0Smrg have_xmlto=no 92587b58d2e0Smrg else 92597b58d2e0Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 92607b58d2e0Smrg fi]) 92617b58d2e0Smrgfi]) 9262e4f6584cSmrg 92637b58d2e0Smrg# Test for the ability of xmlto to generate a text target 92647b58d2e0Smrghave_xmlto_text=no 92657b58d2e0Smrgcat > conftest.xml << "EOF" 92667b58d2e0SmrgEOF 92677b58d2e0SmrgAS_IF([test "$have_xmlto" = yes], 92687b58d2e0Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 92697b58d2e0Smrg [have_xmlto_text=yes], 92707b58d2e0Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 92717b58d2e0Smrgrm -f conftest.xml 92727b58d2e0SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 92737b58d2e0SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92747b58d2e0Smrg]) # XORG_WITH_XMLTO 927509885543Smrg 9276b12e5c03Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9277b12e5c03Smrg# -------------------------------------------- 9278b12e5c03Smrg# Minimum version: 1.12.0 9279b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9280b12e5c03Smrg# 9281b12e5c03Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9282b12e5c03Smrg# XML-based language used for the transformation of XML documents. 9283b12e5c03Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9284b12e5c03Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9285b12e5c03Smrg# The XSLT processor is often used as a standalone tool for transformations. 9286b12e5c03Smrg# It should not be assumed that this tool is used only to work with documnetation. 9287b12e5c03Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9288b12e5c03Smrg# 9289b12e5c03Smrg# Interface to module: 9290b12e5c03Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9291b12e5c03Smrg# XSLTPROC: returns the path of the xsltproc program found 9292b12e5c03Smrg# returns the path set by the user in the environment 9293b12e5c03Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9294b12e5c03Smrg# 'no' user instructs the module not to use xsltproc 9295b12e5c03Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9296b12e5c03Smrg# 9297b12e5c03Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9298b12e5c03Smrg# 9299b12e5c03SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9300b12e5c03SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9301b12e5c03Smrg# Preserves the interface, should it be implemented later 9302b12e5c03Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9303b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 9304b12e5c03SmrgAC_ARG_WITH(xsltproc, 9305b12e5c03Smrg AS_HELP_STRING([--with-xsltproc], 9306b12e5c03Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9307b12e5c03Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9308b12e5c03Smrgm4_undefine([_defopt]) 9309b12e5c03Smrg 9310b12e5c03Smrgif test "x$use_xsltproc" = x"auto"; then 9311b12e5c03Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9312b12e5c03Smrg if test "x$XSLTPROC" = "x"; then 9313b12e5c03Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9314b12e5c03Smrg have_xsltproc=no 9315b12e5c03Smrg else 9316b12e5c03Smrg have_xsltproc=yes 9317b12e5c03Smrg fi 9318b12e5c03Smrgelif test "x$use_xsltproc" = x"yes" ; then 9319b12e5c03Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9320b12e5c03Smrg if test "x$XSLTPROC" = "x"; then 9321b12e5c03Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9322b12e5c03Smrg fi 9323b12e5c03Smrg have_xsltproc=yes 9324b12e5c03Smrgelif test "x$use_xsltproc" = x"no" ; then 9325b12e5c03Smrg if test "x$XSLTPROC" != "x"; then 9326b12e5c03Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9327b12e5c03Smrg fi 9328b12e5c03Smrg have_xsltproc=no 9329b12e5c03Smrgelse 9330b12e5c03Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9331b12e5c03Smrgfi 9332b12e5c03Smrg 9333b12e5c03SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9334b12e5c03Smrg]) # XORG_WITH_XSLTPROC 9335b12e5c03Smrg 9336b12e5c03Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9337b12e5c03Smrg# ---------------------------------------- 9338b12e5c03Smrg# Minimum version: 1.15.0 9339b12e5c03Smrg# 9340b12e5c03Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9341b12e5c03Smrg# scanning arbitrary text files, extracting information from those text files, 9342b12e5c03Smrg# and printing reports based on that information. 9343b12e5c03Smrg# 9344b12e5c03Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9345b12e5c03Smrg# 9346b12e5c03Smrg# Interface to module: 9347b12e5c03Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9348b12e5c03Smrg# PERL: returns the path of the perl program found 9349b12e5c03Smrg# returns the path set by the user in the environment 9350b12e5c03Smrg# --with-perl: 'yes' user instructs the module to use perl 9351b12e5c03Smrg# 'no' user instructs the module not to use perl 9352b12e5c03Smrg# have_perl: returns yes if perl found in PATH or no 9353b12e5c03Smrg# 9354b12e5c03Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9355b12e5c03Smrg# 9356b12e5c03SmrgAC_DEFUN([XORG_WITH_PERL],[ 9357b12e5c03SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9358b12e5c03Smrg# Preserves the interface, should it be implemented later 9359b12e5c03Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9360b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 9361b12e5c03SmrgAC_ARG_WITH(perl, 9362b12e5c03Smrg AS_HELP_STRING([--with-perl], 9363b12e5c03Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9364b12e5c03Smrg [use_perl=$withval], [use_perl=]_defopt) 9365b12e5c03Smrgm4_undefine([_defopt]) 9366b12e5c03Smrg 9367b12e5c03Smrgif test "x$use_perl" = x"auto"; then 9368b12e5c03Smrg AC_PATH_PROG([PERL], [perl]) 9369b12e5c03Smrg if test "x$PERL" = "x"; then 9370b12e5c03Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9371b12e5c03Smrg have_perl=no 9372b12e5c03Smrg else 9373b12e5c03Smrg have_perl=yes 9374b12e5c03Smrg fi 9375b12e5c03Smrgelif test "x$use_perl" = x"yes" ; then 9376b12e5c03Smrg AC_PATH_PROG([PERL], [perl]) 9377b12e5c03Smrg if test "x$PERL" = "x"; then 9378b12e5c03Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9379b12e5c03Smrg fi 9380b12e5c03Smrg have_perl=yes 9381b12e5c03Smrgelif test "x$use_perl" = x"no" ; then 9382b12e5c03Smrg if test "x$PERL" != "x"; then 9383b12e5c03Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9384b12e5c03Smrg fi 9385b12e5c03Smrg have_perl=no 9386b12e5c03Smrgelse 9387b12e5c03Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9388b12e5c03Smrgfi 9389b12e5c03Smrg 9390b12e5c03SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9391b12e5c03Smrg]) # XORG_WITH_PERL 9392b12e5c03Smrg 9393b12e5c03Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 93947b58d2e0Smrg# ---------------- 93957b58d2e0Smrg# Minimum version: 1.5.0 9396b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 93977b58d2e0Smrg# 93987b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 93997b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 94007b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94017b58d2e0Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9402b12e5c03Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9403b12e5c03Smrg# --with-asciidoc assumes 'auto'. 94047b58d2e0Smrg# 94057b58d2e0Smrg# Interface to module: 94067b58d2e0Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 94077b58d2e0Smrg# ASCIIDOC: returns the path of the asciidoc program found 94087b58d2e0Smrg# returns the path set by the user in the environment 94097b58d2e0Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 94107b58d2e0Smrg# 'no' user instructs the module not to use asciidoc 94117b58d2e0Smrg# 94127b58d2e0Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 94137b58d2e0Smrg# 94147b58d2e0SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 94157b58d2e0SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9416b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 94177b58d2e0SmrgAC_ARG_WITH(asciidoc, 94187b58d2e0Smrg AS_HELP_STRING([--with-asciidoc], 9419b12e5c03Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9420b12e5c03Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9421b12e5c03Smrgm4_undefine([_defopt]) 942209885543Smrg 94237b58d2e0Smrgif test "x$use_asciidoc" = x"auto"; then 94247b58d2e0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94257b58d2e0Smrg if test "x$ASCIIDOC" = "x"; then 94267b58d2e0Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 94277b58d2e0Smrg have_asciidoc=no 94287b58d2e0Smrg else 94297b58d2e0Smrg have_asciidoc=yes 94307b58d2e0Smrg fi 94317b58d2e0Smrgelif test "x$use_asciidoc" = x"yes" ; then 94327b58d2e0Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94337b58d2e0Smrg if test "x$ASCIIDOC" = "x"; then 94347b58d2e0Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 94357b58d2e0Smrg fi 94367b58d2e0Smrg have_asciidoc=yes 94377b58d2e0Smrgelif test "x$use_asciidoc" = x"no" ; then 94387b58d2e0Smrg if test "x$ASCIIDOC" != "x"; then 94397b58d2e0Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 94407b58d2e0Smrg fi 94417b58d2e0Smrg have_asciidoc=no 94427b58d2e0Smrgelse 94437b58d2e0Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 94447b58d2e0Smrgfi 94457b58d2e0Smrgm4_ifval([$1], 94467b58d2e0Smrg[if test "$have_asciidoc" = yes; then 94477b58d2e0Smrg # scrape the asciidoc version 94487b58d2e0Smrg AC_MSG_CHECKING([the asciidoc version]) 94497b58d2e0Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 94507b58d2e0Smrg AC_MSG_RESULT([$asciidoc_version]) 94517b58d2e0Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 94527b58d2e0Smrg [if test "x$use_asciidoc" = xauto; then 94537b58d2e0Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 94547b58d2e0Smrg have_asciidoc=no 94557b58d2e0Smrg else 94567b58d2e0Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 94577b58d2e0Smrg fi]) 94587b58d2e0Smrgfi]) 94597b58d2e0SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 94607b58d2e0Smrg]) # XORG_WITH_ASCIIDOC 946109885543Smrg 9462b12e5c03Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9463df9ffc95Smrg# ------------------------------------------- 94647b58d2e0Smrg# Minimum version: 1.5.0 9465b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9466df9ffc95Smrg# Minimum version for optional DOT checking: 1.18.0 94677b58d2e0Smrg# 94687b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 94697b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 94707b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94717b58d2e0Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9472b12e5c03Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9473b12e5c03Smrg# --with-doxygen assumes 'auto'. 94747b58d2e0Smrg# 94757b58d2e0Smrg# Interface to module: 94767b58d2e0Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 94777b58d2e0Smrg# DOXYGEN: returns the path of the doxygen program found 94787b58d2e0Smrg# returns the path set by the user in the environment 94797b58d2e0Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 94807b58d2e0Smrg# 'no' user instructs the module not to use doxygen 94817b58d2e0Smrg# 94827b58d2e0Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 94837b58d2e0Smrg# 94847b58d2e0SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 94857b58d2e0SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9486df9ffc95SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9487b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 94887b58d2e0SmrgAC_ARG_WITH(doxygen, 94897b58d2e0Smrg AS_HELP_STRING([--with-doxygen], 9490b12e5c03Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9491b12e5c03Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9492b12e5c03Smrgm4_undefine([_defopt]) 949309885543Smrg 94947b58d2e0Smrgif test "x$use_doxygen" = x"auto"; then 94957b58d2e0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94967b58d2e0Smrg if test "x$DOXYGEN" = "x"; then 94977b58d2e0Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 94987b58d2e0Smrg have_doxygen=no 94997b58d2e0Smrg else 95007b58d2e0Smrg have_doxygen=yes 95017b58d2e0Smrg fi 95027b58d2e0Smrgelif test "x$use_doxygen" = x"yes" ; then 95037b58d2e0Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 95047b58d2e0Smrg if test "x$DOXYGEN" = "x"; then 95057b58d2e0Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 95067b58d2e0Smrg fi 95077b58d2e0Smrg have_doxygen=yes 95087b58d2e0Smrgelif test "x$use_doxygen" = x"no" ; then 95097b58d2e0Smrg if test "x$DOXYGEN" != "x"; then 95107b58d2e0Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 95117b58d2e0Smrg fi 95127b58d2e0Smrg have_doxygen=no 95137b58d2e0Smrgelse 95147b58d2e0Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 95157b58d2e0Smrgfi 95167b58d2e0Smrgm4_ifval([$1], 95177b58d2e0Smrg[if test "$have_doxygen" = yes; then 95187b58d2e0Smrg # scrape the doxygen version 95197b58d2e0Smrg AC_MSG_CHECKING([the doxygen version]) 95207b58d2e0Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 95217b58d2e0Smrg AC_MSG_RESULT([$doxygen_version]) 95227b58d2e0Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 95237b58d2e0Smrg [if test "x$use_doxygen" = xauto; then 95247b58d2e0Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 95257b58d2e0Smrg have_doxygen=no 95267b58d2e0Smrg else 95277b58d2e0Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 95287b58d2e0Smrg fi]) 95297b58d2e0Smrgfi]) 9530df9ffc95Smrg 9531df9ffc95Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 9532df9ffc95Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 9533df9ffc95Smrgdnl HAVE_DOT = @HAVE_DOT@ 9534df9ffc95SmrgHAVE_DOT=no 9535df9ffc95Smrgif test "x$have_doxygen" = "xyes"; then 9536df9ffc95Smrg AC_PATH_PROG([DOT], [dot]) 9537df9ffc95Smrg if test "x$DOT" != "x"; then 9538df9ffc95Smrg HAVE_DOT=yes 9539df9ffc95Smrg fi 9540df9ffc95Smrgfi 9541df9ffc95Smrg 9542df9ffc95SmrgAC_SUBST([HAVE_DOT]) 9543df9ffc95SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 95447b58d2e0SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 95457b58d2e0Smrg]) # XORG_WITH_DOXYGEN 954609885543Smrg 9547b12e5c03Smrg# XORG_WITH_GROFF([DEFAULT]) 95487b58d2e0Smrg# ---------------- 95497b58d2e0Smrg# Minimum version: 1.6.0 9550b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 95517b58d2e0Smrg# 95527b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 95537b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 95547b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 95557b58d2e0Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9556b12e5c03Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9557b12e5c03Smrg# --with-groff assumes 'auto'. 95587b58d2e0Smrg# 95597b58d2e0Smrg# Interface to module: 95607b58d2e0Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 95617b58d2e0Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 95627b58d2e0Smrg# HAVE_GROFF_MS: the -ms macros package 95637b58d2e0Smrg# GROFF: returns the path of the groff program found 95647b58d2e0Smrg# returns the path set by the user in the environment 95657b58d2e0Smrg# --with-groff: 'yes' user instructs the module to use groff 95667b58d2e0Smrg# 'no' user instructs the module not to use groff 95677b58d2e0Smrg# 95687b58d2e0Smrg# Added in version 1.9.0: 95697b58d2e0Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 95707b58d2e0Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 95717b58d2e0Smrg# psselect from the psutils package. 95727b58d2e0Smrg# the ghostcript package. Refer to the grohtml man pages 95737b58d2e0Smrg# 95747b58d2e0Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 95757b58d2e0Smrg# 95767b58d2e0Smrg# OS and distros often splits groff in a basic and full package, the former 95777b58d2e0Smrg# having the groff program and the later having devices, fonts and macros 95787b58d2e0Smrg# Checking for the groff executable is not enough. 95797b58d2e0Smrg# 95807b58d2e0Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 95817b58d2e0Smrg# unset HAVE_GROFF or GROFF env variables. 95827b58d2e0Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 95837b58d2e0Smrg# 95847b58d2e0SmrgAC_DEFUN([XORG_WITH_GROFF],[ 95857b58d2e0SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9586b12e5c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 95877b58d2e0SmrgAC_ARG_WITH(groff, 95887b58d2e0Smrg AS_HELP_STRING([--with-groff], 9589b12e5c03Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9590b12e5c03Smrg [use_groff=$withval], [use_groff=]_defopt) 9591b12e5c03Smrgm4_undefine([_defopt]) 959209885543Smrg 95937b58d2e0Smrgif test "x$use_groff" = x"auto"; then 95947b58d2e0Smrg AC_PATH_PROG([GROFF], [groff]) 95957b58d2e0Smrg if test "x$GROFF" = "x"; then 95967b58d2e0Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95977b58d2e0Smrg have_groff=no 95987b58d2e0Smrg else 95997b58d2e0Smrg have_groff=yes 96007b58d2e0Smrg fi 96017b58d2e0Smrgelif test "x$use_groff" = x"yes" ; then 96027b58d2e0Smrg AC_PATH_PROG([GROFF], [groff]) 96037b58d2e0Smrg if test "x$GROFF" = "x"; then 96047b58d2e0Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 96057b58d2e0Smrg fi 96067b58d2e0Smrg have_groff=yes 96077b58d2e0Smrgelif test "x$use_groff" = x"no" ; then 96087b58d2e0Smrg if test "x$GROFF" != "x"; then 96097b58d2e0Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 96107b58d2e0Smrg fi 96117b58d2e0Smrg have_groff=no 96127b58d2e0Smrgelse 96137b58d2e0Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 96147b58d2e0Smrgfi 9615e4f6584cSmrg 96167b58d2e0Smrg# We have groff, test for the presence of the macro packages 96177b58d2e0Smrgif test "x$have_groff" = x"yes"; then 96187b58d2e0Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 96197b58d2e0Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 96207b58d2e0Smrg groff_ms_works=yes 96217b58d2e0Smrg else 96227b58d2e0Smrg groff_ms_works=no 96237b58d2e0Smrg fi 96247b58d2e0Smrg AC_MSG_RESULT([$groff_ms_works]) 96257b58d2e0Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 96267b58d2e0Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 96277b58d2e0Smrg groff_mm_works=yes 96287b58d2e0Smrg else 96297b58d2e0Smrg groff_mm_works=no 96307b58d2e0Smrg fi 96317b58d2e0Smrg AC_MSG_RESULT([$groff_mm_works]) 96327b58d2e0Smrgfi 9633e4f6584cSmrg 96347b58d2e0Smrg# We have groff, test for HTML dependencies, one command per package 96357b58d2e0Smrgif test "x$have_groff" = x"yes"; then 96367b58d2e0Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 96377b58d2e0Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 96387b58d2e0Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 96397b58d2e0Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 96407b58d2e0Smrg have_groff_html=yes 96417b58d2e0Smrg else 96427b58d2e0Smrg have_groff_html=no 96437b58d2e0Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 96447b58d2e0Smrg fi 96457b58d2e0Smrgfi 9646e4f6584cSmrg 96477b58d2e0Smrg# Set Automake conditionals for Makefiles 96487b58d2e0SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 96497b58d2e0SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 96507b58d2e0SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 96517b58d2e0SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 96527b58d2e0Smrg]) # XORG_WITH_GROFF 9653e4f6584cSmrg 9654b12e5c03Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9655b12e5c03Smrg# --------------------------------------- 96567b58d2e0Smrg# Minimum version: 1.6.0 9657b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9658b12e5c03Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 96597b58d2e0Smrg# 96607b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 96617b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 96627b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96637b58d2e0Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9664b12e5c03Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9665b12e5c03Smrg# --with-fop assumes 'auto'. 96667b58d2e0Smrg# 96677b58d2e0Smrg# Interface to module: 96687b58d2e0Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 96697b58d2e0Smrg# FOP: returns the path of the fop program found 96707b58d2e0Smrg# returns the path set by the user in the environment 96717b58d2e0Smrg# --with-fop: 'yes' user instructs the module to use fop 96727b58d2e0Smrg# 'no' user instructs the module not to use fop 96737b58d2e0Smrg# 96747b58d2e0Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 96757b58d2e0Smrg# 96767b58d2e0SmrgAC_DEFUN([XORG_WITH_FOP],[ 96777b58d2e0SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9678b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 96797b58d2e0SmrgAC_ARG_WITH(fop, 96807b58d2e0Smrg AS_HELP_STRING([--with-fop], 9681b12e5c03Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9682b12e5c03Smrg [use_fop=$withval], [use_fop=]_defopt) 9683b12e5c03Smrgm4_undefine([_defopt]) 9684e4f6584cSmrg 96857b58d2e0Smrgif test "x$use_fop" = x"auto"; then 96867b58d2e0Smrg AC_PATH_PROG([FOP], [fop]) 96877b58d2e0Smrg if test "x$FOP" = "x"; then 96887b58d2e0Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96897b58d2e0Smrg have_fop=no 96907b58d2e0Smrg else 96917b58d2e0Smrg have_fop=yes 96927b58d2e0Smrg fi 96937b58d2e0Smrgelif test "x$use_fop" = x"yes" ; then 96947b58d2e0Smrg AC_PATH_PROG([FOP], [fop]) 96957b58d2e0Smrg if test "x$FOP" = "x"; then 96967b58d2e0Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96977b58d2e0Smrg fi 96987b58d2e0Smrg have_fop=yes 96997b58d2e0Smrgelif test "x$use_fop" = x"no" ; then 97007b58d2e0Smrg if test "x$FOP" != "x"; then 97017b58d2e0Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 97027b58d2e0Smrg fi 97037b58d2e0Smrg have_fop=no 9704e4f6584cSmrgelse 97057b58d2e0Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9706e4f6584cSmrgfi 9707b12e5c03Smrg 9708b12e5c03Smrg# Test for a minimum version of fop, if provided. 9709b12e5c03Smrgm4_ifval([$1], 9710b12e5c03Smrg[if test "$have_fop" = yes; then 9711b12e5c03Smrg # scrape the fop version 9712b12e5c03Smrg AC_MSG_CHECKING([for fop minimum version]) 9713b12e5c03Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9714b12e5c03Smrg AC_MSG_RESULT([$fop_version]) 9715b12e5c03Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9716b12e5c03Smrg [if test "x$use_fop" = xauto; then 9717b12e5c03Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9718b12e5c03Smrg have_fop=no 9719b12e5c03Smrg else 9720b12e5c03Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9721b12e5c03Smrg fi]) 9722b12e5c03Smrgfi]) 97237b58d2e0SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 97247b58d2e0Smrg]) # XORG_WITH_FOP 9725e4f6584cSmrg 9726df9ffc95Smrg# XORG_WITH_M4([MIN-VERSION]) 9727df9ffc95Smrg# --------------------------- 9728df9ffc95Smrg# Minimum version: 1.19.0 9729df9ffc95Smrg# 9730df9ffc95Smrg# This macro attempts to locate an m4 macro processor which supports 9731df9ffc95Smrg# -I option and is only useful for modules relying on M4 in order to 9732df9ffc95Smrg# expand macros in source code files. 9733df9ffc95Smrg# 9734df9ffc95Smrg# Interface to module: 9735df9ffc95Smrg# M4: returns the path of the m4 program found 9736df9ffc95Smrg# returns the path set by the user in the environment 9737df9ffc95Smrg# 9738df9ffc95SmrgAC_DEFUN([XORG_WITH_M4], [ 9739df9ffc95SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 9740df9ffc95Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 9741df9ffc95Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 9742df9ffc95Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 9743df9ffc95Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 9744df9ffc95Smrg [$PATH:/usr/gnu/bin])]) 9745df9ffc95Smrg 9746df9ffc95SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 9747df9ffc95Smrg]) # XORG_WITH_M4 9748df9ffc95Smrg 9749b12e5c03Smrg# XORG_WITH_PS2PDF([DEFAULT]) 97507b58d2e0Smrg# ---------------- 97517b58d2e0Smrg# Minimum version: 1.6.0 9752b12e5c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 97537b58d2e0Smrg# 97547b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 97557b58d2e0Smrg# not at the appropriate level. This macro enables a module to test for the 97567b58d2e0Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 97577b58d2e0Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9758b12e5c03Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9759b12e5c03Smrg# --with-ps2pdf assumes 'auto'. 97607b58d2e0Smrg# 97617b58d2e0Smrg# Interface to module: 97627b58d2e0Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 97637b58d2e0Smrg# PS2PDF: returns the path of the ps2pdf program found 97647b58d2e0Smrg# returns the path set by the user in the environment 97657b58d2e0Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 97667b58d2e0Smrg# 'no' user instructs the module not to use ps2pdf 97677b58d2e0Smrg# 97687b58d2e0Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 97697b58d2e0Smrg# 97707b58d2e0SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 97717b58d2e0SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9772b12e5c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 97737b58d2e0SmrgAC_ARG_WITH(ps2pdf, 97747b58d2e0Smrg AS_HELP_STRING([--with-ps2pdf], 9775b12e5c03Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9776b12e5c03Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9777b12e5c03Smrgm4_undefine([_defopt]) 9778e4f6584cSmrg 97797b58d2e0Smrgif test "x$use_ps2pdf" = x"auto"; then 97807b58d2e0Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97817b58d2e0Smrg if test "x$PS2PDF" = "x"; then 97827b58d2e0Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 97837b58d2e0Smrg have_ps2pdf=no 97847b58d2e0Smrg else 97857b58d2e0Smrg have_ps2pdf=yes 97867b58d2e0Smrg fi 97877b58d2e0Smrgelif test "x$use_ps2pdf" = x"yes" ; then 97887b58d2e0Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97897b58d2e0Smrg if test "x$PS2PDF" = "x"; then 97907b58d2e0Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 97917b58d2e0Smrg fi 97927b58d2e0Smrg have_ps2pdf=yes 97937b58d2e0Smrgelif test "x$use_ps2pdf" = x"no" ; then 97947b58d2e0Smrg if test "x$PS2PDF" != "x"; then 97957b58d2e0Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 97967b58d2e0Smrg fi 97977b58d2e0Smrg have_ps2pdf=no 97987b58d2e0Smrgelse 97997b58d2e0Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 98007b58d2e0Smrgfi 98017b58d2e0SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 98027b58d2e0Smrg]) # XORG_WITH_PS2PDF 980309885543Smrg 98047b58d2e0Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 98057b58d2e0Smrg# ---------------- 98067b58d2e0Smrg# Minimum version: 1.6.0 98077b58d2e0Smrg# 98087b58d2e0Smrg# Documentation tools are not always available on all platforms and sometimes 98097b58d2e0Smrg# not at the appropriate level. This macro enables a builder to skip all 98107b58d2e0Smrg# documentation targets except traditional man pages. 98117b58d2e0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98127b58d2e0Smrg# maximum flexibilty in controlling documentation building. 98137b58d2e0Smrg# Refer to: 98147b58d2e0Smrg# XORG_WITH_XMLTO --with-xmlto 98157b58d2e0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98167b58d2e0Smrg# XORG_WITH_DOXYGEN --with-doxygen 98177b58d2e0Smrg# XORG_WITH_FOP --with-fop 98187b58d2e0Smrg# XORG_WITH_GROFF --with-groff 98197b58d2e0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98207b58d2e0Smrg# 98217b58d2e0Smrg# Interface to module: 98227b58d2e0Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 98237b58d2e0Smrg# --enable-docs: 'yes' user instructs the module to generate docs 98247b58d2e0Smrg# 'no' user instructs the module not to generate docs 98257b58d2e0Smrg# parm1: specify the default value, yes or no. 98267b58d2e0Smrg# 98277b58d2e0SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9828b12e5c03Smrgm4_define([docs_default], m4_default([$1], [yes])) 98297b58d2e0SmrgAC_ARG_ENABLE(docs, 98307b58d2e0Smrg AS_HELP_STRING([--enable-docs], 9831b12e5c03Smrg [Enable building the documentation (default: ]docs_default[)]), 9832b12e5c03Smrg [build_docs=$enableval], [build_docs=]docs_default) 9833b12e5c03Smrgm4_undefine([docs_default]) 98347b58d2e0SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 98357b58d2e0SmrgAC_MSG_CHECKING([whether to build documentation]) 98367b58d2e0SmrgAC_MSG_RESULT([$build_docs]) 98377b58d2e0Smrg]) # XORG_ENABLE_DOCS 983809885543Smrg 98397b58d2e0Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 98407b58d2e0Smrg# ---------------- 98417b58d2e0Smrg# Minimum version: 1.6.0 98427b58d2e0Smrg# 98437b58d2e0Smrg# This macro enables a builder to skip all developer documentation. 98447b58d2e0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98457b58d2e0Smrg# maximum flexibilty in controlling documentation building. 98467b58d2e0Smrg# Refer to: 98477b58d2e0Smrg# XORG_WITH_XMLTO --with-xmlto 98487b58d2e0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98497b58d2e0Smrg# XORG_WITH_DOXYGEN --with-doxygen 98507b58d2e0Smrg# XORG_WITH_FOP --with-fop 98517b58d2e0Smrg# XORG_WITH_GROFF --with-groff 98527b58d2e0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98537b58d2e0Smrg# 98547b58d2e0Smrg# Interface to module: 98557b58d2e0Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 98567b58d2e0Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 98577b58d2e0Smrg# 'no' user instructs the module not to generate developer docs 98587b58d2e0Smrg# parm1: specify the default value, yes or no. 98597b58d2e0Smrg# 98607b58d2e0SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9861b12e5c03Smrgm4_define([devel_default], m4_default([$1], [yes])) 98627b58d2e0SmrgAC_ARG_ENABLE(devel-docs, 98637b58d2e0Smrg AS_HELP_STRING([--enable-devel-docs], 9864b12e5c03Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9865b12e5c03Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9866b12e5c03Smrgm4_undefine([devel_default]) 98677b58d2e0SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 98687b58d2e0SmrgAC_MSG_CHECKING([whether to build developer documentation]) 98697b58d2e0SmrgAC_MSG_RESULT([$build_devel_docs]) 98707b58d2e0Smrg]) # XORG_ENABLE_DEVEL_DOCS 987109885543Smrg 98727b58d2e0Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 98737b58d2e0Smrg# ---------------- 98747b58d2e0Smrg# Minimum version: 1.6.0 98757b58d2e0Smrg# 98767b58d2e0Smrg# This macro enables a builder to skip all functional specification targets. 98777b58d2e0Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98787b58d2e0Smrg# maximum flexibilty in controlling documentation building. 98797b58d2e0Smrg# Refer to: 98807b58d2e0Smrg# XORG_WITH_XMLTO --with-xmlto 98817b58d2e0Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98827b58d2e0Smrg# XORG_WITH_DOXYGEN --with-doxygen 98837b58d2e0Smrg# XORG_WITH_FOP --with-fop 98847b58d2e0Smrg# XORG_WITH_GROFF --with-groff 98857b58d2e0Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98867b58d2e0Smrg# 98877b58d2e0Smrg# Interface to module: 98887b58d2e0Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 98897b58d2e0Smrg# --enable-specs: 'yes' user instructs the module to generate specs 98907b58d2e0Smrg# 'no' user instructs the module not to generate specs 98917b58d2e0Smrg# parm1: specify the default value, yes or no. 98927b58d2e0Smrg# 98937b58d2e0SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9894b12e5c03Smrgm4_define([spec_default], m4_default([$1], [yes])) 98957b58d2e0SmrgAC_ARG_ENABLE(specs, 98967b58d2e0Smrg AS_HELP_STRING([--enable-specs], 9897b12e5c03Smrg [Enable building the specs (default: ]spec_default[)]), 9898b12e5c03Smrg [build_specs=$enableval], [build_specs=]spec_default) 9899b12e5c03Smrgm4_undefine([spec_default]) 99007b58d2e0SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 99017b58d2e0SmrgAC_MSG_CHECKING([whether to build functional specifications]) 99027b58d2e0SmrgAC_MSG_RESULT([$build_specs]) 99037b58d2e0Smrg]) # XORG_ENABLE_SPECS 990409885543Smrg 9905b12e5c03Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9906b12e5c03Smrg# ---------------------------------------------- 9907b12e5c03Smrg# Minimum version: 1.13.0 9908b12e5c03Smrg# 9909b12e5c03Smrg# This macro enables a builder to enable/disable unit testing 9910b12e5c03Smrg# It makes no assumption about the test cases implementation 9911b12e5c03Smrg# Test cases may or may not use Automake "Support for test suites" 9912b12e5c03Smrg# They may or may not use the software utility library GLib 9913b12e5c03Smrg# 9914b12e5c03Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9915b12e5c03Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9916b12e5c03Smrg# The variable enable_unit_tests is used by other macros in this file. 9917b12e5c03Smrg# 9918b12e5c03Smrg# Interface to module: 9919b12e5c03Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9920b12e5c03Smrg# enable_unit_tests: used in configure.ac for additional configuration 9921b12e5c03Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9922b12e5c03Smrg# 'no' user instructs the module not to build tests 9923b12e5c03Smrg# parm1: specify the default value, yes or no. 9924b12e5c03Smrg# 9925b12e5c03SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9926b12e5c03SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9927b12e5c03SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9928b12e5c03SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9929b12e5c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 9930b12e5c03SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9931b12e5c03Smrg [Enable building unit test cases (default: ]_defopt[)]), 9932b12e5c03Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9933b12e5c03Smrgm4_undefine([_defopt]) 9934b12e5c03SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9935b12e5c03SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9936b12e5c03SmrgAC_MSG_RESULT([$enable_unit_tests]) 9937b12e5c03Smrg]) # XORG_ENABLE_UNIT_TESTS 9938b12e5c03Smrg 9939b12e5c03Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9940b12e5c03Smrg# ------------------------------------------------------ 9941b12e5c03Smrg# Minimum version: 1.17.0 9942b12e5c03Smrg# 9943b12e5c03Smrg# This macro enables a builder to enable/disable integration testing 9944b12e5c03Smrg# It makes no assumption about the test cases' implementation 9945b12e5c03Smrg# Test cases may or may not use Automake "Support for test suites" 9946b12e5c03Smrg# 9947b12e5c03Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9948b12e5c03Smrg# usually requires less dependencies and may be built and run under less 9949b12e5c03Smrg# stringent environments than integration tests. 9950b12e5c03Smrg# 9951b12e5c03Smrg# Interface to module: 9952b12e5c03Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9953b12e5c03Smrg# enable_integration_tests: used in configure.ac for additional configuration 9954b12e5c03Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9955b12e5c03Smrg# 'no' user instructs the module not to build tests 9956b12e5c03Smrg# parm1: specify the default value, yes or no. 9957b12e5c03Smrg# 9958b12e5c03SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9959b12e5c03SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9960b12e5c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 9961b12e5c03SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9962b12e5c03Smrg [Enable building integration test cases (default: ]_defopt[)]), 9963b12e5c03Smrg [enable_integration_tests=$enableval], 9964b12e5c03Smrg [enable_integration_tests=]_defopt) 9965b12e5c03Smrgm4_undefine([_defopt]) 9966b12e5c03SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9967b12e5c03Smrg [test "x$enable_integration_tests" != xno]) 9968b12e5c03SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9969b12e5c03SmrgAC_MSG_RESULT([$enable_integration_tests]) 9970b12e5c03Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9971b12e5c03Smrg 9972b12e5c03Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9973b12e5c03Smrg# ---------------------------------------- 9974b12e5c03Smrg# Minimum version: 1.13.0 9975b12e5c03Smrg# 9976b12e5c03Smrg# GLib is a library which provides advanced data structures and functions. 9977b12e5c03Smrg# This macro enables a module to test for the presence of Glib. 9978b12e5c03Smrg# 9979b12e5c03Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9980b12e5c03Smrg# Otherwise the value of $enable_unit_tests is blank. 9981b12e5c03Smrg# 9982b12e5c03Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9983b12e5c03Smrg# test support usually requires less dependencies and may be built and run under 9984b12e5c03Smrg# less stringent environments than integration tests. 9985b12e5c03Smrg# 9986b12e5c03Smrg# Interface to module: 9987b12e5c03Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9988b12e5c03Smrg# with_glib: used in configure.ac to know if GLib has been found 9989b12e5c03Smrg# --with-glib: 'yes' user instructs the module to use glib 9990b12e5c03Smrg# 'no' user instructs the module not to use glib 9991b12e5c03Smrg# 9992b12e5c03SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9993b12e5c03SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9994b12e5c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 9995b12e5c03SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9996b12e5c03Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9997b12e5c03Smrg [with_glib=$withval], [with_glib=]_defopt) 9998b12e5c03Smrgm4_undefine([_defopt]) 9999b12e5c03Smrg 10000b12e5c03Smrghave_glib=no 10001b12e5c03Smrg# Do not probe GLib if user explicitly disabled unit testing 10002b12e5c03Smrgif test "x$enable_unit_tests" != x"no"; then 10003b12e5c03Smrg # Do not probe GLib if user explicitly disabled it 10004b12e5c03Smrg if test "x$with_glib" != x"no"; then 10005b12e5c03Smrg m4_ifval( 10006b12e5c03Smrg [$1], 10007b12e5c03Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10008b12e5c03Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10009b12e5c03Smrg ) 10010b12e5c03Smrg fi 10011b12e5c03Smrgfi 10012b12e5c03Smrg 10013b12e5c03Smrg# Not having GLib when unit testing has been explicitly requested is an error 10014b12e5c03Smrgif test "x$enable_unit_tests" = x"yes"; then 10015b12e5c03Smrg if test "x$have_glib" = x"no"; then 10016b12e5c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10017b12e5c03Smrg fi 10018b12e5c03Smrgfi 10019b12e5c03Smrg 10020b12e5c03Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10021b12e5c03Smrgif test "x$enable_unit_tests" = x"no"; then 10022b12e5c03Smrg if test "x$with_glib" = x"yes"; then 10023b12e5c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10024b12e5c03Smrg fi 10025b12e5c03Smrgfi 10026b12e5c03Smrg 10027b12e5c03Smrg# Not having GLib when it has been explicitly requested is an error 10028b12e5c03Smrgif test "x$with_glib" = x"yes"; then 10029b12e5c03Smrg if test "x$have_glib" = x"no"; then 10030b12e5c03Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10031b12e5c03Smrg fi 10032b12e5c03Smrgfi 10033b12e5c03Smrg 10034b12e5c03SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10035b12e5c03Smrg]) # XORG_WITH_GLIB 10036b12e5c03Smrg 10037b12e5c03Smrg# XORG_LD_WRAP([required|optional]) 10038b12e5c03Smrg# --------------------------------- 10039b12e5c03Smrg# Minimum version: 1.13.0 10040b12e5c03Smrg# 10041b12e5c03Smrg# Check if linker supports -wrap, passed via compiler flags 10042b12e5c03Smrg# 10043b12e5c03Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10044b12e5c03Smrg# Otherwise the value of $enable_unit_tests is blank. 10045b12e5c03Smrg# 10046b12e5c03Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10047b12e5c03Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10048b12e5c03Smrg# available, an argument of "optional" allows use when some unit tests require 10049b12e5c03Smrg# ld -wrap and others do not. 10050b12e5c03Smrg# 10051b12e5c03SmrgAC_DEFUN([XORG_LD_WRAP],[ 10052b12e5c03SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10053b12e5c03Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10054b12e5c03Smrg void __wrap_exit(int status) { return; }], 10055b12e5c03Smrg [exit(0);])]) 10056b12e5c03Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10057b12e5c03Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10058b12e5c03Smrg if test "x$have_ld_wrap" = x"no"; then 10059b12e5c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10060b12e5c03Smrg fi 10061b12e5c03Smrgfi 10062b12e5c03SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10063b12e5c03Smrg# 10064b12e5c03Smrg]) # XORG_LD_WRAP 10065b12e5c03Smrg 10066b12e5c03Smrg# XORG_CHECK_LINKER_FLAGS 10067b12e5c03Smrg# ----------------------- 10068b12e5c03Smrg# SYNOPSIS 10069b12e5c03Smrg# 10070b12e5c03Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10071b12e5c03Smrg# 10072b12e5c03Smrg# DESCRIPTION 10073b12e5c03Smrg# 10074b12e5c03Smrg# Check whether the given linker FLAGS work with the current language's 10075b12e5c03Smrg# linker, or whether they give an error. 10076b12e5c03Smrg# 10077b12e5c03Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10078b12e5c03Smrg# success/failure. 10079b12e5c03Smrg# 10080b12e5c03Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10081b12e5c03Smrg# 10082b12e5c03Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10083b12e5c03Smrg# 10084b12e5c03Smrg# LICENSE 10085b12e5c03Smrg# 10086b12e5c03Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10087b12e5c03Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10088b12e5c03Smrg# Copyright (c) 2009 Matteo Frigo 10089b12e5c03Smrg# 10090b12e5c03Smrg# This program is free software: you can redistribute it and/or modify it 10091b12e5c03Smrg# under the terms of the GNU General Public License as published by the 10092b12e5c03Smrg# Free Software Foundation, either version 3 of the License, or (at your 10093b12e5c03Smrg# option) any later version. 10094b12e5c03Smrg# 10095b12e5c03Smrg# This program is distributed in the hope that it will be useful, but 10096b12e5c03Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10097b12e5c03Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10098b12e5c03Smrg# Public License for more details. 10099b12e5c03Smrg# 10100b12e5c03Smrg# You should have received a copy of the GNU General Public License along 10101b12e5c03Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10102b12e5c03Smrg# 10103b12e5c03Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10104b12e5c03Smrg# gives unlimited permission to copy, distribute and modify the configure 10105b12e5c03Smrg# scripts that are the output of Autoconf when processing the Macro. You 10106b12e5c03Smrg# need not follow the terms of the GNU General Public License when using 10107b12e5c03Smrg# or distributing such scripts, even though portions of the text of the 10108b12e5c03Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10109b12e5c03Smrg# all other use of the material that constitutes the Autoconf Macro. 10110b12e5c03Smrg# 10111b12e5c03Smrg# This special exception to the GPL applies to versions of the Autoconf 10112b12e5c03Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10113b12e5c03Smrg# modified version of the Autoconf Macro, you may extend this special 10114b12e5c03Smrg# exception to the GPL to apply to your modified version as well.# 10115b12e5c03SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10116b12e5c03Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10117b12e5c03Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10118b12e5c03SmrgAS_LITERAL_IF([$1], 10119b12e5c03Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10120b12e5c03Smrg ax_save_FLAGS=$LDFLAGS 10121b12e5c03Smrg LDFLAGS="$1" 10122b12e5c03Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10123b12e5c03Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10124b12e5c03Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10125b12e5c03Smrg LDFLAGS=$ax_save_FLAGS])], 10126b12e5c03Smrg [ax_save_FLAGS=$LDFLAGS 10127b12e5c03Smrg LDFLAGS="$1" 10128b12e5c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10129b12e5c03Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10130b12e5c03Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10131b12e5c03Smrg LDFLAGS=$ax_save_FLAGS]) 10132b12e5c03Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10133b12e5c03SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10134b12e5c03Smrgif test "x$xorg_check_linker_flags" = xyes; then 10135b12e5c03Smrg m4_default([$2], :) 10136b12e5c03Smrgelse 10137b12e5c03Smrg m4_default([$3], :) 10138b12e5c03Smrgfi 10139b12e5c03Smrg]) # XORG_CHECK_LINKER_FLAGS 10140b12e5c03Smrg 10141b12e5c03Smrg# XORG_MEMORY_CHECK_FLAGS 10142b12e5c03Smrg# ----------------------- 10143b12e5c03Smrg# Minimum version: 1.16.0 10144b12e5c03Smrg# 10145b12e5c03Smrg# This macro attempts to find appropriate memory checking functionality 10146b12e5c03Smrg# for various platforms which unit testing code may use to catch various 10147b12e5c03Smrg# forms of memory allocation and access errors in testing. 10148b12e5c03Smrg# 10149b12e5c03Smrg# Interface to module: 10150b12e5c03Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10151b12e5c03Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10152b12e5c03Smrg# 10153b12e5c03Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10154b12e5c03Smrg# 10155b12e5c03SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10156b12e5c03Smrg 10157b12e5c03SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10158b12e5c03SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10159b12e5c03Smrg [Environment variables to enable memory checking in tests]) 10160b12e5c03Smrg 10161b12e5c03Smrg# Check for different types of support on different platforms 10162b12e5c03Smrgcase $host_os in 10163b12e5c03Smrg solaris*) 10164b12e5c03Smrg AC_CHECK_LIB([umem], [umem_alloc], 10165b12e5c03Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10166b12e5c03Smrg ;; 10167b12e5c03Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10168b12e5c03Smrg # both directly and inverted, so should not be 0 or 255. 10169b12e5c03Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10170b12e5c03Smrg ;; 10171b12e5c03Smrg darwin*) 10172b12e5c03Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10173b12e5c03Smrg ;; 10174b12e5c03Smrg *bsd*) 10175b12e5c03Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10176b12e5c03Smrg ;; 10177b12e5c03Smrgesac 10178b12e5c03Smrg 10179b12e5c03Smrg# User supplied flags override default flags 10180b12e5c03Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10181b12e5c03Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10182b12e5c03Smrgfi 10183b12e5c03Smrg 10184b12e5c03SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10185b12e5c03Smrg]) # XORG_WITH_LINT 10186b12e5c03Smrg 101877b58d2e0Smrg# XORG_CHECK_MALLOC_ZERO 101887b58d2e0Smrg# ---------------------- 101897b58d2e0Smrg# Minimum version: 1.0.0 101907b58d2e0Smrg# 101917b58d2e0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 101927b58d2e0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 101937b58d2e0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 101947b58d2e0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 101957b58d2e0SmrgAC_ARG_ENABLE(malloc0returnsnull, 101967b58d2e0Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 101977b58d2e0Smrg [malloc(0) returns NULL (default: auto)]), 101987b58d2e0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 101997b58d2e0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1020009885543Smrg 102017b58d2e0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 102027b58d2e0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10203df9ffc95SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10204df9ffc95Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10205b12e5c03Smrg#include <stdlib.h> 10206b12e5c03Smrg],[ 102077b58d2e0Smrg char *m0, *r0, *c0, *p; 102087b58d2e0Smrg m0 = malloc(0); 102097b58d2e0Smrg p = malloc(10); 102107b58d2e0Smrg r0 = realloc(p,0); 10211b12e5c03Smrg c0 = calloc(0,10); 10212b12e5c03Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10213b12e5c03Smrg])], 10214df9ffc95Smrg [xorg_cv_malloc0_returns_null=yes], 10215df9ffc95Smrg [xorg_cv_malloc0_returns_null=no])]) 10216df9ffc95SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 102177b58d2e0Smrgfi 102187b58d2e0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1021909885543Smrg 102207b58d2e0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 102217b58d2e0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 102227b58d2e0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 102237b58d2e0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 102247b58d2e0Smrgelse 102257b58d2e0Smrg MALLOC_ZERO_CFLAGS="" 102267b58d2e0Smrg XMALLOC_ZERO_CFLAGS="" 102277b58d2e0Smrg XTMALLOC_ZERO_CFLAGS="" 102287b58d2e0Smrgfi 1022909885543Smrg 102307b58d2e0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 102317b58d2e0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 102327b58d2e0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 102337b58d2e0Smrg]) # XORG_CHECK_MALLOC_ZERO 1023409885543Smrg 102357b58d2e0Smrg# XORG_WITH_LINT() 102367b58d2e0Smrg# ---------------- 102377b58d2e0Smrg# Minimum version: 1.1.0 102387b58d2e0Smrg# 102397b58d2e0Smrg# This macro enables the use of a tool that flags some suspicious and 102407b58d2e0Smrg# non-portable constructs (likely to be bugs) in C language source code. 102417b58d2e0Smrg# It will attempt to locate the tool and use appropriate options. 102427b58d2e0Smrg# There are various lint type tools on different platforms. 102437b58d2e0Smrg# 102447b58d2e0Smrg# Interface to module: 102457b58d2e0Smrg# LINT: returns the path to the tool found on the platform 102467b58d2e0Smrg# or the value set to LINT on the configure cmd line 102477b58d2e0Smrg# also an Automake conditional 102487b58d2e0Smrg# LINT_FLAGS: an Automake variable with appropriate flags 102497b58d2e0Smrg# 102507b58d2e0Smrg# --with-lint: 'yes' user instructs the module to use lint 102517b58d2e0Smrg# 'no' user instructs the module not to use lint (default) 102527b58d2e0Smrg# 102537b58d2e0Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 102547b58d2e0Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 102557b58d2e0Smrg# 102567b58d2e0SmrgAC_DEFUN([XORG_WITH_LINT],[ 1025709885543Smrg 102587b58d2e0SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 102597b58d2e0SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 102607b58d2e0SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 102617b58d2e0Smrg [Use a lint-style source code checker (default: disabled)])], 102627b58d2e0Smrg [use_lint=$withval], [use_lint=no]) 1026309885543Smrg 102647b58d2e0Smrg# Obtain platform specific info like program name and options 102657b58d2e0Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 102667b58d2e0Smrgcase $host_os in 102677b58d2e0Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 102687b58d2e0Smrg lint_name=splint 102697b58d2e0Smrg lint_options="-badflag" 102707b58d2e0Smrg ;; 102717b58d2e0Smrg *freebsd* | *netbsd*) 102727b58d2e0Smrg lint_name=lint 102737b58d2e0Smrg lint_options="-u -b" 102747b58d2e0Smrg ;; 102757b58d2e0Smrg *solaris*) 102767b58d2e0Smrg lint_name=lint 102777b58d2e0Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 102787b58d2e0Smrg ;; 102797b58d2e0Smrgesac 1028009885543Smrg 102817b58d2e0Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 102827b58d2e0Smrgif test "x$use_lint" = x"yes" ; then 102837b58d2e0Smrg AC_PATH_PROG([LINT], [$lint_name]) 102847b58d2e0Smrg if test "x$LINT" = "x"; then 102857b58d2e0Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 102867b58d2e0Smrg fi 102877b58d2e0Smrgelif test "x$use_lint" = x"no" ; then 102887b58d2e0Smrg if test "x$LINT" != "x"; then 102897b58d2e0Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 102907b58d2e0Smrg fi 102917b58d2e0Smrgelse 102927b58d2e0Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 102937b58d2e0Smrgfi 1029409885543Smrg 102957b58d2e0Smrg# User supplied flags override default flags 102967b58d2e0Smrgif test "x$LINT_FLAGS" != "x"; then 102977b58d2e0Smrg lint_options=$LINT_FLAGS 102987b58d2e0Smrgfi 10299e4f6584cSmrg 103007b58d2e0SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 103017b58d2e0SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1030209885543Smrg 103037b58d2e0Smrg]) # XORG_WITH_LINT 1030409885543Smrg 103057b58d2e0Smrg# XORG_LINT_LIBRARY(LIBNAME) 103067b58d2e0Smrg# -------------------------- 103077b58d2e0Smrg# Minimum version: 1.1.0 103087b58d2e0Smrg# 103097b58d2e0Smrg# Sets up flags for building lint libraries for checking programs that call 103107b58d2e0Smrg# functions in the library. 103117b58d2e0Smrg# 103127b58d2e0Smrg# Interface to module: 103137b58d2e0Smrg# LINTLIB - Automake variable with the name of lint library file to make 103147b58d2e0Smrg# MAKE_LINT_LIB - Automake conditional 103157b58d2e0Smrg# 103167b58d2e0Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 103177b58d2e0Smrg# - 'no' user instructs the module not to create a lint library (default) 10318b698ba48Smrg 103197b58d2e0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 103207b58d2e0SmrgAC_REQUIRE([XORG_WITH_LINT]) 103217b58d2e0SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 103227b58d2e0Smrg [Create lint library (default: disabled)])], 103237b58d2e0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1032409885543Smrg 103257b58d2e0Smrgif test "x$make_lint_lib" = x"yes" ; then 103267b58d2e0Smrg LINTLIB=llib-l$1.ln 103277b58d2e0Smrg if test "x$LINT" = "x"; then 103287b58d2e0Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 103297b58d2e0Smrg fi 103307b58d2e0Smrgelif test "x$make_lint_lib" != x"no" ; then 103317b58d2e0Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 103327b58d2e0Smrgfi 1033309885543Smrg 103347b58d2e0SmrgAC_SUBST(LINTLIB) 103357b58d2e0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1033609885543Smrg 103377b58d2e0Smrg]) # XORG_LINT_LIBRARY 1033809885543Smrg 10339b12e5c03Smrg# XORG_COMPILER_BRAND 10340b12e5c03Smrg# ------------------- 10341b12e5c03Smrg# Minimum version: 1.14.0 10342b12e5c03Smrg# 10343b12e5c03Smrg# Checks for various brands of compilers and sets flags as appropriate: 10344b12e5c03Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10345b12e5c03Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10346b12e5c03Smrg# clang compiler - sets CLANGCC to "yes" 10347b12e5c03Smrg# Intel compiler - sets INTELCC to "yes" 10348b12e5c03Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10349b12e5c03Smrg# 10350b12e5c03SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10351b12e5c03SmrgAC_LANG_CASE( 10352b12e5c03Smrg [C], [ 10353b12e5c03Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10354b12e5c03Smrg ], 10355b12e5c03Smrg [C++], [ 10356b12e5c03Smrg AC_REQUIRE([AC_PROG_CXX]) 10357b12e5c03Smrg ] 10358b12e5c03Smrg) 10359b12e5c03SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10360b12e5c03SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10361b12e5c03SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10362b12e5c03Smrg]) # XORG_COMPILER_BRAND 10363b12e5c03Smrg 10364b12e5c03Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10365b12e5c03Smrg# --------------- 10366b12e5c03Smrg# Minimum version: 1.16.0 10367b12e5c03Smrg# 10368b12e5c03Smrg# Test if the compiler works when passed the given flag as a command line argument. 10369b12e5c03Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10370b12e5c03Smrg# next flag in the list until there are no more options. 10371b12e5c03Smrg# 10372b12e5c03Smrg# Note that this does not guarantee that the compiler supports the flag as some 10373b12e5c03Smrg# compilers will simply ignore arguments that they do not understand, but we do 10374b12e5c03Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10375b12e5c03Smrg# -Werror=unused-command-line-argument 10376b12e5c03Smrg# 10377b12e5c03SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10378b12e5c03Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10379b12e5c03Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10380b12e5c03Smrg 10381b12e5c03SmrgAC_LANG_COMPILER_REQUIRE 10382b12e5c03Smrg 10383b12e5c03SmrgAC_LANG_CASE( 10384b12e5c03Smrg [C], [ 10385b12e5c03Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10386b12e5c03Smrg define([PREFIX], [C]) 10387b12e5c03Smrg define([CACHE_PREFIX], [cc]) 10388b12e5c03Smrg define([COMPILER], [$CC]) 10389b12e5c03Smrg ], 10390b12e5c03Smrg [C++], [ 10391b12e5c03Smrg define([PREFIX], [CXX]) 10392b12e5c03Smrg define([CACHE_PREFIX], [cxx]) 10393b12e5c03Smrg define([COMPILER], [$CXX]) 10394b12e5c03Smrg ] 10395b12e5c03Smrg) 10396b12e5c03Smrg 10397b12e5c03Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10398b12e5c03Smrg 10399b12e5c03Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10400b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10401b12e5c03Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10402b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10403b12e5c03Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10404b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10405b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10406b12e5c03Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10407b12e5c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10408b12e5c03Smrgfi 10409b12e5c03Smrg 10410b12e5c03Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10411b12e5c03Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10412b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10413b12e5c03Smrg fi 10414b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10415b12e5c03Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10416b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10417b12e5c03Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10418b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10419b12e5c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10420b12e5c03Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10421b12e5c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10422b12e5c03Smrgfi 10423b12e5c03Smrg 10424b12e5c03Smrgfound="no" 10425b12e5c03Smrgm4_foreach([flag], m4_cdr($@), [ 10426b12e5c03Smrg if test $found = "no" ; then 10427df9ffc95Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10428b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10429b12e5c03Smrg fi 10430b12e5c03Smrg 10431df9ffc95Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10432b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10433b12e5c03Smrg fi 10434b12e5c03Smrg 10435b12e5c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10436b12e5c03Smrg 10437b12e5c03Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10438b12e5c03Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10439b12e5c03Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10440b12e5c03Smrg AC_CACHE_VAL($cacheid, 10441b12e5c03Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10442b12e5c03Smrg [eval $cacheid=yes], 10443b12e5c03Smrg [eval $cacheid=no])]) 10444b12e5c03Smrg 10445b12e5c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10446b12e5c03Smrg 10447b12e5c03Smrg eval supported=\$$cacheid 10448b12e5c03Smrg AC_MSG_RESULT([$supported]) 10449b12e5c03Smrg if test "$supported" = "yes" ; then 10450b12e5c03Smrg $1="$$1 ]flag[" 10451b12e5c03Smrg found="yes" 10452b12e5c03Smrg fi 10453b12e5c03Smrg fi 10454b12e5c03Smrg]) 10455b12e5c03Smrg]) # XORG_TESTSET_CFLAG 10456b12e5c03Smrg 10457b12e5c03Smrg# XORG_COMPILER_FLAGS 10458b12e5c03Smrg# --------------- 10459b12e5c03Smrg# Minimum version: 1.16.0 10460b12e5c03Smrg# 10461b12e5c03Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10462b12e5c03Smrg# arguments supported by the selected compiler which do NOT alter the generated 10463b12e5c03Smrg# code. These arguments will cause the compiler to print various warnings 10464b12e5c03Smrg# during compilation AND turn a conservative set of warnings into errors. 10465b12e5c03Smrg# 10466b12e5c03Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10467b12e5c03Smrg# future versions of util-macros as options are added to new compilers. 10468b12e5c03Smrg# 10469b12e5c03SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10470b12e5c03SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10471b12e5c03Smrg 10472b12e5c03SmrgAC_ARG_ENABLE(selective-werror, 10473b12e5c03Smrg AS_HELP_STRING([--disable-selective-werror], 10474b12e5c03Smrg [Turn off selective compiler errors. (default: enabled)]), 10475b12e5c03Smrg [SELECTIVE_WERROR=$enableval], 10476b12e5c03Smrg [SELECTIVE_WERROR=yes]) 10477b12e5c03Smrg 10478b12e5c03SmrgAC_LANG_CASE( 10479b12e5c03Smrg [C], [ 10480b12e5c03Smrg define([PREFIX], [C]) 10481b12e5c03Smrg ], 10482b12e5c03Smrg [C++], [ 10483b12e5c03Smrg define([PREFIX], [CXX]) 10484b12e5c03Smrg ] 10485b12e5c03Smrg) 10486b12e5c03Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10487b12e5c03Smrgif test "x$SUNCC" = "xyes"; then 10488b12e5c03Smrg [BASE_]PREFIX[FLAGS]="-v" 10489b12e5c03Smrgelse 10490b12e5c03Smrg [BASE_]PREFIX[FLAGS]="" 10491b12e5c03Smrgfi 10492b12e5c03Smrg 10493b12e5c03Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10494b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10495b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10496b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10497b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10498b12e5c03Smrg 10499b12e5c03SmrgAC_LANG_CASE( 10500b12e5c03Smrg [C], [ 10501b12e5c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10502b12e5c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10503b12e5c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10504b12e5c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10505df9ffc95Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10506b12e5c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10507b12e5c03Smrg ] 10508b12e5c03Smrg) 10509b12e5c03Smrg 10510b12e5c03Smrg# This chunk adds additional warnings that could catch undesired effects. 10511b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10512b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10513b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10514b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10515b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10516b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10517df9ffc95SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10518b12e5c03Smrg 10519b12e5c03Smrg# These are currently disabled because they are noisy. They will be enabled 10520b12e5c03Smrg# in the future once the codebase is sufficiently modernized to silence 10521b12e5c03Smrg# them. For now, I don't want them to drown out the other warnings. 10522b12e5c03Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10523b12e5c03Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10524df9ffc95Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10525b12e5c03Smrg 10526b12e5c03Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10527b12e5c03Smrg# when there are problems that should be fixed. 10528b12e5c03Smrg 10529b12e5c03Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10530b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10531b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10532b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10533b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10534b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10535b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10536b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10537b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10538b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10539b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10540b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10541b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10542b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10543b12e5c03Smrgelse 10544b12e5c03SmrgAC_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]) 10545b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10546b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10547b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10548b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10549b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10550b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10551b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10552b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10553b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10554b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10555b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10556b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10557b12e5c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10558b12e5c03Smrgfi 10559b12e5c03Smrg 10560b12e5c03SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10561b12e5c03Smrg]) # XORG_COMPILER_FLAGS 10562b12e5c03Smrg 105637b58d2e0Smrg# XORG_CWARNFLAGS 105647b58d2e0Smrg# --------------- 105657b58d2e0Smrg# Minimum version: 1.2.0 10566b12e5c03Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 105677b58d2e0Smrg# 105687b58d2e0Smrg# Defines CWARNFLAGS to enable C compiler warnings. 105697b58d2e0Smrg# 10570b12e5c03Smrg# This function is deprecated because it defines -fno-strict-aliasing 10571b12e5c03Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10572b12e5c03Smrg# is needed, then it should be added explicitly in the module when 10573b12e5c03Smrg# it is updated to use BASE_CFLAGS. 10574b12e5c03Smrg# 105757b58d2e0SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10576b12e5c03SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10577b12e5c03SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10578b12e5c03SmrgAC_LANG_CASE( 10579b12e5c03Smrg [C], [ 10580b12e5c03Smrg CWARNFLAGS="$BASE_CFLAGS" 10581b12e5c03Smrg if test "x$GCC" = xyes ; then 10582b12e5c03Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10583b12e5c03Smrg fi 10584b12e5c03Smrg AC_SUBST(CWARNFLAGS) 10585b12e5c03Smrg ] 10586b12e5c03Smrg) 105877b58d2e0Smrg]) # XORG_CWARNFLAGS 10588e4f6584cSmrg 105897b58d2e0Smrg# XORG_STRICT_OPTION 105907b58d2e0Smrg# ----------------------- 105917b58d2e0Smrg# Minimum version: 1.3.0 105927b58d2e0Smrg# 10593b12e5c03Smrg# Add configure option to enable strict compilation flags, such as treating 10594b12e5c03Smrg# warnings as fatal errors. 10595b12e5c03Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10596b12e5c03Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10597b12e5c03Smrg# 10598b12e5c03Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10599b12e5c03Smrg# when strict compilation is unconditionally desired. 106007b58d2e0SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 106017b58d2e0SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10602b12e5c03SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 106037b58d2e0Smrg 106047b58d2e0SmrgAC_ARG_ENABLE(strict-compilation, 106057b58d2e0Smrg AS_HELP_STRING([--enable-strict-compilation], 106067b58d2e0Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 106077b58d2e0Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10608b12e5c03Smrg 10609b12e5c03SmrgAC_LANG_CASE( 10610b12e5c03Smrg [C], [ 10611b12e5c03Smrg define([PREFIX], [C]) 10612b12e5c03Smrg ], 10613b12e5c03Smrg [C++], [ 10614b12e5c03Smrg define([PREFIX], [CXX]) 10615b12e5c03Smrg ] 10616b12e5c03Smrg) 10617b12e5c03Smrg 10618b12e5c03Smrg[STRICT_]PREFIX[FLAGS]="" 10619b12e5c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10620b12e5c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10621b12e5c03Smrg 10622b12e5c03Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10623b12e5c03Smrg# activate it with -Werror, so we add it here explicitly. 10624b12e5c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10625b12e5c03Smrg 106267b58d2e0Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10627b12e5c03Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10628b12e5c03Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 106297b58d2e0Smrgfi 10630b12e5c03SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10631b12e5c03SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10632b12e5c03SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 106337b58d2e0Smrg]) # XORG_STRICT_OPTION 10634e4f6584cSmrg 106357b58d2e0Smrg# XORG_DEFAULT_OPTIONS 106367b58d2e0Smrg# -------------------- 106377b58d2e0Smrg# Minimum version: 1.3.0 106387b58d2e0Smrg# 106397b58d2e0Smrg# Defines default options for X.Org modules. 106407b58d2e0Smrg# 106417b58d2e0SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 106427b58d2e0SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10643b12e5c03SmrgXORG_COMPILER_FLAGS 106447b58d2e0SmrgXORG_CWARNFLAGS 106457b58d2e0SmrgXORG_STRICT_OPTION 106467b58d2e0SmrgXORG_RELEASE_VERSION 106477b58d2e0SmrgXORG_CHANGELOG 106487b58d2e0SmrgXORG_INSTALL 106497b58d2e0SmrgXORG_MANPAGE_SECTIONS 106507b58d2e0Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 106517b58d2e0Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 106527b58d2e0Smrg]) # XORG_DEFAULT_OPTIONS 10653e4f6584cSmrg 106547b58d2e0Smrg# XORG_INSTALL() 106557b58d2e0Smrg# ---------------- 106567b58d2e0Smrg# Minimum version: 1.4.0 106577b58d2e0Smrg# 106587b58d2e0Smrg# Defines the variable INSTALL_CMD as the command to copy 106597b58d2e0Smrg# INSTALL from $prefix/share/util-macros. 106607b58d2e0Smrg# 106617b58d2e0SmrgAC_DEFUN([XORG_INSTALL], [ 106627b58d2e0SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106637b58d2e0Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 106647b58d2e0SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 106657b58d2e0Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 106667b58d2e0Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 106677b58d2e0Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 106687b58d2e0SmrgAC_SUBST([INSTALL_CMD]) 106697b58d2e0Smrg]) # XORG_INSTALL 106707b58d2e0Smrgdnl Copyright 2005 Red Hat, Inc 106717b58d2e0Smrgdnl 106727b58d2e0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106737b58d2e0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 106747b58d2e0Smrgdnl the above copyright notice appear in all copies and that both that 106757b58d2e0Smrgdnl copyright notice and this permission notice appear in supporting 106767b58d2e0Smrgdnl documentation. 106777b58d2e0Smrgdnl 106787b58d2e0Smrgdnl The above copyright notice and this permission notice shall be included 106797b58d2e0Smrgdnl in all copies or substantial portions of the Software. 106807b58d2e0Smrgdnl 106817b58d2e0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106827b58d2e0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106837b58d2e0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106847b58d2e0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106857b58d2e0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106867b58d2e0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106877b58d2e0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 106887b58d2e0Smrgdnl 106897b58d2e0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 106907b58d2e0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 106917b58d2e0Smrgdnl other dealings in this Software without prior written authorization 106927b58d2e0Smrgdnl from the copyright holders. 106937b58d2e0Smrgdnl 10694e4f6584cSmrg 106957b58d2e0Smrg# XORG_RELEASE_VERSION 106967b58d2e0Smrg# -------------------- 106977b58d2e0Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10698df9ffc95Smrg 106997b58d2e0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 107007b58d2e0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 107017b58d2e0Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 107027b58d2e0Smrg [Major version of this package]) 107037b58d2e0Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 107047b58d2e0Smrg if test "x$PVM" = "x"; then 107057b58d2e0Smrg PVM="0" 107067b58d2e0Smrg fi 107077b58d2e0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 107087b58d2e0Smrg [$PVM], 107097b58d2e0Smrg [Minor version of this package]) 107107b58d2e0Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 107117b58d2e0Smrg if test "x$PVP" = "x"; then 107127b58d2e0Smrg PVP="0" 107137b58d2e0Smrg fi 107147b58d2e0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 107157b58d2e0Smrg [$PVP], 107167b58d2e0Smrg [Patch version of this package]) 10717e4f6584cSmrg]) 1071809885543Smrg 107197b58d2e0Smrg# XORG_CHANGELOG() 107207b58d2e0Smrg# ---------------- 107217b58d2e0Smrg# Minimum version: 1.2.0 1072209885543Smrg# 107237b58d2e0Smrg# Defines the variable CHANGELOG_CMD as the command to generate 107247b58d2e0Smrg# ChangeLog from git. 10725e4f6584cSmrg# 107267b58d2e0Smrg# 107277b58d2e0SmrgAC_DEFUN([XORG_CHANGELOG], [ 107287b58d2e0SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 107297b58d2e0Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 107307b58d2e0Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 107317b58d2e0Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 107327b58d2e0SmrgAC_SUBST([CHANGELOG_CMD]) 107337b58d2e0Smrg]) # XORG_CHANGELOG 1073409885543Smrg 107357b58d2e0Smrgdnl Copyright 2005 Red Hat, Inc 107367b58d2e0Smrgdnl 107377b58d2e0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 107387b58d2e0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 107397b58d2e0Smrgdnl the above copyright notice appear in all copies and that both that 107407b58d2e0Smrgdnl copyright notice and this permission notice appear in supporting 107417b58d2e0Smrgdnl documentation. 107427b58d2e0Smrgdnl 107437b58d2e0Smrgdnl The above copyright notice and this permission notice shall be included 107447b58d2e0Smrgdnl in all copies or substantial portions of the Software. 107457b58d2e0Smrgdnl 107467b58d2e0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 107477b58d2e0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 107487b58d2e0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 107497b58d2e0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 107507b58d2e0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 107517b58d2e0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 107527b58d2e0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 107537b58d2e0Smrgdnl 107547b58d2e0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 107557b58d2e0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 107567b58d2e0Smrgdnl other dealings in this Software without prior written authorization 107577b58d2e0Smrgdnl from the copyright holders. 107587b58d2e0Smrgdnl 10759e4f6584cSmrg 10760df9ffc95Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 107617b58d2e0Smrg# -------------------------- 10762df9ffc95Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 10763df9ffc95Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 10764e4f6584cSmrg 107657b58d2e0SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 107667b58d2e0Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107677b58d2e0Smrg SAVE_CFLAGS="$CFLAGS" 107687b58d2e0Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 107697b58d2e0Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 107707b58d2e0Smrg#include "xorg-server.h" 107717b58d2e0Smrg#if !defined $1 107727b58d2e0Smrg#error $1 not defined 107737b58d2e0Smrg#endif 107747b58d2e0Smrg ]])], 107757b58d2e0Smrg [_EXT_CHECK=yes], 107767b58d2e0Smrg [_EXT_CHECK=no]) 107777b58d2e0Smrg CFLAGS="$SAVE_CFLAGS" 107787b58d2e0Smrg AC_MSG_CHECKING([if $1 is defined]) 107797b58d2e0Smrg AC_MSG_RESULT([$_EXT_CHECK]) 107807b58d2e0Smrg if test "$_EXT_CHECK" != no; then 107817b58d2e0Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 107827b58d2e0Smrg fi 107837b58d2e0Smrg]) 10784e4f6584cSmrg 10785df9ffc95Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 107867b58d2e0Smrg# 107877b58d2e0Smrg# This file is free software; the Free Software Foundation 107887b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 107897b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 10790e4f6584cSmrg 107917b58d2e0Smrg# AM_AUTOMAKE_VERSION(VERSION) 107927b58d2e0Smrg# ---------------------------- 107937b58d2e0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 107947b58d2e0Smrg# generated from the m4 files accompanying Automake X.Y. 107957b58d2e0Smrg# (This private macro should not be called outside this file.) 107967b58d2e0SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10797df9ffc95Smrg[am__api_version='1.14' 107987b58d2e0Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 107997b58d2e0Smrgdnl require some minimum version. Point them to the right macro. 10800df9ffc95Smrgm4_if([$1], [1.14.1], [], 108017b58d2e0Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10802e4f6584cSmrg]) 10803e4f6584cSmrg 108047b58d2e0Smrg# _AM_AUTOCONF_VERSION(VERSION) 108057b58d2e0Smrg# ----------------------------- 108067b58d2e0Smrg# aclocal traces this macro to find the Autoconf version. 108077b58d2e0Smrg# This is a private macro too. Using m4_define simplifies 108087b58d2e0Smrg# the logic in aclocal, which can simply ignore this definition. 108097b58d2e0Smrgm4_define([_AM_AUTOCONF_VERSION], []) 10810e4f6584cSmrg 108117b58d2e0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 108127b58d2e0Smrg# ------------------------------- 108137b58d2e0Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 108147b58d2e0Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 108157b58d2e0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10816df9ffc95Smrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 108177b58d2e0Smrgm4_ifndef([AC_AUTOCONF_VERSION], 108187b58d2e0Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 108197b58d2e0Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 108207b58d2e0Smrg 108217b58d2e0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 108227b58d2e0Smrg 10823df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 108247b58d2e0Smrg# 108257b58d2e0Smrg# This file is free software; the Free Software Foundation 108267b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 108277b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 10828e4f6584cSmrg 108297b58d2e0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10830df9ffc95Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10831df9ffc95Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 108327b58d2e0Smrg# 108337b58d2e0Smrg# Of course, Automake must honor this variable whenever it calls a 108347b58d2e0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 108357b58d2e0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 108367b58d2e0Smrg# depending on how configure is run. This is pretty annoying, since 108377b58d2e0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 108387b58d2e0Smrg# source directory, any form will work fine, but in subdirectories a 108397b58d2e0Smrg# relative path needs to be adjusted first. 108407b58d2e0Smrg# 108417b58d2e0Smrg# $ac_aux_dir/missing 108427b58d2e0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 108437b58d2e0Smrg# $top_srcdir/$ac_aux_dir/missing 108447b58d2e0Smrg# fails if $ac_aux_dir is absolute, 108457b58d2e0Smrg# fails when called from a subdirectory in a VPATH build with 108467b58d2e0Smrg# a relative $ac_aux_dir 108477b58d2e0Smrg# 108487b58d2e0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 108497b58d2e0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 10850df9ffc95Smrg# harmless because $srcdir is '.', but things will broke when you 108517b58d2e0Smrg# start a VPATH build or use an absolute $srcdir. 108527b58d2e0Smrg# 108537b58d2e0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 108547b58d2e0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 108557b58d2e0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 108567b58d2e0Smrg# and then we would define $MISSING as 108577b58d2e0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 108587b58d2e0Smrg# This will work as long as MISSING is not called from configure, because 108597b58d2e0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 108607b58d2e0Smrg# However there are other variables, like CC, which are often used in 108617b58d2e0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 108627b58d2e0Smrg# 108637b58d2e0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 108647b58d2e0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 108657b58d2e0Smrg# configured tree to be moved without reconfiguration. 10866e4f6584cSmrg 108677b58d2e0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10868df9ffc95Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10869df9ffc95Smrg# Expand $ac_aux_dir to an absolute path. 10870df9ffc95Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 10871e4f6584cSmrg]) 10872e4f6584cSmrg 108737b58d2e0Smrg# AM_CONDITIONAL -*- Autoconf -*- 10874e4f6584cSmrg 10875df9ffc95Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 108767b58d2e0Smrg# 108777b58d2e0Smrg# This file is free software; the Free Software Foundation 108787b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 108797b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 10880e4f6584cSmrg 108817b58d2e0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 108827b58d2e0Smrg# ------------------------------------- 108837b58d2e0Smrg# Define a conditional. 108847b58d2e0SmrgAC_DEFUN([AM_CONDITIONAL], 10885df9ffc95Smrg[AC_PREREQ([2.52])dnl 10886df9ffc95Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10887df9ffc95Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 108887b58d2e0SmrgAC_SUBST([$1_TRUE])dnl 108897b58d2e0SmrgAC_SUBST([$1_FALSE])dnl 108907b58d2e0Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 108917b58d2e0Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 108927b58d2e0Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 108937b58d2e0Smrgif $2; then 108947b58d2e0Smrg $1_TRUE= 108957b58d2e0Smrg $1_FALSE='#' 108967b58d2e0Smrgelse 108977b58d2e0Smrg $1_TRUE='#' 108987b58d2e0Smrg $1_FALSE= 108997b58d2e0Smrgfi 109007b58d2e0SmrgAC_CONFIG_COMMANDS_PRE( 109017b58d2e0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 109027b58d2e0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 109037b58d2e0SmrgUsually this means the macro was only invoked conditionally.]]) 109047b58d2e0Smrgfi])]) 10905e4f6584cSmrg 10906df9ffc95Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 109077b58d2e0Smrg# 109087b58d2e0Smrg# This file is free software; the Free Software Foundation 109097b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 109107b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 10911e4f6584cSmrg 1091209885543Smrg 10913df9ffc95Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 109147b58d2e0Smrg# written in clear, in which case automake, when reading aclocal.m4, 109157b58d2e0Smrg# will think it sees a *use*, and therefore will trigger all it's 109167b58d2e0Smrg# C support machinery. Also note that it means that autoscan, seeing 109177b58d2e0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1091809885543Smrg 1091909885543Smrg 109207b58d2e0Smrg# _AM_DEPENDENCIES(NAME) 109217b58d2e0Smrg# ---------------------- 109227b58d2e0Smrg# See how the compiler implements dependency checking. 10923df9ffc95Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 109247b58d2e0Smrg# We try a few techniques and use that to set a single cache variable. 109257b58d2e0Smrg# 109267b58d2e0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 109277b58d2e0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 109287b58d2e0Smrg# dependency, and given that the user is not expected to run this macro, 109297b58d2e0Smrg# just rely on AC_PROG_CC. 109307b58d2e0SmrgAC_DEFUN([_AM_DEPENDENCIES], 109317b58d2e0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 109327b58d2e0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 109337b58d2e0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 109347b58d2e0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1093509885543Smrg 10936df9ffc95Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10937df9ffc95Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10938df9ffc95Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10939df9ffc95Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10940df9ffc95Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10941df9ffc95Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10942df9ffc95Smrg [depcc="$$1" am_compiler_list=]) 1094309885543Smrg 109447b58d2e0SmrgAC_CACHE_CHECK([dependency style of $depcc], 109457b58d2e0Smrg [am_cv_$1_dependencies_compiler_type], 109467b58d2e0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 109477b58d2e0Smrg # We make a subdir and do the tests there. Otherwise we can end up 109487b58d2e0Smrg # making bogus files that we don't know about and never remove. For 109497b58d2e0Smrg # instance it was reported that on HP-UX the gcc test will end up 10950df9ffc95Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 10951df9ffc95Smrg # in D". 10952b12e5c03Smrg rm -rf conftest.dir 109537b58d2e0Smrg mkdir conftest.dir 109547b58d2e0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 109557b58d2e0Smrg # using a relative directory. 109567b58d2e0Smrg cp "$am_depcomp" conftest.dir 109577b58d2e0Smrg cd conftest.dir 109587b58d2e0Smrg # We will build objects and dependencies in a subdirectory because 109597b58d2e0Smrg # it helps to detect inapplicable dependency modes. For instance 109607b58d2e0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 109617b58d2e0Smrg # side effect of compilation, but ICC will put the dependencies in 109627b58d2e0Smrg # the current directory while Tru64 will put them in the object 109637b58d2e0Smrg # directory. 109647b58d2e0Smrg mkdir sub 1096509885543Smrg 109667b58d2e0Smrg am_cv_$1_dependencies_compiler_type=none 109677b58d2e0Smrg if test "$am_compiler_list" = ""; then 109687b58d2e0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 109697b58d2e0Smrg fi 109707b58d2e0Smrg am__universal=false 109717b58d2e0Smrg m4_case([$1], [CC], 109727b58d2e0Smrg [case " $depcc " in #( 109737b58d2e0Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109747b58d2e0Smrg esac], 109757b58d2e0Smrg [CXX], 109767b58d2e0Smrg [case " $depcc " in #( 109777b58d2e0Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109787b58d2e0Smrg esac]) 1097909885543Smrg 109807b58d2e0Smrg for depmode in $am_compiler_list; do 109817b58d2e0Smrg # Setup a source with many dependencies, because some compilers 109827b58d2e0Smrg # like to wrap large dependency lists on column 80 (with \), and 109837b58d2e0Smrg # we should not choose a depcomp mode which is confused by this. 109847b58d2e0Smrg # 109857b58d2e0Smrg # We need to recreate these files for each test, as the compiler may 109867b58d2e0Smrg # overwrite some of them when testing with obscure command lines. 109877b58d2e0Smrg # This happens at least with the AIX C compiler. 109887b58d2e0Smrg : > sub/conftest.c 109897b58d2e0Smrg for i in 1 2 3 4 5 6; do 109907b58d2e0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10991df9ffc95Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10992df9ffc95Smrg # Solaris 10 /bin/sh. 10993df9ffc95Smrg echo '/* dummy */' > sub/conftst$i.h 109947b58d2e0Smrg done 109957b58d2e0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1099609885543Smrg 10997df9ffc95Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 109987b58d2e0Smrg # mode. It turns out that the SunPro C++ compiler does not properly 10999df9ffc95Smrg # handle '-M -o', and we need to detect this. Also, some Intel 11000df9ffc95Smrg # versions had trouble with output in subdirs. 110017b58d2e0Smrg am__obj=sub/conftest.${OBJEXT-o} 110027b58d2e0Smrg am__minus_obj="-o $am__obj" 110037b58d2e0Smrg case $depmode in 110047b58d2e0Smrg gcc) 110057b58d2e0Smrg # This depmode causes a compiler race in universal mode. 110067b58d2e0Smrg test "$am__universal" = false || continue 110077b58d2e0Smrg ;; 110087b58d2e0Smrg nosideeffect) 11009df9ffc95Smrg # After this tag, mechanisms are not by side-effect, so they'll 11010df9ffc95Smrg # only be used when explicitly requested. 110117b58d2e0Smrg if test "x$enable_dependency_tracking" = xyes; then 110127b58d2e0Smrg continue 110137b58d2e0Smrg else 110147b58d2e0Smrg break 110157b58d2e0Smrg fi 110167b58d2e0Smrg ;; 11017b12e5c03Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11018df9ffc95Smrg # This compiler won't grok '-c -o', but also, the minuso test has 110197b58d2e0Smrg # not run yet. These depmodes are late enough in the game, and 110207b58d2e0Smrg # so weak that their functioning should not be impacted. 110217b58d2e0Smrg am__obj=conftest.${OBJEXT-o} 110227b58d2e0Smrg am__minus_obj= 110237b58d2e0Smrg ;; 110247b58d2e0Smrg none) break ;; 110257b58d2e0Smrg esac 110267b58d2e0Smrg if depmode=$depmode \ 110277b58d2e0Smrg source=sub/conftest.c object=$am__obj \ 110287b58d2e0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 110297b58d2e0Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 110307b58d2e0Smrg >/dev/null 2>conftest.err && 110317b58d2e0Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 110327b58d2e0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 110337b58d2e0Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 110347b58d2e0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 110357b58d2e0Smrg # icc doesn't choke on unknown options, it will just issue warnings 110367b58d2e0Smrg # or remarks (even with -Werror). So we grep stderr for any message 110377b58d2e0Smrg # that says an option was ignored or not supported. 110387b58d2e0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 110397b58d2e0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 110407b58d2e0Smrg # The diagnosis changed in icc 8.0: 110417b58d2e0Smrg # icc: Command line remark: option '-MP' not supported 110427b58d2e0Smrg if (grep 'ignoring option' conftest.err || 110437b58d2e0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 110447b58d2e0Smrg am_cv_$1_dependencies_compiler_type=$depmode 110457b58d2e0Smrg break 110467b58d2e0Smrg fi 110477b58d2e0Smrg fi 110487b58d2e0Smrg done 1104909885543Smrg 110507b58d2e0Smrg cd .. 110517b58d2e0Smrg rm -rf conftest.dir 110527b58d2e0Smrgelse 110537b58d2e0Smrg am_cv_$1_dependencies_compiler_type=none 110547b58d2e0Smrgfi 110557b58d2e0Smrg]) 110567b58d2e0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 110577b58d2e0SmrgAM_CONDITIONAL([am__fastdep$1], [ 110587b58d2e0Smrg test "x$enable_dependency_tracking" != xno \ 110597b58d2e0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 110607b58d2e0Smrg]) 11061e4f6584cSmrg 11062e4f6584cSmrg 110637b58d2e0Smrg# AM_SET_DEPDIR 110647b58d2e0Smrg# ------------- 110657b58d2e0Smrg# Choose a directory name for dependency files. 11066df9ffc95Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 110677b58d2e0SmrgAC_DEFUN([AM_SET_DEPDIR], 110687b58d2e0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 110697b58d2e0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 110707b58d2e0Smrg]) 11071e4f6584cSmrg 11072e4f6584cSmrg 110737b58d2e0Smrg# AM_DEP_TRACK 110747b58d2e0Smrg# ------------ 110757b58d2e0SmrgAC_DEFUN([AM_DEP_TRACK], 11076df9ffc95Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11077df9ffc95SmrgAS_HELP_STRING( 11078df9ffc95Smrg [--enable-dependency-tracking], 11079df9ffc95Smrg [do not reject slow dependency extractors]) 11080df9ffc95SmrgAS_HELP_STRING( 11081df9ffc95Smrg [--disable-dependency-tracking], 11082df9ffc95Smrg [speeds up one-time build])]) 110837b58d2e0Smrgif test "x$enable_dependency_tracking" != xno; then 110847b58d2e0Smrg am_depcomp="$ac_aux_dir/depcomp" 110857b58d2e0Smrg AMDEPBACKSLASH='\' 11086b12e5c03Smrg am__nodep='_no' 110877b58d2e0Smrgfi 110887b58d2e0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 110897b58d2e0SmrgAC_SUBST([AMDEPBACKSLASH])dnl 110907b58d2e0Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11091b12e5c03SmrgAC_SUBST([am__nodep])dnl 11092b12e5c03Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1109309885543Smrg]) 1109409885543Smrg 110957b58d2e0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1109609885543Smrg 11097df9ffc95Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 110987b58d2e0Smrg# 110997b58d2e0Smrg# This file is free software; the Free Software Foundation 111007b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 111017b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 1110209885543Smrg 1110309885543Smrg 111047b58d2e0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 111057b58d2e0Smrg# ------------------------------ 111067b58d2e0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 111077b58d2e0Smrg[{ 11108df9ffc95Smrg # Older Autoconf quotes --file arguments for eval, but not when files 111097b58d2e0Smrg # are listed without --file. Let's play safe and only enable the eval 111107b58d2e0Smrg # if we detect the quoting. 111117b58d2e0Smrg case $CONFIG_FILES in 111127b58d2e0Smrg *\'*) eval set x "$CONFIG_FILES" ;; 111137b58d2e0Smrg *) set x $CONFIG_FILES ;; 111147b58d2e0Smrg esac 111157b58d2e0Smrg shift 111167b58d2e0Smrg for mf 111177b58d2e0Smrg do 111187b58d2e0Smrg # Strip MF so we end up with the name of the file. 111197b58d2e0Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 111207b58d2e0Smrg # Check whether this is an Automake generated Makefile or not. 11121df9ffc95Smrg # We used to match only the files named 'Makefile.in', but 111227b58d2e0Smrg # some people rename them; so instead we look at the file content. 111237b58d2e0Smrg # Grep'ing the first line is not enough: some people post-process 111247b58d2e0Smrg # each Makefile.in and add a new line on top of each file to say so. 111257b58d2e0Smrg # Grep'ing the whole file is not good either: AIX grep has a line 111267b58d2e0Smrg # limit of 2048, but all sed's we know have understand at least 4000. 111277b58d2e0Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 111287b58d2e0Smrg dirpart=`AS_DIRNAME("$mf")` 111297b58d2e0Smrg else 111307b58d2e0Smrg continue 111317b58d2e0Smrg fi 111327b58d2e0Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11133df9ffc95Smrg # from the Makefile without running 'make'. 111347b58d2e0Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 111357b58d2e0Smrg test -z "$DEPDIR" && continue 111367b58d2e0Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11137df9ffc95Smrg test -z "$am__include" && continue 111387b58d2e0Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 111397b58d2e0Smrg # Find all dependency output files, they are included files with 111407b58d2e0Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 111417b58d2e0Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 111427b58d2e0Smrg # expansion. 111437b58d2e0Smrg for file in `sed -n " 111447b58d2e0Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11145df9ffc95Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 111467b58d2e0Smrg # Make sure the directory exists. 111477b58d2e0Smrg test -f "$dirpart/$file" && continue 111487b58d2e0Smrg fdir=`AS_DIRNAME(["$file"])` 111497b58d2e0Smrg AS_MKDIR_P([$dirpart/$fdir]) 111507b58d2e0Smrg # echo "creating $dirpart/$file" 111517b58d2e0Smrg echo '# dummy' > "$dirpart/$file" 111527b58d2e0Smrg done 111537b58d2e0Smrg done 111547b58d2e0Smrg} 111557b58d2e0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1115609885543Smrg 1115709885543Smrg 111587b58d2e0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 111597b58d2e0Smrg# ----------------------------- 111607b58d2e0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 111617b58d2e0Smrg# 111627b58d2e0Smrg# This code is only required when automatic dependency tracking 11163df9ffc95Smrg# is enabled. FIXME. This creates each '.P' file that we will 111647b58d2e0Smrg# need in order to bootstrap the dependency handling code. 111657b58d2e0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 111667b58d2e0Smrg[AC_CONFIG_COMMANDS([depfiles], 111677b58d2e0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 111687b58d2e0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1116909885543Smrg]) 1117009885543Smrg 111717b58d2e0Smrg# Do all the work for Automake. -*- Autoconf -*- 1117209885543Smrg 11173df9ffc95Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 111747b58d2e0Smrg# 111757b58d2e0Smrg# This file is free software; the Free Software Foundation 111767b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 111777b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11178e4f6584cSmrg 111797b58d2e0Smrg# This macro actually does too much. Some checks are only needed if 111807b58d2e0Smrg# your package does certain things. But this isn't really a big deal. 11181e4f6584cSmrg 11182df9ffc95Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11183df9ffc95Smrgm4_define([AC_PROG_CC], 11184df9ffc95Smrgm4_defn([AC_PROG_CC]) 11185df9ffc95Smrg[_AM_PROG_CC_C_O 11186df9ffc95Smrg]) 11187df9ffc95Smrg 111887b58d2e0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 111897b58d2e0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 111907b58d2e0Smrg# ----------------------------------------------- 111917b58d2e0Smrg# The call with PACKAGE and VERSION arguments is the old style 111927b58d2e0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 111937b58d2e0Smrg# and VERSION should now be passed to AC_INIT and removed from 111947b58d2e0Smrg# the call to AM_INIT_AUTOMAKE. 111957b58d2e0Smrg# We support both call styles for the transition. After 111967b58d2e0Smrg# the next Automake release, Autoconf can make the AC_INIT 111977b58d2e0Smrg# arguments mandatory, and then we can depend on a new Autoconf 111987b58d2e0Smrg# release and drop the old call support. 111997b58d2e0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11200df9ffc95Smrg[AC_PREREQ([2.65])dnl 112017b58d2e0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 112027b58d2e0Smrgdnl the ones we care about. 112037b58d2e0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 112047b58d2e0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 112057b58d2e0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 112067b58d2e0Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 112077b58d2e0Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 112087b58d2e0Smrg # is not polluted with repeated "-I." 112097b58d2e0Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 112107b58d2e0Smrg # test to see if srcdir already configured 112117b58d2e0Smrg if test -f $srcdir/config.status; then 112127b58d2e0Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 112137b58d2e0Smrg fi 112147b58d2e0Smrgfi 11215e4f6584cSmrg 112167b58d2e0Smrg# test whether we have cygpath 112177b58d2e0Smrgif test -z "$CYGPATH_W"; then 112187b58d2e0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 112197b58d2e0Smrg CYGPATH_W='cygpath -w' 112207b58d2e0Smrg else 112217b58d2e0Smrg CYGPATH_W=echo 112227b58d2e0Smrg fi 112237b58d2e0Smrgfi 112247b58d2e0SmrgAC_SUBST([CYGPATH_W]) 11225e4f6584cSmrg 112267b58d2e0Smrg# Define the identity of the package. 112277b58d2e0Smrgdnl Distinguish between old-style and new-style calls. 112287b58d2e0Smrgm4_ifval([$2], 11229df9ffc95Smrg[AC_DIAGNOSE([obsolete], 11230df9ffc95Smrg [$0: two- and three-arguments forms are deprecated.]) 11231df9ffc95Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 112327b58d2e0Smrg AC_SUBST([PACKAGE], [$1])dnl 112337b58d2e0Smrg AC_SUBST([VERSION], [$2])], 112347b58d2e0Smrg[_AM_SET_OPTIONS([$1])dnl 112357b58d2e0Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11236df9ffc95Smrgm4_if( 11237df9ffc95Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11238df9ffc95Smrg [ok:ok],, 112397b58d2e0Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 112407b58d2e0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 112417b58d2e0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11242e4f6584cSmrg 112437b58d2e0Smrg_AM_IF_OPTION([no-define],, 11244df9ffc95Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11245df9ffc95Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11246e4f6584cSmrg 112477b58d2e0Smrg# Some tools Automake needs. 112487b58d2e0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 112497b58d2e0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11250df9ffc95SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11251df9ffc95SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11252df9ffc95SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11253df9ffc95SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11254df9ffc95SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 112557b58d2e0SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 112567b58d2e0SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11257df9ffc95SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11258df9ffc95Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11259df9ffc95Smrg# dies out for good. For more background, see: 11260df9ffc95Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11261df9ffc95Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11262df9ffc95SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 112637b58d2e0Smrg# We need awk for the "check" target. The system "awk" is bad on 112647b58d2e0Smrg# some platforms. 112657b58d2e0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 112667b58d2e0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 112677b58d2e0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 112687b58d2e0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 112697b58d2e0Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 112707b58d2e0Smrg [_AM_PROG_TAR([v7])])]) 112717b58d2e0Smrg_AM_IF_OPTION([no-dependencies],, 112727b58d2e0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11273df9ffc95Smrg [_AM_DEPENDENCIES([CC])], 11274df9ffc95Smrg [m4_define([AC_PROG_CC], 11275df9ffc95Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 112767b58d2e0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11277df9ffc95Smrg [_AM_DEPENDENCIES([CXX])], 11278df9ffc95Smrg [m4_define([AC_PROG_CXX], 11279df9ffc95Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 112807b58d2e0SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11281df9ffc95Smrg [_AM_DEPENDENCIES([OBJC])], 11282df9ffc95Smrg [m4_define([AC_PROG_OBJC], 11283df9ffc95Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11284df9ffc95SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11285df9ffc95Smrg [_AM_DEPENDENCIES([OBJCXX])], 11286df9ffc95Smrg [m4_define([AC_PROG_OBJCXX], 11287df9ffc95Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 112887104f784Smrg]) 11289df9ffc95SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11290df9ffc95Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11291df9ffc95Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11292df9ffc95Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 112937b58d2e0SmrgAC_CONFIG_COMMANDS_PRE(dnl 112947b58d2e0Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 112957b58d2e0Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11296df9ffc95Smrg 11297df9ffc95Smrg# POSIX will say in a future version that running "rm -f" with no argument 11298df9ffc95Smrg# is OK; and we want to be able to make that assumption in our Makefile 11299df9ffc95Smrg# recipes. So use an aggressive probe to check that the usage we want is 11300df9ffc95Smrg# actually supported "in the wild" to an acceptable degree. 11301df9ffc95Smrg# See automake bug#10828. 11302df9ffc95Smrg# To make any issue more visible, cause the running configure to be aborted 11303df9ffc95Smrg# by default if the 'rm' program in use doesn't match our expectations; the 11304df9ffc95Smrg# user can still override this though. 11305df9ffc95Smrgif rm -f && rm -fr && rm -rf; then : OK; else 11306df9ffc95Smrg cat >&2 <<'END' 11307df9ffc95SmrgOops! 11308df9ffc95Smrg 11309df9ffc95SmrgYour 'rm' program seems unable to run without file operands specified 11310df9ffc95Smrgon the command line, even when the '-f' option is present. This is contrary 11311df9ffc95Smrgto the behaviour of most rm programs out there, and not conforming with 11312df9ffc95Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11313df9ffc95Smrg 11314df9ffc95SmrgPlease tell bug-automake@gnu.org about your system, including the value 11315df9ffc95Smrgof your $PATH and any error possibly output before this message. This 11316df9ffc95Smrgcan help us improve future automake versions. 11317df9ffc95Smrg 11318df9ffc95SmrgEND 11319df9ffc95Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11320df9ffc95Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 11321df9ffc95Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11322df9ffc95Smrg echo >&2 11323df9ffc95Smrg else 11324df9ffc95Smrg cat >&2 <<'END' 11325df9ffc95SmrgAborting the configuration process, to ensure you take notice of the issue. 11326df9ffc95Smrg 11327df9ffc95SmrgYou can download and install GNU coreutils to get an 'rm' implementation 11328df9ffc95Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11329df9ffc95Smrg 11330df9ffc95SmrgIf you want to complete the configuration process using your problematic 11331df9ffc95Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11332df9ffc95Smrgto "yes", and re-run configure. 11333df9ffc95Smrg 11334df9ffc95SmrgEND 11335df9ffc95Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11336df9ffc95Smrg fi 11337df9ffc95Smrgfi 11338e4f6584cSmrg]) 1133909885543Smrg 11340df9ffc95Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 113417b58d2e0Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 113427b58d2e0Smrgdnl mangled by Autoconf and run in a shell conditional statement. 113437b58d2e0Smrgm4_define([_AC_COMPILER_EXEEXT], 113447b58d2e0Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1134509885543Smrg 113467b58d2e0Smrg# When config.status generates a header, we must update the stamp-h file. 113477b58d2e0Smrg# This file resides in the same directory as the config header 113487b58d2e0Smrg# that is generated. The stamp files are numbered to have different names. 1134909885543Smrg 113507b58d2e0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 113517b58d2e0Smrg# loop where config.status creates the headers, so we can generate 113527b58d2e0Smrg# our stamp files there. 113537b58d2e0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 113547b58d2e0Smrg[# Compute $1's index in $config_headers. 113557b58d2e0Smrg_am_arg=$1 113567b58d2e0Smrg_am_stamp_count=1 113577b58d2e0Smrgfor _am_header in $config_headers :; do 113587b58d2e0Smrg case $_am_header in 113597b58d2e0Smrg $_am_arg | $_am_arg:* ) 113607b58d2e0Smrg break ;; 113617b58d2e0Smrg * ) 113627b58d2e0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 113637b58d2e0Smrg esac 113647b58d2e0Smrgdone 113657b58d2e0Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1136609885543Smrg 11367df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 113687b58d2e0Smrg# 113697b58d2e0Smrg# This file is free software; the Free Software Foundation 113707b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 113717b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11372e4f6584cSmrg 113737b58d2e0Smrg# AM_PROG_INSTALL_SH 113747b58d2e0Smrg# ------------------ 113757b58d2e0Smrg# Define $install_sh. 113767b58d2e0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 113777b58d2e0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 113787b58d2e0Smrgif test x"${install_sh}" != xset; then 113797b58d2e0Smrg case $am_aux_dir in 113807b58d2e0Smrg *\ * | *\ *) 113817b58d2e0Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 113827b58d2e0Smrg *) 113837b58d2e0Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 113847b58d2e0Smrg esac 113857b58d2e0Smrgfi 11386df9ffc95SmrgAC_SUBST([install_sh])]) 11387e4f6584cSmrg 11388df9ffc95Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 113897b58d2e0Smrg# 113907b58d2e0Smrg# This file is free software; the Free Software Foundation 113917b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 113927b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11393e4f6584cSmrg 113947b58d2e0Smrg# Check whether the underlying file-system supports filenames 113957b58d2e0Smrg# with a leading dot. For instance MS-DOS doesn't. 113967b58d2e0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 113977b58d2e0Smrg[rm -rf .tst 2>/dev/null 113987b58d2e0Smrgmkdir .tst 2>/dev/null 113997b58d2e0Smrgif test -d .tst; then 114007b58d2e0Smrg am__leading_dot=. 114017b58d2e0Smrgelse 114027b58d2e0Smrg am__leading_dot=_ 114037b58d2e0Smrgfi 114047b58d2e0Smrgrmdir .tst 2>/dev/null 114057b58d2e0SmrgAC_SUBST([am__leading_dot])]) 11406e4f6584cSmrg 114077b58d2e0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 114087b58d2e0Smrg# From Jim Meyering 11409e4f6584cSmrg 11410df9ffc95Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 114117b58d2e0Smrg# 114127b58d2e0Smrg# This file is free software; the Free Software Foundation 114137b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 114147b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11415e4f6584cSmrg 114167b58d2e0Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 114177b58d2e0Smrg# ---------------------------------- 114187b58d2e0Smrg# Control maintainer-specific portions of Makefiles. 11419df9ffc95Smrg# Default is to disable them, unless 'enable' is passed literally. 11420df9ffc95Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 114217b58d2e0Smrg# can override the default with the --enable/--disable switch. 114227b58d2e0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 114237b58d2e0Smrg[m4_case(m4_default([$1], [disable]), 114247b58d2e0Smrg [enable], [m4_define([am_maintainer_other], [disable])], 114257b58d2e0Smrg [disable], [m4_define([am_maintainer_other], [enable])], 114267b58d2e0Smrg [m4_define([am_maintainer_other], [enable]) 114277b58d2e0Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11428b12e5c03SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 114297b58d2e0Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 114307b58d2e0Smrg AC_ARG_ENABLE([maintainer-mode], 11431df9ffc95Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11432df9ffc95Smrg am_maintainer_other[ make rules and dependencies not useful 11433df9ffc95Smrg (and sometimes confusing) to the casual installer])], 11434df9ffc95Smrg [USE_MAINTAINER_MODE=$enableval], 11435df9ffc95Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 114367b58d2e0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 114377b58d2e0Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 114387b58d2e0Smrg MAINT=$MAINTAINER_MODE_TRUE 114397b58d2e0Smrg AC_SUBST([MAINT])dnl 114407b58d2e0Smrg] 114417b58d2e0Smrg) 1144209885543Smrg 114437b58d2e0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1144409885543Smrg 11445df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 114467b58d2e0Smrg# 114477b58d2e0Smrg# This file is free software; the Free Software Foundation 114487b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 114497b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 114507b58d2e0Smrg 114517b58d2e0Smrg# AM_MAKE_INCLUDE() 114527b58d2e0Smrg# ----------------- 114537b58d2e0Smrg# Check to see how make treats includes. 114547b58d2e0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 114557b58d2e0Smrg[am_make=${MAKE-make} 114567b58d2e0Smrgcat > confinc << 'END' 114577b58d2e0Smrgam__doit: 114587b58d2e0Smrg @echo this is the am__doit target 114597b58d2e0Smrg.PHONY: am__doit 114607b58d2e0SmrgEND 114617b58d2e0Smrg# If we don't find an include directive, just comment out the code. 114627b58d2e0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 114637b58d2e0Smrgam__include="#" 114647b58d2e0Smrgam__quote= 114657b58d2e0Smrg_am_result=none 114667b58d2e0Smrg# First try GNU make style include. 114677b58d2e0Smrgecho "include confinc" > confmf 11468df9ffc95Smrg# Ignore all kinds of additional output from 'make'. 114697b58d2e0Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 114707b58d2e0Smrg*the\ am__doit\ target*) 114717b58d2e0Smrg am__include=include 114727b58d2e0Smrg am__quote= 114737b58d2e0Smrg _am_result=GNU 114747b58d2e0Smrg ;; 114757b58d2e0Smrgesac 114767b58d2e0Smrg# Now try BSD make style include. 114777b58d2e0Smrgif test "$am__include" = "#"; then 114787b58d2e0Smrg echo '.include "confinc"' > confmf 114797b58d2e0Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 114807b58d2e0Smrg *the\ am__doit\ target*) 114817b58d2e0Smrg am__include=.include 114827b58d2e0Smrg am__quote="\"" 114837b58d2e0Smrg _am_result=BSD 114847b58d2e0Smrg ;; 114857b58d2e0Smrg esac 114867b58d2e0Smrgfi 114877b58d2e0SmrgAC_SUBST([am__include]) 114887b58d2e0SmrgAC_SUBST([am__quote]) 114897b58d2e0SmrgAC_MSG_RESULT([$_am_result]) 114907b58d2e0Smrgrm -f confinc confmf 11491e4f6584cSmrg]) 1149209885543Smrg 114937b58d2e0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1149409885543Smrg 11495df9ffc95Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11496e4f6584cSmrg# 114977b58d2e0Smrg# This file is free software; the Free Software Foundation 114987b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 114997b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 1150009885543Smrg 115017b58d2e0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 115027b58d2e0Smrg# ------------------------------ 115037b58d2e0SmrgAC_DEFUN([AM_MISSING_PROG], 115047b58d2e0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 115057b58d2e0Smrg$1=${$1-"${am_missing_run}$2"} 115067b58d2e0SmrgAC_SUBST($1)]) 11507e4f6584cSmrg 115087b58d2e0Smrg# AM_MISSING_HAS_RUN 115097b58d2e0Smrg# ------------------ 11510df9ffc95Smrg# Define MISSING if not defined so far and test if it is modern enough. 11511df9ffc95Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 115127b58d2e0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 115137b58d2e0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 115147b58d2e0SmrgAC_REQUIRE_AUX_FILE([missing])dnl 115157b58d2e0Smrgif test x"${MISSING+set}" != xset; then 115167b58d2e0Smrg case $am_aux_dir in 115177b58d2e0Smrg *\ * | *\ *) 115187b58d2e0Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 115197b58d2e0Smrg *) 115207b58d2e0Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 115217b58d2e0Smrg esac 115227b58d2e0Smrgfi 115237b58d2e0Smrg# Use eval to expand $SHELL 11524df9ffc95Smrgif eval "$MISSING --is-lightweight"; then 11525df9ffc95Smrg am_missing_run="$MISSING " 115267b58d2e0Smrgelse 115277b58d2e0Smrg am_missing_run= 11528df9ffc95Smrg AC_MSG_WARN(['missing' script is too old or missing]) 115297b58d2e0Smrgfi 115307b58d2e0Smrg]) 11531e4f6584cSmrg 115327b58d2e0Smrg# Helper functions for option handling. -*- Autoconf -*- 11533e4f6584cSmrg 11534df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 115357104f784Smrg# 115367b58d2e0Smrg# This file is free software; the Free Software Foundation 115377b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 115387b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11539e4f6584cSmrg 115407b58d2e0Smrg# _AM_MANGLE_OPTION(NAME) 115417b58d2e0Smrg# ----------------------- 115427b58d2e0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 115437b58d2e0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11544e4f6584cSmrg 115457b58d2e0Smrg# _AM_SET_OPTION(NAME) 11546b12e5c03Smrg# -------------------- 115477b58d2e0Smrg# Set option NAME. Presently that only means defining a flag for this option. 115487b58d2e0SmrgAC_DEFUN([_AM_SET_OPTION], 11549df9ffc95Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11550e4f6584cSmrg 115517b58d2e0Smrg# _AM_SET_OPTIONS(OPTIONS) 11552b12e5c03Smrg# ------------------------ 115537b58d2e0Smrg# OPTIONS is a space-separated list of Automake options. 115547b58d2e0SmrgAC_DEFUN([_AM_SET_OPTIONS], 115557b58d2e0Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11556e4f6584cSmrg 115577b58d2e0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 115587b58d2e0Smrg# ------------------------------------------- 115597b58d2e0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 115607b58d2e0SmrgAC_DEFUN([_AM_IF_OPTION], 115617b58d2e0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11562e4f6584cSmrg 11563df9ffc95Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11564df9ffc95Smrg# 11565df9ffc95Smrg# This file is free software; the Free Software Foundation 11566df9ffc95Smrg# gives unlimited permission to copy and/or distribute it, 11567df9ffc95Smrg# with or without modifications, as long as this notice is preserved. 115687104f784Smrg 11569df9ffc95Smrg# _AM_PROG_CC_C_O 11570df9ffc95Smrg# --------------- 11571df9ffc95Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 11572df9ffc95Smrg# to automatically call this. 11573df9ffc95SmrgAC_DEFUN([_AM_PROG_CC_C_O], 11574df9ffc95Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11575df9ffc95SmrgAC_REQUIRE_AUX_FILE([compile])dnl 11576df9ffc95SmrgAC_LANG_PUSH([C])dnl 11577df9ffc95SmrgAC_CACHE_CHECK( 11578df9ffc95Smrg [whether $CC understands -c and -o together], 11579df9ffc95Smrg [am_cv_prog_cc_c_o], 11580df9ffc95Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 11581df9ffc95Smrg # Make sure it works both with $CC and with simple cc. 11582df9ffc95Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 11583df9ffc95Smrg # compilers refuse to overwrite an existing .o file with -o, 11584df9ffc95Smrg # though they will create one. 11585df9ffc95Smrg am_cv_prog_cc_c_o=yes 11586df9ffc95Smrg for am_i in 1 2; do 11587df9ffc95Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 11588df9ffc95Smrg && test -f conftest2.$ac_objext; then 11589df9ffc95Smrg : OK 11590df9ffc95Smrg else 11591df9ffc95Smrg am_cv_prog_cc_c_o=no 11592df9ffc95Smrg break 11593df9ffc95Smrg fi 11594df9ffc95Smrg done 11595df9ffc95Smrg rm -f core conftest* 11596df9ffc95Smrg unset am_i]) 11597df9ffc95Smrgif test "$am_cv_prog_cc_c_o" != yes; then 11598df9ffc95Smrg # Losing compiler, so override with the script. 11599df9ffc95Smrg # FIXME: It is wrong to rewrite CC. 11600df9ffc95Smrg # But if we don't then we get into trouble of one sort or another. 11601df9ffc95Smrg # A longer-term fix would be to have automake use am__CC in this case, 11602df9ffc95Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 11603df9ffc95Smrg CC="$am_aux_dir/compile $CC" 11604df9ffc95Smrgfi 11605df9ffc95SmrgAC_LANG_POP([C])]) 11606df9ffc95Smrg 11607df9ffc95Smrg# For backward compatibility. 11608df9ffc95SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 11609df9ffc95Smrg 11610df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 116117b58d2e0Smrg# 116127b58d2e0Smrg# This file is free software; the Free Software Foundation 116137b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 116147b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11615b698ba48Smrg 11616df9ffc95Smrg# AM_RUN_LOG(COMMAND) 11617df9ffc95Smrg# ------------------- 11618df9ffc95Smrg# Run COMMAND, save the exit status in ac_status, and log it. 11619df9ffc95Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 11620df9ffc95SmrgAC_DEFUN([AM_RUN_LOG], 11621df9ffc95Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 11622df9ffc95Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 11623df9ffc95Smrg ac_status=$? 11624df9ffc95Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11625df9ffc95Smrg (exit $ac_status); }]) 11626df9ffc95Smrg 11627df9ffc95Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11628df9ffc95Smrg 11629df9ffc95Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11630df9ffc95Smrg# 11631df9ffc95Smrg# This file is free software; the Free Software Foundation 11632df9ffc95Smrg# gives unlimited permission to copy and/or distribute it, 11633df9ffc95Smrg# with or without modifications, as long as this notice is preserved. 116347104f784Smrg 116357b58d2e0Smrg# AM_SANITY_CHECK 116367b58d2e0Smrg# --------------- 116377b58d2e0SmrgAC_DEFUN([AM_SANITY_CHECK], 116387b58d2e0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 116397b58d2e0Smrg# Reject unsafe characters in $srcdir or the absolute working directory 116407b58d2e0Smrg# name. Accept space and tab only in the latter. 116417b58d2e0Smrgam_lf=' 116427b58d2e0Smrg' 116437b58d2e0Smrgcase `pwd` in 116447b58d2e0Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 116457b58d2e0Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 116467b58d2e0Smrgesac 116477b58d2e0Smrgcase $srcdir in 116487b58d2e0Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11649df9ffc95Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 116507b58d2e0Smrgesac 11651b698ba48Smrg 11652df9ffc95Smrg# Do 'set' in a subshell so we don't clobber the current shell's 116537b58d2e0Smrg# arguments. Must try -L first in case configure is actually a 116547b58d2e0Smrg# symlink; some systems play weird games with the mod time of symlinks 116557b58d2e0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 116567b58d2e0Smrg# directory). 116577b58d2e0Smrgif ( 11658df9ffc95Smrg am_has_slept=no 11659df9ffc95Smrg for am_try in 1 2; do 11660df9ffc95Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 11661df9ffc95Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11662df9ffc95Smrg if test "$[*]" = "X"; then 11663df9ffc95Smrg # -L didn't work. 11664df9ffc95Smrg set X `ls -t "$srcdir/configure" conftest.file` 11665df9ffc95Smrg fi 11666df9ffc95Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11667df9ffc95Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11668df9ffc95Smrg 11669df9ffc95Smrg # If neither matched, then we have a broken ls. This can happen 11670df9ffc95Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11671df9ffc95Smrg # broken ls alias from the environment. This has actually 11672df9ffc95Smrg # happened. Such a system could not be considered "sane". 11673df9ffc95Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11674df9ffc95Smrg alias in your environment]) 11675df9ffc95Smrg fi 11676df9ffc95Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11677df9ffc95Smrg break 11678df9ffc95Smrg fi 11679df9ffc95Smrg # Just in case. 11680df9ffc95Smrg sleep 1 11681df9ffc95Smrg am_has_slept=yes 11682df9ffc95Smrg done 116837b58d2e0Smrg test "$[2]" = conftest.file 116847b58d2e0Smrg ) 116857b58d2e0Smrgthen 116867b58d2e0Smrg # Ok. 116877b58d2e0Smrg : 116887b58d2e0Smrgelse 116897b58d2e0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 116907b58d2e0SmrgCheck your system clock]) 116917b58d2e0Smrgfi 11692df9ffc95SmrgAC_MSG_RESULT([yes]) 11693df9ffc95Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11694df9ffc95Smrg# generated files are strictly newer. 11695df9ffc95Smrgam_sleep_pid= 11696df9ffc95Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11697df9ffc95Smrg ( sleep 1 ) & 11698df9ffc95Smrg am_sleep_pid=$! 11699df9ffc95Smrgfi 11700df9ffc95SmrgAC_CONFIG_COMMANDS_PRE( 11701df9ffc95Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11702df9ffc95Smrg if test -n "$am_sleep_pid"; then 11703df9ffc95Smrg # Hide warnings about reused PIDs. 11704df9ffc95Smrg wait $am_sleep_pid 2>/dev/null 11705df9ffc95Smrg fi 11706df9ffc95Smrg AC_MSG_RESULT([done])]) 11707df9ffc95Smrgrm -f conftest.file 11708df9ffc95Smrg]) 1170909885543Smrg 11710df9ffc95Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 117117b58d2e0Smrg# 117127b58d2e0Smrg# This file is free software; the Free Software Foundation 117137b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 117147b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11715e4f6584cSmrg 117167b58d2e0Smrg# AM_SILENT_RULES([DEFAULT]) 117177b58d2e0Smrg# -------------------------- 117187b58d2e0Smrg# Enable less verbose build rules; with the default set to DEFAULT 11719df9ffc95Smrg# ("yes" being less verbose, "no" or empty being verbose). 117207b58d2e0SmrgAC_DEFUN([AM_SILENT_RULES], 11721df9ffc95Smrg[AC_ARG_ENABLE([silent-rules], [dnl 11722df9ffc95SmrgAS_HELP_STRING( 11723df9ffc95Smrg [--enable-silent-rules], 11724df9ffc95Smrg [less verbose build output (undo: "make V=1")]) 11725df9ffc95SmrgAS_HELP_STRING( 11726df9ffc95Smrg [--disable-silent-rules], 11727df9ffc95Smrg [verbose build output (undo: "make V=0")])dnl 11728df9ffc95Smrg]) 11729df9ffc95Smrgcase $enable_silent_rules in @%:@ ((( 11730df9ffc95Smrg yes) AM_DEFAULT_VERBOSITY=0;; 11731df9ffc95Smrg no) AM_DEFAULT_VERBOSITY=1;; 11732df9ffc95Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 117337b58d2e0Smrgesac 11734b12e5c03Smrgdnl 11735df9ffc95Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11736b12e5c03Smrgdnl do not support nested variable expansions. 11737b12e5c03Smrgdnl See automake bug#9928 and bug#10237. 11738b12e5c03Smrgam_make=${MAKE-make} 11739b12e5c03SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11740b12e5c03Smrg [am_cv_make_support_nested_variables], 11741b12e5c03Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11742b12e5c03SmrgBAR0=false 11743b12e5c03SmrgBAR1=true 11744b12e5c03SmrgV=1 11745b12e5c03Smrgam__doit: 11746b12e5c03Smrg @$(TRUE) 11747b12e5c03Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11748b12e5c03Smrg am_cv_make_support_nested_variables=yes 11749b12e5c03Smrgelse 11750b12e5c03Smrg am_cv_make_support_nested_variables=no 11751b12e5c03Smrgfi]) 11752b12e5c03Smrgif test $am_cv_make_support_nested_variables = yes; then 11753df9ffc95Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11754b12e5c03Smrg AM_V='$(V)' 11755b12e5c03Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11756b12e5c03Smrgelse 11757b12e5c03Smrg AM_V=$AM_DEFAULT_VERBOSITY 11758b12e5c03Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11759b12e5c03Smrgfi 11760b12e5c03SmrgAC_SUBST([AM_V])dnl 11761b12e5c03SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11762b12e5c03SmrgAC_SUBST([AM_DEFAULT_V])dnl 11763b12e5c03SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 117647b58d2e0SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 117657b58d2e0SmrgAM_BACKSLASH='\' 117667b58d2e0SmrgAC_SUBST([AM_BACKSLASH])dnl 117677b58d2e0Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11768e4f6584cSmrg]) 11769e4f6584cSmrg 11770df9ffc95Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1177109885543Smrg# 117727b58d2e0Smrg# This file is free software; the Free Software Foundation 117737b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 117747b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 117757b58d2e0Smrg 117767b58d2e0Smrg# AM_PROG_INSTALL_STRIP 117777b58d2e0Smrg# --------------------- 11778df9ffc95Smrg# One issue with vendor 'install' (even GNU) is that you can't 117797b58d2e0Smrg# specify the program used to strip binaries. This is especially 117807b58d2e0Smrg# annoying in cross-compiling environments, where the build's strip 117817b58d2e0Smrg# is unlikely to handle the host's binaries. 117827b58d2e0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11783df9ffc95Smrg# always use install-sh in "make install-strip", and initialize 117847b58d2e0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 117857b58d2e0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 117867b58d2e0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11787df9ffc95Smrg# Installed binaries are usually stripped using 'strip' when the user 11788df9ffc95Smrg# run "make install-strip". However 'strip' might not be the right 117897b58d2e0Smrg# tool to use in cross-compilation environments, therefore Automake 11790df9ffc95Smrg# will honor the 'STRIP' environment variable to overrule this program. 11791df9ffc95Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 117927b58d2e0Smrgif test "$cross_compiling" != no; then 117937b58d2e0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 117947b58d2e0Smrgfi 117957b58d2e0SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 117967b58d2e0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 117977b58d2e0Smrg 11798df9ffc95Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1179909885543Smrg# 118007b58d2e0Smrg# This file is free software; the Free Software Foundation 118017b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 118027b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 1180309885543Smrg 118047b58d2e0Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 118057b58d2e0Smrg# --------------------------- 118067b58d2e0Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 118077b58d2e0Smrg# This macro is traced by Automake. 118087b58d2e0SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1180909885543Smrg 118107b58d2e0Smrg# AM_SUBST_NOTMAKE(VARIABLE) 11811b12e5c03Smrg# -------------------------- 118127b58d2e0Smrg# Public sister of _AM_SUBST_NOTMAKE. 118137b58d2e0SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1181409885543Smrg 118157b58d2e0Smrg# Check how to create a tarball. -*- Autoconf -*- 11816b698ba48Smrg 11817df9ffc95Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 11818e4f6584cSmrg# 118197b58d2e0Smrg# This file is free software; the Free Software Foundation 118207b58d2e0Smrg# gives unlimited permission to copy and/or distribute it, 118217b58d2e0Smrg# with or without modifications, as long as this notice is preserved. 11822b698ba48Smrg 118237b58d2e0Smrg# _AM_PROG_TAR(FORMAT) 118247b58d2e0Smrg# -------------------- 118257b58d2e0Smrg# Check how to create a tarball in format FORMAT. 11826df9ffc95Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11827e4f6584cSmrg# 118287b58d2e0Smrg# Substitute a variable $(am__tar) that is a command 118297b58d2e0Smrg# writing to stdout a FORMAT-tarball containing the directory 118307b58d2e0Smrg# $tardir. 118317b58d2e0Smrg# tardir=directory && $(am__tar) > result.tar 11832e4f6584cSmrg# 118337b58d2e0Smrg# Substitute a variable $(am__untar) that extract such 118347b58d2e0Smrg# a tarball read from stdin. 118357b58d2e0Smrg# $(am__untar) < result.tar 11836df9ffc95Smrg# 118377b58d2e0SmrgAC_DEFUN([_AM_PROG_TAR], 11838b12e5c03Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11839b12e5c03Smrg# in the wild :-( We should find a proper way to deprecate it ... 11840b12e5c03SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11841df9ffc95Smrg 11842df9ffc95Smrg# We'll loop over all known methods to create a tar archive until one works. 118437b58d2e0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11844e4f6584cSmrg 11845df9ffc95Smrgm4_if([$1], [v7], 11846df9ffc95Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11847df9ffc95Smrg 11848df9ffc95Smrg [m4_case([$1], 11849df9ffc95Smrg [ustar], 11850df9ffc95Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11851df9ffc95Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11852df9ffc95Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11853df9ffc95Smrg # and bug#13588). 11854df9ffc95Smrg am_max_uid=2097151 # 2^21 - 1 11855df9ffc95Smrg am_max_gid=$am_max_uid 11856df9ffc95Smrg # The $UID and $GID variables are not portable, so we need to resort 11857df9ffc95Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11858df9ffc95Smrg # below are definitely unexpected, so allow the users to see them 11859df9ffc95Smrg # (that is, avoid stderr redirection). 11860df9ffc95Smrg am_uid=`id -u || echo unknown` 11861df9ffc95Smrg am_gid=`id -g || echo unknown` 11862df9ffc95Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11863df9ffc95Smrg if test $am_uid -le $am_max_uid; then 11864df9ffc95Smrg AC_MSG_RESULT([yes]) 11865df9ffc95Smrg else 11866df9ffc95Smrg AC_MSG_RESULT([no]) 11867df9ffc95Smrg _am_tools=none 11868df9ffc95Smrg fi 11869df9ffc95Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11870df9ffc95Smrg if test $am_gid -le $am_max_gid; then 11871df9ffc95Smrg AC_MSG_RESULT([yes]) 11872df9ffc95Smrg else 11873df9ffc95Smrg AC_MSG_RESULT([no]) 11874df9ffc95Smrg _am_tools=none 11875df9ffc95Smrg fi], 11876e4f6584cSmrg 11877df9ffc95Smrg [pax], 11878df9ffc95Smrg [], 11879df9ffc95Smrg 11880df9ffc95Smrg [m4_fatal([Unknown tar format])]) 11881df9ffc95Smrg 11882df9ffc95Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 11883df9ffc95Smrg 11884df9ffc95Smrg # Go ahead even if we have the value already cached. We do so because we 11885df9ffc95Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11886df9ffc95Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11887df9ffc95Smrg 11888df9ffc95Smrg for _am_tool in $_am_tools; do 11889df9ffc95Smrg case $_am_tool in 11890df9ffc95Smrg gnutar) 11891df9ffc95Smrg for _am_tar in tar gnutar gtar; do 11892df9ffc95Smrg AM_RUN_LOG([$_am_tar --version]) && break 11893df9ffc95Smrg done 11894df9ffc95Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11895df9ffc95Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11896df9ffc95Smrg am__untar="$_am_tar -xf -" 11897df9ffc95Smrg ;; 11898df9ffc95Smrg plaintar) 11899df9ffc95Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11900df9ffc95Smrg # ustar tarball either. 11901df9ffc95Smrg (tar --version) >/dev/null 2>&1 && continue 11902df9ffc95Smrg am__tar='tar chf - "$$tardir"' 11903df9ffc95Smrg am__tar_='tar chf - "$tardir"' 11904df9ffc95Smrg am__untar='tar xf -' 11905df9ffc95Smrg ;; 11906df9ffc95Smrg pax) 11907df9ffc95Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11908df9ffc95Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11909df9ffc95Smrg am__untar='pax -r' 11910df9ffc95Smrg ;; 11911df9ffc95Smrg cpio) 11912df9ffc95Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11913df9ffc95Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11914df9ffc95Smrg am__untar='cpio -i -H $1 -d' 11915df9ffc95Smrg ;; 11916df9ffc95Smrg none) 11917df9ffc95Smrg am__tar=false 11918df9ffc95Smrg am__tar_=false 11919df9ffc95Smrg am__untar=false 11920df9ffc95Smrg ;; 11921df9ffc95Smrg esac 11922df9ffc95Smrg 11923df9ffc95Smrg # If the value was cached, stop now. We just wanted to have am__tar 11924df9ffc95Smrg # and am__untar set. 11925df9ffc95Smrg test -n "${am_cv_prog_tar_$1}" && break 11926df9ffc95Smrg 11927df9ffc95Smrg # tar/untar a dummy directory, and stop if the command works. 11928df9ffc95Smrg rm -rf conftest.dir 11929df9ffc95Smrg mkdir conftest.dir 11930df9ffc95Smrg echo GrepMe > conftest.dir/file 11931df9ffc95Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11932df9ffc95Smrg rm -rf conftest.dir 11933df9ffc95Smrg if test -s conftest.tar; then 11934df9ffc95Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11935df9ffc95Smrg AM_RUN_LOG([cat conftest.dir/file]) 11936df9ffc95Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11937df9ffc95Smrg fi 11938df9ffc95Smrg done 119397b58d2e0Smrg rm -rf conftest.dir 119407b58d2e0Smrg 11941df9ffc95Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11942df9ffc95Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11943df9ffc95Smrg 119447b58d2e0SmrgAC_SUBST([am__tar]) 119457b58d2e0SmrgAC_SUBST([am__untar]) 119467b58d2e0Smrg]) # _AM_PROG_TAR 11947b698ba48Smrg 11948