aclocal.m4 revision 0b661123
10b661123Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2bdcaa8d0Smrg 3bdcaa8d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 496ce994aSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5bdcaa8d0Smrg# This file is free software; the Free Software Foundation 6bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 7bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 8bdcaa8d0Smrg 9bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, 10bdcaa8d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11bdcaa8d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12bdcaa8d0Smrg# PARTICULAR PURPOSE. 13bdcaa8d0Smrg 1472313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1572313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1672313efbSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1772313efbSmrg[m4_warning([this file was generated for autoconf 2.63. 1872313efbSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1972313efbSmrgIf you have problems, you may need to regenerate the build system entirely. 2072313efbSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2172313efbSmrg 22bdcaa8d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 230b661123Smrg# 240b661123Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 250b661123Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 260b661123Smrg# Written by Gordon Matzigkeit, 1996 270b661123Smrg# 280b661123Smrg# This file is free software; the Free Software Foundation gives 290b661123Smrg# unlimited permission to copy and/or distribute it, with or without 300b661123Smrg# modifications, as long as this notice is preserved. 310b661123Smrg 320b661123Smrgm4_define([_LT_COPYING], [dnl 330b661123Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 340b661123Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 350b661123Smrg# Written by Gordon Matzigkeit, 1996 360b661123Smrg# 370b661123Smrg# This file is part of GNU Libtool. 380b661123Smrg# 390b661123Smrg# GNU Libtool is free software; you can redistribute it and/or 400b661123Smrg# modify it under the terms of the GNU General Public License as 410b661123Smrg# published by the Free Software Foundation; either version 2 of 420b661123Smrg# the License, or (at your option) any later version. 430b661123Smrg# 440b661123Smrg# As a special exception to the GNU General Public License, 450b661123Smrg# if you distribute this file as part of a program or library that 460b661123Smrg# is built using GNU Libtool, you may include this file under the 470b661123Smrg# same distribution terms that you use for the rest of that program. 480b661123Smrg# 490b661123Smrg# GNU Libtool is distributed in the hope that it will be useful, 500b661123Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 510b661123Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 520b661123Smrg# GNU General Public License for more details. 530b661123Smrg# 540b661123Smrg# You should have received a copy of the GNU General Public License 550b661123Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 560b661123Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 570b661123Smrg# obtained by writing to the Free Software Foundation, Inc., 580b661123Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 590b661123Smrg]) 60bdcaa8d0Smrg 610b661123Smrg# serial 56 LT_INIT 62bdcaa8d0Smrg 63bdcaa8d0Smrg 640b661123Smrg# LT_PREREQ(VERSION) 650b661123Smrg# ------------------ 660b661123Smrg# Complain and exit if this libtool version is less that VERSION. 670b661123Smrgm4_defun([LT_PREREQ], 680b661123Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 690b661123Smrg [m4_default([$3], 700b661123Smrg [m4_fatal([Libtool version $1 or higher is required], 710b661123Smrg 63)])], 720b661123Smrg [$2])]) 7372313efbSmrg 7472313efbSmrg 750b661123Smrg# _LT_CHECK_BUILDDIR 760b661123Smrg# ------------------ 770b661123Smrg# Complain if the absolute build directory name contains unusual characters 780b661123Smrgm4_defun([_LT_CHECK_BUILDDIR], 790b661123Smrg[case `pwd` in 800b661123Smrg *\ * | *\ *) 810b661123Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 820b661123Smrgesac 830b661123Smrg]) 840b661123Smrg 850b661123Smrg 860b661123Smrg# LT_INIT([OPTIONS]) 870b661123Smrg# ------------------ 880b661123SmrgAC_DEFUN([LT_INIT], 890b661123Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 900b661123SmrgAC_BEFORE([$0], [LT_LANG])dnl 910b661123SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 920b661123SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 930b661123Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 940b661123Smrg 950b661123Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 960b661123Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 970b661123Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 980b661123Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 990b661123Smrgdnl unless we require an AC_DEFUNed macro: 1000b661123SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1010b661123SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1020b661123SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1030b661123SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1040b661123Smrgm4_require([_LT_PROG_LTMAIN])dnl 1050b661123Smrg 1060b661123Smrgdnl Parse OPTIONS 1070b661123Smrg_LT_SET_OPTIONS([$0], [$1]) 108bdcaa8d0Smrg 109bdcaa8d0Smrg# This can be used to rebuild libtool when needed 1100b661123SmrgLIBTOOL_DEPS="$ltmain" 111bdcaa8d0Smrg 112bdcaa8d0Smrg# Always use our own libtool. 113bdcaa8d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114bdcaa8d0SmrgAC_SUBST(LIBTOOL)dnl 115bdcaa8d0Smrg 1160b661123Smrg_LT_SETUP 11772313efbSmrg 1180b661123Smrg# Only expand once: 1190b661123Smrgm4_define([LT_INIT]) 1200b661123Smrg])# LT_INIT 12172313efbSmrg 1220b661123Smrg# Old names: 1230b661123SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1240b661123SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1250b661123Smrgdnl aclocal-1.4 backwards compatibility: 1260b661123Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1270b661123Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1280b661123Smrg 1290b661123Smrg 1300b661123Smrg# _LT_CC_BASENAME(CC) 1310b661123Smrg# ------------------- 1320b661123Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1330b661123Smrgm4_defun([_LT_CC_BASENAME], 1340b661123Smrg[for cc_temp in $1""; do 1350b661123Smrg case $cc_temp in 1360b661123Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1370b661123Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1380b661123Smrg \-*) ;; 1390b661123Smrg *) break;; 1400b661123Smrg esac 1410b661123Smrgdone 1420b661123Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1430b661123Smrg]) 1440b661123Smrg 1450b661123Smrg 1460b661123Smrg# _LT_FILEUTILS_DEFAULTS 1470b661123Smrg# ---------------------- 1480b661123Smrg# It is okay to use these file commands and assume they have been set 1490b661123Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1500b661123Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1510b661123Smrg[: ${CP="cp -f"} 1520b661123Smrg: ${MV="mv -f"} 1530b661123Smrg: ${RM="rm -f"} 1540b661123Smrg])# _LT_FILEUTILS_DEFAULTS 1550b661123Smrg 1560b661123Smrg 1570b661123Smrg# _LT_SETUP 1580b661123Smrg# --------- 1590b661123Smrgm4_defun([_LT_SETUP], 1600b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1620b661123Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1630b661123Smrg_LT_DECL([], [host], [0])dnl 1640b661123Smrg_LT_DECL([], [host_os], [0])dnl 1650b661123Smrgdnl 1660b661123Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1670b661123Smrg_LT_DECL([], [build], [0])dnl 1680b661123Smrg_LT_DECL([], [build_os], [0])dnl 1690b661123Smrgdnl 170bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 1710b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 1720b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 1730b661123Smrgdnl 174bdcaa8d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1750b661123Smrgtest -z "$LN_S" && LN_S="ln -s" 1760b661123Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177bdcaa8d0Smrgdnl 1780b661123SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1790b661123Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1800b661123Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1810b661123Smrgdnl 1820b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1830b661123Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1840b661123Smrgm4_require([_LT_CMD_RELOAD])dnl 1850b661123Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1860b661123Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1870b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1880b661123Smrg 1890b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ 1900b661123Smrg# See if we are running on zsh, and set the options which allow our 1910b661123Smrg# commands through without removal of \ escapes INIT. 1920b661123Smrgif test -n "\${ZSH_VERSION+set}" ; then 1930b661123Smrg setopt NO_GLOB_SUBST 1940b661123Smrgfi 1950b661123Smrg]) 1960b661123Smrgif test -n "${ZSH_VERSION+set}" ; then 1970b661123Smrg setopt NO_GLOB_SUBST 1980b661123Smrgfi 199bdcaa8d0Smrg 2000b661123Smrg_LT_CHECK_OBJDIR 2010b661123Smrg 2020b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 2030b661123Smrg_LT_PROG_ECHO_BACKSLASH 204bdcaa8d0Smrg 205bdcaa8d0Smrgcase $host_os in 206bdcaa8d0Smrgaix3*) 207bdcaa8d0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 208bdcaa8d0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209bdcaa8d0Smrg # vanish in a puff of smoke. 210bdcaa8d0Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 211bdcaa8d0Smrg COLLECT_NAMES= 212bdcaa8d0Smrg export COLLECT_NAMES 213bdcaa8d0Smrg fi 214bdcaa8d0Smrg ;; 215bdcaa8d0Smrgesac 216bdcaa8d0Smrg 217bdcaa8d0Smrg# Sed substitution that helps us do robust quoting. It backslashifies 218bdcaa8d0Smrg# metacharacters that are still active within double-quoted strings. 2190b661123Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220bdcaa8d0Smrg 221bdcaa8d0Smrg# Same as above, but do not quote variable references. 2220b661123Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223bdcaa8d0Smrg 224bdcaa8d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a 225bdcaa8d0Smrg# double_quote_subst'ed string. 226bdcaa8d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227bdcaa8d0Smrg 2280b661123Smrg# Sed substitution to delay expansion of an escaped single quote. 2290b661123Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2300b661123Smrg 231bdcaa8d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions 232bdcaa8d0Smrgno_glob_subst='s/\*/\\\*/g' 233bdcaa8d0Smrg 234bdcaa8d0Smrg# Global variables: 2350b661123Smrgofile=libtool 236bdcaa8d0Smrgcan_build_shared=yes 237bdcaa8d0Smrg 238bdcaa8d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 239bdcaa8d0Smrg# which needs '.lib'). 240bdcaa8d0Smrglibext=a 241bdcaa8d0Smrg 2420b661123Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 24396ce994aSmrg 244bdcaa8d0Smrgold_CC="$CC" 245bdcaa8d0Smrgold_CFLAGS="$CFLAGS" 246bdcaa8d0Smrg 247bdcaa8d0Smrg# Set sane defaults for various variables 248bdcaa8d0Smrgtest -z "$CC" && CC=cc 249bdcaa8d0Smrgtest -z "$LTCC" && LTCC=$CC 250bdcaa8d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251bdcaa8d0Smrgtest -z "$LD" && LD=ld 252bdcaa8d0Smrgtest -z "$ac_objext" && ac_objext=o 253bdcaa8d0Smrg 254bdcaa8d0Smrg_LT_CC_BASENAME([$compiler]) 255bdcaa8d0Smrg 256bdcaa8d0Smrg# Only perform the check for file, if the check method requires it 2570b661123Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258bdcaa8d0Smrgcase $deplibs_check_method in 259bdcaa8d0Smrgfile_magic*) 260bdcaa8d0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2610b661123Smrg _LT_PATH_MAGIC 262bdcaa8d0Smrg fi 263bdcaa8d0Smrg ;; 264bdcaa8d0Smrgesac 265bdcaa8d0Smrg 2660b661123Smrg# Use C for the default configuration in the libtool script 2670b661123SmrgLT_SUPPORTED_TAG([CC]) 2680b661123Smrg_LT_LANG_C_CONFIG 2690b661123Smrg_LT_LANG_DEFAULT_CONFIG 2700b661123Smrg_LT_CONFIG_COMMANDS 2710b661123Smrg])# _LT_SETUP 27272313efbSmrg 27372313efbSmrg 2740b661123Smrg# _LT_PROG_LTMAIN 2750b661123Smrg# --------------- 2760b661123Smrg# Note that this code is called both from `configure', and `config.status' 2770b661123Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2780b661123Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2790b661123Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2800b661123Smrgm4_defun([_LT_PROG_LTMAIN], 2810b661123Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2820b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2830b661123Smrgltmain="$ac_aux_dir/ltmain.sh" 2840b661123Smrg])# _LT_PROG_LTMAIN 28572313efbSmrg 28672313efbSmrg 2870b661123Smrg 2880b661123Smrg# So that we can recreate a full libtool script including additional 2890b661123Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2900b661123Smrg# in macros and then make a single call at the end using the `libtool' 2910b661123Smrg# label. 2920b661123Smrg 2930b661123Smrg 2940b661123Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2950b661123Smrg# ---------------------------------------- 2960b661123Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2970b661123Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2980b661123Smrg[m4_ifval([$1], 2990b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3000b661123Smrg [$1 3010b661123Smrg])])]) 3020b661123Smrg 3030b661123Smrg# Initialize. 3040b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3050b661123Smrg 3060b661123Smrg 3070b661123Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3080b661123Smrg# ------------------------------ 3090b661123Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3100b661123Smrgm4_define([_LT_CONFIG_LIBTOOL], 3110b661123Smrg[m4_ifval([$1], 3120b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3130b661123Smrg [$1 3140b661123Smrg])])]) 3150b661123Smrg 3160b661123Smrg# Initialize. 3170b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3180b661123Smrg 3190b661123Smrg 3200b661123Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3210b661123Smrg# ----------------------------------------------------- 3220b661123Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3230b661123Smrg[_LT_CONFIG_LIBTOOL([$1]) 3240b661123Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3250b661123Smrg]) 3260b661123Smrg 3270b661123Smrg 3280b661123Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3290b661123Smrg# ----------------------------- 3300b661123Smrg# Add leading comment marks to the start of each line, and a trailing 3310b661123Smrg# full-stop to the whole comment if one is not present already. 3320b661123Smrgm4_define([_LT_FORMAT_COMMENT], 3330b661123Smrg[m4_ifval([$1], [ 3340b661123Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3350b661123Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3360b661123Smrg)]) 3370b661123Smrg 3380b661123Smrg 3390b661123Smrg 3400b661123Smrg 3410b661123Smrg 3420b661123Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3430b661123Smrg# ------------------------------------------------------------------- 3440b661123Smrg# CONFIGNAME is the name given to the value in the libtool script. 3450b661123Smrg# VARNAME is the (base) name used in the configure script. 3460b661123Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3470b661123Smrg# VARNAME. Any other value will be used directly. 3480b661123Smrgm4_define([_LT_DECL], 3490b661123Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3500b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3510b661123Smrg [m4_ifval([$1], [$1], [$2])]) 3520b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3530b661123Smrg m4_ifval([$4], 3540b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3550b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3560b661123Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3570b661123Smrg]) 3580b661123Smrg 3590b661123Smrg 3600b661123Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3610b661123Smrg# -------------------------------------------------------- 3620b661123Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3630b661123Smrg 3640b661123Smrg 3650b661123Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3660b661123Smrg# ------------------------------------------------ 3670b661123Smrgm4_define([lt_decl_tag_varnames], 3680b661123Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3690b661123Smrg 3700b661123Smrg 3710b661123Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3720b661123Smrg# --------------------------------------------------------- 3730b661123Smrgm4_define([_lt_decl_filter], 3740b661123Smrg[m4_case([$#], 3750b661123Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3760b661123Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3770b661123Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3780b661123Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3790b661123Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3800b661123Smrg]) 3810b661123Smrg 3820b661123Smrg 3830b661123Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3840b661123Smrg# -------------------------------------------------- 3850b661123Smrgm4_define([lt_decl_quote_varnames], 3860b661123Smrg[_lt_decl_filter([value], [1], $@)]) 3870b661123Smrg 3880b661123Smrg 3890b661123Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3900b661123Smrg# --------------------------------------------------- 3910b661123Smrgm4_define([lt_decl_dquote_varnames], 3920b661123Smrg[_lt_decl_filter([value], [2], $@)]) 3930b661123Smrg 3940b661123Smrg 3950b661123Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3960b661123Smrg# --------------------------------------------------- 3970b661123Smrgm4_define([lt_decl_varnames_tagged], 3980b661123Smrg[m4_assert([$# <= 2])dnl 3990b661123Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4000b661123Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4010b661123Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4020b661123Smrgm4_define([_lt_decl_varnames_tagged], 4030b661123Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4040b661123Smrg 4050b661123Smrg 4060b661123Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4070b661123Smrg# ------------------------------------------------ 4080b661123Smrgm4_define([lt_decl_all_varnames], 4090b661123Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4100b661123Smrg m4_if([$2], [], 4110b661123Smrg m4_quote(lt_decl_varnames), 4120b661123Smrg m4_quote(m4_shift($@))))[]dnl 4130b661123Smrg]) 4140b661123Smrgm4_define([_lt_decl_all_varnames], 4150b661123Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4160b661123Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4170b661123Smrg]) 4180b661123Smrg 4190b661123Smrg 4200b661123Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4210b661123Smrg# ------------------------------------ 4220b661123Smrg# Quote a variable value, and forward it to `config.status' so that its 4230b661123Smrg# declaration there will have the same value as in `configure'. VARNAME 4240b661123Smrg# must have a single quote delimited value for this to work. 4250b661123Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4260b661123Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 4270b661123Smrg 4280b661123Smrg 4290b661123Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4300b661123Smrg# ------------------------------ 4310b661123Smrg# We delimit libtool config variables with single quotes, so when 4320b661123Smrg# we write them to config.status, we have to be sure to quote all 4330b661123Smrg# embedded single quotes properly. In configure, this macro expands 4340b661123Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4350b661123Smrg# 4360b661123Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 4370b661123Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4380b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4390b661123Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4400b661123Smrg 4410b661123Smrg 4420b661123Smrg# _LT_LIBTOOL_TAGS 4430b661123Smrg# ---------------- 4440b661123Smrg# Output comment and list of tags supported by the script 4450b661123Smrgm4_defun([_LT_LIBTOOL_TAGS], 4460b661123Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4470b661123Smrgavailable_tags="_LT_TAGS"dnl 4480b661123Smrg]) 4490b661123Smrg 4500b661123Smrg 4510b661123Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4520b661123Smrg# ----------------------------------- 4530b661123Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4540b661123Smrg# expand to a commented shell variable setting: 4550b661123Smrg# 4560b661123Smrg# # Some comment about what VAR is for. 4570b661123Smrg# visible_name=$lt_internal_name 4580b661123Smrgm4_define([_LT_LIBTOOL_DECLARE], 4590b661123Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4600b661123Smrg [description])))[]dnl 4610b661123Smrgm4_pushdef([_libtool_name], 4620b661123Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4630b661123Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4640b661123Smrg [0], [_libtool_name=[$]$1], 4650b661123Smrg [1], [_libtool_name=$lt_[]$1], 4660b661123Smrg [2], [_libtool_name=$lt_[]$1], 4670b661123Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4680b661123Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4690b661123Smrg]) 4700b661123Smrg 4710b661123Smrg 4720b661123Smrg# _LT_LIBTOOL_CONFIG_VARS 4730b661123Smrg# ----------------------- 4740b661123Smrg# Produce commented declarations of non-tagged libtool config variables 4750b661123Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4760b661123Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4770b661123Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4780b661123Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4790b661123Smrg[m4_foreach([_lt_var], 4800b661123Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4810b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4820b661123Smrg 4830b661123Smrg 4840b661123Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4850b661123Smrg# ------------------------- 4860b661123Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 4870b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4880b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 48972313efbSmrg 49072313efbSmrg 4910b661123Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4920b661123Smrg# ------------------------------ 4930b661123Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4940b661123Smrg 4950b661123Smrg 4960b661123Smrg# _LT_CONFIG_COMMANDS 49772313efbSmrg# ------------------- 4980b661123Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4990b661123Smrg# variables for single and double quote escaping we saved from calls 5000b661123Smrg# to _LT_DECL, we can put quote escaped variables declarations 5010b661123Smrg# into `config.status', and then the shell code to quote escape them in 5020b661123Smrg# for loops in `config.status'. Finally, any additional code accumulated 5030b661123Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5040b661123Smrgm4_defun([_LT_CONFIG_COMMANDS], 5050b661123Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5060b661123Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5070b661123Smrg dnl instead of duplicating it all over again into config.status, 5080b661123Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5090b661123Smrg dnl needs to know what name is stored there: 5100b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5110b661123Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5120b661123Smrg dnl If the libtool generation code is destined for config.status, 5130b661123Smrg dnl expand the accumulated commands and init code now: 5140b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5150b661123Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5160b661123Smrg])#_LT_CONFIG_COMMANDS 5170b661123Smrg 5180b661123Smrg 5190b661123Smrg# Initialize. 5200b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5210b661123Smrg[ 5220b661123Smrg 5230b661123Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5240b661123Smrg# if CDPATH is set. 5250b661123Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5260b661123Smrg 5270b661123Smrgsed_quote_subst='$sed_quote_subst' 5280b661123Smrgdouble_quote_subst='$double_quote_subst' 5290b661123Smrgdelay_variable_subst='$delay_variable_subst' 5300b661123Smrg_LT_CONFIG_STATUS_DECLARATIONS 5310b661123SmrgLTCC='$LTCC' 5320b661123SmrgLTCFLAGS='$LTCFLAGS' 5330b661123Smrgcompiler='$compiler_DEFAULT' 5340b661123Smrg 5350b661123Smrg# Quote evaled strings. 5360b661123Smrgfor var in lt_decl_all_varnames([[ \ 5370b661123Smrg]], lt_decl_quote_varnames); do 5380b661123Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5390b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 5400b661123Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5410b661123Smrg ;; 5420b661123Smrg *) 5430b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5440b661123Smrg ;; 5450b661123Smrg esac 5460b661123Smrgdone 5470b661123Smrg 5480b661123Smrg# Double-quote double-evaled strings. 5490b661123Smrgfor var in lt_decl_all_varnames([[ \ 5500b661123Smrg]], lt_decl_dquote_varnames); do 5510b661123Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5520b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 5530b661123Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5540b661123Smrg ;; 5550b661123Smrg *) 5560b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5570b661123Smrg ;; 5580b661123Smrg esac 5590b661123Smrgdone 5600b661123Smrg 5610b661123Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 5620b661123Smrgcase \$lt_ECHO in 5630b661123Smrg*'\\\[$]0 --fallback-echo"')dnl " 5640b661123Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 5650b661123Smrg ;; 5660b661123Smrgesac 5670b661123Smrg 5680b661123Smrg_LT_OUTPUT_LIBTOOL_INIT 5690b661123Smrg]) 5700b661123Smrg 5710b661123Smrg 5720b661123Smrg# LT_OUTPUT 5730b661123Smrg# --------- 5740b661123Smrg# This macro allows early generation of the libtool script (before 5750b661123Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 5760b661123Smrg# tests. 5770b661123SmrgAC_DEFUN([LT_OUTPUT], 5780b661123Smrg[: ${CONFIG_LT=./config.lt} 5790b661123SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 5800b661123Smrgcat >"$CONFIG_LT" <<_LTEOF 5810b661123Smrg#! $SHELL 5820b661123Smrg# Generated by $as_me. 5830b661123Smrg# Run this file to recreate a libtool stub with the current configuration. 5840b661123Smrg 5850b661123Smrglt_cl_silent=false 5860b661123SmrgSHELL=\${CONFIG_SHELL-$SHELL} 5870b661123Smrg_LTEOF 5880b661123Smrg 5890b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 5900b661123SmrgAS_SHELL_SANITIZE 5910b661123Smrg_AS_PREPARE 5920b661123Smrg 5930b661123Smrgexec AS_MESSAGE_FD>&1 5940b661123Smrgexec AS_MESSAGE_LOG_FD>>config.log 5950b661123Smrg{ 5960b661123Smrg echo 5970b661123Smrg AS_BOX([Running $as_me.]) 5980b661123Smrg} >&AS_MESSAGE_LOG_FD 5990b661123Smrg 6000b661123Smrglt_cl_help="\ 6010b661123Smrg\`$as_me' creates a local libtool stub from the current configuration, 6020b661123Smrgfor use in further configure time tests before the real libtool is 6030b661123Smrggenerated. 6040b661123Smrg 6050b661123SmrgUsage: $[0] [[OPTIONS]] 6060b661123Smrg 6070b661123Smrg -h, --help print this help, then exit 6080b661123Smrg -V, --version print version number, then exit 6090b661123Smrg -q, --quiet do not print progress messages 6100b661123Smrg -d, --debug don't remove temporary files 6110b661123Smrg 6120b661123SmrgReport bugs to <bug-libtool@gnu.org>." 6130b661123Smrg 6140b661123Smrglt_cl_version="\ 6150b661123Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6160b661123Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6170b661123Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6180b661123Smrg 6190b661123SmrgCopyright (C) 2008 Free Software Foundation, Inc. 6200b661123SmrgThis config.lt script is free software; the Free Software Foundation 6210b661123Smrggives unlimited permision to copy, distribute and modify it." 6220b661123Smrg 6230b661123Smrgwhile test $[#] != 0 6240b661123Smrgdo 6250b661123Smrg case $[1] in 6260b661123Smrg --version | --v* | -V ) 6270b661123Smrg echo "$lt_cl_version"; exit 0 ;; 6280b661123Smrg --help | --h* | -h ) 6290b661123Smrg echo "$lt_cl_help"; exit 0 ;; 6300b661123Smrg --debug | --d* | -d ) 6310b661123Smrg debug=: ;; 6320b661123Smrg --quiet | --q* | --silent | --s* | -q ) 6330b661123Smrg lt_cl_silent=: ;; 6340b661123Smrg 6350b661123Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6360b661123SmrgTry \`$[0] --help' for more information.]) ;; 6370b661123Smrg 6380b661123Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6390b661123SmrgTry \`$[0] --help' for more information.]) ;; 6400b661123Smrg esac 6410b661123Smrg shift 6420b661123Smrgdone 6430b661123Smrg 6440b661123Smrgif $lt_cl_silent; then 6450b661123Smrg exec AS_MESSAGE_FD>/dev/null 6460b661123Smrgfi 6470b661123Smrg_LTEOF 6480b661123Smrg 6490b661123Smrgcat >>"$CONFIG_LT" <<_LTEOF 6500b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6510b661123Smrg_LTEOF 6520b661123Smrg 6530b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6540b661123SmrgAC_MSG_NOTICE([creating $ofile]) 6550b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6560b661123SmrgAS_EXIT(0) 6570b661123Smrg_LTEOF 6580b661123Smrgchmod +x "$CONFIG_LT" 6590b661123Smrg 6600b661123Smrg# configure is writing to config.log, but config.lt does its own redirection, 6610b661123Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6620b661123Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6630b661123Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6640b661123Smrgif test "$no_create" != yes; then 6650b661123Smrg lt_cl_success=: 6660b661123Smrg test "$silent" = yes && 6670b661123Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 6680b661123Smrg exec AS_MESSAGE_LOG_FD>/dev/null 6690b661123Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 6700b661123Smrg exec AS_MESSAGE_LOG_FD>>config.log 6710b661123Smrg $lt_cl_success || AS_EXIT(1) 6720b661123Smrgfi 6730b661123Smrg])# LT_OUTPUT 6740b661123Smrg 6750b661123Smrg 6760b661123Smrg# _LT_CONFIG(TAG) 6770b661123Smrg# --------------- 6780b661123Smrg# If TAG is the built-in tag, create an initial libtool script with a 6790b661123Smrg# default configuration from the untagged config vars. Otherwise add code 6800b661123Smrg# to config.status for appending the configuration named by TAG from the 6810b661123Smrg# matching tagged config vars. 6820b661123Smrgm4_defun([_LT_CONFIG], 6830b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6840b661123Smrg_LT_CONFIG_SAVE_COMMANDS([ 6850b661123Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 6860b661123Smrg m4_if(_LT_TAG, [C], [ 6870b661123Smrg # See if we are running on zsh, and set the options which allow our 6880b661123Smrg # commands through without removal of \ escapes. 6890b661123Smrg if test -n "${ZSH_VERSION+set}" ; then 6900b661123Smrg setopt NO_GLOB_SUBST 6910b661123Smrg fi 6920b661123Smrg 6930b661123Smrg cfgfile="${ofile}T" 6940b661123Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 6950b661123Smrg $RM "$cfgfile" 6960b661123Smrg 6970b661123Smrg cat <<_LT_EOF >> "$cfgfile" 6980b661123Smrg#! $SHELL 6990b661123Smrg 7000b661123Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7010b661123Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7020b661123Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7030b661123Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7040b661123Smrg# 7050b661123Smrg_LT_COPYING 7060b661123Smrg_LT_LIBTOOL_TAGS 7070b661123Smrg 7080b661123Smrg# ### BEGIN LIBTOOL CONFIG 7090b661123Smrg_LT_LIBTOOL_CONFIG_VARS 7100b661123Smrg_LT_LIBTOOL_TAG_VARS 7110b661123Smrg# ### END LIBTOOL CONFIG 7120b661123Smrg 7130b661123Smrg_LT_EOF 7140b661123Smrg 7150b661123Smrg case $host_os in 7160b661123Smrg aix3*) 7170b661123Smrg cat <<\_LT_EOF >> "$cfgfile" 7180b661123Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7190b661123Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7200b661123Smrg# vanish in a puff of smoke. 7210b661123Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7220b661123Smrg COLLECT_NAMES= 7230b661123Smrg export COLLECT_NAMES 7240b661123Smrgfi 7250b661123Smrg_LT_EOF 7260b661123Smrg ;; 7270b661123Smrg esac 7280b661123Smrg 7290b661123Smrg _LT_PROG_LTMAIN 7300b661123Smrg 7310b661123Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7320b661123Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7330b661123Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7340b661123Smrg # is reportedly fixed, but why not run on old versions too? 7350b661123Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 7360b661123Smrg || (rm -f "$cfgfile"; exit 1) 7370b661123Smrg 7380b661123Smrg _LT_PROG_XSI_SHELLFNS 7390b661123Smrg 7400b661123Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 7410b661123Smrg || (rm -f "$cfgfile"; exit 1) 7420b661123Smrg 7430b661123Smrg mv -f "$cfgfile" "$ofile" || 7440b661123Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7450b661123Smrg chmod +x "$ofile" 7460b661123Smrg], 7470b661123Smrg[cat <<_LT_EOF >> "$ofile" 7480b661123Smrg 7490b661123Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7500b661123Smrgdnl in a comment (ie after a #). 7510b661123Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7520b661123Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7530b661123Smrg# ### END LIBTOOL TAG CONFIG: $1 7540b661123Smrg_LT_EOF 7550b661123Smrg])dnl /m4_if 7560b661123Smrg], 7570b661123Smrg[m4_if([$1], [], [ 7580b661123Smrg PACKAGE='$PACKAGE' 7590b661123Smrg VERSION='$VERSION' 7600b661123Smrg TIMESTAMP='$TIMESTAMP' 7610b661123Smrg RM='$RM' 7620b661123Smrg ofile='$ofile'], []) 7630b661123Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7640b661123Smrg])# _LT_CONFIG 7650b661123Smrg 7660b661123Smrg 7670b661123Smrg# LT_SUPPORTED_TAG(TAG) 7680b661123Smrg# --------------------- 7690b661123Smrg# Trace this macro to discover what tags are supported by the libtool 7700b661123Smrg# --tag option, using: 7710b661123Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 7720b661123SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 7730b661123Smrg 7740b661123Smrg 7750b661123Smrg# C support is built-in for now 7760b661123Smrgm4_define([_LT_LANG_C_enabled], []) 7770b661123Smrgm4_define([_LT_TAGS], []) 7780b661123Smrg 7790b661123Smrg 7800b661123Smrg# LT_LANG(LANG) 7810b661123Smrg# ------------- 7820b661123Smrg# Enable libtool support for the given language if not already enabled. 7830b661123SmrgAC_DEFUN([LT_LANG], 7840b661123Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 7850b661123Smrgm4_case([$1], 7860b661123Smrg [C], [_LT_LANG(C)], 7870b661123Smrg [C++], [_LT_LANG(CXX)], 7880b661123Smrg [Java], [_LT_LANG(GCJ)], 7890b661123Smrg [Fortran 77], [_LT_LANG(F77)], 7900b661123Smrg [Fortran], [_LT_LANG(FC)], 7910b661123Smrg [Windows Resource], [_LT_LANG(RC)], 7920b661123Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 7930b661123Smrg [_LT_LANG($1)], 7940b661123Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 7950b661123Smrg])# LT_LANG 7960b661123Smrg 7970b661123Smrg 7980b661123Smrg# _LT_LANG(LANGNAME) 7990b661123Smrg# ------------------ 8000b661123Smrgm4_defun([_LT_LANG], 8010b661123Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8020b661123Smrg [LT_SUPPORTED_TAG([$1])dnl 8030b661123Smrg m4_append([_LT_TAGS], [$1 ])dnl 8040b661123Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8050b661123Smrg _LT_LANG_$1_CONFIG($1)])dnl 8060b661123Smrg])# _LT_LANG 8070b661123Smrg 8080b661123Smrg 8090b661123Smrg# _LT_LANG_DEFAULT_CONFIG 8100b661123Smrg# ----------------------- 8110b661123Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8120b661123Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8130b661123Smrg [LT_LANG(CXX)], 8140b661123Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8150b661123Smrg 8160b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8170b661123Smrg [LT_LANG(F77)], 8180b661123Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8190b661123Smrg 8200b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8210b661123Smrg [LT_LANG(FC)], 8220b661123Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8230b661123Smrg 8240b661123Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8250b661123Smrgdnl pulling things in needlessly. 8260b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8270b661123Smrg [LT_LANG(GCJ)], 8280b661123Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8290b661123Smrg [LT_LANG(GCJ)], 8300b661123Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8310b661123Smrg [LT_LANG(GCJ)], 8320b661123Smrg [m4_ifdef([AC_PROG_GCJ], 8330b661123Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8340b661123Smrg m4_ifdef([A][M_PROG_GCJ], 8350b661123Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8360b661123Smrg m4_ifdef([LT_PROG_GCJ], 8370b661123Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8380b661123Smrg 8390b661123SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 8400b661123Smrg [LT_LANG(RC)], 8410b661123Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 8420b661123Smrg])# _LT_LANG_DEFAULT_CONFIG 8430b661123Smrg 8440b661123Smrg# Obsolete macros: 8450b661123SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 8460b661123SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 8470b661123SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 8480b661123SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 8490b661123Smrgdnl aclocal-1.4 backwards compatibility: 8500b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 8510b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 8520b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 8530b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 8540b661123Smrg 8550b661123Smrg 8560b661123Smrg# _LT_TAG_COMPILER 8570b661123Smrg# ---------------- 8580b661123Smrgm4_defun([_LT_TAG_COMPILER], 85972313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 860bdcaa8d0Smrg 8610b661123Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 8620b661123Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 8630b661123Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 8640b661123Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 8650b661123Smrg 86672313efbSmrg# If no C compiler was specified, use CC. 86772313efbSmrgLTCC=${LTCC-"$CC"} 868bdcaa8d0Smrg 86972313efbSmrg# If no C compiler flags were specified, use CFLAGS. 87072313efbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871bdcaa8d0Smrg 87272313efbSmrg# Allow CC to be a program name with arguments. 87372313efbSmrgcompiler=$CC 8740b661123Smrg])# _LT_TAG_COMPILER 875bdcaa8d0Smrg 876bdcaa8d0Smrg 87772313efbSmrg# _LT_COMPILER_BOILERPLATE 87872313efbSmrg# ------------------------ 87972313efbSmrg# Check for compiler boilerplate output or warnings with 88072313efbSmrg# the simple compiler test code. 8810b661123Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 8820b661123Smrg[m4_require([_LT_DECL_SED])dnl 88372313efbSmrgac_outfile=conftest.$ac_objext 88472313efbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 88572313efbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 88672313efbSmrg_lt_compiler_boilerplate=`cat conftest.err` 8870b661123Smrg$RM conftest* 88872313efbSmrg])# _LT_COMPILER_BOILERPLATE 889bdcaa8d0Smrg 890bdcaa8d0Smrg 89172313efbSmrg# _LT_LINKER_BOILERPLATE 89272313efbSmrg# ---------------------- 89372313efbSmrg# Check for linker boilerplate output or warnings with 89472313efbSmrg# the simple link test code. 8950b661123Smrgm4_defun([_LT_LINKER_BOILERPLATE], 8960b661123Smrg[m4_require([_LT_DECL_SED])dnl 89772313efbSmrgac_outfile=conftest.$ac_objext 89872313efbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 89972313efbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 90072313efbSmrg_lt_linker_boilerplate=`cat conftest.err` 9010b661123Smrg$RM -r conftest* 90272313efbSmrg])# _LT_LINKER_BOILERPLATE 903bdcaa8d0Smrg 90472313efbSmrg# _LT_REQUIRED_DARWIN_CHECKS 9050b661123Smrg# ------------------------- 9060b661123Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 90772313efbSmrg case $host_os in 90872313efbSmrg rhapsody* | darwin*) 90972313efbSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 91072313efbSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9110b661123Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9120b661123Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9130b661123Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9140b661123Smrg _LT_DECL([], [DSYMUTIL], [1], 9150b661123Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9160b661123Smrg _LT_DECL([], [NMEDIT], [1], 9170b661123Smrg [Tool to change global to local symbols on Mac OS X]) 9180b661123Smrg _LT_DECL([], [LIPO], [1], 9190b661123Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9200b661123Smrg _LT_DECL([], [OTOOL], [1], 9210b661123Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9220b661123Smrg _LT_DECL([], [OTOOL64], [1], 9230b661123Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 92472313efbSmrg 92572313efbSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 92672313efbSmrg [lt_cv_apple_cc_single_mod=no 92772313efbSmrg if test -z "${LT_MULTI_MODULE}"; then 9280b661123Smrg # By default we will add the -single_module flag. You can override 9290b661123Smrg # by either setting the environment variable LT_MULTI_MODULE 9300b661123Smrg # non-empty at configure time, or by adding -multi_module to the 9310b661123Smrg # link flags. 9320b661123Smrg rm -rf libconftest.dylib* 9330b661123Smrg echo "int foo(void){return 1;}" > conftest.c 9340b661123Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9350b661123Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 9360b661123Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9370b661123Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 9380b661123Smrg _lt_result=$? 9390b661123Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 9400b661123Smrg lt_cv_apple_cc_single_mod=yes 9410b661123Smrg else 9420b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 9430b661123Smrg fi 9440b661123Smrg rm -rf libconftest.dylib* 9450b661123Smrg rm -f conftest.* 94672313efbSmrg fi]) 94772313efbSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 94872313efbSmrg [lt_cv_ld_exported_symbols_list], 94972313efbSmrg [lt_cv_ld_exported_symbols_list=no 95072313efbSmrg save_LDFLAGS=$LDFLAGS 95172313efbSmrg echo "_main" > conftest.sym 95272313efbSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 95372313efbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 9540b661123Smrg [lt_cv_ld_exported_symbols_list=yes], 9550b661123Smrg [lt_cv_ld_exported_symbols_list=no]) 9560b661123Smrg LDFLAGS="$save_LDFLAGS" 957bdcaa8d0Smrg ]) 95872313efbSmrg case $host_os in 9590b661123Smrg rhapsody* | darwin1.[[012]]) 96072313efbSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 96172313efbSmrg darwin1.*) 9620b661123Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9630b661123Smrg darwin*) # darwin 5.x on 96472313efbSmrg # if running on 10.5 or later, the deployment target defaults 96572313efbSmrg # to the OS version, if on x86, and 10.4, the deployment 96672313efbSmrg # target defaults to 10.4. Don't you love it? 96772313efbSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 9680b661123Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 9690b661123Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9700b661123Smrg 10.[[012]]*) 9710b661123Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9720b661123Smrg 10.*) 9730b661123Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 97472313efbSmrg esac 97572313efbSmrg ;; 97672313efbSmrg esac 97772313efbSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 97872313efbSmrg _lt_dar_single_mod='$single_module' 97972313efbSmrg fi 98072313efbSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 98172313efbSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 98272313efbSmrg else 9830b661123Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 98472313efbSmrg fi 98572313efbSmrg if test "$DSYMUTIL" != ":"; then 9860b661123Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 98772313efbSmrg else 98872313efbSmrg _lt_dsymutil= 989bdcaa8d0Smrg fi 990bdcaa8d0Smrg ;; 991bdcaa8d0Smrg esac 99272313efbSmrg]) 993bdcaa8d0Smrg 9940b661123Smrg 9950b661123Smrg# _LT_DARWIN_LINKER_FEATURES 9960b661123Smrg# -------------------------- 9970b661123Smrg# Checks for linker and compiler features on darwin 9980b661123Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 9990b661123Smrg[ 10000b661123Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 10010b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10020b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10030b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 10040b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10050b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 10060b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10070b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 10080b661123Smrg case $cc_basename in 10090b661123Smrg ifort*) _lt_dar_can_shared=yes ;; 10100b661123Smrg *) _lt_dar_can_shared=$GCC ;; 10110b661123Smrg esac 10120b661123Smrg if test "$_lt_dar_can_shared" = "yes"; then 10130b661123Smrg output_verbose_link_cmd=echo 10140b661123Smrg _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}" 10150b661123Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 10160b661123Smrg _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}" 10170b661123Smrg _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}" 10180b661123Smrg m4_if([$1], [CXX], 10190b661123Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 10200b661123Smrg _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}" 10210b661123Smrg _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}" 10220b661123Smrg fi 10230b661123Smrg],[]) 10240b661123Smrg else 10250b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10260b661123Smrg fi 10270b661123Smrg]) 10280b661123Smrg 10290b661123Smrg# _LT_SYS_MODULE_PATH_AIX 10300b661123Smrg# ----------------------- 103172313efbSmrg# Links a minimal program and checks the executable 103272313efbSmrg# for the system default hardcoded library path. In most cases, 103372313efbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 103472313efbSmrg# the location of the communication and MPI libs are included too. 103572313efbSmrg# If we don't find anything, use the default library path according 103672313efbSmrg# to the aix ld manual. 10370b661123Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 10380b661123Smrg[m4_require([_LT_DECL_SED])dnl 103972313efbSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 104072313efbSmrglt_aix_libpath_sed=' 104172313efbSmrg /Import File Strings/,/^$/ { 104272313efbSmrg /^0/ { 104372313efbSmrg s/^0 *\(.*\)$/\1/ 104472313efbSmrg p 104572313efbSmrg } 104672313efbSmrg }' 104772313efbSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 104872313efbSmrg# Check for a 64-bit object if we didn't find anything. 104972313efbSmrgif test -z "$aix_libpath"; then 105072313efbSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 105172313efbSmrgfi],[]) 105272313efbSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 10530b661123Smrg])# _LT_SYS_MODULE_PATH_AIX 1054bdcaa8d0Smrg 1055bdcaa8d0Smrg 10560b661123Smrg# _LT_SHELL_INIT(ARG) 10570b661123Smrg# ------------------- 10580b661123Smrgm4_define([_LT_SHELL_INIT], 105972313efbSmrg[ifdef([AC_DIVERSION_NOTICE], 106072313efbSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 106172313efbSmrg [AC_DIVERT_PUSH(NOTICE)]) 106272313efbSmrg$1 106372313efbSmrgAC_DIVERT_POP 10640b661123Smrg])# _LT_SHELL_INIT 1065bdcaa8d0Smrg 1066bdcaa8d0Smrg 10670b661123Smrg# _LT_PROG_ECHO_BACKSLASH 10680b661123Smrg# ----------------------- 106972313efbSmrg# Add some code to the start of the generated configure script which 107072313efbSmrg# will find an echo command which doesn't interpret backslashes. 10710b661123Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 10720b661123Smrg[_LT_SHELL_INIT([ 107372313efbSmrg# Check that we are running under the correct shell. 107472313efbSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075bdcaa8d0Smrg 10760b661123Smrgcase X$lt_ECHO in 107772313efbSmrgX*--fallback-echo) 107872313efbSmrg # Remove one level of quotation (which was required for Make). 10790b661123Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 108072313efbSmrg ;; 108172313efbSmrgesac 108272313efbSmrg 10830b661123SmrgECHO=${lt_ECHO-echo} 108472313efbSmrgif test "X[$]1" = X--no-reexec; then 108572313efbSmrg # Discard the --no-reexec flag, and continue. 108672313efbSmrg shift 108772313efbSmrgelif test "X[$]1" = X--fallback-echo; then 108872313efbSmrg # Avoid inline document here, it may be left over 108972313efbSmrg : 10900b661123Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 10910b661123Smrg # Yippee, $ECHO works! 109272313efbSmrg : 1093bdcaa8d0Smrgelse 109472313efbSmrg # Restart under the correct shell. 109572313efbSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096bdcaa8d0Smrgfi 1097bdcaa8d0Smrg 109872313efbSmrgif test "X[$]1" = X--fallback-echo; then 109972313efbSmrg # used as fallback echo 110072313efbSmrg shift 11010b661123Smrg cat <<_LT_EOF 110272313efbSmrg[$]* 11030b661123Smrg_LT_EOF 110472313efbSmrg exit 0 1105bdcaa8d0Smrgfi 1106bdcaa8d0Smrg 110772313efbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 110872313efbSmrg# if CDPATH is set. 110972313efbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110bdcaa8d0Smrg 11110b661123Smrgif test -z "$lt_ECHO"; then 11120b661123Smrg if test "X${echo_test_string+set}" != Xset; then 11130b661123Smrg # find a string as large as possible, as long as the shell can cope with it 11140b661123Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 11150b661123Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 11160b661123Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 11170b661123Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 11180b661123Smrg then 11190b661123Smrg break 11200b661123Smrg fi 11210b661123Smrg done 11220b661123Smrg fi 1123bdcaa8d0Smrg 11240b661123Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11250b661123Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11260b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11270b661123Smrg : 11280b661123Smrg else 11290b661123Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 11300b661123Smrg # backslashes. This makes it impossible to quote backslashes using 11310b661123Smrg # echo "$something" | sed 's/\\/\\\\/g' 11320b661123Smrg # 11330b661123Smrg # So, first we look for a working echo in the user's PATH. 1134bdcaa8d0Smrg 11350b661123Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 11360b661123Smrg for dir in $PATH /usr/ucb; do 11370b661123Smrg IFS="$lt_save_ifs" 11380b661123Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 11390b661123Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 11400b661123Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 11410b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11420b661123Smrg ECHO="$dir/echo" 11430b661123Smrg break 11440b661123Smrg fi 11450b661123Smrg done 114672313efbSmrg IFS="$lt_save_ifs" 1147bdcaa8d0Smrg 11480b661123Smrg if test "X$ECHO" = Xecho; then 11490b661123Smrg # We didn't find a better echo, so look for alternatives. 11500b661123Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 11510b661123Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 11520b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11530b661123Smrg # This shell has a builtin print -r that does the trick. 11540b661123Smrg ECHO='print -r' 11550b661123Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 11560b661123Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 11570b661123Smrg # If we have ksh, try running configure again with it. 11580b661123Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 11590b661123Smrg export ORIGINAL_CONFIG_SHELL 11600b661123Smrg CONFIG_SHELL=/bin/ksh 11610b661123Smrg export CONFIG_SHELL 11620b661123Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 116396ce994aSmrg else 11640b661123Smrg # Try using printf. 11650b661123Smrg ECHO='printf %s\n' 11660b661123Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11670b661123Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11680b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11690b661123Smrg # Cool, printf works 11700b661123Smrg : 11710b661123Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11720b661123Smrg test "X$echo_testing_string" = 'X\t' && 11730b661123Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11740b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11750b661123Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 11760b661123Smrg export CONFIG_SHELL 11770b661123Smrg SHELL="$CONFIG_SHELL" 11780b661123Smrg export SHELL 11790b661123Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11800b661123Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11810b661123Smrg test "X$echo_testing_string" = 'X\t' && 11820b661123Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11830b661123Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11840b661123Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11850b661123Smrg else 11860b661123Smrg # maybe with a smaller string... 11870b661123Smrg prev=: 1188bdcaa8d0Smrg 11890b661123Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 11900b661123Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 11910b661123Smrg then 11920b661123Smrg break 11930b661123Smrg fi 11940b661123Smrg prev="$cmd" 11950b661123Smrg done 119696ce994aSmrg 11970b661123Smrg if test "$prev" != 'sed 50q "[$]0"'; then 11980b661123Smrg echo_test_string=`eval $prev` 11990b661123Smrg export echo_test_string 12000b661123Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 12010b661123Smrg else 12020b661123Smrg # Oops. We lost completely, so just stick with echo. 12030b661123Smrg ECHO=echo 12040b661123Smrg fi 12050b661123Smrg fi 120672313efbSmrg fi 120772313efbSmrg fi 1208bdcaa8d0Smrg fi 1209bdcaa8d0Smrgfi 1210bdcaa8d0Smrg 121172313efbSmrg# Copy echo and quote the copy suitably for passing to libtool from 121272313efbSmrg# the Makefile, instead of quoting the original, which is used later. 12130b661123Smrglt_ECHO=$ECHO 12140b661123Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 12150b661123Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 121672313efbSmrgfi 1217bdcaa8d0Smrg 12180b661123SmrgAC_SUBST(lt_ECHO) 12190b661123Smrg]) 12200b661123Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12210b661123Smrg_LT_DECL([], [ECHO], [1], 12220b661123Smrg [An echo program that does not interpret backslashes]) 12230b661123Smrg])# _LT_PROG_ECHO_BACKSLASH 1224bdcaa8d0Smrg 1225bdcaa8d0Smrg 12260b661123Smrg# _LT_ENABLE_LOCK 12270b661123Smrg# --------------- 12280b661123Smrgm4_defun([_LT_ENABLE_LOCK], 122972313efbSmrg[AC_ARG_ENABLE([libtool-lock], 12300b661123Smrg [AS_HELP_STRING([--disable-libtool-lock], 12310b661123Smrg [avoid locking (might break parallel builds)])]) 123272313efbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 123372313efbSmrg 123472313efbSmrg# Some flags need to be propagated to the compiler or linker for good 123572313efbSmrg# libtool support. 123672313efbSmrgcase $host in 123772313efbSmrgia64-*-hpux*) 123872313efbSmrg # Find out which ABI we are using. 123972313efbSmrg echo 'int i;' > conftest.$ac_ext 124072313efbSmrg if AC_TRY_EVAL(ac_compile); then 124172313efbSmrg case `/usr/bin/file conftest.$ac_objext` in 12420b661123Smrg *ELF-32*) 12430b661123Smrg HPUX_IA64_MODE="32" 12440b661123Smrg ;; 12450b661123Smrg *ELF-64*) 12460b661123Smrg HPUX_IA64_MODE="64" 12470b661123Smrg ;; 1248bdcaa8d0Smrg esac 124972313efbSmrg fi 125072313efbSmrg rm -rf conftest* 125172313efbSmrg ;; 125272313efbSmrg*-*-irix6*) 125372313efbSmrg # Find out which ABI we are using. 125472313efbSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 125572313efbSmrg if AC_TRY_EVAL(ac_compile); then 12560b661123Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 12570b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 12580b661123Smrg *32-bit*) 12590b661123Smrg LD="${LD-ld} -melf32bsmip" 12600b661123Smrg ;; 12610b661123Smrg *N32*) 12620b661123Smrg LD="${LD-ld} -melf32bmipn32" 12630b661123Smrg ;; 12640b661123Smrg *64-bit*) 12650b661123Smrg LD="${LD-ld} -melf64bmip" 12660b661123Smrg ;; 12670b661123Smrg esac 12680b661123Smrg else 12690b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 12700b661123Smrg *32-bit*) 12710b661123Smrg LD="${LD-ld} -32" 12720b661123Smrg ;; 12730b661123Smrg *N32*) 12740b661123Smrg LD="${LD-ld} -n32" 12750b661123Smrg ;; 12760b661123Smrg *64-bit*) 12770b661123Smrg LD="${LD-ld} -64" 12780b661123Smrg ;; 12790b661123Smrg esac 12800b661123Smrg fi 1281bdcaa8d0Smrg fi 128272313efbSmrg rm -rf conftest* 1283bdcaa8d0Smrg ;; 1284bdcaa8d0Smrg 128572313efbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 12860b661123Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 128772313efbSmrg # Find out which ABI we are using. 128872313efbSmrg echo 'int i;' > conftest.$ac_ext 128972313efbSmrg if AC_TRY_EVAL(ac_compile); then 129072313efbSmrg case `/usr/bin/file conftest.o` in 12910b661123Smrg *32-bit*) 12920b661123Smrg case $host in 12930b661123Smrg x86_64-*kfreebsd*-gnu) 12940b661123Smrg LD="${LD-ld} -m elf_i386_fbsd" 12950b661123Smrg ;; 12960b661123Smrg x86_64-*linux*) 12970b661123Smrg LD="${LD-ld} -m elf_i386" 12980b661123Smrg ;; 12990b661123Smrg ppc64-*linux*|powerpc64-*linux*) 13000b661123Smrg LD="${LD-ld} -m elf32ppclinux" 13010b661123Smrg ;; 13020b661123Smrg s390x-*linux*) 13030b661123Smrg LD="${LD-ld} -m elf_s390" 13040b661123Smrg ;; 13050b661123Smrg sparc64-*linux*) 13060b661123Smrg LD="${LD-ld} -m elf32_sparc" 13070b661123Smrg ;; 13080b661123Smrg esac 13090b661123Smrg ;; 13100b661123Smrg *64-bit*) 13110b661123Smrg case $host in 13120b661123Smrg x86_64-*kfreebsd*-gnu) 13130b661123Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13140b661123Smrg ;; 13150b661123Smrg x86_64-*linux*) 13160b661123Smrg LD="${LD-ld} -m elf_x86_64" 13170b661123Smrg ;; 13180b661123Smrg ppc*-*linux*|powerpc*-*linux*) 13190b661123Smrg LD="${LD-ld} -m elf64ppc" 13200b661123Smrg ;; 13210b661123Smrg s390*-*linux*|s390*-*tpf*) 13220b661123Smrg LD="${LD-ld} -m elf64_s390" 13230b661123Smrg ;; 13240b661123Smrg sparc*-*linux*) 13250b661123Smrg LD="${LD-ld} -m elf64_sparc" 13260b661123Smrg ;; 13270b661123Smrg esac 13280b661123Smrg ;; 132972313efbSmrg esac 133072313efbSmrg fi 133172313efbSmrg rm -rf conftest* 1332bdcaa8d0Smrg ;; 1333bdcaa8d0Smrg 133472313efbSmrg*-*-sco3.2v5*) 133572313efbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 133672313efbSmrg SAVE_CFLAGS="$CFLAGS" 133772313efbSmrg CFLAGS="$CFLAGS -belf" 133872313efbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 133972313efbSmrg [AC_LANG_PUSH(C) 13400b661123Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 134172313efbSmrg AC_LANG_POP]) 134272313efbSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 134372313efbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 134472313efbSmrg CFLAGS="$SAVE_CFLAGS" 134572313efbSmrg fi 1346bdcaa8d0Smrg ;; 134772313efbSmrgsparc*-*solaris*) 134872313efbSmrg # Find out which ABI we are using. 134972313efbSmrg echo 'int i;' > conftest.$ac_ext 135072313efbSmrg if AC_TRY_EVAL(ac_compile); then 135172313efbSmrg case `/usr/bin/file conftest.o` in 135272313efbSmrg *64-bit*) 135372313efbSmrg case $lt_cv_prog_gnu_ld in 135472313efbSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 135572313efbSmrg *) 13560b661123Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 135772313efbSmrg LD="${LD-ld} -64" 135872313efbSmrg fi 135972313efbSmrg ;; 136072313efbSmrg esac 136172313efbSmrg ;; 136272313efbSmrg esac 136372313efbSmrg fi 136472313efbSmrg rm -rf conftest* 1365bdcaa8d0Smrg ;; 136672313efbSmrgesac 1367bdcaa8d0Smrg 136872313efbSmrgneed_locks="$enable_libtool_lock" 13690b661123Smrg])# _LT_ENABLE_LOCK 13700b661123Smrg 13710b661123Smrg 13720b661123Smrg# _LT_CMD_OLD_ARCHIVE 13730b661123Smrg# ------------------- 13740b661123Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 13750b661123Smrg[AC_CHECK_TOOL(AR, ar, false) 13760b661123Smrgtest -z "$AR" && AR=ar 13770b661123Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 13780b661123Smrg_LT_DECL([], [AR], [1], [The archiver]) 13790b661123Smrg_LT_DECL([], [AR_FLAGS], [1]) 13800b661123Smrg 13810b661123SmrgAC_CHECK_TOOL(STRIP, strip, :) 13820b661123Smrgtest -z "$STRIP" && STRIP=: 13830b661123Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 13840b661123Smrg 13850b661123SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 13860b661123Smrgtest -z "$RANLIB" && RANLIB=: 13870b661123Smrg_LT_DECL([], [RANLIB], [1], 13880b661123Smrg [Commands used to install an old-style archive]) 13890b661123Smrg 13900b661123Smrg# Determine commands to create old-style static archives. 13910b661123Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 13920b661123Smrgold_postinstall_cmds='chmod 644 $oldlib' 13930b661123Smrgold_postuninstall_cmds= 139472313efbSmrg 13950b661123Smrgif test -n "$RANLIB"; then 13960b661123Smrg case $host_os in 13970b661123Smrg openbsd*) 13980b661123Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 13990b661123Smrg ;; 14000b661123Smrg *) 14010b661123Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 14020b661123Smrg ;; 14030b661123Smrg esac 14040b661123Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 14050b661123Smrgfi 14060b661123Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 14070b661123Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 14080b661123Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 14090b661123Smrg [Commands used to build an old-style archive]) 14100b661123Smrg])# _LT_CMD_OLD_ARCHIVE 1411bdcaa8d0Smrg 1412bdcaa8d0Smrg 14130b661123Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 141472313efbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 141572313efbSmrg# ---------------------------------------------------------------- 141672313efbSmrg# Check whether the given compiler option works 14170b661123SmrgAC_DEFUN([_LT_COMPILER_OPTION], 14180b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14190b661123Smrgm4_require([_LT_DECL_SED])dnl 142072313efbSmrgAC_CACHE_CHECK([$1], [$2], 142172313efbSmrg [$2=no 14220b661123Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 142372313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 142472313efbSmrg lt_compiler_flag="$3" 142572313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 142672313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 142772313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 142872313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 142972313efbSmrg # The option is referenced via a variable to avoid confusing sed. 143072313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 143172313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 143272313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 143372313efbSmrg -e 's:$: $lt_compiler_flag:'` 143472313efbSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 143572313efbSmrg (eval "$lt_compile" 2>conftest.err) 143672313efbSmrg ac_status=$? 143772313efbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 143872313efbSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 143972313efbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 144072313efbSmrg # The compiler can only warn and ignore the option if not recognized 144172313efbSmrg # So say no if there are warnings other than the usual output. 14420b661123Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 144372313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 144472313efbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 144572313efbSmrg $2=yes 144672313efbSmrg fi 144772313efbSmrg fi 14480b661123Smrg $RM conftest* 144972313efbSmrg]) 1450bdcaa8d0Smrg 145172313efbSmrgif test x"[$]$2" = xyes; then 14520b661123Smrg m4_if([$5], , :, [$5]) 145372313efbSmrgelse 14540b661123Smrg m4_if([$6], , :, [$6]) 145572313efbSmrgfi 14560b661123Smrg])# _LT_COMPILER_OPTION 145772313efbSmrg 14580b661123Smrg# Old name: 14590b661123SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 14600b661123Smrgdnl aclocal-1.4 backwards compatibility: 14610b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 146272313efbSmrg 14630b661123Smrg 14640b661123Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14650b661123Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 14660b661123Smrg# ---------------------------------------------------- 14670b661123Smrg# Check whether the given linker option works 14680b661123SmrgAC_DEFUN([_LT_LINKER_OPTION], 14690b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14700b661123Smrgm4_require([_LT_DECL_SED])dnl 147172313efbSmrgAC_CACHE_CHECK([$1], [$2], 147272313efbSmrg [$2=no 147372313efbSmrg save_LDFLAGS="$LDFLAGS" 147472313efbSmrg LDFLAGS="$LDFLAGS $3" 147572313efbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 147672313efbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 147772313efbSmrg # The linker can only warn and ignore the option if not recognized 147872313efbSmrg # So say no if there are warnings 147972313efbSmrg if test -s conftest.err; then 148072313efbSmrg # Append any errors to the config.log. 148172313efbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 14820b661123Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 148372313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 148472313efbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 148572313efbSmrg $2=yes 148672313efbSmrg fi 148772313efbSmrg else 148872313efbSmrg $2=yes 148972313efbSmrg fi 149072313efbSmrg fi 14910b661123Smrg $RM -r conftest* 149272313efbSmrg LDFLAGS="$save_LDFLAGS" 149372313efbSmrg]) 149472313efbSmrg 149572313efbSmrgif test x"[$]$2" = xyes; then 14960b661123Smrg m4_if([$4], , :, [$4]) 149772313efbSmrgelse 14980b661123Smrg m4_if([$5], , :, [$5]) 149972313efbSmrgfi 15000b661123Smrg])# _LT_LINKER_OPTION 150172313efbSmrg 15020b661123Smrg# Old name: 15030b661123SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 15040b661123Smrgdnl aclocal-1.4 backwards compatibility: 15050b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 150672313efbSmrg 15070b661123Smrg 15080b661123Smrg# LT_CMD_MAX_LEN 15090b661123Smrg#--------------- 15100b661123SmrgAC_DEFUN([LT_CMD_MAX_LEN], 15110b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15120b661123Smrg# find the maximum length of command line arguments 151372313efbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 151472313efbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 151572313efbSmrg i=0 151672313efbSmrg teststring="ABCD" 151772313efbSmrg 151872313efbSmrg case $build_os in 151972313efbSmrg msdosdjgpp*) 152072313efbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 152172313efbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 152272313efbSmrg # during glob expansion). Even if it were fixed, the result of this 152372313efbSmrg # check would be larger than it should be. 152472313efbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525bdcaa8d0Smrg ;; 152672313efbSmrg 152772313efbSmrg gnu*) 152872313efbSmrg # Under GNU Hurd, this test is not required because there is 152972313efbSmrg # no limit to the length of command line arguments. 153072313efbSmrg # Libtool will interpret -1 as no limit whatsoever 153172313efbSmrg lt_cv_sys_max_cmd_len=-1; 1532bdcaa8d0Smrg ;; 153372313efbSmrg 15340b661123Smrg cygwin* | mingw* | cegcc*) 153572313efbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 153672313efbSmrg # about 5 minutes as the teststring grows exponentially. 153772313efbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 153872313efbSmrg # you end up with a "frozen" computer, even though with patience 153972313efbSmrg # the test eventually succeeds (with a max line length of 256k). 154072313efbSmrg # Instead, let's just punt: use the minimum linelength reported by 154172313efbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 154272313efbSmrg lt_cv_sys_max_cmd_len=8192; 1543bdcaa8d0Smrg ;; 1544bdcaa8d0Smrg 154572313efbSmrg amigaos*) 154672313efbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 154772313efbSmrg # So we just punt and use a minimum line length of 8192. 154872313efbSmrg lt_cv_sys_max_cmd_len=8192; 154972313efbSmrg ;; 1550bdcaa8d0Smrg 155172313efbSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 155272313efbSmrg # This has been around since 386BSD, at least. Likely further. 155372313efbSmrg if test -x /sbin/sysctl; then 155472313efbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 155572313efbSmrg elif test -x /usr/sbin/sysctl; then 155672313efbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557bdcaa8d0Smrg else 155872313efbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559bdcaa8d0Smrg fi 156072313efbSmrg # And add a safety zone 156172313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 156272313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563bdcaa8d0Smrg ;; 1564bdcaa8d0Smrg 156572313efbSmrg interix*) 156672313efbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 156772313efbSmrg lt_cv_sys_max_cmd_len=196608 156872313efbSmrg ;; 1569bdcaa8d0Smrg 157072313efbSmrg osf*) 157172313efbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 157272313efbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 157372313efbSmrg # nice to cause kernel panics so lets avoid the loop below. 157472313efbSmrg # First set a reasonable default. 157572313efbSmrg lt_cv_sys_max_cmd_len=16384 157672313efbSmrg # 157772313efbSmrg if test -x /sbin/sysconfig; then 157872313efbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 157972313efbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 158072313efbSmrg esac 158172313efbSmrg fi 158272313efbSmrg ;; 158372313efbSmrg sco3.2v5*) 158472313efbSmrg lt_cv_sys_max_cmd_len=102400 158572313efbSmrg ;; 158672313efbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 158772313efbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 158872313efbSmrg if test -n "$kargmax"; then 15890b661123Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 159072313efbSmrg else 159172313efbSmrg lt_cv_sys_max_cmd_len=32768 159272313efbSmrg fi 1593bdcaa8d0Smrg ;; 1594bdcaa8d0Smrg *) 159572313efbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 159672313efbSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 159772313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 159872313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 159972313efbSmrg else 16000b661123Smrg # Make teststring a little bigger before we do anything with it. 16010b661123Smrg # a 1K string should be a reasonable start. 16020b661123Smrg for i in 1 2 3 4 5 6 7 8 ; do 16030b661123Smrg teststring=$teststring$teststring 16040b661123Smrg done 160572313efbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 16060b661123Smrg # If test is not a shell built-in, we'll probably end up computing a 16070b661123Smrg # maximum length that is only half of the actual maximum length, but 16080b661123Smrg # we can't tell. 16090b661123Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 16100b661123Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 161172313efbSmrg test $i != 17 # 1/2 MB should be enough 161272313efbSmrg do 161372313efbSmrg i=`expr $i + 1` 161472313efbSmrg teststring=$teststring$teststring 161572313efbSmrg done 16160b661123Smrg # Only check the string length outside the loop. 16170b661123Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 161872313efbSmrg teststring= 16190b661123Smrg # Add a significant safety factor because C++ compilers can tack on 16200b661123Smrg # massive amounts of additional arguments before passing them to the 16210b661123Smrg # linker. It appears as though 1/2 is a usable value. 162272313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 162372313efbSmrg fi 1624bdcaa8d0Smrg ;; 1625bdcaa8d0Smrg esac 162672313efbSmrg]) 162772313efbSmrgif test -n $lt_cv_sys_max_cmd_len ; then 162872313efbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 162972313efbSmrgelse 163072313efbSmrg AC_MSG_RESULT(none) 163172313efbSmrgfi 16320b661123Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 16330b661123Smrg_LT_DECL([], [max_cmd_len], [0], 16340b661123Smrg [What is the maximum length of a command?]) 16350b661123Smrg])# LT_CMD_MAX_LEN 1636bdcaa8d0Smrg 16370b661123Smrg# Old name: 16380b661123SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 16390b661123Smrgdnl aclocal-1.4 backwards compatibility: 16400b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641bdcaa8d0Smrg 16420b661123Smrg 16430b661123Smrg# _LT_HEADER_DLFCN 16440b661123Smrg# ---------------- 16450b661123Smrgm4_defun([_LT_HEADER_DLFCN], 16460b661123Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 16470b661123Smrg])# _LT_HEADER_DLFCN 1648bdcaa8d0Smrg 1649bdcaa8d0Smrg 16500b661123Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 16510b661123Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 16520b661123Smrg# ---------------------------------------------------------------- 16530b661123Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 16540b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 165572313efbSmrgif test "$cross_compiling" = yes; then : 165672313efbSmrg [$4] 165772313efbSmrgelse 165872313efbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 165972313efbSmrg lt_status=$lt_dlunknown 16600b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 166172313efbSmrg[#line __oline__ "configure" 166272313efbSmrg#include "confdefs.h" 1663bdcaa8d0Smrg 166472313efbSmrg#if HAVE_DLFCN_H 166572313efbSmrg#include <dlfcn.h> 166672313efbSmrg#endif 1667bdcaa8d0Smrg 166872313efbSmrg#include <stdio.h> 1669bdcaa8d0Smrg 167072313efbSmrg#ifdef RTLD_GLOBAL 167172313efbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 167272313efbSmrg#else 167372313efbSmrg# ifdef DL_GLOBAL 167472313efbSmrg# define LT_DLGLOBAL DL_GLOBAL 167572313efbSmrg# else 167672313efbSmrg# define LT_DLGLOBAL 0 167772313efbSmrg# endif 167872313efbSmrg#endif 1679bdcaa8d0Smrg 168072313efbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 168172313efbSmrg find out it does not work in some platform. */ 168272313efbSmrg#ifndef LT_DLLAZY_OR_NOW 168372313efbSmrg# ifdef RTLD_LAZY 168472313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 168572313efbSmrg# else 168672313efbSmrg# ifdef DL_LAZY 168772313efbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 168872313efbSmrg# else 168972313efbSmrg# ifdef RTLD_NOW 169072313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 169172313efbSmrg# else 169272313efbSmrg# ifdef DL_NOW 169372313efbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 169472313efbSmrg# else 169572313efbSmrg# define LT_DLLAZY_OR_NOW 0 169672313efbSmrg# endif 169772313efbSmrg# endif 169872313efbSmrg# endif 169972313efbSmrg# endif 170072313efbSmrg#endif 170172313efbSmrg 170272313efbSmrgvoid fnord() { int i=42;} 170372313efbSmrgint main () 170472313efbSmrg{ 170572313efbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 170672313efbSmrg int status = $lt_dlunknown; 170772313efbSmrg 170872313efbSmrg if (self) 170972313efbSmrg { 171072313efbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 171172313efbSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 171272313efbSmrg /* dlclose (self); */ 171372313efbSmrg } 1714bdcaa8d0Smrg else 171572313efbSmrg puts (dlerror ()); 171672313efbSmrg 17170b661123Smrg return status; 171872313efbSmrg}] 17190b661123Smrg_LT_EOF 172072313efbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 172172313efbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 172272313efbSmrg lt_status=$? 172372313efbSmrg case x$lt_status in 172472313efbSmrg x$lt_dlno_uscore) $1 ;; 172572313efbSmrg x$lt_dlneed_uscore) $2 ;; 172672313efbSmrg x$lt_dlunknown|x*) $3 ;; 172772313efbSmrg esac 172872313efbSmrg else : 172972313efbSmrg # compilation failed 173072313efbSmrg $3 1731bdcaa8d0Smrg fi 173272313efbSmrgfi 173372313efbSmrgrm -fr conftest* 17340b661123Smrg])# _LT_TRY_DLOPEN_SELF 1735bdcaa8d0Smrg 1736bdcaa8d0Smrg 17370b661123Smrg# LT_SYS_DLOPEN_SELF 17380b661123Smrg# ------------------ 17390b661123SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 17400b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 174172313efbSmrgif test "x$enable_dlopen" != xyes; then 174272313efbSmrg enable_dlopen=unknown 174372313efbSmrg enable_dlopen_self=unknown 174472313efbSmrg enable_dlopen_self_static=unknown 174572313efbSmrgelse 174672313efbSmrg lt_cv_dlopen=no 174772313efbSmrg lt_cv_dlopen_libs= 1748bdcaa8d0Smrg 174972313efbSmrg case $host_os in 175072313efbSmrg beos*) 175172313efbSmrg lt_cv_dlopen="load_add_on" 175272313efbSmrg lt_cv_dlopen_libs= 175372313efbSmrg lt_cv_dlopen_self=yes 175472313efbSmrg ;; 1755bdcaa8d0Smrg 17560b661123Smrg mingw* | pw32* | cegcc*) 175772313efbSmrg lt_cv_dlopen="LoadLibrary" 175872313efbSmrg lt_cv_dlopen_libs= 17590b661123Smrg ;; 1760bdcaa8d0Smrg 176172313efbSmrg cygwin*) 176272313efbSmrg lt_cv_dlopen="dlopen" 176372313efbSmrg lt_cv_dlopen_libs= 17640b661123Smrg ;; 1765bdcaa8d0Smrg 176672313efbSmrg darwin*) 176772313efbSmrg # if libdl is installed we need to link against it 176872313efbSmrg AC_CHECK_LIB([dl], [dlopen], 176972313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 177072313efbSmrg lt_cv_dlopen="dyld" 177172313efbSmrg lt_cv_dlopen_libs= 177272313efbSmrg lt_cv_dlopen_self=yes 177372313efbSmrg ]) 17740b661123Smrg ;; 1775bdcaa8d0Smrg 177672313efbSmrg *) 177772313efbSmrg AC_CHECK_FUNC([shl_load], 177872313efbSmrg [lt_cv_dlopen="shl_load"], 177972313efbSmrg [AC_CHECK_LIB([dld], [shl_load], 178072313efbSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 178172313efbSmrg [AC_CHECK_FUNC([dlopen], 178272313efbSmrg [lt_cv_dlopen="dlopen"], 178372313efbSmrg [AC_CHECK_LIB([dl], [dlopen], 178472313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 178572313efbSmrg [AC_CHECK_LIB([svld], [dlopen], 178672313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 178772313efbSmrg [AC_CHECK_LIB([dld], [dld_link], 178872313efbSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 178972313efbSmrg ]) 179072313efbSmrg ]) 179172313efbSmrg ]) 179272313efbSmrg ]) 179372313efbSmrg ]) 179472313efbSmrg ;; 179572313efbSmrg esac 179672313efbSmrg 179772313efbSmrg if test "x$lt_cv_dlopen" != xno; then 179872313efbSmrg enable_dlopen=yes 1799bdcaa8d0Smrg else 180072313efbSmrg enable_dlopen=no 1801bdcaa8d0Smrg fi 1802bdcaa8d0Smrg 180372313efbSmrg case $lt_cv_dlopen in 180472313efbSmrg dlopen) 180572313efbSmrg save_CPPFLAGS="$CPPFLAGS" 180672313efbSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807bdcaa8d0Smrg 180872313efbSmrg save_LDFLAGS="$LDFLAGS" 180972313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810bdcaa8d0Smrg 181172313efbSmrg save_LIBS="$LIBS" 181272313efbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813bdcaa8d0Smrg 181472313efbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 181572313efbSmrg lt_cv_dlopen_self, [dnl 18160b661123Smrg _LT_TRY_DLOPEN_SELF( 181772313efbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 181872313efbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 181972313efbSmrg ]) 1820bdcaa8d0Smrg 182172313efbSmrg if test "x$lt_cv_dlopen_self" = xyes; then 182272313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 182372313efbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 18240b661123Smrg lt_cv_dlopen_self_static, [dnl 18250b661123Smrg _LT_TRY_DLOPEN_SELF( 182672313efbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 182772313efbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 182872313efbSmrg ]) 1829bdcaa8d0Smrg fi 1830bdcaa8d0Smrg 183172313efbSmrg CPPFLAGS="$save_CPPFLAGS" 183272313efbSmrg LDFLAGS="$save_LDFLAGS" 183372313efbSmrg LIBS="$save_LIBS" 183472313efbSmrg ;; 183572313efbSmrg esac 1836bdcaa8d0Smrg 183772313efbSmrg case $lt_cv_dlopen_self in 183872313efbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 183972313efbSmrg *) enable_dlopen_self=unknown ;; 184072313efbSmrg esac 1841bdcaa8d0Smrg 184272313efbSmrg case $lt_cv_dlopen_self_static in 184372313efbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 184472313efbSmrg *) enable_dlopen_self_static=unknown ;; 184572313efbSmrg esac 1846bdcaa8d0Smrgfi 18470b661123Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 18480b661123Smrg [Whether dlopen is supported]) 18490b661123Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 18500b661123Smrg [Whether dlopen of programs is supported]) 18510b661123Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 18520b661123Smrg [Whether dlopen of statically linked programs is supported]) 18530b661123Smrg])# LT_SYS_DLOPEN_SELF 1854bdcaa8d0Smrg 18550b661123Smrg# Old name: 18560b661123SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 18570b661123Smrgdnl aclocal-1.4 backwards compatibility: 18580b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859bdcaa8d0Smrg 18600b661123Smrg 18610b661123Smrg# _LT_COMPILER_C_O([TAGNAME]) 18620b661123Smrg# --------------------------- 18630b661123Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 18640b661123Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 18650b661123Smrgm4_defun([_LT_COMPILER_C_O], 18660b661123Smrg[m4_require([_LT_DECL_SED])dnl 18670b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18680b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 186972313efbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 18700b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 18710b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 18720b661123Smrg $RM -r conftest 2>/dev/null 187372313efbSmrg mkdir conftest 187472313efbSmrg cd conftest 187572313efbSmrg mkdir out 187672313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877bdcaa8d0Smrg 187872313efbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 187972313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 188072313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 188172313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 188272313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 188372313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 188472313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 188572313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 188672313efbSmrg -e 's:$: $lt_compiler_flag:'` 188772313efbSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 188872313efbSmrg (eval "$lt_compile" 2>out/conftest.err) 188972313efbSmrg ac_status=$? 189072313efbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 189172313efbSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 189272313efbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 189372313efbSmrg then 189472313efbSmrg # The compiler can only warn and ignore the option if not recognized 189572313efbSmrg # So say no if there are warnings 18960b661123Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 189772313efbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 189872313efbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 18990b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 190072313efbSmrg fi 190172313efbSmrg fi 190272313efbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 19030b661123Smrg $RM conftest* 190472313efbSmrg # SGI C++ compiler will create directory out/ii_files/ for 190572313efbSmrg # template instantiation 19060b661123Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 19070b661123Smrg $RM out/* && rmdir out 190872313efbSmrg cd .. 19090b661123Smrg $RM -r conftest 19100b661123Smrg $RM conftest* 191172313efbSmrg]) 19120b661123Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 19130b661123Smrg [Does compiler simultaneously support -c and -o options?]) 19140b661123Smrg])# _LT_COMPILER_C_O 1915bdcaa8d0Smrg 1916bdcaa8d0Smrg 19170b661123Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 19180b661123Smrg# ---------------------------------- 191972313efbSmrg# Check to see if we can do hard links to lock some files if needed 19200b661123Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 19210b661123Smrg[m4_require([_LT_ENABLE_LOCK])dnl 19220b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19230b661123Smrg_LT_COMPILER_C_O([$1]) 1924bdcaa8d0Smrg 192572313efbSmrghard_links="nottested" 19260b661123Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 192772313efbSmrg # do not overwrite the value of need_locks provided by the user 192872313efbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 192972313efbSmrg hard_links=yes 19300b661123Smrg $RM conftest* 193172313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193272313efbSmrg touch conftest.a 193372313efbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 193472313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193572313efbSmrg AC_MSG_RESULT([$hard_links]) 193672313efbSmrg if test "$hard_links" = no; then 193772313efbSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 193872313efbSmrg need_locks=warn 193972313efbSmrg fi 194072313efbSmrgelse 194172313efbSmrg need_locks=no 194272313efbSmrgfi 19430b661123Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 19440b661123Smrg])# _LT_COMPILER_FILE_LOCKS 1945bdcaa8d0Smrg 1946bdcaa8d0Smrg 19470b661123Smrg# _LT_CHECK_OBJDIR 19480b661123Smrg# ---------------- 19490b661123Smrgm4_defun([_LT_CHECK_OBJDIR], 195072313efbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 195172313efbSmrg[rm -f .libs 2>/dev/null 195272313efbSmrgmkdir .libs 2>/dev/null 195372313efbSmrgif test -d .libs; then 195472313efbSmrg lt_cv_objdir=.libs 195572313efbSmrgelse 195672313efbSmrg # MS-DOS does not allow filenames that begin with a dot. 195772313efbSmrg lt_cv_objdir=_libs 195872313efbSmrgfi 195972313efbSmrgrmdir .libs 2>/dev/null]) 196072313efbSmrgobjdir=$lt_cv_objdir 19610b661123Smrg_LT_DECL([], [objdir], [0], 19620b661123Smrg [The name of the directory that contains temporary libtool files])dnl 19630b661123Smrgm4_pattern_allow([LT_OBJDIR])dnl 19640b661123SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 19650b661123Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 19660b661123Smrg])# _LT_CHECK_OBJDIR 1967bdcaa8d0Smrg 1968bdcaa8d0Smrg 19690b661123Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 19700b661123Smrg# -------------------------------------- 197172313efbSmrg# Check hardcoding attributes. 19720b661123Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 197372313efbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 19740b661123Smrg_LT_TAGVAR(hardcode_action, $1)= 19750b661123Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 19760b661123Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 19770b661123Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978bdcaa8d0Smrg 19790b661123Smrg # We can hardcode non-existent directories. 19800b661123Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 198172313efbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 198272313efbSmrg # have to relink, otherwise we might link with an installed library 198372313efbSmrg # when we should be linking with a yet-to-be-installed one 19840b661123Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 19850b661123Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 198672313efbSmrg # Linking always hardcodes the temporary library directory. 19870b661123Smrg _LT_TAGVAR(hardcode_action, $1)=relink 198872313efbSmrg else 198972313efbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 19900b661123Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 199172313efbSmrg fi 199272313efbSmrgelse 199372313efbSmrg # We cannot hardcode anything, or else we can only hardcode existing 199472313efbSmrg # directories. 19950b661123Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 199672313efbSmrgfi 19970b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998bdcaa8d0Smrg 19990b661123Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 20000b661123Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 200172313efbSmrg # Fast installation is not supported 200272313efbSmrg enable_fast_install=no 200372313efbSmrgelif test "$shlibpath_overrides_runpath" = yes || 200472313efbSmrg test "$enable_shared" = no; then 200572313efbSmrg # Fast installation is not necessary 200672313efbSmrg enable_fast_install=needless 200772313efbSmrgfi 20080b661123Smrg_LT_TAGDECL([], [hardcode_action], [0], 20090b661123Smrg [How to hardcode a shared library path into an executable]) 20100b661123Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2011bdcaa8d0Smrg 2012bdcaa8d0Smrg 20130b661123Smrg# _LT_CMD_STRIPLIB 20140b661123Smrg# ---------------- 20150b661123Smrgm4_defun([_LT_CMD_STRIPLIB], 20160b661123Smrg[m4_require([_LT_DECL_EGREP]) 20170b661123Smrgstriplib= 201872313efbSmrgold_striplib= 201972313efbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 20200b661123Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 202172313efbSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 202272313efbSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 202372313efbSmrg AC_MSG_RESULT([yes]) 202472313efbSmrgelse 202572313efbSmrg# FIXME - insert some real tests, host_os isn't really good enough 202672313efbSmrg case $host_os in 20270b661123Smrg darwin*) 20280b661123Smrg if test -n "$STRIP" ; then 20290b661123Smrg striplib="$STRIP -x" 20300b661123Smrg old_striplib="$STRIP -S" 20310b661123Smrg AC_MSG_RESULT([yes]) 20320b661123Smrg else 20330b661123Smrg AC_MSG_RESULT([no]) 20340b661123Smrg fi 20350b661123Smrg ;; 20360b661123Smrg *) 20370b661123Smrg AC_MSG_RESULT([no]) 203872313efbSmrg ;; 203972313efbSmrg esac 204072313efbSmrgfi 20410b661123Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 20420b661123Smrg_LT_DECL([], [striplib], [1]) 20430b661123Smrg])# _LT_CMD_STRIPLIB 2044bdcaa8d0Smrg 2045bdcaa8d0Smrg 20460b661123Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 204772313efbSmrg# ----------------------------- 204872313efbSmrg# PORTME Fill in your ld.so characteristics 20490b661123Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 20500b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 20510b661123Smrgm4_require([_LT_DECL_EGREP])dnl 20520b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20530b661123Smrgm4_require([_LT_DECL_OBJDUMP])dnl 20540b661123Smrgm4_require([_LT_DECL_SED])dnl 205572313efbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 20560b661123Smrgm4_if([$1], 20570b661123Smrg [], [ 205872313efbSmrgif test "$GCC" = yes; then 205972313efbSmrg case $host_os in 206072313efbSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 206172313efbSmrg *) lt_awk_arg="/^libraries:/" ;; 206272313efbSmrg esac 206372313efbSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 20640b661123Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 206572313efbSmrg # if the path contains ";" then we assume it to be the separator 206672313efbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 206772313efbSmrg # assumed that no part of a normal pathname contains ";" but that should 206872313efbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 20690b661123Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 207072313efbSmrg else 20710b661123Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 207272313efbSmrg fi 207372313efbSmrg # Ok, now we have the path, separated by spaces, we can step through it 207472313efbSmrg # and add multilib dir if necessary. 207572313efbSmrg lt_tmp_lt_search_path_spec= 207672313efbSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 207772313efbSmrg for lt_sys_path in $lt_search_path_spec; do 207872313efbSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 207972313efbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 208072313efbSmrg else 208172313efbSmrg test -d "$lt_sys_path" && \ 208272313efbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2083bdcaa8d0Smrg fi 2084bdcaa8d0Smrg done 20850b661123Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 208672313efbSmrgBEGIN {RS=" "; FS="/|\n";} { 208772313efbSmrg lt_foo=""; 208872313efbSmrg lt_count=0; 208972313efbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 209072313efbSmrg if ($lt_i != "" && $lt_i != ".") { 209172313efbSmrg if ($lt_i == "..") { 209272313efbSmrg lt_count++; 209372313efbSmrg } else { 209472313efbSmrg if (lt_count == 0) { 209572313efbSmrg lt_foo="/" $lt_i lt_foo; 209672313efbSmrg } else { 209772313efbSmrg lt_count--; 209872313efbSmrg } 209972313efbSmrg } 210072313efbSmrg } 210172313efbSmrg } 210272313efbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 210372313efbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 210472313efbSmrg}'` 21050b661123Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106bdcaa8d0Smrgelse 210772313efbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 210872313efbSmrgfi]) 21090b661123Smrglibrary_names_spec= 21100b661123Smrglibname_spec='lib$name' 21110b661123Smrgsoname_spec= 21120b661123Smrgshrext_cmds=".so" 21130b661123Smrgpostinstall_cmds= 21140b661123Smrgpostuninstall_cmds= 21150b661123Smrgfinish_cmds= 21160b661123Smrgfinish_eval= 21170b661123Smrgshlibpath_var= 21180b661123Smrgshlibpath_overrides_runpath=unknown 21190b661123Smrgversion_type=none 21200b661123Smrgdynamic_linker="$host_os ld.so" 21210b661123Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 212272313efbSmrgneed_lib_prefix=unknown 212372313efbSmrghardcode_into_libs=no 2124bdcaa8d0Smrg 212572313efbSmrg# when you set need_version to no, make sure it does not cause -set_version 212672313efbSmrg# flags to be left without arguments 212772313efbSmrgneed_version=unknown 2128bdcaa8d0Smrg 212972313efbSmrgcase $host_os in 213072313efbSmrgaix3*) 213172313efbSmrg version_type=linux 213272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 213372313efbSmrg shlibpath_var=LIBPATH 2134bdcaa8d0Smrg 213572313efbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 213672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 213772313efbSmrg ;; 2138bdcaa8d0Smrg 213972313efbSmrgaix[[4-9]]*) 214072313efbSmrg version_type=linux 214172313efbSmrg need_lib_prefix=no 214272313efbSmrg need_version=no 214372313efbSmrg hardcode_into_libs=yes 214472313efbSmrg if test "$host_cpu" = ia64; then 214572313efbSmrg # AIX 5 supports IA64 214672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 214772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 214872313efbSmrg else 214972313efbSmrg # With GCC up to 2.95.x, collect2 would create an import file 215072313efbSmrg # for dependence libraries. The import file would start with 215172313efbSmrg # the line `#! .'. This would cause the generated library to 215272313efbSmrg # depend on `.', always an invalid library. This was fixed in 215372313efbSmrg # development snapshots of GCC prior to 3.0. 215472313efbSmrg case $host_os in 215572313efbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 215672313efbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 215772313efbSmrg echo ' yes ' 21580b661123Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 215972313efbSmrg : 216072313efbSmrg else 216172313efbSmrg can_build_shared=no 216272313efbSmrg fi 2163bdcaa8d0Smrg ;; 216472313efbSmrg esac 216572313efbSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 216672313efbSmrg # soname into executable. Probably we can add versioning support to 216772313efbSmrg # collect2, so additional links can be useful in future. 216872313efbSmrg if test "$aix_use_runtimelinking" = yes; then 216972313efbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 217072313efbSmrg # instead of lib<name>.a to let people know that these are not 217172313efbSmrg # typical AIX shared libraries. 217272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 217372313efbSmrg else 217472313efbSmrg # We preserve .a as extension for shared libraries through AIX4.2 217572313efbSmrg # and later when we are not doing run time linking. 217672313efbSmrg library_names_spec='${libname}${release}.a $libname.a' 217772313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2178bdcaa8d0Smrg fi 217972313efbSmrg shlibpath_var=LIBPATH 218072313efbSmrg fi 2181bdcaa8d0Smrg ;; 2182bdcaa8d0Smrg 218372313efbSmrgamigaos*) 21840b661123Smrg case $host_cpu in 21850b661123Smrg powerpc) 21860b661123Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 21870b661123Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 21880b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21890b661123Smrg ;; 21900b661123Smrg m68k) 21910b661123Smrg library_names_spec='$libname.ixlibrary $libname.a' 21920b661123Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 21930b661123Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 21940b661123Smrg ;; 21950b661123Smrg esac 2196bdcaa8d0Smrg ;; 2197bdcaa8d0Smrg 2198bdcaa8d0Smrgbeos*) 219972313efbSmrg library_names_spec='${libname}${shared_ext}' 220072313efbSmrg dynamic_linker="$host_os ld.so" 220172313efbSmrg shlibpath_var=LIBRARY_PATH 2202bdcaa8d0Smrg ;; 2203bdcaa8d0Smrg 2204bdcaa8d0Smrgbsdi[[45]]*) 220572313efbSmrg version_type=linux 220672313efbSmrg need_version=no 220772313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 220872313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 220972313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 221072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 221172313efbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 221272313efbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 221372313efbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 221472313efbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 221572313efbSmrg # libtool to hard-code these into programs 2216bdcaa8d0Smrg ;; 2217bdcaa8d0Smrg 22180b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 221972313efbSmrg version_type=windows 222072313efbSmrg shrext_cmds=".dll" 222172313efbSmrg need_version=no 222272313efbSmrg need_lib_prefix=no 2223bdcaa8d0Smrg 222472313efbSmrg case $GCC,$host_os in 22250b661123Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 222672313efbSmrg library_names_spec='$libname.dll.a' 222772313efbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 222872313efbSmrg postinstall_cmds='base_file=`basename \${file}`~ 22290b661123Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 223072313efbSmrg dldir=$destdir/`dirname \$dlpath`~ 223172313efbSmrg test -d \$dldir || mkdir -p \$dldir~ 223272313efbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 22330b661123Smrg chmod a+x \$dldir/$dlname~ 22340b661123Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 22350b661123Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 22360b661123Smrg fi' 223772313efbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 223872313efbSmrg dlpath=$dir/\$dldll~ 22390b661123Smrg $RM \$dlpath' 224072313efbSmrg shlibpath_overrides_runpath=yes 2241bdcaa8d0Smrg 224272313efbSmrg case $host_os in 224372313efbSmrg cygwin*) 224472313efbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 224572313efbSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 224672313efbSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 224772313efbSmrg ;; 22480b661123Smrg mingw* | cegcc*) 224972313efbSmrg # MinGW DLLs use traditional 'lib' prefix 225072313efbSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22510b661123Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 22520b661123Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 225372313efbSmrg # It is most probably a Windows format PATH printed by 225472313efbSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 225572313efbSmrg # path with ; separators, and with drive letters. We can handle the 225672313efbSmrg # drive letters (cygwin fileutils understands them), so leave them, 225772313efbSmrg # especially as we might pass files found there to a mingw objdump, 225872313efbSmrg # which wouldn't understand a cygwinified path. Ahh. 22590b661123Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 226072313efbSmrg else 22610b661123Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 226272313efbSmrg fi 226372313efbSmrg ;; 226472313efbSmrg pw32*) 226572313efbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 226672313efbSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267bdcaa8d0Smrg ;; 2268bdcaa8d0Smrg esac 2269bdcaa8d0Smrg ;; 227072313efbSmrg 2271bdcaa8d0Smrg *) 227272313efbSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273bdcaa8d0Smrg ;; 2274bdcaa8d0Smrg esac 227572313efbSmrg dynamic_linker='Win32 ld.exe' 227672313efbSmrg # FIXME: first we should search . and the directory the executable is in 227772313efbSmrg shlibpath_var=PATH 2278bdcaa8d0Smrg ;; 2279bdcaa8d0Smrg 228072313efbSmrgdarwin* | rhapsody*) 228172313efbSmrg dynamic_linker="$host_os dyld" 228272313efbSmrg version_type=darwin 228372313efbSmrg need_lib_prefix=no 228472313efbSmrg need_version=no 22850b661123Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 228672313efbSmrg soname_spec='${libname}${release}${major}$shared_ext' 228772313efbSmrg shlibpath_overrides_runpath=yes 228872313efbSmrg shlibpath_var=DYLD_LIBRARY_PATH 228972313efbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 22900b661123Smrgm4_if([$1], [],[ 22910b661123Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 229272313efbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293bdcaa8d0Smrg ;; 2294bdcaa8d0Smrg 229572313efbSmrgdgux*) 229672313efbSmrg version_type=linux 229772313efbSmrg need_lib_prefix=no 229872313efbSmrg need_version=no 229972313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 230072313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 230172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2302bdcaa8d0Smrg ;; 2303bdcaa8d0Smrg 230472313efbSmrgfreebsd1*) 230572313efbSmrg dynamic_linker=no 2306bdcaa8d0Smrg ;; 2307bdcaa8d0Smrg 230872313efbSmrgfreebsd* | dragonfly*) 230972313efbSmrg # DragonFly does not have aout. When/if they implement a new 231072313efbSmrg # versioning mechanism, adjust this. 231172313efbSmrg if test -x /usr/bin/objformat; then 231272313efbSmrg objformat=`/usr/bin/objformat` 2313bdcaa8d0Smrg else 231472313efbSmrg case $host_os in 231572313efbSmrg freebsd[[123]]*) objformat=aout ;; 231672313efbSmrg *) objformat=elf ;; 231772313efbSmrg esac 2318bdcaa8d0Smrg fi 231972313efbSmrg version_type=freebsd-$objformat 232072313efbSmrg case $version_type in 232172313efbSmrg freebsd-elf*) 232272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 232372313efbSmrg need_version=no 232472313efbSmrg need_lib_prefix=no 232572313efbSmrg ;; 232672313efbSmrg freebsd-*) 232772313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 232872313efbSmrg need_version=yes 232972313efbSmrg ;; 233072313efbSmrg esac 233172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 233272313efbSmrg case $host_os in 233372313efbSmrg freebsd2*) 233472313efbSmrg shlibpath_overrides_runpath=yes 233572313efbSmrg ;; 233672313efbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 233772313efbSmrg shlibpath_overrides_runpath=yes 233872313efbSmrg hardcode_into_libs=yes 233972313efbSmrg ;; 234072313efbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 234172313efbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 234272313efbSmrg shlibpath_overrides_runpath=no 234372313efbSmrg hardcode_into_libs=yes 234472313efbSmrg ;; 234572313efbSmrg *) # from 4.6 on, and DragonFly 234672313efbSmrg shlibpath_overrides_runpath=yes 234772313efbSmrg hardcode_into_libs=yes 234872313efbSmrg ;; 234972313efbSmrg esac 2350bdcaa8d0Smrg ;; 2351bdcaa8d0Smrg 235272313efbSmrggnu*) 235372313efbSmrg version_type=linux 235472313efbSmrg need_lib_prefix=no 235572313efbSmrg need_version=no 235672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 235772313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 235872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 235972313efbSmrg hardcode_into_libs=yes 2360bdcaa8d0Smrg ;; 2361bdcaa8d0Smrg 236272313efbSmrghpux9* | hpux10* | hpux11*) 236372313efbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 236472313efbSmrg # link against other versions. 236572313efbSmrg version_type=sunos 236672313efbSmrg need_lib_prefix=no 236772313efbSmrg need_version=no 236872313efbSmrg case $host_cpu in 236972313efbSmrg ia64*) 237072313efbSmrg shrext_cmds='.so' 237172313efbSmrg hardcode_into_libs=yes 237272313efbSmrg dynamic_linker="$host_os dld.so" 237372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 237472313efbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 237572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 237672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 237772313efbSmrg if test "X$HPUX_IA64_MODE" = X32; then 237872313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 237972313efbSmrg else 238072313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 238172313efbSmrg fi 238272313efbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383bdcaa8d0Smrg ;; 23840b661123Smrg hppa*64*) 23850b661123Smrg shrext_cmds='.sl' 23860b661123Smrg hardcode_into_libs=yes 23870b661123Smrg dynamic_linker="$host_os dld.sl" 23880b661123Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 23890b661123Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 23900b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23910b661123Smrg soname_spec='${libname}${release}${shared_ext}$major' 23920b661123Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 23930b661123Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 23940b661123Smrg ;; 23950b661123Smrg *) 239672313efbSmrg shrext_cmds='.sl' 239772313efbSmrg dynamic_linker="$host_os dld.sl" 239872313efbSmrg shlibpath_var=SHLIB_PATH 239972313efbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 240072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 240172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2402bdcaa8d0Smrg ;; 240372313efbSmrg esac 240472313efbSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 240572313efbSmrg postinstall_cmds='chmod 555 $lib' 240672313efbSmrg ;; 240772313efbSmrg 240872313efbSmrginterix[[3-9]]*) 240972313efbSmrg version_type=linux 241072313efbSmrg need_lib_prefix=no 241172313efbSmrg need_version=no 241272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 241372313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 241472313efbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 241572313efbSmrg shlibpath_var=LD_LIBRARY_PATH 241672313efbSmrg shlibpath_overrides_runpath=no 241772313efbSmrg hardcode_into_libs=yes 241872313efbSmrg ;; 241972313efbSmrg 242072313efbSmrgirix5* | irix6* | nonstopux*) 242172313efbSmrg case $host_os in 242272313efbSmrg nonstopux*) version_type=nonstopux ;; 242372313efbSmrg *) 242472313efbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 242572313efbSmrg version_type=linux 242672313efbSmrg else 242772313efbSmrg version_type=irix 242872313efbSmrg fi ;; 242972313efbSmrg esac 243072313efbSmrg need_lib_prefix=no 243172313efbSmrg need_version=no 243272313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 243372313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 243472313efbSmrg case $host_os in 243572313efbSmrg irix5* | nonstopux*) 243672313efbSmrg libsuff= shlibsuff= 2437bdcaa8d0Smrg ;; 243872313efbSmrg *) 243972313efbSmrg case $LD in # libtool.m4 will add one of these switches to LD 244072313efbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 244172313efbSmrg libsuff= shlibsuff= libmagic=32-bit;; 244272313efbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 244372313efbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 244472313efbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 244572313efbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 244672313efbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 244772313efbSmrg esac 2448bdcaa8d0Smrg ;; 2449bdcaa8d0Smrg esac 245072313efbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 245172313efbSmrg shlibpath_overrides_runpath=no 245272313efbSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 245372313efbSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 245472313efbSmrg hardcode_into_libs=yes 2455bdcaa8d0Smrg ;; 2456bdcaa8d0Smrg 245772313efbSmrg# No shared lib support for Linux oldld, aout, or coff. 245872313efbSmrglinux*oldld* | linux*aout* | linux*coff*) 245972313efbSmrg dynamic_linker=no 2460bdcaa8d0Smrg ;; 2461bdcaa8d0Smrg 246272313efbSmrg# This must be Linux ELF. 246372313efbSmrglinux* | k*bsd*-gnu) 246472313efbSmrg version_type=linux 246572313efbSmrg need_lib_prefix=no 246672313efbSmrg need_version=no 246772313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 246872313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 246972313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 247072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 247172313efbSmrg shlibpath_overrides_runpath=no 24720b661123Smrg # Some binutils ld are patched to set DT_RUNPATH 24730b661123Smrg save_LDFLAGS=$LDFLAGS 24740b661123Smrg save_libdir=$libdir 24750b661123Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 24760b661123Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 24770b661123Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 24780b661123Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 24790b661123Smrg [shlibpath_overrides_runpath=yes])]) 24800b661123Smrg LDFLAGS=$save_LDFLAGS 24810b661123Smrg libdir=$save_libdir 24820b661123Smrg 248372313efbSmrg # This implies no fast_install, which is unacceptable. 248472313efbSmrg # Some rework will be needed to allow for fast_install 248572313efbSmrg # before this can be enabled. 248672313efbSmrg hardcode_into_libs=yes 24870b661123Smrg 24880b661123Smrg # Add ABI-specific directories to the system library path. 24890b661123Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 249066c2ea32Smrg 249172313efbSmrg # Append ld.so.conf contents to the search path 249272313efbSmrg if test -f /etc/ld.so.conf; then 24930b661123Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 249466c2ea32Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495bdcaa8d0Smrg fi 2496bdcaa8d0Smrg 249772313efbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 249872313efbSmrg # powerpc, because MkLinux only supported shared libraries with the 249972313efbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 250072313efbSmrg # most powerpc-linux boxes support dynamic linking these days and 250172313efbSmrg # people can always --disable-shared, the test was removed, and we 250272313efbSmrg # assume the GNU/Linux dynamic linker is in use. 250372313efbSmrg dynamic_linker='GNU/Linux ld.so' 2504bdcaa8d0Smrg ;; 250572313efbSmrg 250672313efbSmrgnetbsd*) 250772313efbSmrg version_type=sunos 250872313efbSmrg need_lib_prefix=no 250972313efbSmrg need_version=no 25100b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 251172313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 251272313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 251372313efbSmrg dynamic_linker='NetBSD (a.out) ld.so' 251472313efbSmrg else 251572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 251672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 251772313efbSmrg dynamic_linker='NetBSD ld.elf_so' 251872313efbSmrg fi 251972313efbSmrg shlibpath_var=LD_LIBRARY_PATH 252072313efbSmrg shlibpath_overrides_runpath=yes 252172313efbSmrg hardcode_into_libs=yes 2522bdcaa8d0Smrg ;; 252372313efbSmrg 252472313efbSmrgnewsos6) 252572313efbSmrg version_type=linux 252672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 252772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 252872313efbSmrg shlibpath_overrides_runpath=yes 2529bdcaa8d0Smrg ;; 2530bdcaa8d0Smrg 25310b661123Smrg*nto* | *qnx*) 25320b661123Smrg version_type=qnx 253372313efbSmrg need_lib_prefix=no 253472313efbSmrg need_version=no 253572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 253672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 253772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 25380b661123Smrg shlibpath_overrides_runpath=no 25390b661123Smrg hardcode_into_libs=yes 25400b661123Smrg dynamic_linker='ldqnx.so' 254172313efbSmrg ;; 2542bdcaa8d0Smrg 254372313efbSmrgopenbsd*) 254472313efbSmrg version_type=sunos 254572313efbSmrg sys_lib_dlsearch_path_spec="/usr/lib" 254672313efbSmrg need_lib_prefix=no 254772313efbSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 254872313efbSmrg case $host_os in 25490b661123Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 25500b661123Smrg *) need_version=no ;; 2551bdcaa8d0Smrg esac 255272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 255372313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 255472313efbSmrg shlibpath_var=LD_LIBRARY_PATH 25550b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 255672313efbSmrg case $host_os in 255772313efbSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 255872313efbSmrg shlibpath_overrides_runpath=no 255972313efbSmrg ;; 256072313efbSmrg *) 256172313efbSmrg shlibpath_overrides_runpath=yes 256272313efbSmrg ;; 256372313efbSmrg esac 2564bdcaa8d0Smrg else 256572313efbSmrg shlibpath_overrides_runpath=yes 2566bdcaa8d0Smrg fi 256772313efbSmrg ;; 2568bdcaa8d0Smrg 256972313efbSmrgos2*) 257072313efbSmrg libname_spec='$name' 257172313efbSmrg shrext_cmds=".dll" 257272313efbSmrg need_lib_prefix=no 257372313efbSmrg library_names_spec='$libname${shared_ext} $libname.a' 257472313efbSmrg dynamic_linker='OS/2 ld.exe' 257572313efbSmrg shlibpath_var=LIBPATH 257672313efbSmrg ;; 2577bdcaa8d0Smrg 257872313efbSmrgosf3* | osf4* | osf5*) 257972313efbSmrg version_type=osf 258072313efbSmrg need_lib_prefix=no 258172313efbSmrg need_version=no 258272313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 258372313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258472313efbSmrg shlibpath_var=LD_LIBRARY_PATH 258572313efbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 258672313efbSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 258772313efbSmrg ;; 2588bdcaa8d0Smrg 258972313efbSmrgrdos*) 259072313efbSmrg dynamic_linker=no 259172313efbSmrg ;; 2592bdcaa8d0Smrg 259372313efbSmrgsolaris*) 259472313efbSmrg version_type=linux 259572313efbSmrg need_lib_prefix=no 259672313efbSmrg need_version=no 259772313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259872313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 259972313efbSmrg shlibpath_var=LD_LIBRARY_PATH 260072313efbSmrg shlibpath_overrides_runpath=yes 260172313efbSmrg hardcode_into_libs=yes 260272313efbSmrg # ldd complains unless libraries are executable 260372313efbSmrg postinstall_cmds='chmod +x $lib' 260472313efbSmrg ;; 2605bdcaa8d0Smrg 260672313efbSmrgsunos4*) 260772313efbSmrg version_type=sunos 260872313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 260972313efbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 261072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 261172313efbSmrg shlibpath_overrides_runpath=yes 261272313efbSmrg if test "$with_gnu_ld" = yes; then 261372313efbSmrg need_lib_prefix=no 261472313efbSmrg fi 261572313efbSmrg need_version=yes 261672313efbSmrg ;; 2617bdcaa8d0Smrg 261872313efbSmrgsysv4 | sysv4.3*) 261972313efbSmrg version_type=linux 262072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 262172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 262272313efbSmrg shlibpath_var=LD_LIBRARY_PATH 262372313efbSmrg case $host_vendor in 262472313efbSmrg sni) 262572313efbSmrg shlibpath_overrides_runpath=no 262672313efbSmrg need_lib_prefix=no 262772313efbSmrg runpath_var=LD_RUN_PATH 262872313efbSmrg ;; 262972313efbSmrg siemens) 263072313efbSmrg need_lib_prefix=no 263172313efbSmrg ;; 263272313efbSmrg motorola) 263372313efbSmrg need_lib_prefix=no 263472313efbSmrg need_version=no 263572313efbSmrg shlibpath_overrides_runpath=no 263672313efbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 263772313efbSmrg ;; 263872313efbSmrg esac 263972313efbSmrg ;; 2640bdcaa8d0Smrg 264172313efbSmrgsysv4*MP*) 264272313efbSmrg if test -d /usr/nec ;then 264372313efbSmrg version_type=linux 264472313efbSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 264572313efbSmrg soname_spec='$libname${shared_ext}.$major' 264672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2647bdcaa8d0Smrg fi 2648bdcaa8d0Smrg ;; 2649bdcaa8d0Smrg 265072313efbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 265172313efbSmrg version_type=freebsd-elf 265272313efbSmrg need_lib_prefix=no 265372313efbSmrg need_version=no 265472313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 265572313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 265672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 26570b661123Smrg shlibpath_overrides_runpath=yes 265872313efbSmrg hardcode_into_libs=yes 265972313efbSmrg if test "$with_gnu_ld" = yes; then 266072313efbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 266172313efbSmrg else 266272313efbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 266372313efbSmrg case $host_os in 266472313efbSmrg sco3.2v5*) 266572313efbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 266672313efbSmrg ;; 266772313efbSmrg esac 2668bdcaa8d0Smrg fi 266972313efbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 267072313efbSmrg ;; 2671bdcaa8d0Smrg 26720b661123Smrgtpf*) 26730b661123Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 26740b661123Smrg version_type=linux 26750b661123Smrg need_lib_prefix=no 26760b661123Smrg need_version=no 26770b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26780b661123Smrg shlibpath_var=LD_LIBRARY_PATH 26790b661123Smrg shlibpath_overrides_runpath=no 26800b661123Smrg hardcode_into_libs=yes 26810b661123Smrg ;; 26820b661123Smrg 268372313efbSmrguts4*) 268472313efbSmrg version_type=linux 268572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 268672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 268772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 268872313efbSmrg ;; 2689bdcaa8d0Smrg 269072313efbSmrg*) 269172313efbSmrg dynamic_linker=no 269272313efbSmrg ;; 269372313efbSmrgesac 269472313efbSmrgAC_MSG_RESULT([$dynamic_linker]) 269572313efbSmrgtest "$dynamic_linker" = no && can_build_shared=no 2696bdcaa8d0Smrg 269772313efbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 269872313efbSmrgif test "$GCC" = yes; then 269972313efbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 270072313efbSmrgfi 2701bdcaa8d0Smrg 27020b661123Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 27030b661123Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 27040b661123Smrgfi 27050b661123Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 27060b661123Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 27070b661123Smrgfi 270896ce994aSmrg 27090b661123Smrg_LT_DECL([], [variables_saved_for_relink], [1], 27100b661123Smrg [Variables whose values should be saved in libtool wrapper scripts and 27110b661123Smrg restored at link time]) 27120b661123Smrg_LT_DECL([], [need_lib_prefix], [0], 27130b661123Smrg [Do we need the "lib" prefix for modules?]) 27140b661123Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 27150b661123Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 27160b661123Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 27170b661123Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 27180b661123Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 27190b661123Smrg [Is shlibpath searched before the hard-coded library search path?]) 27200b661123Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 27210b661123Smrg_LT_DECL([], [library_names_spec], [1], 27220b661123Smrg [[List of archive names. First name is the real one, the rest are links. 27230b661123Smrg The last name is the one that the linker finds with -lNAME]]) 27240b661123Smrg_LT_DECL([], [soname_spec], [1], 27250b661123Smrg [[The coded name of the library, if different from the real name]]) 27260b661123Smrg_LT_DECL([], [postinstall_cmds], [2], 27270b661123Smrg [Command to use after installation of a shared archive]) 27280b661123Smrg_LT_DECL([], [postuninstall_cmds], [2], 27290b661123Smrg [Command to use after uninstallation of a shared archive]) 27300b661123Smrg_LT_DECL([], [finish_cmds], [2], 27310b661123Smrg [Commands used to finish a libtool library installation in a directory]) 27320b661123Smrg_LT_DECL([], [finish_eval], [1], 27330b661123Smrg [[As "finish_cmds", except a single script fragment to be evaled but 27340b661123Smrg not shown]]) 27350b661123Smrg_LT_DECL([], [hardcode_into_libs], [0], 27360b661123Smrg [Whether we should hardcode library paths into libraries]) 27370b661123Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 27380b661123Smrg [Compile-time system search path for libraries]) 27390b661123Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 27400b661123Smrg [Run-time system search path for libraries]) 27410b661123Smrg])# _LT_SYS_DYNAMIC_LINKER 27420b661123Smrg 27430b661123Smrg 27440b661123Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 274596ce994aSmrg# -------------------------- 274696ce994aSmrg# find a file program which can recognize shared library 27470b661123SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 27480b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 274996ce994aSmrgAC_MSG_CHECKING([for $1]) 275096ce994aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 275196ce994aSmrg[case $MAGIC_CMD in 275272313efbSmrg[[\\/*] | ?:[\\/]*]) 275372313efbSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 275472313efbSmrg ;; 275572313efbSmrg*) 275672313efbSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 275772313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 275872313efbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 275972313efbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 276072313efbSmrgdnl not every word. This closes a longstanding sh security hole. 27610b661123Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 276272313efbSmrg for ac_dir in $ac_dummy; do 276372313efbSmrg IFS="$lt_save_ifs" 276472313efbSmrg test -z "$ac_dir" && ac_dir=. 276572313efbSmrg if test -f $ac_dir/$1; then 276672313efbSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 276772313efbSmrg if test -n "$file_magic_test_file"; then 276872313efbSmrg case $deplibs_check_method in 276972313efbSmrg "file_magic "*) 277072313efbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 277172313efbSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 277272313efbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 277372313efbSmrg $EGREP "$file_magic_regex" > /dev/null; then 277472313efbSmrg : 277572313efbSmrg else 27760b661123Smrg cat <<_LT_EOF 1>&2 2777bdcaa8d0Smrg 277872313efbSmrg*** Warning: the command libtool uses to detect shared libraries, 277972313efbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 278072313efbSmrg*** The result is that libtool may fail to recognize shared libraries 278172313efbSmrg*** as such. This will affect the creation of libtool libraries that 278272313efbSmrg*** depend on shared libraries, but programs linked with such libtool 278372313efbSmrg*** libraries will work regardless of this problem. Nevertheless, you 278472313efbSmrg*** may want to report the problem to your system manager and/or to 278572313efbSmrg*** bug-libtool@gnu.org 2786bdcaa8d0Smrg 27870b661123Smrg_LT_EOF 278872313efbSmrg fi ;; 278972313efbSmrg esac 279072313efbSmrg fi 279172313efbSmrg break 279272313efbSmrg fi 279372313efbSmrg done 279472313efbSmrg IFS="$lt_save_ifs" 279572313efbSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 279672313efbSmrg ;; 279772313efbSmrgesac]) 279872313efbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 279972313efbSmrgif test -n "$MAGIC_CMD"; then 280072313efbSmrg AC_MSG_RESULT($MAGIC_CMD) 280172313efbSmrgelse 280272313efbSmrg AC_MSG_RESULT(no) 280372313efbSmrgfi 28040b661123Smrg_LT_DECL([], [MAGIC_CMD], [0], 28050b661123Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 28060b661123Smrg])# _LT_PATH_TOOL_PREFIX 2807bdcaa8d0Smrg 28080b661123Smrg# Old name: 28090b661123SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 28100b661123Smrgdnl aclocal-1.4 backwards compatibility: 28110b661123Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812bdcaa8d0Smrg 28130b661123Smrg 28140b661123Smrg# _LT_PATH_MAGIC 28150b661123Smrg# -------------- 281672313efbSmrg# find a file program which can recognize a shared library 28170b661123Smrgm4_defun([_LT_PATH_MAGIC], 28180b661123Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 281972313efbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 282072313efbSmrg if test -n "$ac_tool_prefix"; then 28210b661123Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 282272313efbSmrg else 282372313efbSmrg MAGIC_CMD=: 282472313efbSmrg fi 282572313efbSmrgfi 28260b661123Smrg])# _LT_PATH_MAGIC 2827bdcaa8d0Smrg 282872313efbSmrg 28290b661123Smrg# LT_PATH_LD 283072313efbSmrg# ---------- 283172313efbSmrg# find the pathname to the GNU or non-GNU linker 28320b661123SmrgAC_DEFUN([LT_PATH_LD], 28330b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 283496ce994aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 283596ce994aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 28360b661123Smrgm4_require([_LT_DECL_SED])dnl 28370b661123Smrgm4_require([_LT_DECL_EGREP])dnl 28380b661123Smrg 28390b661123SmrgAC_ARG_WITH([gnu-ld], 28400b661123Smrg [AS_HELP_STRING([--with-gnu-ld], 28410b661123Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 28420b661123Smrg [test "$withval" = no || with_gnu_ld=yes], 28430b661123Smrg [with_gnu_ld=no])dnl 28440b661123Smrg 284572313efbSmrgac_prog=ld 284672313efbSmrgif test "$GCC" = yes; then 284772313efbSmrg # Check if gcc -print-prog-name=ld gives a path. 284872313efbSmrg AC_MSG_CHECKING([for ld used by $CC]) 284972313efbSmrg case $host in 285072313efbSmrg *-*-mingw*) 285172313efbSmrg # gcc leaves a trailing carriage return which upsets mingw 285272313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 285372313efbSmrg *) 285472313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 285572313efbSmrg esac 285672313efbSmrg case $ac_prog in 285772313efbSmrg # Accept absolute paths. 285872313efbSmrg [[\\/]]* | ?:[[\\/]]*) 285972313efbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 286072313efbSmrg # Canonicalize the pathname of ld 28610b661123Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 28620b661123Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 28630b661123Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 286472313efbSmrg done 286572313efbSmrg test -z "$LD" && LD="$ac_prog" 286672313efbSmrg ;; 286772313efbSmrg "") 286872313efbSmrg # If it fails, then pretend we aren't using GCC. 286972313efbSmrg ac_prog=ld 287072313efbSmrg ;; 287172313efbSmrg *) 287272313efbSmrg # If it is relative, then search for the first ld in PATH. 287372313efbSmrg with_gnu_ld=unknown 287472313efbSmrg ;; 287572313efbSmrg esac 287672313efbSmrgelif test "$with_gnu_ld" = yes; then 287772313efbSmrg AC_MSG_CHECKING([for GNU ld]) 2878bdcaa8d0Smrgelse 287972313efbSmrg AC_MSG_CHECKING([for non-GNU ld]) 2880bdcaa8d0Smrgfi 288172313efbSmrgAC_CACHE_VAL(lt_cv_path_LD, 288272313efbSmrg[if test -z "$LD"; then 288372313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 288472313efbSmrg for ac_dir in $PATH; do 288572313efbSmrg IFS="$lt_save_ifs" 288672313efbSmrg test -z "$ac_dir" && ac_dir=. 288772313efbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 288872313efbSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 288972313efbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 289072313efbSmrg # but apparently some variants of GNU ld only accept -v. 289172313efbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 289272313efbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 289372313efbSmrg *GNU* | *'with BFD'*) 289472313efbSmrg test "$with_gnu_ld" != no && break 289572313efbSmrg ;; 289672313efbSmrg *) 289772313efbSmrg test "$with_gnu_ld" != yes && break 289872313efbSmrg ;; 289972313efbSmrg esac 290072313efbSmrg fi 290172313efbSmrg done 290272313efbSmrg IFS="$lt_save_ifs" 2903bdcaa8d0Smrgelse 290472313efbSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 290572313efbSmrgfi]) 290672313efbSmrgLD="$lt_cv_path_LD" 290772313efbSmrgif test -n "$LD"; then 290872313efbSmrg AC_MSG_RESULT($LD) 2909bdcaa8d0Smrgelse 291072313efbSmrg AC_MSG_RESULT(no) 2911bdcaa8d0Smrgfi 291272313efbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 29130b661123Smrg_LT_PATH_LD_GNU 29140b661123SmrgAC_SUBST([LD]) 2915bdcaa8d0Smrg 29160b661123Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 29170b661123Smrg])# LT_PATH_LD 2918bdcaa8d0Smrg 29190b661123Smrg# Old names: 29200b661123SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 29210b661123SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 29220b661123Smrgdnl aclocal-1.4 backwards compatibility: 29230b661123Smrgdnl AC_DEFUN([AM_PROG_LD], []) 29240b661123Smrgdnl AC_DEFUN([AC_PROG_LD], []) 29250b661123Smrg 29260b661123Smrg 29270b661123Smrg# _LT_PATH_LD_GNU 29280b661123Smrg#- -------------- 29290b661123Smrgm4_defun([_LT_PATH_LD_GNU], 29300b661123Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 293172313efbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 293272313efbSmrgcase `$LD -v 2>&1 </dev/null` in 293372313efbSmrg*GNU* | *'with BFD'*) 293472313efbSmrg lt_cv_prog_gnu_ld=yes 293572313efbSmrg ;; 293672313efbSmrg*) 293772313efbSmrg lt_cv_prog_gnu_ld=no 293872313efbSmrg ;; 293972313efbSmrgesac]) 294072313efbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 29410b661123Smrg])# _LT_PATH_LD_GNU 2942bdcaa8d0Smrg 2943bdcaa8d0Smrg 29440b661123Smrg# _LT_CMD_RELOAD 29450b661123Smrg# -------------- 294672313efbSmrg# find reload flag for linker 294772313efbSmrg# -- PORTME Some linkers may need a different reload flag. 29480b661123Smrgm4_defun([_LT_CMD_RELOAD], 294972313efbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 295072313efbSmrg lt_cv_ld_reload_flag, 295172313efbSmrg [lt_cv_ld_reload_flag='-r']) 295272313efbSmrgreload_flag=$lt_cv_ld_reload_flag 295372313efbSmrgcase $reload_flag in 295472313efbSmrg"" | " "*) ;; 295572313efbSmrg*) reload_flag=" $reload_flag" ;; 295672313efbSmrgesac 295772313efbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 295872313efbSmrgcase $host_os in 295972313efbSmrg darwin*) 296072313efbSmrg if test "$GCC" = yes; then 296172313efbSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2962bdcaa8d0Smrg else 296372313efbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2964bdcaa8d0Smrg fi 296572313efbSmrg ;; 296672313efbSmrgesac 29670b661123Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 29680b661123Smrg_LT_DECL([], [reload_cmds], [2])dnl 29690b661123Smrg])# _LT_CMD_RELOAD 2970bdcaa8d0Smrg 2971bdcaa8d0Smrg 29720b661123Smrg# _LT_CHECK_MAGIC_METHOD 29730b661123Smrg# ---------------------- 297472313efbSmrg# how to check for library dependencies 297572313efbSmrg# -- PORTME fill in with the dynamic library characteristics 29760b661123Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 29770b661123Smrg[m4_require([_LT_DECL_EGREP]) 29780b661123Smrgm4_require([_LT_DECL_OBJDUMP]) 29790b661123SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 298072313efbSmrglt_cv_deplibs_check_method, 298172313efbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 298272313efbSmrglt_cv_file_magic_test_file= 298372313efbSmrglt_cv_deplibs_check_method='unknown' 298472313efbSmrg# Need to set the preceding variable on all platforms that support 298572313efbSmrg# interlibrary dependencies. 298672313efbSmrg# 'none' -- dependencies not supported. 298772313efbSmrg# `unknown' -- same as none, but documents that we really don't know. 298872313efbSmrg# 'pass_all' -- all dependencies passed with no checks. 298972313efbSmrg# 'test_compile' -- check by making test program. 299072313efbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 299172313efbSmrg# which responds to the $file_magic_cmd with a given extended regex. 299272313efbSmrg# If you have `file' or equivalent on your system and you're not sure 299372313efbSmrg# whether `pass_all' will *always* work, you probably want this one. 2994bdcaa8d0Smrg 2995bdcaa8d0Smrgcase $host_os in 299672313efbSmrgaix[[4-9]]*) 299772313efbSmrg lt_cv_deplibs_check_method=pass_all 299872313efbSmrg ;; 2999bdcaa8d0Smrg 300072313efbSmrgbeos*) 300172313efbSmrg lt_cv_deplibs_check_method=pass_all 300272313efbSmrg ;; 3003bdcaa8d0Smrg 300472313efbSmrgbsdi[[45]]*) 300572313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 300672313efbSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 300772313efbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 300872313efbSmrg ;; 3009bdcaa8d0Smrg 301072313efbSmrgcygwin*) 301172313efbSmrg # func_win32_libid is a shell function defined in ltmain.sh 301272313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 301372313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 301472313efbSmrg ;; 3015bdcaa8d0Smrg 301672313efbSmrgmingw* | pw32*) 301772313efbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 301872313efbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 301972313efbSmrg # unless we find 'file', for example because we are cross-compiling. 302072313efbSmrg if ( file / ) >/dev/null 2>&1; then 302172313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 302272313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 302372313efbSmrg else 302472313efbSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 302572313efbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 302672313efbSmrg fi 302772313efbSmrg ;; 3028bdcaa8d0Smrg 30290b661123Smrgcegcc) 30300b661123Smrg # use the weaker test based on 'objdump'. See mingw*. 30310b661123Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 30320b661123Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30330b661123Smrg ;; 30340b661123Smrg 303572313efbSmrgdarwin* | rhapsody*) 303672313efbSmrg lt_cv_deplibs_check_method=pass_all 303772313efbSmrg ;; 3038bdcaa8d0Smrg 303972313efbSmrgfreebsd* | dragonfly*) 30400b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041bdcaa8d0Smrg case $host_cpu in 304272313efbSmrg i*86 ) 304372313efbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 304472313efbSmrg # Let's accept both of them until this is cleared up. 304572313efbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 304672313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 304772313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048bdcaa8d0Smrg ;; 3049bdcaa8d0Smrg esac 305072313efbSmrg else 305172313efbSmrg lt_cv_deplibs_check_method=pass_all 305272313efbSmrg fi 305372313efbSmrg ;; 3054bdcaa8d0Smrg 305572313efbSmrggnu*) 305672313efbSmrg lt_cv_deplibs_check_method=pass_all 305772313efbSmrg ;; 3058bdcaa8d0Smrg 305972313efbSmrghpux10.20* | hpux11*) 306072313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 306172313efbSmrg case $host_cpu in 306272313efbSmrg ia64*) 306372313efbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 306472313efbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065bdcaa8d0Smrg ;; 306672313efbSmrg hppa*64*) 306772313efbSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 306872313efbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069bdcaa8d0Smrg ;; 307072313efbSmrg *) 307172313efbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 307272313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073bdcaa8d0Smrg ;; 307472313efbSmrg esac 307572313efbSmrg ;; 3076bdcaa8d0Smrg 307772313efbSmrginterix[[3-9]]*) 307872313efbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 307972313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 308072313efbSmrg ;; 3081bdcaa8d0Smrg 308272313efbSmrgirix5* | irix6* | nonstopux*) 308372313efbSmrg case $LD in 308472313efbSmrg *-32|*"-32 ") libmagic=32-bit;; 308572313efbSmrg *-n32|*"-n32 ") libmagic=N32;; 308672313efbSmrg *-64|*"-64 ") libmagic=64-bit;; 308772313efbSmrg *) libmagic=never-match;; 308872313efbSmrg esac 308972313efbSmrg lt_cv_deplibs_check_method=pass_all 309072313efbSmrg ;; 3091bdcaa8d0Smrg 309272313efbSmrg# This must be Linux ELF. 309372313efbSmrglinux* | k*bsd*-gnu) 309472313efbSmrg lt_cv_deplibs_check_method=pass_all 309572313efbSmrg ;; 3096bdcaa8d0Smrg 309772313efbSmrgnetbsd*) 30980b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 309972313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 310072313efbSmrg else 310172313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 310272313efbSmrg fi 310372313efbSmrg ;; 3104bdcaa8d0Smrg 310572313efbSmrgnewos6*) 310672313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 310772313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 310872313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 310972313efbSmrg ;; 3110bdcaa8d0Smrg 31110b661123Smrg*nto* | *qnx*) 31120b661123Smrg lt_cv_deplibs_check_method=pass_all 311372313efbSmrg ;; 3114bdcaa8d0Smrg 311572313efbSmrgopenbsd*) 31160b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 311772313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 311872313efbSmrg else 311972313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 312072313efbSmrg fi 312172313efbSmrg ;; 3122bdcaa8d0Smrg 312372313efbSmrgosf3* | osf4* | osf5*) 312472313efbSmrg lt_cv_deplibs_check_method=pass_all 312572313efbSmrg ;; 3126bdcaa8d0Smrg 312772313efbSmrgrdos*) 312872313efbSmrg lt_cv_deplibs_check_method=pass_all 312972313efbSmrg ;; 3130bdcaa8d0Smrg 313172313efbSmrgsolaris*) 313272313efbSmrg lt_cv_deplibs_check_method=pass_all 313372313efbSmrg ;; 313472313efbSmrg 31350b661123Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 31360b661123Smrg lt_cv_deplibs_check_method=pass_all 31370b661123Smrg ;; 31380b661123Smrg 313972313efbSmrgsysv4 | sysv4.3*) 314072313efbSmrg case $host_vendor in 314172313efbSmrg motorola) 314272313efbSmrg 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]]' 314372313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 314472313efbSmrg ;; 314572313efbSmrg ncr) 314672313efbSmrg lt_cv_deplibs_check_method=pass_all 3147bdcaa8d0Smrg ;; 314872313efbSmrg sequent) 314972313efbSmrg lt_cv_file_magic_cmd='/bin/file' 315072313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151bdcaa8d0Smrg ;; 315272313efbSmrg sni) 315372313efbSmrg lt_cv_file_magic_cmd='/bin/file' 315472313efbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 315572313efbSmrg lt_cv_file_magic_test_file=/lib/libc.so 3156bdcaa8d0Smrg ;; 315772313efbSmrg siemens) 315872313efbSmrg lt_cv_deplibs_check_method=pass_all 315972313efbSmrg ;; 316072313efbSmrg pc) 316172313efbSmrg lt_cv_deplibs_check_method=pass_all 316272313efbSmrg ;; 316372313efbSmrg esac 316472313efbSmrg ;; 3165bdcaa8d0Smrg 31660b661123Smrgtpf*) 316772313efbSmrg lt_cv_deplibs_check_method=pass_all 316872313efbSmrg ;; 316972313efbSmrgesac 317072313efbSmrg]) 317172313efbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 317272313efbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 317372313efbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174bdcaa8d0Smrg 31750b661123Smrg_LT_DECL([], [deplibs_check_method], [1], 31760b661123Smrg [Method to check whether dependent libraries are shared objects]) 31770b661123Smrg_LT_DECL([], [file_magic_cmd], [1], 31780b661123Smrg [Command to use when deplibs_check_method == "file_magic"]) 31790b661123Smrg])# _LT_CHECK_MAGIC_METHOD 3180bdcaa8d0Smrg 31810b661123Smrg 31820b661123Smrg# LT_PATH_NM 318372313efbSmrg# ---------- 31840b661123Smrg# find the pathname to a BSD- or MS-compatible name lister 31850b661123SmrgAC_DEFUN([LT_PATH_NM], 31860b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 31870b661123SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 318872313efbSmrg[if test -n "$NM"; then 318972313efbSmrg # Let the user override the test. 319072313efbSmrg lt_cv_path_NM="$NM" 319172313efbSmrgelse 319272313efbSmrg lt_nm_to_check="${ac_tool_prefix}nm" 319372313efbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 319472313efbSmrg lt_nm_to_check="$lt_nm_to_check nm" 319572313efbSmrg fi 319672313efbSmrg for lt_tmp_nm in $lt_nm_to_check; do 319772313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 319872313efbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 319972313efbSmrg IFS="$lt_save_ifs" 320072313efbSmrg test -z "$ac_dir" && ac_dir=. 320172313efbSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 320272313efbSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 320372313efbSmrg # Check to see if the nm accepts a BSD-compat flag. 320472313efbSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 320572313efbSmrg # nm: unknown option "B" ignored 320672313efbSmrg # Tru64's nm complains that /dev/null is an invalid object file 320772313efbSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 320872313efbSmrg */dev/null* | *'Invalid file or object type'*) 320972313efbSmrg lt_cv_path_NM="$tmp_nm -B" 321072313efbSmrg break 321172313efbSmrg ;; 321272313efbSmrg *) 321372313efbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 321472313efbSmrg */dev/null*) 321572313efbSmrg lt_cv_path_NM="$tmp_nm -p" 321672313efbSmrg break 321772313efbSmrg ;; 321872313efbSmrg *) 321972313efbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 322072313efbSmrg continue # so that we can try to find one that supports BSD flags 322172313efbSmrg ;; 322272313efbSmrg esac 322372313efbSmrg ;; 322472313efbSmrg esac 322572313efbSmrg fi 322672313efbSmrg done 322772313efbSmrg IFS="$lt_save_ifs" 3228bdcaa8d0Smrg done 32290b661123Smrg : ${lt_cv_path_NM=no} 323072313efbSmrgfi]) 32310b661123Smrgif test "$lt_cv_path_NM" != "no"; then 32320b661123Smrg NM="$lt_cv_path_NM" 32330b661123Smrgelse 32340b661123Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 32350b661123Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 32360b661123Smrg AC_SUBST([DUMPBIN]) 32370b661123Smrg if test "$DUMPBIN" != ":"; then 32380b661123Smrg NM="$DUMPBIN" 32390b661123Smrg fi 32400b661123Smrgfi 32410b661123Smrgtest -z "$NM" && NM=nm 32420b661123SmrgAC_SUBST([NM]) 32430b661123Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 32440b661123Smrg 32450b661123SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 32460b661123Smrg [lt_cv_nm_interface="BSD nm" 32470b661123Smrg echo "int some_variable = 0;" > conftest.$ac_ext 32480b661123Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 32490b661123Smrg (eval "$ac_compile" 2>conftest.err) 32500b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 32510b661123Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 32520b661123Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 32530b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 32540b661123Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 32550b661123Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 32560b661123Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 32570b661123Smrg lt_cv_nm_interface="MS dumpbin" 32580b661123Smrg fi 32590b661123Smrg rm -f conftest*]) 32600b661123Smrg])# LT_PATH_NM 3261bdcaa8d0Smrg 32620b661123Smrg# Old names: 32630b661123SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 32640b661123SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 32650b661123Smrgdnl aclocal-1.4 backwards compatibility: 32660b661123Smrgdnl AC_DEFUN([AM_PROG_NM], []) 32670b661123Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3268bdcaa8d0Smrg 32690b661123Smrg 32700b661123Smrg# LT_LIB_M 32710b661123Smrg# -------- 327272313efbSmrg# check for math library 32730b661123SmrgAC_DEFUN([LT_LIB_M], 327472313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 327572313efbSmrgLIBM= 327672313efbSmrgcase $host in 327772313efbSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 327872313efbSmrg # These system don't have libm, or don't need it 327972313efbSmrg ;; 328072313efbSmrg*-ncr-sysv4.3*) 328172313efbSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 328272313efbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 328372313efbSmrg ;; 328472313efbSmrg*) 328572313efbSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286bdcaa8d0Smrg ;; 3287bdcaa8d0Smrgesac 32880b661123SmrgAC_SUBST([LIBM]) 32890b661123Smrg])# LT_LIB_M 3290bdcaa8d0Smrg 32910b661123Smrg# Old name: 32920b661123SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 32930b661123Smrgdnl aclocal-1.4 backwards compatibility: 32940b661123Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295bdcaa8d0Smrg 3296bdcaa8d0Smrg 32970b661123Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 32980b661123Smrg# ------------------------------- 32990b661123Smrgm4_defun([_LT_COMPILER_NO_RTTI], 33000b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 3301bdcaa8d0Smrg 33020b661123Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303bdcaa8d0Smrg 33040b661123Smrgif test "$GCC" = yes; then 33050b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306bdcaa8d0Smrg 33070b661123Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 33080b661123Smrg lt_cv_prog_compiler_rtti_exceptions, 33090b661123Smrg [-fno-rtti -fno-exceptions], [], 33100b661123Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 33110b661123Smrgfi 33120b661123Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 33130b661123Smrg [Compiler flag to turn off builtin functions]) 33140b661123Smrg])# _LT_COMPILER_NO_RTTI 3315bdcaa8d0Smrg 3316bdcaa8d0Smrg 33170b661123Smrg# _LT_CMD_GLOBAL_SYMBOLS 33180b661123Smrg# ---------------------- 33190b661123Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 33200b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33210b661123SmrgAC_REQUIRE([AC_PROG_CC])dnl 33220b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 33230b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 33240b661123Smrgm4_require([_LT_DECL_SED])dnl 33250b661123Smrgm4_require([_LT_DECL_EGREP])dnl 33260b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 3327bdcaa8d0Smrg 33280b661123Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 33290b661123SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 33300b661123SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 333172313efbSmrg[ 33320b661123Smrg# These are sane defaults that work on at least a few old systems. 33330b661123Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334bdcaa8d0Smrg 33350b661123Smrg# Character class describing NM global symbol codes. 33360b661123Smrgsymcode='[[BCDEGRST]]' 3337bdcaa8d0Smrg 33380b661123Smrg# Regexp to match symbols that can be accessed directly from C. 33390b661123Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3340bdcaa8d0Smrg 33410b661123Smrg# Define system-specific variables. 33420b661123Smrgcase $host_os in 33430b661123Smrgaix*) 33440b661123Smrg symcode='[[BCDT]]' 33450b661123Smrg ;; 33460b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 33470b661123Smrg symcode='[[ABCDGISTW]]' 33480b661123Smrg ;; 33490b661123Smrghpux*) 33500b661123Smrg if test "$host_cpu" = ia64; then 33510b661123Smrg symcode='[[ABCDEGRST]]' 33520b661123Smrg fi 33530b661123Smrg ;; 33540b661123Smrgirix* | nonstopux*) 33550b661123Smrg symcode='[[BCDEGRST]]' 33560b661123Smrg ;; 33570b661123Smrgosf*) 33580b661123Smrg symcode='[[BCDEGQRST]]' 33590b661123Smrg ;; 33600b661123Smrgsolaris*) 33610b661123Smrg symcode='[[BDRT]]' 33620b661123Smrg ;; 33630b661123Smrgsco3.2v5*) 33640b661123Smrg symcode='[[DT]]' 33650b661123Smrg ;; 33660b661123Smrgsysv4.2uw2*) 33670b661123Smrg symcode='[[DT]]' 33680b661123Smrg ;; 33690b661123Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 33700b661123Smrg symcode='[[ABDT]]' 33710b661123Smrg ;; 33720b661123Smrgsysv4) 33730b661123Smrg symcode='[[DFNSTU]]' 33740b661123Smrg ;; 33750b661123Smrgesac 3376bdcaa8d0Smrg 33770b661123Smrg# If we're using GNU nm, then use its standard symbol codes. 33780b661123Smrgcase `$NM -V 2>&1` in 33790b661123Smrg*GNU* | *'with BFD'*) 33800b661123Smrg symcode='[[ABCDGIRSTW]]' ;; 33810b661123Smrgesac 3382bdcaa8d0Smrg 33830b661123Smrg# Transform an extracted symbol line into a proper C declaration. 33840b661123Smrg# Some systems (esp. on ia64) link data and code symbols differently, 33850b661123Smrg# so use this general approach. 33860b661123Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3387bdcaa8d0Smrg 33880b661123Smrg# Transform an extracted symbol line into symbol name and symbol address 33890b661123Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 33900b661123Smrglt_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'" 3391bdcaa8d0Smrg 33920b661123Smrg# Handle CRLF in mingw tool chain 33930b661123Smrgopt_cr= 33940b661123Smrgcase $build_os in 33950b661123Smrgmingw*) 33960b661123Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 33970b661123Smrg ;; 33980b661123Smrgesac 3399bdcaa8d0Smrg 34000b661123Smrg# Try without a prefix underscore, then with it. 34010b661123Smrgfor ac_symprfx in "" "_"; do 3402bdcaa8d0Smrg 34030b661123Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 34040b661123Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405bdcaa8d0Smrg 34060b661123Smrg # Write the raw and C identifiers. 34070b661123Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 34080b661123Smrg # Fake it for dumpbin and say T for any non-static function 34090b661123Smrg # and D for any global variable. 34100b661123Smrg # Also find C++ and __fastcall symbols from MSVC++, 34110b661123Smrg # which start with @ or ?. 34120b661123Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 34130b661123Smrg" {last_section=section; section=\$ 3};"\ 34140b661123Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 34150b661123Smrg" \$ 0!~/External *\|/{next};"\ 34160b661123Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 34170b661123Smrg" {if(hide[section]) next};"\ 34180b661123Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 34190b661123Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 34200b661123Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 34210b661123Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 34220b661123Smrg" ' prfx=^$ac_symprfx]" 34230b661123Smrg else 34240b661123Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 342596ce994aSmrg fi 342696ce994aSmrg 34270b661123Smrg # Check to see that the pipe works correctly. 34280b661123Smrg pipe_works=no 342996ce994aSmrg 34300b661123Smrg rm -f conftest* 34310b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 34320b661123Smrg#ifdef __cplusplus 34330b661123Smrgextern "C" { 34340b661123Smrg#endif 34350b661123Smrgchar nm_test_var; 34360b661123Smrgvoid nm_test_func(void); 34370b661123Smrgvoid nm_test_func(void){} 34380b661123Smrg#ifdef __cplusplus 34390b661123Smrg} 34400b661123Smrg#endif 34410b661123Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 34420b661123Smrg_LT_EOF 344396ce994aSmrg 34440b661123Smrg if AC_TRY_EVAL(ac_compile); then 34450b661123Smrg # Now try to grab the symbols. 34460b661123Smrg nlist=conftest.nm 34470b661123Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 34480b661123Smrg # Try sorting and uniquifying the output. 34490b661123Smrg if sort "$nlist" | uniq > "$nlist"T; then 34500b661123Smrg mv -f "$nlist"T "$nlist" 34510b661123Smrg else 34520b661123Smrg rm -f "$nlist"T 34530b661123Smrg fi 345496ce994aSmrg 34550b661123Smrg # Make sure that we snagged all the symbols we need. 34560b661123Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 34570b661123Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 34580b661123Smrg cat <<_LT_EOF > conftest.$ac_ext 34590b661123Smrg#ifdef __cplusplus 34600b661123Smrgextern "C" { 34610b661123Smrg#endif 346296ce994aSmrg 34630b661123Smrg_LT_EOF 34640b661123Smrg # Now generate the symbol file. 34650b661123Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 346696ce994aSmrg 34670b661123Smrg cat <<_LT_EOF >> conftest.$ac_ext 346896ce994aSmrg 34690b661123Smrg/* The mapping between symbol names and symbols. */ 34700b661123Smrgconst struct { 34710b661123Smrg const char *name; 34720b661123Smrg void *address; 34730b661123Smrg} 34740b661123Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 34750b661123Smrg{ 34760b661123Smrg { "@PROGRAM@", (void *) 0 }, 34770b661123Smrg_LT_EOF 34780b661123Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 34790b661123Smrg cat <<\_LT_EOF >> conftest.$ac_ext 34800b661123Smrg {0, (void *) 0} 34810b661123Smrg}; 348296ce994aSmrg 34830b661123Smrg/* This works around a problem in FreeBSD linker */ 34840b661123Smrg#ifdef FREEBSD_WORKAROUND 34850b661123Smrgstatic const void *lt_preloaded_setup() { 34860b661123Smrg return lt__PROGRAM__LTX_preloaded_symbols; 34870b661123Smrg} 34880b661123Smrg#endif 348996ce994aSmrg 34900b661123Smrg#ifdef __cplusplus 34910b661123Smrg} 34920b661123Smrg#endif 34930b661123Smrg_LT_EOF 34940b661123Smrg # Now try linking the two files. 34950b661123Smrg mv conftest.$ac_objext conftstm.$ac_objext 34960b661123Smrg lt_save_LIBS="$LIBS" 34970b661123Smrg lt_save_CFLAGS="$CFLAGS" 34980b661123Smrg LIBS="conftstm.$ac_objext" 34990b661123Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 35000b661123Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 35010b661123Smrg pipe_works=yes 35020b661123Smrg fi 35030b661123Smrg LIBS="$lt_save_LIBS" 35040b661123Smrg CFLAGS="$lt_save_CFLAGS" 35050b661123Smrg else 35060b661123Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 35070b661123Smrg fi 35080b661123Smrg else 35090b661123Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 35100b661123Smrg fi 351172313efbSmrg else 35120b661123Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 351372313efbSmrg fi 351472313efbSmrg else 35150b661123Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 35160b661123Smrg cat conftest.$ac_ext >&5 351772313efbSmrg fi 35180b661123Smrg rm -rf conftest* conftst* 3519bdcaa8d0Smrg 35200b661123Smrg # Do not use the global_symbol_pipe unless it works. 35210b661123Smrg if test "$pipe_works" = yes; then 35220b661123Smrg break 35230b661123Smrg else 35240b661123Smrg lt_cv_sys_global_symbol_pipe= 35250b661123Smrg fi 35260b661123Smrgdone 35270b661123Smrg]) 35280b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 35290b661123Smrg lt_cv_sys_global_symbol_to_cdecl= 35300b661123Smrgfi 35310b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 35320b661123Smrg AC_MSG_RESULT(failed) 353372313efbSmrgelse 35340b661123Smrg AC_MSG_RESULT(ok) 353572313efbSmrgfi 3536bdcaa8d0Smrg 35370b661123Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 35380b661123Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 35390b661123Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 35400b661123Smrg [Transform the output of nm in a proper C declaration]) 35410b661123Smrg_LT_DECL([global_symbol_to_c_name_address], 35420b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 35430b661123Smrg [Transform the output of nm in a C name address pair]) 35440b661123Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 35450b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 35460b661123Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 35470b661123Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548bdcaa8d0Smrg 3549bdcaa8d0Smrg 35500b661123Smrg# _LT_COMPILER_PIC([TAGNAME]) 35510b661123Smrg# --------------------------- 35520b661123Smrgm4_defun([_LT_COMPILER_PIC], 35530b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 35540b661123Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 35550b661123Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 35560b661123Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557bdcaa8d0Smrg 35580b661123SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 35590b661123Smrgm4_if([$1], [CXX], [ 35600b661123Smrg # C++ specific cases for pic, static, wl, etc. 35610b661123Smrg if test "$GXX" = yes; then 35620b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 35630b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 356496ce994aSmrg 35650b661123Smrg case $host_os in 35660b661123Smrg aix*) 35670b661123Smrg # All AIX code is PIC. 356896ce994aSmrg if test "$host_cpu" = ia64; then 35690b661123Smrg # AIX 5 now supports IA64 processor 35700b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 357172313efbSmrg fi 357272313efbSmrg ;; 3573bdcaa8d0Smrg 35740b661123Smrg amigaos*) 357572313efbSmrg case $host_cpu in 35760b661123Smrg powerpc) 35770b661123Smrg # see comment about AmigaOS4 .so support 35780b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 35790b661123Smrg ;; 35800b661123Smrg m68k) 35810b661123Smrg # FIXME: we need at least 68020 code to build shared libraries, but 35820b661123Smrg # adding the `-m68020' flag to GCC prevents building anything better, 35830b661123Smrg # like `-m68040'. 35840b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 358572313efbSmrg ;; 358672313efbSmrg esac 358772313efbSmrg ;; 3588bdcaa8d0Smrg 35890b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 35900b661123Smrg # PIC is the default for these OSes. 35910b661123Smrg ;; 35920b661123Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 35930b661123Smrg # This hack is so that the source file can tell whether it is being 35940b661123Smrg # built for inclusion in a dll (and should export symbols for example). 35950b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 35960b661123Smrg # (--disable-auto-import) libraries 35970b661123Smrg m4_if([$1], [GCJ], [], 35980b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 35990b661123Smrg ;; 36000b661123Smrg darwin* | rhapsody*) 36010b661123Smrg # PIC is the default on this platform 36020b661123Smrg # Common symbols not allowed in MH_DYLIB files 36030b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 36040b661123Smrg ;; 36050b661123Smrg *djgpp*) 36060b661123Smrg # DJGPP does not support shared libraries at all 36070b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 36080b661123Smrg ;; 36090b661123Smrg interix[[3-9]]*) 36100b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 36110b661123Smrg # Instead, we relocate shared libraries at runtime. 36120b661123Smrg ;; 36130b661123Smrg sysv4*MP*) 36140b661123Smrg if test -d /usr/nec; then 36150b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 36160b661123Smrg fi 36170b661123Smrg ;; 36180b661123Smrg hpux*) 36190b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 36200b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 36210b661123Smrg # sets the default TLS model and affects inlining. 36220b661123Smrg case $host_cpu in 36230b661123Smrg hppa*64*) 362472313efbSmrg ;; 362596ce994aSmrg *) 36260b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 362772313efbSmrg ;; 36280b661123Smrg esac 36290b661123Smrg ;; 36300b661123Smrg *qnx* | *nto*) 36310b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 36320b661123Smrg # it will coredump. 36330b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 36340b661123Smrg ;; 36350b661123Smrg *) 36360b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36370b661123Smrg ;; 363896ce994aSmrg esac 36390b661123Smrg else 36400b661123Smrg case $host_os in 36410b661123Smrg aix[[4-9]]*) 36420b661123Smrg # All AIX code is PIC. 36430b661123Smrg if test "$host_cpu" = ia64; then 36440b661123Smrg # AIX 5 now supports IA64 processor 36450b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 36460b661123Smrg else 36470b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 364896ce994aSmrg fi 364996ce994aSmrg ;; 36500b661123Smrg chorus*) 36510b661123Smrg case $cc_basename in 36520b661123Smrg cxch68*) 36530b661123Smrg # Green Hills C++ Compiler 36540b661123Smrg # _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" 365596ce994aSmrg ;; 365672313efbSmrg esac 365796ce994aSmrg ;; 36580b661123Smrg dgux*) 36590b661123Smrg case $cc_basename in 36600b661123Smrg ec++*) 36610b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 36620b661123Smrg ;; 36630b661123Smrg ghcx*) 36640b661123Smrg # Green Hills C++ Compiler 36650b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 36660b661123Smrg ;; 36670b661123Smrg *) 36680b661123Smrg ;; 366972313efbSmrg esac 367072313efbSmrg ;; 36710b661123Smrg freebsd* | dragonfly*) 36720b661123Smrg # FreeBSD uses GNU C++ 367372313efbSmrg ;; 36740b661123Smrg hpux9* | hpux10* | hpux11*) 36750b661123Smrg case $cc_basename in 36760b661123Smrg CC*) 36770b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36780b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36790b661123Smrg if test "$host_cpu" != ia64; then 36800b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36810b661123Smrg fi 36820b661123Smrg ;; 36830b661123Smrg aCC*) 36840b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36850b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36860b661123Smrg case $host_cpu in 36870b661123Smrg hppa*64*|ia64*) 36880b661123Smrg # +Z the default 36890b661123Smrg ;; 36900b661123Smrg *) 36910b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36920b661123Smrg ;; 36930b661123Smrg esac 36940b661123Smrg ;; 36950b661123Smrg *) 36960b661123Smrg ;; 36970b661123Smrg esac 369872313efbSmrg ;; 36990b661123Smrg interix*) 37000b661123Smrg # This is c89, which is MS Visual C++ (no shared libs) 37010b661123Smrg # Anyone wants to do a port? 370272313efbSmrg ;; 37030b661123Smrg irix5* | irix6* | nonstopux*) 37040b661123Smrg case $cc_basename in 37050b661123Smrg CC*) 37060b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37070b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37080b661123Smrg # CC pic flag -KPIC is the default. 37090b661123Smrg ;; 37100b661123Smrg *) 37110b661123Smrg ;; 37120b661123Smrg esac 371372313efbSmrg ;; 37140b661123Smrg linux* | k*bsd*-gnu) 37150b661123Smrg case $cc_basename in 37160b661123Smrg KCC*) 37170b661123Smrg # KAI C++ Compiler 37180b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37190b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37200b661123Smrg ;; 37210b661123Smrg ecpc* ) 37220b661123Smrg # old Intel C++ for x86_64 which still supported -KPIC. 37230b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37240b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37250b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37260b661123Smrg ;; 37270b661123Smrg icpc* ) 37280b661123Smrg # Intel C++, used to be incompatible with GCC. 37290b661123Smrg # ICC 10 doesn't accept -KPIC any more. 37300b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37310b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37320b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37330b661123Smrg ;; 37340b661123Smrg pgCC* | pgcpp*) 37350b661123Smrg # Portland Group C++ compiler 37360b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37370b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 37380b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37390b661123Smrg ;; 37400b661123Smrg cxx*) 37410b661123Smrg # Compaq C++ 37420b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 37430b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 37440b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 37450b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37460b661123Smrg ;; 37470b661123Smrg xlc* | xlC*) 37480b661123Smrg # IBM XL 8.0 on PPC 37490b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37500b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 37510b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 37520b661123Smrg ;; 37530b661123Smrg *) 37540b661123Smrg case `$CC -V 2>&1 | sed 5q` in 37550b661123Smrg *Sun\ C*) 37560b661123Smrg # Sun C++ 5.9 37570b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37580b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37590b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 37600b661123Smrg ;; 37610b661123Smrg esac 37620b661123Smrg ;; 37630b661123Smrg esac 376472313efbSmrg ;; 37650b661123Smrg lynxos*) 376672313efbSmrg ;; 37670b661123Smrg m88k*) 376872313efbSmrg ;; 37690b661123Smrg mvs*) 37700b661123Smrg case $cc_basename in 37710b661123Smrg cxx*) 37720b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 37730b661123Smrg ;; 37740b661123Smrg *) 37750b661123Smrg ;; 37760b661123Smrg esac 377772313efbSmrg ;; 37780b661123Smrg netbsd*) 377996ce994aSmrg ;; 37800b661123Smrg *qnx* | *nto*) 37810b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 37820b661123Smrg # it will coredump. 37830b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 37840b661123Smrg ;; 37850b661123Smrg osf3* | osf4* | osf5*) 37860b661123Smrg case $cc_basename in 37870b661123Smrg KCC*) 37880b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37890b661123Smrg ;; 37900b661123Smrg RCC*) 37910b661123Smrg # Rational C++ 2.4.1 37920b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 37930b661123Smrg ;; 37940b661123Smrg cxx*) 37950b661123Smrg # Digital/Compaq C++ 37960b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37970b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 37980b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 37990b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 38000b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 38010b661123Smrg ;; 38020b661123Smrg *) 38030b661123Smrg ;; 38040b661123Smrg esac 380596ce994aSmrg ;; 38060b661123Smrg psos*) 380796ce994aSmrg ;; 38080b661123Smrg solaris*) 38090b661123Smrg case $cc_basename in 38100b661123Smrg CC*) 38110b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 38120b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38130b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38140b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 38150b661123Smrg ;; 38160b661123Smrg gcx*) 38170b661123Smrg # Green Hills C++ Compiler 38180b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 38190b661123Smrg ;; 38200b661123Smrg *) 38210b661123Smrg ;; 38220b661123Smrg esac 382396ce994aSmrg ;; 38240b661123Smrg sunos4*) 38250b661123Smrg case $cc_basename in 38260b661123Smrg CC*) 38270b661123Smrg # Sun C++ 4.x 38280b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38290b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38300b661123Smrg ;; 38310b661123Smrg lcc*) 38320b661123Smrg # Lucid 38330b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38340b661123Smrg ;; 383572313efbSmrg *) 383672313efbSmrg ;; 383772313efbSmrg esac 383872313efbSmrg ;; 38390b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 38400b661123Smrg case $cc_basename in 38410b661123Smrg CC*) 38420b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38430b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38440b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38450b661123Smrg ;; 38460b661123Smrg esac 384772313efbSmrg ;; 38480b661123Smrg tandem*) 38490b661123Smrg case $cc_basename in 38500b661123Smrg NCC*) 38510b661123Smrg # NonStop-UX NCC 3.20 38520b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38530b661123Smrg ;; 385496ce994aSmrg *) 385596ce994aSmrg ;; 38560b661123Smrg esac 385796ce994aSmrg ;; 38580b661123Smrg vxworks*) 385972313efbSmrg ;; 386072313efbSmrg *) 38610b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 386272313efbSmrg ;; 386372313efbSmrg esac 38640b661123Smrg fi 38650b661123Smrg], 38660b661123Smrg[ 38670b661123Smrg if test "$GCC" = yes; then 38680b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38690b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38700b661123Smrg 38710b661123Smrg case $host_os in 38720b661123Smrg aix*) 38730b661123Smrg # All AIX code is PIC. 38740b661123Smrg if test "$host_cpu" = ia64; then 38750b661123Smrg # AIX 5 now supports IA64 processor 38760b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38770b661123Smrg fi 38780b661123Smrg ;; 38790b661123Smrg 38800b661123Smrg amigaos*) 38810b661123Smrg case $host_cpu in 38820b661123Smrg powerpc) 38830b661123Smrg # see comment about AmigaOS4 .so support 38840b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 38850b661123Smrg ;; 38860b661123Smrg m68k) 38870b661123Smrg # FIXME: we need at least 68020 code to build shared libraries, but 38880b661123Smrg # adding the `-m68020' flag to GCC prevents building anything better, 38890b661123Smrg # like `-m68040'. 38900b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 38910b661123Smrg ;; 38920b661123Smrg esac 38930b661123Smrg ;; 38940b661123Smrg 38950b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 38960b661123Smrg # PIC is the default for these OSes. 38970b661123Smrg ;; 38980b661123Smrg 38990b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39000b661123Smrg # This hack is so that the source file can tell whether it is being 39010b661123Smrg # built for inclusion in a dll (and should export symbols for example). 39020b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39030b661123Smrg # (--disable-auto-import) libraries 39040b661123Smrg m4_if([$1], [GCJ], [], 39050b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39060b661123Smrg ;; 39070b661123Smrg 39080b661123Smrg darwin* | rhapsody*) 39090b661123Smrg # PIC is the default on this platform 39100b661123Smrg # Common symbols not allowed in MH_DYLIB files 39110b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39120b661123Smrg ;; 39130b661123Smrg 39140b661123Smrg hpux*) 39150b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39160b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39170b661123Smrg # sets the default TLS model and affects inlining. 39180b661123Smrg case $host_cpu in 39190b661123Smrg hppa*64*) 39200b661123Smrg # +Z the default 392172313efbSmrg ;; 392272313efbSmrg *) 39230b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 392472313efbSmrg ;; 39250b661123Smrg esac 39260b661123Smrg ;; 39270b661123Smrg 39280b661123Smrg interix[[3-9]]*) 39290b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39300b661123Smrg # Instead, we relocate shared libraries at runtime. 39310b661123Smrg ;; 39320b661123Smrg 39330b661123Smrg msdosdjgpp*) 39340b661123Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 39350b661123Smrg # on systems that don't support them. 39360b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 39370b661123Smrg enable_shared=no 39380b661123Smrg ;; 39390b661123Smrg 39400b661123Smrg *nto* | *qnx*) 39410b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39420b661123Smrg # it will coredump. 39430b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39440b661123Smrg ;; 39450b661123Smrg 39460b661123Smrg sysv4*MP*) 39470b661123Smrg if test -d /usr/nec; then 39480b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39490b661123Smrg fi 39500b661123Smrg ;; 39510b661123Smrg 39520b661123Smrg *) 39530b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39540b661123Smrg ;; 395596ce994aSmrg esac 39560b661123Smrg else 39570b661123Smrg # PORTME Check for flag to pass linker flags through the system compiler. 39580b661123Smrg case $host_os in 39590b661123Smrg aix*) 39600b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39610b661123Smrg if test "$host_cpu" = ia64; then 39620b661123Smrg # AIX 5 now supports IA64 processor 39630b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39640b661123Smrg else 39650b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39660b661123Smrg fi 39670b661123Smrg ;; 39680b661123Smrg 39690b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39700b661123Smrg # This hack is so that the source file can tell whether it is being 39710b661123Smrg # built for inclusion in a dll (and should export symbols for example). 39720b661123Smrg m4_if([$1], [GCJ], [], 39730b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39740b661123Smrg ;; 39750b661123Smrg 39760b661123Smrg hpux9* | hpux10* | hpux11*) 39770b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39780b661123Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 39790b661123Smrg # not for PA HP-UX. 39800b661123Smrg case $host_cpu in 39810b661123Smrg hppa*64*|ia64*) 39820b661123Smrg # +Z the default 398372313efbSmrg ;; 398472313efbSmrg *) 39850b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 398672313efbSmrg ;; 39870b661123Smrg esac 39880b661123Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 39890b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 39900b661123Smrg ;; 3991bdcaa8d0Smrg 39920b661123Smrg irix5* | irix6* | nonstopux*) 39930b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39940b661123Smrg # PIC (with -KPIC) is the default. 39950b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 39960b661123Smrg ;; 3997bdcaa8d0Smrg 39980b661123Smrg linux* | k*bsd*-gnu) 39990b661123Smrg case $cc_basename in 40000b661123Smrg # old Intel for x86_64 which still supported -KPIC. 40010b661123Smrg ecc*) 40020b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40030b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40040b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40050b661123Smrg ;; 40060b661123Smrg # icc used to be incompatible with GCC. 40070b661123Smrg # ICC 10 doesn't accept -KPIC any more. 40080b661123Smrg icc* | ifort*) 40090b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40100b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40110b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40120b661123Smrg ;; 40130b661123Smrg # Lahey Fortran 8.1. 40140b661123Smrg lf95*) 40150b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40160b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 40170b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 40180b661123Smrg ;; 40190b661123Smrg pgcc* | pgf77* | pgf90* | pgf95*) 40200b661123Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 40210b661123Smrg # which looks to be a dead project) 40220b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40230b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40240b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40250b661123Smrg ;; 40260b661123Smrg ccc*) 40270b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40280b661123Smrg # All Alpha code is PIC. 40290b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40300b661123Smrg ;; 40310b661123Smrg xl*) 40320b661123Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 40330b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40340b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40350b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40360b661123Smrg ;; 40370b661123Smrg *) 40380b661123Smrg case `$CC -V 2>&1 | sed 5q` in 40390b661123Smrg *Sun\ C*) 40400b661123Smrg # Sun C 5.9 40410b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40420b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40430b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40440b661123Smrg ;; 40450b661123Smrg *Sun\ F*) 40460b661123Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 40470b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40480b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40490b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 40500b661123Smrg ;; 40510b661123Smrg esac 40520b661123Smrg ;; 40530b661123Smrg esac 40540b661123Smrg ;; 4055bdcaa8d0Smrg 40560b661123Smrg newsos6) 40570b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40580b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40590b661123Smrg ;; 4060bdcaa8d0Smrg 40610b661123Smrg *nto* | *qnx*) 40620b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 40630b661123Smrg # it will coredump. 40640b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 40650b661123Smrg ;; 4066bdcaa8d0Smrg 40670b661123Smrg osf3* | osf4* | osf5*) 40680b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40690b661123Smrg # All OSF/1 code is PIC. 40700b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40710b661123Smrg ;; 4072bdcaa8d0Smrg 40730b661123Smrg rdos*) 40740b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40750b661123Smrg ;; 4076bdcaa8d0Smrg 40770b661123Smrg solaris*) 40780b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40790b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40800b661123Smrg case $cc_basename in 40810b661123Smrg f77* | f90* | f95*) 40820b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 40830b661123Smrg *) 40840b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 40850b661123Smrg esac 40860b661123Smrg ;; 4087bdcaa8d0Smrg 40880b661123Smrg sunos4*) 40890b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 40900b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 40910b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40920b661123Smrg ;; 4093bdcaa8d0Smrg 40940b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 40950b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40960b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40970b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40980b661123Smrg ;; 4099bdcaa8d0Smrg 41000b661123Smrg sysv4*MP*) 41010b661123Smrg if test -d /usr/nec ;then 41020b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 41030b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41040b661123Smrg fi 41050b661123Smrg ;; 410696ce994aSmrg 41070b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41080b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41090b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41100b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41110b661123Smrg ;; 4112bdcaa8d0Smrg 41130b661123Smrg unicos*) 41140b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41150b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41160b661123Smrg ;; 4117bdcaa8d0Smrg 41180b661123Smrg uts4*) 41190b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41200b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41210b661123Smrg ;; 4122bdcaa8d0Smrg 41230b661123Smrg *) 41240b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41250b661123Smrg ;; 41260b661123Smrg esac 41270b661123Smrg fi 41280b661123Smrg]) 41290b661123Smrgcase $host_os in 41300b661123Smrg # For platforms which do not support PIC, -DPIC is meaningless: 41310b661123Smrg *djgpp*) 41320b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41330b661123Smrg ;; 41340b661123Smrg *) 41350b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 41360b661123Smrg ;; 41370b661123Smrgesac 41380b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 41390b661123Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 41400b661123Smrg [How to pass a linker flag through the compiler]) 4141bdcaa8d0Smrg 41420b661123Smrg# 41430b661123Smrg# Check to make sure the PIC flag actually works. 41440b661123Smrg# 41450b661123Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 41460b661123Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 41470b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 41480b661123Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 41490b661123Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 41500b661123Smrg "" | " "*) ;; 41510b661123Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 41520b661123Smrg esac], 41530b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 41540b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 415596ce994aSmrgfi 41560b661123Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 41570b661123Smrg [Additional compiler flags for building library objects]) 4158bdcaa8d0Smrg 41590b661123Smrg# 41600b661123Smrg# Check to make sure the static flag actually works. 41610b661123Smrg# 41620b661123Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 41630b661123Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 41640b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 41650b661123Smrg $lt_tmp_static_flag, 41660b661123Smrg [], 41670b661123Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 41680b661123Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 41690b661123Smrg [Compiler flag to prevent dynamic linking]) 41700b661123Smrg])# _LT_COMPILER_PIC 417196ce994aSmrg 41720b661123Smrg 41730b661123Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 41740b661123Smrg# ---------------------------- 41750b661123Smrg# See if the linker supports building shared libraries. 41760b661123Smrgm4_defun([_LT_LINKER_SHLIBS], 41770b661123Smrg[AC_REQUIRE([LT_PATH_LD])dnl 41780b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 41790b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 41800b661123Smrgm4_require([_LT_DECL_EGREP])dnl 41810b661123Smrgm4_require([_LT_DECL_SED])dnl 41820b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 41830b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 41840b661123SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 41850b661123Smrgm4_if([$1], [CXX], [ 41860b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 41870b661123Smrg case $host_os in 41880b661123Smrg aix[[4-9]]*) 41890b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 41900b661123Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 41910b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 41920b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 41930b661123Smrg else 41940b661123Smrg _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' 419572313efbSmrg fi 419672313efbSmrg ;; 41970b661123Smrg pw32*) 41980b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 419996ce994aSmrg ;; 42000b661123Smrg cygwin* | mingw* | cegcc*) 42010b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 42020b661123Smrg ;; 42030b661123Smrg *) 42040b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42050b661123Smrg ;; 42060b661123Smrg esac 42070b661123Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42080b661123Smrg], [ 42090b661123Smrg runpath_var= 42100b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 42110b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 42120b661123Smrg _LT_TAGVAR(archive_cmds, $1)= 42130b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 42140b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 42150b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 42160b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 42170b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42180b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 42190b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 42200b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 42210b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 42220b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 42230b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 42240b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 42250b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 42260b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=no 42270b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 42280b661123Smrg _LT_TAGVAR(module_cmds, $1)= 42290b661123Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 42300b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 42310b661123Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 42320b661123Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 42330b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42340b661123Smrg # include_expsyms should be a list of space-separated symbols to be *always* 42350b661123Smrg # included in the symbol list 42360b661123Smrg _LT_TAGVAR(include_expsyms, $1)= 42370b661123Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 42380b661123Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 42390b661123Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 42400b661123Smrg # as well as any symbol that contains `d'. 42410b661123Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42420b661123Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 42430b661123Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 42440b661123Smrg # the symbol is explicitly referenced. Since portable code cannot 42450b661123Smrg # rely on this symbol name, it's probably fine to never include it in 42460b661123Smrg # preloaded symbol tables. 42470b661123Smrg # Exclude shared library initialization/finalization symbols. 42480b661123Smrgdnl Note also adjust exclude_expsyms for C++ above. 42490b661123Smrg extract_expsyms_cmds= 4250bdcaa8d0Smrg 42510b661123Smrg case $host_os in 42520b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 42530b661123Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 42540b661123Smrg # When not using gcc, we currently assume that we are using 42550b661123Smrg # Microsoft Visual C++. 42560b661123Smrg if test "$GCC" != yes; then 42570b661123Smrg with_gnu_ld=no 425872313efbSmrg fi 425972313efbSmrg ;; 42600b661123Smrg interix*) 42610b661123Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 42620b661123Smrg with_gnu_ld=yes 42630b661123Smrg ;; 42640b661123Smrg openbsd*) 42650b661123Smrg with_gnu_ld=no 42660b661123Smrg ;; 426772313efbSmrg esac 4268bdcaa8d0Smrg 42690b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 42700b661123Smrg if test "$with_gnu_ld" = yes; then 42710b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 42720b661123Smrg wlarc='${wl}' 4273bdcaa8d0Smrg 42740b661123Smrg # Set some defaults for GNU ld with shared library support. These 42750b661123Smrg # are reset later if shared libraries are not supported. Putting them 42760b661123Smrg # here allows them to be overridden if necessary. 42770b661123Smrg runpath_var=LD_RUN_PATH 42780b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 42790b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 42800b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 42810b661123Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 42820b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 42830b661123Smrg else 42840b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42850b661123Smrg fi 42860b661123Smrg supports_anon_versioning=no 42870b661123Smrg case `$LD -v 2>&1` in 42880b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 42890b661123Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 42900b661123Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 42910b661123Smrg *\ 2.11.*) ;; # other 2.11 versions 42920b661123Smrg *) supports_anon_versioning=yes ;; 42930b661123Smrg esac 4294bdcaa8d0Smrg 42950b661123Smrg # See if GNU ld supports shared libraries. 42960b661123Smrg case $host_os in 42970b661123Smrg aix[[3-9]]*) 42980b661123Smrg # On AIX/PPC, the GNU linker is very broken 42990b661123Smrg if test "$host_cpu" != ia64; then 43000b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 43010b661123Smrg cat <<_LT_EOF 1>&2 4302bdcaa8d0Smrg 43030b661123Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 43040b661123Smrg*** to be unable to reliably create shared libraries on AIX. 43050b661123Smrg*** Therefore, libtool is disabling shared libraries support. If you 43060b661123Smrg*** really care for shared libraries, you may want to modify your PATH 43070b661123Smrg*** so that a non-GNU linker is found, and then restart. 4308bdcaa8d0Smrg 43090b661123Smrg_LT_EOF 43100b661123Smrg fi 43110b661123Smrg ;; 4312bdcaa8d0Smrg 43130b661123Smrg amigaos*) 43140b661123Smrg case $host_cpu in 43150b661123Smrg powerpc) 43160b661123Smrg # see comment about AmigaOS4 .so support 43170b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43180b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 43190b661123Smrg ;; 43200b661123Smrg m68k) 43210b661123Smrg _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)' 43220b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43230b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 43240b661123Smrg ;; 43250b661123Smrg esac 43260b661123Smrg ;; 4327bdcaa8d0Smrg 43280b661123Smrg beos*) 43290b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 43300b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43310b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 43320b661123Smrg # support --undefined. This deserves some investigation. FIXME 43330b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43340b661123Smrg else 43350b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 43360b661123Smrg fi 43370b661123Smrg ;; 4338bdcaa8d0Smrg 43390b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 43400b661123Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 43410b661123Smrg # as there is no search path for DLLs. 43420b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43430b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43440b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 43450b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 43460b661123Smrg _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' 43470b661123Smrg 43480b661123Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 43490b661123Smrg _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' 43500b661123Smrg # If the export-symbols file already is a .def file (1st line 43510b661123Smrg # is EXPORTS), use it as is; otherwise, prepend... 43520b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 43530b661123Smrg cp $export_symbols $output_objdir/$soname.def; 43540b661123Smrg else 43550b661123Smrg echo EXPORTS > $output_objdir/$soname.def; 43560b661123Smrg cat $export_symbols >> $output_objdir/$soname.def; 43570b661123Smrg fi~ 43580b661123Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 43590b661123Smrg else 43600b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 43610b661123Smrg fi 43620b661123Smrg ;; 4363bdcaa8d0Smrg 43640b661123Smrg interix[[3-9]]*) 43650b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 43660b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 43670b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 43680b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 43690b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 43700b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 43710b661123Smrg # default) and relocated if they conflict, which is a slow very memory 43720b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 43730b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 43740b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 43750b661123Smrg _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' 43760b661123Smrg _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' 43770b661123Smrg ;; 4378bdcaa8d0Smrg 43790b661123Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 43800b661123Smrg tmp_diet=no 43810b661123Smrg if test "$host_os" = linux-dietlibc; then 43820b661123Smrg case $cc_basename in 43830b661123Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 43840b661123Smrg esac 43850b661123Smrg fi 43860b661123Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 43870b661123Smrg && test "$tmp_diet" = no 43880b661123Smrg then 43890b661123Smrg tmp_addflag= 43900b661123Smrg tmp_sharedflag='-shared' 43910b661123Smrg case $cc_basename,$host_cpu in 43920b661123Smrg pgcc*) # Portland Group C compiler 43930b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 43940b661123Smrg tmp_addflag=' $pic_flag' 43950b661123Smrg ;; 43960b661123Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 43970b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 43980b661123Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 43990b661123Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 44000b661123Smrg tmp_addflag=' -i_dynamic' ;; 44010b661123Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 44020b661123Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 44030b661123Smrg ifc* | ifort*) # Intel Fortran compiler 44040b661123Smrg tmp_addflag=' -nofor_main' ;; 44050b661123Smrg lf95*) # Lahey Fortran 8.1 44060b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 44070b661123Smrg tmp_sharedflag='--shared' ;; 44080b661123Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 44090b661123Smrg tmp_sharedflag='-qmkshrobj' 44100b661123Smrg tmp_addflag= ;; 44110b661123Smrg esac 44120b661123Smrg case `$CC -V 2>&1 | sed 5q` in 44130b661123Smrg *Sun\ C*) # Sun C 5.9 44140b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 44150b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 44160b661123Smrg tmp_sharedflag='-G' ;; 44170b661123Smrg *Sun\ F*) # Sun Fortran 8.3 44180b661123Smrg tmp_sharedflag='-G' ;; 44190b661123Smrg esac 44200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421bdcaa8d0Smrg 44220b661123Smrg if test "x$supports_anon_versioning" = xyes; then 44230b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44240b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44250b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44260b661123Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 44270b661123Smrg fi 4428bdcaa8d0Smrg 44290b661123Smrg case $cc_basename in 44300b661123Smrg xlf*) 44310b661123Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 44320b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 44330b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 44340b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 44350b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 44360b661123Smrg if test "x$supports_anon_versioning" = xyes; then 44370b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44380b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44390b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44400b661123Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 44410b661123Smrg fi 44420b661123Smrg ;; 44430b661123Smrg esac 44440b661123Smrg else 44450b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44460b661123Smrg fi 44470b661123Smrg ;; 4448bdcaa8d0Smrg 44490b661123Smrg netbsd*) 44500b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 44510b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 44520b661123Smrg wlarc= 44530b661123Smrg else 44540b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44550b661123Smrg _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' 44560b661123Smrg fi 44570b661123Smrg ;; 4458bdcaa8d0Smrg 44590b661123Smrg solaris*) 44600b661123Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 44610b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44620b661123Smrg cat <<_LT_EOF 1>&2 4463bdcaa8d0Smrg 44640b661123Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 44650b661123Smrg*** create shared libraries on Solaris systems. Therefore, libtool 44660b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 44670b661123Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 44680b661123Smrg*** your PATH or compiler configuration so that the native linker is 44690b661123Smrg*** used, and then restart. 4470bdcaa8d0Smrg 44710b661123Smrg_LT_EOF 44720b661123Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 44730b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44740b661123Smrg _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' 44750b661123Smrg else 44760b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44770b661123Smrg fi 44780b661123Smrg ;; 4479bdcaa8d0Smrg 44800b661123Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 44810b661123Smrg case `$LD -v 2>&1` in 44820b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 44830b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44840b661123Smrg cat <<_LT_EOF 1>&2 4485bdcaa8d0Smrg 44860b661123Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 44870b661123Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 44880b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 44890b661123Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 44900b661123Smrg*** your PATH or compiler configuration so that the native linker is 44910b661123Smrg*** used, and then restart. 4492bdcaa8d0Smrg 44930b661123Smrg_LT_EOF 44940b661123Smrg ;; 44950b661123Smrg *) 44960b661123Smrg # For security reasons, it is highly recommended that you always 44970b661123Smrg # use absolute paths for naming shared libraries, and exclude the 44980b661123Smrg # DT_RUNPATH tag from executables and libraries. But doing so 44990b661123Smrg # requires that you compile everything twice, which is a pain. 45000b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45010b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 45020b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45030b661123Smrg _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' 45040b661123Smrg else 45050b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 45060b661123Smrg fi 45070b661123Smrg ;; 45080b661123Smrg esac 45090b661123Smrg ;; 4510bdcaa8d0Smrg 45110b661123Smrg sunos4*) 45120b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 45130b661123Smrg wlarc= 45140b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 45150b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 45160b661123Smrg ;; 4517bdcaa8d0Smrg 45180b661123Smrg *) 45190b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45210b661123Smrg _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' 45220b661123Smrg else 45230b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 45240b661123Smrg fi 45250b661123Smrg ;; 45260b661123Smrg esac 4527bdcaa8d0Smrg 45280b661123Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 45290b661123Smrg runpath_var= 45300b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 45310b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 45320b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 45330b661123Smrg fi 45340b661123Smrg else 45350b661123Smrg # PORTME fill in a description of your system's linker (not GNU ld) 45360b661123Smrg case $host_os in 45370b661123Smrg aix3*) 45380b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 45390b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 45400b661123Smrg _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' 45410b661123Smrg # Note: this linker hardcodes the directories in LIBPATH if there 45420b661123Smrg # are no directories specified by -L. 45430b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 45440b661123Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 45450b661123Smrg # Neither direct hardcoding nor static linking is supported with a 45460b661123Smrg # broken collect2. 45470b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 45480b661123Smrg fi 45490b661123Smrg ;; 4550bdcaa8d0Smrg 45510b661123Smrg aix[[4-9]]*) 45520b661123Smrg if test "$host_cpu" = ia64; then 45530b661123Smrg # On IA64, the linker does run time linking by default, so we don't 45540b661123Smrg # have to do anything special. 45550b661123Smrg aix_use_runtimelinking=no 45560b661123Smrg exp_sym_flag='-Bexport' 45570b661123Smrg no_entry_flag="" 45580b661123Smrg else 45590b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 45600b661123Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45610b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45620b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45630b661123Smrg else 45640b661123Smrg _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' 45650b661123Smrg fi 45660b661123Smrg aix_use_runtimelinking=no 4567bdcaa8d0Smrg 45680b661123Smrg # Test if we are trying to use run time linking or normal 45690b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 45700b661123Smrg # need to do runtime linking. 45710b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 45720b661123Smrg for ld_flag in $LDFLAGS; do 45730b661123Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 45740b661123Smrg aix_use_runtimelinking=yes 45750b661123Smrg break 45760b661123Smrg fi 45770b661123Smrg done 45780b661123Smrg ;; 45790b661123Smrg esac 4580bdcaa8d0Smrg 45810b661123Smrg exp_sym_flag='-bexport' 45820b661123Smrg no_entry_flag='-bnoentry' 45830b661123Smrg fi 4584bdcaa8d0Smrg 45850b661123Smrg # When large executables or shared objects are built, AIX ld can 45860b661123Smrg # have problems creating the table of contents. If linking a library 45870b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 45880b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 45890b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590bdcaa8d0Smrg 45910b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 45920b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 45930b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 45940b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 45950b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 45960b661123Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597bdcaa8d0Smrg 45980b661123Smrg if test "$GCC" = yes; then 45990b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 46000b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 46010b661123Smrg # below for broken collect2 doesn't work under 4.3+ 46020b661123Smrg collect2name=`${CC} -print-prog-name=collect2` 46030b661123Smrg if test -f "$collect2name" && 46040b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 46050b661123Smrg then 46060b661123Smrg # We have reworked collect2 46070b661123Smrg : 46080b661123Smrg else 46090b661123Smrg # We have old collect2 46100b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 46110b661123Smrg # It fails to find uninstalled libraries when the uninstalled 46120b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 46130b661123Smrg # to unsupported forces relinking 46140b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46150b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46160b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46170b661123Smrg fi 46180b661123Smrg ;; 46190b661123Smrg esac 46200b661123Smrg shared_flag='-shared' 46210b661123Smrg if test "$aix_use_runtimelinking" = yes; then 46220b661123Smrg shared_flag="$shared_flag "'${wl}-G' 46230b661123Smrg fi 46240b661123Smrg else 46250b661123Smrg # not using gcc 46260b661123Smrg if test "$host_cpu" = ia64; then 46270b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 46280b661123Smrg # chokes on -Wl,-G. The following line is correct: 46290b661123Smrg shared_flag='-G' 46300b661123Smrg else 46310b661123Smrg if test "$aix_use_runtimelinking" = yes; then 46320b661123Smrg shared_flag='${wl}-G' 46330b661123Smrg else 46340b661123Smrg shared_flag='${wl}-bM:SRE' 46350b661123Smrg fi 46360b661123Smrg fi 46370b661123Smrg fi 4638bdcaa8d0Smrg 46390b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 46400b661123Smrg # It seems that -bexpall does not export symbols beginning with 46410b661123Smrg # underscore (_), so it is better to generate a list of symbols to export. 46420b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 46430b661123Smrg if test "$aix_use_runtimelinking" = yes; then 46440b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 46450b661123Smrg # -berok will link without error, but may produce a broken library. 46460b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 46470b661123Smrg # Determine the default libpath from the value encoded in an 46480b661123Smrg # empty executable. 46490b661123Smrg _LT_SYS_MODULE_PATH_AIX 46500b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46510b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 46520b661123Smrg else 46530b661123Smrg if test "$host_cpu" = ia64; then 46540b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 46550b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 46560b661123Smrg _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" 46570b661123Smrg else 46580b661123Smrg # Determine the default libpath from the value encoded in an 46590b661123Smrg # empty executable. 46600b661123Smrg _LT_SYS_MODULE_PATH_AIX 46610b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46620b661123Smrg # Warning - without using the other run time loading flags, 46630b661123Smrg # -berok will link without error, but may produce a broken library. 46640b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 46650b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 46660b661123Smrg # Exported symbols can be pulled into shared objects from archives 46670b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 46680b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 46690b661123Smrg # This is similar to how AIX traditionally builds its shared libraries. 46700b661123Smrg _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' 46710b661123Smrg fi 46720b661123Smrg fi 46730b661123Smrg ;; 4674bdcaa8d0Smrg 46750b661123Smrg amigaos*) 46760b661123Smrg case $host_cpu in 46770b661123Smrg powerpc) 46780b661123Smrg # see comment about AmigaOS4 .so support 46790b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 46800b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 46810b661123Smrg ;; 46820b661123Smrg m68k) 46830b661123Smrg _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)' 46840b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46850b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46860b661123Smrg ;; 46870b661123Smrg esac 46880b661123Smrg ;; 4689bdcaa8d0Smrg 46900b661123Smrg bsdi[[45]]*) 46910b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 46920b661123Smrg ;; 4693bdcaa8d0Smrg 46940b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 46950b661123Smrg # When not using gcc, we currently assume that we are using 46960b661123Smrg # Microsoft Visual C++. 46970b661123Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 46980b661123Smrg # no search path for DLLs. 46990b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 47000b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47010b661123Smrg # Tell ltmain to make .lib files, not .a files. 47020b661123Smrg libext=lib 47030b661123Smrg # Tell ltmain to make .dll files, not .so files. 47040b661123Smrg shrext_cmds=".dll" 47050b661123Smrg # FIXME: Setting linknames here is a bad hack. 47060b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 47070b661123Smrg # The linker will automatically build a .lib file if we build a DLL. 47080b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 47090b661123Smrg # FIXME: Should let the user specify the lib program. 47100b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 47110b661123Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 47120b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47130b661123Smrg ;; 4714bdcaa8d0Smrg 47150b661123Smrg darwin* | rhapsody*) 47160b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 47170b661123Smrg ;; 4718bdcaa8d0Smrg 47190b661123Smrg dgux*) 47200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 47210b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47220b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47230b661123Smrg ;; 4724bdcaa8d0Smrg 47250b661123Smrg freebsd1*) 47260b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47270b661123Smrg ;; 4728bdcaa8d0Smrg 47290b661123Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 47300b661123Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 47310b661123Smrg # does not break anything, and helps significantly (at the cost of a little 47320b661123Smrg # extra space). 47330b661123Smrg freebsd2.2*) 47340b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 47350b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47360b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47370b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47380b661123Smrg ;; 4739bdcaa8d0Smrg 47400b661123Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 47410b661123Smrg freebsd2*) 47420b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 47430b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47440b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47450b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47460b661123Smrg ;; 4747bdcaa8d0Smrg 47480b661123Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 47490b661123Smrg freebsd* | dragonfly*) 47500b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 47510b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47520b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47530b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47540b661123Smrg ;; 4755bdcaa8d0Smrg 47560b661123Smrg hpux9*) 47570b661123Smrg if test "$GCC" = yes; then 47580b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 47590b661123Smrg else 47600b661123Smrg _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' 47610b661123Smrg fi 47620b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47630b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47640b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765bdcaa8d0Smrg 47660b661123Smrg # hardcode_minus_L: Not really in the search PATH, 47670b661123Smrg # but as the default location of the library. 47680b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47690b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47700b661123Smrg ;; 4771bdcaa8d0Smrg 47720b661123Smrg hpux10*) 47730b661123Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47740b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 47750b661123Smrg else 47760b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 47770b661123Smrg fi 47780b661123Smrg if test "$with_gnu_ld" = no; then 47790b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47800b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 47810b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47820b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47830b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 47840b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47850b661123Smrg # hardcode_minus_L: Not really in the search PATH, 47860b661123Smrg # but as the default location of the library. 47870b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47880b661123Smrg fi 478972313efbSmrg ;; 47900b661123Smrg 47910b661123Smrg hpux11*) 47920b661123Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47930b661123Smrg case $host_cpu in 47940b661123Smrg hppa*64*) 47950b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 47960b661123Smrg ;; 47970b661123Smrg ia64*) 47980b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 47990b661123Smrg ;; 48000b661123Smrg *) 48010b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48020b661123Smrg ;; 48030b661123Smrg esac 48040b661123Smrg else 48050b661123Smrg case $host_cpu in 48060b661123Smrg hppa*64*) 48070b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 48080b661123Smrg ;; 48090b661123Smrg ia64*) 48100b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 48110b661123Smrg ;; 48120b661123Smrg *) 48130b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48140b661123Smrg ;; 48150b661123Smrg esac 48160b661123Smrg fi 48170b661123Smrg if test "$with_gnu_ld" = no; then 48180b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 48190b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48200b661123Smrg 48210b661123Smrg case $host_cpu in 48220b661123Smrg hppa*64*|ia64*) 48230b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 48240b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48250b661123Smrg ;; 48260b661123Smrg *) 48270b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48280b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48290b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48300b661123Smrg 48310b661123Smrg # hardcode_minus_L: Not really in the search PATH, 48320b661123Smrg # but as the default location of the library. 48330b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 48340b661123Smrg ;; 48350b661123Smrg esac 48360b661123Smrg fi 483772313efbSmrg ;; 4838bdcaa8d0Smrg 48390b661123Smrg irix5* | irix6* | nonstopux*) 48400b661123Smrg if test "$GCC" = yes; then 48410b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 48420b661123Smrg # Try to use the -exported_symbol ld option, if it does not 48430b661123Smrg # work, assume that -exports_file does not work either and 48440b661123Smrg # implicitly export all symbols. 48450b661123Smrg save_LDFLAGS="$LDFLAGS" 48460b661123Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 48470b661123Smrg AC_LINK_IFELSE(int foo(void) {}, 48480b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 48490b661123Smrg ) 48500b661123Smrg LDFLAGS="$save_LDFLAGS" 48510b661123Smrg else 48520b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 48530b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 48540b661123Smrg fi 48550b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 48560b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48570b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48580b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 48590b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 48600b661123Smrg ;; 4861bdcaa8d0Smrg 48620b661123Smrg netbsd*) 48630b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48640b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 48650b661123Smrg else 48660b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 48670b661123Smrg fi 48680b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48690b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48700b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48710b661123Smrg ;; 4872bdcaa8d0Smrg 48730b661123Smrg newsos6) 48740b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 48750b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48760b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48770b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48780b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48790b661123Smrg ;; 4880bdcaa8d0Smrg 48810b661123Smrg *nto* | *qnx*) 48820b661123Smrg ;; 4883bdcaa8d0Smrg 48840b661123Smrg openbsd*) 48850b661123Smrg if test -f /usr/libexec/ld.so; then 48860b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48870b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48880b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48890b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 48900b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 48910b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 48920b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48930b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48940b661123Smrg else 48950b661123Smrg case $host_os in 48960b661123Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 48970b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 48980b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48990b661123Smrg ;; 49000b661123Smrg *) 49010b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 49020b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49030b661123Smrg ;; 49040b661123Smrg esac 49050b661123Smrg fi 49060b661123Smrg else 49070b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49080b661123Smrg fi 49090b661123Smrg ;; 4910bdcaa8d0Smrg 49110b661123Smrg os2*) 49120b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 49130b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49140b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49150b661123Smrg _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' 49160b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 49170b661123Smrg ;; 4918bdcaa8d0Smrg 49190b661123Smrg osf3*) 49200b661123Smrg if test "$GCC" = yes; then 49210b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49220b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 49230b661123Smrg else 49240b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49250b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 49260b661123Smrg fi 49270b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49280b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49290b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49300b661123Smrg ;; 4931bdcaa8d0Smrg 49320b661123Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 49330b661123Smrg if test "$GCC" = yes; then 49340b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49350b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 49360b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49370b661123Smrg else 49380b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49390b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 49400b661123Smrg _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~ 49410b661123Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 4942bdcaa8d0Smrg 49430b661123Smrg # Both c and cxx compiler support -rpath directly 49440b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 49450b661123Smrg fi 49460b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49470b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49480b661123Smrg ;; 4949bdcaa8d0Smrg 49500b661123Smrg solaris*) 49510b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 49520b661123Smrg if test "$GCC" = yes; then 49530b661123Smrg wlarc='${wl}' 49540b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 49550b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49560b661123Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49570b661123Smrg else 49580b661123Smrg case `$CC -V 2>&1` in 49590b661123Smrg *"Compilers 5.0"*) 49600b661123Smrg wlarc='' 49610b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 49620b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49630b661123Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 49640b661123Smrg ;; 49650b661123Smrg *) 49660b661123Smrg wlarc='${wl}' 49670b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 49680b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49690b661123Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49700b661123Smrg ;; 49710b661123Smrg esac 49720b661123Smrg fi 49730b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 49740b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49750b661123Smrg case $host_os in 49760b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 49770b661123Smrg *) 49780b661123Smrg # The compiler driver will combine and reorder linker options, 49790b661123Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 49800b661123Smrg # but is careful enough not to reorder. 49810b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 49820b661123Smrg if test "$GCC" = yes; then 49830b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 49840b661123Smrg else 49850b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 49860b661123Smrg fi 49870b661123Smrg ;; 49880b661123Smrg esac 49890b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 49900b661123Smrg ;; 4991bdcaa8d0Smrg 49920b661123Smrg sunos4*) 49930b661123Smrg if test "x$host_vendor" = xsequent; then 49940b661123Smrg # Use $CC to link under sequent, because it throws in some extra .o 49950b661123Smrg # files that make .init and .fini sections work. 49960b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 49970b661123Smrg else 49980b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 49990b661123Smrg fi 50000b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50010b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50020b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50030b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50040b661123Smrg ;; 5005bdcaa8d0Smrg 50060b661123Smrg sysv4) 50070b661123Smrg case $host_vendor in 50080b661123Smrg sni) 50090b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50100b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 50110b661123Smrg ;; 50120b661123Smrg siemens) 50130b661123Smrg ## LD is ld it makes a PLAMLIB 50140b661123Smrg ## CC just makes a GrossModule. 50150b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 50160b661123Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 50170b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 50180b661123Smrg ;; 50190b661123Smrg motorola) 50200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50210b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 50220b661123Smrg ;; 50230b661123Smrg esac 50240b661123Smrg runpath_var='LD_RUN_PATH' 50250b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50260b661123Smrg ;; 5027bdcaa8d0Smrg 50280b661123Smrg sysv4.3*) 50290b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50300b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50310b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 50320b661123Smrg ;; 5033bdcaa8d0Smrg 50340b661123Smrg sysv4*MP*) 50350b661123Smrg if test -d /usr/nec; then 50360b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50370b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50380b661123Smrg runpath_var=LD_RUN_PATH 50390b661123Smrg hardcode_runpath_var=yes 50400b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50410b661123Smrg fi 50420b661123Smrg ;; 5043bdcaa8d0Smrg 50440b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 50450b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50460b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50470b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50480b661123Smrg runpath_var='LD_RUN_PATH' 5049bdcaa8d0Smrg 50500b661123Smrg if test "$GCC" = yes; then 50510b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50520b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50530b661123Smrg else 50540b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50550b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50560b661123Smrg fi 50570b661123Smrg ;; 5058bdcaa8d0Smrg 50590b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 50600b661123Smrg # Note: We can NOT use -z defs as we might desire, because we do not 50610b661123Smrg # link with -lc, and that would cause any symbols used from libc to 50620b661123Smrg # always be unresolved, which means just about no library would 50630b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 50640b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 50650b661123Smrg # as -z defs. 50660b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50670b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 50680b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50690b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50700b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 50710b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50720b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50730b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 50740b661123Smrg runpath_var='LD_RUN_PATH' 5075bdcaa8d0Smrg 50760b661123Smrg if test "$GCC" = yes; then 50770b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50780b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50790b661123Smrg else 50800b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50810b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50820b661123Smrg fi 50830b661123Smrg ;; 5084bdcaa8d0Smrg 50850b661123Smrg uts4*) 50860b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50870b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50880b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50890b661123Smrg ;; 5090bdcaa8d0Smrg 50910b661123Smrg *) 50920b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50930b661123Smrg ;; 50940b661123Smrg esac 5095bdcaa8d0Smrg 50960b661123Smrg if test x$host_vendor = xsni; then 50970b661123Smrg case $host in 50980b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 50990b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 51000b661123Smrg ;; 51010b661123Smrg esac 51020b661123Smrg fi 51030b661123Smrg fi 51040b661123Smrg]) 51050b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 51060b661123Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107bdcaa8d0Smrg 51080b661123Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109bdcaa8d0Smrg 51100b661123Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 51110b661123Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 51120b661123Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 51130b661123Smrg [The commands to extract the exported symbol list from a shared archive]) 5114bdcaa8d0Smrg 51150b661123Smrg# 51160b661123Smrg# Do we need to explicitly link libc? 51170b661123Smrg# 51180b661123Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 51190b661123Smrgx|xyes) 51200b661123Smrg # Assume -lc should be added 51210b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 512272313efbSmrg 51230b661123Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 51240b661123Smrg case $_LT_TAGVAR(archive_cmds, $1) in 51250b661123Smrg *'~'*) 51260b661123Smrg # FIXME: we may have to deal with multi-command sequences. 51270b661123Smrg ;; 51280b661123Smrg '$CC '*) 51290b661123Smrg # Test whether the compiler implicitly links with -lc since on some 51300b661123Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 51310b661123Smrg # to ld, don't add -lc before -lgcc. 51320b661123Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 51330b661123Smrg $RM conftest* 51340b661123Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135bdcaa8d0Smrg 51360b661123Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 51370b661123Smrg soname=conftest 51380b661123Smrg lib=conftest 51390b661123Smrg libobjs=conftest.$ac_objext 51400b661123Smrg deplibs= 51410b661123Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 51420b661123Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 51430b661123Smrg compiler_flags=-v 51440b661123Smrg linker_flags=-v 51450b661123Smrg verstring= 51460b661123Smrg output_objdir=. 51470b661123Smrg libname=conftest 51480b661123Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 51490b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 51500b661123Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 51510b661123Smrg then 51520b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 51530b661123Smrg else 51540b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51550b661123Smrg fi 51560b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 51570b661123Smrg else 51580b661123Smrg cat conftest.err 1>&5 51590b661123Smrg fi 51600b661123Smrg $RM conftest* 51610b661123Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 51620b661123Smrg ;; 51630b661123Smrg esac 51640b661123Smrg fi 51650b661123Smrg ;; 51660b661123Smrgesac 5167bdcaa8d0Smrg 51680b661123Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 51690b661123Smrg [Whether or not to add -lc for building shared libraries]) 51700b661123Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 51710b661123Smrg [enable_shared_with_static_runtimes], [0], 51720b661123Smrg [Whether or not to disallow shared libs when runtime libs are static]) 51730b661123Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 51740b661123Smrg [Compiler flag to allow reflexive dlopens]) 51750b661123Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 51760b661123Smrg [Compiler flag to generate shared objects directly from archives]) 51770b661123Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 51780b661123Smrg [Whether the compiler copes with passing no objects directly]) 51790b661123Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 51800b661123Smrg [Create an old-style archive from a shared archive]) 51810b661123Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 51820b661123Smrg [Create a temporary old-style archive to link instead of a shared archive]) 51830b661123Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 51840b661123Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 51850b661123Smrg_LT_TAGDECL([], [module_cmds], [2], 51860b661123Smrg [Commands used to build a loadable module if different from building 51870b661123Smrg a shared archive.]) 51880b661123Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 51890b661123Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 51900b661123Smrg [Whether we are building with GNU ld or not]) 51910b661123Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 51920b661123Smrg [Flag that allows shared libraries with undefined symbols to be built]) 51930b661123Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 51940b661123Smrg [Flag that enforces no undefined symbols]) 51950b661123Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 51960b661123Smrg [Flag to hardcode $libdir into a binary during linking. 51970b661123Smrg This must work even if $libdir does not exist]) 51980b661123Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 51990b661123Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 52000b661123Smrg during linking. This must work even if $libdir does not exist]]) 52010b661123Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 52020b661123Smrg [Whether we need a single "-rpath" flag with a separated argument]) 52030b661123Smrg_LT_TAGDECL([], [hardcode_direct], [0], 52040b661123Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52050b661123Smrg DIR into the resulting binary]) 52060b661123Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 52070b661123Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52080b661123Smrg DIR into the resulting binary and the resulting library dependency is 52090b661123Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 52100b661123Smrg library is relocated]) 52110b661123Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 52120b661123Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 52130b661123Smrg into the resulting binary]) 52140b661123Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 52150b661123Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 52160b661123Smrg into the resulting binary]) 52170b661123Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 52180b661123Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 52190b661123Smrg into the library and all subsequent libraries and executables linked 52200b661123Smrg against it]) 52210b661123Smrg_LT_TAGDECL([], [inherit_rpath], [0], 52220b661123Smrg [Set to yes if linker adds runtime paths of dependent libraries 52230b661123Smrg to runtime path list]) 52240b661123Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 52250b661123Smrg [Whether libtool must link a program against all its dependency libraries]) 52260b661123Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 52270b661123Smrg [Fix the shell variable $srcfile for the compiler]) 52280b661123Smrg_LT_TAGDECL([], [always_export_symbols], [0], 52290b661123Smrg [Set to "yes" if exported symbols are required]) 52300b661123Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 52310b661123Smrg [The commands to list exported symbols]) 52320b661123Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 52330b661123Smrg [Symbols that should not be listed in the preloaded symbols]) 52340b661123Smrg_LT_TAGDECL([], [include_expsyms], [1], 52350b661123Smrg [Symbols that must always be exported]) 52360b661123Smrg_LT_TAGDECL([], [prelink_cmds], [2], 52370b661123Smrg [Commands necessary for linking programs (against libraries) with templates]) 52380b661123Smrg_LT_TAGDECL([], [file_list_spec], [1], 52390b661123Smrg [Specify filename containing input files]) 52400b661123Smrgdnl FIXME: Not yet implemented 52410b661123Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 52420b661123Smrgdnl [Compiler flag to generate thread safe objects]) 52430b661123Smrg])# _LT_LINKER_SHLIBS 52440b661123Smrg 52450b661123Smrg 52460b661123Smrg# _LT_LANG_C_CONFIG([TAG]) 52470b661123Smrg# ------------------------ 52480b661123Smrg# Ensure that the configuration variables for a C compiler are suitably 52490b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 52500b661123Smrg# the compiler configuration to `libtool'. 52510b661123Smrgm4_defun([_LT_LANG_C_CONFIG], 52520b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 52530b661123Smrglt_save_CC="$CC" 52540b661123SmrgAC_LANG_PUSH(C) 5255bdcaa8d0Smrg 52560b661123Smrg# Source file extension for C test sources. 52570b661123Smrgac_ext=c 5258bdcaa8d0Smrg 52590b661123Smrg# Object file extension for compiled C test sources. 52600b661123Smrgobjext=o 52610b661123Smrg_LT_TAGVAR(objext, $1)=$objext 5262bdcaa8d0Smrg 52630b661123Smrg# Code to be used in simple compile tests 52640b661123Smrglt_simple_compile_test_code="int some_variable = 0;" 5265bdcaa8d0Smrg 52660b661123Smrg# Code to be used in simple link tests 52670b661123Smrglt_simple_link_test_code='int main(){return(0);}' 5268bdcaa8d0Smrg 52690b661123Smrg_LT_TAG_COMPILER 52700b661123Smrg# Save the default compiler, since it gets overwritten when the other 52710b661123Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 52720b661123Smrgcompiler_DEFAULT=$CC 5273bdcaa8d0Smrg 52740b661123Smrg# save warnings/boilerplate of simple test code 52750b661123Smrg_LT_COMPILER_BOILERPLATE 52760b661123Smrg_LT_LINKER_BOILERPLATE 5277bdcaa8d0Smrg 52780b661123Smrgif test -n "$compiler"; then 52790b661123Smrg _LT_COMPILER_NO_RTTI($1) 52800b661123Smrg _LT_COMPILER_PIC($1) 52810b661123Smrg _LT_COMPILER_C_O($1) 52820b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 52830b661123Smrg _LT_LINKER_SHLIBS($1) 52840b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 52850b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 52860b661123Smrg LT_SYS_DLOPEN_SELF 52870b661123Smrg _LT_CMD_STRIPLIB 52880b661123Smrg 52890b661123Smrg # Report which library types will actually be built 52900b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 52910b661123Smrg AC_MSG_RESULT([$can_build_shared]) 52920b661123Smrg 52930b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 52940b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 52950b661123Smrg 52960b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 52970b661123Smrg # are all built from PIC. 52980b661123Smrg case $host_os in 52990b661123Smrg aix3*) 53000b661123Smrg test "$enable_shared" = yes && enable_static=no 53010b661123Smrg if test -n "$RANLIB"; then 53020b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 53030b661123Smrg postinstall_cmds='$RANLIB $lib' 53040b661123Smrg fi 53050b661123Smrg ;; 5306bdcaa8d0Smrg 53070b661123Smrg aix[[4-9]]*) 53080b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 53090b661123Smrg test "$enable_shared" = yes && enable_static=no 53100b661123Smrg fi 53110b661123Smrg ;; 53120b661123Smrg esac 53130b661123Smrg AC_MSG_RESULT([$enable_shared]) 5314bdcaa8d0Smrg 53150b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 53160b661123Smrg # Make sure either enable_shared or enable_static is yes. 53170b661123Smrg test "$enable_shared" = yes || enable_static=yes 53180b661123Smrg AC_MSG_RESULT([$enable_static]) 5319bdcaa8d0Smrg 53200b661123Smrg _LT_CONFIG($1) 53210b661123Smrgfi 53220b661123SmrgAC_LANG_POP 53230b661123SmrgCC="$lt_save_CC" 53240b661123Smrg])# _LT_LANG_C_CONFIG 5325bdcaa8d0Smrg 532672313efbSmrg 53270b661123Smrg# _LT_PROG_CXX 53280b661123Smrg# ------------ 53290b661123Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 53300b661123Smrg# compiler, we have our own version here. 53310b661123Smrgm4_defun([_LT_PROG_CXX], 53320b661123Smrg[ 53330b661123Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 53340b661123SmrgAC_PROG_CXX 53350b661123Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 53360b661123Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 53370b661123Smrg (test "X$CXX" != "Xg++"))) ; then 53380b661123Smrg AC_PROG_CXXCPP 53390b661123Smrgelse 53400b661123Smrg _lt_caught_CXX_error=yes 53410b661123Smrgfi 53420b661123Smrgpopdef([AC_MSG_ERROR]) 53430b661123Smrg])# _LT_PROG_CXX 534472313efbSmrg 53450b661123Smrgdnl aclocal-1.4 backwards compatibility: 53460b661123Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 534772313efbSmrg 534872313efbSmrg 53490b661123Smrg# _LT_LANG_CXX_CONFIG([TAG]) 53500b661123Smrg# -------------------------- 53510b661123Smrg# Ensure that the configuration variables for a C++ compiler are suitably 53520b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 53530b661123Smrg# the compiler configuration to `libtool'. 53540b661123Smrgm4_defun([_LT_LANG_CXX_CONFIG], 53550b661123Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 53560b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 53570b661123Smrgm4_require([_LT_DECL_EGREP])dnl 53580b661123Smrg 53590b661123SmrgAC_LANG_PUSH(C++) 53600b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 53610b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 53620b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 53630b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 53640b661123Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 53650b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 53660b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 53670b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 53680b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53690b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 53700b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 53710b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 53720b661123Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 53730b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 53740b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 53750b661123Smrg_LT_TAGVAR(module_cmds, $1)= 53760b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 53770b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 53780b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 53790b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 53800b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 53810b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 538272313efbSmrg 53830b661123Smrg# Source file extension for C++ test sources. 53840b661123Smrgac_ext=cpp 5385bdcaa8d0Smrg 53860b661123Smrg# Object file extension for compiled C++ test sources. 53870b661123Smrgobjext=o 53880b661123Smrg_LT_TAGVAR(objext, $1)=$objext 53890b661123Smrg 53900b661123Smrg# No sense in running all these tests if we already determined that 53910b661123Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 53920b661123Smrg# are currently assumed to apply to all compilers on this platform, 53930b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 53940b661123Smrgif test "$_lt_caught_CXX_error" != yes; then 53950b661123Smrg # Code to be used in simple compile tests 53960b661123Smrg lt_simple_compile_test_code="int some_variable = 0;" 53970b661123Smrg 53980b661123Smrg # Code to be used in simple link tests 53990b661123Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 54000b661123Smrg 54010b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 54020b661123Smrg _LT_TAG_COMPILER 54030b661123Smrg 54040b661123Smrg # save warnings/boilerplate of simple test code 54050b661123Smrg _LT_COMPILER_BOILERPLATE 54060b661123Smrg _LT_LINKER_BOILERPLATE 54070b661123Smrg 54080b661123Smrg # Allow CC to be a program name with arguments. 54090b661123Smrg lt_save_CC=$CC 54100b661123Smrg lt_save_LD=$LD 54110b661123Smrg lt_save_GCC=$GCC 54120b661123Smrg GCC=$GXX 54130b661123Smrg lt_save_with_gnu_ld=$with_gnu_ld 54140b661123Smrg lt_save_path_LD=$lt_cv_path_LD 54150b661123Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 54160b661123Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 54170b661123Smrg else 54180b661123Smrg $as_unset lt_cv_prog_gnu_ld 54190b661123Smrg fi 54200b661123Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 54210b661123Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 54220b661123Smrg else 54230b661123Smrg $as_unset lt_cv_path_LD 54240b661123Smrg fi 54250b661123Smrg test -z "${LDCXX+set}" || LD=$LDCXX 54260b661123Smrg CC=${CXX-"c++"} 54270b661123Smrg compiler=$CC 54280b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 54290b661123Smrg _LT_CC_BASENAME([$compiler]) 5430bdcaa8d0Smrg 54310b661123Smrg if test -n "$compiler"; then 54320b661123Smrg # We don't want -fno-exception when compiling C++ code, so set the 54330b661123Smrg # no_builtin_flag separately 54340b661123Smrg if test "$GXX" = yes; then 54350b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 54360b661123Smrg else 54370b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 54380b661123Smrg fi 5439bdcaa8d0Smrg 54400b661123Smrg if test "$GXX" = yes; then 54410b661123Smrg # Set up default GNU C++ configuration 5442bdcaa8d0Smrg 54430b661123Smrg LT_PATH_LD 544472313efbSmrg 54450b661123Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 54460b661123Smrg # archiving commands below assume that GNU ld is being used. 54470b661123Smrg if test "$with_gnu_ld" = yes; then 54480b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 54490b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 545072313efbSmrg 54510b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54520b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 545372313efbSmrg 54540b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 54550b661123Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 54560b661123Smrg # investigate it a little bit more. (MM) 54570b661123Smrg wlarc='${wl}' 545872313efbSmrg 54590b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 54600b661123Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 54610b661123Smrg $GREP 'no-whole-archive' > /dev/null; then 54620b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 54630b661123Smrg else 54640b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 54650b661123Smrg fi 54660b661123Smrg else 54670b661123Smrg with_gnu_ld=no 54680b661123Smrg wlarc= 54690b661123Smrg 54700b661123Smrg # A generic and very simple default shared library creation 54710b661123Smrg # command for GNU C++ for the case where it uses the native 54720b661123Smrg # linker, instead of GNU ld. If possible, this setting should 54730b661123Smrg # overridden to take advantage of the native linker features on 54740b661123Smrg # the platform it is being used on. 54750b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 54760b661123Smrg fi 547772313efbSmrg 54780b661123Smrg # Commands to make compiler produce verbose output that lists 54790b661123Smrg # what "hidden" libraries, object files and flags are used when 54800b661123Smrg # linking a shared library. 54810b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 548272313efbSmrg 54830b661123Smrg else 54840b661123Smrg GXX=no 54850b661123Smrg with_gnu_ld=no 54860b661123Smrg wlarc= 54870b661123Smrg fi 548872313efbSmrg 54890b661123Smrg # PORTME: fill in a description of your system's C++ link characteristics 54900b661123Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 54910b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 54920b661123Smrg case $host_os in 54930b661123Smrg aix3*) 54940b661123Smrg # FIXME: insert proper C++ library support 54950b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54960b661123Smrg ;; 54970b661123Smrg aix[[4-9]]*) 54980b661123Smrg if test "$host_cpu" = ia64; then 54990b661123Smrg # On IA64, the linker does run time linking by default, so we don't 55000b661123Smrg # have to do anything special. 55010b661123Smrg aix_use_runtimelinking=no 55020b661123Smrg exp_sym_flag='-Bexport' 55030b661123Smrg no_entry_flag="" 55040b661123Smrg else 55050b661123Smrg aix_use_runtimelinking=no 55060b661123Smrg 55070b661123Smrg # Test if we are trying to use run time linking or normal 55080b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 55090b661123Smrg # need to do runtime linking. 55100b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 55110b661123Smrg for ld_flag in $LDFLAGS; do 55120b661123Smrg case $ld_flag in 55130b661123Smrg *-brtl*) 55140b661123Smrg aix_use_runtimelinking=yes 55150b661123Smrg break 55160b661123Smrg ;; 55170b661123Smrg esac 55180b661123Smrg done 55190b661123Smrg ;; 55200b661123Smrg esac 552172313efbSmrg 55220b661123Smrg exp_sym_flag='-bexport' 55230b661123Smrg no_entry_flag='-bnoentry' 55240b661123Smrg fi 552572313efbSmrg 55260b661123Smrg # When large executables or shared objects are built, AIX ld can 55270b661123Smrg # have problems creating the table of contents. If linking a library 55280b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 55290b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 55300b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 55310b661123Smrg 55320b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 55330b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55340b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 55350b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55360b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55370b661123Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 55380b661123Smrg 55390b661123Smrg if test "$GXX" = yes; then 55400b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 55410b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 55420b661123Smrg # below for broken collect2 doesn't work under 4.3+ 55430b661123Smrg collect2name=`${CC} -print-prog-name=collect2` 55440b661123Smrg if test -f "$collect2name" && 55450b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 55460b661123Smrg then 55470b661123Smrg # We have reworked collect2 55480b661123Smrg : 55490b661123Smrg else 55500b661123Smrg # We have old collect2 55510b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55520b661123Smrg # It fails to find uninstalled libraries when the uninstalled 55530b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 55540b661123Smrg # to unsupported forces relinking 55550b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55560b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55570b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55580b661123Smrg fi 55590b661123Smrg esac 55600b661123Smrg shared_flag='-shared' 55610b661123Smrg if test "$aix_use_runtimelinking" = yes; then 55620b661123Smrg shared_flag="$shared_flag "'${wl}-G' 55630b661123Smrg fi 55640b661123Smrg else 55650b661123Smrg # not using gcc 55660b661123Smrg if test "$host_cpu" = ia64; then 55670b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55680b661123Smrg # chokes on -Wl,-G. The following line is correct: 55690b661123Smrg shared_flag='-G' 55700b661123Smrg else 55710b661123Smrg if test "$aix_use_runtimelinking" = yes; then 55720b661123Smrg shared_flag='${wl}-G' 55730b661123Smrg else 55740b661123Smrg shared_flag='${wl}-bM:SRE' 55750b661123Smrg fi 55760b661123Smrg fi 55770b661123Smrg fi 557872313efbSmrg 55790b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 55800b661123Smrg # It seems that -bexpall does not export symbols beginning with 55810b661123Smrg # underscore (_), so it is better to generate a list of symbols to 55820b661123Smrg # export. 55830b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55840b661123Smrg if test "$aix_use_runtimelinking" = yes; then 55850b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 55860b661123Smrg # -berok will link without error, but may produce a broken library. 55870b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55880b661123Smrg # Determine the default libpath from the value encoded in an empty 55890b661123Smrg # executable. 55900b661123Smrg _LT_SYS_MODULE_PATH_AIX 55910b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 55920b661123Smrg 55930b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 55940b661123Smrg else 55950b661123Smrg if test "$host_cpu" = ia64; then 55960b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 55970b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55980b661123Smrg _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" 55990b661123Smrg else 56000b661123Smrg # Determine the default libpath from the value encoded in an 56010b661123Smrg # empty executable. 56020b661123Smrg _LT_SYS_MODULE_PATH_AIX 56030b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 56040b661123Smrg # Warning - without using the other run time loading flags, 56050b661123Smrg # -berok will link without error, but may produce a broken library. 56060b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 56070b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 56080b661123Smrg # Exported symbols can be pulled into shared objects from archives 56090b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 56100b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56110b661123Smrg # This is similar to how AIX traditionally builds its shared 56120b661123Smrg # libraries. 56130b661123Smrg _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' 56140b661123Smrg fi 56150b661123Smrg fi 56160b661123Smrg ;; 561772313efbSmrg 56180b661123Smrg beos*) 56190b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 56200b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56210b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 56220b661123Smrg # support --undefined. This deserves some investigation. FIXME 56230b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 56240b661123Smrg else 56250b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56260b661123Smrg fi 56270b661123Smrg ;; 562872313efbSmrg 56290b661123Smrg chorus*) 56300b661123Smrg case $cc_basename in 56310b661123Smrg *) 56320b661123Smrg # FIXME: insert proper C++ library support 56330b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56340b661123Smrg ;; 56350b661123Smrg esac 56360b661123Smrg ;; 563772313efbSmrg 56380b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 56390b661123Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 56400b661123Smrg # as there is no search path for DLLs. 56410b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56420b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56430b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 56440b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56450b661123Smrg 56460b661123Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 56470b661123Smrg _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' 56480b661123Smrg # If the export-symbols file already is a .def file (1st line 56490b661123Smrg # is EXPORTS), use it as is; otherwise, prepend... 56500b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 56510b661123Smrg cp $export_symbols $output_objdir/$soname.def; 56520b661123Smrg else 56530b661123Smrg echo EXPORTS > $output_objdir/$soname.def; 56540b661123Smrg cat $export_symbols >> $output_objdir/$soname.def; 56550b661123Smrg fi~ 56560b661123Smrg $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' 56570b661123Smrg else 56580b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56590b661123Smrg fi 56600b661123Smrg ;; 56610b661123Smrg darwin* | rhapsody*) 56620b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 56630b661123Smrg ;; 566472313efbSmrg 56650b661123Smrg dgux*) 56660b661123Smrg case $cc_basename in 56670b661123Smrg ec++*) 56680b661123Smrg # FIXME: insert proper C++ library support 56690b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56700b661123Smrg ;; 56710b661123Smrg ghcx*) 56720b661123Smrg # Green Hills C++ Compiler 56730b661123Smrg # FIXME: insert proper C++ library support 56740b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56750b661123Smrg ;; 56760b661123Smrg *) 56770b661123Smrg # FIXME: insert proper C++ library support 56780b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56790b661123Smrg ;; 56800b661123Smrg esac 56810b661123Smrg ;; 568272313efbSmrg 56830b661123Smrg freebsd[[12]]*) 56840b661123Smrg # C++ shared libraries reported to be fairly broken before 56850b661123Smrg # switch to ELF 56860b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56870b661123Smrg ;; 568872313efbSmrg 56890b661123Smrg freebsd-elf*) 56900b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 56910b661123Smrg ;; 569272313efbSmrg 56930b661123Smrg freebsd* | dragonfly*) 56940b661123Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 56950b661123Smrg # conventions 56960b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 56970b661123Smrg ;; 569872313efbSmrg 56990b661123Smrg gnu*) 57000b661123Smrg ;; 570172313efbSmrg 57020b661123Smrg hpux9*) 57030b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57040b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57050b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57060b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57070b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57080b661123Smrg # but as the default 57090b661123Smrg # location of the library. 57100b661123Smrg 57110b661123Smrg case $cc_basename in 57120b661123Smrg CC*) 57130b661123Smrg # FIXME: insert proper C++ library support 57140b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57150b661123Smrg ;; 57160b661123Smrg aCC*) 57170b661123Smrg _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' 57180b661123Smrg # Commands to make compiler produce verbose output that lists 57190b661123Smrg # what "hidden" libraries, object files and flags are used when 57200b661123Smrg # linking a shared library. 57210b661123Smrg # 57220b661123Smrg # There doesn't appear to be a way to prevent this compiler from 57230b661123Smrg # explicitly linking system object files so we need to strip them 57240b661123Smrg # from the output so that they don't get included in the library 57250b661123Smrg # dependencies. 57260b661123Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 57270b661123Smrg ;; 57280b661123Smrg *) 57290b661123Smrg if test "$GXX" = yes; then 57300b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 57310b661123Smrg else 57320b661123Smrg # FIXME: insert proper C++ library support 57330b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57340b661123Smrg fi 57350b661123Smrg ;; 57360b661123Smrg esac 57370b661123Smrg ;; 573872313efbSmrg 57390b661123Smrg hpux10*|hpux11*) 57400b661123Smrg if test $with_gnu_ld = no; then 57410b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57420b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57430b661123Smrg 57440b661123Smrg case $host_cpu in 57450b661123Smrg hppa*64*|ia64*) 57460b661123Smrg ;; 57470b661123Smrg *) 57480b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57490b661123Smrg ;; 57500b661123Smrg esac 57510b661123Smrg fi 57520b661123Smrg case $host_cpu in 57530b661123Smrg hppa*64*|ia64*) 57540b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57550b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57560b661123Smrg ;; 57570b661123Smrg *) 57580b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57590b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57600b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57610b661123Smrg # but as the default 57620b661123Smrg # location of the library. 57630b661123Smrg ;; 57640b661123Smrg esac 57650b661123Smrg 57660b661123Smrg case $cc_basename in 57670b661123Smrg CC*) 57680b661123Smrg # FIXME: insert proper C++ library support 57690b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57700b661123Smrg ;; 57710b661123Smrg aCC*) 57720b661123Smrg case $host_cpu in 57730b661123Smrg hppa*64*) 57740b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57750b661123Smrg ;; 57760b661123Smrg ia64*) 57770b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57780b661123Smrg ;; 57790b661123Smrg *) 57800b661123Smrg _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' 57810b661123Smrg ;; 57820b661123Smrg esac 57830b661123Smrg # Commands to make compiler produce verbose output that lists 57840b661123Smrg # what "hidden" libraries, object files and flags are used when 57850b661123Smrg # linking a shared library. 57860b661123Smrg # 57870b661123Smrg # There doesn't appear to be a way to prevent this compiler from 57880b661123Smrg # explicitly linking system object files so we need to strip them 57890b661123Smrg # from the output so that they don't get included in the library 57900b661123Smrg # dependencies. 57910b661123Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 57920b661123Smrg ;; 57930b661123Smrg *) 57940b661123Smrg if test "$GXX" = yes; then 57950b661123Smrg if test $with_gnu_ld = no; then 57960b661123Smrg case $host_cpu in 57970b661123Smrg hppa*64*) 57980b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57990b661123Smrg ;; 58000b661123Smrg ia64*) 58010b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 58020b661123Smrg ;; 58030b661123Smrg *) 58040b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 58050b661123Smrg ;; 58060b661123Smrg esac 58070b661123Smrg fi 58080b661123Smrg else 58090b661123Smrg # FIXME: insert proper C++ library support 58100b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58110b661123Smrg fi 58120b661123Smrg ;; 58130b661123Smrg esac 58140b661123Smrg ;; 581572313efbSmrg 58160b661123Smrg interix[[3-9]]*) 58170b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58180b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58190b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58200b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58210b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58220b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58230b661123Smrg # default) and relocated if they conflict, which is a slow very memory 58240b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 58250b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58260b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58270b661123Smrg _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' 58280b661123Smrg _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' 58290b661123Smrg ;; 58300b661123Smrg irix5* | irix6*) 58310b661123Smrg case $cc_basename in 58320b661123Smrg CC*) 58330b661123Smrg # SGI C++ 58340b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 58350b661123Smrg 58360b661123Smrg # Archives containing C++ object files must be created using 58370b661123Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 58380b661123Smrg # necessary to make sure instantiated templates are included 58390b661123Smrg # in the archive. 58400b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 58410b661123Smrg ;; 58420b661123Smrg *) 58430b661123Smrg if test "$GXX" = yes; then 58440b661123Smrg if test "$with_gnu_ld" = no; then 58450b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 58460b661123Smrg else 58470b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 58480b661123Smrg fi 58490b661123Smrg fi 58500b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58510b661123Smrg ;; 58520b661123Smrg esac 58530b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58540b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58550b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58560b661123Smrg ;; 585772313efbSmrg 58580b661123Smrg linux* | k*bsd*-gnu) 58590b661123Smrg case $cc_basename in 58600b661123Smrg KCC*) 58610b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 58620b661123Smrg 58630b661123Smrg # KCC will only create a shared library if the output file 58640b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 58650b661123Smrg # to its proper name (with version) after linking. 58660b661123Smrg _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' 58670b661123Smrg _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' 58680b661123Smrg # Commands to make compiler produce verbose output that lists 58690b661123Smrg # what "hidden" libraries, object files and flags are used when 58700b661123Smrg # linking a shared library. 58710b661123Smrg # 58720b661123Smrg # There doesn't appear to be a way to prevent this compiler from 58730b661123Smrg # explicitly linking system object files so we need to strip them 58740b661123Smrg # from the output so that they don't get included in the library 58750b661123Smrg # dependencies. 58760b661123Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 58770b661123Smrg 58780b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58790b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58800b661123Smrg 58810b661123Smrg # Archives containing C++ object files must be created using 58820b661123Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 58830b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 58840b661123Smrg ;; 58850b661123Smrg icpc* | ecpc* ) 58860b661123Smrg # Intel C++ 58870b661123Smrg with_gnu_ld=yes 58880b661123Smrg # version 8.0 and above of icpc choke on multiply defined symbols 58890b661123Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 58900b661123Smrg # earlier do not add the objects themselves. 58910b661123Smrg case `$CC -V 2>&1` in 58920b661123Smrg *"Version 7."*) 58930b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 58940b661123Smrg _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' 58950b661123Smrg ;; 58960b661123Smrg *) # Version 8.0 or newer 58970b661123Smrg tmp_idyn= 58980b661123Smrg case $host_cpu in 58990b661123Smrg ia64*) tmp_idyn=' -i_dynamic';; 59000b661123Smrg esac 59010b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59020b661123Smrg _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' 59030b661123Smrg ;; 59040b661123Smrg esac 59050b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59060b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59070b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59080b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 59090b661123Smrg ;; 59100b661123Smrg pgCC* | pgcpp*) 59110b661123Smrg # Portland Group C++ compiler 59120b661123Smrg case `$CC -V` in 59130b661123Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 59140b661123Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 59150b661123Smrg rm -rf $tpldir~ 59160b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 59170b661123Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 59180b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 59190b661123Smrg rm -rf $tpldir~ 59200b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 59210b661123Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 59220b661123Smrg $RANLIB $oldlib' 59230b661123Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 59240b661123Smrg rm -rf $tpldir~ 59250b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59260b661123Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59270b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 59280b661123Smrg rm -rf $tpldir~ 59290b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59300b661123Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 59310b661123Smrg ;; 59320b661123Smrg *) # Version 6 will use weak symbols 59330b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59340b661123Smrg _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' 59350b661123Smrg ;; 59360b661123Smrg esac 593772313efbSmrg 59380b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 59390b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59400b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 59410b661123Smrg ;; 59420b661123Smrg cxx*) 59430b661123Smrg # Compaq C++ 59440b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59450b661123Smrg _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' 594672313efbSmrg 59470b661123Smrg runpath_var=LD_RUN_PATH 59480b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59490b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 595072313efbSmrg 59510b661123Smrg # Commands to make compiler produce verbose output that lists 59520b661123Smrg # what "hidden" libraries, object files and flags are used when 59530b661123Smrg # linking a shared library. 59540b661123Smrg # 59550b661123Smrg # There doesn't appear to be a way to prevent this compiler from 59560b661123Smrg # explicitly linking system object files so we need to strip them 59570b661123Smrg # from the output so that they don't get included in the library 59580b661123Smrg # dependencies. 59590b661123Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 59600b661123Smrg ;; 59610b661123Smrg xl*) 59620b661123Smrg # IBM XL 8.0 on PPC, with GNU ld 59630b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59640b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59650b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59660b661123Smrg if test "x$supports_anon_versioning" = xyes; then 59670b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59680b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59690b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59700b661123Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59710b661123Smrg fi 59720b661123Smrg ;; 59730b661123Smrg *) 59740b661123Smrg case `$CC -V 2>&1 | sed 5q` in 59750b661123Smrg *Sun\ C*) 59760b661123Smrg # Sun C++ 5.9 59770b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 59780b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 59790b661123Smrg _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' 59800b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59810b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 59820b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59830b661123Smrg 59840b661123Smrg # Not sure whether something based on 59850b661123Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 59860b661123Smrg # would be better. 59870b661123Smrg output_verbose_link_cmd='echo' 59880b661123Smrg 59890b661123Smrg # Archives containing C++ object files must be created using 59900b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 59910b661123Smrg # necessary to make sure instantiated templates are included 59920b661123Smrg # in the archive. 59930b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 59940b661123Smrg ;; 59950b661123Smrg esac 59960b661123Smrg ;; 59970b661123Smrg esac 59980b661123Smrg ;; 599972313efbSmrg 60000b661123Smrg lynxos*) 60010b661123Smrg # FIXME: insert proper C++ library support 60020b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60030b661123Smrg ;; 600472313efbSmrg 60050b661123Smrg m88k*) 60060b661123Smrg # FIXME: insert proper C++ library support 60070b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60080b661123Smrg ;; 600972313efbSmrg 60100b661123Smrg mvs*) 60110b661123Smrg case $cc_basename in 60120b661123Smrg cxx*) 60130b661123Smrg # FIXME: insert proper C++ library support 60140b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60150b661123Smrg ;; 60160b661123Smrg *) 60170b661123Smrg # FIXME: insert proper C++ library support 60180b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60190b661123Smrg ;; 60200b661123Smrg esac 60210b661123Smrg ;; 602272313efbSmrg 60230b661123Smrg netbsd*) 60240b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60250b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 60260b661123Smrg wlarc= 60270b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 60280b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60290b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60300b661123Smrg fi 60310b661123Smrg # Workaround some broken pre-1.5 toolchains 60320b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 60330b661123Smrg ;; 603472313efbSmrg 60350b661123Smrg *nto* | *qnx*) 60360b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60370b661123Smrg ;; 603872313efbSmrg 60390b661123Smrg openbsd2*) 60400b661123Smrg # C++ shared libraries are fairly broken 60410b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60420b661123Smrg ;; 604372313efbSmrg 60440b661123Smrg openbsd*) 60450b661123Smrg if test -f /usr/libexec/ld.so; then 60460b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60470b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60480b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60490b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 60500b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60510b661123Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 60520b661123Smrg _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' 60530b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 60540b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 60550b661123Smrg fi 60560b661123Smrg output_verbose_link_cmd=echo 60570b661123Smrg else 60580b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60590b661123Smrg fi 60600b661123Smrg ;; 606172313efbSmrg 60620b661123Smrg osf3* | osf4* | osf5*) 60630b661123Smrg case $cc_basename in 60640b661123Smrg KCC*) 60650b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 60660b661123Smrg 60670b661123Smrg # KCC will only create a shared library if the output file 60680b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 60690b661123Smrg # to its proper name (with version) after linking. 60700b661123Smrg _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' 60710b661123Smrg 60720b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60730b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60740b661123Smrg 60750b661123Smrg # Archives containing C++ object files must be created using 60760b661123Smrg # the KAI C++ compiler. 60770b661123Smrg case $host in 60780b661123Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 60790b661123Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 60800b661123Smrg esac 60810b661123Smrg ;; 60820b661123Smrg RCC*) 60830b661123Smrg # Rational C++ 2.4.1 60840b661123Smrg # FIXME: insert proper C++ library support 60850b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60860b661123Smrg ;; 60870b661123Smrg cxx*) 60880b661123Smrg case $host in 60890b661123Smrg osf3*) 60900b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 60910b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 60920b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60930b661123Smrg ;; 60940b661123Smrg *) 60950b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 60960b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 60970b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 60980b661123Smrg echo "-hidden">> $lib.exp~ 60990b661123Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 61000b661123Smrg $RM $lib.exp' 61010b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 61020b661123Smrg ;; 61030b661123Smrg esac 610472313efbSmrg 61050b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 610672313efbSmrg 61070b661123Smrg # Commands to make compiler produce verbose output that lists 61080b661123Smrg # what "hidden" libraries, object files and flags are used when 61090b661123Smrg # linking a shared library. 61100b661123Smrg # 61110b661123Smrg # There doesn't appear to be a way to prevent this compiler from 61120b661123Smrg # explicitly linking system object files so we need to strip them 61130b661123Smrg # from the output so that they don't get included in the library 61140b661123Smrg # dependencies. 61150b661123Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 61160b661123Smrg ;; 61170b661123Smrg *) 61180b661123Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 61190b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 61200b661123Smrg case $host in 61210b661123Smrg osf3*) 61220b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 61230b661123Smrg ;; 61240b661123Smrg *) 61250b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 61260b661123Smrg ;; 61270b661123Smrg esac 61280b661123Smrg 61290b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 61300b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61310b661123Smrg 61320b661123Smrg # Commands to make compiler produce verbose output that lists 61330b661123Smrg # what "hidden" libraries, object files and flags are used when 61340b661123Smrg # linking a shared library. 61350b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 61360b661123Smrg 61370b661123Smrg else 61380b661123Smrg # FIXME: insert proper C++ library support 61390b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61400b661123Smrg fi 61410b661123Smrg ;; 61420b661123Smrg esac 61430b661123Smrg ;; 614472313efbSmrg 61450b661123Smrg psos*) 61460b661123Smrg # FIXME: insert proper C++ library support 61470b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61480b661123Smrg ;; 614972313efbSmrg 61500b661123Smrg sunos4*) 61510b661123Smrg case $cc_basename in 61520b661123Smrg CC*) 61530b661123Smrg # Sun C++ 4.x 61540b661123Smrg # FIXME: insert proper C++ library support 61550b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61560b661123Smrg ;; 61570b661123Smrg lcc*) 61580b661123Smrg # Lucid 61590b661123Smrg # FIXME: insert proper C++ library support 61600b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61610b661123Smrg ;; 61620b661123Smrg *) 61630b661123Smrg # FIXME: insert proper C++ library support 61640b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61650b661123Smrg ;; 61660b661123Smrg esac 61670b661123Smrg ;; 616872313efbSmrg 61690b661123Smrg solaris*) 61700b661123Smrg case $cc_basename in 61710b661123Smrg CC*) 61720b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 61730b661123Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 61740b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 61750b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 61760b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 61770b661123Smrg $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' 61780b661123Smrg 61790b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61800b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61810b661123Smrg case $host_os in 61820b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 61830b661123Smrg *) 61840b661123Smrg # The compiler driver will combine and reorder linker options, 61850b661123Smrg # but understands `-z linker_flag'. 61860b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 61870b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 61880b661123Smrg ;; 61890b661123Smrg esac 61900b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 619172313efbSmrg 61920b661123Smrg output_verbose_link_cmd='echo' 619372313efbSmrg 61940b661123Smrg # Archives containing C++ object files must be created using 61950b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 61960b661123Smrg # necessary to make sure instantiated templates are included 61970b661123Smrg # in the archive. 61980b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 61990b661123Smrg ;; 62000b661123Smrg gcx*) 62010b661123Smrg # Green Hills C++ Compiler 62020b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 620372313efbSmrg 62040b661123Smrg # The C++ compiler must be used to create the archive. 62050b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 62060b661123Smrg ;; 62070b661123Smrg *) 62080b661123Smrg # GNU C++ compiler with Solaris linker 62090b661123Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 62100b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 62110b661123Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 62120b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62130b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62140b661123Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62150b661123Smrg 62160b661123Smrg # Commands to make compiler produce verbose output that lists 62170b661123Smrg # what "hidden" libraries, object files and flags are used when 62180b661123Smrg # linking a shared library. 62190b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62200b661123Smrg else 62210b661123Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 62220b661123Smrg # platform. 62230b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62240b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62250b661123Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62260b661123Smrg 62270b661123Smrg # Commands to make compiler produce verbose output that lists 62280b661123Smrg # what "hidden" libraries, object files and flags are used when 62290b661123Smrg # linking a shared library. 62300b661123Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62310b661123Smrg fi 62320b661123Smrg 62330b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 62340b661123Smrg case $host_os in 62350b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 62360b661123Smrg *) 62370b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 62380b661123Smrg ;; 62390b661123Smrg esac 62400b661123Smrg fi 62410b661123Smrg ;; 62420b661123Smrg esac 62430b661123Smrg ;; 624472313efbSmrg 62450b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 62460b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62470b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62480b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62490b661123Smrg runpath_var='LD_RUN_PATH' 625072313efbSmrg 62510b661123Smrg case $cc_basename in 62520b661123Smrg CC*) 62530b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62540b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62550b661123Smrg ;; 62560b661123Smrg *) 62570b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62580b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62590b661123Smrg ;; 62600b661123Smrg esac 62610b661123Smrg ;; 626272313efbSmrg 62630b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 62640b661123Smrg # Note: We can NOT use -z defs as we might desire, because we do not 62650b661123Smrg # link with -lc, and that would cause any symbols used from libc to 62660b661123Smrg # always be unresolved, which means just about no library would 62670b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 62680b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 62690b661123Smrg # as -z defs. 62700b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62710b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 62720b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62730b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62740b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 62750b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 62760b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62770b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 62780b661123Smrg runpath_var='LD_RUN_PATH' 627972313efbSmrg 62800b661123Smrg case $cc_basename in 62810b661123Smrg CC*) 62820b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62830b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62840b661123Smrg ;; 62850b661123Smrg *) 62860b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62870b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62880b661123Smrg ;; 62890b661123Smrg esac 62900b661123Smrg ;; 6291bdcaa8d0Smrg 62920b661123Smrg tandem*) 62930b661123Smrg case $cc_basename in 62940b661123Smrg NCC*) 62950b661123Smrg # NonStop-UX NCC 3.20 62960b661123Smrg # FIXME: insert proper C++ library support 62970b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62980b661123Smrg ;; 62990b661123Smrg *) 63000b661123Smrg # FIXME: insert proper C++ library support 63010b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63020b661123Smrg ;; 63030b661123Smrg esac 63040b661123Smrg ;; 6305bdcaa8d0Smrg 63060b661123Smrg vxworks*) 63070b661123Smrg # FIXME: insert proper C++ library support 63080b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63090b661123Smrg ;; 6310bdcaa8d0Smrg 63110b661123Smrg *) 63120b661123Smrg # FIXME: insert proper C++ library support 63130b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63140b661123Smrg ;; 63150b661123Smrg esac 6316bdcaa8d0Smrg 63170b661123Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 63180b661123Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 63190b661123Smrg 63200b661123Smrg _LT_TAGVAR(GCC, $1)="$GXX" 63210b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 63220b661123Smrg 63230b661123Smrg ## CAVEAT EMPTOR: 63240b661123Smrg ## There is no encapsulation within the following macros, do not change 63250b661123Smrg ## the running order or otherwise move them around unless you know exactly 63260b661123Smrg ## what you are doing... 63270b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 63280b661123Smrg _LT_COMPILER_PIC($1) 63290b661123Smrg _LT_COMPILER_C_O($1) 63300b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 63310b661123Smrg _LT_LINKER_SHLIBS($1) 63320b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 63330b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 63340b661123Smrg 63350b661123Smrg _LT_CONFIG($1) 63360b661123Smrg fi # test -n "$compiler" 63370b661123Smrg 63380b661123Smrg CC=$lt_save_CC 63390b661123Smrg LDCXX=$LD 63400b661123Smrg LD=$lt_save_LD 63410b661123Smrg GCC=$lt_save_GCC 63420b661123Smrg with_gnu_ld=$lt_save_with_gnu_ld 63430b661123Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 63440b661123Smrg lt_cv_path_LD=$lt_save_path_LD 63450b661123Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 63460b661123Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 63470b661123Smrgfi # test "$_lt_caught_CXX_error" != yes 6348bdcaa8d0Smrg 63490b661123SmrgAC_LANG_POP 63500b661123Smrg])# _LT_LANG_CXX_CONFIG 6351bdcaa8d0Smrg 6352bdcaa8d0Smrg 63530b661123Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 63540b661123Smrg# --------------------------------- 63550b661123Smrg# Figure out "hidden" library dependencies from verbose 63560b661123Smrg# compiler output when linking a shared library. 63570b661123Smrg# Parse the compiler output and extract the necessary 63580b661123Smrg# objects, libraries and library flags. 63590b661123Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 63600b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63610b661123Smrg# Dependencies to place before and after the object being linked: 63620b661123Smrg_LT_TAGVAR(predep_objects, $1)= 63630b661123Smrg_LT_TAGVAR(postdep_objects, $1)= 63640b661123Smrg_LT_TAGVAR(predeps, $1)= 63650b661123Smrg_LT_TAGVAR(postdeps, $1)= 63660b661123Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367bdcaa8d0Smrg 63680b661123Smrgdnl we can't use the lt_simple_compile_test_code here, 63690b661123Smrgdnl because it contains code intended for an executable, 63700b661123Smrgdnl not a library. It's possible we should let each 63710b661123Smrgdnl tag define a new lt_????_link_test_code variable, 63720b661123Smrgdnl but it's only used here... 63730b661123Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 63740b661123Smrgint a; 63750b661123Smrgvoid foo (void) { a = 0; } 63760b661123Smrg_LT_EOF 63770b661123Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 63780b661123Smrgclass Foo 63790b661123Smrg{ 63800b661123Smrgpublic: 63810b661123Smrg Foo (void) { a = 0; } 63820b661123Smrgprivate: 63830b661123Smrg int a; 63840b661123Smrg}; 63850b661123Smrg_LT_EOF 63860b661123Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 63870b661123Smrg subroutine foo 63880b661123Smrg implicit none 63890b661123Smrg integer*4 a 63900b661123Smrg a=0 63910b661123Smrg return 63920b661123Smrg end 63930b661123Smrg_LT_EOF 63940b661123Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 63950b661123Smrg subroutine foo 63960b661123Smrg implicit none 63970b661123Smrg integer a 63980b661123Smrg a=0 63990b661123Smrg return 64000b661123Smrg end 64010b661123Smrg_LT_EOF 64020b661123Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 64030b661123Smrgpublic class foo { 64040b661123Smrg private int a; 64050b661123Smrg public void bar (void) { 64060b661123Smrg a = 0; 64070b661123Smrg } 64080b661123Smrg}; 64090b661123Smrg_LT_EOF 64100b661123Smrg]) 64110b661123Smrgdnl Parse the compiler output and extract the necessary 64120b661123Smrgdnl objects, libraries and library flags. 64130b661123Smrgif AC_TRY_EVAL(ac_compile); then 64140b661123Smrg # Parse the compiler output and extract the necessary 64150b661123Smrg # objects, libraries and library flags. 6416bdcaa8d0Smrg 64170b661123Smrg # Sentinel used to keep track of whether or not we are before 64180b661123Smrg # the conftest object file. 64190b661123Smrg pre_test_object_deps_done=no 642072313efbSmrg 64210b661123Smrg for p in `eval "$output_verbose_link_cmd"`; do 64220b661123Smrg case $p in 642372313efbSmrg 64240b661123Smrg -L* | -R* | -l*) 64250b661123Smrg # Some compilers place space between "-{L,R}" and the path. 64260b661123Smrg # Remove the space. 64270b661123Smrg if test $p = "-L" || 64280b661123Smrg test $p = "-R"; then 64290b661123Smrg prev=$p 64300b661123Smrg continue 64310b661123Smrg else 64320b661123Smrg prev= 64330b661123Smrg fi 643472313efbSmrg 64350b661123Smrg if test "$pre_test_object_deps_done" = no; then 64360b661123Smrg case $p in 64370b661123Smrg -L* | -R*) 64380b661123Smrg # Internal compiler library paths should come after those 64390b661123Smrg # provided the user. The postdeps already come after the 64400b661123Smrg # user supplied libs so there is no need to process them. 64410b661123Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 64420b661123Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 64430b661123Smrg else 64440b661123Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 64450b661123Smrg fi 64460b661123Smrg ;; 64470b661123Smrg # The "-l" case would never come before the object being 64480b661123Smrg # linked, so don't bother handling this case. 64490b661123Smrg esac 64500b661123Smrg else 64510b661123Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 64520b661123Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 64530b661123Smrg else 64540b661123Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 64550b661123Smrg fi 64560b661123Smrg fi 64570b661123Smrg ;; 645872313efbSmrg 64590b661123Smrg *.$objext) 64600b661123Smrg # This assumes that the test object file only shows up 64610b661123Smrg # once in the compiler output. 64620b661123Smrg if test "$p" = "conftest.$objext"; then 64630b661123Smrg pre_test_object_deps_done=yes 64640b661123Smrg continue 64650b661123Smrg fi 646672313efbSmrg 64670b661123Smrg if test "$pre_test_object_deps_done" = no; then 64680b661123Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 64690b661123Smrg _LT_TAGVAR(predep_objects, $1)="$p" 64700b661123Smrg else 64710b661123Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 64720b661123Smrg fi 64730b661123Smrg else 64740b661123Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 64750b661123Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 64760b661123Smrg else 64770b661123Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 64780b661123Smrg fi 64790b661123Smrg fi 64800b661123Smrg ;; 648172313efbSmrg 64820b661123Smrg *) ;; # Ignore the rest. 648372313efbSmrg 64840b661123Smrg esac 64850b661123Smrg done 648672313efbSmrg 64870b661123Smrg # Clean up. 64880b661123Smrg rm -f a.out a.exe 64890b661123Smrgelse 64900b661123Smrg echo "libtool.m4: error: problem compiling $1 test program" 649172313efbSmrgfi 649272313efbSmrg 64930b661123Smrg$RM -f confest.$objext 649472313efbSmrg 64950b661123Smrg# PORTME: override above test on systems where it is broken 64960b661123Smrgm4_if([$1], [CXX], 64970b661123Smrg[case $host_os in 64980b661123Smrginterix[[3-9]]*) 64990b661123Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 65000b661123Smrg # hack all around it, let's just trust "g++" to DTRT. 65010b661123Smrg _LT_TAGVAR(predep_objects,$1)= 65020b661123Smrg _LT_TAGVAR(postdep_objects,$1)= 65030b661123Smrg _LT_TAGVAR(postdeps,$1)= 65040b661123Smrg ;; 650572313efbSmrg 65060b661123Smrglinux*) 65070b661123Smrg case `$CC -V 2>&1 | sed 5q` in 65080b661123Smrg *Sun\ C*) 65090b661123Smrg # Sun C++ 5.9 651072313efbSmrg 65110b661123Smrg # The more standards-conforming stlport4 library is 65120b661123Smrg # incompatible with the Cstd library. Avoid specifying 65130b661123Smrg # it if it's in CXXFLAGS. Ignore libCrun as 65140b661123Smrg # -library=stlport4 depends on it. 65150b661123Smrg case " $CXX $CXXFLAGS " in 65160b661123Smrg *" -library=stlport4 "*) 65170b661123Smrg solaris_use_stlport4=yes 65180b661123Smrg ;; 65190b661123Smrg esac 652072313efbSmrg 65210b661123Smrg if test "$solaris_use_stlport4" != yes; then 65220b661123Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65230b661123Smrg fi 65240b661123Smrg ;; 65250b661123Smrg esac 652696ce994aSmrg ;; 65270b661123Smrg 652896ce994aSmrgsolaris*) 65290b661123Smrg case $cc_basename in 65300b661123Smrg CC*) 65310b661123Smrg # The more standards-conforming stlport4 library is 65320b661123Smrg # incompatible with the Cstd library. Avoid specifying 65330b661123Smrg # it if it's in CXXFLAGS. Ignore libCrun as 65340b661123Smrg # -library=stlport4 depends on it. 65350b661123Smrg case " $CXX $CXXFLAGS " in 65360b661123Smrg *" -library=stlport4 "*) 65370b661123Smrg solaris_use_stlport4=yes 65380b661123Smrg ;; 65390b661123Smrg esac 654072313efbSmrg 65410b661123Smrg # Adding this requires a known-good setup of shared libraries for 65420b661123Smrg # Sun compiler versions before 5.6, else PIC objects from an old 65430b661123Smrg # archive will be linked into the output, leading to subtle bugs. 65440b661123Smrg if test "$solaris_use_stlport4" != yes; then 65450b661123Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65460b661123Smrg fi 65470b661123Smrg ;; 65480b661123Smrg esac 654996ce994aSmrg ;; 655096ce994aSmrgesac 65510b661123Smrg]) 655272313efbSmrg 65530b661123Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 65540b661123Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 655596ce994aSmrgesac 65560b661123Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 65570b661123Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 65580b661123Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 65590b661123Smrgfi 65600b661123Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 65610b661123Smrg [The directories searched by this compiler when creating a shared library]) 65620b661123Smrg_LT_TAGDECL([], [predep_objects], [1], 65630b661123Smrg [Dependencies to place before and after the objects being linked to 65640b661123Smrg create a shared library]) 65650b661123Smrg_LT_TAGDECL([], [postdep_objects], [1]) 65660b661123Smrg_LT_TAGDECL([], [predeps], [1]) 65670b661123Smrg_LT_TAGDECL([], [postdeps], [1]) 65680b661123Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 65690b661123Smrg [The library search path used internally by the compiler when linking 65700b661123Smrg a shared library]) 65710b661123Smrg])# _LT_SYS_HIDDEN_LIBDEPS 65720b661123Smrg 65730b661123Smrg 65740b661123Smrg# _LT_PROG_F77 65750b661123Smrg# ------------ 65760b661123Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 65770b661123Smrg# if there is no fortran compiler, we have our own version here. 65780b661123Smrgm4_defun([_LT_PROG_F77], 65790b661123Smrg[ 65800b661123Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 65810b661123SmrgAC_PROG_F77 65820b661123Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 65830b661123Smrg _lt_disable_F77=yes 65840b661123Smrgfi 65850b661123Smrgpopdef([AC_MSG_ERROR]) 65860b661123Smrg])# _LT_PROG_F77 658772313efbSmrg 65880b661123Smrgdnl aclocal-1.4 backwards compatibility: 65890b661123Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 659072313efbSmrg 659172313efbSmrg 65920b661123Smrg# _LT_LANG_F77_CONFIG([TAG]) 65930b661123Smrg# -------------------------- 65940b661123Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 65950b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 65960b661123Smrg# to write the compiler configuration to `libtool'. 65970b661123Smrgm4_defun([_LT_LANG_F77_CONFIG], 65980b661123Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 65990b661123SmrgAC_LANG_PUSH(Fortran 77) 660072313efbSmrg 66010b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66020b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 66030b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 66040b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 66050b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 66060b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 66070b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 66080b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 66090b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 66100b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 66110b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 66120b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 66130b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 66140b661123Smrg_LT_TAGVAR(module_cmds, $1)= 66150b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 66160b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 66170b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 66180b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 66190b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 66200b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 662172313efbSmrg 66220b661123Smrg# Source file extension for f77 test sources. 66230b661123Smrgac_ext=f 662472313efbSmrg 66250b661123Smrg# Object file extension for compiled f77 test sources. 66260b661123Smrgobjext=o 66270b661123Smrg_LT_TAGVAR(objext, $1)=$objext 66280b661123Smrg 66290b661123Smrg# No sense in running all these tests if we already determined that 66300b661123Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 66310b661123Smrg# are currently assumed to apply to all compilers on this platform, 66320b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 66330b661123Smrgif test "$_lt_disable_F77" != yes; then 66340b661123Smrg # Code to be used in simple compile tests 66350b661123Smrg lt_simple_compile_test_code="\ 66360b661123Smrg subroutine t 66370b661123Smrg return 66380b661123Smrg end 66390b661123Smrg" 664072313efbSmrg 66410b661123Smrg # Code to be used in simple link tests 66420b661123Smrg lt_simple_link_test_code="\ 66430b661123Smrg program t 66440b661123Smrg end 66450b661123Smrg" 664672313efbSmrg 66470b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 66480b661123Smrg _LT_TAG_COMPILER 664972313efbSmrg 66500b661123Smrg # save warnings/boilerplate of simple test code 66510b661123Smrg _LT_COMPILER_BOILERPLATE 66520b661123Smrg _LT_LINKER_BOILERPLATE 665372313efbSmrg 66540b661123Smrg # Allow CC to be a program name with arguments. 66550b661123Smrg lt_save_CC="$CC" 66560b661123Smrg lt_save_GCC=$GCC 66570b661123Smrg CC=${F77-"f77"} 66580b661123Smrg compiler=$CC 66590b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 66600b661123Smrg _LT_CC_BASENAME([$compiler]) 66610b661123Smrg GCC=$G77 66620b661123Smrg if test -n "$compiler"; then 66630b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 66640b661123Smrg AC_MSG_RESULT([$can_build_shared]) 666572313efbSmrg 66660b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 66670b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 66680b661123Smrg 66690b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 66700b661123Smrg # are all built from PIC. 66710b661123Smrg case $host_os in 66720b661123Smrg aix3*) 66730b661123Smrg test "$enable_shared" = yes && enable_static=no 66740b661123Smrg if test -n "$RANLIB"; then 66750b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 66760b661123Smrg postinstall_cmds='$RANLIB $lib' 66770b661123Smrg fi 66780b661123Smrg ;; 66790b661123Smrg aix[[4-9]]*) 66800b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 66810b661123Smrg test "$enable_shared" = yes && enable_static=no 668272313efbSmrg fi 66830b661123Smrg ;; 66840b661123Smrg esac 66850b661123Smrg AC_MSG_RESULT([$enable_shared]) 66860b661123Smrg 66870b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 66880b661123Smrg # Make sure either enable_shared or enable_static is yes. 66890b661123Smrg test "$enable_shared" = yes || enable_static=yes 66900b661123Smrg AC_MSG_RESULT([$enable_static]) 66910b661123Smrg 66920b661123Smrg _LT_TAGVAR(GCC, $1)="$G77" 66930b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 66940b661123Smrg 66950b661123Smrg ## CAVEAT EMPTOR: 66960b661123Smrg ## There is no encapsulation within the following macros, do not change 66970b661123Smrg ## the running order or otherwise move them around unless you know exactly 66980b661123Smrg ## what you are doing... 66990b661123Smrg _LT_COMPILER_PIC($1) 67000b661123Smrg _LT_COMPILER_C_O($1) 67010b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 67020b661123Smrg _LT_LINKER_SHLIBS($1) 67030b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 67040b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 67050b661123Smrg 67060b661123Smrg _LT_CONFIG($1) 67070b661123Smrg fi # test -n "$compiler" 67080b661123Smrg 67090b661123Smrg GCC=$lt_save_GCC 67100b661123Smrg CC="$lt_save_CC" 67110b661123Smrgfi # test "$_lt_disable_F77" != yes 671272313efbSmrg 67130b661123SmrgAC_LANG_POP 67140b661123Smrg])# _LT_LANG_F77_CONFIG 67150b661123Smrg 67160b661123Smrg 67170b661123Smrg# _LT_PROG_FC 67180b661123Smrg# ----------- 67190b661123Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 67200b661123Smrg# if there is no fortran compiler, we have our own version here. 67210b661123Smrgm4_defun([_LT_PROG_FC], 67220b661123Smrg[ 67230b661123Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 67240b661123SmrgAC_PROG_FC 67250b661123Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 67260b661123Smrg _lt_disable_FC=yes 672796ce994aSmrgfi 67280b661123Smrgpopdef([AC_MSG_ERROR]) 67290b661123Smrg])# _LT_PROG_FC 673072313efbSmrg 67310b661123Smrgdnl aclocal-1.4 backwards compatibility: 67320b661123Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 673372313efbSmrg 673472313efbSmrg 67350b661123Smrg# _LT_LANG_FC_CONFIG([TAG]) 67360b661123Smrg# ------------------------- 67370b661123Smrg# Ensure that the configuration variables for a Fortran compiler are 67380b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 67390b661123Smrg# to write the compiler configuration to `libtool'. 67400b661123Smrgm4_defun([_LT_LANG_FC_CONFIG], 67410b661123Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 67420b661123SmrgAC_LANG_PUSH(Fortran) 67430b661123Smrg 67440b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67450b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 67460b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 67470b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 67480b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 67490b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 67500b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 67510b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 67520b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 67530b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 67540b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 67550b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 67560b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 67570b661123Smrg_LT_TAGVAR(module_cmds, $1)= 67580b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 67590b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 67600b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 67610b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 67620b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 67630b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 67640b661123Smrg 67650b661123Smrg# Source file extension for fc test sources. 67660b661123Smrgac_ext=${ac_fc_srcext-f} 67670b661123Smrg 67680b661123Smrg# Object file extension for compiled fc test sources. 67690b661123Smrgobjext=o 67700b661123Smrg_LT_TAGVAR(objext, $1)=$objext 67710b661123Smrg 67720b661123Smrg# No sense in running all these tests if we already determined that 67730b661123Smrg# the FC compiler isn't working. Some variables (like enable_shared) 67740b661123Smrg# are currently assumed to apply to all compilers on this platform, 67750b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 67760b661123Smrgif test "$_lt_disable_FC" != yes; then 67770b661123Smrg # Code to be used in simple compile tests 67780b661123Smrg lt_simple_compile_test_code="\ 67790b661123Smrg subroutine t 67800b661123Smrg return 67810b661123Smrg end 67820b661123Smrg" 67830b661123Smrg 67840b661123Smrg # Code to be used in simple link tests 67850b661123Smrg lt_simple_link_test_code="\ 67860b661123Smrg program t 67870b661123Smrg end 67880b661123Smrg" 67890b661123Smrg 67900b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 67910b661123Smrg _LT_TAG_COMPILER 679272313efbSmrg 67930b661123Smrg # save warnings/boilerplate of simple test code 67940b661123Smrg _LT_COMPILER_BOILERPLATE 67950b661123Smrg _LT_LINKER_BOILERPLATE 67960b661123Smrg 67970b661123Smrg # Allow CC to be a program name with arguments. 67980b661123Smrg lt_save_CC="$CC" 67990b661123Smrg lt_save_GCC=$GCC 68000b661123Smrg CC=${FC-"f95"} 68010b661123Smrg compiler=$CC 68020b661123Smrg GCC=$ac_cv_fc_compiler_gnu 68030b661123Smrg 68040b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 68050b661123Smrg _LT_CC_BASENAME([$compiler]) 68060b661123Smrg 68070b661123Smrg if test -n "$compiler"; then 68080b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68090b661123Smrg AC_MSG_RESULT([$can_build_shared]) 68100b661123Smrg 68110b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 68120b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 68130b661123Smrg 68140b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 68150b661123Smrg # are all built from PIC. 681696ce994aSmrg case $host_os in 68170b661123Smrg aix3*) 68180b661123Smrg test "$enable_shared" = yes && enable_static=no 68190b661123Smrg if test -n "$RANLIB"; then 68200b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68210b661123Smrg postinstall_cmds='$RANLIB $lib' 68220b661123Smrg fi 68230b661123Smrg ;; 682496ce994aSmrg aix[[4-9]]*) 68250b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68260b661123Smrg test "$enable_shared" = yes && enable_static=no 682796ce994aSmrg fi 68280b661123Smrg ;; 682996ce994aSmrg esac 68300b661123Smrg AC_MSG_RESULT([$enable_shared]) 68310b661123Smrg 68320b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 68330b661123Smrg # Make sure either enable_shared or enable_static is yes. 68340b661123Smrg test "$enable_shared" = yes || enable_static=yes 68350b661123Smrg AC_MSG_RESULT([$enable_static]) 68360b661123Smrg 68370b661123Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 68380b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 68390b661123Smrg 68400b661123Smrg ## CAVEAT EMPTOR: 68410b661123Smrg ## There is no encapsulation within the following macros, do not change 68420b661123Smrg ## the running order or otherwise move them around unless you know exactly 68430b661123Smrg ## what you are doing... 68440b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68450b661123Smrg _LT_COMPILER_PIC($1) 68460b661123Smrg _LT_COMPILER_C_O($1) 68470b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 68480b661123Smrg _LT_LINKER_SHLIBS($1) 68490b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 68500b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68510b661123Smrg 68520b661123Smrg _LT_CONFIG($1) 68530b661123Smrg fi # test -n "$compiler" 68540b661123Smrg 68550b661123Smrg GCC=$lt_save_GCC 68560b661123Smrg CC="$lt_save_CC" 68570b661123Smrgfi # test "$_lt_disable_FC" != yes 685872313efbSmrg 68590b661123SmrgAC_LANG_POP 68600b661123Smrg])# _LT_LANG_FC_CONFIG 686172313efbSmrg 686272313efbSmrg 68630b661123Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 68640b661123Smrg# -------------------------- 68650b661123Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 68660b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 68670b661123Smrg# to write the compiler configuration to `libtool'. 68680b661123Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 68690b661123Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 68700b661123SmrgAC_LANG_SAVE 687172313efbSmrg 68720b661123Smrg# Source file extension for Java test sources. 68730b661123Smrgac_ext=java 687472313efbSmrg 68750b661123Smrg# Object file extension for compiled Java test sources. 68760b661123Smrgobjext=o 68770b661123Smrg_LT_TAGVAR(objext, $1)=$objext 687872313efbSmrg 68790b661123Smrg# Code to be used in simple compile tests 68800b661123Smrglt_simple_compile_test_code="class foo {}" 688172313efbSmrg 68820b661123Smrg# Code to be used in simple link tests 68830b661123Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 688472313efbSmrg 68850b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 68860b661123Smrg_LT_TAG_COMPILER 688772313efbSmrg 68880b661123Smrg# save warnings/boilerplate of simple test code 68890b661123Smrg_LT_COMPILER_BOILERPLATE 68900b661123Smrg_LT_LINKER_BOILERPLATE 6891bdcaa8d0Smrg 68920b661123Smrg# Allow CC to be a program name with arguments. 68930b661123Smrglt_save_CC="$CC" 68940b661123Smrglt_save_GCC=$GCC 68950b661123SmrgGCC=yes 68960b661123SmrgCC=${GCJ-"gcj"} 68970b661123Smrgcompiler=$CC 68980b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 68990b661123Smrg_LT_TAGVAR(LD, $1)="$LD" 69000b661123Smrg_LT_CC_BASENAME([$compiler]) 6901bdcaa8d0Smrg 69020b661123Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 69030b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904bdcaa8d0Smrg 69050b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906bdcaa8d0Smrg 69070b661123Smrgif test -n "$compiler"; then 69080b661123Smrg _LT_COMPILER_NO_RTTI($1) 69090b661123Smrg _LT_COMPILER_PIC($1) 69100b661123Smrg _LT_COMPILER_C_O($1) 69110b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 69120b661123Smrg _LT_LINKER_SHLIBS($1) 69130b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914bdcaa8d0Smrg 69150b661123Smrg _LT_CONFIG($1) 69160b661123Smrgfi 6917bdcaa8d0Smrg 69180b661123SmrgAC_LANG_RESTORE 6919bdcaa8d0Smrg 69200b661123SmrgGCC=$lt_save_GCC 69210b661123SmrgCC="$lt_save_CC" 69220b661123Smrg])# _LT_LANG_GCJ_CONFIG 6923bdcaa8d0Smrg 6924bdcaa8d0Smrg 69250b661123Smrg# _LT_LANG_RC_CONFIG([TAG]) 69260b661123Smrg# ------------------------- 69270b661123Smrg# Ensure that the configuration variables for the Windows resource compiler 69280b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 69290b661123Smrg# to write the compiler configuration to `libtool'. 69300b661123Smrgm4_defun([_LT_LANG_RC_CONFIG], 69310b661123Smrg[AC_REQUIRE([LT_PROG_RC])dnl 69320b661123SmrgAC_LANG_SAVE 69330b661123Smrg 69340b661123Smrg# Source file extension for RC test sources. 69350b661123Smrgac_ext=rc 69360b661123Smrg 69370b661123Smrg# Object file extension for compiled RC test sources. 69380b661123Smrgobjext=o 69390b661123Smrg_LT_TAGVAR(objext, $1)=$objext 69400b661123Smrg 69410b661123Smrg# Code to be used in simple compile tests 69420b661123Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 69430b661123Smrg 69440b661123Smrg# Code to be used in simple link tests 69450b661123Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 69460b661123Smrg 69470b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 69480b661123Smrg_LT_TAG_COMPILER 69490b661123Smrg 69500b661123Smrg# save warnings/boilerplate of simple test code 69510b661123Smrg_LT_COMPILER_BOILERPLATE 69520b661123Smrg_LT_LINKER_BOILERPLATE 69530b661123Smrg 69540b661123Smrg# Allow CC to be a program name with arguments. 69550b661123Smrglt_save_CC="$CC" 69560b661123Smrglt_save_GCC=$GCC 69570b661123SmrgGCC= 69580b661123SmrgCC=${RC-"windres"} 69590b661123Smrgcompiler=$CC 69600b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 69610b661123Smrg_LT_CC_BASENAME([$compiler]) 69620b661123Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 69630b661123Smrg 69640b661123Smrgif test -n "$compiler"; then 69650b661123Smrg : 69660b661123Smrg _LT_CONFIG($1) 69670b661123Smrgfi 69680b661123Smrg 69690b661123SmrgGCC=$lt_save_GCC 69700b661123SmrgAC_LANG_RESTORE 69710b661123SmrgCC="$lt_save_CC" 69720b661123Smrg])# _LT_LANG_RC_CONFIG 69730b661123Smrg 69740b661123Smrg 69750b661123Smrg# LT_PROG_GCJ 69760b661123Smrg# ----------- 69770b661123SmrgAC_DEFUN([LT_PROG_GCJ], 69780b661123Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 69790b661123Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 69800b661123Smrg [AC_CHECK_TOOL(GCJ, gcj,) 69810b661123Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 69820b661123Smrg AC_SUBST(GCJFLAGS)])])[]dnl 69830b661123Smrg]) 69840b661123Smrg 69850b661123Smrg# Old name: 69860b661123SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 69870b661123Smrgdnl aclocal-1.4 backwards compatibility: 69880b661123Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 69890b661123Smrg 69900b661123Smrg 69910b661123Smrg# LT_PROG_RC 69920b661123Smrg# ---------- 69930b661123SmrgAC_DEFUN([LT_PROG_RC], 69940b661123Smrg[AC_CHECK_TOOL(RC, windres,) 69950b661123Smrg]) 69960b661123Smrg 69970b661123Smrg# Old name: 69980b661123SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 69990b661123Smrgdnl aclocal-1.4 backwards compatibility: 70000b661123Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70010b661123Smrg 70020b661123Smrg 70030b661123Smrg# _LT_DECL_EGREP 70040b661123Smrg# -------------- 70050b661123Smrg# If we don't have a new enough Autoconf to choose the best grep 70060b661123Smrg# available, choose the one first in the user's PATH. 70070b661123Smrgm4_defun([_LT_DECL_EGREP], 70080b661123Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 70090b661123SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 70100b661123Smrgtest -z "$GREP" && GREP=grep 70110b661123Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 70120b661123Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 70130b661123Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 70140b661123Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 70150b661123SmrgAC_SUBST([GREP]) 70160b661123Smrg]) 70170b661123Smrg 70180b661123Smrg 70190b661123Smrg# _LT_DECL_OBJDUMP 70200b661123Smrg# -------------- 70210b661123Smrg# If we don't have a new enough Autoconf to choose the best objdump 70220b661123Smrg# available, choose the one first in the user's PATH. 70230b661123Smrgm4_defun([_LT_DECL_OBJDUMP], 70240b661123Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 70250b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 70260b661123Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 70270b661123SmrgAC_SUBST([OBJDUMP]) 70280b661123Smrg]) 70290b661123Smrg 70300b661123Smrg 70310b661123Smrg# _LT_DECL_SED 70320b661123Smrg# ------------ 70330b661123Smrg# Check for a fully-functional sed program, that truncates 70340b661123Smrg# as few characters as possible. Prefer GNU sed if found. 70350b661123Smrgm4_defun([_LT_DECL_SED], 70360b661123Smrg[AC_PROG_SED 70370b661123Smrgtest -z "$SED" && SED=sed 70380b661123SmrgXsed="$SED -e 1s/^X//" 70390b661123Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 70400b661123Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 70410b661123Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 70420b661123Smrg])# _LT_DECL_SED 70430b661123Smrg 70440b661123Smrgm4_ifndef([AC_PROG_SED], [ 70450b661123Smrg# NOTE: This macro has been submitted for inclusion into # 70460b661123Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 70470b661123Smrg# a released version of Autoconf we should remove this # 70480b661123Smrg# macro and use it instead. # 70490b661123Smrg 70500b661123Smrgm4_defun([AC_PROG_SED], 70510b661123Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 70520b661123SmrgAC_CACHE_VAL(lt_cv_path_SED, 70530b661123Smrg[# Loop through the user's path and test for sed and gsed. 70540b661123Smrg# Then use that list of sed's as ones to test for truncation. 70550b661123Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 70560b661123Smrgfor as_dir in $PATH 70570b661123Smrgdo 70580b661123Smrg IFS=$as_save_IFS 70590b661123Smrg test -z "$as_dir" && as_dir=. 70600b661123Smrg for lt_ac_prog in sed gsed; do 70610b661123Smrg for ac_exec_ext in '' $ac_executable_extensions; do 70620b661123Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 70630b661123Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 70640b661123Smrg fi 70650b661123Smrg done 70660b661123Smrg done 70670b661123Smrgdone 70680b661123SmrgIFS=$as_save_IFS 70690b661123Smrglt_ac_max=0 70700b661123Smrglt_ac_count=0 70710b661123Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 70720b661123Smrg# along with /bin/sed that truncates output. 70730b661123Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 70740b661123Smrg test ! -f $lt_ac_sed && continue 70750b661123Smrg cat /dev/null > conftest.in 70760b661123Smrg lt_ac_count=0 70770b661123Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 70780b661123Smrg # Check for GNU sed and select it if it is found. 70790b661123Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 70800b661123Smrg lt_cv_path_SED=$lt_ac_sed 70810b661123Smrg break 70820b661123Smrg fi 70830b661123Smrg while true; do 70840b661123Smrg cat conftest.in conftest.in >conftest.tmp 70850b661123Smrg mv conftest.tmp conftest.in 70860b661123Smrg cp conftest.in conftest.nl 70870b661123Smrg echo >>conftest.nl 70880b661123Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 70890b661123Smrg cmp -s conftest.out conftest.nl || break 70900b661123Smrg # 10000 chars as input seems more than enough 70910b661123Smrg test $lt_ac_count -gt 10 && break 70920b661123Smrg lt_ac_count=`expr $lt_ac_count + 1` 70930b661123Smrg if test $lt_ac_count -gt $lt_ac_max; then 70940b661123Smrg lt_ac_max=$lt_ac_count 70950b661123Smrg lt_cv_path_SED=$lt_ac_sed 70960b661123Smrg fi 70970b661123Smrg done 70980b661123Smrgdone 70990b661123Smrg]) 71000b661123SmrgSED=$lt_cv_path_SED 71010b661123SmrgAC_SUBST([SED]) 71020b661123SmrgAC_MSG_RESULT([$SED]) 71030b661123Smrg])#AC_PROG_SED 71040b661123Smrg])#m4_ifndef 71050b661123Smrg 71060b661123Smrg# Old name: 71070b661123SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 71080b661123Smrgdnl aclocal-1.4 backwards compatibility: 71090b661123Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 71100b661123Smrg 71110b661123Smrg 71120b661123Smrg# _LT_CHECK_SHELL_FEATURES 71130b661123Smrg# ------------------------ 71140b661123Smrg# Find out whether the shell is Bourne or XSI compatible, 71150b661123Smrg# or has some other useful features. 71160b661123Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 71170b661123Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 71180b661123Smrg# Try some XSI features 71190b661123Smrgxsi_shell=no 71200b661123Smrg( _lt_dummy="a/b/c" 71210b661123Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 71220b661123Smrg = c,a/b,, \ 71230b661123Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 71240b661123Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 71250b661123Smrg && xsi_shell=yes 71260b661123SmrgAC_MSG_RESULT([$xsi_shell]) 71270b661123Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 71280b661123Smrg 71290b661123SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 71300b661123Smrglt_shell_append=no 71310b661123Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 71320b661123Smrg >/dev/null 2>&1 \ 71330b661123Smrg && lt_shell_append=yes 71340b661123SmrgAC_MSG_RESULT([$lt_shell_append]) 71350b661123Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 71360b661123Smrg 71370b661123Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 71380b661123Smrg lt_unset=unset 71390b661123Smrgelse 71400b661123Smrg lt_unset=false 71410b661123Smrgfi 71420b661123Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 71430b661123Smrg 71440b661123Smrg# test EBCDIC or ASCII 71450b661123Smrgcase `echo X|tr X '\101'` in 71460b661123Smrg A) # ASCII based system 71470b661123Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 71480b661123Smrg lt_SP2NL='tr \040 \012' 71490b661123Smrg lt_NL2SP='tr \015\012 \040\040' 71500b661123Smrg ;; 71510b661123Smrg *) # EBCDIC based system 71520b661123Smrg lt_SP2NL='tr \100 \n' 71530b661123Smrg lt_NL2SP='tr \r\n \100\100' 71540b661123Smrg ;; 71550b661123Smrgesac 71560b661123Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 71570b661123Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 71580b661123Smrg])# _LT_CHECK_SHELL_FEATURES 71590b661123Smrg 71600b661123Smrg 71610b661123Smrg# _LT_PROG_XSI_SHELLFNS 71620b661123Smrg# --------------------- 71630b661123Smrg# Bourne and XSI compatible variants of some useful shell functions. 71640b661123Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 71650b661123Smrg[case $xsi_shell in 71660b661123Smrg yes) 71670b661123Smrg cat << \_LT_EOF >> "$cfgfile" 71680b661123Smrg 71690b661123Smrg# func_dirname file append nondir_replacement 71700b661123Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 71710b661123Smrg# otherwise set result to NONDIR_REPLACEMENT. 71720b661123Smrgfunc_dirname () 71730b661123Smrg{ 71740b661123Smrg case ${1} in 71750b661123Smrg */*) func_dirname_result="${1%/*}${2}" ;; 71760b661123Smrg * ) func_dirname_result="${3}" ;; 71770b661123Smrg esac 71780b661123Smrg} 71790b661123Smrg 71800b661123Smrg# func_basename file 71810b661123Smrgfunc_basename () 71820b661123Smrg{ 71830b661123Smrg func_basename_result="${1##*/}" 71840b661123Smrg} 7185bdcaa8d0Smrg 71860b661123Smrg# func_dirname_and_basename file append nondir_replacement 71870b661123Smrg# perform func_basename and func_dirname in a single function 71880b661123Smrg# call: 71890b661123Smrg# dirname: Compute the dirname of FILE. If nonempty, 71900b661123Smrg# add APPEND to the result, otherwise set result 71910b661123Smrg# to NONDIR_REPLACEMENT. 71920b661123Smrg# value returned in "$func_dirname_result" 71930b661123Smrg# basename: Compute filename of FILE. 71940b661123Smrg# value retuned in "$func_basename_result" 71950b661123Smrg# Implementation must be kept synchronized with func_dirname 71960b661123Smrg# and func_basename. For efficiency, we do not delegate to 71970b661123Smrg# those functions but instead duplicate the functionality here. 71980b661123Smrgfunc_dirname_and_basename () 71990b661123Smrg{ 72000b661123Smrg case ${1} in 72010b661123Smrg */*) func_dirname_result="${1%/*}${2}" ;; 72020b661123Smrg * ) func_dirname_result="${3}" ;; 72030b661123Smrg esac 72040b661123Smrg func_basename_result="${1##*/}" 72050b661123Smrg} 7206bdcaa8d0Smrg 72070b661123Smrg# func_stripname prefix suffix name 72080b661123Smrg# strip PREFIX and SUFFIX off of NAME. 72090b661123Smrg# PREFIX and SUFFIX must not contain globbing or regex special 72100b661123Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72110b661123Smrg# dot (in which case that matches only a dot). 72120b661123Smrgfunc_stripname () 72130b661123Smrg{ 72140b661123Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 72150b661123Smrg # positional parameters, so assign one to ordinary parameter first. 72160b661123Smrg func_stripname_result=${3} 72170b661123Smrg func_stripname_result=${func_stripname_result#"${1}"} 72180b661123Smrg func_stripname_result=${func_stripname_result%"${2}"} 72190b661123Smrg} 7220bdcaa8d0Smrg 72210b661123Smrg# func_opt_split 72220b661123Smrgfunc_opt_split () 72230b661123Smrg{ 72240b661123Smrg func_opt_split_opt=${1%%=*} 72250b661123Smrg func_opt_split_arg=${1#*=} 72260b661123Smrg} 7227bdcaa8d0Smrg 72280b661123Smrg# func_lo2o object 72290b661123Smrgfunc_lo2o () 72300b661123Smrg{ 72310b661123Smrg case ${1} in 72320b661123Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 72330b661123Smrg *) func_lo2o_result=${1} ;; 72340b661123Smrg esac 72350b661123Smrg} 7236bdcaa8d0Smrg 72370b661123Smrg# func_xform libobj-or-source 72380b661123Smrgfunc_xform () 72390b661123Smrg{ 72400b661123Smrg func_xform_result=${1%.*}.lo 72410b661123Smrg} 724272313efbSmrg 72430b661123Smrg# func_arith arithmetic-term... 72440b661123Smrgfunc_arith () 72450b661123Smrg{ 72460b661123Smrg func_arith_result=$(( $[*] )) 72470b661123Smrg} 724872313efbSmrg 72490b661123Smrg# func_len string 72500b661123Smrg# STRING may not start with a hyphen. 72510b661123Smrgfunc_len () 72520b661123Smrg{ 72530b661123Smrg func_len_result=${#1} 72540b661123Smrg} 7255bdcaa8d0Smrg 72560b661123Smrg_LT_EOF 725796ce994aSmrg ;; 72580b661123Smrg *) # Bourne compatible functions. 72590b661123Smrg cat << \_LT_EOF >> "$cfgfile" 726072313efbSmrg 72610b661123Smrg# func_dirname file append nondir_replacement 72620b661123Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 72630b661123Smrg# otherwise set result to NONDIR_REPLACEMENT. 72640b661123Smrgfunc_dirname () 72650b661123Smrg{ 72660b661123Smrg # Extract subdirectory from the argument. 72670b661123Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 72680b661123Smrg if test "X$func_dirname_result" = "X${1}"; then 72690b661123Smrg func_dirname_result="${3}" 72700b661123Smrg else 72710b661123Smrg func_dirname_result="$func_dirname_result${2}" 72720b661123Smrg fi 72730b661123Smrg} 727472313efbSmrg 72750b661123Smrg# func_basename file 72760b661123Smrgfunc_basename () 72770b661123Smrg{ 72780b661123Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 72790b661123Smrg} 728072313efbSmrg 72810b661123Smrgdnl func_dirname_and_basename 72820b661123Smrgdnl A portable version of this function is already defined in general.m4sh 72830b661123Smrgdnl so there is no need for it here. 72840b661123Smrg 72850b661123Smrg# func_stripname prefix suffix name 72860b661123Smrg# strip PREFIX and SUFFIX off of NAME. 72870b661123Smrg# PREFIX and SUFFIX must not contain globbing or regex special 72880b661123Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72890b661123Smrg# dot (in which case that matches only a dot). 72900b661123Smrg# func_strip_suffix prefix name 72910b661123Smrgfunc_stripname () 72920b661123Smrg{ 72930b661123Smrg case ${2} in 72940b661123Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 72950b661123Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 72960b661123Smrg *) func_stripname_result=`$ECHO "X${3}" \ 72970b661123Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 729872313efbSmrg esac 72990b661123Smrg} 7300bdcaa8d0Smrg 73010b661123Smrg# sed scripts: 73020b661123Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 73030b661123Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304bdcaa8d0Smrg 73050b661123Smrg# func_opt_split 73060b661123Smrgfunc_opt_split () 73070b661123Smrg{ 73080b661123Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 73090b661123Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 73100b661123Smrg} 7311bdcaa8d0Smrg 73120b661123Smrg# func_lo2o object 73130b661123Smrgfunc_lo2o () 73140b661123Smrg{ 73150b661123Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 73160b661123Smrg} 7317bdcaa8d0Smrg 73180b661123Smrg# func_xform libobj-or-source 73190b661123Smrgfunc_xform () 73200b661123Smrg{ 73210b661123Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 73220b661123Smrg} 7323bdcaa8d0Smrg 73240b661123Smrg# func_arith arithmetic-term... 73250b661123Smrgfunc_arith () 73260b661123Smrg{ 73270b661123Smrg func_arith_result=`expr "$[@]"` 73280b661123Smrg} 7329bdcaa8d0Smrg 73300b661123Smrg# func_len string 73310b661123Smrg# STRING may not start with a hyphen. 73320b661123Smrgfunc_len () 73330b661123Smrg{ 73340b661123Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 73350b661123Smrg} 7336bdcaa8d0Smrg 73370b661123Smrg_LT_EOF 73380b661123Smrgesac 7339bdcaa8d0Smrg 73400b661123Smrgcase $lt_shell_append in 73410b661123Smrg yes) 73420b661123Smrg cat << \_LT_EOF >> "$cfgfile" 7343bdcaa8d0Smrg 73440b661123Smrg# func_append var value 73450b661123Smrg# Append VALUE to the end of shell variable VAR. 73460b661123Smrgfunc_append () 73470b661123Smrg{ 73480b661123Smrg eval "$[1]+=\$[2]" 73490b661123Smrg} 73500b661123Smrg_LT_EOF 73510b661123Smrg ;; 73520b661123Smrg *) 73530b661123Smrg cat << \_LT_EOF >> "$cfgfile" 7354bdcaa8d0Smrg 73550b661123Smrg# func_append var value 73560b661123Smrg# Append VALUE to the end of shell variable VAR. 73570b661123Smrgfunc_append () 73580b661123Smrg{ 73590b661123Smrg eval "$[1]=\$$[1]\$[2]" 73600b661123Smrg} 7361bdcaa8d0Smrg 73620b661123Smrg_LT_EOF 73630b661123Smrg ;; 73640b661123Smrg esac 73650b661123Smrg]) 7366bdcaa8d0Smrg 73670b661123Smrg# Helper functions for option handling. -*- Autoconf -*- 73680b661123Smrg# 73690b661123Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 73700b661123Smrg# Written by Gary V. Vaughan, 2004 73710b661123Smrg# 73720b661123Smrg# This file is free software; the Free Software Foundation gives 73730b661123Smrg# unlimited permission to copy and/or distribute it, with or without 73740b661123Smrg# modifications, as long as this notice is preserved. 7375bdcaa8d0Smrg 73760b661123Smrg# serial 6 ltoptions.m4 7377bdcaa8d0Smrg 73780b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 73790b661123SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380bdcaa8d0Smrg 7381bdcaa8d0Smrg 73820b661123Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 73830b661123Smrg# ------------------------------------------ 73840b661123Smrgm4_define([_LT_MANGLE_OPTION], 73850b661123Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386bdcaa8d0Smrg 7387bdcaa8d0Smrg 73880b661123Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 73890b661123Smrg# --------------------------------------- 73900b661123Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 73910b661123Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 73920b661123Smrg# saved as a flag. 73930b661123Smrgm4_define([_LT_SET_OPTION], 73940b661123Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 73950b661123Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 73960b661123Smrg _LT_MANGLE_DEFUN([$1], [$2]), 73970b661123Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 73980b661123Smrg]) 73990b661123Smrg 74000b661123Smrg 74010b661123Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 74020b661123Smrg# ------------------------------------------------------------ 74030b661123Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 74040b661123Smrgm4_define([_LT_IF_OPTION], 74050b661123Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 74060b661123Smrg 74070b661123Smrg 74080b661123Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 74090b661123Smrg# ------------------------------------------------------- 74100b661123Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 74110b661123Smrg# are set. 74120b661123Smrgm4_define([_LT_UNLESS_OPTIONS], 74130b661123Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74140b661123Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 74150b661123Smrg [m4_define([$0_found])])])[]dnl 74160b661123Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 74170b661123Smrg])[]dnl 74180b661123Smrg]) 74190b661123Smrg 7420bdcaa8d0Smrg 74210b661123Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 74220b661123Smrg# ---------------------------------------- 74230b661123Smrg# OPTION-LIST is a space-separated list of Libtool options associated 74240b661123Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 74250b661123Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 74260b661123Smrg# the unknown option and exit. 74270b661123Smrgm4_defun([_LT_SET_OPTIONS], 74280b661123Smrg[# Set options 74290b661123Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74300b661123Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 74310b661123Smrg 74320b661123Smrgm4_if([$1],[LT_INIT],[ 74330b661123Smrg dnl 74340b661123Smrg dnl Simply set some default values (i.e off) if boolean options were not 74350b661123Smrg dnl specified: 74360b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 74370b661123Smrg ]) 74380b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 74390b661123Smrg ]) 74400b661123Smrg dnl 74410b661123Smrg dnl If no reference was made to various pairs of opposing options, then 74420b661123Smrg dnl we run the default mode handler for the pair. For example, if neither 74430b661123Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 74440b661123Smrg dnl archives by default: 74450b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 74460b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 74470b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 74480b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 74490b661123Smrg [_LT_ENABLE_FAST_INSTALL]) 74500b661123Smrg ]) 74510b661123Smrg])# _LT_SET_OPTIONS 7452bdcaa8d0Smrg 7453bdcaa8d0Smrg 7454bdcaa8d0Smrg 74550b661123Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 74560b661123Smrg# ----------------------------------------- 74570b661123Smrgm4_define([_LT_MANGLE_DEFUN], 74580b661123Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459bdcaa8d0Smrg 7460bdcaa8d0Smrg 74610b661123Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 74620b661123Smrg# ----------------------------------------------- 74630b661123Smrgm4_define([LT_OPTION_DEFINE], 74640b661123Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 74650b661123Smrg])# LT_OPTION_DEFINE 7466bdcaa8d0Smrg 7467bdcaa8d0Smrg 74680b661123Smrg# dlopen 74690b661123Smrg# ------ 74700b661123SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 74710b661123Smrg]) 7472bdcaa8d0Smrg 74730b661123SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 74740b661123Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 74750b661123SmrgAC_DIAGNOSE([obsolete], 74760b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 74770b661123Smrgput the `dlopen' option into LT_INIT's first parameter.]) 74780b661123Smrg]) 7479bdcaa8d0Smrg 74800b661123Smrgdnl aclocal-1.4 backwards compatibility: 74810b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 748272313efbSmrg 7483bdcaa8d0Smrg 74840b661123Smrg# win32-dll 74850b661123Smrg# --------- 74860b661123Smrg# Declare package support for building win32 dll's. 74870b661123SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 74880b661123Smrg[enable_win32_dll=yes 7489bdcaa8d0Smrg 74900b661123Smrgcase $host in 74910b661123Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 74920b661123Smrg AC_CHECK_TOOL(AS, as, false) 74930b661123Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 74940b661123Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 74950b661123Smrg ;; 74960b661123Smrgesac 7497bdcaa8d0Smrg 74980b661123Smrgtest -z "$AS" && AS=as 74990b661123Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500bdcaa8d0Smrg 75010b661123Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 75020b661123Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503bdcaa8d0Smrg 75040b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 75050b661123Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 75060b661123Smrg])# win32-dll 7507bdcaa8d0Smrg 75080b661123SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 75090b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 75100b661123Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 75110b661123SmrgAC_DIAGNOSE([obsolete], 75120b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 75130b661123Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 75140b661123Smrg]) 7515bdcaa8d0Smrg 75160b661123Smrgdnl aclocal-1.4 backwards compatibility: 75170b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518bdcaa8d0Smrg 75190b661123Smrg 75200b661123Smrg# _LT_ENABLE_SHARED([DEFAULT]) 75210b661123Smrg# ---------------------------- 75220b661123Smrg# implement the --enable-shared flag, and supports the `shared' and 75230b661123Smrg# `disable-shared' LT_INIT options. 75240b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75250b661123Smrgm4_define([_LT_ENABLE_SHARED], 75260b661123Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 75270b661123SmrgAC_ARG_ENABLE([shared], 75280b661123Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 75290b661123Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 75300b661123Smrg [p=${PACKAGE-default} 75310b661123Smrg case $enableval in 75320b661123Smrg yes) enable_shared=yes ;; 75330b661123Smrg no) enable_shared=no ;; 75340b661123Smrg *) 75350b661123Smrg enable_shared=no 75360b661123Smrg # Look at the argument we got. We use all the common list separators. 75370b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75380b661123Smrg for pkg in $enableval; do 75390b661123Smrg IFS="$lt_save_ifs" 75400b661123Smrg if test "X$pkg" = "X$p"; then 75410b661123Smrg enable_shared=yes 75420b661123Smrg fi 75430b661123Smrg done 75440b661123Smrg IFS="$lt_save_ifs" 754596ce994aSmrg ;; 75460b661123Smrg esac], 75470b661123Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548bdcaa8d0Smrg 75490b661123Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 75500b661123Smrg [Whether or not to build shared libraries]) 75510b661123Smrg])# _LT_ENABLE_SHARED 7552bdcaa8d0Smrg 75530b661123SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 75540b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555bdcaa8d0Smrg 75560b661123Smrg# Old names: 75570b661123SmrgAC_DEFUN([AC_ENABLE_SHARED], 75580b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 75590b661123Smrg]) 75600b661123Smrg 75610b661123SmrgAC_DEFUN([AC_DISABLE_SHARED], 75620b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 75630b661123Smrg]) 7564bdcaa8d0Smrg 75650b661123SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 75660b661123SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567bdcaa8d0Smrg 75680b661123Smrgdnl aclocal-1.4 backwards compatibility: 75690b661123Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 75700b661123Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571bdcaa8d0Smrg 7572bdcaa8d0Smrg 7573bdcaa8d0Smrg 75740b661123Smrg# _LT_ENABLE_STATIC([DEFAULT]) 75750b661123Smrg# ---------------------------- 75760b661123Smrg# implement the --enable-static flag, and support the `static' and 75770b661123Smrg# `disable-static' LT_INIT options. 75780b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75790b661123Smrgm4_define([_LT_ENABLE_STATIC], 75800b661123Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 75810b661123SmrgAC_ARG_ENABLE([static], 75820b661123Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 75830b661123Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 75840b661123Smrg [p=${PACKAGE-default} 75850b661123Smrg case $enableval in 75860b661123Smrg yes) enable_static=yes ;; 75870b661123Smrg no) enable_static=no ;; 75880b661123Smrg *) 75890b661123Smrg enable_static=no 75900b661123Smrg # Look at the argument we got. We use all the common list separators. 75910b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75920b661123Smrg for pkg in $enableval; do 75930b661123Smrg IFS="$lt_save_ifs" 75940b661123Smrg if test "X$pkg" = "X$p"; then 75950b661123Smrg enable_static=yes 75960b661123Smrg fi 75970b661123Smrg done 75980b661123Smrg IFS="$lt_save_ifs" 7599bdcaa8d0Smrg ;; 76000b661123Smrg esac], 76010b661123Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602bdcaa8d0Smrg 76030b661123Smrg _LT_DECL([build_old_libs], [enable_static], [0], 76040b661123Smrg [Whether or not to build static libraries]) 76050b661123Smrg])# _LT_ENABLE_STATIC 7606bdcaa8d0Smrg 76070b661123SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 76080b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609bdcaa8d0Smrg 76100b661123Smrg# Old names: 76110b661123SmrgAC_DEFUN([AC_ENABLE_STATIC], 76120b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 76130b661123Smrg]) 7614bdcaa8d0Smrg 76150b661123SmrgAC_DEFUN([AC_DISABLE_STATIC], 76160b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 76170b661123Smrg]) 7618bdcaa8d0Smrg 76190b661123SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 76200b661123SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621bdcaa8d0Smrg 76220b661123Smrgdnl aclocal-1.4 backwards compatibility: 76230b661123Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 76240b661123Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625bdcaa8d0Smrg 7626bdcaa8d0Smrg 7627bdcaa8d0Smrg 76280b661123Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 76290b661123Smrg# ---------------------------------- 76300b661123Smrg# implement the --enable-fast-install flag, and support the `fast-install' 76310b661123Smrg# and `disable-fast-install' LT_INIT options. 76320b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 76330b661123Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 76340b661123Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 76350b661123SmrgAC_ARG_ENABLE([fast-install], 76360b661123Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 76370b661123Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 76380b661123Smrg [p=${PACKAGE-default} 76390b661123Smrg case $enableval in 76400b661123Smrg yes) enable_fast_install=yes ;; 76410b661123Smrg no) enable_fast_install=no ;; 76420b661123Smrg *) 76430b661123Smrg enable_fast_install=no 76440b661123Smrg # Look at the argument we got. We use all the common list separators. 76450b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 76460b661123Smrg for pkg in $enableval; do 76470b661123Smrg IFS="$lt_save_ifs" 76480b661123Smrg if test "X$pkg" = "X$p"; then 76490b661123Smrg enable_fast_install=yes 765072313efbSmrg fi 76510b661123Smrg done 76520b661123Smrg IFS="$lt_save_ifs" 7653bdcaa8d0Smrg ;; 76540b661123Smrg esac], 76550b661123Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656bdcaa8d0Smrg 76570b661123Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 76580b661123Smrg [Whether or not to optimize for fast installation])dnl 76590b661123Smrg])# _LT_ENABLE_FAST_INSTALL 7660bdcaa8d0Smrg 76610b661123SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 76620b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663bdcaa8d0Smrg 76640b661123Smrg# Old names: 76650b661123SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 76660b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 76670b661123SmrgAC_DIAGNOSE([obsolete], 76680b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76690b661123Smrgthe `fast-install' option into LT_INIT's first parameter.]) 76700b661123Smrg]) 7671bdcaa8d0Smrg 76720b661123SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 76730b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 76740b661123SmrgAC_DIAGNOSE([obsolete], 76750b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76760b661123Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 76770b661123Smrg]) 7678bdcaa8d0Smrg 76790b661123Smrgdnl aclocal-1.4 backwards compatibility: 76800b661123Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 76810b661123Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682bdcaa8d0Smrg 768372313efbSmrg 76840b661123Smrg# _LT_WITH_PIC([MODE]) 76850b661123Smrg# -------------------- 76860b661123Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 76870b661123Smrg# LT_INIT options. 76880b661123Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 76890b661123Smrgm4_define([_LT_WITH_PIC], 76900b661123Smrg[AC_ARG_WITH([pic], 76910b661123Smrg [AS_HELP_STRING([--with-pic], 76920b661123Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 76930b661123Smrg [pic_mode="$withval"], 76940b661123Smrg [pic_mode=default]) 769572313efbSmrg 76960b661123Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 769772313efbSmrg 76980b661123Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 76990b661123Smrg])# _LT_WITH_PIC 770072313efbSmrg 77010b661123SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 77020b661123SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 77030b661123Smrg 77040b661123Smrg# Old name: 77050b661123SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 77060b661123Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 77070b661123SmrgAC_DIAGNOSE([obsolete], 77080b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 77090b661123Smrgput the `pic-only' option into LT_INIT's first parameter.]) 771072313efbSmrg]) 7711bdcaa8d0Smrg 77120b661123Smrgdnl aclocal-1.4 backwards compatibility: 77130b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 77140b661123Smrg 77150b661123Smrg 77160b661123Smrgm4_define([_LTDL_MODE], []) 77170b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 77180b661123Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 77190b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 77200b661123Smrg [m4_define([_LTDL_MODE], [recursive])]) 77210b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 77220b661123Smrg [m4_define([_LTDL_MODE], [subproject])]) 77230b661123Smrg 77240b661123Smrgm4_define([_LTDL_TYPE], []) 77250b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 77260b661123Smrg [m4_define([_LTDL_TYPE], [installable])]) 77270b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 77280b661123Smrg [m4_define([_LTDL_TYPE], [convenience])]) 77290b661123Smrg 77300b661123Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 773196ce994aSmrg# 77320b661123Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 77330b661123Smrg# Written by Gary V. Vaughan, 2004 773496ce994aSmrg# 77350b661123Smrg# This file is free software; the Free Software Foundation gives 77360b661123Smrg# unlimited permission to copy and/or distribute it, with or without 77370b661123Smrg# modifications, as long as this notice is preserved. 7738bdcaa8d0Smrg 77390b661123Smrg# serial 6 ltsugar.m4 774072313efbSmrg 77410b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 77420b661123SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 774372313efbSmrg 774472313efbSmrg 77450b661123Smrg# lt_join(SEP, ARG1, [ARG2...]) 77460b661123Smrg# ----------------------------- 77470b661123Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 77480b661123Smrg# associated separator. 77490b661123Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 77500b661123Smrg# versions in m4sugar had bugs. 77510b661123Smrgm4_define([lt_join], 77520b661123Smrg[m4_if([$#], [1], [], 77530b661123Smrg [$#], [2], [[$2]], 77540b661123Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 77550b661123Smrgm4_define([_lt_join], 77560b661123Smrg[m4_if([$#$2], [2], [], 77570b661123Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 77580b661123Smrg 77590b661123Smrg 77600b661123Smrg# lt_car(LIST) 77610b661123Smrg# lt_cdr(LIST) 77620b661123Smrg# ------------ 77630b661123Smrg# Manipulate m4 lists. 77640b661123Smrg# These macros are necessary as long as will still need to support 77650b661123Smrg# Autoconf-2.59 which quotes differently. 77660b661123Smrgm4_define([lt_car], [[$1]]) 77670b661123Smrgm4_define([lt_cdr], 77680b661123Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 77690b661123Smrg [$#], 1, [], 77700b661123Smrg [m4_dquote(m4_shift($@))])]) 77710b661123Smrgm4_define([lt_unquote], $1) 77720b661123Smrg 77730b661123Smrg 77740b661123Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 77750b661123Smrg# ------------------------------------------ 77760b661123Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 77770b661123Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 77780b661123Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 77790b661123Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 77800b661123Smrg# than defined and empty). 77810b661123Smrg# 77820b661123Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 77830b661123Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 77840b661123Smrgm4_define([lt_append], 77850b661123Smrg[m4_define([$1], 77860b661123Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 77870b661123Smrg 77880b661123Smrg 77890b661123Smrg 77900b661123Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 77910b661123Smrg# ---------------------------------------------------------- 77920b661123Smrg# Produce a SEP delimited list of all paired combinations of elements of 77930b661123Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 77940b661123Smrg# has the form PREFIXmINFIXSUFFIXn. 77950b661123Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 77960b661123Smrgm4_define([lt_combine], 77970b661123Smrg[m4_if(m4_eval([$# > 3]), [1], 77980b661123Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 77990b661123Smrg[[m4_foreach([_Lt_prefix], [$2], 78000b661123Smrg [m4_foreach([_Lt_suffix], 78010b661123Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 78020b661123Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 78030b661123Smrg 78040b661123Smrg 78050b661123Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 78060b661123Smrg# ----------------------------------------------------------------------- 78070b661123Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 78080b661123Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 78090b661123Smrgm4_define([lt_if_append_uniq], 78100b661123Smrg[m4_ifdef([$1], 78110b661123Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 78120b661123Smrg [lt_append([$1], [$2], [$3])$4], 78130b661123Smrg [$5])], 78140b661123Smrg [lt_append([$1], [$2], [$3])$4])]) 78150b661123Smrg 78160b661123Smrg 78170b661123Smrg# lt_dict_add(DICT, KEY, VALUE) 78180b661123Smrg# ----------------------------- 78190b661123Smrgm4_define([lt_dict_add], 78200b661123Smrg[m4_define([$1($2)], [$3])]) 7821bdcaa8d0Smrg 7822bdcaa8d0Smrg 78230b661123Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 78240b661123Smrg# -------------------------------------------- 78250b661123Smrgm4_define([lt_dict_add_subkey], 78260b661123Smrg[m4_define([$1($2:$3)], [$4])]) 7827bdcaa8d0Smrg 7828bdcaa8d0Smrg 78290b661123Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 78300b661123Smrg# ---------------------------------- 78310b661123Smrgm4_define([lt_dict_fetch], 78320b661123Smrg[m4_ifval([$3], 78330b661123Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 78340b661123Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 78350b661123Smrg 7836bdcaa8d0Smrg 78370b661123Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 78380b661123Smrg# ----------------------------------------------------------------- 78390b661123Smrgm4_define([lt_if_dict_fetch], 78400b661123Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 78410b661123Smrg [$5], 78420b661123Smrg [$6])]) 78430b661123Smrg 78440b661123Smrg 78450b661123Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 78460b661123Smrg# -------------------------------------------------------------- 78470b661123Smrgm4_define([lt_dict_filter], 78480b661123Smrg[m4_if([$5], [], [], 78490b661123Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 78500b661123Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 78510b661123Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852bdcaa8d0Smrg]) 785372313efbSmrg 78540b661123Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 78550b661123Smrg# 78560b661123Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 78570b661123Smrg# Written by Scott James Remnant, 2004 78580b661123Smrg# 78590b661123Smrg# This file is free software; the Free Software Foundation gives 78600b661123Smrg# unlimited permission to copy and/or distribute it, with or without 78610b661123Smrg# modifications, as long as this notice is preserved. 786272313efbSmrg 78630b661123Smrg# Generated from ltversion.in. 786472313efbSmrg 78650b661123Smrg# serial 3017 ltversion.m4 78660b661123Smrg# This file is part of GNU Libtool 786772313efbSmrg 78680b661123Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 78690b661123Smrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 787072313efbSmrg 78710b661123SmrgAC_DEFUN([LTVERSION_VERSION], 78720b661123Smrg[macro_version='2.2.6b' 78730b661123Smrgmacro_revision='1.3017' 78740b661123Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 78750b661123Smrg_LT_DECL(, macro_revision, 0) 7876bdcaa8d0Smrg]) 787772313efbSmrg 78780b661123Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 78790b661123Smrg# 78800b661123Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 78810b661123Smrg# Written by Scott James Remnant, 2004. 78820b661123Smrg# 78830b661123Smrg# This file is free software; the Free Software Foundation gives 78840b661123Smrg# unlimited permission to copy and/or distribute it, with or without 78850b661123Smrg# modifications, as long as this notice is preserved. 78860b661123Smrg 78870b661123Smrg# serial 4 lt~obsolete.m4 78880b661123Smrg 78890b661123Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 78900b661123Smrg# 78910b661123Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 78920b661123Smrg# which have later been changed to m4_define as they aren't part of the 78930b661123Smrg# exported API, or moved to Autoconf or Automake where they belong. 78940b661123Smrg# 78950b661123Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 78960b661123Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 78970b661123Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 78980b661123Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 78990b661123Smrg# and doesn't know about Autoconf macros at all.) 79000b661123Smrg# 79010b661123Smrg# So we provide this file, which has a silly filename so it's always 79020b661123Smrg# included after everything else. This provides aclocal with the 79030b661123Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 79040b661123Smrg# because those macros already exist, or will be overwritten later. 79050b661123Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 79060b661123Smrg# 79070b661123Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 79080b661123Smrg# Yes, that means every name once taken will need to remain here until 79090b661123Smrg# we give up compatibility with versions before 1.7, at which point 79100b661123Smrg# we need to keep only those names which we still refer to. 79110b661123Smrg 79120b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 79130b661123SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 79140b661123Smrg 79150b661123Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 79160b661123Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 79170b661123Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 79180b661123Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 79190b661123Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 79200b661123Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 79210b661123Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 79220b661123Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 79230b661123Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 79240b661123Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 79250b661123Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 79260b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 79270b661123Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 79280b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 79290b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 79300b661123Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 79310b661123Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 79320b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 79330b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 79340b661123Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 79350b661123Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 79360b661123Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 79370b661123Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 79380b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 79390b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 79400b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 79410b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 79420b661123Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 79430b661123Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 79440b661123Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 79450b661123Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 79460b661123Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 79470b661123Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 79480b661123Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 79490b661123Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 79500b661123Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 79510b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 79520b661123Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 79530b661123Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 79540b661123Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 79550b661123Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 79560b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 79570b661123Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 79580b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 79590b661123Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 79600b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 79610b661123Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 79620b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 79630b661123Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 79640b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 79650b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 79660b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 79670b661123Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 79680b661123Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 79690b661123Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 79700b661123Smrg 7971bdcaa8d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972bdcaa8d0Smrg# 7973bdcaa8d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974bdcaa8d0Smrg# 7975bdcaa8d0Smrg# This program is free software; you can redistribute it and/or modify 7976bdcaa8d0Smrg# it under the terms of the GNU General Public License as published by 7977bdcaa8d0Smrg# the Free Software Foundation; either version 2 of the License, or 7978bdcaa8d0Smrg# (at your option) any later version. 7979bdcaa8d0Smrg# 7980bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, but 7981bdcaa8d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982bdcaa8d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983bdcaa8d0Smrg# General Public License for more details. 7984bdcaa8d0Smrg# 7985bdcaa8d0Smrg# You should have received a copy of the GNU General Public License 7986bdcaa8d0Smrg# along with this program; if not, write to the Free Software 7987bdcaa8d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988bdcaa8d0Smrg# 7989bdcaa8d0Smrg# As a special exception to the GNU General Public License, if you 7990bdcaa8d0Smrg# distribute this file as part of a program that contains a 7991bdcaa8d0Smrg# configuration script generated by Autoconf, you may include it under 7992bdcaa8d0Smrg# the same distribution terms that you use for the rest of that program. 7993bdcaa8d0Smrg 7994bdcaa8d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995bdcaa8d0Smrg# ---------------------------------- 7996bdcaa8d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997bdcaa8d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998bdcaa8d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999bdcaa8d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000bdcaa8d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001bdcaa8d0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002bdcaa8d0Smrgfi 8003bdcaa8d0Smrgif test -n "$PKG_CONFIG"; then 8004bdcaa8d0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005bdcaa8d0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006bdcaa8d0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8008bdcaa8d0Smrg else 8009bdcaa8d0Smrg AC_MSG_RESULT([no]) 8010bdcaa8d0Smrg PKG_CONFIG="" 8011bdcaa8d0Smrg fi 8012bdcaa8d0Smrg 8013bdcaa8d0Smrgfi[]dnl 8014bdcaa8d0Smrg])# PKG_PROG_PKG_CONFIG 8015bdcaa8d0Smrg 8016bdcaa8d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017bdcaa8d0Smrg# 8018bdcaa8d0Smrg# Check to see whether a particular set of modules exists. Similar 8019bdcaa8d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020bdcaa8d0Smrg# 8021bdcaa8d0Smrg# 8022bdcaa8d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023bdcaa8d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024bdcaa8d0Smrg# PKG_CHECK_EXISTS manually 8025bdcaa8d0Smrg# -------------------------------------------------------------- 8026bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028bdcaa8d0Smrgif test -n "$PKG_CONFIG" && \ 8029bdcaa8d0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030bdcaa8d0Smrg m4_ifval([$2], [$2], [:]) 8031bdcaa8d0Smrgm4_ifvaln([$3], [else 8032bdcaa8d0Smrg $3])dnl 8033bdcaa8d0Smrgfi]) 8034bdcaa8d0Smrg 8035bdcaa8d0Smrg 8036bdcaa8d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037bdcaa8d0Smrg# --------------------------------------------- 8038bdcaa8d0Smrgm4_define([_PKG_CONFIG], 803972313efbSmrg[if test -n "$$1"; then 804072313efbSmrg pkg_cv_[]$1="$$1" 804172313efbSmrg elif test -n "$PKG_CONFIG"; then 804272313efbSmrg PKG_CHECK_EXISTS([$3], 804372313efbSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 804472313efbSmrg [pkg_failed=yes]) 804572313efbSmrg else 804672313efbSmrg pkg_failed=untried 8047bdcaa8d0Smrgfi[]dnl 8048bdcaa8d0Smrg])# _PKG_CONFIG 8049bdcaa8d0Smrg 8050bdcaa8d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8051bdcaa8d0Smrg# ----------------------------- 8052bdcaa8d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054bdcaa8d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055bdcaa8d0Smrg _pkg_short_errors_supported=yes 8056bdcaa8d0Smrgelse 8057bdcaa8d0Smrg _pkg_short_errors_supported=no 8058bdcaa8d0Smrgfi[]dnl 8059bdcaa8d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060bdcaa8d0Smrg 8061bdcaa8d0Smrg 8062bdcaa8d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063bdcaa8d0Smrg# [ACTION-IF-NOT-FOUND]) 8064bdcaa8d0Smrg# 8065bdcaa8d0Smrg# 8066bdcaa8d0Smrg# Note that if there is a possibility the first call to 8067bdcaa8d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068bdcaa8d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069bdcaa8d0Smrg# 8070bdcaa8d0Smrg# 8071bdcaa8d0Smrg# -------------------------------------------------------------- 8072bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_MODULES], 8073bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074bdcaa8d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075bdcaa8d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076bdcaa8d0Smrg 8077bdcaa8d0Smrgpkg_failed=no 8078bdcaa8d0SmrgAC_MSG_CHECKING([for $1]) 8079bdcaa8d0Smrg 8080bdcaa8d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081bdcaa8d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082bdcaa8d0Smrg 8083bdcaa8d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084bdcaa8d0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8085bdcaa8d0SmrgSee the pkg-config man page for more details.]) 8086bdcaa8d0Smrg 8087bdcaa8d0Smrgif test $pkg_failed = yes; then 8088bdcaa8d0Smrg _PKG_SHORT_ERRORS_SUPPORTED 8089bdcaa8d0Smrg if test $_pkg_short_errors_supported = yes; then 809072313efbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091bdcaa8d0Smrg else 809272313efbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093bdcaa8d0Smrg fi 8094bdcaa8d0Smrg # Put the nasty error message in config.log where it belongs 8095bdcaa8d0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096bdcaa8d0Smrg 8097bdcaa8d0Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098bdcaa8d0Smrg[Package requirements ($2) were not met: 8099bdcaa8d0Smrg 8100bdcaa8d0Smrg$$1_PKG_ERRORS 8101bdcaa8d0Smrg 8102bdcaa8d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103bdcaa8d0Smrginstalled software in a non-standard prefix. 8104bdcaa8d0Smrg 8105bdcaa8d0Smrg_PKG_TEXT 8106bdcaa8d0Smrg])], 810772313efbSmrg [AC_MSG_RESULT([no]) 810872313efbSmrg $4]) 8109bdcaa8d0Smrgelif test $pkg_failed = untried; then 8110bdcaa8d0Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111bdcaa8d0Smrg[The pkg-config script could not be found or is too old. Make sure it 8112bdcaa8d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113bdcaa8d0Smrgpath to pkg-config. 8114bdcaa8d0Smrg 8115bdcaa8d0Smrg_PKG_TEXT 8116bdcaa8d0Smrg 811772313efbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118bdcaa8d0Smrg [$4]) 8119bdcaa8d0Smrgelse 8120bdcaa8d0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121bdcaa8d0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8123bdcaa8d0Smrg ifelse([$3], , :, [$3]) 8124bdcaa8d0Smrgfi[]dnl 8125bdcaa8d0Smrg])# PKG_CHECK_MODULES 8126bdcaa8d0Smrg 812772313efbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8128bdcaa8d0Smrgdnl 8129bdcaa8d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 8130bdcaa8d0Smrgdnl 8131bdcaa8d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 81320b661123Smrgdnl copy of this software and associated documentation files (the "Software"), 81330b661123Smrgdnl to deal in the Software without restriction, including without limitation 81340b661123Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 81350b661123Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 81360b661123Smrgdnl Software is furnished to do so, subject to the following conditions: 8137bdcaa8d0Smrgdnl 81380b661123Smrgdnl The above copyright notice and this permission notice (including the next 81390b661123Smrgdnl paragraph) shall be included in all copies or substantial portions of the 81400b661123Smrgdnl Software. 8141bdcaa8d0Smrgdnl 81420b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 81430b661123Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 81440b661123Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 81450b661123Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 81460b661123Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 81470b661123Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 81480b661123Smrgdnl DEALINGS IN THE SOFTWARE. 8149bdcaa8d0Smrg 8150bdcaa8d0Smrg# XORG_MACROS_VERSION(required-version) 8151bdcaa8d0Smrg# ------------------------------------- 8152bdcaa8d0Smrg# Minimum version: 1.1.0 8153bdcaa8d0Smrg# 8154bdcaa8d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 8155bdcaa8d0Smrg# your configure.ac with the minimum required version, such as: 8156bdcaa8d0Smrg# XORG_MACROS_VERSION(1.1) 8157bdcaa8d0Smrg# 81580b661123Smrg# To ensure that this macro is defined, also add: 81590b661123Smrg# m4_ifndef([XORG_MACROS_VERSION], 81600b661123Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8161bdcaa8d0Smrg# 8162bdcaa8d0Smrg# 8163bdcaa8d0Smrg# See the "minimum version" comment for each macro you use to see what 8164bdcaa8d0Smrg# version you require. 81650b661123Smrgm4_defun([XORG_MACROS_VERSION],[ 81660b661123Smrgm4_define([vers_have], [1.8.0]) 81670b661123Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 81680b661123Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 81690b661123Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 81700b661123Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 81710b661123Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 81720b661123Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 81730b661123Smrgm4_undefine([vers_have]) 81740b661123Smrgm4_undefine([maj_have]) 81750b661123Smrgm4_undefine([maj_needed]) 8176bdcaa8d0Smrg]) # XORG_MACROS_VERSION 8177bdcaa8d0Smrg 8178bdcaa8d0Smrg# XORG_PROG_RAWCPP() 8179bdcaa8d0Smrg# ------------------ 8180bdcaa8d0Smrg# Minimum version: 1.0.0 8181bdcaa8d0Smrg# 8182bdcaa8d0Smrg# Find cpp program and necessary flags for use in pre-processing text files 8183bdcaa8d0Smrg# such as man pages and config files 8184bdcaa8d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8185bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CPP]) 8186bdcaa8d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8187bdcaa8d0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8188bdcaa8d0Smrg 8189bdcaa8d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8190bdcaa8d0Smrg# which is not the best choice for supporting other OS'es, but covers most 8191bdcaa8d0Smrg# of the ones we need for now. 8192bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8193bdcaa8d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 8194bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8195bdcaa8d0Smrg AC_MSG_RESULT([no]) 8196bdcaa8d0Smrgelse 8197bdcaa8d0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8198bdcaa8d0Smrg RAWCPPFLAGS=-undef 8199bdcaa8d0Smrg AC_MSG_RESULT([yes]) 820072313efbSmrg # under Cygwin unix is still defined even with -undef 820172313efbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 820272313efbSmrg RAWCPPFLAGS="-undef -ansi" 820372313efbSmrg AC_MSG_RESULT([yes, with -ansi]) 8204bdcaa8d0Smrg else 8205bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8206bdcaa8d0Smrg fi 8207bdcaa8d0Smrgfi 8208bdcaa8d0Smrgrm -f conftest.$ac_ext 8209bdcaa8d0Smrg 8210bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8211bdcaa8d0SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 8212bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8213bdcaa8d0Smrg AC_MSG_RESULT([no]) 8214bdcaa8d0Smrgelse 8215bdcaa8d0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8216bdcaa8d0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8217bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8218bdcaa8d0Smrg else 8219bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8220bdcaa8d0Smrg fi 8221bdcaa8d0Smrgfi 8222bdcaa8d0Smrgrm -f conftest.$ac_ext 8223bdcaa8d0SmrgAC_SUBST(RAWCPPFLAGS) 8224bdcaa8d0Smrg]) # XORG_PROG_RAWCPP 8225bdcaa8d0Smrg 8226bdcaa8d0Smrg# XORG_MANPAGE_SECTIONS() 8227bdcaa8d0Smrg# ----------------------- 8228bdcaa8d0Smrg# Minimum version: 1.0.0 8229bdcaa8d0Smrg# 8230bdcaa8d0Smrg# Determine which sections man pages go in for the different man page types 8231bdcaa8d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8232bdcaa8d0Smrg# Not sure if there's any better way than just hardcoding by OS name. 8233bdcaa8d0Smrg# Override default settings by setting environment variables 82340b661123Smrg# Added MAN_SUBSTS in version 1.8 82350b661123Smrg# Added AC_PROG_SED in version 1.8 8236bdcaa8d0Smrg 8237bdcaa8d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8238bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 82390b661123SmrgAC_REQUIRE([AC_PROG_SED]) 8240bdcaa8d0Smrg 8241bdcaa8d0Smrgif test x$APP_MAN_SUFFIX = x ; then 8242bdcaa8d0Smrg APP_MAN_SUFFIX=1 8243bdcaa8d0Smrgfi 8244bdcaa8d0Smrgif test x$APP_MAN_DIR = x ; then 8245bdcaa8d0Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8246bdcaa8d0Smrgfi 8247bdcaa8d0Smrg 8248bdcaa8d0Smrgif test x$LIB_MAN_SUFFIX = x ; then 8249bdcaa8d0Smrg LIB_MAN_SUFFIX=3 8250bdcaa8d0Smrgfi 8251bdcaa8d0Smrgif test x$LIB_MAN_DIR = x ; then 8252bdcaa8d0Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8253bdcaa8d0Smrgfi 8254bdcaa8d0Smrg 8255bdcaa8d0Smrgif test x$FILE_MAN_SUFFIX = x ; then 8256bdcaa8d0Smrg case $host_os in 8257bdcaa8d0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 8258bdcaa8d0Smrg *) FILE_MAN_SUFFIX=5 ;; 8259bdcaa8d0Smrg esac 8260bdcaa8d0Smrgfi 8261bdcaa8d0Smrgif test x$FILE_MAN_DIR = x ; then 8262bdcaa8d0Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8263bdcaa8d0Smrgfi 8264bdcaa8d0Smrg 8265bdcaa8d0Smrgif test x$MISC_MAN_SUFFIX = x ; then 8266bdcaa8d0Smrg case $host_os in 8267bdcaa8d0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 8268bdcaa8d0Smrg *) MISC_MAN_SUFFIX=7 ;; 8269bdcaa8d0Smrg esac 8270bdcaa8d0Smrgfi 8271bdcaa8d0Smrgif test x$MISC_MAN_DIR = x ; then 8272bdcaa8d0Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8273bdcaa8d0Smrgfi 8274bdcaa8d0Smrg 8275bdcaa8d0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 8276bdcaa8d0Smrg case $host_os in 8277bdcaa8d0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8278bdcaa8d0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 8279bdcaa8d0Smrg esac 8280bdcaa8d0Smrgfi 8281bdcaa8d0Smrgif test x$DRIVER_MAN_DIR = x ; then 8282bdcaa8d0Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8283bdcaa8d0Smrgfi 8284bdcaa8d0Smrg 8285bdcaa8d0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 8286bdcaa8d0Smrg case $host_os in 8287bdcaa8d0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8288bdcaa8d0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 8289bdcaa8d0Smrg esac 8290bdcaa8d0Smrgfi 8291bdcaa8d0Smrgif test x$ADMIN_MAN_DIR = x ; then 8292bdcaa8d0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8293bdcaa8d0Smrgfi 8294bdcaa8d0Smrg 8295bdcaa8d0Smrg 8296bdcaa8d0SmrgAC_SUBST([APP_MAN_SUFFIX]) 8297bdcaa8d0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 8298bdcaa8d0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 8299bdcaa8d0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 8300bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8301bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8302bdcaa8d0SmrgAC_SUBST([APP_MAN_DIR]) 8303bdcaa8d0SmrgAC_SUBST([LIB_MAN_DIR]) 8304bdcaa8d0SmrgAC_SUBST([FILE_MAN_DIR]) 8305bdcaa8d0SmrgAC_SUBST([MISC_MAN_DIR]) 8306bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_DIR]) 8307bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_DIR]) 83080b661123Smrg 83090b661123SmrgXORG_MAN_PAGE="X Version 11" 83100b661123SmrgAC_SUBST([XORG_MAN_PAGE]) 83110b661123SmrgMAN_SUBSTS="\ 83120b661123Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 83130b661123Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 83140b661123Smrg -e 's|__xservername__|Xorg|g' \ 83150b661123Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 83160b661123Smrg -e 's|__projectroot__|\$(prefix)|g' \ 83170b661123Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 83180b661123Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 83190b661123Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 83200b661123Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 83210b661123Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 83220b661123Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 83230b661123SmrgAC_SUBST([MAN_SUBSTS]) 83240b661123Smrg 8325bdcaa8d0Smrg]) # XORG_MANPAGE_SECTIONS 8326bdcaa8d0Smrg 83270b661123Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 83280b661123Smrg# ------------------------ 83290b661123Smrg# Minimum version: 1.7.0 83300b661123Smrg# 83310b661123Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 83320b661123Smrg# provided by xorg-sgml-doctools, if installed. 83330b661123SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 83340b661123SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 83350b661123SmrgXORG_SGML_PATH= 83360b661123SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 83370b661123Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 83380b661123Smrg [m4_ifval([$1],[:], 83390b661123Smrg [if test x"$cross_compiling" != x"yes" ; then 83400b661123Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 83410b661123Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 83420b661123Smrg fi]) 83430b661123Smrg ]) 83440b661123Smrg 83450b661123Smrgif test "x$XORG_SGML_PATH" != "x" ; then 83460b661123Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 83470b661123Smrgelse 83480b661123Smrg AC_MSG_RESULT([no]) 83490b661123Smrgfi 83500b661123Smrg 83510b661123SmrgAC_SUBST(XORG_SGML_PATH) 83520b661123Smrg]) # XORG_CHECK_SGML_DOCTOOLS 83530b661123Smrg 8354bdcaa8d0Smrg# XORG_CHECK_LINUXDOC 8355bdcaa8d0Smrg# ------------------- 8356bdcaa8d0Smrg# Minimum version: 1.0.0 8357bdcaa8d0Smrg# 8358bdcaa8d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 8359bdcaa8d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8360bdcaa8d0Smrg# Whether or not the necessary tools and files are found can be checked 8361bdcaa8d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8362bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 83630b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 83640b661123SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 8365bdcaa8d0Smrg 8366bdcaa8d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 8367bdcaa8d0Smrg 83680b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 8369bdcaa8d0Smrg 83700b661123Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 8371bdcaa8d0Smrg BUILDDOC=yes 8372bdcaa8d0Smrgelse 8373bdcaa8d0Smrg BUILDDOC=no 8374bdcaa8d0Smrgfi 8375bdcaa8d0Smrg 8376bdcaa8d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8377bdcaa8d0Smrg 8378bdcaa8d0SmrgAC_MSG_RESULT([$BUILDDOC]) 8379bdcaa8d0Smrg 83800b661123SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 8381bdcaa8d0Smrg 83820b661123Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 8383bdcaa8d0Smrg BUILDPDFDOC=yes 8384bdcaa8d0Smrgelse 8385bdcaa8d0Smrg BUILDPDFDOC=no 8386bdcaa8d0Smrgfi 8387bdcaa8d0Smrg 8388bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8389bdcaa8d0Smrg 8390bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8391bdcaa8d0Smrg 83920b661123SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 8393bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8394bdcaa8d0SmrgMAKE_PDF="$PS2PDF" 8395bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8396bdcaa8d0Smrg 8397bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 8398bdcaa8d0SmrgAC_SUBST(MAKE_PS) 8399bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 8400bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 8401bdcaa8d0Smrg]) # XORG_CHECK_LINUXDOC 8402bdcaa8d0Smrg 8403bdcaa8d0Smrg# XORG_CHECK_DOCBOOK 8404bdcaa8d0Smrg# ------------------- 8405bdcaa8d0Smrg# Minimum version: 1.0.0 8406bdcaa8d0Smrg# 8407bdcaa8d0Smrg# Checks for the ability to build output formats from SGML DocBook source. 8408bdcaa8d0Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 8409bdcaa8d0Smrg# indicates whether the necessary tools and files are found and, if set, 8410bdcaa8d0Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 8411bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 84120b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 84130b661123Smrg 8414bdcaa8d0SmrgBUILDTXTDOC=no 8415bdcaa8d0SmrgBUILDPDFDOC=no 8416bdcaa8d0SmrgBUILDPSDOC=no 8417bdcaa8d0SmrgBUILDHTMLDOC=no 8418bdcaa8d0Smrg 8419bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 8420bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 8421bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 8422bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8423bdcaa8d0Smrg 84240b661123SmrgAC_MSG_CHECKING([whether to build text documentation]) 84250b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 8426bdcaa8d0Smrg test x$BUILD_TXTDOC != xno; then 8427bdcaa8d0Smrg BUILDTXTDOC=yes 8428bdcaa8d0Smrgfi 8429bdcaa8d0SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 8430bdcaa8d0SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 8431bdcaa8d0Smrg 84320b661123SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 84330b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 8434bdcaa8d0Smrg test x$BUILD_PDFDOC != xno; then 8435bdcaa8d0Smrg BUILDPDFDOC=yes 8436bdcaa8d0Smrgfi 8437bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8438bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8439bdcaa8d0Smrg 84400b661123SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 84410b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 8442bdcaa8d0Smrg test x$BUILD_PSDOC != xno; then 8443bdcaa8d0Smrg BUILDPSDOC=yes 8444bdcaa8d0Smrgfi 8445bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 8446bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPSDOC]) 8447bdcaa8d0Smrg 84480b661123SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 84490b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 8450bdcaa8d0Smrg test x$BUILD_HTMLDOC != xno; then 8451bdcaa8d0Smrg BUILDHTMLDOC=yes 8452bdcaa8d0Smrgfi 8453bdcaa8d0SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 8454bdcaa8d0SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 8455bdcaa8d0Smrg 8456bdcaa8d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 8457bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 8458bdcaa8d0SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 8459bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 8460bdcaa8d0Smrg 8461bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 8462bdcaa8d0SmrgAC_SUBST(MAKE_PS) 8463bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 8464bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 8465bdcaa8d0Smrg]) # XORG_CHECK_DOCBOOK 8466bdcaa8d0Smrg 84670b661123Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 84680b661123Smrg# ---------------- 84690b661123Smrg# Minimum version: 1.5.0 84700b661123Smrg# 84710b661123Smrg# Documentation tools are not always available on all platforms and sometimes 84720b661123Smrg# not at the appropriate level. This macro enables a module to test for the 84730b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 84740b661123Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 84750b661123Smrg# as whether or not to use the xmlto package. 84760b661123Smrg# 84770b661123Smrg# Interface to module: 84780b661123Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 84790b661123Smrg# XMLTO: returns the path of the xmlto program found 84800b661123Smrg# returns the path set by the user in the environment 84810b661123Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 84820b661123Smrg# 'no' user instructs the module not to use xmlto 84830b661123Smrg# 84840b661123Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 84850b661123Smrg# 84860b661123SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 84870b661123SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 84880b661123SmrgAC_ARG_WITH(xmlto, 84890b661123Smrg AS_HELP_STRING([--with-xmlto], 84900b661123Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 84910b661123Smrg [use_xmlto=$withval], [use_xmlto=auto]) 84920b661123Smrg 84930b661123Smrgif test "x$use_xmlto" = x"auto"; then 84940b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 84950b661123Smrg if test "x$XMLTO" = "x"; then 84960b661123Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 84970b661123Smrg have_xmlto=no 84980b661123Smrg else 84990b661123Smrg have_xmlto=yes 85000b661123Smrg fi 85010b661123Smrgelif test "x$use_xmlto" = x"yes" ; then 85020b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 85030b661123Smrg if test "x$XMLTO" = "x"; then 85040b661123Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 85050b661123Smrg fi 85060b661123Smrg have_xmlto=yes 85070b661123Smrgelif test "x$use_xmlto" = x"no" ; then 85080b661123Smrg if test "x$XMLTO" != "x"; then 85090b661123Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 85100b661123Smrg fi 85110b661123Smrg have_xmlto=no 85120b661123Smrgelse 85130b661123Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 85140b661123Smrgfi 85150b661123Smrgm4_ifval([$1], 85160b661123Smrg[if test "$have_xmlto" = yes; then 85170b661123Smrg # scrape the xmlto version 85180b661123Smrg AC_MSG_CHECKING([the xmlto version]) 85190b661123Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 85200b661123Smrg AC_MSG_RESULT([$xmlto_version]) 85210b661123Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 85220b661123Smrg [if test "x$use_xmlto" = xauto; then 85230b661123Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 85240b661123Smrg have_xmlto=no 85250b661123Smrg else 85260b661123Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 85270b661123Smrg fi]) 85280b661123Smrgfi]) 85290b661123SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 85300b661123Smrg]) # XORG_WITH_XMLTO 85310b661123Smrg 85320b661123Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 85330b661123Smrg# ---------------- 85340b661123Smrg# Minimum version: 1.5.0 85350b661123Smrg# 85360b661123Smrg# Documentation tools are not always available on all platforms and sometimes 85370b661123Smrg# not at the appropriate level. This macro enables a module to test for the 85380b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 85390b661123Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 85400b661123Smrg# as whether or not to use the asciidoc package. 85410b661123Smrg# 85420b661123Smrg# Interface to module: 85430b661123Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 85440b661123Smrg# ASCIIDOC: returns the path of the asciidoc program found 85450b661123Smrg# returns the path set by the user in the environment 85460b661123Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 85470b661123Smrg# 'no' user instructs the module not to use asciidoc 85480b661123Smrg# 85490b661123Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 85500b661123Smrg# 85510b661123SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 85520b661123SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 85530b661123SmrgAC_ARG_WITH(asciidoc, 85540b661123Smrg AS_HELP_STRING([--with-asciidoc], 85550b661123Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 85560b661123Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 85570b661123Smrg 85580b661123Smrgif test "x$use_asciidoc" = x"auto"; then 85590b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 85600b661123Smrg if test "x$ASCIIDOC" = "x"; then 85610b661123Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 85620b661123Smrg have_asciidoc=no 85630b661123Smrg else 85640b661123Smrg have_asciidoc=yes 85650b661123Smrg fi 85660b661123Smrgelif test "x$use_asciidoc" = x"yes" ; then 85670b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 85680b661123Smrg if test "x$ASCIIDOC" = "x"; then 85690b661123Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 85700b661123Smrg fi 85710b661123Smrg have_asciidoc=yes 85720b661123Smrgelif test "x$use_asciidoc" = x"no" ; then 85730b661123Smrg if test "x$ASCIIDOC" != "x"; then 85740b661123Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 85750b661123Smrg fi 85760b661123Smrg have_asciidoc=no 85770b661123Smrgelse 85780b661123Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 85790b661123Smrgfi 85800b661123Smrgm4_ifval([$1], 85810b661123Smrg[if test "$have_asciidoc" = yes; then 85820b661123Smrg # scrape the asciidoc version 85830b661123Smrg AC_MSG_CHECKING([the asciidoc version]) 85840b661123Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 85850b661123Smrg AC_MSG_RESULT([$asciidoc_version]) 85860b661123Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 85870b661123Smrg [if test "x$use_asciidoc" = xauto; then 85880b661123Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 85890b661123Smrg have_asciidoc=no 85900b661123Smrg else 85910b661123Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 85920b661123Smrg fi]) 85930b661123Smrgfi]) 85940b661123SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 85950b661123Smrg]) # XORG_WITH_ASCIIDOC 85960b661123Smrg 85970b661123Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 85980b661123Smrg# -------------------------------- 85990b661123Smrg# Minimum version: 1.5.0 86000b661123Smrg# 86010b661123Smrg# Documentation tools are not always available on all platforms and sometimes 86020b661123Smrg# not at the appropriate level. This macro enables a module to test for the 86030b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 86040b661123Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 86050b661123Smrg# as whether or not to use the doxygen package. 86060b661123Smrg# 86070b661123Smrg# Interface to module: 86080b661123Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 86090b661123Smrg# DOXYGEN: returns the path of the doxygen program found 86100b661123Smrg# returns the path set by the user in the environment 86110b661123Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 86120b661123Smrg# 'no' user instructs the module not to use doxygen 86130b661123Smrg# 86140b661123Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 86150b661123Smrg# 86160b661123SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 86170b661123SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 86180b661123SmrgAC_ARG_WITH(doxygen, 86190b661123Smrg AS_HELP_STRING([--with-doxygen], 86200b661123Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 86210b661123Smrg [use_doxygen=$withval], [use_doxygen=auto]) 86220b661123Smrg 86230b661123Smrgif test "x$use_doxygen" = x"auto"; then 86240b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 86250b661123Smrg if test "x$DOXYGEN" = "x"; then 86260b661123Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 86270b661123Smrg have_doxygen=no 86280b661123Smrg else 86290b661123Smrg have_doxygen=yes 86300b661123Smrg fi 86310b661123Smrgelif test "x$use_doxygen" = x"yes" ; then 86320b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 86330b661123Smrg if test "x$DOXYGEN" = "x"; then 86340b661123Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 86350b661123Smrg fi 86360b661123Smrg have_doxygen=yes 86370b661123Smrgelif test "x$use_doxygen" = x"no" ; then 86380b661123Smrg if test "x$DOXYGEN" != "x"; then 86390b661123Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 86400b661123Smrg fi 86410b661123Smrg have_doxygen=no 86420b661123Smrgelse 86430b661123Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 86440b661123Smrgfi 86450b661123Smrgm4_ifval([$1], 86460b661123Smrg[if test "$have_doxygen" = yes; then 86470b661123Smrg # scrape the doxygen version 86480b661123Smrg AC_MSG_CHECKING([the doxygen version]) 86490b661123Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 86500b661123Smrg AC_MSG_RESULT([$doxygen_version]) 86510b661123Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 86520b661123Smrg [if test "x$use_doxygen" = xauto; then 86530b661123Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 86540b661123Smrg have_doxygen=no 86550b661123Smrg else 86560b661123Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 86570b661123Smrg fi]) 86580b661123Smrgfi]) 86590b661123SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 86600b661123Smrg]) # XORG_WITH_DOXYGEN 86610b661123Smrg 86620b661123Smrg# XORG_WITH_GROFF 86630b661123Smrg# ---------------- 86640b661123Smrg# Minimum version: 1.6.0 86650b661123Smrg# 86660b661123Smrg# Documentation tools are not always available on all platforms and sometimes 86670b661123Smrg# not at the appropriate level. This macro enables a module to test for the 86680b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 86690b661123Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 86700b661123Smrg# as whether or not to use the groff package. 86710b661123Smrg# 86720b661123Smrg# Interface to module: 86730b661123Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 86740b661123Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 86750b661123Smrg# HAVE_GROFF_MS: the -ms macros package 86760b661123Smrg# GROFF: returns the path of the groff program found 86770b661123Smrg# returns the path set by the user in the environment 86780b661123Smrg# --with-groff: 'yes' user instructs the module to use groff 86790b661123Smrg# 'no' user instructs the module not to use groff 86800b661123Smrg# 86810b661123Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 86820b661123Smrg# 86830b661123Smrg# OS and distros often splits groff in a basic and full package, the former 86840b661123Smrg# having the groff program and the later having devices, fonts and macros 86850b661123Smrg# Checking for the groff executable is not enough. 86860b661123Smrg# 86870b661123Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 86880b661123Smrg# unset HAVE_GROFF or GROFF env variables. 86890b661123Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 86900b661123Smrg# 86910b661123SmrgAC_DEFUN([XORG_WITH_GROFF],[ 86920b661123SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 86930b661123SmrgAC_ARG_WITH(groff, 86940b661123Smrg AS_HELP_STRING([--with-groff], 86950b661123Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 86960b661123Smrg [use_groff=$withval], [use_groff=auto]) 86970b661123Smrg 86980b661123Smrgif test "x$use_groff" = x"auto"; then 86990b661123Smrg AC_PATH_PROG([GROFF], [groff]) 87000b661123Smrg if test "x$GROFF" = "x"; then 87010b661123Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 87020b661123Smrg have_groff=no 87030b661123Smrg else 87040b661123Smrg have_groff=yes 87050b661123Smrg fi 87060b661123Smrgelif test "x$use_groff" = x"yes" ; then 87070b661123Smrg AC_PATH_PROG([GROFF], [groff]) 87080b661123Smrg if test "x$GROFF" = "x"; then 87090b661123Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 87100b661123Smrg fi 87110b661123Smrg have_groff=yes 87120b661123Smrgelif test "x$use_groff" = x"no" ; then 87130b661123Smrg if test "x$GROFF" != "x"; then 87140b661123Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 87150b661123Smrg fi 87160b661123Smrg have_groff=no 87170b661123Smrgelse 87180b661123Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 87190b661123Smrgfi 87200b661123Smrg# We have groff, test for the presence of the macro packages 87210b661123Smrgif test "x$have_groff" = x"yes"; then 87220b661123Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 87230b661123Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 87240b661123Smrg groff_ms_works=yes 87250b661123Smrg else 87260b661123Smrg groff_ms_works=no 87270b661123Smrg fi 87280b661123Smrg AC_MSG_RESULT([$groff_ms_works]) 87290b661123Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 87300b661123Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 87310b661123Smrg groff_mm_works=yes 87320b661123Smrg else 87330b661123Smrg groff_mm_works=no 87340b661123Smrg fi 87350b661123Smrg AC_MSG_RESULT([$groff_mm_works]) 87360b661123Smrgfi 87370b661123SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 87380b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 87390b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 87400b661123Smrg]) # XORG_WITH_GROFF 87410b661123Smrg 87420b661123Smrg# XORG_WITH_FOP 87430b661123Smrg# ---------------- 87440b661123Smrg# Minimum version: 1.6.0 87450b661123Smrg# 87460b661123Smrg# Documentation tools are not always available on all platforms and sometimes 87470b661123Smrg# not at the appropriate level. This macro enables a module to test for the 87480b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 87490b661123Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 87500b661123Smrg# as whether or not to use the fop package. 87510b661123Smrg# 87520b661123Smrg# Interface to module: 87530b661123Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 87540b661123Smrg# FOP: returns the path of the fop program found 87550b661123Smrg# returns the path set by the user in the environment 87560b661123Smrg# --with-fop: 'yes' user instructs the module to use fop 87570b661123Smrg# 'no' user instructs the module not to use fop 87580b661123Smrg# 87590b661123Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 87600b661123Smrg# 87610b661123SmrgAC_DEFUN([XORG_WITH_FOP],[ 87620b661123SmrgAC_ARG_VAR([FOP], [Path to fop command]) 87630b661123SmrgAC_ARG_WITH(fop, 87640b661123Smrg AS_HELP_STRING([--with-fop], 87650b661123Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 87660b661123Smrg [use_fop=$withval], [use_fop=auto]) 87670b661123Smrg 87680b661123Smrgif test "x$use_fop" = x"auto"; then 87690b661123Smrg AC_PATH_PROG([FOP], [fop]) 87700b661123Smrg if test "x$FOP" = "x"; then 87710b661123Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 87720b661123Smrg have_fop=no 87730b661123Smrg else 87740b661123Smrg have_fop=yes 87750b661123Smrg fi 87760b661123Smrgelif test "x$use_fop" = x"yes" ; then 87770b661123Smrg AC_PATH_PROG([FOP], [fop]) 87780b661123Smrg if test "x$FOP" = "x"; then 87790b661123Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 87800b661123Smrg fi 87810b661123Smrg have_fop=yes 87820b661123Smrgelif test "x$use_fop" = x"no" ; then 87830b661123Smrg if test "x$FOP" != "x"; then 87840b661123Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 87850b661123Smrg fi 87860b661123Smrg have_fop=no 87870b661123Smrgelse 87880b661123Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 87890b661123Smrgfi 87900b661123SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 87910b661123Smrg]) # XORG_WITH_FOP 87920b661123Smrg 87930b661123Smrg# XORG_WITH_PS2PDF 87940b661123Smrg# ---------------- 87950b661123Smrg# Minimum version: 1.6.0 87960b661123Smrg# 87970b661123Smrg# Documentation tools are not always available on all platforms and sometimes 87980b661123Smrg# not at the appropriate level. This macro enables a module to test for the 87990b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 88000b661123Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 88010b661123Smrg# as whether or not to use the ps2pdf package. 88020b661123Smrg# 88030b661123Smrg# Interface to module: 88040b661123Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 88050b661123Smrg# PS2PDF: returns the path of the ps2pdf program found 88060b661123Smrg# returns the path set by the user in the environment 88070b661123Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 88080b661123Smrg# 'no' user instructs the module not to use ps2pdf 88090b661123Smrg# 88100b661123Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 88110b661123Smrg# 88120b661123SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 88130b661123SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 88140b661123SmrgAC_ARG_WITH(ps2pdf, 88150b661123Smrg AS_HELP_STRING([--with-ps2pdf], 88160b661123Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 88170b661123Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 88180b661123Smrg 88190b661123Smrgif test "x$use_ps2pdf" = x"auto"; then 88200b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 88210b661123Smrg if test "x$PS2PDF" = "x"; then 88220b661123Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 88230b661123Smrg have_ps2pdf=no 88240b661123Smrg else 88250b661123Smrg have_ps2pdf=yes 88260b661123Smrg fi 88270b661123Smrgelif test "x$use_ps2pdf" = x"yes" ; then 88280b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 88290b661123Smrg if test "x$PS2PDF" = "x"; then 88300b661123Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 88310b661123Smrg fi 88320b661123Smrg have_ps2pdf=yes 88330b661123Smrgelif test "x$use_ps2pdf" = x"no" ; then 88340b661123Smrg if test "x$PS2PDF" != "x"; then 88350b661123Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 88360b661123Smrg fi 88370b661123Smrg have_ps2pdf=no 88380b661123Smrgelse 88390b661123Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 88400b661123Smrgfi 88410b661123SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 88420b661123Smrg]) # XORG_WITH_PS2PDF 88430b661123Smrg 88440b661123Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 88450b661123Smrg# ---------------- 88460b661123Smrg# Minimum version: 1.6.0 88470b661123Smrg# 88480b661123Smrg# Documentation tools are not always available on all platforms and sometimes 88490b661123Smrg# not at the appropriate level. This macro enables a builder to skip all 88500b661123Smrg# documentation targets except traditional man pages. 88510b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 88520b661123Smrg# maximum flexibilty in controlling documentation building. 88530b661123Smrg# Refer to: 88540b661123Smrg# XORG_WITH_XMLTO --with-xmlto 88550b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 88560b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 88570b661123Smrg# XORG_WITH_FOP --with-fop 88580b661123Smrg# XORG_WITH_GROFF --with-groff 88590b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 88600b661123Smrg# 88610b661123Smrg# Interface to module: 88620b661123Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 88630b661123Smrg# --enable-docs: 'yes' user instructs the module to generate docs 88640b661123Smrg# 'no' user instructs the module not to generate docs 88650b661123Smrg# parm1: specify the default value, yes or no. 88660b661123Smrg# 88670b661123SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 88680b661123Smrgdefault=$1 88690b661123Smrgif test "x$default" = x ; then 88700b661123Smrg default="yes" 88710b661123Smrgfi 88720b661123SmrgAC_ARG_ENABLE(docs, 88730b661123Smrg AS_HELP_STRING([--enable-docs], 88740b661123Smrg [Enable building the documentation (default: yes)]), 88750b661123Smrg [build_docs=$enableval], [build_docs=$default]) 88760b661123SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 88770b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 88780b661123SmrgAC_MSG_RESULT([$build_docs]) 88790b661123Smrg]) # XORG_ENABLE_DOCS 88800b661123Smrg 88810b661123Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 88820b661123Smrg# ---------------- 88830b661123Smrg# Minimum version: 1.6.0 88840b661123Smrg# 88850b661123Smrg# This macro enables a builder to skip all developer documentation. 88860b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 88870b661123Smrg# maximum flexibilty in controlling documentation building. 88880b661123Smrg# Refer to: 88890b661123Smrg# XORG_WITH_XMLTO --with-xmlto 88900b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 88910b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 88920b661123Smrg# XORG_WITH_FOP --with-fop 88930b661123Smrg# XORG_WITH_GROFF --with-groff 88940b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 88950b661123Smrg# 88960b661123Smrg# Interface to module: 88970b661123Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 88980b661123Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 88990b661123Smrg# 'no' user instructs the module not to generate developer docs 89000b661123Smrg# parm1: specify the default value, yes or no. 89010b661123Smrg# 89020b661123SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 89030b661123Smrgdevel_default=$1 89040b661123Smrgif test "x$devel_default" = x ; then 89050b661123Smrg devel_default="yes" 89060b661123Smrgfi 89070b661123SmrgAC_ARG_ENABLE(devel-docs, 89080b661123Smrg AS_HELP_STRING([--enable-devel-docs], 89090b661123Smrg [Enable building the developer documentation (default: yes)]), 89100b661123Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 89110b661123SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 89120b661123SmrgAC_MSG_CHECKING([whether to build developer documentation]) 89130b661123SmrgAC_MSG_RESULT([$build_devel_docs]) 89140b661123Smrg]) # XORG_ENABLE_DEVEL_DOCS 89150b661123Smrg 89160b661123Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 89170b661123Smrg# ---------------- 89180b661123Smrg# Minimum version: 1.6.0 89190b661123Smrg# 89200b661123Smrg# This macro enables a builder to skip all functional specification targets. 89210b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 89220b661123Smrg# maximum flexibilty in controlling documentation building. 89230b661123Smrg# Refer to: 89240b661123Smrg# XORG_WITH_XMLTO --with-xmlto 89250b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 89260b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 89270b661123Smrg# XORG_WITH_FOP --with-fop 89280b661123Smrg# XORG_WITH_GROFF --with-groff 89290b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 89300b661123Smrg# 89310b661123Smrg# Interface to module: 89320b661123Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 89330b661123Smrg# --enable-specs: 'yes' user instructs the module to generate specs 89340b661123Smrg# 'no' user instructs the module not to generate specs 89350b661123Smrg# parm1: specify the default value, yes or no. 89360b661123Smrg# 89370b661123SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 89380b661123Smrgspec_default=$1 89390b661123Smrgif test "x$spec_default" = x ; then 89400b661123Smrg spec_default="yes" 89410b661123Smrgfi 89420b661123SmrgAC_ARG_ENABLE(specs, 89430b661123Smrg AS_HELP_STRING([--enable-specs], 89440b661123Smrg [Enable building the specs (default: yes)]), 89450b661123Smrg [build_specs=$enableval], [build_specs=$spec_default]) 89460b661123SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 89470b661123SmrgAC_MSG_CHECKING([whether to build functional specifications]) 89480b661123SmrgAC_MSG_RESULT([$build_specs]) 89490b661123Smrg]) # XORG_ENABLE_SPECS 89500b661123Smrg 8951bdcaa8d0Smrg# XORG_CHECK_MALLOC_ZERO 8952bdcaa8d0Smrg# ---------------------- 8953bdcaa8d0Smrg# Minimum version: 1.0.0 8954bdcaa8d0Smrg# 8955bdcaa8d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 8956bdcaa8d0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 8957bdcaa8d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 8958bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 8959bdcaa8d0SmrgAC_ARG_ENABLE(malloc0returnsnull, 89600b661123Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 8961bdcaa8d0Smrg [malloc(0) returns NULL (default: auto)]), 8962bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 8963bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 8964bdcaa8d0Smrg 8965bdcaa8d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 8966bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 8967bdcaa8d0Smrg AC_RUN_IFELSE([ 8968bdcaa8d0Smrgchar *malloc(); 8969bdcaa8d0Smrgchar *realloc(); 8970bdcaa8d0Smrgchar *calloc(); 8971bdcaa8d0Smrgmain() { 8972bdcaa8d0Smrg char *m0, *r0, *c0, *p; 8973bdcaa8d0Smrg m0 = malloc(0); 8974bdcaa8d0Smrg p = malloc(10); 8975bdcaa8d0Smrg r0 = realloc(p,0); 8976bdcaa8d0Smrg c0 = calloc(0); 8977bdcaa8d0Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 8978bdcaa8d0Smrg}], 8979bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 89800b661123Smrg [MALLOC_ZERO_RETURNS_NULL=no], 89810b661123Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 8982bdcaa8d0Smrgfi 8983bdcaa8d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8984bdcaa8d0Smrg 8985bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 8986bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 8987bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 8988bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 8989bdcaa8d0Smrgelse 8990bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="" 8991bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS="" 8992bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="" 8993bdcaa8d0Smrgfi 8994bdcaa8d0Smrg 8995bdcaa8d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 8996bdcaa8d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 8997bdcaa8d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 8998bdcaa8d0Smrg]) # XORG_CHECK_MALLOC_ZERO 8999bdcaa8d0Smrg 9000bdcaa8d0Smrg# XORG_WITH_LINT() 9001bdcaa8d0Smrg# ---------------- 9002bdcaa8d0Smrg# Minimum version: 1.1.0 9003bdcaa8d0Smrg# 90040b661123Smrg# This macro enables the use of a tool that flags some suspicious and 90050b661123Smrg# non-portable constructs (likely to be bugs) in C language source code. 90060b661123Smrg# It will attempt to locate the tool and use appropriate options. 90070b661123Smrg# There are various lint type tools on different platforms. 90080b661123Smrg# 90090b661123Smrg# Interface to module: 90100b661123Smrg# LINT: returns the path to the tool found on the platform 90110b661123Smrg# or the value set to LINT on the configure cmd line 90120b661123Smrg# also an Automake conditional 90130b661123Smrg# LINT_FLAGS: an Automake variable with appropriate flags 90140b661123Smrg# 90150b661123Smrg# --with-lint: 'yes' user instructs the module to use lint 90160b661123Smrg# 'no' user instructs the module not to use lint (default) 90170b661123Smrg# 90180b661123Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 90190b661123Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 9020bdcaa8d0Smrg# 9021bdcaa8d0SmrgAC_DEFUN([XORG_WITH_LINT],[ 9022bdcaa8d0Smrg 90230b661123SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 90240b661123SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 90250b661123SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 9026bdcaa8d0Smrg [Use a lint-style source code checker (default: disabled)])], 9027bdcaa8d0Smrg [use_lint=$withval], [use_lint=no]) 90280b661123Smrg 90290b661123Smrg# Obtain platform specific info like program name and options 90300b661123Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 90310b661123Smrgcase $host_os in 90320b661123Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 90330b661123Smrg lint_name=splint 90340b661123Smrg lint_options="-badflag" 90350b661123Smrg ;; 90360b661123Smrg *freebsd* | *netbsd*) 90370b661123Smrg lint_name=lint 90380b661123Smrg lint_options="-u -b" 90390b661123Smrg ;; 90400b661123Smrg *solaris*) 90410b661123Smrg lint_name=lint 90420b661123Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 90430b661123Smrg ;; 90440b661123Smrgesac 90450b661123Smrg 90460b661123Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 90470b661123Smrgif test "x$use_lint" = x"yes" ; then 90480b661123Smrg AC_PATH_PROG([LINT], [$lint_name]) 90490b661123Smrg if test "x$LINT" = "x"; then 90500b661123Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 90510b661123Smrg fi 90520b661123Smrgelif test "x$use_lint" = x"no" ; then 90530b661123Smrg if test "x$LINT" != "x"; then 90540b661123Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 90550b661123Smrg fi 9056bdcaa8d0Smrgelse 90570b661123Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 9058bdcaa8d0Smrgfi 90590b661123Smrg 90600b661123Smrg# User supplied flags override default flags 90610b661123Smrgif test "x$LINT_FLAGS" != "x"; then 90620b661123Smrg lint_options=$LINT_FLAGS 9063bdcaa8d0Smrgfi 9064bdcaa8d0Smrg 90650b661123SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 90660b661123SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 9067bdcaa8d0Smrg 9068bdcaa8d0Smrg]) # XORG_WITH_LINT 9069bdcaa8d0Smrg 9070bdcaa8d0Smrg# XORG_LINT_LIBRARY(LIBNAME) 9071bdcaa8d0Smrg# -------------------------- 9072bdcaa8d0Smrg# Minimum version: 1.1.0 9073bdcaa8d0Smrg# 9074bdcaa8d0Smrg# Sets up flags for building lint libraries for checking programs that call 9075bdcaa8d0Smrg# functions in the library. 9076bdcaa8d0Smrg# 90770b661123Smrg# Interface to module: 90780b661123Smrg# LINTLIB - Automake variable with the name of lint library file to make 90790b661123Smrg# MAKE_LINT_LIB - Automake conditional 90800b661123Smrg# 90810b661123Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 90820b661123Smrg# - 'no' user instructs the module not to create a lint library (default) 9083bdcaa8d0Smrg 9084bdcaa8d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 9085bdcaa8d0SmrgAC_REQUIRE([XORG_WITH_LINT]) 90860b661123SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 9087bdcaa8d0Smrg [Create lint library (default: disabled)])], 9088bdcaa8d0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 90890b661123Smrg 90900b661123Smrgif test "x$make_lint_lib" = x"yes" ; then 90910b661123Smrg LINTLIB=llib-l$1.ln 90920b661123Smrg if test "x$LINT" = "x"; then 90930b661123Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 90940b661123Smrg fi 90950b661123Smrgelif test "x$make_lint_lib" != x"no" ; then 90960b661123Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 9097bdcaa8d0Smrgfi 90980b661123Smrg 9099bdcaa8d0SmrgAC_SUBST(LINTLIB) 9100bdcaa8d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 9101bdcaa8d0Smrg 9102bdcaa8d0Smrg]) # XORG_LINT_LIBRARY 9103bdcaa8d0Smrg 910472313efbSmrg# XORG_CWARNFLAGS 910572313efbSmrg# --------------- 910672313efbSmrg# Minimum version: 1.2.0 910772313efbSmrg# 910872313efbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 910972313efbSmrg# 911072313efbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 91110b661123SmrgAC_REQUIRE([AC_PROG_CC_C99]) 911272313efbSmrgif test "x$GCC" = xyes ; then 911372313efbSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 911472313efbSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 91150b661123Smrg-Wbad-function-cast -Wformat=2" 91160b661123Smrg case `$CC -dumpversion` in 911772313efbSmrg 3.4.* | 4.*) 91180b661123Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 911972313efbSmrg ;; 912072313efbSmrg esac 912172313efbSmrgelse 912272313efbSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 912372313efbSmrg if test "x$SUNCC" = "xyes"; then 912472313efbSmrg CWARNFLAGS="-v" 912572313efbSmrg fi 912672313efbSmrgfi 912772313efbSmrgAC_SUBST(CWARNFLAGS) 912872313efbSmrg]) # XORG_CWARNFLAGS 91290b661123Smrg 91300b661123Smrg# XORG_STRICT_OPTION 91310b661123Smrg# ----------------------- 91320b661123Smrg# Minimum version: 1.3.0 91330b661123Smrg# 91340b661123Smrg# Add configure option to enable strict compilation 91350b661123SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 91360b661123Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 91370b661123SmrgAC_REQUIRE([AC_PROG_CC_C99]) 91380b661123SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 91390b661123Smrg 91400b661123SmrgAC_ARG_ENABLE(strict-compilation, 91410b661123Smrg AS_HELP_STRING([--enable-strict-compilation], 91420b661123Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 91430b661123Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 91440b661123Smrgif test "x$STRICT_COMPILE" = "xyes"; then 91450b661123Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 91460b661123Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 91470b661123Smrg if test "x$GCC" = xyes ; then 91480b661123Smrg STRICT_CFLAGS="-pedantic -Werror" 91490b661123Smrg elif test "x$SUNCC" = "xyes"; then 91500b661123Smrg STRICT_CFLAGS="-errwarn" 91510b661123Smrg elif test "x$INTELCC" = "xyes"; then 91520b661123Smrg STRICT_CFLAGS="-Werror" 91530b661123Smrg fi 91540b661123Smrgfi 91550b661123SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 91560b661123SmrgAC_SUBST([CWARNFLAGS]) 91570b661123Smrg]) # XORG_STRICT_OPTION 91580b661123Smrg 91590b661123Smrg# XORG_DEFAULT_OPTIONS 91600b661123Smrg# -------------------- 91610b661123Smrg# Minimum version: 1.3.0 91620b661123Smrg# 91630b661123Smrg# Defines default options for X.Org modules. 91640b661123Smrg# 91650b661123SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 91660b661123SmrgAC_REQUIRE([AC_PROG_INSTALL]) 91670b661123SmrgXORG_CWARNFLAGS 91680b661123SmrgXORG_STRICT_OPTION 91690b661123SmrgXORG_RELEASE_VERSION 91700b661123SmrgXORG_CHANGELOG 91710b661123SmrgXORG_INSTALL 91720b661123SmrgXORG_MANPAGE_SECTIONS 91730b661123Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 91740b661123Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 91750b661123Smrg]) # XORG_DEFAULT_OPTIONS 91760b661123Smrg 91770b661123Smrg# XORG_INSTALL() 91780b661123Smrg# ---------------- 91790b661123Smrg# Minimum version: 1.4.0 91800b661123Smrg# 91810b661123Smrg# Defines the variable INSTALL_CMD as the command to copy 91820b661123Smrg# INSTALL from $prefix/share/util-macros. 91830b661123Smrg# 91840b661123SmrgAC_DEFUN([XORG_INSTALL], [ 91850b661123SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91860b661123Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 91870b661123SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 91880b661123Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 91890b661123Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 91900b661123Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 91910b661123SmrgAC_SUBST([INSTALL_CMD]) 91920b661123Smrg]) # XORG_INSTALL 9193bdcaa8d0Smrgdnl Copyright 2005 Red Hat, Inc 9194bdcaa8d0Smrgdnl 9195bdcaa8d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9196bdcaa8d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 9197bdcaa8d0Smrgdnl the above copyright notice appear in all copies and that both that 9198bdcaa8d0Smrgdnl copyright notice and this permission notice appear in supporting 9199bdcaa8d0Smrgdnl documentation. 9200bdcaa8d0Smrgdnl 9201bdcaa8d0Smrgdnl The above copyright notice and this permission notice shall be included 9202bdcaa8d0Smrgdnl in all copies or substantial portions of the Software. 9203bdcaa8d0Smrgdnl 9204bdcaa8d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9205bdcaa8d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9206bdcaa8d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9207bdcaa8d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9208bdcaa8d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9209bdcaa8d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9210bdcaa8d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 9211bdcaa8d0Smrgdnl 9212bdcaa8d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 9213bdcaa8d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 9214bdcaa8d0Smrgdnl other dealings in this Software without prior written authorization 9215bdcaa8d0Smrgdnl from the copyright holders. 9216bdcaa8d0Smrgdnl 9217bdcaa8d0Smrg 9218bdcaa8d0Smrg# XORG_RELEASE_VERSION 9219bdcaa8d0Smrg# -------------------- 92200b661123Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 9221bdcaa8d0Smrg 9222bdcaa8d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 9223bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 922472313efbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 9225bdcaa8d0Smrg [Major version of this package]) 922672313efbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 9227bdcaa8d0Smrg if test "x$PVM" = "x"; then 9228bdcaa8d0Smrg PVM="0" 9229bdcaa8d0Smrg fi 9230bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 9231bdcaa8d0Smrg [$PVM], 9232bdcaa8d0Smrg [Minor version of this package]) 923372313efbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 9234bdcaa8d0Smrg if test "x$PVP" = "x"; then 9235bdcaa8d0Smrg PVP="0" 9236bdcaa8d0Smrg fi 9237bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 9238bdcaa8d0Smrg [$PVP], 9239bdcaa8d0Smrg [Patch version of this package]) 9240bdcaa8d0Smrg]) 9241bdcaa8d0Smrg 924272313efbSmrg# XORG_CHANGELOG() 924372313efbSmrg# ---------------- 924472313efbSmrg# Minimum version: 1.2.0 924572313efbSmrg# 924672313efbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 924772313efbSmrg# ChangeLog from git. 924872313efbSmrg# 924972313efbSmrg# 925072313efbSmrgAC_DEFUN([XORG_CHANGELOG], [ 92510b661123SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 92520b661123Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 92530b661123Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 925472313efbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 925572313efbSmrgAC_SUBST([CHANGELOG_CMD]) 925672313efbSmrg]) # XORG_CHANGELOG 925772313efbSmrg 92580b661123Smrgdnl Copyright 2005 Red Hat, Inc 92590b661123Smrgdnl 92600b661123Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 92610b661123Smrgdnl documentation for any purpose is hereby granted without fee, provided that 92620b661123Smrgdnl the above copyright notice appear in all copies and that both that 92630b661123Smrgdnl copyright notice and this permission notice appear in supporting 92640b661123Smrgdnl documentation. 92650b661123Smrgdnl 92660b661123Smrgdnl The above copyright notice and this permission notice shall be included 92670b661123Smrgdnl in all copies or substantial portions of the Software. 92680b661123Smrgdnl 92690b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 92700b661123Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 92710b661123Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 92720b661123Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 92730b661123Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 92740b661123Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 92750b661123Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 92760b661123Smrgdnl 92770b661123Smrgdnl Except as contained in this notice, the name of the copyright holders shall 92780b661123Smrgdnl not be used in advertising or otherwise to promote the sale, use or 92790b661123Smrgdnl other dealings in this Software without prior written authorization 92800b661123Smrgdnl from the copyright holders. 92810b661123Smrgdnl 92820b661123Smrg 92830b661123Smrg# XORG_DRIVER_CHECK_EXT() 92840b661123Smrg# -------------------------- 92850b661123Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 92860b661123Smrg# is defined, then add $1 to $REQUIRED_MODULES. 92870b661123Smrg 92880b661123SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 92890b661123Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 92900b661123Smrg SAVE_CFLAGS="$CFLAGS" 92910b661123Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 92920b661123Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 92930b661123Smrg#include "xorg-server.h" 92940b661123Smrg#if !defined $1 92950b661123Smrg#error $1 not defined 92960b661123Smrg#endif 92970b661123Smrg ]])], 92980b661123Smrg [_EXT_CHECK=yes], 92990b661123Smrg [_EXT_CHECK=no]) 93000b661123Smrg CFLAGS="$SAVE_CFLAGS" 93010b661123Smrg AC_MSG_CHECKING([if $1 is defined]) 93020b661123Smrg AC_MSG_RESULT([$_EXT_CHECK]) 93030b661123Smrg if test "$_EXT_CHECK" != no; then 93040b661123Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 93050b661123Smrg fi 93060b661123Smrg]) 93070b661123Smrg 930872313efbSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 9309bdcaa8d0Smrg# 9310bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9311bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9312bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9313bdcaa8d0Smrg 9314bdcaa8d0Smrg# AM_AUTOMAKE_VERSION(VERSION) 9315bdcaa8d0Smrg# ---------------------------- 9316bdcaa8d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 9317bdcaa8d0Smrg# generated from the m4 files accompanying Automake X.Y. 931872313efbSmrg# (This private macro should not be called outside this file.) 931972313efbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 932096ce994aSmrg[am__api_version='1.11' 932172313efbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 932272313efbSmrgdnl require some minimum version. Point them to the right macro. 93230b661123Smrgm4_if([$1], [1.11.1], [], 932472313efbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 932572313efbSmrg]) 932672313efbSmrg 932772313efbSmrg# _AM_AUTOCONF_VERSION(VERSION) 932872313efbSmrg# ----------------------------- 932972313efbSmrg# aclocal traces this macro to find the Autoconf version. 933072313efbSmrg# This is a private macro too. Using m4_define simplifies 933172313efbSmrg# the logic in aclocal, which can simply ignore this definition. 933272313efbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 9333bdcaa8d0Smrg 9334bdcaa8d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 9335bdcaa8d0Smrg# ------------------------------- 933672313efbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 933772313efbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 9338bdcaa8d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 93390b661123Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 934072313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 934172313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 934272313efbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9343bdcaa8d0Smrg 9344bdcaa8d0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9345bdcaa8d0Smrg 9346bdcaa8d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9347bdcaa8d0Smrg# 9348bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9349bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9350bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9351bdcaa8d0Smrg 9352bdcaa8d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 9353bdcaa8d0Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 9354bdcaa8d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 9355bdcaa8d0Smrg# 9356bdcaa8d0Smrg# Of course, Automake must honor this variable whenever it calls a 9357bdcaa8d0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 9358bdcaa8d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 9359bdcaa8d0Smrg# depending on how configure is run. This is pretty annoying, since 9360bdcaa8d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 9361bdcaa8d0Smrg# source directory, any form will work fine, but in subdirectories a 9362bdcaa8d0Smrg# relative path needs to be adjusted first. 9363bdcaa8d0Smrg# 9364bdcaa8d0Smrg# $ac_aux_dir/missing 9365bdcaa8d0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 9366bdcaa8d0Smrg# $top_srcdir/$ac_aux_dir/missing 9367bdcaa8d0Smrg# fails if $ac_aux_dir is absolute, 9368bdcaa8d0Smrg# fails when called from a subdirectory in a VPATH build with 9369bdcaa8d0Smrg# a relative $ac_aux_dir 9370bdcaa8d0Smrg# 9371bdcaa8d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 9372bdcaa8d0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 9373bdcaa8d0Smrg# harmless because $srcdir is `.', but things will broke when you 9374bdcaa8d0Smrg# start a VPATH build or use an absolute $srcdir. 9375bdcaa8d0Smrg# 9376bdcaa8d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9377bdcaa8d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9378bdcaa8d0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9379bdcaa8d0Smrg# and then we would define $MISSING as 9380bdcaa8d0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9381bdcaa8d0Smrg# This will work as long as MISSING is not called from configure, because 9382bdcaa8d0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9383bdcaa8d0Smrg# However there are other variables, like CC, which are often used in 9384bdcaa8d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9385bdcaa8d0Smrg# 9386bdcaa8d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 9387bdcaa8d0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 9388bdcaa8d0Smrg# configured tree to be moved without reconfiguration. 9389bdcaa8d0Smrg 9390bdcaa8d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 9391bdcaa8d0Smrg[dnl Rely on autoconf to set up CDPATH properly. 9392bdcaa8d0SmrgAC_PREREQ([2.50])dnl 9393bdcaa8d0Smrg# expand $ac_aux_dir to an absolute path 9394bdcaa8d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 9395bdcaa8d0Smrg]) 9396bdcaa8d0Smrg 9397bdcaa8d0Smrg# AM_CONDITIONAL -*- Autoconf -*- 9398bdcaa8d0Smrg 939996ce994aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 9400bdcaa8d0Smrg# Free Software Foundation, Inc. 9401bdcaa8d0Smrg# 9402bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9403bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9404bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9405bdcaa8d0Smrg 940696ce994aSmrg# serial 9 9407bdcaa8d0Smrg 9408bdcaa8d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 9409bdcaa8d0Smrg# ------------------------------------- 9410bdcaa8d0Smrg# Define a conditional. 9411bdcaa8d0SmrgAC_DEFUN([AM_CONDITIONAL], 9412bdcaa8d0Smrg[AC_PREREQ(2.52)dnl 9413bdcaa8d0Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 9414bdcaa8d0Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 941572313efbSmrgAC_SUBST([$1_TRUE])dnl 941672313efbSmrgAC_SUBST([$1_FALSE])dnl 941772313efbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 941872313efbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 941996ce994aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 9420bdcaa8d0Smrgif $2; then 9421bdcaa8d0Smrg $1_TRUE= 9422bdcaa8d0Smrg $1_FALSE='#' 9423bdcaa8d0Smrgelse 9424bdcaa8d0Smrg $1_TRUE='#' 9425bdcaa8d0Smrg $1_FALSE= 9426bdcaa8d0Smrgfi 9427bdcaa8d0SmrgAC_CONFIG_COMMANDS_PRE( 9428bdcaa8d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 9429bdcaa8d0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 9430bdcaa8d0SmrgUsually this means the macro was only invoked conditionally.]]) 9431bdcaa8d0Smrgfi])]) 9432bdcaa8d0Smrg 943396ce994aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 9434bdcaa8d0Smrg# Free Software Foundation, Inc. 9435bdcaa8d0Smrg# 9436bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9437bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9438bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9439bdcaa8d0Smrg 944096ce994aSmrg# serial 10 9441bdcaa8d0Smrg 9442bdcaa8d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 9443bdcaa8d0Smrg# written in clear, in which case automake, when reading aclocal.m4, 9444bdcaa8d0Smrg# will think it sees a *use*, and therefore will trigger all it's 9445bdcaa8d0Smrg# C support machinery. Also note that it means that autoscan, seeing 9446bdcaa8d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9447bdcaa8d0Smrg 9448bdcaa8d0Smrg 9449bdcaa8d0Smrg# _AM_DEPENDENCIES(NAME) 9450bdcaa8d0Smrg# ---------------------- 9451bdcaa8d0Smrg# See how the compiler implements dependency checking. 9452bdcaa8d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 9453bdcaa8d0Smrg# We try a few techniques and use that to set a single cache variable. 9454bdcaa8d0Smrg# 9455bdcaa8d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 9456bdcaa8d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 9457bdcaa8d0Smrg# dependency, and given that the user is not expected to run this macro, 9458bdcaa8d0Smrg# just rely on AC_PROG_CC. 9459bdcaa8d0SmrgAC_DEFUN([_AM_DEPENDENCIES], 9460bdcaa8d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 9461bdcaa8d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 9462bdcaa8d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 9463bdcaa8d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 9464bdcaa8d0Smrg 9465bdcaa8d0Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 9466bdcaa8d0Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 9467bdcaa8d0Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 946872313efbSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 9469bdcaa8d0Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 9470bdcaa8d0Smrg [depcc="$$1" am_compiler_list=]) 9471bdcaa8d0Smrg 9472bdcaa8d0SmrgAC_CACHE_CHECK([dependency style of $depcc], 9473bdcaa8d0Smrg [am_cv_$1_dependencies_compiler_type], 9474bdcaa8d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 9475bdcaa8d0Smrg # We make a subdir and do the tests there. Otherwise we can end up 9476bdcaa8d0Smrg # making bogus files that we don't know about and never remove. For 9477bdcaa8d0Smrg # instance it was reported that on HP-UX the gcc test will end up 9478bdcaa8d0Smrg # making a dummy file named `D' -- because `-MD' means `put the output 9479bdcaa8d0Smrg # in D'. 9480bdcaa8d0Smrg mkdir conftest.dir 9481bdcaa8d0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 9482bdcaa8d0Smrg # using a relative directory. 9483bdcaa8d0Smrg cp "$am_depcomp" conftest.dir 9484bdcaa8d0Smrg cd conftest.dir 9485bdcaa8d0Smrg # We will build objects and dependencies in a subdirectory because 9486bdcaa8d0Smrg # it helps to detect inapplicable dependency modes. For instance 9487bdcaa8d0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 9488bdcaa8d0Smrg # side effect of compilation, but ICC will put the dependencies in 9489bdcaa8d0Smrg # the current directory while Tru64 will put them in the object 9490bdcaa8d0Smrg # directory. 9491bdcaa8d0Smrg mkdir sub 9492bdcaa8d0Smrg 9493bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 9494bdcaa8d0Smrg if test "$am_compiler_list" = ""; then 9495bdcaa8d0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 9496bdcaa8d0Smrg fi 949796ce994aSmrg am__universal=false 949896ce994aSmrg m4_case([$1], [CC], 949996ce994aSmrg [case " $depcc " in #( 950096ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 950196ce994aSmrg esac], 950296ce994aSmrg [CXX], 950396ce994aSmrg [case " $depcc " in #( 950496ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 950596ce994aSmrg esac]) 950696ce994aSmrg 9507bdcaa8d0Smrg for depmode in $am_compiler_list; do 9508bdcaa8d0Smrg # Setup a source with many dependencies, because some compilers 9509bdcaa8d0Smrg # like to wrap large dependency lists on column 80 (with \), and 9510bdcaa8d0Smrg # we should not choose a depcomp mode which is confused by this. 9511bdcaa8d0Smrg # 9512bdcaa8d0Smrg # We need to recreate these files for each test, as the compiler may 9513bdcaa8d0Smrg # overwrite some of them when testing with obscure command lines. 9514bdcaa8d0Smrg # This happens at least with the AIX C compiler. 9515bdcaa8d0Smrg : > sub/conftest.c 9516bdcaa8d0Smrg for i in 1 2 3 4 5 6; do 9517bdcaa8d0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 9518bdcaa8d0Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 9519bdcaa8d0Smrg # Solaris 8's {/usr,}/bin/sh. 9520bdcaa8d0Smrg touch sub/conftst$i.h 9521bdcaa8d0Smrg done 9522bdcaa8d0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 9523bdcaa8d0Smrg 952496ce994aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 952596ce994aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 952696ce994aSmrg # handle `-M -o', and we need to detect this. Also, some Intel 952796ce994aSmrg # versions had trouble with output in subdirs 952896ce994aSmrg am__obj=sub/conftest.${OBJEXT-o} 952996ce994aSmrg am__minus_obj="-o $am__obj" 9530bdcaa8d0Smrg case $depmode in 953196ce994aSmrg gcc) 953296ce994aSmrg # This depmode causes a compiler race in universal mode. 953396ce994aSmrg test "$am__universal" = false || continue 953496ce994aSmrg ;; 9535bdcaa8d0Smrg nosideeffect) 9536bdcaa8d0Smrg # after this tag, mechanisms are not by side-effect, so they'll 9537bdcaa8d0Smrg # only be used when explicitly requested 9538bdcaa8d0Smrg if test "x$enable_dependency_tracking" = xyes; then 9539bdcaa8d0Smrg continue 9540bdcaa8d0Smrg else 9541bdcaa8d0Smrg break 9542bdcaa8d0Smrg fi 9543bdcaa8d0Smrg ;; 954496ce994aSmrg msvisualcpp | msvcmsys) 954596ce994aSmrg # This compiler won't grok `-c -o', but also, the minuso test has 954696ce994aSmrg # not run yet. These depmodes are late enough in the game, and 954796ce994aSmrg # so weak that their functioning should not be impacted. 954896ce994aSmrg am__obj=conftest.${OBJEXT-o} 954996ce994aSmrg am__minus_obj= 955096ce994aSmrg ;; 9551bdcaa8d0Smrg none) break ;; 9552bdcaa8d0Smrg esac 9553bdcaa8d0Smrg if depmode=$depmode \ 955496ce994aSmrg source=sub/conftest.c object=$am__obj \ 9555bdcaa8d0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 955696ce994aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 9557bdcaa8d0Smrg >/dev/null 2>conftest.err && 955872313efbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 9559bdcaa8d0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 956096ce994aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 9561bdcaa8d0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 9562bdcaa8d0Smrg # icc doesn't choke on unknown options, it will just issue warnings 9563bdcaa8d0Smrg # or remarks (even with -Werror). So we grep stderr for any message 9564bdcaa8d0Smrg # that says an option was ignored or not supported. 9565bdcaa8d0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 9566bdcaa8d0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 9567bdcaa8d0Smrg # The diagnosis changed in icc 8.0: 9568bdcaa8d0Smrg # icc: Command line remark: option '-MP' not supported 9569bdcaa8d0Smrg if (grep 'ignoring option' conftest.err || 9570bdcaa8d0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 9571bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=$depmode 9572bdcaa8d0Smrg break 9573bdcaa8d0Smrg fi 9574bdcaa8d0Smrg fi 9575bdcaa8d0Smrg done 9576bdcaa8d0Smrg 9577bdcaa8d0Smrg cd .. 9578bdcaa8d0Smrg rm -rf conftest.dir 9579bdcaa8d0Smrgelse 9580bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 9581bdcaa8d0Smrgfi 9582bdcaa8d0Smrg]) 9583bdcaa8d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 9584bdcaa8d0SmrgAM_CONDITIONAL([am__fastdep$1], [ 9585bdcaa8d0Smrg test "x$enable_dependency_tracking" != xno \ 9586bdcaa8d0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 9587bdcaa8d0Smrg]) 9588bdcaa8d0Smrg 9589bdcaa8d0Smrg 9590bdcaa8d0Smrg# AM_SET_DEPDIR 9591bdcaa8d0Smrg# ------------- 9592bdcaa8d0Smrg# Choose a directory name for dependency files. 9593bdcaa8d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 9594bdcaa8d0SmrgAC_DEFUN([AM_SET_DEPDIR], 9595bdcaa8d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 9596bdcaa8d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 9597bdcaa8d0Smrg]) 9598bdcaa8d0Smrg 9599bdcaa8d0Smrg 9600bdcaa8d0Smrg# AM_DEP_TRACK 9601bdcaa8d0Smrg# ------------ 9602bdcaa8d0SmrgAC_DEFUN([AM_DEP_TRACK], 9603bdcaa8d0Smrg[AC_ARG_ENABLE(dependency-tracking, 9604bdcaa8d0Smrg[ --disable-dependency-tracking speeds up one-time build 9605bdcaa8d0Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 9606bdcaa8d0Smrgif test "x$enable_dependency_tracking" != xno; then 9607bdcaa8d0Smrg am_depcomp="$ac_aux_dir/depcomp" 9608bdcaa8d0Smrg AMDEPBACKSLASH='\' 9609bdcaa8d0Smrgfi 9610bdcaa8d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 961172313efbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 961272313efbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 9613bdcaa8d0Smrg]) 9614bdcaa8d0Smrg 9615bdcaa8d0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 9616bdcaa8d0Smrg 961772313efbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 9618bdcaa8d0Smrg# Free Software Foundation, Inc. 9619bdcaa8d0Smrg# 9620bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9621bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9622bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9623bdcaa8d0Smrg 962496ce994aSmrg#serial 5 9625bdcaa8d0Smrg 9626bdcaa8d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 9627bdcaa8d0Smrg# ------------------------------ 9628bdcaa8d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 962996ce994aSmrg[{ 963096ce994aSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 963196ce994aSmrg # are listed without --file. Let's play safe and only enable the eval 963296ce994aSmrg # if we detect the quoting. 963396ce994aSmrg case $CONFIG_FILES in 963496ce994aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 963596ce994aSmrg *) set x $CONFIG_FILES ;; 963696ce994aSmrg esac 963796ce994aSmrg shift 963896ce994aSmrg for mf 963996ce994aSmrg do 964096ce994aSmrg # Strip MF so we end up with the name of the file. 964196ce994aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 964296ce994aSmrg # Check whether this is an Automake generated Makefile or not. 964396ce994aSmrg # We used to match only the files named `Makefile.in', but 964496ce994aSmrg # some people rename them; so instead we look at the file content. 964596ce994aSmrg # Grep'ing the first line is not enough: some people post-process 964696ce994aSmrg # each Makefile.in and add a new line on top of each file to say so. 964796ce994aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 964896ce994aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 964996ce994aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 965096ce994aSmrg dirpart=`AS_DIRNAME("$mf")` 965196ce994aSmrg else 965296ce994aSmrg continue 965396ce994aSmrg fi 965496ce994aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 965596ce994aSmrg # from the Makefile without running `make'. 965696ce994aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 965796ce994aSmrg test -z "$DEPDIR" && continue 965896ce994aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 965996ce994aSmrg test -z "am__include" && continue 966096ce994aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 966196ce994aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 966296ce994aSmrg U=`sed -n 's/^U = //p' < "$mf"` 966396ce994aSmrg # Find all dependency output files, they are included files with 966496ce994aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 966596ce994aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 966696ce994aSmrg # expansion. 966796ce994aSmrg for file in `sed -n " 966896ce994aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 966996ce994aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 967096ce994aSmrg # Make sure the directory exists. 967196ce994aSmrg test -f "$dirpart/$file" && continue 967296ce994aSmrg fdir=`AS_DIRNAME(["$file"])` 967396ce994aSmrg AS_MKDIR_P([$dirpart/$fdir]) 967496ce994aSmrg # echo "creating $dirpart/$file" 967596ce994aSmrg echo '# dummy' > "$dirpart/$file" 967696ce994aSmrg done 9677bdcaa8d0Smrg done 967896ce994aSmrg} 9679bdcaa8d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9680bdcaa8d0Smrg 9681bdcaa8d0Smrg 9682bdcaa8d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 9683bdcaa8d0Smrg# ----------------------------- 9684bdcaa8d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 9685bdcaa8d0Smrg# 9686bdcaa8d0Smrg# This code is only required when automatic dependency tracking 9687bdcaa8d0Smrg# is enabled. FIXME. This creates each `.P' file that we will 9688bdcaa8d0Smrg# need in order to bootstrap the dependency handling code. 9689bdcaa8d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9690bdcaa8d0Smrg[AC_CONFIG_COMMANDS([depfiles], 9691bdcaa8d0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9692bdcaa8d0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 9693bdcaa8d0Smrg]) 9694bdcaa8d0Smrg 9695bdcaa8d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9696bdcaa8d0Smrg# Free Software Foundation, Inc. 9697bdcaa8d0Smrg# 9698bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9699bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9700bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9701bdcaa8d0Smrg 9702bdcaa8d0Smrg# serial 8 9703bdcaa8d0Smrg 9704bdcaa8d0Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 9705bdcaa8d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9706bdcaa8d0Smrg 9707bdcaa8d0Smrg# Do all the work for Automake. -*- Autoconf -*- 9708bdcaa8d0Smrg 970972313efbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 971096ce994aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 9711bdcaa8d0Smrg# 9712bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9713bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9714bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9715bdcaa8d0Smrg 971696ce994aSmrg# serial 16 9717bdcaa8d0Smrg 9718bdcaa8d0Smrg# This macro actually does too much. Some checks are only needed if 9719bdcaa8d0Smrg# your package does certain things. But this isn't really a big deal. 9720bdcaa8d0Smrg 9721bdcaa8d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9722bdcaa8d0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 9723bdcaa8d0Smrg# ----------------------------------------------- 9724bdcaa8d0Smrg# The call with PACKAGE and VERSION arguments is the old style 9725bdcaa8d0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9726bdcaa8d0Smrg# and VERSION should now be passed to AC_INIT and removed from 9727bdcaa8d0Smrg# the call to AM_INIT_AUTOMAKE. 9728bdcaa8d0Smrg# We support both call styles for the transition. After 9729bdcaa8d0Smrg# the next Automake release, Autoconf can make the AC_INIT 9730bdcaa8d0Smrg# arguments mandatory, and then we can depend on a new Autoconf 9731bdcaa8d0Smrg# release and drop the old call support. 9732bdcaa8d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 973396ce994aSmrg[AC_PREREQ([2.62])dnl 9734bdcaa8d0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9735bdcaa8d0Smrgdnl the ones we care about. 9736bdcaa8d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9737bdcaa8d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9738bdcaa8d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 973972313efbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 974072313efbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 974172313efbSmrg # is not polluted with repeated "-I." 974272313efbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 974372313efbSmrg # test to see if srcdir already configured 974472313efbSmrg if test -f $srcdir/config.status; then 974572313efbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 974672313efbSmrg fi 9747bdcaa8d0Smrgfi 9748bdcaa8d0Smrg 9749bdcaa8d0Smrg# test whether we have cygpath 9750bdcaa8d0Smrgif test -z "$CYGPATH_W"; then 9751bdcaa8d0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 9752bdcaa8d0Smrg CYGPATH_W='cygpath -w' 9753bdcaa8d0Smrg else 9754bdcaa8d0Smrg CYGPATH_W=echo 9755bdcaa8d0Smrg fi 9756bdcaa8d0Smrgfi 9757bdcaa8d0SmrgAC_SUBST([CYGPATH_W]) 9758bdcaa8d0Smrg 9759bdcaa8d0Smrg# Define the identity of the package. 9760bdcaa8d0Smrgdnl Distinguish between old-style and new-style calls. 9761bdcaa8d0Smrgm4_ifval([$2], 9762bdcaa8d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9763bdcaa8d0Smrg AC_SUBST([PACKAGE], [$1])dnl 9764bdcaa8d0Smrg AC_SUBST([VERSION], [$2])], 9765bdcaa8d0Smrg[_AM_SET_OPTIONS([$1])dnl 976672313efbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 976772313efbSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 976872313efbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9769bdcaa8d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9770bdcaa8d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9771bdcaa8d0Smrg 9772bdcaa8d0Smrg_AM_IF_OPTION([no-define],, 9773bdcaa8d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 9774bdcaa8d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9775bdcaa8d0Smrg 9776bdcaa8d0Smrg# Some tools Automake needs. 9777bdcaa8d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9778bdcaa8d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9779bdcaa8d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 9780bdcaa8d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 9781bdcaa8d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 9782bdcaa8d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 9783bdcaa8d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 978496ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 978596ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9786bdcaa8d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9787bdcaa8d0Smrg# We need awk for the "check" target. The system "awk" is bad on 9788bdcaa8d0Smrg# some platforms. 9789bdcaa8d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 9790bdcaa8d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9791bdcaa8d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9792bdcaa8d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 979396ce994aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 979496ce994aSmrg [_AM_PROG_TAR([v7])])]) 9795bdcaa8d0Smrg_AM_IF_OPTION([no-dependencies],, 9796bdcaa8d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 979796ce994aSmrg [_AM_DEPENDENCIES(CC)], 979896ce994aSmrg [define([AC_PROG_CC], 979996ce994aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 9800bdcaa8d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 980196ce994aSmrg [_AM_DEPENDENCIES(CXX)], 980296ce994aSmrg [define([AC_PROG_CXX], 980396ce994aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 980472313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 980596ce994aSmrg [_AM_DEPENDENCIES(OBJC)], 980696ce994aSmrg [define([AC_PROG_OBJC], 980796ce994aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 9808bdcaa8d0Smrg]) 980996ce994aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 981096ce994aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 981196ce994aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 981296ce994aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 981396ce994aSmrgAC_CONFIG_COMMANDS_PRE(dnl 981496ce994aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 981596ce994aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9816bdcaa8d0Smrg]) 9817bdcaa8d0Smrg 981896ce994aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 981996ce994aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 982096ce994aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 982196ce994aSmrgm4_define([_AC_COMPILER_EXEEXT], 982296ce994aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 982396ce994aSmrg 9824bdcaa8d0Smrg 9825bdcaa8d0Smrg# When config.status generates a header, we must update the stamp-h file. 9826bdcaa8d0Smrg# This file resides in the same directory as the config header 9827bdcaa8d0Smrg# that is generated. The stamp files are numbered to have different names. 9828bdcaa8d0Smrg 9829bdcaa8d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9830bdcaa8d0Smrg# loop where config.status creates the headers, so we can generate 9831bdcaa8d0Smrg# our stamp files there. 9832bdcaa8d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9833bdcaa8d0Smrg[# Compute $1's index in $config_headers. 983472313efbSmrg_am_arg=$1 9835bdcaa8d0Smrg_am_stamp_count=1 9836bdcaa8d0Smrgfor _am_header in $config_headers :; do 9837bdcaa8d0Smrg case $_am_header in 983872313efbSmrg $_am_arg | $_am_arg:* ) 9839bdcaa8d0Smrg break ;; 9840bdcaa8d0Smrg * ) 9841bdcaa8d0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9842bdcaa8d0Smrg esac 9843bdcaa8d0Smrgdone 984472313efbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9845bdcaa8d0Smrg 984696ce994aSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 9847bdcaa8d0Smrg# 9848bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9849bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9850bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9851bdcaa8d0Smrg 9852bdcaa8d0Smrg# AM_PROG_INSTALL_SH 9853bdcaa8d0Smrg# ------------------ 9854bdcaa8d0Smrg# Define $install_sh. 9855bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9856bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 985796ce994aSmrgif test x"${install_sh}" != xset; then 985896ce994aSmrg case $am_aux_dir in 985996ce994aSmrg *\ * | *\ *) 986096ce994aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 986196ce994aSmrg *) 986296ce994aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 986396ce994aSmrg esac 986496ce994aSmrgfi 9865bdcaa8d0SmrgAC_SUBST(install_sh)]) 9866bdcaa8d0Smrg 9867bdcaa8d0Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9868bdcaa8d0Smrg# 9869bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9870bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9871bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9872bdcaa8d0Smrg 9873bdcaa8d0Smrg# serial 2 9874bdcaa8d0Smrg 9875bdcaa8d0Smrg# Check whether the underlying file-system supports filenames 9876bdcaa8d0Smrg# with a leading dot. For instance MS-DOS doesn't. 9877bdcaa8d0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 9878bdcaa8d0Smrg[rm -rf .tst 2>/dev/null 9879bdcaa8d0Smrgmkdir .tst 2>/dev/null 9880bdcaa8d0Smrgif test -d .tst; then 9881bdcaa8d0Smrg am__leading_dot=. 9882bdcaa8d0Smrgelse 9883bdcaa8d0Smrg am__leading_dot=_ 9884bdcaa8d0Smrgfi 9885bdcaa8d0Smrgrmdir .tst 2>/dev/null 9886bdcaa8d0SmrgAC_SUBST([am__leading_dot])]) 9887bdcaa8d0Smrg 9888bdcaa8d0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9889bdcaa8d0Smrg# From Jim Meyering 9890bdcaa8d0Smrg 989196ce994aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 9892bdcaa8d0Smrg# Free Software Foundation, Inc. 9893bdcaa8d0Smrg# 9894bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9895bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9896bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9897bdcaa8d0Smrg 989896ce994aSmrg# serial 5 9899bdcaa8d0Smrg 990096ce994aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 990196ce994aSmrg# ---------------------------------- 990296ce994aSmrg# Control maintainer-specific portions of Makefiles. 990396ce994aSmrg# Default is to disable them, unless `enable' is passed literally. 990496ce994aSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 990596ce994aSmrg# can override the default with the --enable/--disable switch. 9906bdcaa8d0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 990796ce994aSmrg[m4_case(m4_default([$1], [disable]), 990896ce994aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 990996ce994aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 991096ce994aSmrg [m4_define([am_maintainer_other], [enable]) 991196ce994aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 991296ce994aSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 991396ce994aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 991496ce994aSmrg AC_ARG_ENABLE([maintainer-mode], 991596ce994aSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 9916bdcaa8d0Smrg (and sometimes confusing) to the casual installer], 991796ce994aSmrg [USE_MAINTAINER_MODE=$enableval], 991896ce994aSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 9919bdcaa8d0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 992096ce994aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 9921bdcaa8d0Smrg MAINT=$MAINTAINER_MODE_TRUE 992296ce994aSmrg AC_SUBST([MAINT])dnl 9923bdcaa8d0Smrg] 9924bdcaa8d0Smrg) 9925bdcaa8d0Smrg 9926bdcaa8d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9927bdcaa8d0Smrg 9928bdcaa8d0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9929bdcaa8d0Smrg 993096ce994aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 9931bdcaa8d0Smrg# 9932bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9933bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9934bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9935bdcaa8d0Smrg 993696ce994aSmrg# serial 4 9937bdcaa8d0Smrg 9938bdcaa8d0Smrg# AM_MAKE_INCLUDE() 9939bdcaa8d0Smrg# ----------------- 9940bdcaa8d0Smrg# Check to see how make treats includes. 9941bdcaa8d0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 9942bdcaa8d0Smrg[am_make=${MAKE-make} 9943bdcaa8d0Smrgcat > confinc << 'END' 9944bdcaa8d0Smrgam__doit: 994596ce994aSmrg @echo this is the am__doit target 9946bdcaa8d0Smrg.PHONY: am__doit 9947bdcaa8d0SmrgEND 9948bdcaa8d0Smrg# If we don't find an include directive, just comment out the code. 9949bdcaa8d0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9950bdcaa8d0Smrgam__include="#" 9951bdcaa8d0Smrgam__quote= 9952bdcaa8d0Smrg_am_result=none 9953bdcaa8d0Smrg# First try GNU make style include. 9954bdcaa8d0Smrgecho "include confinc" > confmf 995596ce994aSmrg# Ignore all kinds of additional output from `make'. 995696ce994aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 995796ce994aSmrg*the\ am__doit\ target*) 995896ce994aSmrg am__include=include 995996ce994aSmrg am__quote= 996096ce994aSmrg _am_result=GNU 996196ce994aSmrg ;; 996296ce994aSmrgesac 9963bdcaa8d0Smrg# Now try BSD make style include. 9964bdcaa8d0Smrgif test "$am__include" = "#"; then 9965bdcaa8d0Smrg echo '.include "confinc"' > confmf 996696ce994aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 996796ce994aSmrg *the\ am__doit\ target*) 996896ce994aSmrg am__include=.include 996996ce994aSmrg am__quote="\"" 997096ce994aSmrg _am_result=BSD 997196ce994aSmrg ;; 997296ce994aSmrg esac 9973bdcaa8d0Smrgfi 9974bdcaa8d0SmrgAC_SUBST([am__include]) 9975bdcaa8d0SmrgAC_SUBST([am__quote]) 9976bdcaa8d0SmrgAC_MSG_RESULT([$_am_result]) 9977bdcaa8d0Smrgrm -f confinc confmf 9978bdcaa8d0Smrg]) 9979bdcaa8d0Smrg 9980bdcaa8d0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9981bdcaa8d0Smrg 998296ce994aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 9983bdcaa8d0Smrg# Free Software Foundation, Inc. 9984bdcaa8d0Smrg# 9985bdcaa8d0Smrg# This file is free software; the Free Software Foundation 9986bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 9987bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9988bdcaa8d0Smrg 998996ce994aSmrg# serial 6 9990bdcaa8d0Smrg 9991bdcaa8d0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 9992bdcaa8d0Smrg# ------------------------------ 9993bdcaa8d0SmrgAC_DEFUN([AM_MISSING_PROG], 9994bdcaa8d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9995bdcaa8d0Smrg$1=${$1-"${am_missing_run}$2"} 9996bdcaa8d0SmrgAC_SUBST($1)]) 9997bdcaa8d0Smrg 9998bdcaa8d0Smrg 9999bdcaa8d0Smrg# AM_MISSING_HAS_RUN 10000bdcaa8d0Smrg# ------------------ 10001bdcaa8d0Smrg# Define MISSING if not defined so far and test if it supports --run. 10002bdcaa8d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 10003bdcaa8d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 10004bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1000572313efbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 1000696ce994aSmrgif test x"${MISSING+set}" != xset; then 1000796ce994aSmrg case $am_aux_dir in 1000896ce994aSmrg *\ * | *\ *) 1000996ce994aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1001096ce994aSmrg *) 1001196ce994aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1001296ce994aSmrg esac 1001396ce994aSmrgfi 10014bdcaa8d0Smrg# Use eval to expand $SHELL 10015bdcaa8d0Smrgif eval "$MISSING --run true"; then 10016bdcaa8d0Smrg am_missing_run="$MISSING --run " 10017bdcaa8d0Smrgelse 10018bdcaa8d0Smrg am_missing_run= 10019bdcaa8d0Smrg AC_MSG_WARN([`missing' script is too old or missing]) 10020bdcaa8d0Smrgfi 10021bdcaa8d0Smrg]) 10022bdcaa8d0Smrg 1002372313efbSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 10024bdcaa8d0Smrg# 10025bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10026bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10027bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10028bdcaa8d0Smrg 10029bdcaa8d0Smrg# AM_PROG_MKDIR_P 10030bdcaa8d0Smrg# --------------- 1003172313efbSmrg# Check for `mkdir -p'. 10032bdcaa8d0SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1003372313efbSmrg[AC_PREREQ([2.60])dnl 1003472313efbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1003572313efbSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1003672313efbSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 1003772313efbSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1003872313efbSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1003972313efbSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1004072313efbSmrgdnl adjustment using top_builddir (which is defined more often than 1004172313efbSmrgdnl MKDIR_P). 1004272313efbSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1004372313efbSmrgcase $mkdir_p in 1004472313efbSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 1004572313efbSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1004672313efbSmrgesac 1004772313efbSmrg]) 10048bdcaa8d0Smrg 10049bdcaa8d0Smrg# Helper functions for option handling. -*- Autoconf -*- 10050bdcaa8d0Smrg 1005172313efbSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 10052bdcaa8d0Smrg# 10053bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10054bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10055bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10056bdcaa8d0Smrg 1005772313efbSmrg# serial 4 10058bdcaa8d0Smrg 10059bdcaa8d0Smrg# _AM_MANGLE_OPTION(NAME) 10060bdcaa8d0Smrg# ----------------------- 10061bdcaa8d0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 10062bdcaa8d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 10063bdcaa8d0Smrg 10064bdcaa8d0Smrg# _AM_SET_OPTION(NAME) 10065bdcaa8d0Smrg# ------------------------------ 10066bdcaa8d0Smrg# Set option NAME. Presently that only means defining a flag for this option. 10067bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTION], 10068bdcaa8d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 10069bdcaa8d0Smrg 10070bdcaa8d0Smrg# _AM_SET_OPTIONS(OPTIONS) 10071bdcaa8d0Smrg# ---------------------------------- 10072bdcaa8d0Smrg# OPTIONS is a space-separated list of Automake options. 10073bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTIONS], 1007472313efbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 10075bdcaa8d0Smrg 10076bdcaa8d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 10077bdcaa8d0Smrg# ------------------------------------------- 10078bdcaa8d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10079bdcaa8d0SmrgAC_DEFUN([_AM_IF_OPTION], 10080bdcaa8d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 10081bdcaa8d0Smrg 10082bdcaa8d0Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 10083bdcaa8d0Smrg 1008496ce994aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 10085bdcaa8d0Smrg# Free Software Foundation, Inc. 10086bdcaa8d0Smrg# 10087bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10088bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10089bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10090bdcaa8d0Smrg 1009196ce994aSmrg# serial 5 10092bdcaa8d0Smrg 10093bdcaa8d0Smrg# AM_SANITY_CHECK 10094bdcaa8d0Smrg# --------------- 10095bdcaa8d0SmrgAC_DEFUN([AM_SANITY_CHECK], 10096bdcaa8d0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 10097bdcaa8d0Smrg# Just in case 10098bdcaa8d0Smrgsleep 1 10099bdcaa8d0Smrgecho timestamp > conftest.file 1010096ce994aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 1010196ce994aSmrg# name. Accept space and tab only in the latter. 1010296ce994aSmrgam_lf=' 1010396ce994aSmrg' 1010496ce994aSmrgcase `pwd` in 1010596ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1010696ce994aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1010796ce994aSmrgesac 1010896ce994aSmrgcase $srcdir in 1010996ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1011096ce994aSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1011196ce994aSmrgesac 1011296ce994aSmrg 10113bdcaa8d0Smrg# Do `set' in a subshell so we don't clobber the current shell's 10114bdcaa8d0Smrg# arguments. Must try -L first in case configure is actually a 10115bdcaa8d0Smrg# symlink; some systems play weird games with the mod time of symlinks 10116bdcaa8d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 10117bdcaa8d0Smrg# directory). 10118bdcaa8d0Smrgif ( 1011996ce994aSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 10120bdcaa8d0Smrg if test "$[*]" = "X"; then 10121bdcaa8d0Smrg # -L didn't work. 1012296ce994aSmrg set X `ls -t "$srcdir/configure" conftest.file` 10123bdcaa8d0Smrg fi 10124bdcaa8d0Smrg rm -f conftest.file 10125bdcaa8d0Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 10126bdcaa8d0Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 10127bdcaa8d0Smrg 10128bdcaa8d0Smrg # If neither matched, then we have a broken ls. This can happen 10129bdcaa8d0Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 10130bdcaa8d0Smrg # broken ls alias from the environment. This has actually 10131bdcaa8d0Smrg # happened. Such a system could not be considered "sane". 10132bdcaa8d0Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 10133bdcaa8d0Smrgalias in your environment]) 10134bdcaa8d0Smrg fi 10135bdcaa8d0Smrg 10136bdcaa8d0Smrg test "$[2]" = conftest.file 10137bdcaa8d0Smrg ) 10138bdcaa8d0Smrgthen 10139bdcaa8d0Smrg # Ok. 10140bdcaa8d0Smrg : 10141bdcaa8d0Smrgelse 10142bdcaa8d0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 10143bdcaa8d0SmrgCheck your system clock]) 10144bdcaa8d0Smrgfi 10145bdcaa8d0SmrgAC_MSG_RESULT(yes)]) 10146bdcaa8d0Smrg 101470b661123Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 101480b661123Smrg# 101490b661123Smrg# This file is free software; the Free Software Foundation 101500b661123Smrg# gives unlimited permission to copy and/or distribute it, 101510b661123Smrg# with or without modifications, as long as this notice is preserved. 101520b661123Smrg 101530b661123Smrg# serial 1 101540b661123Smrg 101550b661123Smrg# AM_SILENT_RULES([DEFAULT]) 101560b661123Smrg# -------------------------- 101570b661123Smrg# Enable less verbose build rules; with the default set to DEFAULT 101580b661123Smrg# (`yes' being less verbose, `no' or empty being verbose). 101590b661123SmrgAC_DEFUN([AM_SILENT_RULES], 101600b661123Smrg[AC_ARG_ENABLE([silent-rules], 101610b661123Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 101620b661123Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 101630b661123Smrgcase $enable_silent_rules in 101640b661123Smrgyes) AM_DEFAULT_VERBOSITY=0;; 101650b661123Smrgno) AM_DEFAULT_VERBOSITY=1;; 101660b661123Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 101670b661123Smrgesac 101680b661123SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 101690b661123SmrgAM_BACKSLASH='\' 101700b661123SmrgAC_SUBST([AM_BACKSLASH])dnl 101710b661123Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 101720b661123Smrg]) 101730b661123Smrg 10174bdcaa8d0Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 10175bdcaa8d0Smrg# 10176bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10177bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10178bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10179bdcaa8d0Smrg 10180bdcaa8d0Smrg# AM_PROG_INSTALL_STRIP 10181bdcaa8d0Smrg# --------------------- 10182bdcaa8d0Smrg# One issue with vendor `install' (even GNU) is that you can't 10183bdcaa8d0Smrg# specify the program used to strip binaries. This is especially 10184bdcaa8d0Smrg# annoying in cross-compiling environments, where the build's strip 10185bdcaa8d0Smrg# is unlikely to handle the host's binaries. 10186bdcaa8d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 10187bdcaa8d0Smrg# always use install-sh in `make install-strip', and initialize 10188bdcaa8d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 10189bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10190bdcaa8d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10191bdcaa8d0Smrg# Installed binaries are usually stripped using `strip' when the user 10192bdcaa8d0Smrg# run `make install-strip'. However `strip' might not be the right 10193bdcaa8d0Smrg# tool to use in cross-compilation environments, therefore Automake 10194bdcaa8d0Smrg# will honor the `STRIP' environment variable to overrule this program. 10195bdcaa8d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 10196bdcaa8d0Smrgif test "$cross_compiling" != no; then 10197bdcaa8d0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 10198bdcaa8d0Smrgfi 1019972313efbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10200bdcaa8d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10201bdcaa8d0Smrg 1020296ce994aSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1020372313efbSmrg# 1020472313efbSmrg# This file is free software; the Free Software Foundation 1020572313efbSmrg# gives unlimited permission to copy and/or distribute it, 1020672313efbSmrg# with or without modifications, as long as this notice is preserved. 1020772313efbSmrg 1020896ce994aSmrg# serial 2 1020996ce994aSmrg 1021072313efbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1021172313efbSmrg# --------------------------- 1021272313efbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1021372313efbSmrg# This macro is traced by Automake. 1021472313efbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1021572313efbSmrg 1021696ce994aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1021796ce994aSmrg# --------------------------- 1021896ce994aSmrg# Public sister of _AM_SUBST_NOTMAKE. 1021996ce994aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1022096ce994aSmrg 10221bdcaa8d0Smrg# Check how to create a tarball. -*- Autoconf -*- 10222bdcaa8d0Smrg 10223bdcaa8d0Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 10224bdcaa8d0Smrg# 10225bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10226bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10227bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10228bdcaa8d0Smrg 10229bdcaa8d0Smrg# serial 2 10230bdcaa8d0Smrg 10231bdcaa8d0Smrg# _AM_PROG_TAR(FORMAT) 10232bdcaa8d0Smrg# -------------------- 10233bdcaa8d0Smrg# Check how to create a tarball in format FORMAT. 10234bdcaa8d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 10235bdcaa8d0Smrg# 10236bdcaa8d0Smrg# Substitute a variable $(am__tar) that is a command 10237bdcaa8d0Smrg# writing to stdout a FORMAT-tarball containing the directory 10238bdcaa8d0Smrg# $tardir. 10239bdcaa8d0Smrg# tardir=directory && $(am__tar) > result.tar 10240bdcaa8d0Smrg# 10241bdcaa8d0Smrg# Substitute a variable $(am__untar) that extract such 10242bdcaa8d0Smrg# a tarball read from stdin. 10243bdcaa8d0Smrg# $(am__untar) < result.tar 10244bdcaa8d0SmrgAC_DEFUN([_AM_PROG_TAR], 10245bdcaa8d0Smrg[# Always define AMTAR for backward compatibility. 10246bdcaa8d0SmrgAM_MISSING_PROG([AMTAR], [tar]) 10247bdcaa8d0Smrgm4_if([$1], [v7], 10248bdcaa8d0Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 10249bdcaa8d0Smrg [m4_case([$1], [ustar],, [pax],, 10250bdcaa8d0Smrg [m4_fatal([Unknown tar format])]) 10251bdcaa8d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 10252bdcaa8d0Smrg# Loop over all known methods to create a tar archive until one works. 10253bdcaa8d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10254bdcaa8d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 10255bdcaa8d0Smrg# Do not fold the above two line into one, because Tru64 sh and 10256bdcaa8d0Smrg# Solaris sh will not grok spaces in the rhs of `-'. 10257bdcaa8d0Smrgfor _am_tool in $_am_tools 10258bdcaa8d0Smrgdo 10259bdcaa8d0Smrg case $_am_tool in 10260bdcaa8d0Smrg gnutar) 10261bdcaa8d0Smrg for _am_tar in tar gnutar gtar; 10262bdcaa8d0Smrg do 10263bdcaa8d0Smrg AM_RUN_LOG([$_am_tar --version]) && break 10264bdcaa8d0Smrg done 10265bdcaa8d0Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10266bdcaa8d0Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10267bdcaa8d0Smrg am__untar="$_am_tar -xf -" 10268bdcaa8d0Smrg ;; 10269bdcaa8d0Smrg plaintar) 10270bdcaa8d0Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 10271bdcaa8d0Smrg # ustar tarball either. 10272bdcaa8d0Smrg (tar --version) >/dev/null 2>&1 && continue 10273bdcaa8d0Smrg am__tar='tar chf - "$$tardir"' 10274bdcaa8d0Smrg am__tar_='tar chf - "$tardir"' 10275bdcaa8d0Smrg am__untar='tar xf -' 10276bdcaa8d0Smrg ;; 10277bdcaa8d0Smrg pax) 10278bdcaa8d0Smrg am__tar='pax -L -x $1 -w "$$tardir"' 10279bdcaa8d0Smrg am__tar_='pax -L -x $1 -w "$tardir"' 10280bdcaa8d0Smrg am__untar='pax -r' 10281bdcaa8d0Smrg ;; 10282bdcaa8d0Smrg cpio) 10283bdcaa8d0Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10284bdcaa8d0Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10285bdcaa8d0Smrg am__untar='cpio -i -H $1 -d' 10286bdcaa8d0Smrg ;; 10287bdcaa8d0Smrg none) 10288bdcaa8d0Smrg am__tar=false 10289bdcaa8d0Smrg am__tar_=false 10290bdcaa8d0Smrg am__untar=false 10291bdcaa8d0Smrg ;; 10292bdcaa8d0Smrg esac 10293bdcaa8d0Smrg 10294bdcaa8d0Smrg # If the value was cached, stop now. We just wanted to have am__tar 10295bdcaa8d0Smrg # and am__untar set. 10296bdcaa8d0Smrg test -n "${am_cv_prog_tar_$1}" && break 10297bdcaa8d0Smrg 10298bdcaa8d0Smrg # tar/untar a dummy directory, and stop if the command works 10299bdcaa8d0Smrg rm -rf conftest.dir 10300bdcaa8d0Smrg mkdir conftest.dir 10301bdcaa8d0Smrg echo GrepMe > conftest.dir/file 10302bdcaa8d0Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10303bdcaa8d0Smrg rm -rf conftest.dir 10304bdcaa8d0Smrg if test -s conftest.tar; then 10305bdcaa8d0Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 10306bdcaa8d0Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10307bdcaa8d0Smrg fi 10308bdcaa8d0Smrgdone 10309bdcaa8d0Smrgrm -rf conftest.dir 10310bdcaa8d0Smrg 10311bdcaa8d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10312bdcaa8d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10313bdcaa8d0SmrgAC_SUBST([am__tar]) 10314bdcaa8d0SmrgAC_SUBST([am__untar]) 10315bdcaa8d0Smrg]) # _AM_PROG_TAR 10316bdcaa8d0Smrg 10317