aclocal.m4 revision 0a392d7e
10a392d7eSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 254b44505Smrg 30a392d7eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 44a041c5bSmacallan 54a041c5bSmacallan# This file is free software; the Free Software Foundation 64a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 74a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 84a041c5bSmacallan 94a041c5bSmacallan# This program is distributed in the hope that it will be useful, 104a041c5bSmacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114a041c5bSmacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124a041c5bSmacallan# PARTICULAR PURPOSE. 134a041c5bSmacallan 140a392d7eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 154a041c5bSmacallanm4_ifndef([AC_AUTOCONF_VERSION], 164a041c5bSmacallan [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1754b44505Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1854b44505Smrg[m4_warning([this file was generated for autoconf 2.69. 194a041c5bSmacallanYou have another version of autoconf. It may work, but is not guaranteed to. 204a041c5bSmacallanIf you have problems, you may need to regenerate the build system entirely. 2154b44505SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 224a041c5bSmacallan 234a041c5bSmacallan# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2454b44505Smrg# 250a392d7eSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 2654b44505Smrg# Written by Gordon Matzigkeit, 1996 2754b44505Smrg# 2854b44505Smrg# This file is free software; the Free Software Foundation gives 2954b44505Smrg# unlimited permission to copy and/or distribute it, with or without 3054b44505Smrg# modifications, as long as this notice is preserved. 3154b44505Smrg 3254b44505Smrgm4_define([_LT_COPYING], [dnl 330a392d7eSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 340a392d7eSmrg# This is free software; see the source for copying conditions. There is NO 350a392d7eSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 360a392d7eSmrg 370a392d7eSmrg# GNU Libtool is free software; you can redistribute it and/or modify 380a392d7eSmrg# it under the terms of the GNU General Public License as published by 390a392d7eSmrg# the Free Software Foundation; either version 2 of of the License, or 400a392d7eSmrg# (at your option) any later version. 4154b44505Smrg# 420a392d7eSmrg# As a special exception to the GNU General Public License, if you 430a392d7eSmrg# distribute this file as part of a program or library that is built 440a392d7eSmrg# using GNU Libtool, you may include this file under the same 450a392d7eSmrg# distribution terms that you use for the rest of that program. 4654b44505Smrg# 470a392d7eSmrg# GNU Libtool is distributed in the hope that it will be useful, but 480a392d7eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4954b44505Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 5054b44505Smrg# GNU General Public License for more details. 5154b44505Smrg# 5254b44505Smrg# You should have received a copy of the GNU General Public License 530a392d7eSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 5454b44505Smrg]) 554a041c5bSmacallan 560a392d7eSmrg# serial 58 LT_INIT 574a041c5bSmacallan 584a041c5bSmacallan 5954b44505Smrg# LT_PREREQ(VERSION) 6054b44505Smrg# ------------------ 6154b44505Smrg# Complain and exit if this libtool version is less that VERSION. 6254b44505Smrgm4_defun([LT_PREREQ], 6354b44505Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 6454b44505Smrg [m4_default([$3], 6554b44505Smrg [m4_fatal([Libtool version $1 or higher is required], 6654b44505Smrg 63)])], 6754b44505Smrg [$2])]) 684a041c5bSmacallan 694a041c5bSmacallan 7054b44505Smrg# _LT_CHECK_BUILDDIR 7154b44505Smrg# ------------------ 7254b44505Smrg# Complain if the absolute build directory name contains unusual characters 7354b44505Smrgm4_defun([_LT_CHECK_BUILDDIR], 7454b44505Smrg[case `pwd` in 7554b44505Smrg *\ * | *\ *) 7654b44505Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 7754b44505Smrgesac 7854b44505Smrg]) 7954b44505Smrg 8054b44505Smrg 8154b44505Smrg# LT_INIT([OPTIONS]) 8254b44505Smrg# ------------------ 8354b44505SmrgAC_DEFUN([LT_INIT], 840a392d7eSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 8554b44505SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 8654b44505SmrgAC_BEFORE([$0], [LT_LANG])dnl 8754b44505SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 8854b44505SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 8954b44505Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 9054b44505Smrg 9154b44505Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 9254b44505Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 9354b44505Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 9454b44505Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 9554b44505Smrgdnl unless we require an AC_DEFUNed macro: 9654b44505SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 9754b44505SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 9854b44505SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 9954b44505SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 10054b44505Smrgm4_require([_LT_PROG_LTMAIN])dnl 10154b44505Smrg 10254b44505Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 10354b44505Smrg 10454b44505Smrgdnl Parse OPTIONS 10554b44505Smrg_LT_SET_OPTIONS([$0], [$1]) 1064a041c5bSmacallan 1074a041c5bSmacallan# This can be used to rebuild libtool when needed 1080a392d7eSmrgLIBTOOL_DEPS=$ltmain 1094a041c5bSmacallan 1104a041c5bSmacallan# Always use our own libtool. 1114a041c5bSmacallanLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1124a041c5bSmacallanAC_SUBST(LIBTOOL)dnl 1134a041c5bSmacallan 11454b44505Smrg_LT_SETUP 1154a041c5bSmacallan 11654b44505Smrg# Only expand once: 11754b44505Smrgm4_define([LT_INIT]) 11854b44505Smrg])# LT_INIT 1194a041c5bSmacallan 12054b44505Smrg# Old names: 12154b44505SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12254b44505SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12354b44505Smrgdnl aclocal-1.4 backwards compatibility: 12454b44505Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12554b44505Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 12654b44505Smrg 12754b44505Smrg 1280a392d7eSmrg# _LT_PREPARE_CC_BASENAME 1290a392d7eSmrg# ----------------------- 1300a392d7eSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1310a392d7eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1320a392d7eSmrgfunc_cc_basename () 1330a392d7eSmrg{ 1340a392d7eSmrg for cc_temp in @S|@*""; do 1350a392d7eSmrg case $cc_temp in 1360a392d7eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1370a392d7eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1380a392d7eSmrg \-*) ;; 1390a392d7eSmrg *) break;; 1400a392d7eSmrg esac 1410a392d7eSmrg done 1420a392d7eSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1430a392d7eSmrg} 1440a392d7eSmrg])# _LT_PREPARE_CC_BASENAME 1450a392d7eSmrg 1460a392d7eSmrg 14754b44505Smrg# _LT_CC_BASENAME(CC) 14854b44505Smrg# ------------------- 1490a392d7eSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1500a392d7eSmrg# but that macro is also expanded into generated libtool script, which 1510a392d7eSmrg# arranges for $SED and $ECHO to be set by different means. 15254b44505Smrgm4_defun([_LT_CC_BASENAME], 1530a392d7eSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1540a392d7eSmrgAC_REQUIRE([_LT_DECL_SED])dnl 1550a392d7eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1560a392d7eSmrgfunc_cc_basename $1 1570a392d7eSmrgcc_basename=$func_cc_basename_result 15854b44505Smrg]) 15954b44505Smrg 16054b44505Smrg 16154b44505Smrg# _LT_FILEUTILS_DEFAULTS 16254b44505Smrg# ---------------------- 16354b44505Smrg# It is okay to use these file commands and assume they have been set 1640a392d7eSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 16554b44505Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 16654b44505Smrg[: ${CP="cp -f"} 16754b44505Smrg: ${MV="mv -f"} 16854b44505Smrg: ${RM="rm -f"} 16954b44505Smrg])# _LT_FILEUTILS_DEFAULTS 17054b44505Smrg 17154b44505Smrg 17254b44505Smrg# _LT_SETUP 17354b44505Smrg# --------- 17454b44505Smrgm4_defun([_LT_SETUP], 17554b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1764a041c5bSmacallanAC_REQUIRE([AC_CANONICAL_BUILD])dnl 17754b44505SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 17854b44505SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1794a041c5bSmacallan 1800a392d7eSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1810a392d7eSmrgdnl 18254b44505Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 18354b44505Smrg_LT_DECL([], [host], [0])dnl 18454b44505Smrg_LT_DECL([], [host_os], [0])dnl 18554b44505Smrgdnl 18654b44505Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 18754b44505Smrg_LT_DECL([], [build], [0])dnl 18854b44505Smrg_LT_DECL([], [build_os], [0])dnl 18954b44505Smrgdnl 19054b44505SmrgAC_REQUIRE([AC_PROG_CC])dnl 19154b44505SmrgAC_REQUIRE([LT_PATH_LD])dnl 19254b44505SmrgAC_REQUIRE([LT_PATH_NM])dnl 19354b44505Smrgdnl 1944a041c5bSmacallanAC_REQUIRE([AC_PROG_LN_S])dnl 19554b44505Smrgtest -z "$LN_S" && LN_S="ln -s" 19654b44505Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 19754b44505Smrgdnl 19854b44505SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 19954b44505Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 20054b44505Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2014a041c5bSmacallandnl 20254b44505Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20354b44505Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 20454b44505Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 20554b44505Smrgm4_require([_LT_CMD_RELOAD])dnl 20654b44505Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 20754b44505Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 20854b44505Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 20954b44505Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 21054b44505Smrgm4_require([_LT_WITH_SYSROOT])dnl 2110a392d7eSmrgm4_require([_LT_CMD_TRUNCATE])dnl 21254b44505Smrg 21354b44505Smrg_LT_CONFIG_LIBTOOL_INIT([ 2140a392d7eSmrg# See if we are running on zsh, and set the options that allow our 21554b44505Smrg# commands through without removal of \ escapes INIT. 2160a392d7eSmrgif test -n "\${ZSH_VERSION+set}"; then 21754b44505Smrg setopt NO_GLOB_SUBST 21854b44505Smrgfi 21954b44505Smrg]) 2200a392d7eSmrgif test -n "${ZSH_VERSION+set}"; then 22154b44505Smrg setopt NO_GLOB_SUBST 22254b44505Smrgfi 22354b44505Smrg 22454b44505Smrg_LT_CHECK_OBJDIR 2254a041c5bSmacallan 22654b44505Smrgm4_require([_LT_TAG_COMPILER])dnl 2274a041c5bSmacallan 2284a041c5bSmacallancase $host_os in 2294a041c5bSmacallanaix3*) 2304a041c5bSmacallan # AIX sometimes has problems with the GCC collect2 program. For some 2314a041c5bSmacallan # reason, if we set the COLLECT_NAMES environment variable, the problems 2324a041c5bSmacallan # vanish in a puff of smoke. 2330a392d7eSmrg if test set != "${COLLECT_NAMES+set}"; then 2344a041c5bSmacallan COLLECT_NAMES= 2354a041c5bSmacallan export COLLECT_NAMES 2364a041c5bSmacallan fi 2374a041c5bSmacallan ;; 2384a041c5bSmacallanesac 2394a041c5bSmacallan 2404a041c5bSmacallan# Global variables: 24154b44505Smrgofile=libtool 2424a041c5bSmacallancan_build_shared=yes 2434a041c5bSmacallan 2440a392d7eSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 2454a041c5bSmacallan# which needs '.lib'). 2464a041c5bSmacallanlibext=a 2474a041c5bSmacallan 2480a392d7eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2494a041c5bSmacallan 2500a392d7eSmrgold_CC=$CC 2510a392d7eSmrgold_CFLAGS=$CFLAGS 2524a041c5bSmacallan 2534a041c5bSmacallan# Set sane defaults for various variables 2544a041c5bSmacallantest -z "$CC" && CC=cc 2554a041c5bSmacallantest -z "$LTCC" && LTCC=$CC 2564a041c5bSmacallantest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2574a041c5bSmacallantest -z "$LD" && LD=ld 2584a041c5bSmacallantest -z "$ac_objext" && ac_objext=o 2594a041c5bSmacallan 2604a041c5bSmacallan_LT_CC_BASENAME([$compiler]) 2614a041c5bSmacallan 2624a041c5bSmacallan# Only perform the check for file, if the check method requires it 26354b44505Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2644a041c5bSmacallancase $deplibs_check_method in 2654a041c5bSmacallanfile_magic*) 2664a041c5bSmacallan if test "$file_magic_cmd" = '$MAGIC_CMD'; then 26754b44505Smrg _LT_PATH_MAGIC 2684a041c5bSmacallan fi 2694a041c5bSmacallan ;; 2704a041c5bSmacallanesac 2714a041c5bSmacallan 27254b44505Smrg# Use C for the default configuration in the libtool script 27354b44505SmrgLT_SUPPORTED_TAG([CC]) 27454b44505Smrg_LT_LANG_C_CONFIG 27554b44505Smrg_LT_LANG_DEFAULT_CONFIG 27654b44505Smrg_LT_CONFIG_COMMANDS 27754b44505Smrg])# _LT_SETUP 2784a041c5bSmacallan 2794a041c5bSmacallan 28054b44505Smrg# _LT_PREPARE_SED_QUOTE_VARS 28154b44505Smrg# -------------------------- 28254b44505Smrg# Define a few sed substitution that help us do robust quoting. 28354b44505Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 28454b44505Smrg[# Backslashify metacharacters that are still active within 28554b44505Smrg# double-quoted strings. 28654b44505Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2874a041c5bSmacallan 28854b44505Smrg# Same as above, but do not quote variable references. 28954b44505Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2904a041c5bSmacallan 29154b44505Smrg# Sed substitution to delay expansion of an escaped shell variable in a 29254b44505Smrg# double_quote_subst'ed string. 29354b44505Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2944a041c5bSmacallan 29554b44505Smrg# Sed substitution to delay expansion of an escaped single quote. 29654b44505Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2974a041c5bSmacallan 29854b44505Smrg# Sed substitution to avoid accidental globbing in evaled expressions 29954b44505Smrgno_glob_subst='s/\*/\\\*/g' 30054b44505Smrg]) 3014a041c5bSmacallan 30254b44505Smrg# _LT_PROG_LTMAIN 30354b44505Smrg# --------------- 3040a392d7eSmrg# Note that this code is called both from 'configure', and 'config.status' 30554b44505Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3060a392d7eSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 30754b44505Smrg# so we pass a copy along to make sure it has a sensible value anyway. 30854b44505Smrgm4_defun([_LT_PROG_LTMAIN], 30954b44505Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 31054b44505Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3110a392d7eSmrgltmain=$ac_aux_dir/ltmain.sh 31254b44505Smrg])# _LT_PROG_LTMAIN 3134a041c5bSmacallan 3144a041c5bSmacallan 3154a041c5bSmacallan 31654b44505Smrg# So that we can recreate a full libtool script including additional 31754b44505Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3180a392d7eSmrg# in macros and then make a single call at the end using the 'libtool' 31954b44505Smrg# label. 3204a041c5bSmacallan 3214a041c5bSmacallan 32254b44505Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 32354b44505Smrg# ---------------------------------------- 32454b44505Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 32554b44505Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 32654b44505Smrg[m4_ifval([$1], 32754b44505Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 32854b44505Smrg [$1 32954b44505Smrg])])]) 3304a041c5bSmacallan 33154b44505Smrg# Initialize. 33254b44505Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3334a041c5bSmacallan 3344a041c5bSmacallan 33554b44505Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 33654b44505Smrg# ------------------------------ 33754b44505Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 33854b44505Smrgm4_define([_LT_CONFIG_LIBTOOL], 33954b44505Smrg[m4_ifval([$1], 34054b44505Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 34154b44505Smrg [$1 34254b44505Smrg])])]) 34354b44505Smrg 34454b44505Smrg# Initialize. 34554b44505Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 34654b44505Smrg 34754b44505Smrg 34854b44505Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 34954b44505Smrg# ----------------------------------------------------- 35054b44505Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 35154b44505Smrg[_LT_CONFIG_LIBTOOL([$1]) 35254b44505Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 35354b44505Smrg]) 3544a041c5bSmacallan 3554a041c5bSmacallan 35654b44505Smrg# _LT_FORMAT_COMMENT([COMMENT]) 35754b44505Smrg# ----------------------------- 35854b44505Smrg# Add leading comment marks to the start of each line, and a trailing 35954b44505Smrg# full-stop to the whole comment if one is not present already. 36054b44505Smrgm4_define([_LT_FORMAT_COMMENT], 36154b44505Smrg[m4_ifval([$1], [ 36254b44505Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 36354b44505Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 36454b44505Smrg)]) 36554b44505Smrg 36654b44505Smrg 36754b44505Smrg 36854b44505Smrg 36954b44505Smrg 37054b44505Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 37154b44505Smrg# ------------------------------------------------------------------- 37254b44505Smrg# CONFIGNAME is the name given to the value in the libtool script. 37354b44505Smrg# VARNAME is the (base) name used in the configure script. 37454b44505Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 37554b44505Smrg# VARNAME. Any other value will be used directly. 37654b44505Smrgm4_define([_LT_DECL], 37754b44505Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 37854b44505Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 37954b44505Smrg [m4_ifval([$1], [$1], [$2])]) 38054b44505Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 38154b44505Smrg m4_ifval([$4], 38254b44505Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 38354b44505Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 38454b44505Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3854a041c5bSmacallan]) 3864a041c5bSmacallan 3874a041c5bSmacallan 38854b44505Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 38954b44505Smrg# -------------------------------------------------------- 39054b44505Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3914a041c5bSmacallan 3924a041c5bSmacallan 39354b44505Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 39454b44505Smrg# ------------------------------------------------ 39554b44505Smrgm4_define([lt_decl_tag_varnames], 39654b44505Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3974a041c5bSmacallan 3984a041c5bSmacallan 39954b44505Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 40054b44505Smrg# --------------------------------------------------------- 40154b44505Smrgm4_define([_lt_decl_filter], 40254b44505Smrg[m4_case([$#], 40354b44505Smrg [0], [m4_fatal([$0: too few arguments: $#])], 40454b44505Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 40554b44505Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 40654b44505Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 40754b44505Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 40854b44505Smrg]) 4094a041c5bSmacallan 4104a041c5bSmacallan 41154b44505Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 41254b44505Smrg# -------------------------------------------------- 41354b44505Smrgm4_define([lt_decl_quote_varnames], 41454b44505Smrg[_lt_decl_filter([value], [1], $@)]) 4154a041c5bSmacallan 4164a041c5bSmacallan 41754b44505Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 41854b44505Smrg# --------------------------------------------------- 41954b44505Smrgm4_define([lt_decl_dquote_varnames], 42054b44505Smrg[_lt_decl_filter([value], [2], $@)]) 4214a041c5bSmacallan 4224a041c5bSmacallan 42354b44505Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 42454b44505Smrg# --------------------------------------------------- 42554b44505Smrgm4_define([lt_decl_varnames_tagged], 42654b44505Smrg[m4_assert([$# <= 2])dnl 42754b44505Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 42854b44505Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 42954b44505Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 43054b44505Smrgm4_define([_lt_decl_varnames_tagged], 43154b44505Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4324a041c5bSmacallan 4334a041c5bSmacallan 43454b44505Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 43554b44505Smrg# ------------------------------------------------ 43654b44505Smrgm4_define([lt_decl_all_varnames], 43754b44505Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 43854b44505Smrg m4_if([$2], [], 43954b44505Smrg m4_quote(lt_decl_varnames), 44054b44505Smrg m4_quote(m4_shift($@))))[]dnl 44154b44505Smrg]) 44254b44505Smrgm4_define([_lt_decl_all_varnames], 44354b44505Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 44454b44505Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 44554b44505Smrg]) 4464a041c5bSmacallan 4474a041c5bSmacallan 44854b44505Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 44954b44505Smrg# ------------------------------------ 4500a392d7eSmrg# Quote a variable value, and forward it to 'config.status' so that its 4510a392d7eSmrg# declaration there will have the same value as in 'configure'. VARNAME 45254b44505Smrg# must have a single quote delimited value for this to work. 45354b44505Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 45454b44505Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4554a041c5bSmacallan 4564a041c5bSmacallan 45754b44505Smrg# _LT_CONFIG_STATUS_DECLARATIONS 45854b44505Smrg# ------------------------------ 45954b44505Smrg# We delimit libtool config variables with single quotes, so when 46054b44505Smrg# we write them to config.status, we have to be sure to quote all 46154b44505Smrg# embedded single quotes properly. In configure, this macro expands 46254b44505Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 46354b44505Smrg# 46454b44505Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 46554b44505Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 46654b44505Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 46754b44505Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4684a041c5bSmacallan 46954b44505Smrg 47054b44505Smrg# _LT_LIBTOOL_TAGS 47154b44505Smrg# ---------------- 47254b44505Smrg# Output comment and list of tags supported by the script 47354b44505Smrgm4_defun([_LT_LIBTOOL_TAGS], 47454b44505Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4750a392d7eSmrgavailable_tags='_LT_TAGS'dnl 47654b44505Smrg]) 47754b44505Smrg 47854b44505Smrg 47954b44505Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 48054b44505Smrg# ----------------------------------- 48154b44505Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 48254b44505Smrg# expand to a commented shell variable setting: 48354b44505Smrg# 48454b44505Smrg# # Some comment about what VAR is for. 48554b44505Smrg# visible_name=$lt_internal_name 48654b44505Smrgm4_define([_LT_LIBTOOL_DECLARE], 48754b44505Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 48854b44505Smrg [description])))[]dnl 48954b44505Smrgm4_pushdef([_libtool_name], 49054b44505Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 49154b44505Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 49254b44505Smrg [0], [_libtool_name=[$]$1], 49354b44505Smrg [1], [_libtool_name=$lt_[]$1], 49454b44505Smrg [2], [_libtool_name=$lt_[]$1], 49554b44505Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 49654b44505Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 49754b44505Smrg]) 49854b44505Smrg 49954b44505Smrg 50054b44505Smrg# _LT_LIBTOOL_CONFIG_VARS 50154b44505Smrg# ----------------------- 50254b44505Smrg# Produce commented declarations of non-tagged libtool config variables 5030a392d7eSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 50454b44505Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 50554b44505Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 50654b44505Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 50754b44505Smrg[m4_foreach([_lt_var], 50854b44505Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 50954b44505Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 51054b44505Smrg 51154b44505Smrg 51254b44505Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 51354b44505Smrg# ------------------------- 51454b44505Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 51554b44505Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 51654b44505Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51754b44505Smrg 51854b44505Smrg 51954b44505Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 52054b44505Smrg# ------------------------------ 52154b44505Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 52254b44505Smrg 52354b44505Smrg 52454b44505Smrg# _LT_CONFIG_COMMANDS 52554b44505Smrg# ------------------- 52654b44505Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 52754b44505Smrg# variables for single and double quote escaping we saved from calls 52854b44505Smrg# to _LT_DECL, we can put quote escaped variables declarations 5290a392d7eSmrg# into 'config.status', and then the shell code to quote escape them in 5300a392d7eSmrg# for loops in 'config.status'. Finally, any additional code accumulated 53154b44505Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 53254b44505Smrgm4_defun([_LT_CONFIG_COMMANDS], 53354b44505Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 53454b44505Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 53554b44505Smrg dnl instead of duplicating it all over again into config.status, 53654b44505Smrg dnl then we will have config.status run $CONFIG_LT later, so it 53754b44505Smrg dnl needs to know what name is stored there: 53854b44505Smrg [AC_CONFIG_COMMANDS([libtool], 53954b44505Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 54054b44505Smrg dnl If the libtool generation code is destined for config.status, 54154b44505Smrg dnl expand the accumulated commands and init code now: 54254b44505Smrg [AC_CONFIG_COMMANDS([libtool], 54354b44505Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 54454b44505Smrg])#_LT_CONFIG_COMMANDS 54554b44505Smrg 54654b44505Smrg 54754b44505Smrg# Initialize. 54854b44505Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 54954b44505Smrg[ 55054b44505Smrg 55154b44505Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 55254b44505Smrg# if CDPATH is set. 55354b44505Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 55454b44505Smrg 55554b44505Smrgsed_quote_subst='$sed_quote_subst' 55654b44505Smrgdouble_quote_subst='$double_quote_subst' 55754b44505Smrgdelay_variable_subst='$delay_variable_subst' 55854b44505Smrg_LT_CONFIG_STATUS_DECLARATIONS 55954b44505SmrgLTCC='$LTCC' 56054b44505SmrgLTCFLAGS='$LTCFLAGS' 56154b44505Smrgcompiler='$compiler_DEFAULT' 56254b44505Smrg 56354b44505Smrg# A function that is used when there is no print builtin or printf. 56454b44505Smrgfunc_fallback_echo () 56554b44505Smrg{ 56654b44505Smrg eval 'cat <<_LTECHO_EOF 56754b44505Smrg\$[]1 56854b44505Smrg_LTECHO_EOF' 56954b44505Smrg} 57054b44505Smrg 57154b44505Smrg# Quote evaled strings. 57254b44505Smrgfor var in lt_decl_all_varnames([[ \ 57354b44505Smrg]], lt_decl_quote_varnames); do 57454b44505Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 57554b44505Smrg *[[\\\\\\\`\\"\\\$]]*) 5760a392d7eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5774a041c5bSmacallan ;; 57854b44505Smrg *) 57954b44505Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5804a041c5bSmacallan ;; 5814a041c5bSmacallan esac 58254b44505Smrgdone 5834a041c5bSmacallan 58454b44505Smrg# Double-quote double-evaled strings. 58554b44505Smrgfor var in lt_decl_all_varnames([[ \ 58654b44505Smrg]], lt_decl_dquote_varnames); do 58754b44505Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 58854b44505Smrg *[[\\\\\\\`\\"\\\$]]*) 5890a392d7eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5904a041c5bSmacallan ;; 59154b44505Smrg *) 59254b44505Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5934a041c5bSmacallan ;; 5944a041c5bSmacallan esac 59554b44505Smrgdone 5964a041c5bSmacallan 59754b44505Smrg_LT_OUTPUT_LIBTOOL_INIT 59854b44505Smrg]) 5994a041c5bSmacallan 60054b44505Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 60154b44505Smrg# ------------------------------------ 60254b44505Smrg# Generate a child script FILE with all initialization necessary to 60354b44505Smrg# reuse the environment learned by the parent script, and make the 60454b44505Smrg# file executable. If COMMENT is supplied, it is inserted after the 6050a392d7eSmrg# '#!' sequence but before initialization text begins. After this 60654b44505Smrg# macro, additional text can be appended to FILE to form the body of 60754b44505Smrg# the child script. The macro ends with non-zero status if the 60854b44505Smrg# file could not be fully written (such as if the disk is full). 60954b44505Smrgm4_ifdef([AS_INIT_GENERATED], 61054b44505Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 61154b44505Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 61254b44505Smrg[m4_require([AS_PREPARE])]dnl 61354b44505Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 61454b44505Smrg[lt_write_fail=0 61554b44505Smrgcat >$1 <<_ASEOF || lt_write_fail=1 61654b44505Smrg#! $SHELL 61754b44505Smrg# Generated by $as_me. 61854b44505Smrg$2 61954b44505SmrgSHELL=\${CONFIG_SHELL-$SHELL} 62054b44505Smrgexport SHELL 62154b44505Smrg_ASEOF 62254b44505Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 62354b44505SmrgAS_SHELL_SANITIZE 62454b44505Smrg_AS_PREPARE 62554b44505Smrgexec AS_MESSAGE_FD>&1 62654b44505Smrg_ASEOF 6270a392d7eSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 62854b44505Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 62954b44505Smrg 63054b44505Smrg# LT_OUTPUT 63154b44505Smrg# --------- 63254b44505Smrg# This macro allows early generation of the libtool script (before 63354b44505Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 63454b44505Smrg# tests. 63554b44505SmrgAC_DEFUN([LT_OUTPUT], 63654b44505Smrg[: ${CONFIG_LT=./config.lt} 63754b44505SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 63854b44505Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 63954b44505Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 64054b44505Smrg 64154b44505Smrgcat >>"$CONFIG_LT" <<\_LTEOF 64254b44505Smrglt_cl_silent=false 64354b44505Smrgexec AS_MESSAGE_LOG_FD>>config.log 64454b44505Smrg{ 64554b44505Smrg echo 64654b44505Smrg AS_BOX([Running $as_me.]) 64754b44505Smrg} >&AS_MESSAGE_LOG_FD 6484a041c5bSmacallan 64954b44505Smrglt_cl_help="\ 6500a392d7eSmrg'$as_me' creates a local libtool stub from the current configuration, 65154b44505Smrgfor use in further configure time tests before the real libtool is 65254b44505Smrggenerated. 6534a041c5bSmacallan 65454b44505SmrgUsage: $[0] [[OPTIONS]] 6554a041c5bSmacallan 65654b44505Smrg -h, --help print this help, then exit 65754b44505Smrg -V, --version print version number, then exit 65854b44505Smrg -q, --quiet do not print progress messages 65954b44505Smrg -d, --debug don't remove temporary files 6604a041c5bSmacallan 66154b44505SmrgReport bugs to <bug-libtool@gnu.org>." 6624a041c5bSmacallan 66354b44505Smrglt_cl_version="\ 66454b44505Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 66554b44505Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 66654b44505Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6674a041c5bSmacallan 6680a392d7eSmrgCopyright (C) 2011 Free Software Foundation, Inc. 66954b44505SmrgThis config.lt script is free software; the Free Software Foundation 67054b44505Smrggives unlimited permision to copy, distribute and modify it." 6714a041c5bSmacallan 6720a392d7eSmrgwhile test 0 != $[#] 67354b44505Smrgdo 67454b44505Smrg case $[1] in 67554b44505Smrg --version | --v* | -V ) 67654b44505Smrg echo "$lt_cl_version"; exit 0 ;; 67754b44505Smrg --help | --h* | -h ) 67854b44505Smrg echo "$lt_cl_help"; exit 0 ;; 67954b44505Smrg --debug | --d* | -d ) 68054b44505Smrg debug=: ;; 68154b44505Smrg --quiet | --q* | --silent | --s* | -q ) 68254b44505Smrg lt_cl_silent=: ;; 68354b44505Smrg 68454b44505Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6850a392d7eSmrgTry '$[0] --help' for more information.]) ;; 68654b44505Smrg 68754b44505Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6880a392d7eSmrgTry '$[0] --help' for more information.]) ;; 68954b44505Smrg esac 69054b44505Smrg shift 69154b44505Smrgdone 6924a041c5bSmacallan 69354b44505Smrgif $lt_cl_silent; then 69454b44505Smrg exec AS_MESSAGE_FD>/dev/null 6954a041c5bSmacallanfi 69654b44505Smrg_LTEOF 69754b44505Smrg 69854b44505Smrgcat >>"$CONFIG_LT" <<_LTEOF 69954b44505Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 70054b44505Smrg_LTEOF 70154b44505Smrg 70254b44505Smrgcat >>"$CONFIG_LT" <<\_LTEOF 70354b44505SmrgAC_MSG_NOTICE([creating $ofile]) 70454b44505Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 70554b44505SmrgAS_EXIT(0) 70654b44505Smrg_LTEOF 70754b44505Smrgchmod +x "$CONFIG_LT" 70854b44505Smrg 70954b44505Smrg# configure is writing to config.log, but config.lt does its own redirection, 71054b44505Smrg# appending to config.log, which fails on DOS, as config.log is still kept 71154b44505Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 71254b44505Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 71354b44505Smrglt_cl_success=: 7140a392d7eSmrgtest yes = "$silent" && 71554b44505Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 71654b44505Smrgexec AS_MESSAGE_LOG_FD>/dev/null 71754b44505Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 71854b44505Smrgexec AS_MESSAGE_LOG_FD>>config.log 71954b44505Smrg$lt_cl_success || AS_EXIT(1) 72054b44505Smrg])# LT_OUTPUT 72154b44505Smrg 72254b44505Smrg 72354b44505Smrg# _LT_CONFIG(TAG) 72454b44505Smrg# --------------- 72554b44505Smrg# If TAG is the built-in tag, create an initial libtool script with a 72654b44505Smrg# default configuration from the untagged config vars. Otherwise add code 72754b44505Smrg# to config.status for appending the configuration named by TAG from the 72854b44505Smrg# matching tagged config vars. 72954b44505Smrgm4_defun([_LT_CONFIG], 73054b44505Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 73154b44505Smrg_LT_CONFIG_SAVE_COMMANDS([ 73254b44505Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 73354b44505Smrg m4_if(_LT_TAG, [C], [ 7340a392d7eSmrg # See if we are running on zsh, and set the options that allow our 73554b44505Smrg # commands through without removal of \ escapes. 7360a392d7eSmrg if test -n "${ZSH_VERSION+set}"; then 73754b44505Smrg setopt NO_GLOB_SUBST 73854b44505Smrg fi 7394a041c5bSmacallan 7400a392d7eSmrg cfgfile=${ofile}T 74154b44505Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 74254b44505Smrg $RM "$cfgfile" 7434a041c5bSmacallan 74454b44505Smrg cat <<_LT_EOF >> "$cfgfile" 74554b44505Smrg#! $SHELL 7460a392d7eSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 74754b44505Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 74854b44505Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7490a392d7eSmrg 7500a392d7eSmrg# Provide generalized library-building support services. 7510a392d7eSmrg# Written by Gordon Matzigkeit, 1996 7520a392d7eSmrg 75354b44505Smrg_LT_COPYING 75454b44505Smrg_LT_LIBTOOL_TAGS 7554a041c5bSmacallan 7560a392d7eSmrg# Configured defaults for sys_lib_dlsearch_path munging. 7570a392d7eSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7580a392d7eSmrg 75954b44505Smrg# ### BEGIN LIBTOOL CONFIG 76054b44505Smrg_LT_LIBTOOL_CONFIG_VARS 76154b44505Smrg_LT_LIBTOOL_TAG_VARS 76254b44505Smrg# ### END LIBTOOL CONFIG 7634a041c5bSmacallan 7640a392d7eSmrg_LT_EOF 7650a392d7eSmrg 7660a392d7eSmrg cat <<'_LT_EOF' >> "$cfgfile" 7670a392d7eSmrg 7680a392d7eSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7690a392d7eSmrg 7700a392d7eSmrg_LT_PREPARE_MUNGE_PATH_LIST 7710a392d7eSmrg_LT_PREPARE_CC_BASENAME 7720a392d7eSmrg 7730a392d7eSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7740a392d7eSmrg 77554b44505Smrg_LT_EOF 7764a041c5bSmacallan 77754b44505Smrg case $host_os in 77854b44505Smrg aix3*) 77954b44505Smrg cat <<\_LT_EOF >> "$cfgfile" 78054b44505Smrg# AIX sometimes has problems with the GCC collect2 program. For some 78154b44505Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 78254b44505Smrg# vanish in a puff of smoke. 7830a392d7eSmrgif test set != "${COLLECT_NAMES+set}"; then 78454b44505Smrg COLLECT_NAMES= 78554b44505Smrg export COLLECT_NAMES 78654b44505Smrgfi 78754b44505Smrg_LT_EOF 7884a041c5bSmacallan ;; 78954b44505Smrg esac 7904a041c5bSmacallan 79154b44505Smrg _LT_PROG_LTMAIN 7924a041c5bSmacallan 79354b44505Smrg # We use sed instead of cat because bash on DJGPP gets confused if 79454b44505Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 79554b44505Smrg # text mode, it properly converts lines to CR/LF. This bash problem 79654b44505Smrg # is reportedly fixed, but why not run on old versions too? 79754b44505Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 79854b44505Smrg || (rm -f "$cfgfile"; exit 1) 7994a041c5bSmacallan 80054b44505Smrg mv -f "$cfgfile" "$ofile" || 80154b44505Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 80254b44505Smrg chmod +x "$ofile" 80354b44505Smrg], 80454b44505Smrg[cat <<_LT_EOF >> "$ofile" 80554b44505Smrg 80654b44505Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 80754b44505Smrgdnl in a comment (ie after a #). 80854b44505Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 80954b44505Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 81054b44505Smrg# ### END LIBTOOL TAG CONFIG: $1 81154b44505Smrg_LT_EOF 81254b44505Smrg])dnl /m4_if 81354b44505Smrg], 81454b44505Smrg[m4_if([$1], [], [ 81554b44505Smrg PACKAGE='$PACKAGE' 81654b44505Smrg VERSION='$VERSION' 81754b44505Smrg RM='$RM' 81854b44505Smrg ofile='$ofile'], []) 81954b44505Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 82054b44505Smrg])# _LT_CONFIG 82154b44505Smrg 82254b44505Smrg 82354b44505Smrg# LT_SUPPORTED_TAG(TAG) 82454b44505Smrg# --------------------- 82554b44505Smrg# Trace this macro to discover what tags are supported by the libtool 82654b44505Smrg# --tag option, using: 82754b44505Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 82854b44505SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 82954b44505Smrg 83054b44505Smrg 83154b44505Smrg# C support is built-in for now 83254b44505Smrgm4_define([_LT_LANG_C_enabled], []) 83354b44505Smrgm4_define([_LT_TAGS], []) 83454b44505Smrg 83554b44505Smrg 83654b44505Smrg# LT_LANG(LANG) 83754b44505Smrg# ------------- 83854b44505Smrg# Enable libtool support for the given language if not already enabled. 83954b44505SmrgAC_DEFUN([LT_LANG], 84054b44505Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 84154b44505Smrgm4_case([$1], 84254b44505Smrg [C], [_LT_LANG(C)], 84354b44505Smrg [C++], [_LT_LANG(CXX)], 8440a392d7eSmrg [Go], [_LT_LANG(GO)], 84554b44505Smrg [Java], [_LT_LANG(GCJ)], 84654b44505Smrg [Fortran 77], [_LT_LANG(F77)], 84754b44505Smrg [Fortran], [_LT_LANG(FC)], 84854b44505Smrg [Windows Resource], [_LT_LANG(RC)], 84954b44505Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 85054b44505Smrg [_LT_LANG($1)], 85154b44505Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 85254b44505Smrg])# LT_LANG 85354b44505Smrg 85454b44505Smrg 85554b44505Smrg# _LT_LANG(LANGNAME) 85654b44505Smrg# ------------------ 85754b44505Smrgm4_defun([_LT_LANG], 85854b44505Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 85954b44505Smrg [LT_SUPPORTED_TAG([$1])dnl 86054b44505Smrg m4_append([_LT_TAGS], [$1 ])dnl 86154b44505Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 86254b44505Smrg _LT_LANG_$1_CONFIG($1)])dnl 86354b44505Smrg])# _LT_LANG 86454b44505Smrg 86554b44505Smrg 8660a392d7eSmrgm4_ifndef([AC_PROG_GO], [ 8670a392d7eSmrg# NOTE: This macro has been submitted for inclusion into # 8680a392d7eSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8690a392d7eSmrg# a released version of Autoconf we should remove this # 8700a392d7eSmrg# macro and use it instead. # 8710a392d7eSmrgm4_defun([AC_PROG_GO], 8720a392d7eSmrg[AC_LANG_PUSH(Go)dnl 8730a392d7eSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8740a392d7eSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8750a392d7eSmrg_AC_ARG_VAR_LDFLAGS()dnl 8760a392d7eSmrgAC_CHECK_TOOL(GOC, gccgo) 8770a392d7eSmrgif test -z "$GOC"; then 8780a392d7eSmrg if test -n "$ac_tool_prefix"; then 8790a392d7eSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8800a392d7eSmrg fi 8810a392d7eSmrgfi 8820a392d7eSmrgif test -z "$GOC"; then 8830a392d7eSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8840a392d7eSmrgfi 8850a392d7eSmrg])#m4_defun 8860a392d7eSmrg])#m4_ifndef 8870a392d7eSmrg 8880a392d7eSmrg 88954b44505Smrg# _LT_LANG_DEFAULT_CONFIG 89054b44505Smrg# ----------------------- 89154b44505Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 89254b44505Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 89354b44505Smrg [LT_LANG(CXX)], 89454b44505Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 89554b44505Smrg 89654b44505SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 89754b44505Smrg [LT_LANG(F77)], 89854b44505Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 89954b44505Smrg 90054b44505SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 90154b44505Smrg [LT_LANG(FC)], 90254b44505Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 90354b44505Smrg 90454b44505Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 90554b44505Smrgdnl pulling things in needlessly. 90654b44505SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 90754b44505Smrg [LT_LANG(GCJ)], 90854b44505Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 90954b44505Smrg [LT_LANG(GCJ)], 91054b44505Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 91154b44505Smrg [LT_LANG(GCJ)], 91254b44505Smrg [m4_ifdef([AC_PROG_GCJ], 91354b44505Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 91454b44505Smrg m4_ifdef([A][M_PROG_GCJ], 91554b44505Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 91654b44505Smrg m4_ifdef([LT_PROG_GCJ], 91754b44505Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 91854b44505Smrg 9190a392d7eSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9200a392d7eSmrg [LT_LANG(GO)], 9210a392d7eSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9220a392d7eSmrg 92354b44505SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 92454b44505Smrg [LT_LANG(RC)], 92554b44505Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 92654b44505Smrg])# _LT_LANG_DEFAULT_CONFIG 92754b44505Smrg 92854b44505Smrg# Obsolete macros: 92954b44505SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 93054b44505SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 93154b44505SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 93254b44505SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 93354b44505SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 93454b44505Smrgdnl aclocal-1.4 backwards compatibility: 93554b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 93654b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 93754b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 93854b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 93954b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 94054b44505Smrg 94154b44505Smrg 94254b44505Smrg# _LT_TAG_COMPILER 94354b44505Smrg# ---------------- 94454b44505Smrgm4_defun([_LT_TAG_COMPILER], 94554b44505Smrg[AC_REQUIRE([AC_PROG_CC])dnl 94654b44505Smrg 94754b44505Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 94854b44505Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 94954b44505Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 95054b44505Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 95154b44505Smrg 95254b44505Smrg# If no C compiler was specified, use CC. 95354b44505SmrgLTCC=${LTCC-"$CC"} 95454b44505Smrg 95554b44505Smrg# If no C compiler flags were specified, use CFLAGS. 95654b44505SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 95754b44505Smrg 95854b44505Smrg# Allow CC to be a program name with arguments. 95954b44505Smrgcompiler=$CC 96054b44505Smrg])# _LT_TAG_COMPILER 96154b44505Smrg 96254b44505Smrg 96354b44505Smrg# _LT_COMPILER_BOILERPLATE 96454b44505Smrg# ------------------------ 96554b44505Smrg# Check for compiler boilerplate output or warnings with 96654b44505Smrg# the simple compiler test code. 96754b44505Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 96854b44505Smrg[m4_require([_LT_DECL_SED])dnl 96954b44505Smrgac_outfile=conftest.$ac_objext 97054b44505Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 97154b44505Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97254b44505Smrg_lt_compiler_boilerplate=`cat conftest.err` 97354b44505Smrg$RM conftest* 97454b44505Smrg])# _LT_COMPILER_BOILERPLATE 97554b44505Smrg 97654b44505Smrg 97754b44505Smrg# _LT_LINKER_BOILERPLATE 97854b44505Smrg# ---------------------- 97954b44505Smrg# Check for linker boilerplate output or warnings with 98054b44505Smrg# the simple link test code. 98154b44505Smrgm4_defun([_LT_LINKER_BOILERPLATE], 98254b44505Smrg[m4_require([_LT_DECL_SED])dnl 98354b44505Smrgac_outfile=conftest.$ac_objext 98454b44505Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 98554b44505Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 98654b44505Smrg_lt_linker_boilerplate=`cat conftest.err` 98754b44505Smrg$RM -r conftest* 98854b44505Smrg])# _LT_LINKER_BOILERPLATE 98954b44505Smrg 99054b44505Smrg# _LT_REQUIRED_DARWIN_CHECKS 99154b44505Smrg# ------------------------- 99254b44505Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 99354b44505Smrg case $host_os in 99454b44505Smrg rhapsody* | darwin*) 99554b44505Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 99654b44505Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 99754b44505Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 99854b44505Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 99954b44505Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 100054b44505Smrg _LT_DECL([], [DSYMUTIL], [1], 100154b44505Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 100254b44505Smrg _LT_DECL([], [NMEDIT], [1], 100354b44505Smrg [Tool to change global to local symbols on Mac OS X]) 100454b44505Smrg _LT_DECL([], [LIPO], [1], 100554b44505Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 100654b44505Smrg _LT_DECL([], [OTOOL], [1], 100754b44505Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 100854b44505Smrg _LT_DECL([], [OTOOL64], [1], 100954b44505Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 101054b44505Smrg 101154b44505Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 101254b44505Smrg [lt_cv_apple_cc_single_mod=no 10130a392d7eSmrg if test -z "$LT_MULTI_MODULE"; then 101454b44505Smrg # By default we will add the -single_module flag. You can override 101554b44505Smrg # by either setting the environment variable LT_MULTI_MODULE 101654b44505Smrg # non-empty at configure time, or by adding -multi_module to the 101754b44505Smrg # link flags. 101854b44505Smrg rm -rf libconftest.dylib* 101954b44505Smrg echo "int foo(void){return 1;}" > conftest.c 102054b44505Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 102154b44505Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 102254b44505Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 102354b44505Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 102454b44505Smrg _lt_result=$? 10250a392d7eSmrg # If there is a non-empty error log, and "single_module" 10260a392d7eSmrg # appears in it, assume the flag caused a linker warning 10270a392d7eSmrg if test -s conftest.err && $GREP single_module conftest.err; then 10280a392d7eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10290a392d7eSmrg # Otherwise, if the output was created with a 0 exit code from 10300a392d7eSmrg # the compiler, it worked. 10310a392d7eSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 103254b44505Smrg lt_cv_apple_cc_single_mod=yes 103354b44505Smrg else 103454b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 103554b44505Smrg fi 103654b44505Smrg rm -rf libconftest.dylib* 103754b44505Smrg rm -f conftest.* 103854b44505Smrg fi]) 10390a392d7eSmrg 104054b44505Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 104154b44505Smrg [lt_cv_ld_exported_symbols_list], 104254b44505Smrg [lt_cv_ld_exported_symbols_list=no 104354b44505Smrg save_LDFLAGS=$LDFLAGS 104454b44505Smrg echo "_main" > conftest.sym 104554b44505Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 104654b44505Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 104754b44505Smrg [lt_cv_ld_exported_symbols_list=yes], 104854b44505Smrg [lt_cv_ld_exported_symbols_list=no]) 10490a392d7eSmrg LDFLAGS=$save_LDFLAGS 105054b44505Smrg ]) 10510a392d7eSmrg 105254b44505Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 105354b44505Smrg [lt_cv_ld_force_load=no 105454b44505Smrg cat > conftest.c << _LT_EOF 105554b44505Smrgint forced_loaded() { return 2;} 105654b44505Smrg_LT_EOF 105754b44505Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 105854b44505Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 105954b44505Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 106054b44505Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 106154b44505Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 106254b44505Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 106354b44505Smrg cat > conftest.c << _LT_EOF 106454b44505Smrgint main() { return 0;} 106554b44505Smrg_LT_EOF 106654b44505Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 106754b44505Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 106854b44505Smrg _lt_result=$? 10690a392d7eSmrg if test -s conftest.err && $GREP force_load conftest.err; then 10700a392d7eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10710a392d7eSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 107254b44505Smrg lt_cv_ld_force_load=yes 107354b44505Smrg else 107454b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107554b44505Smrg fi 107654b44505Smrg rm -f conftest.err libconftest.a conftest conftest.c 107754b44505Smrg rm -rf conftest.dSYM 107854b44505Smrg ]) 107954b44505Smrg case $host_os in 108054b44505Smrg rhapsody* | darwin1.[[012]]) 10810a392d7eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 108254b44505Smrg darwin1.*) 10830a392d7eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 108454b44505Smrg darwin*) # darwin 5.x on 108554b44505Smrg # if running on 10.5 or later, the deployment target defaults 108654b44505Smrg # to the OS version, if on x86, and 10.4, the deployment 108754b44505Smrg # target defaults to 10.4. Don't you love it? 108854b44505Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 108954b44505Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10900a392d7eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10910a392d7eSmrg 10.[[012]][[,.]]*) 10920a392d7eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 109354b44505Smrg 10.*) 10940a392d7eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109554b44505Smrg esac 10964a041c5bSmacallan ;; 109754b44505Smrg esac 10980a392d7eSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 109954b44505Smrg _lt_dar_single_mod='$single_module' 110054b44505Smrg fi 11010a392d7eSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 11020a392d7eSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11034a041c5bSmacallan else 11040a392d7eSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11054a041c5bSmacallan fi 11060a392d7eSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 110754b44505Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11084a041c5bSmacallan else 110954b44505Smrg _lt_dsymutil= 11104a041c5bSmacallan fi 11114a041c5bSmacallan ;; 11124a041c5bSmacallan esac 11134a041c5bSmacallan]) 11144a041c5bSmacallan 11154a041c5bSmacallan 11160a392d7eSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11170a392d7eSmrg# --------------------------------- 111854b44505Smrg# Checks for linker and compiler features on darwin 111954b44505Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 112054b44505Smrg[ 112154b44505Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 112254b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 112354b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 112454b44505Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 112554b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11260a392d7eSmrg if test yes = "$lt_cv_ld_force_load"; then 11270a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 11280a392d7eSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11290a392d7eSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 113054b44505Smrg else 113154b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 113254b44505Smrg fi 113354b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11340a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 113554b44505Smrg case $cc_basename in 11360a392d7eSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 113754b44505Smrg *) _lt_dar_can_shared=$GCC ;; 113854b44505Smrg esac 11390a392d7eSmrg if test yes = "$_lt_dar_can_shared"; then 114054b44505Smrg output_verbose_link_cmd=func_echo_all 11410a392d7eSmrg _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" 11420a392d7eSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11430a392d7eSmrg _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" 11440a392d7eSmrg _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" 114554b44505Smrg m4_if([$1], [CXX], 11460a392d7eSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11470a392d7eSmrg _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" 11480a392d7eSmrg _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" 114954b44505Smrg fi 115054b44505Smrg],[]) 115154b44505Smrg else 115254b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 115354b44505Smrg fi 115454b44505Smrg]) 11554a041c5bSmacallan 115654b44505Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 115754b44505Smrg# ---------------------------------- 115854b44505Smrg# Links a minimal program and checks the executable 115954b44505Smrg# for the system default hardcoded library path. In most cases, 116054b44505Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 116154b44505Smrg# the location of the communication and MPI libs are included too. 116254b44505Smrg# If we don't find anything, use the default library path according 116354b44505Smrg# to the aix ld manual. 116454b44505Smrg# Store the results from the different compilers for each TAGNAME. 116554b44505Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 116654b44505Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 116754b44505Smrg[m4_require([_LT_DECL_SED])dnl 11680a392d7eSmrgif test set = "${lt_cv_aix_libpath+set}"; then 116954b44505Smrg aix_libpath=$lt_cv_aix_libpath 11704a041c5bSmacallanelse 117154b44505Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 117254b44505Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 117354b44505Smrg lt_aix_libpath_sed='[ 117454b44505Smrg /Import File Strings/,/^$/ { 117554b44505Smrg /^0/ { 117654b44505Smrg s/^0 *\([^ ]*\) *$/\1/ 117754b44505Smrg p 117854b44505Smrg } 117954b44505Smrg }]' 118054b44505Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118154b44505Smrg # Check for a 64-bit object if we didn't find anything. 118254b44505Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118354b44505Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118454b44505Smrg fi],[]) 118554b44505Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11860a392d7eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 118754b44505Smrg fi 118854b44505Smrg ]) 118954b44505Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 119054b44505Smrgfi 119154b44505Smrg])# _LT_SYS_MODULE_PATH_AIX 11924a041c5bSmacallan 11934a041c5bSmacallan 119454b44505Smrg# _LT_SHELL_INIT(ARG) 119554b44505Smrg# ------------------- 119654b44505Smrgm4_define([_LT_SHELL_INIT], 119754b44505Smrg[m4_divert_text([M4SH-INIT], [$1 119854b44505Smrg])])# _LT_SHELL_INIT 11994a041c5bSmacallan 12004a041c5bSmacallan 12014a041c5bSmacallan 120254b44505Smrg# _LT_PROG_ECHO_BACKSLASH 120354b44505Smrg# ----------------------- 120454b44505Smrg# Find how we can fake an echo command that does not interpret backslash. 120554b44505Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 12060a392d7eSmrg# of the generated configure script that will find a shell with a builtin 12070a392d7eSmrg# printf (that we can use as an echo command). 120854b44505Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 120954b44505Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 121054b44505SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 121154b44505SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 121254b44505Smrg 121354b44505SmrgAC_MSG_CHECKING([how to print strings]) 121454b44505Smrg# Test print first, because it will be a builtin if present. 121554b44505Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 121654b44505Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 121754b44505Smrg ECHO='print -r --' 121854b44505Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 121954b44505Smrg ECHO='printf %s\n' 122054b44505Smrgelse 122154b44505Smrg # Use this function as a fallback that always works. 122254b44505Smrg func_fallback_echo () 122354b44505Smrg { 122454b44505Smrg eval 'cat <<_LTECHO_EOF 122554b44505Smrg$[]1 122654b44505Smrg_LTECHO_EOF' 122754b44505Smrg } 122854b44505Smrg ECHO='func_fallback_echo' 122954b44505Smrgfi 12304a041c5bSmacallan 123154b44505Smrg# func_echo_all arg... 123254b44505Smrg# Invoke $ECHO with all args, space-separated. 123354b44505Smrgfunc_echo_all () 12344a041c5bSmacallan{ 12350a392d7eSmrg $ECHO "$*" 123654b44505Smrg} 12374a041c5bSmacallan 12380a392d7eSmrgcase $ECHO in 123954b44505Smrg printf*) AC_MSG_RESULT([printf]) ;; 124054b44505Smrg print*) AC_MSG_RESULT([print -r]) ;; 124154b44505Smrg *) AC_MSG_RESULT([cat]) ;; 124254b44505Smrgesac 12434a041c5bSmacallan 124454b44505Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 124554b44505Smrg[_AS_DETECT_SUGGESTED([ 124654b44505Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 124754b44505Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 124854b44505Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 124954b44505Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 125054b44505Smrg PATH=/empty FPATH=/empty; export PATH FPATH 125154b44505Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 125254b44505Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12534a041c5bSmacallan 125454b44505Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 125554b44505Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 125654b44505Smrg])# _LT_PROG_ECHO_BACKSLASH 12574a041c5bSmacallan 12584a041c5bSmacallan 125954b44505Smrg# _LT_WITH_SYSROOT 126054b44505Smrg# ---------------- 126154b44505SmrgAC_DEFUN([_LT_WITH_SYSROOT], 126254b44505Smrg[AC_MSG_CHECKING([for sysroot]) 126354b44505SmrgAC_ARG_WITH([sysroot], 12640a392d7eSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12650a392d7eSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 12660a392d7eSmrg if not specified).])], 126754b44505Smrg[], [with_sysroot=no]) 126854b44505Smrg 126954b44505Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 127054b44505Smrgdnl in case the user passed a directory name. 127154b44505Smrglt_sysroot= 12720a392d7eSmrgcase $with_sysroot in #( 127354b44505Smrg yes) 12740a392d7eSmrg if test yes = "$GCC"; then 127554b44505Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 127654b44505Smrg fi 127754b44505Smrg ;; #( 127854b44505Smrg /*) 127954b44505Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 128054b44505Smrg ;; #( 128154b44505Smrg no|'') 128254b44505Smrg ;; #( 128354b44505Smrg *) 12840a392d7eSmrg AC_MSG_RESULT([$with_sysroot]) 128554b44505Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12864a041c5bSmacallan ;; 128754b44505Smrgesac 12884a041c5bSmacallan 128954b44505Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 129054b44505Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12910a392d7eSmrg[dependent libraries, and where our libraries should be installed.])]) 12924a041c5bSmacallan 129354b44505Smrg# _LT_ENABLE_LOCK 129454b44505Smrg# --------------- 129554b44505Smrgm4_defun([_LT_ENABLE_LOCK], 129654b44505Smrg[AC_ARG_ENABLE([libtool-lock], 129754b44505Smrg [AS_HELP_STRING([--disable-libtool-lock], 129854b44505Smrg [avoid locking (might break parallel builds)])]) 12990a392d7eSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 13004a041c5bSmacallan 130154b44505Smrg# Some flags need to be propagated to the compiler or linker for good 130254b44505Smrg# libtool support. 130354b44505Smrgcase $host in 130454b44505Smrgia64-*-hpux*) 13050a392d7eSmrg # Find out what ABI is being produced by ac_compile, and set mode 13060a392d7eSmrg # options accordingly. 130754b44505Smrg echo 'int i;' > conftest.$ac_ext 130854b44505Smrg if AC_TRY_EVAL(ac_compile); then 130954b44505Smrg case `/usr/bin/file conftest.$ac_objext` in 131054b44505Smrg *ELF-32*) 13110a392d7eSmrg HPUX_IA64_MODE=32 131254b44505Smrg ;; 131354b44505Smrg *ELF-64*) 13140a392d7eSmrg HPUX_IA64_MODE=64 131554b44505Smrg ;; 131654b44505Smrg esac 131754b44505Smrg fi 131854b44505Smrg rm -rf conftest* 131954b44505Smrg ;; 132054b44505Smrg*-*-irix6*) 13210a392d7eSmrg # Find out what ABI is being produced by ac_compile, and set linker 13220a392d7eSmrg # options accordingly. 132354b44505Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 132454b44505Smrg if AC_TRY_EVAL(ac_compile); then 13250a392d7eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 132654b44505Smrg case `/usr/bin/file conftest.$ac_objext` in 132754b44505Smrg *32-bit*) 132854b44505Smrg LD="${LD-ld} -melf32bsmip" 132954b44505Smrg ;; 133054b44505Smrg *N32*) 133154b44505Smrg LD="${LD-ld} -melf32bmipn32" 133254b44505Smrg ;; 133354b44505Smrg *64-bit*) 133454b44505Smrg LD="${LD-ld} -melf64bmip" 133554b44505Smrg ;; 133654b44505Smrg esac 133754b44505Smrg else 133854b44505Smrg case `/usr/bin/file conftest.$ac_objext` in 133954b44505Smrg *32-bit*) 134054b44505Smrg LD="${LD-ld} -32" 134154b44505Smrg ;; 134254b44505Smrg *N32*) 134354b44505Smrg LD="${LD-ld} -n32" 134454b44505Smrg ;; 134554b44505Smrg *64-bit*) 134654b44505Smrg LD="${LD-ld} -64" 134754b44505Smrg ;; 134854b44505Smrg esac 134954b44505Smrg fi 135054b44505Smrg fi 135154b44505Smrg rm -rf conftest* 135254b44505Smrg ;; 13534a041c5bSmacallan 13540a392d7eSmrgmips64*-*linux*) 13550a392d7eSmrg # Find out what ABI is being produced by ac_compile, and set linker 13560a392d7eSmrg # options accordingly. 13570a392d7eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13580a392d7eSmrg if AC_TRY_EVAL(ac_compile); then 13590a392d7eSmrg emul=elf 13600a392d7eSmrg case `/usr/bin/file conftest.$ac_objext` in 13610a392d7eSmrg *32-bit*) 13620a392d7eSmrg emul="${emul}32" 13630a392d7eSmrg ;; 13640a392d7eSmrg *64-bit*) 13650a392d7eSmrg emul="${emul}64" 13660a392d7eSmrg ;; 13670a392d7eSmrg esac 13680a392d7eSmrg case `/usr/bin/file conftest.$ac_objext` in 13690a392d7eSmrg *MSB*) 13700a392d7eSmrg emul="${emul}btsmip" 13710a392d7eSmrg ;; 13720a392d7eSmrg *LSB*) 13730a392d7eSmrg emul="${emul}ltsmip" 13740a392d7eSmrg ;; 13750a392d7eSmrg esac 13760a392d7eSmrg case `/usr/bin/file conftest.$ac_objext` in 13770a392d7eSmrg *N32*) 13780a392d7eSmrg emul="${emul}n32" 13790a392d7eSmrg ;; 13800a392d7eSmrg esac 13810a392d7eSmrg LD="${LD-ld} -m $emul" 13820a392d7eSmrg fi 13830a392d7eSmrg rm -rf conftest* 13840a392d7eSmrg ;; 13850a392d7eSmrg 13860a392d7eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 138754b44505Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13880a392d7eSmrg # Find out what ABI is being produced by ac_compile, and set linker 13890a392d7eSmrg # options accordingly. Note that the listed cases only cover the 13900a392d7eSmrg # situations where additional linker options are needed (such as when 13910a392d7eSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13920a392d7eSmrg # vice versa); the common cases where no linker options are needed do 13930a392d7eSmrg # not appear in the list. 139454b44505Smrg echo 'int i;' > conftest.$ac_ext 139554b44505Smrg if AC_TRY_EVAL(ac_compile); then 139654b44505Smrg case `/usr/bin/file conftest.o` in 139754b44505Smrg *32-bit*) 139854b44505Smrg case $host in 139954b44505Smrg x86_64-*kfreebsd*-gnu) 140054b44505Smrg LD="${LD-ld} -m elf_i386_fbsd" 140154b44505Smrg ;; 140254b44505Smrg x86_64-*linux*) 14030a392d7eSmrg case `/usr/bin/file conftest.o` in 14040a392d7eSmrg *x86-64*) 14050a392d7eSmrg LD="${LD-ld} -m elf32_x86_64" 14060a392d7eSmrg ;; 14070a392d7eSmrg *) 14080a392d7eSmrg LD="${LD-ld} -m elf_i386" 14090a392d7eSmrg ;; 14100a392d7eSmrg esac 14110a392d7eSmrg ;; 14120a392d7eSmrg powerpc64le-*linux*) 14130a392d7eSmrg LD="${LD-ld} -m elf32lppclinux" 141454b44505Smrg ;; 14150a392d7eSmrg powerpc64-*linux*) 141654b44505Smrg LD="${LD-ld} -m elf32ppclinux" 141754b44505Smrg ;; 141854b44505Smrg s390x-*linux*) 141954b44505Smrg LD="${LD-ld} -m elf_s390" 142054b44505Smrg ;; 142154b44505Smrg sparc64-*linux*) 142254b44505Smrg LD="${LD-ld} -m elf32_sparc" 142354b44505Smrg ;; 142454b44505Smrg esac 142554b44505Smrg ;; 142654b44505Smrg *64-bit*) 142754b44505Smrg case $host in 142854b44505Smrg x86_64-*kfreebsd*-gnu) 142954b44505Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 143054b44505Smrg ;; 143154b44505Smrg x86_64-*linux*) 143254b44505Smrg LD="${LD-ld} -m elf_x86_64" 143354b44505Smrg ;; 14340a392d7eSmrg powerpcle-*linux*) 14350a392d7eSmrg LD="${LD-ld} -m elf64lppc" 14360a392d7eSmrg ;; 14370a392d7eSmrg powerpc-*linux*) 143854b44505Smrg LD="${LD-ld} -m elf64ppc" 143954b44505Smrg ;; 144054b44505Smrg s390*-*linux*|s390*-*tpf*) 144154b44505Smrg LD="${LD-ld} -m elf64_s390" 144254b44505Smrg ;; 144354b44505Smrg sparc*-*linux*) 144454b44505Smrg LD="${LD-ld} -m elf64_sparc" 144554b44505Smrg ;; 144654b44505Smrg esac 144754b44505Smrg ;; 144854b44505Smrg esac 14494a041c5bSmacallan fi 145054b44505Smrg rm -rf conftest* 145154b44505Smrg ;; 14524a041c5bSmacallan 145354b44505Smrg*-*-sco3.2v5*) 145454b44505Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14550a392d7eSmrg SAVE_CFLAGS=$CFLAGS 145654b44505Smrg CFLAGS="$CFLAGS -belf" 145754b44505Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 145854b44505Smrg [AC_LANG_PUSH(C) 145954b44505Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 146054b44505Smrg AC_LANG_POP]) 14610a392d7eSmrg if test yes != "$lt_cv_cc_needs_belf"; then 146254b44505Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14630a392d7eSmrg CFLAGS=$SAVE_CFLAGS 146454b44505Smrg fi 146554b44505Smrg ;; 14660a392d7eSmrg*-*solaris*) 14670a392d7eSmrg # Find out what ABI is being produced by ac_compile, and set linker 14680a392d7eSmrg # options accordingly. 146954b44505Smrg echo 'int i;' > conftest.$ac_ext 147054b44505Smrg if AC_TRY_EVAL(ac_compile); then 147154b44505Smrg case `/usr/bin/file conftest.o` in 147254b44505Smrg *64-bit*) 147354b44505Smrg case $lt_cv_prog_gnu_ld in 14740a392d7eSmrg yes*) 14750a392d7eSmrg case $host in 14760a392d7eSmrg i?86-*-solaris*|x86_64-*-solaris*) 14770a392d7eSmrg LD="${LD-ld} -m elf_x86_64" 14780a392d7eSmrg ;; 14790a392d7eSmrg sparc*-*-solaris*) 14800a392d7eSmrg LD="${LD-ld} -m elf64_sparc" 14810a392d7eSmrg ;; 14820a392d7eSmrg esac 14830a392d7eSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14840a392d7eSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14850a392d7eSmrg LD=${LD-ld}_sol2 14860a392d7eSmrg fi 14870a392d7eSmrg ;; 148854b44505Smrg *) 148954b44505Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 149054b44505Smrg LD="${LD-ld} -64" 149154b44505Smrg fi 149254b44505Smrg ;; 149354b44505Smrg esac 149454b44505Smrg ;; 149554b44505Smrg esac 149654b44505Smrg fi 149754b44505Smrg rm -rf conftest* 149854b44505Smrg ;; 149954b44505Smrgesac 15004a041c5bSmacallan 15010a392d7eSmrgneed_locks=$enable_libtool_lock 150254b44505Smrg])# _LT_ENABLE_LOCK 15034a041c5bSmacallan 15044a041c5bSmacallan 150554b44505Smrg# _LT_PROG_AR 150654b44505Smrg# ----------- 150754b44505Smrgm4_defun([_LT_PROG_AR], 150854b44505Smrg[AC_CHECK_TOOLS(AR, [ar], false) 150954b44505Smrg: ${AR=ar} 151054b44505Smrg: ${AR_FLAGS=cru} 151154b44505Smrg_LT_DECL([], [AR], [1], [The archiver]) 151254b44505Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 151354b44505Smrg 151454b44505SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 151554b44505Smrg [lt_cv_ar_at_file=no 151654b44505Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 151754b44505Smrg [echo conftest.$ac_objext > conftest.lst 151854b44505Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 151954b44505Smrg AC_TRY_EVAL([lt_ar_try]) 15200a392d7eSmrg if test 0 -eq "$ac_status"; then 152154b44505Smrg # Ensure the archiver fails upon bogus file names. 152254b44505Smrg rm -f conftest.$ac_objext libconftest.a 152354b44505Smrg AC_TRY_EVAL([lt_ar_try]) 15240a392d7eSmrg if test 0 -ne "$ac_status"; then 152554b44505Smrg lt_cv_ar_at_file=@ 152654b44505Smrg fi 152754b44505Smrg fi 152854b44505Smrg rm -f conftest.* libconftest.a 152954b44505Smrg ]) 153054b44505Smrg ]) 15314a041c5bSmacallan 15320a392d7eSmrgif test no = "$lt_cv_ar_at_file"; then 153354b44505Smrg archiver_list_spec= 153454b44505Smrgelse 153554b44505Smrg archiver_list_spec=$lt_cv_ar_at_file 153654b44505Smrgfi 153754b44505Smrg_LT_DECL([], [archiver_list_spec], [1], 153854b44505Smrg [How to feed a file listing to the archiver]) 153954b44505Smrg])# _LT_PROG_AR 15404a041c5bSmacallan 15414a041c5bSmacallan 154254b44505Smrg# _LT_CMD_OLD_ARCHIVE 154354b44505Smrg# ------------------- 154454b44505Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 154554b44505Smrg[_LT_PROG_AR 15464a041c5bSmacallan 154754b44505SmrgAC_CHECK_TOOL(STRIP, strip, :) 154854b44505Smrgtest -z "$STRIP" && STRIP=: 154954b44505Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 155054b44505Smrg 155154b44505SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 155254b44505Smrgtest -z "$RANLIB" && RANLIB=: 155354b44505Smrg_LT_DECL([], [RANLIB], [1], 155454b44505Smrg [Commands used to install an old-style archive]) 155554b44505Smrg 155654b44505Smrg# Determine commands to create old-style static archives. 155754b44505Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 155854b44505Smrgold_postinstall_cmds='chmod 644 $oldlib' 155954b44505Smrgold_postuninstall_cmds= 156054b44505Smrg 156154b44505Smrgif test -n "$RANLIB"; then 156254b44505Smrg case $host_os in 15630a392d7eSmrg bitrig* | openbsd*) 15640a392d7eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 156554b44505Smrg ;; 156654b44505Smrg *) 15670a392d7eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 156854b44505Smrg ;; 15694a041c5bSmacallan esac 15700a392d7eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15714a041c5bSmacallanfi 15724a041c5bSmacallan 157354b44505Smrgcase $host_os in 157454b44505Smrg darwin*) 157554b44505Smrg lock_old_archive_extraction=yes ;; 157654b44505Smrg *) 157754b44505Smrg lock_old_archive_extraction=no ;; 157854b44505Smrgesac 157954b44505Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 158054b44505Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 158154b44505Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 158254b44505Smrg [Commands used to build an old-style archive]) 158354b44505Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 158454b44505Smrg [Whether to use a lock for old archive extraction]) 158554b44505Smrg])# _LT_CMD_OLD_ARCHIVE 15864a041c5bSmacallan 15874a041c5bSmacallan 158854b44505Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158954b44505Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 159054b44505Smrg# ---------------------------------------------------------------- 159154b44505Smrg# Check whether the given compiler option works 159254b44505SmrgAC_DEFUN([_LT_COMPILER_OPTION], 159354b44505Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 159454b44505Smrgm4_require([_LT_DECL_SED])dnl 159554b44505SmrgAC_CACHE_CHECK([$1], [$2], 159654b44505Smrg [$2=no 159754b44505Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 159854b44505Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15990a392d7eSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16004a041c5bSmacallan # Insert the option either (1) after the last *FLAGS variable, or 16014a041c5bSmacallan # (2) before a word containing "conftest.", or (3) at the end. 16024a041c5bSmacallan # Note that $ac_compile itself does not contain backslashes and begins 16034a041c5bSmacallan # with a dollar sign (not a hyphen), so the echo should work correctly. 160454b44505Smrg # The option is referenced via a variable to avoid confusing sed. 16054a041c5bSmacallan lt_compile=`echo "$ac_compile" | $SED \ 16064a041c5bSmacallan -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16074a041c5bSmacallan -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16084a041c5bSmacallan -e 's:$: $lt_compiler_flag:'` 160954b44505Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 161054b44505Smrg (eval "$lt_compile" 2>conftest.err) 16114a041c5bSmacallan ac_status=$? 161254b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 161354b44505Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161454b44505Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16154a041c5bSmacallan # The compiler can only warn and ignore the option if not recognized 161654b44505Smrg # So say no if there are warnings other than the usual output. 161754b44505Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161854b44505Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161954b44505Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 162054b44505Smrg $2=yes 16214a041c5bSmacallan fi 16224a041c5bSmacallan fi 162354b44505Smrg $RM conftest* 16244a041c5bSmacallan]) 16254a041c5bSmacallan 16260a392d7eSmrgif test yes = "[$]$2"; then 162754b44505Smrg m4_if([$5], , :, [$5]) 16284a041c5bSmacallanelse 162954b44505Smrg m4_if([$6], , :, [$6]) 16304a041c5bSmacallanfi 163154b44505Smrg])# _LT_COMPILER_OPTION 16324a041c5bSmacallan 163354b44505Smrg# Old name: 163454b44505SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 163554b44505Smrgdnl aclocal-1.4 backwards compatibility: 163654b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16374a041c5bSmacallan 163854b44505Smrg 163954b44505Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 164054b44505Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 164154b44505Smrg# ---------------------------------------------------- 164254b44505Smrg# Check whether the given linker option works 164354b44505SmrgAC_DEFUN([_LT_LINKER_OPTION], 164454b44505Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 164554b44505Smrgm4_require([_LT_DECL_SED])dnl 164654b44505SmrgAC_CACHE_CHECK([$1], [$2], 164754b44505Smrg [$2=no 16480a392d7eSmrg save_LDFLAGS=$LDFLAGS 164954b44505Smrg LDFLAGS="$LDFLAGS $3" 165054b44505Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 165154b44505Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 165254b44505Smrg # The linker can only warn and ignore the option if not recognized 165354b44505Smrg # So say no if there are warnings 165454b44505Smrg if test -s conftest.err; then 165554b44505Smrg # Append any errors to the config.log. 165654b44505Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 165754b44505Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165854b44505Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165954b44505Smrg if diff conftest.exp conftest.er2 >/dev/null; then 166054b44505Smrg $2=yes 166154b44505Smrg fi 166254b44505Smrg else 166354b44505Smrg $2=yes 166454b44505Smrg fi 166554b44505Smrg fi 166654b44505Smrg $RM -r conftest* 16670a392d7eSmrg LDFLAGS=$save_LDFLAGS 166854b44505Smrg]) 166954b44505Smrg 16700a392d7eSmrgif test yes = "[$]$2"; then 167154b44505Smrg m4_if([$4], , :, [$4]) 16724a041c5bSmacallanelse 167354b44505Smrg m4_if([$5], , :, [$5]) 16744a041c5bSmacallanfi 167554b44505Smrg])# _LT_LINKER_OPTION 16764a041c5bSmacallan 167754b44505Smrg# Old name: 167854b44505SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 167954b44505Smrgdnl aclocal-1.4 backwards compatibility: 168054b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16814a041c5bSmacallan 16824a041c5bSmacallan 168354b44505Smrg# LT_CMD_MAX_LEN 168454b44505Smrg#--------------- 168554b44505SmrgAC_DEFUN([LT_CMD_MAX_LEN], 168654b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 168754b44505Smrg# find the maximum length of command line arguments 168854b44505SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168954b44505SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 169054b44505Smrg i=0 16910a392d7eSmrg teststring=ABCD 16924a041c5bSmacallan 169354b44505Smrg case $build_os in 169454b44505Smrg msdosdjgpp*) 169554b44505Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169654b44505Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169754b44505Smrg # during glob expansion). Even if it were fixed, the result of this 169854b44505Smrg # check would be larger than it should be. 169954b44505Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 170054b44505Smrg ;; 17014a041c5bSmacallan 170254b44505Smrg gnu*) 170354b44505Smrg # Under GNU Hurd, this test is not required because there is 170454b44505Smrg # no limit to the length of command line arguments. 170554b44505Smrg # Libtool will interpret -1 as no limit whatsoever 170654b44505Smrg lt_cv_sys_max_cmd_len=-1; 170754b44505Smrg ;; 17084a041c5bSmacallan 170954b44505Smrg cygwin* | mingw* | cegcc*) 171054b44505Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 171154b44505Smrg # about 5 minutes as the teststring grows exponentially. 171254b44505Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171354b44505Smrg # you end up with a "frozen" computer, even though with patience 171454b44505Smrg # the test eventually succeeds (with a max line length of 256k). 171554b44505Smrg # Instead, let's just punt: use the minimum linelength reported by 171654b44505Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171754b44505Smrg lt_cv_sys_max_cmd_len=8192; 17184a041c5bSmacallan ;; 17194a041c5bSmacallan 172054b44505Smrg mint*) 172154b44505Smrg # On MiNT this can take a long time and run out of memory. 172254b44505Smrg lt_cv_sys_max_cmd_len=8192; 172354b44505Smrg ;; 17244a041c5bSmacallan 172554b44505Smrg amigaos*) 172654b44505Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172754b44505Smrg # So we just punt and use a minimum line length of 8192. 172854b44505Smrg lt_cv_sys_max_cmd_len=8192; 172954b44505Smrg ;; 173054b44505Smrg 17310a392d7eSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 173254b44505Smrg # This has been around since 386BSD, at least. Likely further. 173354b44505Smrg if test -x /sbin/sysctl; then 173454b44505Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173554b44505Smrg elif test -x /usr/sbin/sysctl; then 173654b44505Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17374a041c5bSmacallan else 173854b44505Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17394a041c5bSmacallan fi 174054b44505Smrg # And add a safety zone 174154b44505Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 174254b44505Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174354b44505Smrg ;; 17444a041c5bSmacallan 174554b44505Smrg interix*) 174654b44505Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174754b44505Smrg lt_cv_sys_max_cmd_len=196608 174854b44505Smrg ;; 17494a041c5bSmacallan 17500a392d7eSmrg os2*) 17510a392d7eSmrg # The test takes a long time on OS/2. 17520a392d7eSmrg lt_cv_sys_max_cmd_len=8192 17530a392d7eSmrg ;; 17540a392d7eSmrg 175554b44505Smrg osf*) 175654b44505Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175754b44505Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175854b44505Smrg # nice to cause kernel panics so lets avoid the loop below. 175954b44505Smrg # First set a reasonable default. 176054b44505Smrg lt_cv_sys_max_cmd_len=16384 176154b44505Smrg # 176254b44505Smrg if test -x /sbin/sysconfig; then 176354b44505Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176454b44505Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176554b44505Smrg esac 176654b44505Smrg fi 176754b44505Smrg ;; 176854b44505Smrg sco3.2v5*) 176954b44505Smrg lt_cv_sys_max_cmd_len=102400 177054b44505Smrg ;; 177154b44505Smrg sysv5* | sco5v6* | sysv4.2uw2*) 177254b44505Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177354b44505Smrg if test -n "$kargmax"; then 177454b44505Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17754a041c5bSmacallan else 177654b44505Smrg lt_cv_sys_max_cmd_len=32768 17774a041c5bSmacallan fi 177854b44505Smrg ;; 177954b44505Smrg *) 178054b44505Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17810a392d7eSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17820a392d7eSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 178354b44505Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 178454b44505Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 178554b44505Smrg else 178654b44505Smrg # Make teststring a little bigger before we do anything with it. 178754b44505Smrg # a 1K string should be a reasonable start. 17880a392d7eSmrg for i in 1 2 3 4 5 6 7 8; do 178954b44505Smrg teststring=$teststring$teststring 179054b44505Smrg done 179154b44505Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 179254b44505Smrg # If test is not a shell built-in, we'll probably end up computing a 179354b44505Smrg # maximum length that is only half of the actual maximum length, but 179454b44505Smrg # we can't tell. 17950a392d7eSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 179654b44505Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17970a392d7eSmrg test 17 != "$i" # 1/2 MB should be enough 179854b44505Smrg do 179954b44505Smrg i=`expr $i + 1` 180054b44505Smrg teststring=$teststring$teststring 180154b44505Smrg done 180254b44505Smrg # Only check the string length outside the loop. 180354b44505Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 180454b44505Smrg teststring= 180554b44505Smrg # Add a significant safety factor because C++ compilers can tack on 180654b44505Smrg # massive amounts of additional arguments before passing them to the 180754b44505Smrg # linker. It appears as though 1/2 is a usable value. 180854b44505Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 180954b44505Smrg fi 181054b44505Smrg ;; 181154b44505Smrg esac 181254b44505Smrg]) 18130a392d7eSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 181454b44505Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181554b44505Smrgelse 181654b44505Smrg AC_MSG_RESULT(none) 181754b44505Smrgfi 181854b44505Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 181954b44505Smrg_LT_DECL([], [max_cmd_len], [0], 182054b44505Smrg [What is the maximum length of a command?]) 182154b44505Smrg])# LT_CMD_MAX_LEN 18224a041c5bSmacallan 182354b44505Smrg# Old name: 182454b44505SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 182554b44505Smrgdnl aclocal-1.4 backwards compatibility: 182654b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18274a041c5bSmacallan 18284a041c5bSmacallan 182954b44505Smrg# _LT_HEADER_DLFCN 183054b44505Smrg# ---------------- 183154b44505Smrgm4_defun([_LT_HEADER_DLFCN], 183254b44505Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 183354b44505Smrg])# _LT_HEADER_DLFCN 18344a041c5bSmacallan 18354a041c5bSmacallan 183654b44505Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 183754b44505Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 183854b44505Smrg# ---------------------------------------------------------------- 183954b44505Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 184054b44505Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18410a392d7eSmrgif test yes = "$cross_compiling"; then : 184254b44505Smrg [$4] 184354b44505Smrgelse 184454b44505Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184554b44505Smrg lt_status=$lt_dlunknown 184654b44505Smrg cat > conftest.$ac_ext <<_LT_EOF 184754b44505Smrg[#line $LINENO "configure" 184854b44505Smrg#include "confdefs.h" 18494a041c5bSmacallan 185054b44505Smrg#if HAVE_DLFCN_H 185154b44505Smrg#include <dlfcn.h> 185254b44505Smrg#endif 18534a041c5bSmacallan 185454b44505Smrg#include <stdio.h> 18554a041c5bSmacallan 185654b44505Smrg#ifdef RTLD_GLOBAL 185754b44505Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185854b44505Smrg#else 185954b44505Smrg# ifdef DL_GLOBAL 186054b44505Smrg# define LT_DLGLOBAL DL_GLOBAL 186154b44505Smrg# else 186254b44505Smrg# define LT_DLGLOBAL 0 186354b44505Smrg# endif 186454b44505Smrg#endif 18654a041c5bSmacallan 186654b44505Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186754b44505Smrg find out it does not work in some platform. */ 186854b44505Smrg#ifndef LT_DLLAZY_OR_NOW 186954b44505Smrg# ifdef RTLD_LAZY 187054b44505Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 187154b44505Smrg# else 187254b44505Smrg# ifdef DL_LAZY 187354b44505Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187454b44505Smrg# else 187554b44505Smrg# ifdef RTLD_NOW 187654b44505Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187754b44505Smrg# else 187854b44505Smrg# ifdef DL_NOW 187954b44505Smrg# define LT_DLLAZY_OR_NOW DL_NOW 188054b44505Smrg# else 188154b44505Smrg# define LT_DLLAZY_OR_NOW 0 188254b44505Smrg# endif 188354b44505Smrg# endif 188454b44505Smrg# endif 188554b44505Smrg# endif 188654b44505Smrg#endif 18874a041c5bSmacallan 18880a392d7eSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 188954b44505Smrg correspondingly for the symbols needed. */ 18900a392d7eSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 189154b44505Smrgint fnord () __attribute__((visibility("default"))); 189254b44505Smrg#endif 18934a041c5bSmacallan 189454b44505Smrgint fnord () { return 42; } 189554b44505Smrgint main () 189654b44505Smrg{ 189754b44505Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189854b44505Smrg int status = $lt_dlunknown; 189954b44505Smrg 190054b44505Smrg if (self) 190154b44505Smrg { 190254b44505Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 190354b44505Smrg else 190454b44505Smrg { 190554b44505Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 190654b44505Smrg else puts (dlerror ()); 190754b44505Smrg } 190854b44505Smrg /* dlclose (self); */ 190954b44505Smrg } 19104a041c5bSmacallan else 191154b44505Smrg puts (dlerror ()); 191254b44505Smrg 191354b44505Smrg return status; 191454b44505Smrg}] 191554b44505Smrg_LT_EOF 19160a392d7eSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191754b44505Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191854b44505Smrg lt_status=$? 191954b44505Smrg case x$lt_status in 192054b44505Smrg x$lt_dlno_uscore) $1 ;; 192154b44505Smrg x$lt_dlneed_uscore) $2 ;; 192254b44505Smrg x$lt_dlunknown|x*) $3 ;; 19234a041c5bSmacallan esac 192454b44505Smrg else : 192554b44505Smrg # compilation failed 192654b44505Smrg $3 19274a041c5bSmacallan fi 192854b44505Smrgfi 192954b44505Smrgrm -fr conftest* 193054b44505Smrg])# _LT_TRY_DLOPEN_SELF 193154b44505Smrg 193254b44505Smrg 193354b44505Smrg# LT_SYS_DLOPEN_SELF 193454b44505Smrg# ------------------ 193554b44505SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 193654b44505Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19370a392d7eSmrgif test yes != "$enable_dlopen"; then 193854b44505Smrg enable_dlopen=unknown 193954b44505Smrg enable_dlopen_self=unknown 194054b44505Smrg enable_dlopen_self_static=unknown 194154b44505Smrgelse 194254b44505Smrg lt_cv_dlopen=no 194354b44505Smrg lt_cv_dlopen_libs= 194454b44505Smrg 19454a041c5bSmacallan case $host_os in 194654b44505Smrg beos*) 19470a392d7eSmrg lt_cv_dlopen=load_add_on 194854b44505Smrg lt_cv_dlopen_libs= 194954b44505Smrg lt_cv_dlopen_self=yes 19504a041c5bSmacallan ;; 195154b44505Smrg 195254b44505Smrg mingw* | pw32* | cegcc*) 19530a392d7eSmrg lt_cv_dlopen=LoadLibrary 195454b44505Smrg lt_cv_dlopen_libs= 19554a041c5bSmacallan ;; 195654b44505Smrg 195754b44505Smrg cygwin*) 19580a392d7eSmrg lt_cv_dlopen=dlopen 195954b44505Smrg lt_cv_dlopen_libs= 19604a041c5bSmacallan ;; 196154b44505Smrg 196254b44505Smrg darwin*) 19630a392d7eSmrg # if libdl is installed we need to link against it 196454b44505Smrg AC_CHECK_LIB([dl], [dlopen], 19650a392d7eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19660a392d7eSmrg lt_cv_dlopen=dyld 196754b44505Smrg lt_cv_dlopen_libs= 196854b44505Smrg lt_cv_dlopen_self=yes 196954b44505Smrg ]) 197054b44505Smrg ;; 197154b44505Smrg 19720a392d7eSmrg tpf*) 19730a392d7eSmrg # Don't try to run any link tests for TPF. We know it's impossible 19740a392d7eSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 19750a392d7eSmrg lt_cv_dlopen=dlopen 19760a392d7eSmrg lt_cv_dlopen_libs= 19770a392d7eSmrg lt_cv_dlopen_self=no 19780a392d7eSmrg ;; 19790a392d7eSmrg 198054b44505Smrg *) 198154b44505Smrg AC_CHECK_FUNC([shl_load], 19820a392d7eSmrg [lt_cv_dlopen=shl_load], 198354b44505Smrg [AC_CHECK_LIB([dld], [shl_load], 19840a392d7eSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198554b44505Smrg [AC_CHECK_FUNC([dlopen], 19860a392d7eSmrg [lt_cv_dlopen=dlopen], 198754b44505Smrg [AC_CHECK_LIB([dl], [dlopen], 19880a392d7eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198954b44505Smrg [AC_CHECK_LIB([svld], [dlopen], 19900a392d7eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 199154b44505Smrg [AC_CHECK_LIB([dld], [dld_link], 19920a392d7eSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199354b44505Smrg ]) 199454b44505Smrg ]) 199554b44505Smrg ]) 199654b44505Smrg ]) 199754b44505Smrg ]) 19984a041c5bSmacallan ;; 19994a041c5bSmacallan esac 20004a041c5bSmacallan 20010a392d7eSmrg if test no = "$lt_cv_dlopen"; then 200254b44505Smrg enable_dlopen=no 20030a392d7eSmrg else 20040a392d7eSmrg enable_dlopen=yes 200554b44505Smrg fi 20064a041c5bSmacallan 200754b44505Smrg case $lt_cv_dlopen in 200854b44505Smrg dlopen) 20090a392d7eSmrg save_CPPFLAGS=$CPPFLAGS 20100a392d7eSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 201154b44505Smrg 20120a392d7eSmrg save_LDFLAGS=$LDFLAGS 201354b44505Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 201454b44505Smrg 20150a392d7eSmrg save_LIBS=$LIBS 201654b44505Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 201754b44505Smrg 201854b44505Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201954b44505Smrg lt_cv_dlopen_self, [dnl 202054b44505Smrg _LT_TRY_DLOPEN_SELF( 202154b44505Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 202254b44505Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202354b44505Smrg ]) 202454b44505Smrg 20250a392d7eSmrg if test yes = "$lt_cv_dlopen_self"; then 202654b44505Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202754b44505Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 202854b44505Smrg lt_cv_dlopen_self_static, [dnl 202954b44505Smrg _LT_TRY_DLOPEN_SELF( 203054b44505Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 203154b44505Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 203254b44505Smrg ]) 20334a041c5bSmacallan fi 203454b44505Smrg 20350a392d7eSmrg CPPFLAGS=$save_CPPFLAGS 20360a392d7eSmrg LDFLAGS=$save_LDFLAGS 20370a392d7eSmrg LIBS=$save_LIBS 20384a041c5bSmacallan ;; 20394a041c5bSmacallan esac 20404a041c5bSmacallan 204154b44505Smrg case $lt_cv_dlopen_self in 204254b44505Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204354b44505Smrg *) enable_dlopen_self=unknown ;; 20444a041c5bSmacallan esac 204554b44505Smrg 204654b44505Smrg case $lt_cv_dlopen_self_static in 204754b44505Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204854b44505Smrg *) enable_dlopen_self_static=unknown ;; 20494a041c5bSmacallan esac 205054b44505Smrgfi 205154b44505Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 205254b44505Smrg [Whether dlopen is supported]) 205354b44505Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 205454b44505Smrg [Whether dlopen of programs is supported]) 205554b44505Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 205654b44505Smrg [Whether dlopen of statically linked programs is supported]) 205754b44505Smrg])# LT_SYS_DLOPEN_SELF 20584a041c5bSmacallan 205954b44505Smrg# Old name: 206054b44505SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 206154b44505Smrgdnl aclocal-1.4 backwards compatibility: 206254b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20634a041c5bSmacallan 20644a041c5bSmacallan 206554b44505Smrg# _LT_COMPILER_C_O([TAGNAME]) 206654b44505Smrg# --------------------------- 206754b44505Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 206854b44505Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 206954b44505Smrgm4_defun([_LT_COMPILER_C_O], 207054b44505Smrg[m4_require([_LT_DECL_SED])dnl 207154b44505Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 207254b44505Smrgm4_require([_LT_TAG_COMPILER])dnl 207354b44505SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 207454b44505Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 207554b44505Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 207654b44505Smrg $RM -r conftest 2>/dev/null 207754b44505Smrg mkdir conftest 207854b44505Smrg cd conftest 207954b44505Smrg mkdir out 208054b44505Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 208154b44505Smrg 208254b44505Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208354b44505Smrg # Insert the option either (1) after the last *FLAGS variable, or 208454b44505Smrg # (2) before a word containing "conftest.", or (3) at the end. 208554b44505Smrg # Note that $ac_compile itself does not contain backslashes and begins 208654b44505Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208754b44505Smrg lt_compile=`echo "$ac_compile" | $SED \ 208854b44505Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208954b44505Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 209054b44505Smrg -e 's:$: $lt_compiler_flag:'` 209154b44505Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 209254b44505Smrg (eval "$lt_compile" 2>out/conftest.err) 209354b44505Smrg ac_status=$? 209454b44505Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 209554b44505Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209654b44505Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209754b44505Smrg then 209854b44505Smrg # The compiler can only warn and ignore the option if not recognized 209954b44505Smrg # So say no if there are warnings 210054b44505Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 210154b44505Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 210254b44505Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 210354b44505Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210454b44505Smrg fi 210554b44505Smrg fi 210654b44505Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 210754b44505Smrg $RM conftest* 210854b44505Smrg # SGI C++ compiler will create directory out/ii_files/ for 210954b44505Smrg # template instantiation 211054b44505Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 211154b44505Smrg $RM out/* && rmdir out 211254b44505Smrg cd .. 211354b44505Smrg $RM -r conftest 211454b44505Smrg $RM conftest* 211554b44505Smrg]) 211654b44505Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 211754b44505Smrg [Does compiler simultaneously support -c and -o options?]) 211854b44505Smrg])# _LT_COMPILER_C_O 211954b44505Smrg 212054b44505Smrg 212154b44505Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 212254b44505Smrg# ---------------------------------- 212354b44505Smrg# Check to see if we can do hard links to lock some files if needed 212454b44505Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 212554b44505Smrg[m4_require([_LT_ENABLE_LOCK])dnl 212654b44505Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 212754b44505Smrg_LT_COMPILER_C_O([$1]) 212854b44505Smrg 21290a392d7eSmrghard_links=nottested 21300a392d7eSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 213154b44505Smrg # do not overwrite the value of need_locks provided by the user 213254b44505Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213354b44505Smrg hard_links=yes 213454b44505Smrg $RM conftest* 213554b44505Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213654b44505Smrg touch conftest.a 213754b44505Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213854b44505Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213954b44505Smrg AC_MSG_RESULT([$hard_links]) 21400a392d7eSmrg if test no = "$hard_links"; then 21410a392d7eSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 214254b44505Smrg need_locks=warn 21434a041c5bSmacallan fi 214454b44505Smrgelse 214554b44505Smrg need_locks=no 214654b44505Smrgfi 214754b44505Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 214854b44505Smrg])# _LT_COMPILER_FILE_LOCKS 21494a041c5bSmacallan 21504a041c5bSmacallan 215154b44505Smrg# _LT_CHECK_OBJDIR 215254b44505Smrg# ---------------- 215354b44505Smrgm4_defun([_LT_CHECK_OBJDIR], 215454b44505Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215554b44505Smrg[rm -f .libs 2>/dev/null 215654b44505Smrgmkdir .libs 2>/dev/null 215754b44505Smrgif test -d .libs; then 215854b44505Smrg lt_cv_objdir=.libs 215954b44505Smrgelse 216054b44505Smrg # MS-DOS does not allow filenames that begin with a dot. 216154b44505Smrg lt_cv_objdir=_libs 216254b44505Smrgfi 216354b44505Smrgrmdir .libs 2>/dev/null]) 216454b44505Smrgobjdir=$lt_cv_objdir 216554b44505Smrg_LT_DECL([], [objdir], [0], 216654b44505Smrg [The name of the directory that contains temporary libtool files])dnl 216754b44505Smrgm4_pattern_allow([LT_OBJDIR])dnl 21680a392d7eSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21690a392d7eSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 217054b44505Smrg])# _LT_CHECK_OBJDIR 217154b44505Smrg 217254b44505Smrg 217354b44505Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 217454b44505Smrg# -------------------------------------- 217554b44505Smrg# Check hardcoding attributes. 217654b44505Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217754b44505Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 217854b44505Smrg_LT_TAGVAR(hardcode_action, $1)= 217954b44505Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 218054b44505Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21810a392d7eSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 218254b44505Smrg 218354b44505Smrg # We can hardcode non-existent directories. 21840a392d7eSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218554b44505Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218654b44505Smrg # have to relink, otherwise we might link with an installed library 218754b44505Smrg # when we should be linking with a yet-to-be-installed one 21880a392d7eSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21890a392d7eSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 219054b44505Smrg # Linking always hardcodes the temporary library directory. 219154b44505Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21924a041c5bSmacallan else 219354b44505Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 219454b44505Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21954a041c5bSmacallan fi 219654b44505Smrgelse 219754b44505Smrg # We cannot hardcode anything, or else we can only hardcode existing 219854b44505Smrg # directories. 219954b44505Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 220054b44505Smrgfi 220154b44505SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22024a041c5bSmacallan 22030a392d7eSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22040a392d7eSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220554b44505Smrg # Fast installation is not supported 220654b44505Smrg enable_fast_install=no 22070a392d7eSmrgelif test yes = "$shlibpath_overrides_runpath" || 22080a392d7eSmrg test no = "$enable_shared"; then 220954b44505Smrg # Fast installation is not necessary 221054b44505Smrg enable_fast_install=needless 221154b44505Smrgfi 221254b44505Smrg_LT_TAGDECL([], [hardcode_action], [0], 221354b44505Smrg [How to hardcode a shared library path into an executable]) 221454b44505Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22154a041c5bSmacallan 22164a041c5bSmacallan 221754b44505Smrg# _LT_CMD_STRIPLIB 221854b44505Smrg# ---------------- 221954b44505Smrgm4_defun([_LT_CMD_STRIPLIB], 222054b44505Smrg[m4_require([_LT_DECL_EGREP]) 222154b44505Smrgstriplib= 222254b44505Smrgold_striplib= 222354b44505SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 222454b44505Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222554b44505Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 222654b44505Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 222754b44505Smrg AC_MSG_RESULT([yes]) 222854b44505Smrgelse 222954b44505Smrg# FIXME - insert some real tests, host_os isn't really good enough 22304a041c5bSmacallan case $host_os in 223154b44505Smrg darwin*) 22320a392d7eSmrg if test -n "$STRIP"; then 223354b44505Smrg striplib="$STRIP -x" 223454b44505Smrg old_striplib="$STRIP -S" 223554b44505Smrg AC_MSG_RESULT([yes]) 223654b44505Smrg else 223754b44505Smrg AC_MSG_RESULT([no]) 223854b44505Smrg fi 223954b44505Smrg ;; 224054b44505Smrg *) 224154b44505Smrg AC_MSG_RESULT([no]) 224254b44505Smrg ;; 22434a041c5bSmacallan esac 224454b44505Smrgfi 224554b44505Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 224654b44505Smrg_LT_DECL([], [striplib], [1]) 224754b44505Smrg])# _LT_CMD_STRIPLIB 22484a041c5bSmacallan 22494a041c5bSmacallan 22500a392d7eSmrg# _LT_PREPARE_MUNGE_PATH_LIST 22510a392d7eSmrg# --------------------------- 22520a392d7eSmrg# Make sure func_munge_path_list() is defined correctly. 22530a392d7eSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22540a392d7eSmrg[[# func_munge_path_list VARIABLE PATH 22550a392d7eSmrg# ----------------------------------- 22560a392d7eSmrg# VARIABLE is name of variable containing _space_ separated list of 22570a392d7eSmrg# directories to be munged by the contents of PATH, which is string 22580a392d7eSmrg# having a format: 22590a392d7eSmrg# "DIR[:DIR]:" 22600a392d7eSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 22610a392d7eSmrg# ":DIR[:DIR]" 22620a392d7eSmrg# string "DIR[ DIR]" will be appended to VARIABLE 22630a392d7eSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22640a392d7eSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22650a392d7eSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 22660a392d7eSmrg# "DIR[:DIR]" 22670a392d7eSmrg# VARIABLE will be replaced by "DIR[ DIR]" 22680a392d7eSmrgfunc_munge_path_list () 22690a392d7eSmrg{ 22700a392d7eSmrg case x@S|@2 in 22710a392d7eSmrg x) 22720a392d7eSmrg ;; 22730a392d7eSmrg *:) 22740a392d7eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22750a392d7eSmrg ;; 22760a392d7eSmrg x:*) 22770a392d7eSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22780a392d7eSmrg ;; 22790a392d7eSmrg *::*) 22800a392d7eSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22810a392d7eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22820a392d7eSmrg ;; 22830a392d7eSmrg *) 22840a392d7eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22850a392d7eSmrg ;; 22860a392d7eSmrg esac 22870a392d7eSmrg} 22880a392d7eSmrg]])# _LT_PREPARE_PATH_LIST 22890a392d7eSmrg 22900a392d7eSmrg 229154b44505Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229254b44505Smrg# ----------------------------- 229354b44505Smrg# PORTME Fill in your ld.so characteristics 229454b44505Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 229554b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 229654b44505Smrgm4_require([_LT_DECL_EGREP])dnl 229754b44505Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 229854b44505Smrgm4_require([_LT_DECL_OBJDUMP])dnl 229954b44505Smrgm4_require([_LT_DECL_SED])dnl 230054b44505Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23010a392d7eSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 230254b44505SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 230354b44505Smrgm4_if([$1], 230454b44505Smrg [], [ 23050a392d7eSmrgif test yes = "$GCC"; then 230654b44505Smrg case $host_os in 23070a392d7eSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23080a392d7eSmrg *) lt_awk_arg='/^libraries:/' ;; 230954b44505Smrg esac 231054b44505Smrg case $host_os in 23110a392d7eSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23120a392d7eSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 231354b44505Smrg esac 231454b44505Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 231554b44505Smrg case $lt_search_path_spec in 231654b44505Smrg *\;*) 231754b44505Smrg # if the path contains ";" then we assume it to be the separator 231854b44505Smrg # otherwise default to the standard path separator (i.e. ":") - it is 231954b44505Smrg # assumed that no part of a normal pathname contains ";" but that should 232054b44505Smrg # okay in the real world where ";" in dirpaths is itself problematic. 232154b44505Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 232254b44505Smrg ;; 232354b44505Smrg *) 232454b44505Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 232554b44505Smrg ;; 232654b44505Smrg esac 232754b44505Smrg # Ok, now we have the path, separated by spaces, we can step through it 23280a392d7eSmrg # and add multilib dir if necessary... 232954b44505Smrg lt_tmp_lt_search_path_spec= 23300a392d7eSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23310a392d7eSmrg # ...but if some path component already ends with the multilib dir we assume 23320a392d7eSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23330a392d7eSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23340a392d7eSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23350a392d7eSmrg lt_multi_os_dir= 23360a392d7eSmrg ;; 23370a392d7eSmrg esac 233854b44505Smrg for lt_sys_path in $lt_search_path_spec; do 23390a392d7eSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23400a392d7eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23410a392d7eSmrg elif test -n "$lt_multi_os_dir"; then 234254b44505Smrg test -d "$lt_sys_path" && \ 234354b44505Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 234454b44505Smrg fi 234554b44505Smrg done 234654b44505Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23470a392d7eSmrgBEGIN {RS = " "; FS = "/|\n";} { 23480a392d7eSmrg lt_foo = ""; 23490a392d7eSmrg lt_count = 0; 235054b44505Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 235154b44505Smrg if ($lt_i != "" && $lt_i != ".") { 235254b44505Smrg if ($lt_i == "..") { 235354b44505Smrg lt_count++; 235454b44505Smrg } else { 235554b44505Smrg if (lt_count == 0) { 23560a392d7eSmrg lt_foo = "/" $lt_i lt_foo; 235754b44505Smrg } else { 235854b44505Smrg lt_count--; 235954b44505Smrg } 236054b44505Smrg } 236154b44505Smrg } 236254b44505Smrg } 236354b44505Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 236454b44505Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 236554b44505Smrg}'` 236654b44505Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 236754b44505Smrg # for these hosts. 236854b44505Smrg case $host_os in 236954b44505Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23700a392d7eSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 237154b44505Smrg esac 237254b44505Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 237354b44505Smrgelse 237454b44505Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 237554b44505Smrgfi]) 237654b44505Smrglibrary_names_spec= 237754b44505Smrglibname_spec='lib$name' 237854b44505Smrgsoname_spec= 23790a392d7eSmrgshrext_cmds=.so 238054b44505Smrgpostinstall_cmds= 238154b44505Smrgpostuninstall_cmds= 238254b44505Smrgfinish_cmds= 238354b44505Smrgfinish_eval= 238454b44505Smrgshlibpath_var= 238554b44505Smrgshlibpath_overrides_runpath=unknown 238654b44505Smrgversion_type=none 238754b44505Smrgdynamic_linker="$host_os ld.so" 238854b44505Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 238954b44505Smrgneed_lib_prefix=unknown 239054b44505Smrghardcode_into_libs=no 23914a041c5bSmacallan 239254b44505Smrg# when you set need_version to no, make sure it does not cause -set_version 239354b44505Smrg# flags to be left without arguments 239454b44505Smrgneed_version=unknown 23954a041c5bSmacallan 23960a392d7eSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 23970a392d7eSmrg[User-defined run-time library search path.]) 23980a392d7eSmrg 239954b44505Smrgcase $host_os in 240054b44505Smrgaix3*) 24010a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 24020a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240354b44505Smrg shlibpath_var=LIBPATH 24044a041c5bSmacallan 240554b44505Smrg # AIX 3 has no versioning support, so we append a major version to the name. 24060a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 24074a041c5bSmacallan ;; 24084a041c5bSmacallan 240954b44505Smrgaix[[4-9]]*) 24100a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 24114a041c5bSmacallan need_lib_prefix=no 24124a041c5bSmacallan need_version=no 24134a041c5bSmacallan hardcode_into_libs=yes 24140a392d7eSmrg if test ia64 = "$host_cpu"; then 241554b44505Smrg # AIX 5 supports IA64 24160a392d7eSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 241754b44505Smrg shlibpath_var=LD_LIBRARY_PATH 24184a041c5bSmacallan else 241954b44505Smrg # With GCC up to 2.95.x, collect2 would create an import file 242054b44505Smrg # for dependence libraries. The import file would start with 24210a392d7eSmrg # the line '#! .'. This would cause the generated library to 24220a392d7eSmrg # depend on '.', always an invalid library. This was fixed in 242354b44505Smrg # development snapshots of GCC prior to 3.0. 24244a041c5bSmacallan case $host_os in 242554b44505Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 242654b44505Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 242754b44505Smrg echo ' yes ' 24280a392d7eSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 242954b44505Smrg : 243054b44505Smrg else 243154b44505Smrg can_build_shared=no 243254b44505Smrg fi 243354b44505Smrg ;; 24344a041c5bSmacallan esac 24350a392d7eSmrg # Using Import Files as archive members, it is possible to support 24360a392d7eSmrg # filename-based versioning of shared library archives on AIX. While 24370a392d7eSmrg # this would work for both with and without runtime linking, it will 24380a392d7eSmrg # prevent static linking of such archives. So we do filename-based 24390a392d7eSmrg # shared library versioning with .so extension only, which is used 24400a392d7eSmrg # when both runtime linking and shared linking is enabled. 24410a392d7eSmrg # Unfortunately, runtime linking may impact performance, so we do 24420a392d7eSmrg # not want this to be the default eventually. Also, we use the 24430a392d7eSmrg # versioned .so libs for executables only if there is the -brtl 24440a392d7eSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24450a392d7eSmrg # To allow for filename-based versioning support, we need to create 24460a392d7eSmrg # libNAME.so.V as an archive file, containing: 24470a392d7eSmrg # *) an Import File, referring to the versioned filename of the 24480a392d7eSmrg # archive as well as the shared archive member, telling the 24490a392d7eSmrg # bitwidth (32 or 64) of that shared object, and providing the 24500a392d7eSmrg # list of exported symbols of that shared object, eventually 24510a392d7eSmrg # decorated with the 'weak' keyword 24520a392d7eSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24530a392d7eSmrg # it being seen by the linker. 24540a392d7eSmrg # At run time we better use the real file rather than another symlink, 24550a392d7eSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24560a392d7eSmrg 24570a392d7eSmrg case $with_aix_soname,$aix_use_runtimelinking in 24580a392d7eSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 245954b44505Smrg # soname into executable. Probably we can add versioning support to 246054b44505Smrg # collect2, so additional links can be useful in future. 24610a392d7eSmrg aix,yes) # traditional libtool 24620a392d7eSmrg dynamic_linker='AIX unversionable lib.so' 246354b44505Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 246454b44505Smrg # instead of lib<name>.a to let people know that these are not 246554b44505Smrg # typical AIX shared libraries. 24660a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24670a392d7eSmrg ;; 24680a392d7eSmrg aix,no) # traditional AIX only 24690a392d7eSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247054b44505Smrg # We preserve .a as extension for shared libraries through AIX4.2 247154b44505Smrg # and later when we are not doing run time linking. 24720a392d7eSmrg library_names_spec='$libname$release.a $libname.a' 24730a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 24740a392d7eSmrg ;; 24750a392d7eSmrg svr4,*) # full svr4 only 24760a392d7eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24770a392d7eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24780a392d7eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24790a392d7eSmrg shlibpath_overrides_runpath=yes 24800a392d7eSmrg ;; 24810a392d7eSmrg *,yes) # both, prefer svr4 24820a392d7eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24830a392d7eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24840a392d7eSmrg # unpreferred sharedlib libNAME.a needs extra handling 24850a392d7eSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 24860a392d7eSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 24870a392d7eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24880a392d7eSmrg shlibpath_overrides_runpath=yes 24890a392d7eSmrg ;; 24900a392d7eSmrg *,no) # both, prefer aix 24910a392d7eSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 24920a392d7eSmrg library_names_spec='$libname$release.a $libname.a' 24930a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 24940a392d7eSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 24950a392d7eSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 24960a392d7eSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 24970a392d7eSmrg ;; 24980a392d7eSmrg esac 249954b44505Smrg shlibpath_var=LIBPATH 25004a041c5bSmacallan fi 25014a041c5bSmacallan ;; 25024a041c5bSmacallan 250354b44505Smrgamigaos*) 250454b44505Smrg case $host_cpu in 250554b44505Smrg powerpc) 250654b44505Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 250754b44505Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25080a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 250954b44505Smrg ;; 251054b44505Smrg m68k) 251154b44505Smrg library_names_spec='$libname.ixlibrary $libname.a' 251254b44505Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25130a392d7eSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 251454b44505Smrg ;; 251554b44505Smrg esac 251654b44505Smrg ;; 251754b44505Smrg 251854b44505Smrgbeos*) 25190a392d7eSmrg library_names_spec='$libname$shared_ext' 252054b44505Smrg dynamic_linker="$host_os ld.so" 252154b44505Smrg shlibpath_var=LIBRARY_PATH 252254b44505Smrg ;; 252354b44505Smrg 252454b44505Smrgbsdi[[45]]*) 25250a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 252654b44505Smrg need_version=no 25270a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25280a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 252954b44505Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25304a041c5bSmacallan shlibpath_var=LD_LIBRARY_PATH 253154b44505Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253254b44505Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253354b44505Smrg # the default ld.so.conf also contains /usr/contrib/lib and 253454b44505Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 253554b44505Smrg # libtool to hard-code these into programs 25364a041c5bSmacallan ;; 25374a041c5bSmacallan 253854b44505Smrgcygwin* | mingw* | pw32* | cegcc*) 253954b44505Smrg version_type=windows 25400a392d7eSmrg shrext_cmds=.dll 254154b44505Smrg need_version=no 254254b44505Smrg need_lib_prefix=no 25434a041c5bSmacallan 254454b44505Smrg case $GCC,$cc_basename in 254554b44505Smrg yes,*) 254654b44505Smrg # gcc 254754b44505Smrg library_names_spec='$libname.dll.a' 254854b44505Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25490a392d7eSmrg postinstall_cmds='base_file=`basename \$file`~ 25500a392d7eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255154b44505Smrg dldir=$destdir/`dirname \$dlpath`~ 255254b44505Smrg test -d \$dldir || mkdir -p \$dldir~ 255354b44505Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 255454b44505Smrg chmod a+x \$dldir/$dlname~ 255554b44505Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 255654b44505Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 255754b44505Smrg fi' 255854b44505Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 255954b44505Smrg dlpath=$dir/\$dldll~ 256054b44505Smrg $RM \$dlpath' 256154b44505Smrg shlibpath_overrides_runpath=yes 25624a041c5bSmacallan 256354b44505Smrg case $host_os in 256454b44505Smrg cygwin*) 256554b44505Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25660a392d7eSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 256754b44505Smrgm4_if([$1], [],[ 256854b44505Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 256954b44505Smrg ;; 257054b44505Smrg mingw* | cegcc*) 257154b44505Smrg # MinGW DLLs use traditional 'lib' prefix 25720a392d7eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257354b44505Smrg ;; 257454b44505Smrg pw32*) 257554b44505Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 25760a392d7eSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257754b44505Smrg ;; 25784a041c5bSmacallan esac 257954b44505Smrg dynamic_linker='Win32 ld.exe' 258054b44505Smrg ;; 25814a041c5bSmacallan 258254b44505Smrg *,cl*) 258354b44505Smrg # Native MSVC 258454b44505Smrg libname_spec='$name' 25850a392d7eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25860a392d7eSmrg library_names_spec='$libname.dll.lib' 25874a041c5bSmacallan 258854b44505Smrg case $build_os in 258954b44505Smrg mingw*) 259054b44505Smrg sys_lib_search_path_spec= 259154b44505Smrg lt_save_ifs=$IFS 259254b44505Smrg IFS=';' 259354b44505Smrg for lt_path in $LIB 259454b44505Smrg do 259554b44505Smrg IFS=$lt_save_ifs 259654b44505Smrg # Let DOS variable expansion print the short 8.3 style file name. 259754b44505Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 259854b44505Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25994a041c5bSmacallan done 260054b44505Smrg IFS=$lt_save_ifs 260154b44505Smrg # Convert to MSYS style. 260254b44505Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26034a041c5bSmacallan ;; 260454b44505Smrg cygwin*) 260554b44505Smrg # Convert to unix form, then to dos form, then back to unix form 260654b44505Smrg # but this time dos style (no spaces!) so that the unix form looks 260754b44505Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 260854b44505Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 260954b44505Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 261054b44505Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26114a041c5bSmacallan ;; 26124a041c5bSmacallan *) 26130a392d7eSmrg sys_lib_search_path_spec=$LIB 261454b44505Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 261554b44505Smrg # It is most probably a Windows format PATH. 261654b44505Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 261754b44505Smrg else 261854b44505Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261954b44505Smrg fi 262054b44505Smrg # FIXME: find the short name or the path components, as spaces are 262154b44505Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26224a041c5bSmacallan ;; 262354b44505Smrg esac 26244a041c5bSmacallan 262554b44505Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26260a392d7eSmrg postinstall_cmds='base_file=`basename \$file`~ 26270a392d7eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 262854b44505Smrg dldir=$destdir/`dirname \$dlpath`~ 262954b44505Smrg test -d \$dldir || mkdir -p \$dldir~ 263054b44505Smrg $install_prog $dir/$dlname \$dldir/$dlname' 263154b44505Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 263254b44505Smrg dlpath=$dir/\$dldll~ 263354b44505Smrg $RM \$dlpath' 263454b44505Smrg shlibpath_overrides_runpath=yes 263554b44505Smrg dynamic_linker='Win32 link.exe' 263654b44505Smrg ;; 26374a041c5bSmacallan 263854b44505Smrg *) 263954b44505Smrg # Assume MSVC wrapper 26400a392d7eSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 264154b44505Smrg dynamic_linker='Win32 ld.exe' 264254b44505Smrg ;; 264354b44505Smrg esac 264454b44505Smrg # FIXME: first we should search . and the directory the executable is in 264554b44505Smrg shlibpath_var=PATH 26464a041c5bSmacallan ;; 26474a041c5bSmacallan 264854b44505Smrgdarwin* | rhapsody*) 264954b44505Smrg dynamic_linker="$host_os dyld" 265054b44505Smrg version_type=darwin 265154b44505Smrg need_lib_prefix=no 265254b44505Smrg need_version=no 26530a392d7eSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 26540a392d7eSmrg soname_spec='$libname$release$major$shared_ext' 265554b44505Smrg shlibpath_overrides_runpath=yes 265654b44505Smrg shlibpath_var=DYLD_LIBRARY_PATH 265754b44505Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 265854b44505Smrgm4_if([$1], [],[ 265954b44505Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266054b44505Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266154b44505Smrg ;; 26624a041c5bSmacallan 266354b44505Smrgdgux*) 26640a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 266554b44505Smrg need_lib_prefix=no 266654b44505Smrg need_version=no 26670a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26680a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 266954b44505Smrg shlibpath_var=LD_LIBRARY_PATH 26704a041c5bSmacallan ;; 26714a041c5bSmacallan 267254b44505Smrgfreebsd* | dragonfly*) 267354b44505Smrg # DragonFly does not have aout. When/if they implement a new 267454b44505Smrg # versioning mechanism, adjust this. 267554b44505Smrg if test -x /usr/bin/objformat; then 267654b44505Smrg objformat=`/usr/bin/objformat` 26774a041c5bSmacallan else 267854b44505Smrg case $host_os in 26790a392d7eSmrg freebsd[[23]].*) objformat=aout ;; 268054b44505Smrg *) objformat=elf ;; 268154b44505Smrg esac 26824a041c5bSmacallan fi 268354b44505Smrg # Handle Gentoo/FreeBSD as it was Linux 268454b44505Smrg case $host_vendor in 268554b44505Smrg gentoo) 268654b44505Smrg version_type=linux ;; 268754b44505Smrg *) 268854b44505Smrg version_type=freebsd-$objformat ;; 268954b44505Smrg esac 26904a041c5bSmacallan 269154b44505Smrg case $version_type in 269254b44505Smrg freebsd-elf*) 26930a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26940a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 269554b44505Smrg need_version=no 269654b44505Smrg need_lib_prefix=no 26974a041c5bSmacallan ;; 269854b44505Smrg freebsd-*) 26990a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 270054b44505Smrg need_version=yes 270154b44505Smrg ;; 270254b44505Smrg linux) 270354b44505Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 270454b44505Smrg soname_spec='${libname}${release}${shared_ext}$major' 270554b44505Smrg need_lib_prefix=no 270654b44505Smrg need_version=no 270754b44505Smrg ;; 270854b44505Smrg esac 270954b44505Smrg shlibpath_var=LD_LIBRARY_PATH 271054b44505Smrg case $host_os in 27110a392d7eSmrg freebsd2.*) 271254b44505Smrg shlibpath_overrides_runpath=yes 27134a041c5bSmacallan ;; 271454b44505Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 271554b44505Smrg shlibpath_overrides_runpath=yes 271654b44505Smrg hardcode_into_libs=yes 27174a041c5bSmacallan ;; 271854b44505Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 271954b44505Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 272054b44505Smrg shlibpath_overrides_runpath=no 272154b44505Smrg hardcode_into_libs=yes 27224a041c5bSmacallan ;; 272354b44505Smrg *) # from 4.6 on, and DragonFly 272454b44505Smrg shlibpath_overrides_runpath=yes 272554b44505Smrg hardcode_into_libs=yes 272654b44505Smrg ;; 272754b44505Smrg esac 27284a041c5bSmacallan ;; 27294a041c5bSmacallan 273054b44505Smrghaiku*) 27310a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 273254b44505Smrg need_lib_prefix=no 273354b44505Smrg need_version=no 273454b44505Smrg dynamic_linker="$host_os runtime_loader" 27350a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27360a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 273754b44505Smrg shlibpath_var=LIBRARY_PATH 27380a392d7eSmrg shlibpath_overrides_runpath=no 273954b44505Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 274054b44505Smrg hardcode_into_libs=yes 27414a041c5bSmacallan ;; 27424a041c5bSmacallan 274354b44505Smrghpux9* | hpux10* | hpux11*) 274454b44505Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 274554b44505Smrg # link against other versions. 274654b44505Smrg version_type=sunos 274754b44505Smrg need_lib_prefix=no 274854b44505Smrg need_version=no 27494a041c5bSmacallan case $host_cpu in 27504a041c5bSmacallan ia64*) 275154b44505Smrg shrext_cmds='.so' 275254b44505Smrg hardcode_into_libs=yes 275354b44505Smrg dynamic_linker="$host_os dld.so" 275454b44505Smrg shlibpath_var=LD_LIBRARY_PATH 275554b44505Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27560a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27570a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 27580a392d7eSmrg if test 32 = "$HPUX_IA64_MODE"; then 275954b44505Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27600a392d7eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 276154b44505Smrg else 276254b44505Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27630a392d7eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 276454b44505Smrg fi 27654a041c5bSmacallan ;; 27664a041c5bSmacallan hppa*64*) 276754b44505Smrg shrext_cmds='.sl' 276854b44505Smrg hardcode_into_libs=yes 276954b44505Smrg dynamic_linker="$host_os dld.sl" 277054b44505Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 277154b44505Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27720a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27730a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 277454b44505Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 277554b44505Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27764a041c5bSmacallan ;; 27774a041c5bSmacallan *) 277854b44505Smrg shrext_cmds='.sl' 277954b44505Smrg dynamic_linker="$host_os dld.sl" 278054b44505Smrg shlibpath_var=SHLIB_PATH 278154b44505Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27820a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27830a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 27844a041c5bSmacallan ;; 27854a041c5bSmacallan esac 278654b44505Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 278754b44505Smrg postinstall_cmds='chmod 555 $lib' 278854b44505Smrg # or fails outright, so override atomically: 278954b44505Smrg install_override_mode=555 27904a041c5bSmacallan ;; 27914a041c5bSmacallan 27924a041c5bSmacallaninterix[[3-9]]*) 27930a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 279454b44505Smrg need_lib_prefix=no 279554b44505Smrg need_version=no 27960a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27970a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 279854b44505Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 279954b44505Smrg shlibpath_var=LD_LIBRARY_PATH 280054b44505Smrg shlibpath_overrides_runpath=no 280154b44505Smrg hardcode_into_libs=yes 28024a041c5bSmacallan ;; 28034a041c5bSmacallan 28044a041c5bSmacallanirix5* | irix6* | nonstopux*) 280554b44505Smrg case $host_os in 280654b44505Smrg nonstopux*) version_type=nonstopux ;; 280754b44505Smrg *) 28080a392d7eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 28090a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 281054b44505Smrg else 281154b44505Smrg version_type=irix 281254b44505Smrg fi ;; 28134a041c5bSmacallan esac 281454b44505Smrg need_lib_prefix=no 281554b44505Smrg need_version=no 28160a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 28170a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 281854b44505Smrg case $host_os in 281954b44505Smrg irix5* | nonstopux*) 282054b44505Smrg libsuff= shlibsuff= 282154b44505Smrg ;; 282254b44505Smrg *) 282354b44505Smrg case $LD in # libtool.m4 will add one of these switches to LD 282454b44505Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 282554b44505Smrg libsuff= shlibsuff= libmagic=32-bit;; 282654b44505Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 282754b44505Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 282854b44505Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 282954b44505Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 283054b44505Smrg *) libsuff= shlibsuff= libmagic=never-match;; 283154b44505Smrg esac 283254b44505Smrg ;; 283354b44505Smrg esac 283454b44505Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 283554b44505Smrg shlibpath_overrides_runpath=no 28360a392d7eSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28370a392d7eSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 283854b44505Smrg hardcode_into_libs=yes 283954b44505Smrg ;; 284054b44505Smrg 284154b44505Smrg# No shared lib support for Linux oldld, aout, or coff. 284254b44505Smrglinux*oldld* | linux*aout* | linux*coff*) 284354b44505Smrg dynamic_linker=no 28444a041c5bSmacallan ;; 28454a041c5bSmacallan 28460a392d7eSmrglinux*android*) 28470a392d7eSmrg version_type=none # Android doesn't support versioned libraries. 284854b44505Smrg need_lib_prefix=no 284954b44505Smrg need_version=no 28500a392d7eSmrg library_names_spec='$libname$release$shared_ext' 28510a392d7eSmrg soname_spec='$libname$release$shared_ext' 28520a392d7eSmrg finish_cmds= 28530a392d7eSmrg shlibpath_var=LD_LIBRARY_PATH 28540a392d7eSmrg shlibpath_overrides_runpath=yes 28550a392d7eSmrg 28560a392d7eSmrg # This implies no fast_install, which is unacceptable. 28570a392d7eSmrg # Some rework will be needed to allow for fast_install 28580a392d7eSmrg # before this can be enabled. 28590a392d7eSmrg hardcode_into_libs=yes 28600a392d7eSmrg 28610a392d7eSmrg dynamic_linker='Android linker' 28620a392d7eSmrg # Don't embed -rpath directories since the linker doesn't support them. 28630a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28640a392d7eSmrg ;; 28650a392d7eSmrg 28660a392d7eSmrg# This must be glibc/ELF. 28670a392d7eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28680a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 28690a392d7eSmrg need_lib_prefix=no 28700a392d7eSmrg need_version=no 28710a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28720a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 287354b44505Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 287454b44505Smrg shlibpath_var=LD_LIBRARY_PATH 287554b44505Smrg shlibpath_overrides_runpath=no 287654b44505Smrg 287754b44505Smrg # Some binutils ld are patched to set DT_RUNPATH 287854b44505Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 287954b44505Smrg [lt_cv_shlibpath_overrides_runpath=no 288054b44505Smrg save_LDFLAGS=$LDFLAGS 288154b44505Smrg save_libdir=$libdir 288254b44505Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 288354b44505Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 288454b44505Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 288554b44505Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 288654b44505Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 288754b44505Smrg LDFLAGS=$save_LDFLAGS 288854b44505Smrg libdir=$save_libdir 288954b44505Smrg ]) 289054b44505Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 289154b44505Smrg 289254b44505Smrg # This implies no fast_install, which is unacceptable. 289354b44505Smrg # Some rework will be needed to allow for fast_install 289454b44505Smrg # before this can be enabled. 289554b44505Smrg hardcode_into_libs=yes 289654b44505Smrg 28970a392d7eSmrg # Ideally, we could use ldconfig to report *all* directores which are 28980a392d7eSmrg # searched for libraries, however this is still not possible. Aside from not 28990a392d7eSmrg # being certain /sbin/ldconfig is available, command 29000a392d7eSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29010a392d7eSmrg # even though it is searched at run-time. Try to do the best guess by 29020a392d7eSmrg # appending ld.so.conf contents (and includes) to the search path. 290354b44505Smrg if test -f /etc/ld.so.conf; then 290454b44505Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 290554b44505Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 290654b44505Smrg fi 290754b44505Smrg 290854b44505Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 290954b44505Smrg # powerpc, because MkLinux only supported shared libraries with the 291054b44505Smrg # GNU dynamic linker. Since this was broken with cross compilers, 291154b44505Smrg # most powerpc-linux boxes support dynamic linking these days and 291254b44505Smrg # people can always --disable-shared, the test was removed, and we 291354b44505Smrg # assume the GNU/Linux dynamic linker is in use. 291454b44505Smrg dynamic_linker='GNU/Linux ld.so' 29154a041c5bSmacallan ;; 29164a041c5bSmacallan 29174a041c5bSmacallannetbsd*) 291854b44505Smrg version_type=sunos 291954b44505Smrg need_lib_prefix=no 292054b44505Smrg need_version=no 292154b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29220a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 292354b44505Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 292454b44505Smrg dynamic_linker='NetBSD (a.out) ld.so' 29254a041c5bSmacallan else 29260a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29270a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 292854b44505Smrg dynamic_linker='NetBSD ld.elf_so' 29294a041c5bSmacallan fi 293054b44505Smrg shlibpath_var=LD_LIBRARY_PATH 293154b44505Smrg shlibpath_overrides_runpath=yes 293254b44505Smrg hardcode_into_libs=yes 29334a041c5bSmacallan ;; 29344a041c5bSmacallan 293554b44505Smrgnewsos6) 29360a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 29370a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293854b44505Smrg shlibpath_var=LD_LIBRARY_PATH 293954b44505Smrg shlibpath_overrides_runpath=yes 29404a041c5bSmacallan ;; 29414a041c5bSmacallan 294254b44505Smrg*nto* | *qnx*) 294354b44505Smrg version_type=qnx 294454b44505Smrg need_lib_prefix=no 294554b44505Smrg need_version=no 29460a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29470a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 294854b44505Smrg shlibpath_var=LD_LIBRARY_PATH 294954b44505Smrg shlibpath_overrides_runpath=no 295054b44505Smrg hardcode_into_libs=yes 295154b44505Smrg dynamic_linker='ldqnx.so' 29524a041c5bSmacallan ;; 29534a041c5bSmacallan 29540a392d7eSmrgopenbsd* | bitrig*) 295554b44505Smrg version_type=sunos 29560a392d7eSmrg sys_lib_dlsearch_path_spec=/usr/lib 295754b44505Smrg need_lib_prefix=no 29580a392d7eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29590a392d7eSmrg need_version=no 29604a041c5bSmacallan else 29610a392d7eSmrg need_version=yes 29624a041c5bSmacallan fi 29630a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29640a392d7eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29650a392d7eSmrg shlibpath_var=LD_LIBRARY_PATH 29660a392d7eSmrg shlibpath_overrides_runpath=yes 29674a041c5bSmacallan ;; 29684a041c5bSmacallan 296954b44505Smrgos2*) 297054b44505Smrg libname_spec='$name' 29710a392d7eSmrg version_type=windows 29720a392d7eSmrg shrext_cmds=.dll 29730a392d7eSmrg need_version=no 297454b44505Smrg need_lib_prefix=no 29750a392d7eSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29760a392d7eSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29770a392d7eSmrg v=$($ECHO $release$versuffix | tr -d .-); 29780a392d7eSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29790a392d7eSmrg $ECHO $n$v`$shared_ext' 29800a392d7eSmrg library_names_spec='${libname}_dll.$libext' 298154b44505Smrg dynamic_linker='OS/2 ld.exe' 29820a392d7eSmrg shlibpath_var=BEGINLIBPATH 29830a392d7eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29840a392d7eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29850a392d7eSmrg postinstall_cmds='base_file=`basename \$file`~ 29860a392d7eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29870a392d7eSmrg dldir=$destdir/`dirname \$dlpath`~ 29880a392d7eSmrg test -d \$dldir || mkdir -p \$dldir~ 29890a392d7eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 29900a392d7eSmrg chmod a+x \$dldir/$dlname~ 29910a392d7eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29920a392d7eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29930a392d7eSmrg fi' 29940a392d7eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 29950a392d7eSmrg dlpath=$dir/\$dldll~ 29960a392d7eSmrg $RM \$dlpath' 299754b44505Smrg ;; 299854b44505Smrg 29994a041c5bSmacallanosf3* | osf4* | osf5*) 300054b44505Smrg version_type=osf 300154b44505Smrg need_lib_prefix=no 300254b44505Smrg need_version=no 30030a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 30040a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 300554b44505Smrg shlibpath_var=LD_LIBRARY_PATH 300654b44505Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30070a392d7eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30084a041c5bSmacallan ;; 30094a041c5bSmacallan 30104a041c5bSmacallanrdos*) 301154b44505Smrg dynamic_linker=no 30124a041c5bSmacallan ;; 30134a041c5bSmacallan 30144a041c5bSmacallansolaris*) 30150a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 301654b44505Smrg need_lib_prefix=no 301754b44505Smrg need_version=no 30180a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30190a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 302054b44505Smrg shlibpath_var=LD_LIBRARY_PATH 302154b44505Smrg shlibpath_overrides_runpath=yes 302254b44505Smrg hardcode_into_libs=yes 302354b44505Smrg # ldd complains unless libraries are executable 302454b44505Smrg postinstall_cmds='chmod +x $lib' 302554b44505Smrg ;; 302654b44505Smrg 302754b44505Smrgsunos4*) 302854b44505Smrg version_type=sunos 30290a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 303054b44505Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 303154b44505Smrg shlibpath_var=LD_LIBRARY_PATH 303254b44505Smrg shlibpath_overrides_runpath=yes 30330a392d7eSmrg if test yes = "$with_gnu_ld"; then 303454b44505Smrg need_lib_prefix=no 303554b44505Smrg fi 303654b44505Smrg need_version=yes 30374a041c5bSmacallan ;; 30384a041c5bSmacallan 30394a041c5bSmacallansysv4 | sysv4.3*) 30400a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 30410a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30420a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 304354b44505Smrg shlibpath_var=LD_LIBRARY_PATH 30444a041c5bSmacallan case $host_vendor in 304554b44505Smrg sni) 304654b44505Smrg shlibpath_overrides_runpath=no 304754b44505Smrg need_lib_prefix=no 304854b44505Smrg runpath_var=LD_RUN_PATH 304954b44505Smrg ;; 305054b44505Smrg siemens) 305154b44505Smrg need_lib_prefix=no 305254b44505Smrg ;; 305354b44505Smrg motorola) 305454b44505Smrg need_lib_prefix=no 305554b44505Smrg need_version=no 305654b44505Smrg shlibpath_overrides_runpath=no 305754b44505Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 305854b44505Smrg ;; 30594a041c5bSmacallan esac 30604a041c5bSmacallan ;; 30614a041c5bSmacallan 306254b44505Smrgsysv4*MP*) 30630a392d7eSmrg if test -d /usr/nec; then 30640a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 30650a392d7eSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30660a392d7eSmrg soname_spec='$libname$shared_ext.$major' 306754b44505Smrg shlibpath_var=LD_LIBRARY_PATH 306854b44505Smrg fi 30694a041c5bSmacallan ;; 30704a041c5bSmacallan 307154b44505Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30720a392d7eSmrg version_type=sco 307354b44505Smrg need_lib_prefix=no 307454b44505Smrg need_version=no 30750a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30760a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 307754b44505Smrg shlibpath_var=LD_LIBRARY_PATH 307854b44505Smrg shlibpath_overrides_runpath=yes 307954b44505Smrg hardcode_into_libs=yes 30800a392d7eSmrg if test yes = "$with_gnu_ld"; then 308154b44505Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 308254b44505Smrg else 308354b44505Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 308454b44505Smrg case $host_os in 308554b44505Smrg sco3.2v5*) 308654b44505Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 308754b44505Smrg ;; 308854b44505Smrg esac 308954b44505Smrg fi 309054b44505Smrg sys_lib_dlsearch_path_spec='/usr/lib' 309154b44505Smrg ;; 30924a041c5bSmacallan 309354b44505Smrgtpf*) 309454b44505Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30950a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 309654b44505Smrg need_lib_prefix=no 309754b44505Smrg need_version=no 30980a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 309954b44505Smrg shlibpath_var=LD_LIBRARY_PATH 310054b44505Smrg shlibpath_overrides_runpath=no 310154b44505Smrg hardcode_into_libs=yes 31024a041c5bSmacallan ;; 310354b44505Smrg 310454b44505Smrguts4*) 31050a392d7eSmrg version_type=linux # correct to gnu/linux during the next big refactor 31060a392d7eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31070a392d7eSmrg soname_spec='$libname$release$shared_ext$major' 310854b44505Smrg shlibpath_var=LD_LIBRARY_PATH 31094a041c5bSmacallan ;; 311054b44505Smrg 31114a041c5bSmacallan*) 311254b44505Smrg dynamic_linker=no 31134a041c5bSmacallan ;; 31144a041c5bSmacallanesac 311554b44505SmrgAC_MSG_RESULT([$dynamic_linker]) 31160a392d7eSmrgtest no = "$dynamic_linker" && can_build_shared=no 31174a041c5bSmacallan 311854b44505Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31190a392d7eSmrgif test yes = "$GCC"; then 312054b44505Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 312154b44505Smrgfi 31224a041c5bSmacallan 31230a392d7eSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31240a392d7eSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 312554b44505Smrgfi 31260a392d7eSmrg 31270a392d7eSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31280a392d7eSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 312954b44505Smrgfi 31304a041c5bSmacallan 31310a392d7eSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31320a392d7eSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31330a392d7eSmrg 31340a392d7eSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31350a392d7eSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31360a392d7eSmrg 31370a392d7eSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31380a392d7eSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31390a392d7eSmrg 314054b44505Smrg_LT_DECL([], [variables_saved_for_relink], [1], 314154b44505Smrg [Variables whose values should be saved in libtool wrapper scripts and 314254b44505Smrg restored at link time]) 314354b44505Smrg_LT_DECL([], [need_lib_prefix], [0], 314454b44505Smrg [Do we need the "lib" prefix for modules?]) 314554b44505Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 314654b44505Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 314754b44505Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 314854b44505Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 314954b44505Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 315054b44505Smrg [Is shlibpath searched before the hard-coded library search path?]) 315154b44505Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 315254b44505Smrg_LT_DECL([], [library_names_spec], [1], 315354b44505Smrg [[List of archive names. First name is the real one, the rest are links. 315454b44505Smrg The last name is the one that the linker finds with -lNAME]]) 315554b44505Smrg_LT_DECL([], [soname_spec], [1], 315654b44505Smrg [[The coded name of the library, if different from the real name]]) 315754b44505Smrg_LT_DECL([], [install_override_mode], [1], 315854b44505Smrg [Permission mode override for installation of shared libraries]) 315954b44505Smrg_LT_DECL([], [postinstall_cmds], [2], 316054b44505Smrg [Command to use after installation of a shared archive]) 316154b44505Smrg_LT_DECL([], [postuninstall_cmds], [2], 316254b44505Smrg [Command to use after uninstallation of a shared archive]) 316354b44505Smrg_LT_DECL([], [finish_cmds], [2], 316454b44505Smrg [Commands used to finish a libtool library installation in a directory]) 316554b44505Smrg_LT_DECL([], [finish_eval], [1], 316654b44505Smrg [[As "finish_cmds", except a single script fragment to be evaled but 316754b44505Smrg not shown]]) 316854b44505Smrg_LT_DECL([], [hardcode_into_libs], [0], 316954b44505Smrg [Whether we should hardcode library paths into libraries]) 317054b44505Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 317154b44505Smrg [Compile-time system search path for libraries]) 31720a392d7eSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31730a392d7eSmrg [Detected run-time system search path for libraries]) 31740a392d7eSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31750a392d7eSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 317654b44505Smrg])# _LT_SYS_DYNAMIC_LINKER 317754b44505Smrg 317854b44505Smrg 317954b44505Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 318054b44505Smrg# -------------------------- 31810a392d7eSmrg# find a file program that can recognize shared library 318254b44505SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 318354b44505Smrg[m4_require([_LT_DECL_EGREP])dnl 318454b44505SmrgAC_MSG_CHECKING([for $1]) 318554b44505SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 318654b44505Smrg[case $MAGIC_CMD in 318754b44505Smrg[[\\/*] | ?:[\\/]*]) 31880a392d7eSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 318954b44505Smrg ;; 319054b44505Smrg*) 31910a392d7eSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 31920a392d7eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 319354b44505Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 319454b44505Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 319554b44505Smrgdnl not every word. This closes a longstanding sh security hole. 319654b44505Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 319754b44505Smrg for ac_dir in $ac_dummy; do 31980a392d7eSmrg IFS=$lt_save_ifs 319954b44505Smrg test -z "$ac_dir" && ac_dir=. 32000a392d7eSmrg if test -f "$ac_dir/$1"; then 32010a392d7eSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 320254b44505Smrg if test -n "$file_magic_test_file"; then 320354b44505Smrg case $deplibs_check_method in 320454b44505Smrg "file_magic "*) 320554b44505Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32060a392d7eSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 320754b44505Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 320854b44505Smrg $EGREP "$file_magic_regex" > /dev/null; then 320954b44505Smrg : 321054b44505Smrg else 321154b44505Smrg cat <<_LT_EOF 1>&2 32124a041c5bSmacallan 321354b44505Smrg*** Warning: the command libtool uses to detect shared libraries, 321454b44505Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 321554b44505Smrg*** The result is that libtool may fail to recognize shared libraries 321654b44505Smrg*** as such. This will affect the creation of libtool libraries that 321754b44505Smrg*** depend on shared libraries, but programs linked with such libtool 321854b44505Smrg*** libraries will work regardless of this problem. Nevertheless, you 321954b44505Smrg*** may want to report the problem to your system manager and/or to 322054b44505Smrg*** bug-libtool@gnu.org 32214a041c5bSmacallan 322254b44505Smrg_LT_EOF 322354b44505Smrg fi ;; 322454b44505Smrg esac 322554b44505Smrg fi 322654b44505Smrg break 322754b44505Smrg fi 322854b44505Smrg done 32290a392d7eSmrg IFS=$lt_save_ifs 32300a392d7eSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 323154b44505Smrg ;; 323254b44505Smrgesac]) 32330a392d7eSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 323454b44505Smrgif test -n "$MAGIC_CMD"; then 323554b44505Smrg AC_MSG_RESULT($MAGIC_CMD) 323654b44505Smrgelse 323754b44505Smrg AC_MSG_RESULT(no) 32384a041c5bSmacallanfi 323954b44505Smrg_LT_DECL([], [MAGIC_CMD], [0], 324054b44505Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 324154b44505Smrg])# _LT_PATH_TOOL_PREFIX 32424a041c5bSmacallan 324354b44505Smrg# Old name: 324454b44505SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 324554b44505Smrgdnl aclocal-1.4 backwards compatibility: 324654b44505Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32474a041c5bSmacallan 32484a041c5bSmacallan 324954b44505Smrg# _LT_PATH_MAGIC 32504a041c5bSmacallan# -------------- 32510a392d7eSmrg# find a file program that can recognize a shared library 325254b44505Smrgm4_defun([_LT_PATH_MAGIC], 325354b44505Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 325454b44505Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 325554b44505Smrg if test -n "$ac_tool_prefix"; then 325654b44505Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 325754b44505Smrg else 325854b44505Smrg MAGIC_CMD=: 325954b44505Smrg fi 326054b44505Smrgfi 326154b44505Smrg])# _LT_PATH_MAGIC 32624a041c5bSmacallan 32634a041c5bSmacallan 326454b44505Smrg# LT_PATH_LD 326554b44505Smrg# ---------- 326654b44505Smrg# find the pathname to the GNU or non-GNU linker 326754b44505SmrgAC_DEFUN([LT_PATH_LD], 326854b44505Smrg[AC_REQUIRE([AC_PROG_CC])dnl 326954b44505SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 327054b44505SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 327154b44505Smrgm4_require([_LT_DECL_SED])dnl 327254b44505Smrgm4_require([_LT_DECL_EGREP])dnl 327354b44505Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32744a041c5bSmacallan 327554b44505SmrgAC_ARG_WITH([gnu-ld], 327654b44505Smrg [AS_HELP_STRING([--with-gnu-ld], 327754b44505Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32780a392d7eSmrg [test no = "$withval" || with_gnu_ld=yes], 327954b44505Smrg [with_gnu_ld=no])dnl 32804a041c5bSmacallan 328154b44505Smrgac_prog=ld 32820a392d7eSmrgif test yes = "$GCC"; then 328354b44505Smrg # Check if gcc -print-prog-name=ld gives a path. 328454b44505Smrg AC_MSG_CHECKING([for ld used by $CC]) 328554b44505Smrg case $host in 328654b44505Smrg *-*-mingw*) 32870a392d7eSmrg # gcc leaves a trailing carriage return, which upsets mingw 328854b44505Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 328954b44505Smrg *) 329054b44505Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 329154b44505Smrg esac 329254b44505Smrg case $ac_prog in 329354b44505Smrg # Accept absolute paths. 329454b44505Smrg [[\\/]]* | ?:[[\\/]]*) 329554b44505Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 329654b44505Smrg # Canonicalize the pathname of ld 329754b44505Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 329854b44505Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 329954b44505Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 330054b44505Smrg done 33010a392d7eSmrg test -z "$LD" && LD=$ac_prog 330254b44505Smrg ;; 330354b44505Smrg "") 330454b44505Smrg # If it fails, then pretend we aren't using GCC. 330554b44505Smrg ac_prog=ld 330654b44505Smrg ;; 330754b44505Smrg *) 330854b44505Smrg # If it is relative, then search for the first ld in PATH. 330954b44505Smrg with_gnu_ld=unknown 331054b44505Smrg ;; 331154b44505Smrg esac 33120a392d7eSmrgelif test yes = "$with_gnu_ld"; then 331354b44505Smrg AC_MSG_CHECKING([for GNU ld]) 331454b44505Smrgelse 331554b44505Smrg AC_MSG_CHECKING([for non-GNU ld]) 331654b44505Smrgfi 331754b44505SmrgAC_CACHE_VAL(lt_cv_path_LD, 331854b44505Smrg[if test -z "$LD"; then 33190a392d7eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 332054b44505Smrg for ac_dir in $PATH; do 33210a392d7eSmrg IFS=$lt_save_ifs 332254b44505Smrg test -z "$ac_dir" && ac_dir=. 332354b44505Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33240a392d7eSmrg lt_cv_path_LD=$ac_dir/$ac_prog 332554b44505Smrg # Check to see if the program is GNU ld. I'd rather use --version, 332654b44505Smrg # but apparently some variants of GNU ld only accept -v. 332754b44505Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 332854b44505Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 332954b44505Smrg *GNU* | *'with BFD'*) 33300a392d7eSmrg test no != "$with_gnu_ld" && break 333154b44505Smrg ;; 333254b44505Smrg *) 33330a392d7eSmrg test yes != "$with_gnu_ld" && break 333454b44505Smrg ;; 333554b44505Smrg esac 333654b44505Smrg fi 333754b44505Smrg done 33380a392d7eSmrg IFS=$lt_save_ifs 333954b44505Smrgelse 33400a392d7eSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 334154b44505Smrgfi]) 33420a392d7eSmrgLD=$lt_cv_path_LD 334354b44505Smrgif test -n "$LD"; then 334454b44505Smrg AC_MSG_RESULT($LD) 334554b44505Smrgelse 334654b44505Smrg AC_MSG_RESULT(no) 334754b44505Smrgfi 334854b44505Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 334954b44505Smrg_LT_PATH_LD_GNU 335054b44505SmrgAC_SUBST([LD]) 33514a041c5bSmacallan 335254b44505Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 335354b44505Smrg])# LT_PATH_LD 33544a041c5bSmacallan 335554b44505Smrg# Old names: 335654b44505SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 335754b44505SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 335854b44505Smrgdnl aclocal-1.4 backwards compatibility: 335954b44505Smrgdnl AC_DEFUN([AM_PROG_LD], []) 336054b44505Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33614a041c5bSmacallan 33624a041c5bSmacallan 336354b44505Smrg# _LT_PATH_LD_GNU 336454b44505Smrg#- -------------- 336554b44505Smrgm4_defun([_LT_PATH_LD_GNU], 336654b44505Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 336754b44505Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 336854b44505Smrgcase `$LD -v 2>&1 </dev/null` in 336954b44505Smrg*GNU* | *'with BFD'*) 337054b44505Smrg lt_cv_prog_gnu_ld=yes 337154b44505Smrg ;; 337254b44505Smrg*) 337354b44505Smrg lt_cv_prog_gnu_ld=no 337454b44505Smrg ;; 337554b44505Smrgesac]) 337654b44505Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 337754b44505Smrg])# _LT_PATH_LD_GNU 33784a041c5bSmacallan 33794a041c5bSmacallan 338054b44505Smrg# _LT_CMD_RELOAD 338154b44505Smrg# -------------- 338254b44505Smrg# find reload flag for linker 338354b44505Smrg# -- PORTME Some linkers may need a different reload flag. 338454b44505Smrgm4_defun([_LT_CMD_RELOAD], 338554b44505Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 338654b44505Smrg lt_cv_ld_reload_flag, 338754b44505Smrg [lt_cv_ld_reload_flag='-r']) 338854b44505Smrgreload_flag=$lt_cv_ld_reload_flag 338954b44505Smrgcase $reload_flag in 339054b44505Smrg"" | " "*) ;; 339154b44505Smrg*) reload_flag=" $reload_flag" ;; 339254b44505Smrgesac 339354b44505Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 339454b44505Smrgcase $host_os in 339554b44505Smrg cygwin* | mingw* | pw32* | cegcc*) 33960a392d7eSmrg if test yes != "$GCC"; then 339754b44505Smrg reload_cmds=false 339854b44505Smrg fi 339954b44505Smrg ;; 340054b44505Smrg darwin*) 34010a392d7eSmrg if test yes = "$GCC"; then 34020a392d7eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 340354b44505Smrg else 340454b44505Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 340554b44505Smrg fi 34064a041c5bSmacallan ;; 34074a041c5bSmacallanesac 340854b44505Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 340954b44505Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 341054b44505Smrg])# _LT_CMD_RELOAD 34114a041c5bSmacallan 34124a041c5bSmacallan 34130a392d7eSmrg# _LT_PATH_DD 34140a392d7eSmrg# ----------- 34150a392d7eSmrg# find a working dd 34160a392d7eSmrgm4_defun([_LT_PATH_DD], 34170a392d7eSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34180a392d7eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34190a392d7eSmrgcat conftest.i conftest.i >conftest2.i 34200a392d7eSmrg: ${lt_DD:=$DD} 34210a392d7eSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34220a392d7eSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34230a392d7eSmrg cmp -s conftest.i conftest.out \ 34240a392d7eSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34250a392d7eSmrgfi]) 34260a392d7eSmrgrm -f conftest.i conftest2.i conftest.out]) 34270a392d7eSmrg])# _LT_PATH_DD 34280a392d7eSmrg 34290a392d7eSmrg 34300a392d7eSmrg# _LT_CMD_TRUNCATE 34310a392d7eSmrg# ---------------- 34320a392d7eSmrg# find command to truncate a binary pipe 34330a392d7eSmrgm4_defun([_LT_CMD_TRUNCATE], 34340a392d7eSmrg[m4_require([_LT_PATH_DD]) 34350a392d7eSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34360a392d7eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34370a392d7eSmrgcat conftest.i conftest.i >conftest2.i 34380a392d7eSmrglt_cv_truncate_bin= 34390a392d7eSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34400a392d7eSmrg cmp -s conftest.i conftest.out \ 34410a392d7eSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34420a392d7eSmrgfi 34430a392d7eSmrgrm -f conftest.i conftest2.i conftest.out 34440a392d7eSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34450a392d7eSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34460a392d7eSmrg [Command to truncate a binary pipe]) 34470a392d7eSmrg])# _LT_CMD_TRUNCATE 34480a392d7eSmrg 34490a392d7eSmrg 345054b44505Smrg# _LT_CHECK_MAGIC_METHOD 345154b44505Smrg# ---------------------- 345254b44505Smrg# how to check for library dependencies 345354b44505Smrg# -- PORTME fill in with the dynamic library characteristics 345454b44505Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 345554b44505Smrg[m4_require([_LT_DECL_EGREP]) 345654b44505Smrgm4_require([_LT_DECL_OBJDUMP]) 345754b44505SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 345854b44505Smrglt_cv_deplibs_check_method, 345954b44505Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 346054b44505Smrglt_cv_file_magic_test_file= 346154b44505Smrglt_cv_deplibs_check_method='unknown' 346254b44505Smrg# Need to set the preceding variable on all platforms that support 346354b44505Smrg# interlibrary dependencies. 346454b44505Smrg# 'none' -- dependencies not supported. 34650a392d7eSmrg# 'unknown' -- same as none, but documents that we really don't know. 346654b44505Smrg# 'pass_all' -- all dependencies passed with no checks. 346754b44505Smrg# 'test_compile' -- check by making test program. 346854b44505Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 34690a392d7eSmrg# that responds to the $file_magic_cmd with a given extended regex. 34700a392d7eSmrg# If you have 'file' or equivalent on your system and you're not sure 34710a392d7eSmrg# whether 'pass_all' will *always* work, you probably want this one. 34724a041c5bSmacallan 347354b44505Smrgcase $host_os in 347454b44505Smrgaix[[4-9]]*) 347554b44505Smrg lt_cv_deplibs_check_method=pass_all 347654b44505Smrg ;; 34774a041c5bSmacallan 347854b44505Smrgbeos*) 347954b44505Smrg lt_cv_deplibs_check_method=pass_all 348054b44505Smrg ;; 34814a041c5bSmacallan 348254b44505Smrgbsdi[[45]]*) 348354b44505Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 348454b44505Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 348554b44505Smrg lt_cv_file_magic_test_file=/shlib/libc.so 348654b44505Smrg ;; 34874a041c5bSmacallan 348854b44505Smrgcygwin*) 348954b44505Smrg # func_win32_libid is a shell function defined in ltmain.sh 349054b44505Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349154b44505Smrg lt_cv_file_magic_cmd='func_win32_libid' 349254b44505Smrg ;; 34934a041c5bSmacallan 349454b44505Smrgmingw* | pw32*) 349554b44505Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 349654b44505Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 349754b44505Smrg # unless we find 'file', for example because we are cross-compiling. 34980a392d7eSmrg if ( file / ) >/dev/null 2>&1; then 349954b44505Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 350054b44505Smrg lt_cv_file_magic_cmd='func_win32_libid' 350154b44505Smrg else 350254b44505Smrg # Keep this pattern in sync with the one in func_win32_libid. 350354b44505Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 350454b44505Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 350554b44505Smrg fi 350654b44505Smrg ;; 35074a041c5bSmacallan 350854b44505Smrgcegcc*) 350954b44505Smrg # use the weaker test based on 'objdump'. See mingw*. 351054b44505Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 351154b44505Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 351254b44505Smrg ;; 35134a041c5bSmacallan 351454b44505Smrgdarwin* | rhapsody*) 351554b44505Smrg lt_cv_deplibs_check_method=pass_all 351654b44505Smrg ;; 35174a041c5bSmacallan 351854b44505Smrgfreebsd* | dragonfly*) 351954b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 352054b44505Smrg case $host_cpu in 352154b44505Smrg i*86 ) 352254b44505Smrg # Not sure whether the presence of OpenBSD here was a mistake. 352354b44505Smrg # Let's accept both of them until this is cleared up. 352454b44505Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 352554b44505Smrg lt_cv_file_magic_cmd=/usr/bin/file 352654b44505Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 352754b44505Smrg ;; 352854b44505Smrg esac 352954b44505Smrg else 353054b44505Smrg lt_cv_deplibs_check_method=pass_all 353154b44505Smrg fi 353254b44505Smrg ;; 35334a041c5bSmacallan 353454b44505Smrghaiku*) 353554b44505Smrg lt_cv_deplibs_check_method=pass_all 353654b44505Smrg ;; 35374a041c5bSmacallan 353854b44505Smrghpux10.20* | hpux11*) 353954b44505Smrg lt_cv_file_magic_cmd=/usr/bin/file 354054b44505Smrg case $host_cpu in 354154b44505Smrg ia64*) 354254b44505Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 354354b44505Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 354454b44505Smrg ;; 354554b44505Smrg hppa*64*) 354654b44505Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 354754b44505Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 354854b44505Smrg ;; 354954b44505Smrg *) 355054b44505Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 355154b44505Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 355254b44505Smrg ;; 355354b44505Smrg esac 355454b44505Smrg ;; 35554a041c5bSmacallan 355654b44505Smrginterix[[3-9]]*) 355754b44505Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 355854b44505Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 355954b44505Smrg ;; 35604a041c5bSmacallan 356154b44505Smrgirix5* | irix6* | nonstopux*) 356254b44505Smrg case $LD in 356354b44505Smrg *-32|*"-32 ") libmagic=32-bit;; 356454b44505Smrg *-n32|*"-n32 ") libmagic=N32;; 356554b44505Smrg *-64|*"-64 ") libmagic=64-bit;; 356654b44505Smrg *) libmagic=never-match;; 356754b44505Smrg esac 356854b44505Smrg lt_cv_deplibs_check_method=pass_all 356954b44505Smrg ;; 35704a041c5bSmacallan 35710a392d7eSmrg# This must be glibc/ELF. 35720a392d7eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 357354b44505Smrg lt_cv_deplibs_check_method=pass_all 357454b44505Smrg ;; 35754a041c5bSmacallan 357654b44505Smrgnetbsd*) 357754b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 357854b44505Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 357954b44505Smrg else 358054b44505Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 358154b44505Smrg fi 358254b44505Smrg ;; 35834a041c5bSmacallan 358454b44505Smrgnewos6*) 358554b44505Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 358654b44505Smrg lt_cv_file_magic_cmd=/usr/bin/file 358754b44505Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 358854b44505Smrg ;; 35894a041c5bSmacallan 359054b44505Smrg*nto* | *qnx*) 359154b44505Smrg lt_cv_deplibs_check_method=pass_all 359254b44505Smrg ;; 35934a041c5bSmacallan 35940a392d7eSmrgopenbsd* | bitrig*) 35950a392d7eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 359654b44505Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35974a041c5bSmacallan else 359854b44505Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35994a041c5bSmacallan fi 360054b44505Smrg ;; 36014a041c5bSmacallan 360254b44505Smrgosf3* | osf4* | osf5*) 360354b44505Smrg lt_cv_deplibs_check_method=pass_all 360454b44505Smrg ;; 36054a041c5bSmacallan 360654b44505Smrgrdos*) 360754b44505Smrg lt_cv_deplibs_check_method=pass_all 360854b44505Smrg ;; 36094a041c5bSmacallan 361054b44505Smrgsolaris*) 361154b44505Smrg lt_cv_deplibs_check_method=pass_all 361254b44505Smrg ;; 36134a041c5bSmacallan 361454b44505Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 361554b44505Smrg lt_cv_deplibs_check_method=pass_all 361654b44505Smrg ;; 36174a041c5bSmacallan 361854b44505Smrgsysv4 | sysv4.3*) 361954b44505Smrg case $host_vendor in 362054b44505Smrg motorola) 362154b44505Smrg 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]]' 362254b44505Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 362354b44505Smrg ;; 362454b44505Smrg ncr) 362554b44505Smrg lt_cv_deplibs_check_method=pass_all 362654b44505Smrg ;; 362754b44505Smrg sequent) 362854b44505Smrg lt_cv_file_magic_cmd='/bin/file' 362954b44505Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 363054b44505Smrg ;; 363154b44505Smrg sni) 363254b44505Smrg lt_cv_file_magic_cmd='/bin/file' 363354b44505Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 363454b44505Smrg lt_cv_file_magic_test_file=/lib/libc.so 363554b44505Smrg ;; 363654b44505Smrg siemens) 363754b44505Smrg lt_cv_deplibs_check_method=pass_all 363854b44505Smrg ;; 363954b44505Smrg pc) 364054b44505Smrg lt_cv_deplibs_check_method=pass_all 364154b44505Smrg ;; 364254b44505Smrg esac 364354b44505Smrg ;; 36444a041c5bSmacallan 364554b44505Smrgtpf*) 364654b44505Smrg lt_cv_deplibs_check_method=pass_all 364754b44505Smrg ;; 36480a392d7eSmrgos2*) 36490a392d7eSmrg lt_cv_deplibs_check_method=pass_all 36500a392d7eSmrg ;; 365154b44505Smrgesac 365254b44505Smrg]) 36534a041c5bSmacallan 365454b44505Smrgfile_magic_glob= 365554b44505Smrgwant_nocaseglob=no 365654b44505Smrgif test "$build" = "$host"; then 365754b44505Smrg case $host_os in 365854b44505Smrg mingw* | pw32*) 365954b44505Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 366054b44505Smrg want_nocaseglob=yes 36614a041c5bSmacallan else 366254b44505Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36634a041c5bSmacallan fi 36644a041c5bSmacallan ;; 366554b44505Smrg esac 366654b44505Smrgfi 36674a041c5bSmacallan 366854b44505Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 366954b44505Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 367054b44505Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36714a041c5bSmacallan 367254b44505Smrg_LT_DECL([], [deplibs_check_method], [1], 367354b44505Smrg [Method to check whether dependent libraries are shared objects]) 367454b44505Smrg_LT_DECL([], [file_magic_cmd], [1], 367554b44505Smrg [Command to use when deplibs_check_method = "file_magic"]) 367654b44505Smrg_LT_DECL([], [file_magic_glob], [1], 367754b44505Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 367854b44505Smrg_LT_DECL([], [want_nocaseglob], [1], 367954b44505Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 368054b44505Smrg])# _LT_CHECK_MAGIC_METHOD 36814a041c5bSmacallan 36824a041c5bSmacallan 368354b44505Smrg# LT_PATH_NM 368454b44505Smrg# ---------- 368554b44505Smrg# find the pathname to a BSD- or MS-compatible name lister 368654b44505SmrgAC_DEFUN([LT_PATH_NM], 368754b44505Smrg[AC_REQUIRE([AC_PROG_CC])dnl 368854b44505SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 368954b44505Smrg[if test -n "$NM"; then 369054b44505Smrg # Let the user override the test. 36910a392d7eSmrg lt_cv_path_NM=$NM 369254b44505Smrgelse 36930a392d7eSmrg lt_nm_to_check=${ac_tool_prefix}nm 369454b44505Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 369554b44505Smrg lt_nm_to_check="$lt_nm_to_check nm" 369654b44505Smrg fi 369754b44505Smrg for lt_tmp_nm in $lt_nm_to_check; do 36980a392d7eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 369954b44505Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37000a392d7eSmrg IFS=$lt_save_ifs 370154b44505Smrg test -z "$ac_dir" && ac_dir=. 37020a392d7eSmrg tmp_nm=$ac_dir/$lt_tmp_nm 37030a392d7eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 370454b44505Smrg # Check to see if the nm accepts a BSD-compat flag. 37050a392d7eSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 370654b44505Smrg # nm: unknown option "B" ignored 370754b44505Smrg # Tru64's nm complains that /dev/null is an invalid object file 37080a392d7eSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37090a392d7eSmrg case $build_os in 37100a392d7eSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37110a392d7eSmrg *) lt_bad_file=/dev/null ;; 37120a392d7eSmrg esac 37130a392d7eSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 37140a392d7eSmrg *$lt_bad_file* | *'Invalid file or object type'*) 371554b44505Smrg lt_cv_path_NM="$tmp_nm -B" 37160a392d7eSmrg break 2 371754b44505Smrg ;; 371854b44505Smrg *) 371954b44505Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 372054b44505Smrg */dev/null*) 372154b44505Smrg lt_cv_path_NM="$tmp_nm -p" 37220a392d7eSmrg break 2 372354b44505Smrg ;; 372454b44505Smrg *) 372554b44505Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 372654b44505Smrg continue # so that we can try to find one that supports BSD flags 372754b44505Smrg ;; 372854b44505Smrg esac 372954b44505Smrg ;; 373054b44505Smrg esac 37314a041c5bSmacallan fi 373254b44505Smrg done 37330a392d7eSmrg IFS=$lt_save_ifs 373454b44505Smrg done 373554b44505Smrg : ${lt_cv_path_NM=no} 373654b44505Smrgfi]) 37370a392d7eSmrgif test no != "$lt_cv_path_NM"; then 37380a392d7eSmrg NM=$lt_cv_path_NM 373954b44505Smrgelse 374054b44505Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 374154b44505Smrg if test -n "$DUMPBIN"; then : 374254b44505Smrg # Let the user override the test. 374354b44505Smrg else 374454b44505Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37450a392d7eSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 374654b44505Smrg *COFF*) 37470a392d7eSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37484a041c5bSmacallan ;; 37494a041c5bSmacallan *) 375054b44505Smrg DUMPBIN=: 37514a041c5bSmacallan ;; 37524a041c5bSmacallan esac 375354b44505Smrg fi 375454b44505Smrg AC_SUBST([DUMPBIN]) 37550a392d7eSmrg if test : != "$DUMPBIN"; then 37560a392d7eSmrg NM=$DUMPBIN 375754b44505Smrg fi 375854b44505Smrgfi 375954b44505Smrgtest -z "$NM" && NM=nm 376054b44505SmrgAC_SUBST([NM]) 376154b44505Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 376254b44505Smrg 376354b44505SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 376454b44505Smrg [lt_cv_nm_interface="BSD nm" 376554b44505Smrg echo "int some_variable = 0;" > conftest.$ac_ext 376654b44505Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 376754b44505Smrg (eval "$ac_compile" 2>conftest.err) 376854b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376954b44505Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 377054b44505Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 377154b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377254b44505Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 377354b44505Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 377454b44505Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 377554b44505Smrg lt_cv_nm_interface="MS dumpbin" 377654b44505Smrg fi 377754b44505Smrg rm -f conftest*]) 377854b44505Smrg])# LT_PATH_NM 377954b44505Smrg 378054b44505Smrg# Old names: 378154b44505SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 378254b44505SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 378354b44505Smrgdnl aclocal-1.4 backwards compatibility: 378454b44505Smrgdnl AC_DEFUN([AM_PROG_NM], []) 378554b44505Smrgdnl AC_DEFUN([AC_PROG_NM], []) 378654b44505Smrg 378754b44505Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 378854b44505Smrg# -------------------------------- 378954b44505Smrg# how to determine the name of the shared library 379054b44505Smrg# associated with a specific link library. 379154b44505Smrg# -- PORTME fill in with the dynamic library characteristics 379254b44505Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 379354b44505Smrg[m4_require([_LT_DECL_EGREP]) 379454b44505Smrgm4_require([_LT_DECL_OBJDUMP]) 379554b44505Smrgm4_require([_LT_DECL_DLLTOOL]) 379654b44505SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 379754b44505Smrglt_cv_sharedlib_from_linklib_cmd, 379854b44505Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37994a041c5bSmacallan 380054b44505Smrgcase $host_os in 380154b44505Smrgcygwin* | mingw* | pw32* | cegcc*) 38020a392d7eSmrg # two different shell functions defined in ltmain.sh; 38030a392d7eSmrg # decide which one to use based on capabilities of $DLLTOOL 380454b44505Smrg case `$DLLTOOL --help 2>&1` in 380554b44505Smrg *--identify-strict*) 380654b44505Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38074a041c5bSmacallan ;; 380854b44505Smrg *) 380954b44505Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38104a041c5bSmacallan ;; 381154b44505Smrg esac 381254b44505Smrg ;; 381354b44505Smrg*) 381454b44505Smrg # fallback: assume linklib IS sharedlib 38150a392d7eSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 381654b44505Smrg ;; 381754b44505Smrgesac 381854b44505Smrg]) 381954b44505Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 382054b44505Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38214a041c5bSmacallan 382254b44505Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 382354b44505Smrg [Command to associate shared and link libraries]) 382454b44505Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38254a041c5bSmacallan 38264a041c5bSmacallan 382754b44505Smrg# _LT_PATH_MANIFEST_TOOL 382854b44505Smrg# ---------------------- 382954b44505Smrg# locate the manifest tool 383054b44505Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 383154b44505Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 383254b44505Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 383354b44505SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 383454b44505Smrg [lt_cv_path_mainfest_tool=no 383554b44505Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 383654b44505Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 383754b44505Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 383854b44505Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 383954b44505Smrg lt_cv_path_mainfest_tool=yes 384054b44505Smrg fi 384154b44505Smrg rm -f conftest*]) 38420a392d7eSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 384354b44505Smrg MANIFEST_TOOL=: 384454b44505Smrgfi 384554b44505Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 384654b44505Smrg])# _LT_PATH_MANIFEST_TOOL 38474a041c5bSmacallan 38484a041c5bSmacallan 38490a392d7eSmrg# _LT_DLL_DEF_P([FILE]) 38500a392d7eSmrg# --------------------- 38510a392d7eSmrg# True iff FILE is a Windows DLL '.def' file. 38520a392d7eSmrg# Keep in sync with func_dll_def_p in the libtool script 38530a392d7eSmrgAC_DEFUN([_LT_DLL_DEF_P], 38540a392d7eSmrg[dnl 38550a392d7eSmrg test DEF = "`$SED -n dnl 38560a392d7eSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38570a392d7eSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38580a392d7eSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38590a392d7eSmrg -e q dnl Only consider the first "real" line 38600a392d7eSmrg $1`" dnl 38610a392d7eSmrg])# _LT_DLL_DEF_P 38620a392d7eSmrg 38630a392d7eSmrg 386454b44505Smrg# LT_LIB_M 386554b44505Smrg# -------- 386654b44505Smrg# check for math library 386754b44505SmrgAC_DEFUN([LT_LIB_M], 386854b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 386954b44505SmrgLIBM= 387054b44505Smrgcase $host in 387154b44505Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 387254b44505Smrg # These system don't have libm, or don't need it 387354b44505Smrg ;; 387454b44505Smrg*-ncr-sysv4.3*) 38750a392d7eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 387654b44505Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 387754b44505Smrg ;; 387854b44505Smrg*) 38790a392d7eSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 388054b44505Smrg ;; 388154b44505Smrgesac 388254b44505SmrgAC_SUBST([LIBM]) 388354b44505Smrg])# LT_LIB_M 38844a041c5bSmacallan 388554b44505Smrg# Old name: 388654b44505SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 388754b44505Smrgdnl aclocal-1.4 backwards compatibility: 388854b44505Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38894a041c5bSmacallan 38904a041c5bSmacallan 389154b44505Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 389254b44505Smrg# ------------------------------- 389354b44505Smrgm4_defun([_LT_COMPILER_NO_RTTI], 389454b44505Smrg[m4_require([_LT_TAG_COMPILER])dnl 38954a041c5bSmacallan 389654b44505Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38974a041c5bSmacallan 38980a392d7eSmrgif test yes = "$GCC"; then 389954b44505Smrg case $cc_basename in 390054b44505Smrg nvcc*) 390154b44505Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 390254b44505Smrg *) 390354b44505Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 390454b44505Smrg esac 39054a041c5bSmacallan 390654b44505Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 390754b44505Smrg lt_cv_prog_compiler_rtti_exceptions, 390854b44505Smrg [-fno-rtti -fno-exceptions], [], 390954b44505Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 391054b44505Smrgfi 391154b44505Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 391254b44505Smrg [Compiler flag to turn off builtin functions]) 391354b44505Smrg])# _LT_COMPILER_NO_RTTI 39144a041c5bSmacallan 39154a041c5bSmacallan 391654b44505Smrg# _LT_CMD_GLOBAL_SYMBOLS 391754b44505Smrg# ---------------------- 391854b44505Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 391954b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 392054b44505SmrgAC_REQUIRE([AC_PROG_CC])dnl 392154b44505SmrgAC_REQUIRE([AC_PROG_AWK])dnl 392254b44505SmrgAC_REQUIRE([LT_PATH_NM])dnl 392354b44505SmrgAC_REQUIRE([LT_PATH_LD])dnl 392454b44505Smrgm4_require([_LT_DECL_SED])dnl 392554b44505Smrgm4_require([_LT_DECL_EGREP])dnl 392654b44505Smrgm4_require([_LT_TAG_COMPILER])dnl 39274a041c5bSmacallan 392854b44505Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 392954b44505SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 393054b44505SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 393154b44505Smrg[ 393254b44505Smrg# These are sane defaults that work on at least a few old systems. 393354b44505Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39344a041c5bSmacallan 393554b44505Smrg# Character class describing NM global symbol codes. 393654b44505Smrgsymcode='[[BCDEGRST]]' 39374a041c5bSmacallan 393854b44505Smrg# Regexp to match symbols that can be accessed directly from C. 393954b44505Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39404a041c5bSmacallan 394154b44505Smrg# Define system-specific variables. 394254b44505Smrgcase $host_os in 394354b44505Smrgaix*) 394454b44505Smrg symcode='[[BCDT]]' 394554b44505Smrg ;; 394654b44505Smrgcygwin* | mingw* | pw32* | cegcc*) 394754b44505Smrg symcode='[[ABCDGISTW]]' 394854b44505Smrg ;; 394954b44505Smrghpux*) 39500a392d7eSmrg if test ia64 = "$host_cpu"; then 395154b44505Smrg symcode='[[ABCDEGRST]]' 395254b44505Smrg fi 395354b44505Smrg ;; 395454b44505Smrgirix* | nonstopux*) 395554b44505Smrg symcode='[[BCDEGRST]]' 395654b44505Smrg ;; 395754b44505Smrgosf*) 395854b44505Smrg symcode='[[BCDEGQRST]]' 395954b44505Smrg ;; 396054b44505Smrgsolaris*) 396154b44505Smrg symcode='[[BDRT]]' 396254b44505Smrg ;; 396354b44505Smrgsco3.2v5*) 396454b44505Smrg symcode='[[DT]]' 396554b44505Smrg ;; 396654b44505Smrgsysv4.2uw2*) 396754b44505Smrg symcode='[[DT]]' 396854b44505Smrg ;; 396954b44505Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 397054b44505Smrg symcode='[[ABDT]]' 397154b44505Smrg ;; 397254b44505Smrgsysv4) 397354b44505Smrg symcode='[[DFNSTU]]' 397454b44505Smrg ;; 397554b44505Smrgesac 39764a041c5bSmacallan 397754b44505Smrg# If we're using GNU nm, then use its standard symbol codes. 397854b44505Smrgcase `$NM -V 2>&1` in 397954b44505Smrg*GNU* | *'with BFD'*) 398054b44505Smrg symcode='[[ABCDGIRSTW]]' ;; 398154b44505Smrgesac 39824a041c5bSmacallan 39830a392d7eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39840a392d7eSmrg # Gets list of data symbols to import. 39850a392d7eSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 39860a392d7eSmrg # Adjust the below global symbol transforms to fixup imported variables. 39870a392d7eSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39880a392d7eSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39890a392d7eSmrg lt_c_name_lib_hook="\ 39900a392d7eSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39910a392d7eSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39920a392d7eSmrgelse 39930a392d7eSmrg # Disable hooks by default. 39940a392d7eSmrg lt_cv_sys_global_symbol_to_import= 39950a392d7eSmrg lt_cdecl_hook= 39960a392d7eSmrg lt_c_name_hook= 39970a392d7eSmrg lt_c_name_lib_hook= 39980a392d7eSmrgfi 39990a392d7eSmrg 400054b44505Smrg# Transform an extracted symbol line into a proper C declaration. 400154b44505Smrg# Some systems (esp. on ia64) link data and code symbols differently, 400254b44505Smrg# so use this general approach. 40030a392d7eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 40040a392d7eSmrg$lt_cdecl_hook\ 40050a392d7eSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40060a392d7eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40074a041c5bSmacallan 400854b44505Smrg# Transform an extracted symbol line into symbol name and symbol address 40090a392d7eSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 40100a392d7eSmrg$lt_c_name_hook\ 40110a392d7eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40120a392d7eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40130a392d7eSmrg 40140a392d7eSmrg# Transform an extracted symbol line into symbol name with lib prefix and 40150a392d7eSmrg# symbol address. 40160a392d7eSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 40170a392d7eSmrg$lt_c_name_lib_hook\ 40180a392d7eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40190a392d7eSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40200a392d7eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40214a041c5bSmacallan 402254b44505Smrg# Handle CRLF in mingw tool chain 402354b44505Smrgopt_cr= 402454b44505Smrgcase $build_os in 402554b44505Smrgmingw*) 402654b44505Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 402754b44505Smrg ;; 40284a041c5bSmacallanesac 40294a041c5bSmacallan 403054b44505Smrg# Try without a prefix underscore, then with it. 403154b44505Smrgfor ac_symprfx in "" "_"; do 40324a041c5bSmacallan 403354b44505Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 403454b44505Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40354a041c5bSmacallan 403654b44505Smrg # Write the raw and C identifiers. 403754b44505Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40380a392d7eSmrg # Fake it for dumpbin and say T for any non-static function, 40390a392d7eSmrg # D for any global variable and I for any imported variable. 404054b44505Smrg # Also find C++ and __fastcall symbols from MSVC++, 404154b44505Smrg # which start with @ or ?. 404254b44505Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 404354b44505Smrg" {last_section=section; section=\$ 3};"\ 40440a392d7eSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 404554b44505Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40460a392d7eSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40470a392d7eSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40480a392d7eSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 404954b44505Smrg" \$ 0!~/External *\|/{next};"\ 405054b44505Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 405154b44505Smrg" {if(hide[section]) next};"\ 40520a392d7eSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40530a392d7eSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40540a392d7eSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40550a392d7eSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 405654b44505Smrg" ' prfx=^$ac_symprfx]" 405754b44505Smrg else 405854b44505Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 405954b44505Smrg fi 406054b44505Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 40614a041c5bSmacallan 406254b44505Smrg # Check to see that the pipe works correctly. 406354b44505Smrg pipe_works=no 40644a041c5bSmacallan 406554b44505Smrg rm -f conftest* 406654b44505Smrg cat > conftest.$ac_ext <<_LT_EOF 406754b44505Smrg#ifdef __cplusplus 406854b44505Smrgextern "C" { 406954b44505Smrg#endif 407054b44505Smrgchar nm_test_var; 407154b44505Smrgvoid nm_test_func(void); 407254b44505Smrgvoid nm_test_func(void){} 407354b44505Smrg#ifdef __cplusplus 407454b44505Smrg} 407554b44505Smrg#endif 407654b44505Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 407754b44505Smrg_LT_EOF 40784a041c5bSmacallan 407954b44505Smrg if AC_TRY_EVAL(ac_compile); then 408054b44505Smrg # Now try to grab the symbols. 408154b44505Smrg nlist=conftest.nm 408254b44505Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 408354b44505Smrg # Try sorting and uniquifying the output. 408454b44505Smrg if sort "$nlist" | uniq > "$nlist"T; then 408554b44505Smrg mv -f "$nlist"T "$nlist" 408654b44505Smrg else 408754b44505Smrg rm -f "$nlist"T 408854b44505Smrg fi 40894a041c5bSmacallan 409054b44505Smrg # Make sure that we snagged all the symbols we need. 409154b44505Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 409254b44505Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 409354b44505Smrg cat <<_LT_EOF > conftest.$ac_ext 409454b44505Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 40950a392d7eSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 40960a392d7eSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 409754b44505Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 409854b44505Smrg# define LT@&t@_DLSYM_CONST 40990a392d7eSmrg#elif defined __osf__ 410054b44505Smrg/* This system does not cope well with relocations in const data. */ 410154b44505Smrg# define LT@&t@_DLSYM_CONST 410254b44505Smrg#else 410354b44505Smrg# define LT@&t@_DLSYM_CONST const 410454b44505Smrg#endif 41054a041c5bSmacallan 410654b44505Smrg#ifdef __cplusplus 410754b44505Smrgextern "C" { 410854b44505Smrg#endif 41094a041c5bSmacallan 411054b44505Smrg_LT_EOF 411154b44505Smrg # Now generate the symbol file. 411254b44505Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41134a041c5bSmacallan 411454b44505Smrg cat <<_LT_EOF >> conftest.$ac_ext 41154a041c5bSmacallan 411654b44505Smrg/* The mapping between symbol names and symbols. */ 411754b44505SmrgLT@&t@_DLSYM_CONST struct { 411854b44505Smrg const char *name; 411954b44505Smrg void *address; 412054b44505Smrg} 412154b44505Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 412254b44505Smrg{ 412354b44505Smrg { "@PROGRAM@", (void *) 0 }, 412454b44505Smrg_LT_EOF 41250a392d7eSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 412654b44505Smrg cat <<\_LT_EOF >> conftest.$ac_ext 412754b44505Smrg {0, (void *) 0} 412854b44505Smrg}; 41294a041c5bSmacallan 413054b44505Smrg/* This works around a problem in FreeBSD linker */ 413154b44505Smrg#ifdef FREEBSD_WORKAROUND 413254b44505Smrgstatic const void *lt_preloaded_setup() { 413354b44505Smrg return lt__PROGRAM__LTX_preloaded_symbols; 413454b44505Smrg} 413554b44505Smrg#endif 41364a041c5bSmacallan 413754b44505Smrg#ifdef __cplusplus 413854b44505Smrg} 413954b44505Smrg#endif 414054b44505Smrg_LT_EOF 414154b44505Smrg # Now try linking the two files. 414254b44505Smrg mv conftest.$ac_objext conftstm.$ac_objext 414354b44505Smrg lt_globsym_save_LIBS=$LIBS 414454b44505Smrg lt_globsym_save_CFLAGS=$CFLAGS 41450a392d7eSmrg LIBS=conftstm.$ac_objext 414654b44505Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41470a392d7eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 414854b44505Smrg pipe_works=yes 414954b44505Smrg fi 415054b44505Smrg LIBS=$lt_globsym_save_LIBS 415154b44505Smrg CFLAGS=$lt_globsym_save_CFLAGS 415254b44505Smrg else 415354b44505Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 415454b44505Smrg fi 415554b44505Smrg else 415654b44505Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 415754b44505Smrg fi 415854b44505Smrg else 415954b44505Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 416054b44505Smrg fi 416154b44505Smrg else 416254b44505Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 416354b44505Smrg cat conftest.$ac_ext >&5 416454b44505Smrg fi 416554b44505Smrg rm -rf conftest* conftst* 41664a041c5bSmacallan 416754b44505Smrg # Do not use the global_symbol_pipe unless it works. 41680a392d7eSmrg if test yes = "$pipe_works"; then 416954b44505Smrg break 417054b44505Smrg else 417154b44505Smrg lt_cv_sys_global_symbol_pipe= 41724a041c5bSmacallan fi 417354b44505Smrgdone 417454b44505Smrg]) 417554b44505Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 417654b44505Smrg lt_cv_sys_global_symbol_to_cdecl= 417754b44505Smrgfi 417854b44505Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 417954b44505Smrg AC_MSG_RESULT(failed) 418054b44505Smrgelse 418154b44505Smrg AC_MSG_RESULT(ok) 418254b44505Smrgfi 41834a041c5bSmacallan 418454b44505Smrg# Response file support. 418554b44505Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 418654b44505Smrg nm_file_list_spec='@' 418754b44505Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 418854b44505Smrg nm_file_list_spec='@' 418954b44505Smrgfi 41904a041c5bSmacallan 419154b44505Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 419254b44505Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 419354b44505Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 419454b44505Smrg [Transform the output of nm in a proper C declaration]) 41950a392d7eSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 41960a392d7eSmrg [Transform the output of nm into a list of symbols to manually relocate]) 419754b44505Smrg_LT_DECL([global_symbol_to_c_name_address], 419854b44505Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 419954b44505Smrg [Transform the output of nm in a C name address pair]) 420054b44505Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 420154b44505Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 420254b44505Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42030a392d7eSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42040a392d7eSmrg [The name lister interface]) 420554b44505Smrg_LT_DECL([], [nm_file_list_spec], [1], 420654b44505Smrg [Specify filename containing input files for $NM]) 420754b44505Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 420854b44505Smrg 420954b44505Smrg 421054b44505Smrg# _LT_COMPILER_PIC([TAGNAME]) 421154b44505Smrg# --------------------------- 421254b44505Smrgm4_defun([_LT_COMPILER_PIC], 421354b44505Smrg[m4_require([_LT_TAG_COMPILER])dnl 421454b44505Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 421554b44505Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 421654b44505Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42174a041c5bSmacallan 421854b44505Smrgm4_if([$1], [CXX], [ 421954b44505Smrg # C++ specific cases for pic, static, wl, etc. 42200a392d7eSmrg if test yes = "$GXX"; then 422154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 422254b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42234a041c5bSmacallan 422454b44505Smrg case $host_os in 422554b44505Smrg aix*) 422654b44505Smrg # All AIX code is PIC. 42270a392d7eSmrg if test ia64 = "$host_cpu"; then 422854b44505Smrg # AIX 5 now supports IA64 processor 422954b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 423054b44505Smrg fi 42310a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423254b44505Smrg ;; 42334a041c5bSmacallan 423454b44505Smrg amigaos*) 423554b44505Smrg case $host_cpu in 423654b44505Smrg powerpc) 423754b44505Smrg # see comment about AmigaOS4 .so support 423854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423954b44505Smrg ;; 424054b44505Smrg m68k) 424154b44505Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42420a392d7eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 42430a392d7eSmrg # like '-m68040'. 424454b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424554b44505Smrg ;; 424654b44505Smrg esac 424754b44505Smrg ;; 42484a041c5bSmacallan 424954b44505Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 425054b44505Smrg # PIC is the default for these OSes. 425154b44505Smrg ;; 425254b44505Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 425354b44505Smrg # This hack is so that the source file can tell whether it is being 425454b44505Smrg # built for inclusion in a dll (and should export symbols for example). 425554b44505Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 425654b44505Smrg # (--disable-auto-import) libraries 425754b44505Smrg m4_if([$1], [GCJ], [], 425854b44505Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42590a392d7eSmrg case $host_os in 42600a392d7eSmrg os2*) 42610a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42620a392d7eSmrg ;; 42630a392d7eSmrg esac 426454b44505Smrg ;; 426554b44505Smrg darwin* | rhapsody*) 426654b44505Smrg # PIC is the default on this platform 426754b44505Smrg # Common symbols not allowed in MH_DYLIB files 426854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 426954b44505Smrg ;; 427054b44505Smrg *djgpp*) 427154b44505Smrg # DJGPP does not support shared libraries at all 427254b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 427354b44505Smrg ;; 427454b44505Smrg haiku*) 427554b44505Smrg # PIC is the default for Haiku. 427654b44505Smrg # The "-static" flag exists, but is broken. 427754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427854b44505Smrg ;; 427954b44505Smrg interix[[3-9]]*) 428054b44505Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 428154b44505Smrg # Instead, we relocate shared libraries at runtime. 428254b44505Smrg ;; 428354b44505Smrg sysv4*MP*) 428454b44505Smrg if test -d /usr/nec; then 428554b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 428654b44505Smrg fi 428754b44505Smrg ;; 428854b44505Smrg hpux*) 428954b44505Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 429054b44505Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 429154b44505Smrg # sets the default TLS model and affects inlining. 429254b44505Smrg case $host_cpu in 429354b44505Smrg hppa*64*) 429454b44505Smrg ;; 429554b44505Smrg *) 429654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429754b44505Smrg ;; 429854b44505Smrg esac 429954b44505Smrg ;; 430054b44505Smrg *qnx* | *nto*) 430154b44505Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 430254b44505Smrg # it will coredump. 430354b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43044a041c5bSmacallan ;; 43054a041c5bSmacallan *) 430654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43074a041c5bSmacallan ;; 43084a041c5bSmacallan esac 430954b44505Smrg else 431054b44505Smrg case $host_os in 431154b44505Smrg aix[[4-9]]*) 431254b44505Smrg # All AIX code is PIC. 43130a392d7eSmrg if test ia64 = "$host_cpu"; then 431454b44505Smrg # AIX 5 now supports IA64 processor 431554b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 431654b44505Smrg else 431754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431854b44505Smrg fi 431954b44505Smrg ;; 432054b44505Smrg chorus*) 432154b44505Smrg case $cc_basename in 432254b44505Smrg cxch68*) 432354b44505Smrg # Green Hills C++ Compiler 432454b44505Smrg # _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" 432554b44505Smrg ;; 432654b44505Smrg esac 432754b44505Smrg ;; 432854b44505Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 432954b44505Smrg # This hack is so that the source file can tell whether it is being 433054b44505Smrg # built for inclusion in a dll (and should export symbols for example). 433154b44505Smrg m4_if([$1], [GCJ], [], 433254b44505Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433354b44505Smrg ;; 433454b44505Smrg dgux*) 433554b44505Smrg case $cc_basename in 433654b44505Smrg ec++*) 433754b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 433854b44505Smrg ;; 433954b44505Smrg ghcx*) 434054b44505Smrg # Green Hills C++ Compiler 434154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 434254b44505Smrg ;; 434354b44505Smrg *) 434454b44505Smrg ;; 434554b44505Smrg esac 434654b44505Smrg ;; 434754b44505Smrg freebsd* | dragonfly*) 434854b44505Smrg # FreeBSD uses GNU C++ 434954b44505Smrg ;; 435054b44505Smrg hpux9* | hpux10* | hpux11*) 435154b44505Smrg case $cc_basename in 435254b44505Smrg CC*) 435354b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43540a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43550a392d7eSmrg if test ia64 != "$host_cpu"; then 435654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 435754b44505Smrg fi 435854b44505Smrg ;; 435954b44505Smrg aCC*) 436054b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43610a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 436254b44505Smrg case $host_cpu in 436354b44505Smrg hppa*64*|ia64*) 436454b44505Smrg # +Z the default 436554b44505Smrg ;; 436654b44505Smrg *) 436754b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 436854b44505Smrg ;; 436954b44505Smrg esac 437054b44505Smrg ;; 437154b44505Smrg *) 437254b44505Smrg ;; 437354b44505Smrg esac 437454b44505Smrg ;; 437554b44505Smrg interix*) 437654b44505Smrg # This is c89, which is MS Visual C++ (no shared libs) 437754b44505Smrg # Anyone wants to do a port? 437854b44505Smrg ;; 437954b44505Smrg irix5* | irix6* | nonstopux*) 438054b44505Smrg case $cc_basename in 438154b44505Smrg CC*) 438254b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 438454b44505Smrg # CC pic flag -KPIC is the default. 438554b44505Smrg ;; 438654b44505Smrg *) 438754b44505Smrg ;; 438854b44505Smrg esac 438954b44505Smrg ;; 43900a392d7eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 439154b44505Smrg case $cc_basename in 439254b44505Smrg KCC*) 439354b44505Smrg # KAI C++ Compiler 439454b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 439554b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 439654b44505Smrg ;; 439754b44505Smrg ecpc* ) 43980a392d7eSmrg # old Intel C++ for x86_64, which still supported -KPIC. 439954b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440054b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440154b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440254b44505Smrg ;; 440354b44505Smrg icpc* ) 440454b44505Smrg # Intel C++, used to be incompatible with GCC. 440554b44505Smrg # ICC 10 doesn't accept -KPIC any more. 440654b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440754b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 440854b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440954b44505Smrg ;; 441054b44505Smrg pgCC* | pgcpp*) 441154b44505Smrg # Portland Group C++ compiler 441254b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441354b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 441454b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441554b44505Smrg ;; 441654b44505Smrg cxx*) 441754b44505Smrg # Compaq C++ 441854b44505Smrg # Make sure the PIC flag is empty. It appears that all Alpha 441954b44505Smrg # Linux and Compaq Tru64 Unix objects are PIC. 442054b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 442154b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 442254b44505Smrg ;; 442354b44505Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 442454b44505Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 442554b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 442754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 442854b44505Smrg ;; 442954b44505Smrg *) 443054b44505Smrg case `$CC -V 2>&1 | sed 5q` in 443154b44505Smrg *Sun\ C*) 443254b44505Smrg # Sun C++ 5.9 443354b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 443454b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443554b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 443654b44505Smrg ;; 443754b44505Smrg esac 443854b44505Smrg ;; 443954b44505Smrg esac 444054b44505Smrg ;; 444154b44505Smrg lynxos*) 444254b44505Smrg ;; 444354b44505Smrg m88k*) 444454b44505Smrg ;; 444554b44505Smrg mvs*) 444654b44505Smrg case $cc_basename in 444754b44505Smrg cxx*) 444854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 444954b44505Smrg ;; 445054b44505Smrg *) 445154b44505Smrg ;; 445254b44505Smrg esac 445354b44505Smrg ;; 445454b44505Smrg netbsd*) 445554b44505Smrg ;; 445654b44505Smrg *qnx* | *nto*) 445754b44505Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 445854b44505Smrg # it will coredump. 445954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 446054b44505Smrg ;; 446154b44505Smrg osf3* | osf4* | osf5*) 446254b44505Smrg case $cc_basename in 446354b44505Smrg KCC*) 446454b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 446554b44505Smrg ;; 446654b44505Smrg RCC*) 446754b44505Smrg # Rational C++ 2.4.1 446854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 446954b44505Smrg ;; 447054b44505Smrg cxx*) 447154b44505Smrg # Digital/Compaq C++ 447254b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 447354b44505Smrg # Make sure the PIC flag is empty. It appears that all Alpha 447454b44505Smrg # Linux and Compaq Tru64 Unix objects are PIC. 447554b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 447654b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 447754b44505Smrg ;; 447854b44505Smrg *) 447954b44505Smrg ;; 448054b44505Smrg esac 448154b44505Smrg ;; 448254b44505Smrg psos*) 448354b44505Smrg ;; 448454b44505Smrg solaris*) 448554b44505Smrg case $cc_basename in 448654b44505Smrg CC* | sunCC*) 448754b44505Smrg # Sun C++ 4.2, 5.x and Centerline C++ 448854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448954b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449054b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 449154b44505Smrg ;; 449254b44505Smrg gcx*) 449354b44505Smrg # Green Hills C++ Compiler 449454b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 449554b44505Smrg ;; 449654b44505Smrg *) 449754b44505Smrg ;; 449854b44505Smrg esac 449954b44505Smrg ;; 450054b44505Smrg sunos4*) 450154b44505Smrg case $cc_basename in 450254b44505Smrg CC*) 450354b44505Smrg # Sun C++ 4.x 450454b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450554b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 450654b44505Smrg ;; 450754b44505Smrg lcc*) 450854b44505Smrg # Lucid 450954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 451054b44505Smrg ;; 451154b44505Smrg *) 451254b44505Smrg ;; 451354b44505Smrg esac 451454b44505Smrg ;; 451554b44505Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 451654b44505Smrg case $cc_basename in 451754b44505Smrg CC*) 451854b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 451954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452054b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 452154b44505Smrg ;; 452254b44505Smrg esac 452354b44505Smrg ;; 452454b44505Smrg tandem*) 452554b44505Smrg case $cc_basename in 452654b44505Smrg NCC*) 452754b44505Smrg # NonStop-UX NCC 3.20 452854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452954b44505Smrg ;; 453054b44505Smrg *) 453154b44505Smrg ;; 453254b44505Smrg esac 453354b44505Smrg ;; 453454b44505Smrg vxworks*) 453554b44505Smrg ;; 453654b44505Smrg *) 453754b44505Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453854b44505Smrg ;; 453954b44505Smrg esac 454054b44505Smrg fi 454154b44505Smrg], 454254b44505Smrg[ 45430a392d7eSmrg if test yes = "$GCC"; then 454454b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 454554b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45464a041c5bSmacallan 454754b44505Smrg case $host_os in 454854b44505Smrg aix*) 454954b44505Smrg # All AIX code is PIC. 45500a392d7eSmrg if test ia64 = "$host_cpu"; then 455154b44505Smrg # AIX 5 now supports IA64 processor 455254b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 455354b44505Smrg fi 45540a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 455554b44505Smrg ;; 45564a041c5bSmacallan 455754b44505Smrg amigaos*) 455854b44505Smrg case $host_cpu in 455954b44505Smrg powerpc) 456054b44505Smrg # see comment about AmigaOS4 .so support 456154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 456254b44505Smrg ;; 456354b44505Smrg m68k) 456454b44505Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45650a392d7eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 45660a392d7eSmrg # like '-m68040'. 456754b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 456854b44505Smrg ;; 456954b44505Smrg esac 457054b44505Smrg ;; 45714a041c5bSmacallan 457254b44505Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 457354b44505Smrg # PIC is the default for these OSes. 457454b44505Smrg ;; 45754a041c5bSmacallan 457654b44505Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 457754b44505Smrg # This hack is so that the source file can tell whether it is being 457854b44505Smrg # built for inclusion in a dll (and should export symbols for example). 457954b44505Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 458054b44505Smrg # (--disable-auto-import) libraries 458154b44505Smrg m4_if([$1], [GCJ], [], 458254b44505Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45830a392d7eSmrg case $host_os in 45840a392d7eSmrg os2*) 45850a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45860a392d7eSmrg ;; 45870a392d7eSmrg esac 458854b44505Smrg ;; 45894a041c5bSmacallan 459054b44505Smrg darwin* | rhapsody*) 459154b44505Smrg # PIC is the default on this platform 459254b44505Smrg # Common symbols not allowed in MH_DYLIB files 459354b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 459454b44505Smrg ;; 45954a041c5bSmacallan 459654b44505Smrg haiku*) 459754b44505Smrg # PIC is the default for Haiku. 459854b44505Smrg # The "-static" flag exists, but is broken. 459954b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 460054b44505Smrg ;; 46014a041c5bSmacallan 460254b44505Smrg hpux*) 460354b44505Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 460454b44505Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 460554b44505Smrg # sets the default TLS model and affects inlining. 460654b44505Smrg case $host_cpu in 460754b44505Smrg hppa*64*) 460854b44505Smrg # +Z the default 460954b44505Smrg ;; 461054b44505Smrg *) 461154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 461254b44505Smrg ;; 461354b44505Smrg esac 461454b44505Smrg ;; 46154a041c5bSmacallan 461654b44505Smrg interix[[3-9]]*) 461754b44505Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 461854b44505Smrg # Instead, we relocate shared libraries at runtime. 461954b44505Smrg ;; 46204a041c5bSmacallan 462154b44505Smrg msdosdjgpp*) 462254b44505Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 462354b44505Smrg # on systems that don't support them. 462454b44505Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 462554b44505Smrg enable_shared=no 462654b44505Smrg ;; 46274a041c5bSmacallan 462854b44505Smrg *nto* | *qnx*) 462954b44505Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 463054b44505Smrg # it will coredump. 463154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 463254b44505Smrg ;; 46334a041c5bSmacallan 463454b44505Smrg sysv4*MP*) 463554b44505Smrg if test -d /usr/nec; then 463654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 463754b44505Smrg fi 463854b44505Smrg ;; 46394a041c5bSmacallan 464054b44505Smrg *) 464154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 464254b44505Smrg ;; 464354b44505Smrg esac 46444a041c5bSmacallan 464554b44505Smrg case $cc_basename in 464654b44505Smrg nvcc*) # Cuda Compiler Driver 2.2 464754b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46480a392d7eSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46490a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46500a392d7eSmrg fi 465154b44505Smrg ;; 465254b44505Smrg esac 465354b44505Smrg else 465454b44505Smrg # PORTME Check for flag to pass linker flags through the system compiler. 465554b44505Smrg case $host_os in 465654b44505Smrg aix*) 465754b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46580a392d7eSmrg if test ia64 = "$host_cpu"; then 465954b44505Smrg # AIX 5 now supports IA64 processor 466054b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 466154b44505Smrg else 466254b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 466354b44505Smrg fi 466454b44505Smrg ;; 46654a041c5bSmacallan 46660a392d7eSmrg darwin* | rhapsody*) 46670a392d7eSmrg # PIC is the default on this platform 46680a392d7eSmrg # Common symbols not allowed in MH_DYLIB files 46690a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46700a392d7eSmrg case $cc_basename in 46710a392d7eSmrg nagfor*) 46720a392d7eSmrg # NAG Fortran compiler 46730a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46740a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46750a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46760a392d7eSmrg ;; 46770a392d7eSmrg esac 46780a392d7eSmrg ;; 46790a392d7eSmrg 468054b44505Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 468154b44505Smrg # This hack is so that the source file can tell whether it is being 468254b44505Smrg # built for inclusion in a dll (and should export symbols for example). 468354b44505Smrg m4_if([$1], [GCJ], [], 468454b44505Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46850a392d7eSmrg case $host_os in 46860a392d7eSmrg os2*) 46870a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46880a392d7eSmrg ;; 46890a392d7eSmrg esac 469054b44505Smrg ;; 46914a041c5bSmacallan 469254b44505Smrg hpux9* | hpux10* | hpux11*) 469354b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 469454b44505Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 469554b44505Smrg # not for PA HP-UX. 469654b44505Smrg case $host_cpu in 469754b44505Smrg hppa*64*|ia64*) 469854b44505Smrg # +Z the default 469954b44505Smrg ;; 470054b44505Smrg *) 470154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 470254b44505Smrg ;; 470354b44505Smrg esac 470454b44505Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47050a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 470654b44505Smrg ;; 47074a041c5bSmacallan 470854b44505Smrg irix5* | irix6* | nonstopux*) 470954b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471054b44505Smrg # PIC (with -KPIC) is the default. 471154b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 471254b44505Smrg ;; 47134a041c5bSmacallan 47140a392d7eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 471554b44505Smrg case $cc_basename in 47160a392d7eSmrg # old Intel for x86_64, which still supported -KPIC. 471754b44505Smrg ecc*) 471854b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 472054b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472154b44505Smrg ;; 472254b44505Smrg # icc used to be incompatible with GCC. 472354b44505Smrg # ICC 10 doesn't accept -KPIC any more. 472454b44505Smrg icc* | ifort*) 472554b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 472654b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 472754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472854b44505Smrg ;; 472954b44505Smrg # Lahey Fortran 8.1. 473054b44505Smrg lf95*) 473154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473254b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 473354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 473454b44505Smrg ;; 473554b44505Smrg nagfor*) 473654b44505Smrg # NAG Fortran compiler 473754b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 473854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473954b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474054b44505Smrg ;; 47410a392d7eSmrg tcc*) 47420a392d7eSmrg # Fabrice Bellard et al's Tiny C Compiler 47430a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47440a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47450a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47460a392d7eSmrg ;; 474754b44505Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 474854b44505Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 474954b44505Smrg # which looks to be a dead project) 475054b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 475254b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 475354b44505Smrg ;; 475454b44505Smrg ccc*) 475554b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475654b44505Smrg # All Alpha code is PIC. 475754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 475854b44505Smrg ;; 475954b44505Smrg xl* | bgxl* | bgf* | mpixl*) 476054b44505Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 476154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 476254b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 476354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 476454b44505Smrg ;; 476554b44505Smrg *) 476654b44505Smrg case `$CC -V 2>&1 | sed 5q` in 47670a392d7eSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 476854b44505Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 476954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477054b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 477254b44505Smrg ;; 47730a392d7eSmrg *Sun\ F* | *Sun*Fortran*) 47740a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47750a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47760a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47770a392d7eSmrg ;; 477854b44505Smrg *Sun\ C*) 477954b44505Smrg # Sun C 5.9 478054b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 478154b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 478254b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478354b44505Smrg ;; 47840a392d7eSmrg *Intel*\ [[CF]]*Compiler*) 47850a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47860a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47870a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47880a392d7eSmrg ;; 47890a392d7eSmrg *Portland\ Group*) 47900a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47910a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47920a392d7eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47930a392d7eSmrg ;; 479454b44505Smrg esac 479554b44505Smrg ;; 479654b44505Smrg esac 479754b44505Smrg ;; 47984a041c5bSmacallan 479954b44505Smrg newsos6) 480054b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 480154b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 480254b44505Smrg ;; 48034a041c5bSmacallan 480454b44505Smrg *nto* | *qnx*) 480554b44505Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 480654b44505Smrg # it will coredump. 480754b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 480854b44505Smrg ;; 48094a041c5bSmacallan 481054b44505Smrg osf3* | osf4* | osf5*) 481154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 481254b44505Smrg # All OSF/1 code is PIC. 481354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 481454b44505Smrg ;; 48154a041c5bSmacallan 481654b44505Smrg rdos*) 481754b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 481854b44505Smrg ;; 48194a041c5bSmacallan 482054b44505Smrg solaris*) 482154b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 482254b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 482354b44505Smrg case $cc_basename in 482454b44505Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 482554b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 482654b44505Smrg *) 482754b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 482854b44505Smrg esac 482954b44505Smrg ;; 48304a041c5bSmacallan 483154b44505Smrg sunos4*) 483254b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 483354b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 483454b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 483554b44505Smrg ;; 48364a041c5bSmacallan 483754b44505Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 483854b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483954b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 484054b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484154b44505Smrg ;; 48424a041c5bSmacallan 484354b44505Smrg sysv4*MP*) 48440a392d7eSmrg if test -d /usr/nec; then 484554b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 484654b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484754b44505Smrg fi 484854b44505Smrg ;; 48494a041c5bSmacallan 485054b44505Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 485154b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485254b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 485354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 485454b44505Smrg ;; 48554a041c5bSmacallan 485654b44505Smrg unicos*) 485754b44505Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485854b44505Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 485954b44505Smrg ;; 48604a041c5bSmacallan 486154b44505Smrg uts4*) 486254b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 486354b44505Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 486454b44505Smrg ;; 48654a041c5bSmacallan 486654b44505Smrg *) 486754b44505Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 486854b44505Smrg ;; 486954b44505Smrg esac 487054b44505Smrg fi 487154b44505Smrg]) 487254b44505Smrgcase $host_os in 48730a392d7eSmrg # For platforms that do not support PIC, -DPIC is meaningless: 487454b44505Smrg *djgpp*) 487554b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 487654b44505Smrg ;; 487754b44505Smrg *) 487854b44505Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 487954b44505Smrg ;; 488054b44505Smrgesac 48814a041c5bSmacallan 488254b44505SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 488354b44505Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 488454b44505Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 488554b44505Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48864a041c5bSmacallan 488754b44505Smrg# 488854b44505Smrg# Check to make sure the PIC flag actually works. 488954b44505Smrg# 489054b44505Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 489154b44505Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 489254b44505Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 489354b44505Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 489454b44505Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 489554b44505Smrg "" | " "*) ;; 489654b44505Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 489754b44505Smrg esac], 489854b44505Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 489954b44505Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 490054b44505Smrgfi 490154b44505Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 490254b44505Smrg [Additional compiler flags for building library objects]) 49034a041c5bSmacallan 490454b44505Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 490554b44505Smrg [How to pass a linker flag through the compiler]) 490654b44505Smrg# 490754b44505Smrg# Check to make sure the static flag actually works. 490854b44505Smrg# 490954b44505Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 491054b44505Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 491154b44505Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 491254b44505Smrg $lt_tmp_static_flag, 491354b44505Smrg [], 491454b44505Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 491554b44505Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 491654b44505Smrg [Compiler flag to prevent dynamic linking]) 491754b44505Smrg])# _LT_COMPILER_PIC 49184a041c5bSmacallan 49194a041c5bSmacallan 492054b44505Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 492154b44505Smrg# ---------------------------- 492254b44505Smrg# See if the linker supports building shared libraries. 492354b44505Smrgm4_defun([_LT_LINKER_SHLIBS], 492454b44505Smrg[AC_REQUIRE([LT_PATH_LD])dnl 492554b44505SmrgAC_REQUIRE([LT_PATH_NM])dnl 492654b44505Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 492754b44505Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 492854b44505Smrgm4_require([_LT_DECL_EGREP])dnl 492954b44505Smrgm4_require([_LT_DECL_SED])dnl 493054b44505Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 493154b44505Smrgm4_require([_LT_TAG_COMPILER])dnl 493254b44505SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 493354b44505Smrgm4_if([$1], [CXX], [ 493454b44505Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 493554b44505Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 493654b44505Smrg case $host_os in 493754b44505Smrg aix[[4-9]]*) 493854b44505Smrg # If we're using GNU nm, then we don't want the "-C" option. 49390a392d7eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49400a392d7eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49410a392d7eSmrg # weak defined symbols like other global defined symbols, whereas 49420a392d7eSmrg # GNU nm marks them as "W". 49430a392d7eSmrg # While the 'weak' keyword is ignored in the Export File, we need 49440a392d7eSmrg # it in the Import File for the 'aix-soname' feature, so we have 49450a392d7eSmrg # to replace the "-B" option with "-P" for AIX nm. 494654b44505Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49470a392d7eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 494854b44505Smrg else 49490a392d7eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 495054b44505Smrg fi 495154b44505Smrg ;; 495254b44505Smrg pw32*) 49530a392d7eSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 495454b44505Smrg ;; 495554b44505Smrg cygwin* | mingw* | cegcc*) 495654b44505Smrg case $cc_basename in 49570a392d7eSmrg cl*) 49580a392d7eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49590a392d7eSmrg ;; 496054b44505Smrg *) 496154b44505Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 496254b44505Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 496354b44505Smrg ;; 496454b44505Smrg esac 496554b44505Smrg ;; 496654b44505Smrg *) 496754b44505Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 496854b44505Smrg ;; 496954b44505Smrg esac 497054b44505Smrg], [ 497154b44505Smrg runpath_var= 497254b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 497354b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=no 497454b44505Smrg _LT_TAGVAR(archive_cmds, $1)= 497554b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 497654b44505Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 497754b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 497854b44505Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 497954b44505Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 498054b44505Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 498154b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 498254b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 498354b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 498454b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 498554b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 498654b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 498754b44505Smrg _LT_TAGVAR(inherit_rpath, $1)=no 498854b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 498954b44505Smrg _LT_TAGVAR(module_cmds, $1)= 499054b44505Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 499154b44505Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 499254b44505Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 499354b44505Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 499454b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 499554b44505Smrg # include_expsyms should be a list of space-separated symbols to be *always* 499654b44505Smrg # included in the symbol list 499754b44505Smrg _LT_TAGVAR(include_expsyms, $1)= 499854b44505Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 49990a392d7eSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50000a392d7eSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50010a392d7eSmrg # as well as any symbol that contains 'd'. 500254b44505Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 500354b44505Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 500454b44505Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 500554b44505Smrg # the symbol is explicitly referenced. Since portable code cannot 500654b44505Smrg # rely on this symbol name, it's probably fine to never include it in 500754b44505Smrg # preloaded symbol tables. 500854b44505Smrg # Exclude shared library initialization/finalization symbols. 500954b44505Smrgdnl Note also adjust exclude_expsyms for C++ above. 501054b44505Smrg extract_expsyms_cmds= 50114a041c5bSmacallan 501254b44505Smrg case $host_os in 501354b44505Smrg cygwin* | mingw* | pw32* | cegcc*) 501454b44505Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 501554b44505Smrg # When not using gcc, we currently assume that we are using 501654b44505Smrg # Microsoft Visual C++. 50170a392d7eSmrg if test yes != "$GCC"; then 501854b44505Smrg with_gnu_ld=no 501954b44505Smrg fi 502054b44505Smrg ;; 502154b44505Smrg interix*) 502254b44505Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 502354b44505Smrg with_gnu_ld=yes 502454b44505Smrg ;; 50250a392d7eSmrg openbsd* | bitrig*) 502654b44505Smrg with_gnu_ld=no 502754b44505Smrg ;; 502854b44505Smrg esac 50294a041c5bSmacallan 503054b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50314a041c5bSmacallan 503254b44505Smrg # On some targets, GNU ld is compatible enough with the native linker 503354b44505Smrg # that we're better off using the native interface for both. 503454b44505Smrg lt_use_gnu_ld_interface=no 50350a392d7eSmrg if test yes = "$with_gnu_ld"; then 503654b44505Smrg case $host_os in 503754b44505Smrg aix*) 503854b44505Smrg # The AIX port of GNU ld has always aspired to compatibility 503954b44505Smrg # with the native linker. However, as the warning in the GNU ld 504054b44505Smrg # block says, versions before 2.19.5* couldn't really create working 504154b44505Smrg # shared libraries, regardless of the interface used. 504254b44505Smrg case `$LD -v 2>&1` in 504354b44505Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 504454b44505Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 504554b44505Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 504654b44505Smrg *) 504754b44505Smrg lt_use_gnu_ld_interface=yes 504854b44505Smrg ;; 504954b44505Smrg esac 505054b44505Smrg ;; 505154b44505Smrg *) 505254b44505Smrg lt_use_gnu_ld_interface=yes 505354b44505Smrg ;; 505454b44505Smrg esac 505554b44505Smrg fi 50564a041c5bSmacallan 50570a392d7eSmrg if test yes = "$lt_use_gnu_ld_interface"; then 505854b44505Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50590a392d7eSmrg wlarc='$wl' 50604a041c5bSmacallan 506154b44505Smrg # Set some defaults for GNU ld with shared library support. These 506254b44505Smrg # are reset later if shared libraries are not supported. Putting them 506354b44505Smrg # here allows them to be overridden if necessary. 506454b44505Smrg runpath_var=LD_RUN_PATH 50650a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50660a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 506754b44505Smrg # ancient GNU ld didn't support --whole-archive et. al. 506854b44505Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50690a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 507054b44505Smrg else 507154b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 507254b44505Smrg fi 507354b44505Smrg supports_anon_versioning=no 50740a392d7eSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 507554b44505Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 507654b44505Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 507754b44505Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 507854b44505Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 507954b44505Smrg *\ 2.11.*) ;; # other 2.11 versions 508054b44505Smrg *) supports_anon_versioning=yes ;; 508154b44505Smrg esac 50824a041c5bSmacallan 508354b44505Smrg # See if GNU ld supports shared libraries. 508454b44505Smrg case $host_os in 508554b44505Smrg aix[[3-9]]*) 508654b44505Smrg # On AIX/PPC, the GNU linker is very broken 50870a392d7eSmrg if test ia64 != "$host_cpu"; then 508854b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 508954b44505Smrg cat <<_LT_EOF 1>&2 50904a041c5bSmacallan 509154b44505Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 509254b44505Smrg*** to be unable to reliably create shared libraries on AIX. 509354b44505Smrg*** Therefore, libtool is disabling shared libraries support. If you 509454b44505Smrg*** really care for shared libraries, you may want to install binutils 509554b44505Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 509654b44505Smrg*** You will then need to restart the configuration process. 50974a041c5bSmacallan 509854b44505Smrg_LT_EOF 509954b44505Smrg fi 510054b44505Smrg ;; 51014a041c5bSmacallan 510254b44505Smrg amigaos*) 510354b44505Smrg case $host_cpu in 510454b44505Smrg powerpc) 510554b44505Smrg # see comment about AmigaOS4 .so support 51060a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 510754b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 510854b44505Smrg ;; 510954b44505Smrg m68k) 511054b44505Smrg _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)' 511154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 511254b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 511354b44505Smrg ;; 511454b44505Smrg esac 511554b44505Smrg ;; 51164a041c5bSmacallan 511754b44505Smrg beos*) 511854b44505Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 511954b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 512054b44505Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 512154b44505Smrg # support --undefined. This deserves some investigation. FIXME 51220a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 512354b44505Smrg else 512454b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 512554b44505Smrg fi 512654b44505Smrg ;; 51274a041c5bSmacallan 512854b44505Smrg cygwin* | mingw* | pw32* | cegcc*) 512954b44505Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 513054b44505Smrg # as there is no search path for DLLs. 513154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51320a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 513354b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 513454b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=no 513554b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 513654b44505Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 513754b44505Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 513854b44505Smrg 513954b44505Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51400a392d7eSmrg _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' 51410a392d7eSmrg # If the export-symbols file already is a .def file, use it as 51420a392d7eSmrg # is; otherwise, prepend EXPORTS... 51430a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51440a392d7eSmrg cp $export_symbols $output_objdir/$soname.def; 51450a392d7eSmrg else 51460a392d7eSmrg echo EXPORTS > $output_objdir/$soname.def; 51470a392d7eSmrg cat $export_symbols >> $output_objdir/$soname.def; 51480a392d7eSmrg fi~ 51490a392d7eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 515054b44505Smrg else 515154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 515254b44505Smrg fi 515354b44505Smrg ;; 51544a041c5bSmacallan 515554b44505Smrg haiku*) 51560a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 515754b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 515854b44505Smrg ;; 51594a041c5bSmacallan 51600a392d7eSmrg os2*) 51610a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51620a392d7eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51630a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51640a392d7eSmrg shrext_cmds=.dll 51650a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51660a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51670a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51680a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51690a392d7eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51700a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51710a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 51720a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51730a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51740a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51750a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51760a392d7eSmrg prefix_cmds="$SED"~ 51770a392d7eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51780a392d7eSmrg prefix_cmds="$prefix_cmds -e 1d"; 51790a392d7eSmrg fi~ 51800a392d7eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51810a392d7eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51820a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51830a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 51840a392d7eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51850a392d7eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51860a392d7eSmrg ;; 51870a392d7eSmrg 518854b44505Smrg interix[[3-9]]*) 518954b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 519054b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 51910a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 51920a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 519354b44505Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 519454b44505Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 519554b44505Smrg # default) and relocated if they conflict, which is a slow very memory 519654b44505Smrg # consuming and fragmenting process. To avoid this, we pick a random, 519754b44505Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 519854b44505Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 51990a392d7eSmrg _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' 52000a392d7eSmrg _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' 520154b44505Smrg ;; 52024a041c5bSmacallan 520354b44505Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 520454b44505Smrg tmp_diet=no 52050a392d7eSmrg if test linux-dietlibc = "$host_os"; then 520654b44505Smrg case $cc_basename in 520754b44505Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 520854b44505Smrg esac 520954b44505Smrg fi 521054b44505Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52110a392d7eSmrg && test no = "$tmp_diet" 521254b44505Smrg then 521354b44505Smrg tmp_addflag=' $pic_flag' 521454b44505Smrg tmp_sharedflag='-shared' 521554b44505Smrg case $cc_basename,$host_cpu in 521654b44505Smrg pgcc*) # Portland Group C compiler 52170a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 521854b44505Smrg tmp_addflag=' $pic_flag' 521954b44505Smrg ;; 522054b44505Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 522154b44505Smrg # Portland Group f77 and f90 compilers 52220a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 522354b44505Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 522454b44505Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 522554b44505Smrg tmp_addflag=' -i_dynamic' ;; 522654b44505Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 522754b44505Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 522854b44505Smrg ifc* | ifort*) # Intel Fortran compiler 522954b44505Smrg tmp_addflag=' -nofor_main' ;; 523054b44505Smrg lf95*) # Lahey Fortran 8.1 523154b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 523254b44505Smrg tmp_sharedflag='--shared' ;; 52330a392d7eSmrg nagfor*) # NAGFOR 5.3 52340a392d7eSmrg tmp_sharedflag='-Wl,-shared' ;; 523554b44505Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 523654b44505Smrg tmp_sharedflag='-qmkshrobj' 523754b44505Smrg tmp_addflag= ;; 523854b44505Smrg nvcc*) # Cuda Compiler Driver 2.2 52390a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 524054b44505Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524154b44505Smrg ;; 524254b44505Smrg esac 524354b44505Smrg case `$CC -V 2>&1 | sed 5q` in 524454b44505Smrg *Sun\ C*) # Sun C 5.9 52450a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 524654b44505Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524754b44505Smrg tmp_sharedflag='-G' ;; 524854b44505Smrg *Sun\ F*) # Sun Fortran 8.3 524954b44505Smrg tmp_sharedflag='-G' ;; 525054b44505Smrg esac 52510a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52524a041c5bSmacallan 52530a392d7eSmrg if test yes = "$supports_anon_versioning"; then 525454b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52550a392d7eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52560a392d7eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52570a392d7eSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 525854b44505Smrg fi 52594a041c5bSmacallan 526054b44505Smrg case $cc_basename in 52610a392d7eSmrg tcc*) 52620a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52630a392d7eSmrg ;; 526454b44505Smrg xlf* | bgf* | bgxlf* | mpixlf*) 526554b44505Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 526654b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52670a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 526854b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52690a392d7eSmrg if test yes = "$supports_anon_versioning"; then 527054b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52710a392d7eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52720a392d7eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52730a392d7eSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 527454b44505Smrg fi 527554b44505Smrg ;; 527654b44505Smrg esac 527754b44505Smrg else 527854b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 527954b44505Smrg fi 528054b44505Smrg ;; 52814a041c5bSmacallan 528254b44505Smrg netbsd*) 528354b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 528454b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 528554b44505Smrg wlarc= 528654b44505Smrg else 52870a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52880a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 528954b44505Smrg fi 529054b44505Smrg ;; 52914a041c5bSmacallan 529254b44505Smrg solaris*) 529354b44505Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 529454b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 529554b44505Smrg cat <<_LT_EOF 1>&2 52964a041c5bSmacallan 529754b44505Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 529854b44505Smrg*** create shared libraries on Solaris systems. Therefore, libtool 529954b44505Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 530054b44505Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 530154b44505Smrg*** your PATH or compiler configuration so that the native linker is 530254b44505Smrg*** used, and then restart. 53034a041c5bSmacallan 530454b44505Smrg_LT_EOF 530554b44505Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53060a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53070a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 530854b44505Smrg else 530954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531054b44505Smrg fi 531154b44505Smrg ;; 53124a041c5bSmacallan 531354b44505Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 531454b44505Smrg case `$LD -v 2>&1` in 531554b44505Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 531654b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531754b44505Smrg cat <<_LT_EOF 1>&2 53184a041c5bSmacallan 53190a392d7eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 532054b44505Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 532154b44505Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 532254b44505Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 532354b44505Smrg*** your PATH or compiler configuration so that the native linker is 532454b44505Smrg*** used, and then restart. 53254a041c5bSmacallan 532654b44505Smrg_LT_EOF 532754b44505Smrg ;; 532854b44505Smrg *) 532954b44505Smrg # For security reasons, it is highly recommended that you always 533054b44505Smrg # use absolute paths for naming shared libraries, and exclude the 533154b44505Smrg # DT_RUNPATH tag from executables and libraries. But doing so 533254b44505Smrg # requires that you compile everything twice, which is a pain. 533354b44505Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53340a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53350a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53360a392d7eSmrg _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' 533754b44505Smrg else 533854b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 533954b44505Smrg fi 534054b44505Smrg ;; 534154b44505Smrg esac 534254b44505Smrg ;; 53434a041c5bSmacallan 534454b44505Smrg sunos4*) 534554b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 534654b44505Smrg wlarc= 534754b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 534854b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 534954b44505Smrg ;; 53504a041c5bSmacallan 535154b44505Smrg *) 535254b44505Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53530a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53540a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 535554b44505Smrg else 535654b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 535754b44505Smrg fi 535854b44505Smrg ;; 535954b44505Smrg esac 53604a041c5bSmacallan 53610a392d7eSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 536254b44505Smrg runpath_var= 536354b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 536454b44505Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 536554b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 536654b44505Smrg fi 536754b44505Smrg else 536854b44505Smrg # PORTME fill in a description of your system's linker (not GNU ld) 536954b44505Smrg case $host_os in 537054b44505Smrg aix3*) 537154b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 537254b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 537354b44505Smrg _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' 537454b44505Smrg # Note: this linker hardcodes the directories in LIBPATH if there 537554b44505Smrg # are no directories specified by -L. 537654b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53770a392d7eSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 537854b44505Smrg # Neither direct hardcoding nor static linking is supported with a 537954b44505Smrg # broken collect2. 538054b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 538154b44505Smrg fi 538254b44505Smrg ;; 53834a041c5bSmacallan 538454b44505Smrg aix[[4-9]]*) 53850a392d7eSmrg if test ia64 = "$host_cpu"; then 538654b44505Smrg # On IA64, the linker does run time linking by default, so we don't 538754b44505Smrg # have to do anything special. 538854b44505Smrg aix_use_runtimelinking=no 538954b44505Smrg exp_sym_flag='-Bexport' 53900a392d7eSmrg no_entry_flag= 539154b44505Smrg else 539254b44505Smrg # If we're using GNU nm, then we don't want the "-C" option. 53930a392d7eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 53940a392d7eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 53950a392d7eSmrg # weak defined symbols like other global defined symbols, whereas 53960a392d7eSmrg # GNU nm marks them as "W". 53970a392d7eSmrg # While the 'weak' keyword is ignored in the Export File, we need 53980a392d7eSmrg # it in the Import File for the 'aix-soname' feature, so we have 53990a392d7eSmrg # to replace the "-B" option with "-P" for AIX nm. 540054b44505Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54010a392d7eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 540254b44505Smrg else 54030a392d7eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 540454b44505Smrg fi 540554b44505Smrg aix_use_runtimelinking=no 54064a041c5bSmacallan 540754b44505Smrg # Test if we are trying to use run time linking or normal 540854b44505Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54090a392d7eSmrg # have runtime linking enabled, and use it for executables. 54100a392d7eSmrg # For shared libraries, we enable/disable runtime linking 54110a392d7eSmrg # depending on the kind of the shared library created - 54120a392d7eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 54130a392d7eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54140a392d7eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 54150a392d7eSmrg # lib.a static archive 54160a392d7eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54170a392d7eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 54180a392d7eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54190a392d7eSmrg # lib.a(lib.so.V) shared, rtl:no 54200a392d7eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54210a392d7eSmrg # lib.a static archive 542254b44505Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 542354b44505Smrg for ld_flag in $LDFLAGS; do 54240a392d7eSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 542554b44505Smrg aix_use_runtimelinking=yes 542654b44505Smrg break 542754b44505Smrg fi 542854b44505Smrg done 54290a392d7eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54300a392d7eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54310a392d7eSmrg # so we don't have lib.a shared libs to link our executables. 54320a392d7eSmrg # We have to force runtime linking in this case. 54330a392d7eSmrg aix_use_runtimelinking=yes 54340a392d7eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54350a392d7eSmrg fi 543654b44505Smrg ;; 543754b44505Smrg esac 54384a041c5bSmacallan 543954b44505Smrg exp_sym_flag='-bexport' 544054b44505Smrg no_entry_flag='-bnoentry' 544154b44505Smrg fi 54424a041c5bSmacallan 544354b44505Smrg # When large executables or shared objects are built, AIX ld can 544454b44505Smrg # have problems creating the table of contents. If linking a library 544554b44505Smrg # or program results in "error TOC overflow" add -mminimal-toc to 544654b44505Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 544754b44505Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54484a041c5bSmacallan 544954b44505Smrg _LT_TAGVAR(archive_cmds, $1)='' 545054b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 545154b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 545254b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 545354b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54540a392d7eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54550a392d7eSmrg case $with_aix_soname,$aix_use_runtimelinking in 54560a392d7eSmrg aix,*) ;; # traditional, no import file 54570a392d7eSmrg svr4,* | *,yes) # use import file 54580a392d7eSmrg # The Import File defines what to hardcode. 54590a392d7eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 54600a392d7eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54610a392d7eSmrg ;; 54620a392d7eSmrg esac 54634a041c5bSmacallan 54640a392d7eSmrg if test yes = "$GCC"; then 546554b44505Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 546654b44505Smrg # We only want to do this on AIX 4.2 and lower, the check 546754b44505Smrg # below for broken collect2 doesn't work under 4.3+ 54680a392d7eSmrg collect2name=`$CC -print-prog-name=collect2` 546954b44505Smrg if test -f "$collect2name" && 547054b44505Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 547154b44505Smrg then 547254b44505Smrg # We have reworked collect2 547354b44505Smrg : 547454b44505Smrg else 547554b44505Smrg # We have old collect2 547654b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 547754b44505Smrg # It fails to find uninstalled libraries when the uninstalled 547854b44505Smrg # path is not listed in the libpath. Setting hardcode_minus_L 547954b44505Smrg # to unsupported forces relinking 548054b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 548154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548254b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 548354b44505Smrg fi 548454b44505Smrg ;; 548554b44505Smrg esac 548654b44505Smrg shared_flag='-shared' 54870a392d7eSmrg if test yes = "$aix_use_runtimelinking"; then 54880a392d7eSmrg shared_flag="$shared_flag "'$wl-G' 548954b44505Smrg fi 54900a392d7eSmrg # Need to ensure runtime linking is disabled for the traditional 54910a392d7eSmrg # shared library, or the linker may eventually find shared libraries 54920a392d7eSmrg # /with/ Import File - we do not want to mix them. 54930a392d7eSmrg shared_flag_aix='-shared' 54940a392d7eSmrg shared_flag_svr4='-shared $wl-G' 549554b44505Smrg else 549654b44505Smrg # not using gcc 54970a392d7eSmrg if test ia64 = "$host_cpu"; then 549854b44505Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 549954b44505Smrg # chokes on -Wl,-G. The following line is correct: 550054b44505Smrg shared_flag='-G' 550154b44505Smrg else 55020a392d7eSmrg if test yes = "$aix_use_runtimelinking"; then 55030a392d7eSmrg shared_flag='$wl-G' 550454b44505Smrg else 55050a392d7eSmrg shared_flag='$wl-bM:SRE' 550654b44505Smrg fi 55070a392d7eSmrg shared_flag_aix='$wl-bM:SRE' 55080a392d7eSmrg shared_flag_svr4='$wl-G' 550954b44505Smrg fi 551054b44505Smrg fi 55114a041c5bSmacallan 55120a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 551354b44505Smrg # It seems that -bexpall does not export symbols beginning with 551454b44505Smrg # underscore (_), so it is better to generate a list of symbols to export. 551554b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55160a392d7eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 551754b44505Smrg # Warning - without using the other runtime loading flags (-brtl), 551854b44505Smrg # -berok will link without error, but may produce a broken library. 551954b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 552054b44505Smrg # Determine the default libpath from the value encoded in an 552154b44505Smrg # empty executable. 552254b44505Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55230a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55240a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 552554b44505Smrg else 55260a392d7eSmrg if test ia64 = "$host_cpu"; then 55270a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 552854b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55290a392d7eSmrg _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" 553054b44505Smrg else 553154b44505Smrg # Determine the default libpath from the value encoded in an 553254b44505Smrg # empty executable. 553354b44505Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55340a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 553554b44505Smrg # Warning - without using the other run time loading flags, 553654b44505Smrg # -berok will link without error, but may produce a broken library. 55370a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55380a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55390a392d7eSmrg if test yes = "$with_gnu_ld"; then 554054b44505Smrg # We only use this code for GNU lds that support --whole-archive. 55410a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 554254b44505Smrg else 554354b44505Smrg # Exported symbols can be pulled into shared objects from archives 554454b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 554554b44505Smrg fi 554654b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55470a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55480a392d7eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55490a392d7eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55500a392d7eSmrg if test svr4 != "$with_aix_soname"; then 55510a392d7eSmrg # This is similar to how AIX traditionally builds its shared libraries. 55520a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 55530a392d7eSmrg fi 55540a392d7eSmrg if test aix != "$with_aix_soname"; then 55550a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 55560a392d7eSmrg else 55570a392d7eSmrg # used by -dlpreopen to get the symbols 55580a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55590a392d7eSmrg fi 55600a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 556154b44505Smrg fi 556254b44505Smrg fi 556354b44505Smrg ;; 55644a041c5bSmacallan 556554b44505Smrg amigaos*) 556654b44505Smrg case $host_cpu in 556754b44505Smrg powerpc) 556854b44505Smrg # see comment about AmigaOS4 .so support 55690a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 557054b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 557154b44505Smrg ;; 557254b44505Smrg m68k) 557354b44505Smrg _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)' 557454b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 557554b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 557654b44505Smrg ;; 557754b44505Smrg esac 557854b44505Smrg ;; 55794a041c5bSmacallan 558054b44505Smrg bsdi[[45]]*) 558154b44505Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 558254b44505Smrg ;; 55834a041c5bSmacallan 558454b44505Smrg cygwin* | mingw* | pw32* | cegcc*) 558554b44505Smrg # When not using gcc, we currently assume that we are using 558654b44505Smrg # Microsoft Visual C++. 558754b44505Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 558854b44505Smrg # no search path for DLLs. 558954b44505Smrg case $cc_basename in 559054b44505Smrg cl*) 559154b44505Smrg # Native MSVC 559254b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 559354b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 559454b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 559554b44505Smrg _LT_TAGVAR(file_list_spec, $1)='@' 559654b44505Smrg # Tell ltmain to make .lib files, not .a files. 559754b44505Smrg libext=lib 559854b44505Smrg # Tell ltmain to make .dll files, not .so files. 55990a392d7eSmrg shrext_cmds=.dll 560054b44505Smrg # FIXME: Setting linknames here is a bad hack. 56010a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56020a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56030a392d7eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 56040a392d7eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56050a392d7eSmrg else 56060a392d7eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56070a392d7eSmrg fi~ 56080a392d7eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56090a392d7eSmrg linknames=' 561054b44505Smrg # The linker will not automatically build a static lib if we build a DLL. 561154b44505Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 561254b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56130a392d7eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 561454b44505Smrg _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' 561554b44505Smrg # Don't use ranlib 561654b44505Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 561754b44505Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56180a392d7eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56190a392d7eSmrg case $lt_outputfile in 56200a392d7eSmrg *.exe|*.EXE) ;; 56210a392d7eSmrg *) 56220a392d7eSmrg lt_outputfile=$lt_outputfile.exe 56230a392d7eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 56240a392d7eSmrg ;; 56250a392d7eSmrg esac~ 56260a392d7eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56270a392d7eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56280a392d7eSmrg $RM "$lt_outputfile.manifest"; 56290a392d7eSmrg fi' 563054b44505Smrg ;; 563154b44505Smrg *) 563254b44505Smrg # Assume MSVC wrapper 563354b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 563454b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 563554b44505Smrg # Tell ltmain to make .lib files, not .a files. 563654b44505Smrg libext=lib 563754b44505Smrg # Tell ltmain to make .dll files, not .so files. 56380a392d7eSmrg shrext_cmds=.dll 563954b44505Smrg # FIXME: Setting linknames here is a bad hack. 564054b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 564154b44505Smrg # The linker will automatically build a .lib file if we build a DLL. 564254b44505Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 564354b44505Smrg # FIXME: Should let the user specify the lib program. 564454b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 564554b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 564654b44505Smrg ;; 564754b44505Smrg esac 564854b44505Smrg ;; 56494a041c5bSmacallan 565054b44505Smrg darwin* | rhapsody*) 565154b44505Smrg _LT_DARWIN_LINKER_FEATURES($1) 565254b44505Smrg ;; 56534a041c5bSmacallan 565454b44505Smrg dgux*) 565554b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 565654b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 565754b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 565854b44505Smrg ;; 56594a041c5bSmacallan 566054b44505Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 566154b44505Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 566254b44505Smrg # does not break anything, and helps significantly (at the cost of a little 566354b44505Smrg # extra space). 566454b44505Smrg freebsd2.2*) 566554b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 566654b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 566754b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 566854b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566954b44505Smrg ;; 56704a041c5bSmacallan 567154b44505Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56720a392d7eSmrg freebsd2.*) 567354b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 567454b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567554b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 567654b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567754b44505Smrg ;; 56784a041c5bSmacallan 567954b44505Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 568054b44505Smrg freebsd* | dragonfly*) 568154b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 568254b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 568354b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 568454b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 568554b44505Smrg ;; 56864a041c5bSmacallan 568754b44505Smrg hpux9*) 56880a392d7eSmrg if test yes = "$GCC"; then 56890a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 569054b44505Smrg else 56910a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 569254b44505Smrg fi 56930a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 569454b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 569554b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56964a041c5bSmacallan 569754b44505Smrg # hardcode_minus_L: Not really in the search PATH, 569854b44505Smrg # but as the default location of the library. 569954b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57000a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 570154b44505Smrg ;; 57024a041c5bSmacallan 570354b44505Smrg hpux10*) 57040a392d7eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57050a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 570654b44505Smrg else 570754b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 570854b44505Smrg fi 57090a392d7eSmrg if test no = "$with_gnu_ld"; then 57100a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 571154b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 571254b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 571354b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57140a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 571554b44505Smrg # hardcode_minus_L: Not really in the search PATH, 571654b44505Smrg # but as the default location of the library. 571754b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 571854b44505Smrg fi 571954b44505Smrg ;; 57204a041c5bSmacallan 572154b44505Smrg hpux11*) 57220a392d7eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 572354b44505Smrg case $host_cpu in 572454b44505Smrg hppa*64*) 57250a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 572654b44505Smrg ;; 572754b44505Smrg ia64*) 57280a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 572954b44505Smrg ;; 573054b44505Smrg *) 57310a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 573254b44505Smrg ;; 573354b44505Smrg esac 573454b44505Smrg else 573554b44505Smrg case $host_cpu in 573654b44505Smrg hppa*64*) 57370a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 573854b44505Smrg ;; 573954b44505Smrg ia64*) 57400a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 574154b44505Smrg ;; 574254b44505Smrg *) 574354b44505Smrg m4_if($1, [], [ 574454b44505Smrg # Older versions of the 11.00 compiler do not understand -b yet 574554b44505Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 574654b44505Smrg _LT_LINKER_OPTION([if $CC understands -b], 574754b44505Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57480a392d7eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 574954b44505Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57500a392d7eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 575154b44505Smrg ;; 575254b44505Smrg esac 575354b44505Smrg fi 57540a392d7eSmrg if test no = "$with_gnu_ld"; then 57550a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 575654b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57574a041c5bSmacallan 575854b44505Smrg case $host_cpu in 575954b44505Smrg hppa*64*|ia64*) 576054b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 576154b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 576254b44505Smrg ;; 576354b44505Smrg *) 576454b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 576554b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57660a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57674a041c5bSmacallan 576854b44505Smrg # hardcode_minus_L: Not really in the search PATH, 576954b44505Smrg # but as the default location of the library. 577054b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 577154b44505Smrg ;; 577254b44505Smrg esac 577354b44505Smrg fi 577454b44505Smrg ;; 57754a041c5bSmacallan 577654b44505Smrg irix5* | irix6* | nonstopux*) 57770a392d7eSmrg if test yes = "$GCC"; then 57780a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 577954b44505Smrg # Try to use the -exported_symbol ld option, if it does not 578054b44505Smrg # work, assume that -exports_file does not work either and 578154b44505Smrg # implicitly export all symbols. 578254b44505Smrg # This should be the same for all languages, so no per-tag cache variable. 578354b44505Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 578454b44505Smrg [lt_cv_irix_exported_symbol], 57850a392d7eSmrg [save_LDFLAGS=$LDFLAGS 57860a392d7eSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 578754b44505Smrg AC_LINK_IFELSE( 578854b44505Smrg [AC_LANG_SOURCE( 578954b44505Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 579054b44505Smrg [C++], [[int foo (void) { return 0; }]], 579154b44505Smrg [Fortran 77], [[ 579254b44505Smrg subroutine foo 579354b44505Smrg end]], 579454b44505Smrg [Fortran], [[ 579554b44505Smrg subroutine foo 579654b44505Smrg end]])])], 579754b44505Smrg [lt_cv_irix_exported_symbol=yes], 579854b44505Smrg [lt_cv_irix_exported_symbol=no]) 57990a392d7eSmrg LDFLAGS=$save_LDFLAGS]) 58000a392d7eSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 58010a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 580254b44505Smrg fi 580354b44505Smrg else 58040a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 58050a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 580654b44505Smrg fi 580754b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58080a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 580954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 581054b44505Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 581154b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 581254b44505Smrg ;; 58134a041c5bSmacallan 58140a392d7eSmrg linux*) 58150a392d7eSmrg case $cc_basename in 58160a392d7eSmrg tcc*) 58170a392d7eSmrg # Fabrice Bellard et al's Tiny C Compiler 58180a392d7eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 58190a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58200a392d7eSmrg ;; 58210a392d7eSmrg esac 58220a392d7eSmrg ;; 58230a392d7eSmrg 582454b44505Smrg netbsd*) 582554b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 582654b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 582754b44505Smrg else 582854b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 582954b44505Smrg fi 583054b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 583154b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583254b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 583354b44505Smrg ;; 58344a041c5bSmacallan 583554b44505Smrg newsos6) 583654b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 583754b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58380a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 583954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 584054b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584154b44505Smrg ;; 58424a041c5bSmacallan 584354b44505Smrg *nto* | *qnx*) 584454b44505Smrg ;; 58454a041c5bSmacallan 58460a392d7eSmrg openbsd* | bitrig*) 584754b44505Smrg if test -f /usr/libexec/ld.so; then 584854b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 584954b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 585054b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58510a392d7eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 585254b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58530a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58540a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58550a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 585654b44505Smrg else 58570a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58580a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585954b44505Smrg fi 586054b44505Smrg else 586154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 586254b44505Smrg fi 586354b44505Smrg ;; 58644a041c5bSmacallan 586554b44505Smrg os2*) 586654b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 586754b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 586854b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58690a392d7eSmrg shrext_cmds=.dll 58700a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58710a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58720a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58730a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58740a392d7eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58750a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58760a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 58770a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58780a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58790a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58800a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58810a392d7eSmrg prefix_cmds="$SED"~ 58820a392d7eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58830a392d7eSmrg prefix_cmds="$prefix_cmds -e 1d"; 58840a392d7eSmrg fi~ 58850a392d7eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58860a392d7eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58870a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58880a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 58890a392d7eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 58900a392d7eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 589154b44505Smrg ;; 58924a041c5bSmacallan 589354b44505Smrg osf3*) 58940a392d7eSmrg if test yes = "$GCC"; then 58950a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 58960a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 589754b44505Smrg else 589854b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 58990a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 590054b44505Smrg fi 590154b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59020a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 590354b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 590454b44505Smrg ;; 59054a041c5bSmacallan 590654b44505Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59070a392d7eSmrg if test yes = "$GCC"; then 59080a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59090a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 59100a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 591154b44505Smrg else 591254b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59130a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 591454b44505Smrg _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~ 59150a392d7eSmrg $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 59164a041c5bSmacallan 591754b44505Smrg # Both c and cxx compiler support -rpath directly 591854b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 591954b44505Smrg fi 592054b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 592154b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 592254b44505Smrg ;; 59234a041c5bSmacallan 592454b44505Smrg solaris*) 592554b44505Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59260a392d7eSmrg if test yes = "$GCC"; then 59270a392d7eSmrg wlarc='$wl' 59280a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 592954b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59300a392d7eSmrg $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 593154b44505Smrg else 593254b44505Smrg case `$CC -V 2>&1` in 593354b44505Smrg *"Compilers 5.0"*) 593454b44505Smrg wlarc='' 59350a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 593654b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59370a392d7eSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 593854b44505Smrg ;; 593954b44505Smrg *) 59400a392d7eSmrg wlarc='$wl' 59410a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 594254b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59430a392d7eSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 594454b44505Smrg ;; 594554b44505Smrg esac 594654b44505Smrg fi 594754b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 594854b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 594954b44505Smrg case $host_os in 595054b44505Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 595154b44505Smrg *) 595254b44505Smrg # The compiler driver will combine and reorder linker options, 59530a392d7eSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 595454b44505Smrg # but is careful enough not to reorder. 595554b44505Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59560a392d7eSmrg if test yes = "$GCC"; then 59570a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 595854b44505Smrg else 595954b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 596054b44505Smrg fi 596154b44505Smrg ;; 596254b44505Smrg esac 596354b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 596454b44505Smrg ;; 59654a041c5bSmacallan 596654b44505Smrg sunos4*) 59670a392d7eSmrg if test sequent = "$host_vendor"; then 596854b44505Smrg # Use $CC to link under sequent, because it throws in some extra .o 596954b44505Smrg # files that make .init and .fini sections work. 59700a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 597154b44505Smrg else 597254b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 597354b44505Smrg fi 597454b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 597554b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 597654b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 597754b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 597854b44505Smrg ;; 59794a041c5bSmacallan 598054b44505Smrg sysv4) 598154b44505Smrg case $host_vendor in 598254b44505Smrg sni) 598354b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 598454b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 598554b44505Smrg ;; 598654b44505Smrg siemens) 598754b44505Smrg ## LD is ld it makes a PLAMLIB 598854b44505Smrg ## CC just makes a GrossModule. 598954b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 599054b44505Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 599154b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 599254b44505Smrg ;; 599354b44505Smrg motorola) 599454b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599554b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 599654b44505Smrg ;; 599754b44505Smrg esac 599854b44505Smrg runpath_var='LD_RUN_PATH' 599954b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600054b44505Smrg ;; 60014a041c5bSmacallan 600254b44505Smrg sysv4.3*) 600354b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 600454b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600554b44505Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 600654b44505Smrg ;; 60074a041c5bSmacallan 600854b44505Smrg sysv4*MP*) 600954b44505Smrg if test -d /usr/nec; then 601054b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601154b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 601254b44505Smrg runpath_var=LD_RUN_PATH 601354b44505Smrg hardcode_runpath_var=yes 601454b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 601554b44505Smrg fi 601654b44505Smrg ;; 60174a041c5bSmacallan 601854b44505Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60190a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 602054b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 602154b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 602254b44505Smrg runpath_var='LD_RUN_PATH' 60234a041c5bSmacallan 60240a392d7eSmrg if test yes = "$GCC"; then 60250a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60260a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602754b44505Smrg else 60280a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60290a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603054b44505Smrg fi 603154b44505Smrg ;; 60324a041c5bSmacallan 603354b44505Smrg sysv5* | sco3.2v5* | sco5v6*) 60340a392d7eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 603554b44505Smrg # link with -lc, and that would cause any symbols used from libc to 603654b44505Smrg # always be unresolved, which means just about no library would 603754b44505Smrg # ever link correctly. If we're not using GNU ld we use -z text 603854b44505Smrg # though, which does catch some bad symbols but isn't as heavy-handed 603954b44505Smrg # as -z defs. 60400a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60410a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 604254b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 604354b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60440a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 604554b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604654b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60470a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 604854b44505Smrg runpath_var='LD_RUN_PATH' 60494a041c5bSmacallan 60500a392d7eSmrg if test yes = "$GCC"; then 60510a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60520a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605354b44505Smrg else 60540a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60550a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605654b44505Smrg fi 605754b44505Smrg ;; 60584a041c5bSmacallan 605954b44505Smrg uts4*) 606054b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 606154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606254b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 606354b44505Smrg ;; 60644a041c5bSmacallan 606554b44505Smrg *) 606654b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 606754b44505Smrg ;; 606854b44505Smrg esac 60694a041c5bSmacallan 60700a392d7eSmrg if test sni = "$host_vendor"; then 607154b44505Smrg case $host in 607254b44505Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60730a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 607454b44505Smrg ;; 607554b44505Smrg esac 607654b44505Smrg fi 60774a041c5bSmacallan fi 607854b44505Smrg]) 607954b44505SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60800a392d7eSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60814a041c5bSmacallan 608254b44505Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60834a041c5bSmacallan 608454b44505Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 608554b44505Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 608654b44505Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 608754b44505Smrg [The commands to extract the exported symbol list from a shared archive]) 60884a041c5bSmacallan 608954b44505Smrg# 609054b44505Smrg# Do we need to explicitly link libc? 609154b44505Smrg# 609254b44505Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 609354b44505Smrgx|xyes) 609454b44505Smrg # Assume -lc should be added 609554b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60964a041c5bSmacallan 60970a392d7eSmrg if test yes,yes = "$GCC,$enable_shared"; then 609854b44505Smrg case $_LT_TAGVAR(archive_cmds, $1) in 609954b44505Smrg *'~'*) 610054b44505Smrg # FIXME: we may have to deal with multi-command sequences. 610154b44505Smrg ;; 610254b44505Smrg '$CC '*) 610354b44505Smrg # Test whether the compiler implicitly links with -lc since on some 610454b44505Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 610554b44505Smrg # to ld, don't add -lc before -lgcc. 610654b44505Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 610754b44505Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 610854b44505Smrg [$RM conftest* 610954b44505Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 611054b44505Smrg 611154b44505Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 611254b44505Smrg soname=conftest 611354b44505Smrg lib=conftest 611454b44505Smrg libobjs=conftest.$ac_objext 611554b44505Smrg deplibs= 611654b44505Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 611754b44505Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 611854b44505Smrg compiler_flags=-v 611954b44505Smrg linker_flags=-v 612054b44505Smrg verstring= 612154b44505Smrg output_objdir=. 612254b44505Smrg libname=conftest 612354b44505Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 612454b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 612554b44505Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 612654b44505Smrg then 612754b44505Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 612854b44505Smrg else 612954b44505Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 613054b44505Smrg fi 613154b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 613254b44505Smrg else 613354b44505Smrg cat conftest.err 1>&5 613454b44505Smrg fi 613554b44505Smrg $RM conftest* 613654b44505Smrg ]) 613754b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 613854b44505Smrg ;; 613954b44505Smrg esac 61404a041c5bSmacallan fi 61414a041c5bSmacallan ;; 61424a041c5bSmacallanesac 61434a041c5bSmacallan 614454b44505Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 614554b44505Smrg [Whether or not to add -lc for building shared libraries]) 614654b44505Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 614754b44505Smrg [enable_shared_with_static_runtimes], [0], 614854b44505Smrg [Whether or not to disallow shared libs when runtime libs are static]) 614954b44505Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 615054b44505Smrg [Compiler flag to allow reflexive dlopens]) 615154b44505Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 615254b44505Smrg [Compiler flag to generate shared objects directly from archives]) 615354b44505Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 615454b44505Smrg [Whether the compiler copes with passing no objects directly]) 615554b44505Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 615654b44505Smrg [Create an old-style archive from a shared archive]) 615754b44505Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 615854b44505Smrg [Create a temporary old-style archive to link instead of a shared archive]) 615954b44505Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 616054b44505Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 616154b44505Smrg_LT_TAGDECL([], [module_cmds], [2], 616254b44505Smrg [Commands used to build a loadable module if different from building 616354b44505Smrg a shared archive.]) 616454b44505Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 616554b44505Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 616654b44505Smrg [Whether we are building with GNU ld or not]) 616754b44505Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 616854b44505Smrg [Flag that allows shared libraries with undefined symbols to be built]) 616954b44505Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 617054b44505Smrg [Flag that enforces no undefined symbols]) 617154b44505Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 617254b44505Smrg [Flag to hardcode $libdir into a binary during linking. 617354b44505Smrg This must work even if $libdir does not exist]) 617454b44505Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 617554b44505Smrg [Whether we need a single "-rpath" flag with a separated argument]) 617654b44505Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61770a392d7eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 617854b44505Smrg DIR into the resulting binary]) 617954b44505Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61800a392d7eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 618154b44505Smrg DIR into the resulting binary and the resulting library dependency is 61820a392d7eSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 618354b44505Smrg library is relocated]) 618454b44505Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 618554b44505Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 618654b44505Smrg into the resulting binary]) 618754b44505Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 618854b44505Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 618954b44505Smrg into the resulting binary]) 619054b44505Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 619154b44505Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 619254b44505Smrg into the library and all subsequent libraries and executables linked 619354b44505Smrg against it]) 619454b44505Smrg_LT_TAGDECL([], [inherit_rpath], [0], 619554b44505Smrg [Set to yes if linker adds runtime paths of dependent libraries 619654b44505Smrg to runtime path list]) 619754b44505Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 619854b44505Smrg [Whether libtool must link a program against all its dependency libraries]) 619954b44505Smrg_LT_TAGDECL([], [always_export_symbols], [0], 620054b44505Smrg [Set to "yes" if exported symbols are required]) 620154b44505Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 620254b44505Smrg [The commands to list exported symbols]) 620354b44505Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 620454b44505Smrg [Symbols that should not be listed in the preloaded symbols]) 620554b44505Smrg_LT_TAGDECL([], [include_expsyms], [1], 620654b44505Smrg [Symbols that must always be exported]) 620754b44505Smrg_LT_TAGDECL([], [prelink_cmds], [2], 620854b44505Smrg [Commands necessary for linking programs (against libraries) with templates]) 620954b44505Smrg_LT_TAGDECL([], [postlink_cmds], [2], 621054b44505Smrg [Commands necessary for finishing linking programs]) 621154b44505Smrg_LT_TAGDECL([], [file_list_spec], [1], 621254b44505Smrg [Specify filename containing input files]) 621354b44505Smrgdnl FIXME: Not yet implemented 621454b44505Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 621554b44505Smrgdnl [Compiler flag to generate thread safe objects]) 621654b44505Smrg])# _LT_LINKER_SHLIBS 621754b44505Smrg 621854b44505Smrg 621954b44505Smrg# _LT_LANG_C_CONFIG([TAG]) 622054b44505Smrg# ------------------------ 622154b44505Smrg# Ensure that the configuration variables for a C compiler are suitably 622254b44505Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62230a392d7eSmrg# the compiler configuration to 'libtool'. 622454b44505Smrgm4_defun([_LT_LANG_C_CONFIG], 622554b44505Smrg[m4_require([_LT_DECL_EGREP])dnl 62260a392d7eSmrglt_save_CC=$CC 622754b44505SmrgAC_LANG_PUSH(C) 62284a041c5bSmacallan 622954b44505Smrg# Source file extension for C test sources. 623054b44505Smrgac_ext=c 623154b44505Smrg 623254b44505Smrg# Object file extension for compiled C test sources. 623354b44505Smrgobjext=o 623454b44505Smrg_LT_TAGVAR(objext, $1)=$objext 62354a041c5bSmacallan 623654b44505Smrg# Code to be used in simple compile tests 623754b44505Smrglt_simple_compile_test_code="int some_variable = 0;" 62384a041c5bSmacallan 623954b44505Smrg# Code to be used in simple link tests 624054b44505Smrglt_simple_link_test_code='int main(){return(0);}' 62414a041c5bSmacallan 624254b44505Smrg_LT_TAG_COMPILER 624354b44505Smrg# Save the default compiler, since it gets overwritten when the other 624454b44505Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 624554b44505Smrgcompiler_DEFAULT=$CC 62464a041c5bSmacallan 624754b44505Smrg# save warnings/boilerplate of simple test code 624854b44505Smrg_LT_COMPILER_BOILERPLATE 624954b44505Smrg_LT_LINKER_BOILERPLATE 62504a041c5bSmacallan 625154b44505Smrgif test -n "$compiler"; then 625254b44505Smrg _LT_COMPILER_NO_RTTI($1) 625354b44505Smrg _LT_COMPILER_PIC($1) 625454b44505Smrg _LT_COMPILER_C_O($1) 625554b44505Smrg _LT_COMPILER_FILE_LOCKS($1) 625654b44505Smrg _LT_LINKER_SHLIBS($1) 625754b44505Smrg _LT_SYS_DYNAMIC_LINKER($1) 625854b44505Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 625954b44505Smrg LT_SYS_DLOPEN_SELF 626054b44505Smrg _LT_CMD_STRIPLIB 626154b44505Smrg 62620a392d7eSmrg # Report what library types will actually be built 626354b44505Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 626454b44505Smrg AC_MSG_RESULT([$can_build_shared]) 626554b44505Smrg 626654b44505Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62670a392d7eSmrg test no = "$can_build_shared" && enable_shared=no 626854b44505Smrg 626954b44505Smrg # On AIX, shared libraries and static libraries use the same namespace, and 627054b44505Smrg # are all built from PIC. 627154b44505Smrg case $host_os in 627254b44505Smrg aix3*) 62730a392d7eSmrg test yes = "$enable_shared" && enable_static=no 627454b44505Smrg if test -n "$RANLIB"; then 627554b44505Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 627654b44505Smrg postinstall_cmds='$RANLIB $lib' 627754b44505Smrg fi 627854b44505Smrg ;; 62794a041c5bSmacallan 628054b44505Smrg aix[[4-9]]*) 62810a392d7eSmrg if test ia64 != "$host_cpu"; then 62820a392d7eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 62830a392d7eSmrg yes,aix,yes) ;; # shared object as lib.so file only 62840a392d7eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 62850a392d7eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 62860a392d7eSmrg esac 628754b44505Smrg fi 628854b44505Smrg ;; 628954b44505Smrg esac 629054b44505Smrg AC_MSG_RESULT([$enable_shared]) 62914a041c5bSmacallan 629254b44505Smrg AC_MSG_CHECKING([whether to build static libraries]) 629354b44505Smrg # Make sure either enable_shared or enable_static is yes. 62940a392d7eSmrg test yes = "$enable_shared" || enable_static=yes 629554b44505Smrg AC_MSG_RESULT([$enable_static]) 62964a041c5bSmacallan 629754b44505Smrg _LT_CONFIG($1) 629854b44505Smrgfi 629954b44505SmrgAC_LANG_POP 63000a392d7eSmrgCC=$lt_save_CC 630154b44505Smrg])# _LT_LANG_C_CONFIG 63024a041c5bSmacallan 63034a041c5bSmacallan 630454b44505Smrg# _LT_LANG_CXX_CONFIG([TAG]) 630554b44505Smrg# -------------------------- 630654b44505Smrg# Ensure that the configuration variables for a C++ compiler are suitably 630754b44505Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63080a392d7eSmrg# the compiler configuration to 'libtool'. 630954b44505Smrgm4_defun([_LT_LANG_CXX_CONFIG], 631054b44505Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 631154b44505Smrgm4_require([_LT_DECL_EGREP])dnl 631254b44505Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63130a392d7eSmrgif test -n "$CXX" && ( test no != "$CXX" && 63140a392d7eSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63150a392d7eSmrg (test g++ != "$CXX"))); then 631654b44505Smrg AC_PROG_CXXCPP 631754b44505Smrgelse 631854b44505Smrg _lt_caught_CXX_error=yes 631954b44505Smrgfi 63204a041c5bSmacallan 632154b44505SmrgAC_LANG_PUSH(C++) 632254b44505Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 632354b44505Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 632454b44505Smrg_LT_TAGVAR(always_export_symbols, $1)=no 632554b44505Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 632654b44505Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 632754b44505Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 632854b44505Smrg_LT_TAGVAR(hardcode_direct, $1)=no 632954b44505Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 633054b44505Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 633154b44505Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 633254b44505Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 633354b44505Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 633454b44505Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 633554b44505Smrg_LT_TAGVAR(inherit_rpath, $1)=no 633654b44505Smrg_LT_TAGVAR(module_cmds, $1)= 633754b44505Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 633854b44505Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 633954b44505Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 634054b44505Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 634154b44505Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 634254b44505Smrg_LT_TAGVAR(no_undefined_flag, $1)= 634354b44505Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 634454b44505Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 634554b44505Smrg 634654b44505Smrg# Source file extension for C++ test sources. 634754b44505Smrgac_ext=cpp 634854b44505Smrg 634954b44505Smrg# Object file extension for compiled C++ test sources. 635054b44505Smrgobjext=o 635154b44505Smrg_LT_TAGVAR(objext, $1)=$objext 635254b44505Smrg 635354b44505Smrg# No sense in running all these tests if we already determined that 635454b44505Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 635554b44505Smrg# are currently assumed to apply to all compilers on this platform, 635654b44505Smrg# and will be corrupted by setting them based on a non-working compiler. 63570a392d7eSmrgif test yes != "$_lt_caught_CXX_error"; then 635854b44505Smrg # Code to be used in simple compile tests 635954b44505Smrg lt_simple_compile_test_code="int some_variable = 0;" 636054b44505Smrg 636154b44505Smrg # Code to be used in simple link tests 636254b44505Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 636354b44505Smrg 636454b44505Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 636554b44505Smrg _LT_TAG_COMPILER 636654b44505Smrg 636754b44505Smrg # save warnings/boilerplate of simple test code 636854b44505Smrg _LT_COMPILER_BOILERPLATE 636954b44505Smrg _LT_LINKER_BOILERPLATE 637054b44505Smrg 637154b44505Smrg # Allow CC to be a program name with arguments. 637254b44505Smrg lt_save_CC=$CC 637354b44505Smrg lt_save_CFLAGS=$CFLAGS 637454b44505Smrg lt_save_LD=$LD 637554b44505Smrg lt_save_GCC=$GCC 637654b44505Smrg GCC=$GXX 637754b44505Smrg lt_save_with_gnu_ld=$with_gnu_ld 637854b44505Smrg lt_save_path_LD=$lt_cv_path_LD 637954b44505Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 638054b44505Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63814a041c5bSmacallan else 638254b44505Smrg $as_unset lt_cv_prog_gnu_ld 63834a041c5bSmacallan fi 638454b44505Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 638554b44505Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63864a041c5bSmacallan else 638754b44505Smrg $as_unset lt_cv_path_LD 63884a041c5bSmacallan fi 638954b44505Smrg test -z "${LDCXX+set}" || LD=$LDCXX 639054b44505Smrg CC=${CXX-"c++"} 639154b44505Smrg CFLAGS=$CXXFLAGS 639254b44505Smrg compiler=$CC 639354b44505Smrg _LT_TAGVAR(compiler, $1)=$CC 639454b44505Smrg _LT_CC_BASENAME([$compiler]) 63954a041c5bSmacallan 639654b44505Smrg if test -n "$compiler"; then 639754b44505Smrg # We don't want -fno-exception when compiling C++ code, so set the 639854b44505Smrg # no_builtin_flag separately 63990a392d7eSmrg if test yes = "$GXX"; then 640054b44505Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 640154b44505Smrg else 640254b44505Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 640354b44505Smrg fi 64044a041c5bSmacallan 64050a392d7eSmrg if test yes = "$GXX"; then 640654b44505Smrg # Set up default GNU C++ configuration 64074a041c5bSmacallan 640854b44505Smrg LT_PATH_LD 64094a041c5bSmacallan 641054b44505Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 641154b44505Smrg # archiving commands below assume that GNU ld is being used. 64120a392d7eSmrg if test yes = "$with_gnu_ld"; then 64130a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64140a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 641554b44505Smrg 64160a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64170a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 641854b44505Smrg 641954b44505Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 642054b44505Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 642154b44505Smrg # investigate it a little bit more. (MM) 64220a392d7eSmrg wlarc='$wl' 642354b44505Smrg 642454b44505Smrg # ancient GNU ld didn't support --whole-archive et. al. 642554b44505Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 642654b44505Smrg $GREP 'no-whole-archive' > /dev/null; then 64270a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 642854b44505Smrg else 642954b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 643054b44505Smrg fi 643154b44505Smrg else 643254b44505Smrg with_gnu_ld=no 643354b44505Smrg wlarc= 643454b44505Smrg 643554b44505Smrg # A generic and very simple default shared library creation 643654b44505Smrg # command for GNU C++ for the case where it uses the native 643754b44505Smrg # linker, instead of GNU ld. If possible, this setting should 643854b44505Smrg # overridden to take advantage of the native linker features on 643954b44505Smrg # the platform it is being used on. 644054b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64414a041c5bSmacallan fi 644254b44505Smrg 644354b44505Smrg # Commands to make compiler produce verbose output that lists 644454b44505Smrg # what "hidden" libraries, object files and flags are used when 644554b44505Smrg # linking a shared library. 644654b44505Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 644754b44505Smrg 644854b44505Smrg else 644954b44505Smrg GXX=no 645054b44505Smrg with_gnu_ld=no 645154b44505Smrg wlarc= 645254b44505Smrg fi 645354b44505Smrg 645454b44505Smrg # PORTME: fill in a description of your system's C++ link characteristics 645554b44505Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 645654b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64574a041c5bSmacallan case $host_os in 645854b44505Smrg aix3*) 645954b44505Smrg # FIXME: insert proper C++ library support 646054b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 646154b44505Smrg ;; 64624a041c5bSmacallan aix[[4-9]]*) 64630a392d7eSmrg if test ia64 = "$host_cpu"; then 646454b44505Smrg # On IA64, the linker does run time linking by default, so we don't 646554b44505Smrg # have to do anything special. 646654b44505Smrg aix_use_runtimelinking=no 646754b44505Smrg exp_sym_flag='-Bexport' 64680a392d7eSmrg no_entry_flag= 646954b44505Smrg else 647054b44505Smrg aix_use_runtimelinking=no 647154b44505Smrg 647254b44505Smrg # Test if we are trying to use run time linking or normal 647354b44505Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64740a392d7eSmrg # have runtime linking enabled, and use it for executables. 64750a392d7eSmrg # For shared libraries, we enable/disable runtime linking 64760a392d7eSmrg # depending on the kind of the shared library created - 64770a392d7eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 64780a392d7eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64790a392d7eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 64800a392d7eSmrg # lib.a static archive 64810a392d7eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64820a392d7eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 64830a392d7eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 64840a392d7eSmrg # lib.a(lib.so.V) shared, rtl:no 64850a392d7eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 64860a392d7eSmrg # lib.a static archive 648754b44505Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 648854b44505Smrg for ld_flag in $LDFLAGS; do 648954b44505Smrg case $ld_flag in 649054b44505Smrg *-brtl*) 649154b44505Smrg aix_use_runtimelinking=yes 649254b44505Smrg break 649354b44505Smrg ;; 649454b44505Smrg esac 649554b44505Smrg done 64960a392d7eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 64970a392d7eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 64980a392d7eSmrg # so we don't have lib.a shared libs to link our executables. 64990a392d7eSmrg # We have to force runtime linking in this case. 65000a392d7eSmrg aix_use_runtimelinking=yes 65010a392d7eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65020a392d7eSmrg fi 650354b44505Smrg ;; 650454b44505Smrg esac 650554b44505Smrg 650654b44505Smrg exp_sym_flag='-bexport' 650754b44505Smrg no_entry_flag='-bnoentry' 650854b44505Smrg fi 650954b44505Smrg 651054b44505Smrg # When large executables or shared objects are built, AIX ld can 651154b44505Smrg # have problems creating the table of contents. If linking a library 651254b44505Smrg # or program results in "error TOC overflow" add -mminimal-toc to 651354b44505Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 651454b44505Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 651554b44505Smrg 651654b44505Smrg _LT_TAGVAR(archive_cmds, $1)='' 651754b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651854b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 651954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 652054b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65210a392d7eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65220a392d7eSmrg case $with_aix_soname,$aix_use_runtimelinking in 65230a392d7eSmrg aix,*) ;; # no import file 65240a392d7eSmrg svr4,* | *,yes) # use import file 65250a392d7eSmrg # The Import File defines what to hardcode. 65260a392d7eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65270a392d7eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65280a392d7eSmrg ;; 65290a392d7eSmrg esac 653054b44505Smrg 65310a392d7eSmrg if test yes = "$GXX"; then 653254b44505Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 653354b44505Smrg # We only want to do this on AIX 4.2 and lower, the check 653454b44505Smrg # below for broken collect2 doesn't work under 4.3+ 65350a392d7eSmrg collect2name=`$CC -print-prog-name=collect2` 653654b44505Smrg if test -f "$collect2name" && 653754b44505Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 653854b44505Smrg then 653954b44505Smrg # We have reworked collect2 654054b44505Smrg : 654154b44505Smrg else 654254b44505Smrg # We have old collect2 654354b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 654454b44505Smrg # It fails to find uninstalled libraries when the uninstalled 654554b44505Smrg # path is not listed in the libpath. Setting hardcode_minus_L 654654b44505Smrg # to unsupported forces relinking 654754b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 654854b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 654954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 655054b44505Smrg fi 655154b44505Smrg esac 655254b44505Smrg shared_flag='-shared' 65530a392d7eSmrg if test yes = "$aix_use_runtimelinking"; then 65540a392d7eSmrg shared_flag=$shared_flag' $wl-G' 655554b44505Smrg fi 65560a392d7eSmrg # Need to ensure runtime linking is disabled for the traditional 65570a392d7eSmrg # shared library, or the linker may eventually find shared libraries 65580a392d7eSmrg # /with/ Import File - we do not want to mix them. 65590a392d7eSmrg shared_flag_aix='-shared' 65600a392d7eSmrg shared_flag_svr4='-shared $wl-G' 656154b44505Smrg else 656254b44505Smrg # not using gcc 65630a392d7eSmrg if test ia64 = "$host_cpu"; then 656454b44505Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 656554b44505Smrg # chokes on -Wl,-G. The following line is correct: 656654b44505Smrg shared_flag='-G' 656754b44505Smrg else 65680a392d7eSmrg if test yes = "$aix_use_runtimelinking"; then 65690a392d7eSmrg shared_flag='$wl-G' 657054b44505Smrg else 65710a392d7eSmrg shared_flag='$wl-bM:SRE' 657254b44505Smrg fi 65730a392d7eSmrg shared_flag_aix='$wl-bM:SRE' 65740a392d7eSmrg shared_flag_svr4='$wl-G' 657554b44505Smrg fi 657654b44505Smrg fi 657754b44505Smrg 65780a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 657954b44505Smrg # It seems that -bexpall does not export symbols beginning with 658054b44505Smrg # underscore (_), so it is better to generate a list of symbols to 658154b44505Smrg # export. 658254b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 65830a392d7eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 658454b44505Smrg # Warning - without using the other runtime loading flags (-brtl), 658554b44505Smrg # -berok will link without error, but may produce a broken library. 65860a392d7eSmrg # The "-G" linker flag allows undefined symbols. 65870a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 658854b44505Smrg # Determine the default libpath from the value encoded in an empty 658954b44505Smrg # executable. 659054b44505Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 65910a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 659254b44505Smrg 65930a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 659454b44505Smrg else 65950a392d7eSmrg if test ia64 = "$host_cpu"; then 65960a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 659754b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 65980a392d7eSmrg _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" 659954b44505Smrg else 660054b44505Smrg # Determine the default libpath from the value encoded in an 660154b44505Smrg # empty executable. 660254b44505Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66030a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 660454b44505Smrg # Warning - without using the other run time loading flags, 660554b44505Smrg # -berok will link without error, but may produce a broken library. 66060a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66070a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66080a392d7eSmrg if test yes = "$with_gnu_ld"; then 660954b44505Smrg # We only use this code for GNU lds that support --whole-archive. 66100a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 661154b44505Smrg else 661254b44505Smrg # Exported symbols can be pulled into shared objects from archives 661354b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 661454b44505Smrg fi 661554b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66160a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66170a392d7eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66180a392d7eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66190a392d7eSmrg if test svr4 != "$with_aix_soname"; then 66200a392d7eSmrg # This is similar to how AIX traditionally builds its shared 66210a392d7eSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66220a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 66230a392d7eSmrg fi 66240a392d7eSmrg if test aix != "$with_aix_soname"; then 66250a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 66260a392d7eSmrg else 66270a392d7eSmrg # used by -dlpreopen to get the symbols 66280a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66290a392d7eSmrg fi 66300a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 663154b44505Smrg fi 663254b44505Smrg fi 663354b44505Smrg ;; 663454b44505Smrg 663554b44505Smrg beos*) 663654b44505Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 663754b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 663854b44505Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 663954b44505Smrg # support --undefined. This deserves some investigation. FIXME 66400a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66414a041c5bSmacallan else 664254b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66434a041c5bSmacallan fi 66444a041c5bSmacallan ;; 664554b44505Smrg 66464a041c5bSmacallan chorus*) 664754b44505Smrg case $cc_basename in 664854b44505Smrg *) 664954b44505Smrg # FIXME: insert proper C++ library support 665054b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 665154b44505Smrg ;; 665254b44505Smrg esac 665354b44505Smrg ;; 665454b44505Smrg 665554b44505Smrg cygwin* | mingw* | pw32* | cegcc*) 665654b44505Smrg case $GXX,$cc_basename in 665754b44505Smrg ,cl* | no,cl*) 665854b44505Smrg # Native MSVC 665954b44505Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 666054b44505Smrg # no search path for DLLs. 666154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 666254b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 666354b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 666454b44505Smrg _LT_TAGVAR(file_list_spec, $1)='@' 666554b44505Smrg # Tell ltmain to make .lib files, not .a files. 666654b44505Smrg libext=lib 666754b44505Smrg # Tell ltmain to make .dll files, not .so files. 66680a392d7eSmrg shrext_cmds=.dll 666954b44505Smrg # FIXME: Setting linknames here is a bad hack. 66700a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66710a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66720a392d7eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 66730a392d7eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66740a392d7eSmrg else 66750a392d7eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66760a392d7eSmrg fi~ 66770a392d7eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66780a392d7eSmrg linknames=' 667954b44505Smrg # The linker will not automatically build a static lib if we build a DLL. 668054b44505Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 668154b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 668254b44505Smrg # Don't use ranlib 668354b44505Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 668454b44505Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66850a392d7eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 66860a392d7eSmrg case $lt_outputfile in 66870a392d7eSmrg *.exe|*.EXE) ;; 66880a392d7eSmrg *) 66890a392d7eSmrg lt_outputfile=$lt_outputfile.exe 66900a392d7eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 66910a392d7eSmrg ;; 66920a392d7eSmrg esac~ 66930a392d7eSmrg func_to_tool_file "$lt_outputfile"~ 66940a392d7eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 66950a392d7eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 66960a392d7eSmrg $RM "$lt_outputfile.manifest"; 66970a392d7eSmrg fi' 669854b44505Smrg ;; 669954b44505Smrg *) 670054b44505Smrg # g++ 670154b44505Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 670254b44505Smrg # as there is no search path for DLLs. 670354b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67040a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 670554b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 670654b44505Smrg _LT_TAGVAR(always_export_symbols, $1)=no 670754b44505Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 670854b44505Smrg 670954b44505Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67100a392d7eSmrg _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' 67110a392d7eSmrg # If the export-symbols file already is a .def file, use it as 67120a392d7eSmrg # is; otherwise, prepend EXPORTS... 67130a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67140a392d7eSmrg cp $export_symbols $output_objdir/$soname.def; 67150a392d7eSmrg else 67160a392d7eSmrg echo EXPORTS > $output_objdir/$soname.def; 67170a392d7eSmrg cat $export_symbols >> $output_objdir/$soname.def; 67180a392d7eSmrg fi~ 67190a392d7eSmrg $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' 672054b44505Smrg else 672154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672254b44505Smrg fi 67234a041c5bSmacallan ;; 67244a041c5bSmacallan esac 67254a041c5bSmacallan ;; 672654b44505Smrg darwin* | rhapsody*) 672754b44505Smrg _LT_DARWIN_LINKER_FEATURES($1) 672854b44505Smrg ;; 672954b44505Smrg 67300a392d7eSmrg os2*) 67310a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67320a392d7eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67330a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67340a392d7eSmrg shrext_cmds=.dll 67350a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67360a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67370a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67380a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67390a392d7eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67400a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67410a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 67420a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67430a392d7eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67440a392d7eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67450a392d7eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67460a392d7eSmrg prefix_cmds="$SED"~ 67470a392d7eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67480a392d7eSmrg prefix_cmds="$prefix_cmds -e 1d"; 67490a392d7eSmrg fi~ 67500a392d7eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67510a392d7eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67520a392d7eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67530a392d7eSmrg emximp -o $lib $output_objdir/$libname.def' 67540a392d7eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67550a392d7eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67560a392d7eSmrg ;; 67570a392d7eSmrg 67584a041c5bSmacallan dgux*) 675954b44505Smrg case $cc_basename in 676054b44505Smrg ec++*) 676154b44505Smrg # FIXME: insert proper C++ library support 676254b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67634a041c5bSmacallan ;; 676454b44505Smrg ghcx*) 67654a041c5bSmacallan # Green Hills C++ Compiler 676654b44505Smrg # FIXME: insert proper C++ library support 676754b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67684a041c5bSmacallan ;; 676954b44505Smrg *) 677054b44505Smrg # FIXME: insert proper C++ library support 677154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67724a041c5bSmacallan ;; 677354b44505Smrg esac 677454b44505Smrg ;; 677554b44505Smrg 67760a392d7eSmrg freebsd2.*) 677754b44505Smrg # C++ shared libraries reported to be fairly broken before 677854b44505Smrg # switch to ELF 677954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 678054b44505Smrg ;; 678154b44505Smrg 678254b44505Smrg freebsd-elf*) 678354b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 678454b44505Smrg ;; 678554b44505Smrg 67864a041c5bSmacallan freebsd* | dragonfly*) 678754b44505Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 678854b44505Smrg # conventions 678954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 679054b44505Smrg ;; 679154b44505Smrg 679254b44505Smrg haiku*) 67930a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 679454b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 679554b44505Smrg ;; 679654b44505Smrg 679754b44505Smrg hpux9*) 67980a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 679954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68000a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 680154b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 680254b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 680354b44505Smrg # but as the default 680454b44505Smrg # location of the library. 680554b44505Smrg 680654b44505Smrg case $cc_basename in 680754b44505Smrg CC*) 680854b44505Smrg # FIXME: insert proper C++ library support 680954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 681054b44505Smrg ;; 681154b44505Smrg aCC*) 68120a392d7eSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 681354b44505Smrg # Commands to make compiler produce verbose output that lists 681454b44505Smrg # what "hidden" libraries, object files and flags are used when 681554b44505Smrg # linking a shared library. 681654b44505Smrg # 681754b44505Smrg # There doesn't appear to be a way to prevent this compiler from 681854b44505Smrg # explicitly linking system object files so we need to strip them 681954b44505Smrg # from the output so that they don't get included in the library 682054b44505Smrg # dependencies. 68210a392d7eSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 682254b44505Smrg ;; 682354b44505Smrg *) 68240a392d7eSmrg if test yes = "$GXX"; then 68250a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 682654b44505Smrg else 682754b44505Smrg # FIXME: insert proper C++ library support 682854b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 682954b44505Smrg fi 683054b44505Smrg ;; 683154b44505Smrg esac 683254b44505Smrg ;; 683354b44505Smrg 683454b44505Smrg hpux10*|hpux11*) 68350a392d7eSmrg if test no = "$with_gnu_ld"; then 68360a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 683754b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 683854b44505Smrg 683954b44505Smrg case $host_cpu in 684054b44505Smrg hppa*64*|ia64*) 684154b44505Smrg ;; 684254b44505Smrg *) 68430a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 684454b44505Smrg ;; 684554b44505Smrg esac 684654b44505Smrg fi 684754b44505Smrg case $host_cpu in 684854b44505Smrg hppa*64*|ia64*) 684954b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 685054b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 685154b44505Smrg ;; 685254b44505Smrg *) 685354b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 685454b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 685554b44505Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 685654b44505Smrg # but as the default 685754b44505Smrg # location of the library. 685854b44505Smrg ;; 685954b44505Smrg esac 686054b44505Smrg 686154b44505Smrg case $cc_basename in 686254b44505Smrg CC*) 686354b44505Smrg # FIXME: insert proper C++ library support 686454b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68654a041c5bSmacallan ;; 686654b44505Smrg aCC*) 686754b44505Smrg case $host_cpu in 686854b44505Smrg hppa*64*) 68690a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687054b44505Smrg ;; 687154b44505Smrg ia64*) 68720a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687354b44505Smrg ;; 687454b44505Smrg *) 68750a392d7eSmrg _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' 687654b44505Smrg ;; 68774a041c5bSmacallan esac 687854b44505Smrg # Commands to make compiler produce verbose output that lists 687954b44505Smrg # what "hidden" libraries, object files and flags are used when 688054b44505Smrg # linking a shared library. 688154b44505Smrg # 688254b44505Smrg # There doesn't appear to be a way to prevent this compiler from 688354b44505Smrg # explicitly linking system object files so we need to strip them 688454b44505Smrg # from the output so that they don't get included in the library 688554b44505Smrg # dependencies. 68860a392d7eSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 68874a041c5bSmacallan ;; 688854b44505Smrg *) 68890a392d7eSmrg if test yes = "$GXX"; then 68900a392d7eSmrg if test no = "$with_gnu_ld"; then 689154b44505Smrg case $host_cpu in 689254b44505Smrg hppa*64*) 68930a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 689454b44505Smrg ;; 689554b44505Smrg ia64*) 68960a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 689754b44505Smrg ;; 689854b44505Smrg *) 68990a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 690054b44505Smrg ;; 690154b44505Smrg esac 690254b44505Smrg fi 690354b44505Smrg else 690454b44505Smrg # FIXME: insert proper C++ library support 690554b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 690654b44505Smrg fi 69074a041c5bSmacallan ;; 690854b44505Smrg esac 690954b44505Smrg ;; 691054b44505Smrg 691154b44505Smrg interix[[3-9]]*) 691254b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=no 691354b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69140a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69150a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 691654b44505Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 691754b44505Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 691854b44505Smrg # default) and relocated if they conflict, which is a slow very memory 691954b44505Smrg # consuming and fragmenting process. To avoid this, we pick a random, 692054b44505Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 692154b44505Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69220a392d7eSmrg _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' 69230a392d7eSmrg _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' 69244a041c5bSmacallan ;; 692554b44505Smrg irix5* | irix6*) 692654b44505Smrg case $cc_basename in 692754b44505Smrg CC*) 692854b44505Smrg # SGI C++ 69290a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 693054b44505Smrg 693154b44505Smrg # Archives containing C++ object files must be created using 693254b44505Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 693354b44505Smrg # necessary to make sure instantiated templates are included 693454b44505Smrg # in the archive. 693554b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69364a041c5bSmacallan ;; 693754b44505Smrg *) 69380a392d7eSmrg if test yes = "$GXX"; then 69390a392d7eSmrg if test no = "$with_gnu_ld"; then 69400a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 694154b44505Smrg else 69420a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 694354b44505Smrg fi 694454b44505Smrg fi 694554b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69464a041c5bSmacallan ;; 694754b44505Smrg esac 69480a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 694954b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 695054b44505Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 695154b44505Smrg ;; 695254b44505Smrg 69530a392d7eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 695454b44505Smrg case $cc_basename in 695554b44505Smrg KCC*) 695654b44505Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 695754b44505Smrg 695854b44505Smrg # KCC will only create a shared library if the output file 695954b44505Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 696054b44505Smrg # to its proper name (with version) after linking. 69610a392d7eSmrg _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' 69620a392d7eSmrg _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' 696354b44505Smrg # Commands to make compiler produce verbose output that lists 696454b44505Smrg # what "hidden" libraries, object files and flags are used when 696554b44505Smrg # linking a shared library. 696654b44505Smrg # 696754b44505Smrg # There doesn't appear to be a way to prevent this compiler from 696854b44505Smrg # explicitly linking system object files so we need to strip them 696954b44505Smrg # from the output so that they don't get included in the library 697054b44505Smrg # dependencies. 69710a392d7eSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 697254b44505Smrg 69730a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69740a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 697554b44505Smrg 697654b44505Smrg # Archives containing C++ object files must be created using 697754b44505Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 697854b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69794a041c5bSmacallan ;; 698054b44505Smrg icpc* | ecpc* ) 69814a041c5bSmacallan # Intel C++ 698254b44505Smrg with_gnu_ld=yes 698354b44505Smrg # version 8.0 and above of icpc choke on multiply defined symbols 698454b44505Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 698554b44505Smrg # earlier do not add the objects themselves. 698654b44505Smrg case `$CC -V 2>&1` in 698754b44505Smrg *"Version 7."*) 69880a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 69890a392d7eSmrg _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' 699054b44505Smrg ;; 699154b44505Smrg *) # Version 8.0 or newer 699254b44505Smrg tmp_idyn= 699354b44505Smrg case $host_cpu in 699454b44505Smrg ia64*) tmp_idyn=' -i_dynamic';; 699554b44505Smrg esac 69960a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 69970a392d7eSmrg _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' 699854b44505Smrg ;; 699954b44505Smrg esac 700054b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70010a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70020a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70030a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70044a041c5bSmacallan ;; 700554b44505Smrg pgCC* | pgcpp*) 700654b44505Smrg # Portland Group C++ compiler 700754b44505Smrg case `$CC -V` in 700854b44505Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 700954b44505Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70100a392d7eSmrg rm -rf $tpldir~ 70110a392d7eSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70120a392d7eSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 701354b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70140a392d7eSmrg rm -rf $tpldir~ 70150a392d7eSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70160a392d7eSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70170a392d7eSmrg $RANLIB $oldlib' 701854b44505Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70190a392d7eSmrg rm -rf $tpldir~ 70200a392d7eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70210a392d7eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702254b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70230a392d7eSmrg rm -rf $tpldir~ 70240a392d7eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70250a392d7eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 702654b44505Smrg ;; 702754b44505Smrg *) # Version 6 and above use weak symbols 70280a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70290a392d7eSmrg _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' 703054b44505Smrg ;; 703154b44505Smrg esac 703254b44505Smrg 70330a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70340a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70350a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 703654b44505Smrg ;; 70374a041c5bSmacallan cxx*) 70384a041c5bSmacallan # Compaq C++ 70390a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70400a392d7eSmrg _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' 704154b44505Smrg 704254b44505Smrg runpath_var=LD_RUN_PATH 704354b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 704454b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 704554b44505Smrg 704654b44505Smrg # Commands to make compiler produce verbose output that lists 704754b44505Smrg # what "hidden" libraries, object files and flags are used when 704854b44505Smrg # linking a shared library. 704954b44505Smrg # 705054b44505Smrg # There doesn't appear to be a way to prevent this compiler from 705154b44505Smrg # explicitly linking system object files so we need to strip them 705254b44505Smrg # from the output so that they don't get included in the library 705354b44505Smrg # dependencies. 70540a392d7eSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 705554b44505Smrg ;; 705654b44505Smrg xl* | mpixl* | bgxl*) 705754b44505Smrg # IBM XL 8.0 on PPC, with GNU ld 70580a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70590a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70600a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70610a392d7eSmrg if test yes = "$supports_anon_versioning"; then 706254b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70630a392d7eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70640a392d7eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70650a392d7eSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 706654b44505Smrg fi 70674a041c5bSmacallan ;; 70684a041c5bSmacallan *) 70694a041c5bSmacallan case `$CC -V 2>&1 | sed 5q` in 70704a041c5bSmacallan *Sun\ C*) 70714a041c5bSmacallan # Sun C++ 5.9 707254b44505Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70730a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70740a392d7eSmrg _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' 707554b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70760a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 707754b44505Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 707854b44505Smrg 707954b44505Smrg # Not sure whether something based on 708054b44505Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 708154b44505Smrg # would be better. 708254b44505Smrg output_verbose_link_cmd='func_echo_all' 708354b44505Smrg 708454b44505Smrg # Archives containing C++ object files must be created using 708554b44505Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 708654b44505Smrg # necessary to make sure instantiated templates are included 708754b44505Smrg # in the archive. 708854b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70894a041c5bSmacallan ;; 70904a041c5bSmacallan esac 70914a041c5bSmacallan ;; 70924a041c5bSmacallan esac 70934a041c5bSmacallan ;; 709454b44505Smrg 70954a041c5bSmacallan lynxos*) 709654b44505Smrg # FIXME: insert proper C++ library support 709754b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70984a041c5bSmacallan ;; 709954b44505Smrg 71004a041c5bSmacallan m88k*) 710154b44505Smrg # FIXME: insert proper C++ library support 710254b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71034a041c5bSmacallan ;; 710454b44505Smrg 71054a041c5bSmacallan mvs*) 710654b44505Smrg case $cc_basename in 710754b44505Smrg cxx*) 710854b44505Smrg # FIXME: insert proper C++ library support 710954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71104a041c5bSmacallan ;; 71114a041c5bSmacallan *) 711254b44505Smrg # FIXME: insert proper C++ library support 711354b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71144a041c5bSmacallan ;; 71154a041c5bSmacallan esac 71164a041c5bSmacallan ;; 711754b44505Smrg 71184a041c5bSmacallan netbsd*) 711954b44505Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 712054b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 712154b44505Smrg wlarc= 712254b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 712354b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 712454b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 712554b44505Smrg fi 712654b44505Smrg # Workaround some broken pre-1.5 toolchains 712754b44505Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 712854b44505Smrg ;; 712954b44505Smrg 713054b44505Smrg *nto* | *qnx*) 713154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 713254b44505Smrg ;; 713354b44505Smrg 71340a392d7eSmrg openbsd* | bitrig*) 713554b44505Smrg if test -f /usr/libexec/ld.so; then 713654b44505Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 713754b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 713854b44505Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 713954b44505Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71400a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71410a392d7eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71420a392d7eSmrg _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' 71430a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71440a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 714554b44505Smrg fi 714654b44505Smrg output_verbose_link_cmd=func_echo_all 714754b44505Smrg else 714854b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714954b44505Smrg fi 71504a041c5bSmacallan ;; 715154b44505Smrg 71524a041c5bSmacallan osf3* | osf4* | osf5*) 715354b44505Smrg case $cc_basename in 715454b44505Smrg KCC*) 715554b44505Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 715654b44505Smrg 715754b44505Smrg # KCC will only create a shared library if the output file 715854b44505Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 715954b44505Smrg # to its proper name (with version) after linking. 71600a392d7eSmrg _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' 716154b44505Smrg 71620a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 716354b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 716454b44505Smrg 716554b44505Smrg # Archives containing C++ object files must be created using 716654b44505Smrg # the KAI C++ compiler. 716754b44505Smrg case $host in 716854b44505Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 716954b44505Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 717054b44505Smrg esac 71714a041c5bSmacallan ;; 717254b44505Smrg RCC*) 71734a041c5bSmacallan # Rational C++ 2.4.1 717454b44505Smrg # FIXME: insert proper C++ library support 717554b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71764a041c5bSmacallan ;; 717754b44505Smrg cxx*) 717854b44505Smrg case $host in 717954b44505Smrg osf3*) 71800a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71810a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 71820a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 718354b44505Smrg ;; 718454b44505Smrg *) 718554b44505Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 71860a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 718754b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 71880a392d7eSmrg echo "-hidden">> $lib.exp~ 71890a392d7eSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ 71900a392d7eSmrg $RM $lib.exp' 719154b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 719254b44505Smrg ;; 719354b44505Smrg esac 719454b44505Smrg 719554b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 719654b44505Smrg 719754b44505Smrg # Commands to make compiler produce verbose output that lists 719854b44505Smrg # what "hidden" libraries, object files and flags are used when 719954b44505Smrg # linking a shared library. 720054b44505Smrg # 720154b44505Smrg # There doesn't appear to be a way to prevent this compiler from 720254b44505Smrg # explicitly linking system object files so we need to strip them 720354b44505Smrg # from the output so that they don't get included in the library 720454b44505Smrg # dependencies. 72050a392d7eSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 72064a041c5bSmacallan ;; 72074a041c5bSmacallan *) 72080a392d7eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 72090a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 721054b44505Smrg case $host in 721154b44505Smrg osf3*) 72120a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 721354b44505Smrg ;; 721454b44505Smrg *) 72150a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 721654b44505Smrg ;; 721754b44505Smrg esac 721854b44505Smrg 72190a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 722054b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 722154b44505Smrg 722254b44505Smrg # Commands to make compiler produce verbose output that lists 722354b44505Smrg # what "hidden" libraries, object files and flags are used when 722454b44505Smrg # linking a shared library. 722554b44505Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 722654b44505Smrg 722754b44505Smrg else 722854b44505Smrg # FIXME: insert proper C++ library support 722954b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723054b44505Smrg fi 72314a041c5bSmacallan ;; 723254b44505Smrg esac 723354b44505Smrg ;; 723454b44505Smrg 72354a041c5bSmacallan psos*) 723654b44505Smrg # FIXME: insert proper C++ library support 723754b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723854b44505Smrg ;; 723954b44505Smrg 72404a041c5bSmacallan sunos4*) 724154b44505Smrg case $cc_basename in 724254b44505Smrg CC*) 72434a041c5bSmacallan # Sun C++ 4.x 724454b44505Smrg # FIXME: insert proper C++ library support 724554b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72464a041c5bSmacallan ;; 724754b44505Smrg lcc*) 72484a041c5bSmacallan # Lucid 724954b44505Smrg # FIXME: insert proper C++ library support 725054b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72514a041c5bSmacallan ;; 725254b44505Smrg *) 725354b44505Smrg # FIXME: insert proper C++ library support 725454b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72554a041c5bSmacallan ;; 725654b44505Smrg esac 725754b44505Smrg ;; 72584a041c5bSmacallan 725954b44505Smrg solaris*) 726054b44505Smrg case $cc_basename in 726154b44505Smrg CC* | sunCC*) 726254b44505Smrg # Sun C++ 4.2, 5.x and Centerline C++ 726354b44505Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 726454b44505Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72650a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 726654b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72670a392d7eSmrg $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' 726854b44505Smrg 726954b44505Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 727054b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 727154b44505Smrg case $host_os in 727254b44505Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 727354b44505Smrg *) 727454b44505Smrg # The compiler driver will combine and reorder linker options, 72750a392d7eSmrg # but understands '-z linker_flag'. 727654b44505Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 727754b44505Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 727854b44505Smrg ;; 727954b44505Smrg esac 728054b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72814a041c5bSmacallan 728254b44505Smrg output_verbose_link_cmd='func_echo_all' 72834a041c5bSmacallan 728454b44505Smrg # Archives containing C++ object files must be created using 728554b44505Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 728654b44505Smrg # necessary to make sure instantiated templates are included 728754b44505Smrg # in the archive. 728854b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 728954b44505Smrg ;; 729054b44505Smrg gcx*) 729154b44505Smrg # Green Hills C++ Compiler 72920a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72934a041c5bSmacallan 729454b44505Smrg # The C++ compiler must be used to create the archive. 729554b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 729654b44505Smrg ;; 729754b44505Smrg *) 729854b44505Smrg # GNU C++ compiler with Solaris linker 72990a392d7eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 73000a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 730154b44505Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73020a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 730354b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73040a392d7eSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 730554b44505Smrg 730654b44505Smrg # Commands to make compiler produce verbose output that lists 730754b44505Smrg # what "hidden" libraries, object files and flags are used when 730854b44505Smrg # linking a shared library. 730954b44505Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 731054b44505Smrg else 73110a392d7eSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 731254b44505Smrg # platform. 73130a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 731454b44505Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73150a392d7eSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 731654b44505Smrg 731754b44505Smrg # Commands to make compiler produce verbose output that lists 731854b44505Smrg # what "hidden" libraries, object files and flags are used when 731954b44505Smrg # linking a shared library. 732054b44505Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 732154b44505Smrg fi 732254b44505Smrg 73230a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 732454b44505Smrg case $host_os in 732554b44505Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 732654b44505Smrg *) 73270a392d7eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 732854b44505Smrg ;; 732954b44505Smrg esac 733054b44505Smrg fi 733154b44505Smrg ;; 733254b44505Smrg esac 73334a041c5bSmacallan ;; 73344a041c5bSmacallan 733554b44505Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73360a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 733754b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 733854b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 733954b44505Smrg runpath_var='LD_RUN_PATH' 73404a041c5bSmacallan 73414a041c5bSmacallan case $cc_basename in 734254b44505Smrg CC*) 73430a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73440a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734554b44505Smrg ;; 734654b44505Smrg *) 73470a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73480a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734954b44505Smrg ;; 73504a041c5bSmacallan esac 73514a041c5bSmacallan ;; 73524a041c5bSmacallan 735354b44505Smrg sysv5* | sco3.2v5* | sco5v6*) 73540a392d7eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 735554b44505Smrg # link with -lc, and that would cause any symbols used from libc to 735654b44505Smrg # always be unresolved, which means just about no library would 735754b44505Smrg # ever link correctly. If we're not using GNU ld we use -z text 735854b44505Smrg # though, which does catch some bad symbols but isn't as heavy-handed 735954b44505Smrg # as -z defs. 73600a392d7eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73610a392d7eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 736254b44505Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 736354b44505Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73640a392d7eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 736554b44505Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 736654b44505Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73670a392d7eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 736854b44505Smrg runpath_var='LD_RUN_PATH' 73694a041c5bSmacallan 737054b44505Smrg case $cc_basename in 737154b44505Smrg CC*) 73720a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73730a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737454b44505Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73750a392d7eSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 737654b44505Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73770a392d7eSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 737854b44505Smrg ;; 737954b44505Smrg *) 73800a392d7eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73810a392d7eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738254b44505Smrg ;; 738354b44505Smrg esac 73844a041c5bSmacallan ;; 73854a041c5bSmacallan 738654b44505Smrg tandem*) 738754b44505Smrg case $cc_basename in 738854b44505Smrg NCC*) 738954b44505Smrg # NonStop-UX NCC 3.20 739054b44505Smrg # FIXME: insert proper C++ library support 739154b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739254b44505Smrg ;; 739354b44505Smrg *) 739454b44505Smrg # FIXME: insert proper C++ library support 739554b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739654b44505Smrg ;; 739754b44505Smrg esac 739854b44505Smrg ;; 73994a041c5bSmacallan 740054b44505Smrg vxworks*) 740154b44505Smrg # FIXME: insert proper C++ library support 740254b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740354b44505Smrg ;; 74044a041c5bSmacallan 740554b44505Smrg *) 740654b44505Smrg # FIXME: insert proper C++ library support 740754b44505Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740854b44505Smrg ;; 74094a041c5bSmacallan esac 74104a041c5bSmacallan 741154b44505Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74120a392d7eSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 741354b44505Smrg 74140a392d7eSmrg _LT_TAGVAR(GCC, $1)=$GXX 74150a392d7eSmrg _LT_TAGVAR(LD, $1)=$LD 741654b44505Smrg 741754b44505Smrg ## CAVEAT EMPTOR: 741854b44505Smrg ## There is no encapsulation within the following macros, do not change 741954b44505Smrg ## the running order or otherwise move them around unless you know exactly 742054b44505Smrg ## what you are doing... 742154b44505Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 742254b44505Smrg _LT_COMPILER_PIC($1) 742354b44505Smrg _LT_COMPILER_C_O($1) 742454b44505Smrg _LT_COMPILER_FILE_LOCKS($1) 742554b44505Smrg _LT_LINKER_SHLIBS($1) 742654b44505Smrg _LT_SYS_DYNAMIC_LINKER($1) 742754b44505Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 742854b44505Smrg 742954b44505Smrg _LT_CONFIG($1) 743054b44505Smrg fi # test -n "$compiler" 743154b44505Smrg 743254b44505Smrg CC=$lt_save_CC 743354b44505Smrg CFLAGS=$lt_save_CFLAGS 743454b44505Smrg LDCXX=$LD 743554b44505Smrg LD=$lt_save_LD 743654b44505Smrg GCC=$lt_save_GCC 743754b44505Smrg with_gnu_ld=$lt_save_with_gnu_ld 743854b44505Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 743954b44505Smrg lt_cv_path_LD=$lt_save_path_LD 744054b44505Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 744154b44505Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74420a392d7eSmrgfi # test yes != "$_lt_caught_CXX_error" 74434a041c5bSmacallan 744454b44505SmrgAC_LANG_POP 744554b44505Smrg])# _LT_LANG_CXX_CONFIG 74464a041c5bSmacallan 74474a041c5bSmacallan 744854b44505Smrg# _LT_FUNC_STRIPNAME_CNF 744954b44505Smrg# ---------------------- 745054b44505Smrg# func_stripname_cnf prefix suffix name 745154b44505Smrg# strip PREFIX and SUFFIX off of NAME. 745254b44505Smrg# PREFIX and SUFFIX must not contain globbing or regex special 745354b44505Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 745454b44505Smrg# dot (in which case that matches only a dot). 745554b44505Smrg# 745654b44505Smrg# This function is identical to the (non-XSI) version of func_stripname, 745754b44505Smrg# except this one can be used by m4 code that may be executed by configure, 745854b44505Smrg# rather than the libtool script. 745954b44505Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 746054b44505SmrgAC_REQUIRE([_LT_DECL_SED]) 746154b44505SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 746254b44505Smrgfunc_stripname_cnf () 746354b44505Smrg{ 74640a392d7eSmrg case @S|@2 in 74650a392d7eSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74660a392d7eSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74674a041c5bSmacallan esac 746854b44505Smrg} # func_stripname_cnf 746954b44505Smrg])# _LT_FUNC_STRIPNAME_CNF 74704a041c5bSmacallan 74710a392d7eSmrg 747254b44505Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 747354b44505Smrg# --------------------------------- 747454b44505Smrg# Figure out "hidden" library dependencies from verbose 747554b44505Smrg# compiler output when linking a shared library. 747654b44505Smrg# Parse the compiler output and extract the necessary 747754b44505Smrg# objects, libraries and library flags. 747854b44505Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 747954b44505Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 748054b44505SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 748154b44505Smrg# Dependencies to place before and after the object being linked: 748254b44505Smrg_LT_TAGVAR(predep_objects, $1)= 748354b44505Smrg_LT_TAGVAR(postdep_objects, $1)= 748454b44505Smrg_LT_TAGVAR(predeps, $1)= 748554b44505Smrg_LT_TAGVAR(postdeps, $1)= 748654b44505Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 74874a041c5bSmacallan 748854b44505Smrgdnl we can't use the lt_simple_compile_test_code here, 748954b44505Smrgdnl because it contains code intended for an executable, 749054b44505Smrgdnl not a library. It's possible we should let each 749154b44505Smrgdnl tag define a new lt_????_link_test_code variable, 749254b44505Smrgdnl but it's only used here... 749354b44505Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 749454b44505Smrgint a; 749554b44505Smrgvoid foo (void) { a = 0; } 749654b44505Smrg_LT_EOF 749754b44505Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 749854b44505Smrgclass Foo 749954b44505Smrg{ 750054b44505Smrgpublic: 750154b44505Smrg Foo (void) { a = 0; } 750254b44505Smrgprivate: 750354b44505Smrg int a; 750454b44505Smrg}; 750554b44505Smrg_LT_EOF 750654b44505Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 750754b44505Smrg subroutine foo 750854b44505Smrg implicit none 750954b44505Smrg integer*4 a 751054b44505Smrg a=0 751154b44505Smrg return 751254b44505Smrg end 751354b44505Smrg_LT_EOF 751454b44505Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 751554b44505Smrg subroutine foo 751654b44505Smrg implicit none 751754b44505Smrg integer a 751854b44505Smrg a=0 751954b44505Smrg return 752054b44505Smrg end 752154b44505Smrg_LT_EOF 752254b44505Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 752354b44505Smrgpublic class foo { 752454b44505Smrg private int a; 752554b44505Smrg public void bar (void) { 752654b44505Smrg a = 0; 752754b44505Smrg } 752854b44505Smrg}; 752954b44505Smrg_LT_EOF 75300a392d7eSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75310a392d7eSmrgpackage foo 75320a392d7eSmrgfunc foo() { 75330a392d7eSmrg} 75340a392d7eSmrg_LT_EOF 753554b44505Smrg]) 75364a041c5bSmacallan 753754b44505Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 753854b44505Smrgcase "$CC $CFLAGS " in #( 753954b44505Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 754054b44505Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75410a392d7eSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 754254b44505Smrgesac 75434a041c5bSmacallan 754454b44505Smrgdnl Parse the compiler output and extract the necessary 754554b44505Smrgdnl objects, libraries and library flags. 754654b44505Smrgif AC_TRY_EVAL(ac_compile); then 754754b44505Smrg # Parse the compiler output and extract the necessary 754854b44505Smrg # objects, libraries and library flags. 75494a041c5bSmacallan 755054b44505Smrg # Sentinel used to keep track of whether or not we are before 755154b44505Smrg # the conftest object file. 755254b44505Smrg pre_test_object_deps_done=no 75534a041c5bSmacallan 755454b44505Smrg for p in `eval "$output_verbose_link_cmd"`; do 75550a392d7eSmrg case $prev$p in 75564a041c5bSmacallan 755754b44505Smrg -L* | -R* | -l*) 755854b44505Smrg # Some compilers place space between "-{L,R}" and the path. 755954b44505Smrg # Remove the space. 75600a392d7eSmrg if test x-L = "$p" || 75610a392d7eSmrg test x-R = "$p"; then 756254b44505Smrg prev=$p 756354b44505Smrg continue 756454b44505Smrg fi 75654a041c5bSmacallan 756654b44505Smrg # Expand the sysroot to ease extracting the directories later. 756754b44505Smrg if test -z "$prev"; then 756854b44505Smrg case $p in 756954b44505Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 757054b44505Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 757154b44505Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 757254b44505Smrg esac 757354b44505Smrg fi 757454b44505Smrg case $p in 757554b44505Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 757654b44505Smrg esac 75770a392d7eSmrg if test no = "$pre_test_object_deps_done"; then 75780a392d7eSmrg case $prev in 757954b44505Smrg -L | -R) 758054b44505Smrg # Internal compiler library paths should come after those 758154b44505Smrg # provided the user. The postdeps already come after the 758254b44505Smrg # user supplied libs so there is no need to process them. 758354b44505Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 75840a392d7eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 758554b44505Smrg else 75860a392d7eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 758754b44505Smrg fi 758854b44505Smrg ;; 758954b44505Smrg # The "-l" case would never come before the object being 759054b44505Smrg # linked, so don't bother handling this case. 759154b44505Smrg esac 759254b44505Smrg else 759354b44505Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 75940a392d7eSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 759554b44505Smrg else 75960a392d7eSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 759754b44505Smrg fi 759854b44505Smrg fi 759954b44505Smrg prev= 760054b44505Smrg ;; 76014a041c5bSmacallan 760254b44505Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 760354b44505Smrg *.$objext) 760454b44505Smrg # This assumes that the test object file only shows up 760554b44505Smrg # once in the compiler output. 760654b44505Smrg if test "$p" = "conftest.$objext"; then 760754b44505Smrg pre_test_object_deps_done=yes 760854b44505Smrg continue 760954b44505Smrg fi 76104a041c5bSmacallan 76110a392d7eSmrg if test no = "$pre_test_object_deps_done"; then 761254b44505Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76130a392d7eSmrg _LT_TAGVAR(predep_objects, $1)=$p 761454b44505Smrg else 761554b44505Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 761654b44505Smrg fi 761754b44505Smrg else 761854b44505Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76190a392d7eSmrg _LT_TAGVAR(postdep_objects, $1)=$p 762054b44505Smrg else 762154b44505Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 762254b44505Smrg fi 762354b44505Smrg fi 762454b44505Smrg ;; 76254a041c5bSmacallan 762654b44505Smrg *) ;; # Ignore the rest. 76274a041c5bSmacallan 762854b44505Smrg esac 762954b44505Smrg done 76304a041c5bSmacallan 763154b44505Smrg # Clean up. 763254b44505Smrg rm -f a.out a.exe 763354b44505Smrgelse 763454b44505Smrg echo "libtool.m4: error: problem compiling $1 test program" 763554b44505Smrgfi 76364a041c5bSmacallan 763754b44505Smrg$RM -f confest.$objext 763854b44505SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76394a041c5bSmacallan 764054b44505Smrg# PORTME: override above test on systems where it is broken 764154b44505Smrgm4_if([$1], [CXX], 764254b44505Smrg[case $host_os in 764354b44505Smrginterix[[3-9]]*) 764454b44505Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 764554b44505Smrg # hack all around it, let's just trust "g++" to DTRT. 764654b44505Smrg _LT_TAGVAR(predep_objects,$1)= 764754b44505Smrg _LT_TAGVAR(postdep_objects,$1)= 764854b44505Smrg _LT_TAGVAR(postdeps,$1)= 764954b44505Smrg ;; 765054b44505Smrgesac 765154b44505Smrg]) 76524a041c5bSmacallan 765354b44505Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 765454b44505Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 765554b44505Smrgesac 765654b44505Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 765754b44505Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76580a392d7eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 765954b44505Smrgfi 766054b44505Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 766154b44505Smrg [The directories searched by this compiler when creating a shared library]) 766254b44505Smrg_LT_TAGDECL([], [predep_objects], [1], 766354b44505Smrg [Dependencies to place before and after the objects being linked to 766454b44505Smrg create a shared library]) 766554b44505Smrg_LT_TAGDECL([], [postdep_objects], [1]) 766654b44505Smrg_LT_TAGDECL([], [predeps], [1]) 766754b44505Smrg_LT_TAGDECL([], [postdeps], [1]) 766854b44505Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 766954b44505Smrg [The library search path used internally by the compiler when linking 767054b44505Smrg a shared library]) 767154b44505Smrg])# _LT_SYS_HIDDEN_LIBDEPS 767254b44505Smrg 767354b44505Smrg 767454b44505Smrg# _LT_LANG_F77_CONFIG([TAG]) 767554b44505Smrg# -------------------------- 767654b44505Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 767754b44505Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76780a392d7eSmrg# to write the compiler configuration to 'libtool'. 767954b44505Smrgm4_defun([_LT_LANG_F77_CONFIG], 768054b44505Smrg[AC_LANG_PUSH(Fortran 77) 76810a392d7eSmrgif test -z "$F77" || test no = "$F77"; then 768254b44505Smrg _lt_disable_F77=yes 768354b44505Smrgfi 76844a041c5bSmacallan 768554b44505Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 768654b44505Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 768754b44505Smrg_LT_TAGVAR(always_export_symbols, $1)=no 768854b44505Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 768954b44505Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 769054b44505Smrg_LT_TAGVAR(hardcode_direct, $1)=no 769154b44505Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 769254b44505Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 769354b44505Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 769454b44505Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 769554b44505Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 769654b44505Smrg_LT_TAGVAR(inherit_rpath, $1)=no 769754b44505Smrg_LT_TAGVAR(module_cmds, $1)= 769854b44505Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 769954b44505Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 770054b44505Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 770154b44505Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 770254b44505Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 770354b44505Smrg_LT_TAGVAR(no_undefined_flag, $1)= 770454b44505Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 770554b44505Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77064a041c5bSmacallan 770754b44505Smrg# Source file extension for f77 test sources. 770854b44505Smrgac_ext=f 77094a041c5bSmacallan 771054b44505Smrg# Object file extension for compiled f77 test sources. 771154b44505Smrgobjext=o 771254b44505Smrg_LT_TAGVAR(objext, $1)=$objext 771354b44505Smrg 771454b44505Smrg# No sense in running all these tests if we already determined that 771554b44505Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 771654b44505Smrg# are currently assumed to apply to all compilers on this platform, 771754b44505Smrg# and will be corrupted by setting them based on a non-working compiler. 77180a392d7eSmrgif test yes != "$_lt_disable_F77"; then 771954b44505Smrg # Code to be used in simple compile tests 772054b44505Smrg lt_simple_compile_test_code="\ 772154b44505Smrg subroutine t 772254b44505Smrg return 772354b44505Smrg end 772454b44505Smrg" 77254a041c5bSmacallan 772654b44505Smrg # Code to be used in simple link tests 772754b44505Smrg lt_simple_link_test_code="\ 772854b44505Smrg program t 772954b44505Smrg end 773054b44505Smrg" 77314a041c5bSmacallan 773254b44505Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 773354b44505Smrg _LT_TAG_COMPILER 773454b44505Smrg 773554b44505Smrg # save warnings/boilerplate of simple test code 773654b44505Smrg _LT_COMPILER_BOILERPLATE 773754b44505Smrg _LT_LINKER_BOILERPLATE 773854b44505Smrg 773954b44505Smrg # Allow CC to be a program name with arguments. 77400a392d7eSmrg lt_save_CC=$CC 774154b44505Smrg lt_save_GCC=$GCC 774254b44505Smrg lt_save_CFLAGS=$CFLAGS 774354b44505Smrg CC=${F77-"f77"} 774454b44505Smrg CFLAGS=$FFLAGS 774554b44505Smrg compiler=$CC 774654b44505Smrg _LT_TAGVAR(compiler, $1)=$CC 774754b44505Smrg _LT_CC_BASENAME([$compiler]) 774854b44505Smrg GCC=$G77 774954b44505Smrg if test -n "$compiler"; then 775054b44505Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 775154b44505Smrg AC_MSG_RESULT([$can_build_shared]) 77524a041c5bSmacallan 775354b44505Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77540a392d7eSmrg test no = "$can_build_shared" && enable_shared=no 77554a041c5bSmacallan 775654b44505Smrg # On AIX, shared libraries and static libraries use the same namespace, and 775754b44505Smrg # are all built from PIC. 775854b44505Smrg case $host_os in 775954b44505Smrg aix3*) 77600a392d7eSmrg test yes = "$enable_shared" && enable_static=no 776154b44505Smrg if test -n "$RANLIB"; then 776254b44505Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 776354b44505Smrg postinstall_cmds='$RANLIB $lib' 776454b44505Smrg fi 776554b44505Smrg ;; 776654b44505Smrg aix[[4-9]]*) 77670a392d7eSmrg if test ia64 != "$host_cpu"; then 77680a392d7eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77690a392d7eSmrg yes,aix,yes) ;; # shared object as lib.so file only 77700a392d7eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 77710a392d7eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77720a392d7eSmrg esac 777354b44505Smrg fi 777454b44505Smrg ;; 777554b44505Smrg esac 777654b44505Smrg AC_MSG_RESULT([$enable_shared]) 777754b44505Smrg 777854b44505Smrg AC_MSG_CHECKING([whether to build static libraries]) 777954b44505Smrg # Make sure either enable_shared or enable_static is yes. 77800a392d7eSmrg test yes = "$enable_shared" || enable_static=yes 778154b44505Smrg AC_MSG_RESULT([$enable_static]) 778254b44505Smrg 77830a392d7eSmrg _LT_TAGVAR(GCC, $1)=$G77 77840a392d7eSmrg _LT_TAGVAR(LD, $1)=$LD 778554b44505Smrg 778654b44505Smrg ## CAVEAT EMPTOR: 778754b44505Smrg ## There is no encapsulation within the following macros, do not change 778854b44505Smrg ## the running order or otherwise move them around unless you know exactly 778954b44505Smrg ## what you are doing... 779054b44505Smrg _LT_COMPILER_PIC($1) 779154b44505Smrg _LT_COMPILER_C_O($1) 779254b44505Smrg _LT_COMPILER_FILE_LOCKS($1) 779354b44505Smrg _LT_LINKER_SHLIBS($1) 779454b44505Smrg _LT_SYS_DYNAMIC_LINKER($1) 779554b44505Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 779654b44505Smrg 779754b44505Smrg _LT_CONFIG($1) 779854b44505Smrg fi # test -n "$compiler" 779954b44505Smrg 780054b44505Smrg GCC=$lt_save_GCC 78010a392d7eSmrg CC=$lt_save_CC 78020a392d7eSmrg CFLAGS=$lt_save_CFLAGS 78030a392d7eSmrgfi # test yes != "$_lt_disable_F77" 78044a041c5bSmacallan 780554b44505SmrgAC_LANG_POP 780654b44505Smrg])# _LT_LANG_F77_CONFIG 78074a041c5bSmacallan 78084a041c5bSmacallan 780954b44505Smrg# _LT_LANG_FC_CONFIG([TAG]) 781054b44505Smrg# ------------------------- 781154b44505Smrg# Ensure that the configuration variables for a Fortran compiler are 781254b44505Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78130a392d7eSmrg# to write the compiler configuration to 'libtool'. 781454b44505Smrgm4_defun([_LT_LANG_FC_CONFIG], 781554b44505Smrg[AC_LANG_PUSH(Fortran) 781654b44505Smrg 78170a392d7eSmrgif test -z "$FC" || test no = "$FC"; then 781854b44505Smrg _lt_disable_FC=yes 781954b44505Smrgfi 78204a041c5bSmacallan 782154b44505Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 782254b44505Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 782354b44505Smrg_LT_TAGVAR(always_export_symbols, $1)=no 782454b44505Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 782554b44505Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 782654b44505Smrg_LT_TAGVAR(hardcode_direct, $1)=no 782754b44505Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 782854b44505Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 782954b44505Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 783054b44505Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 783154b44505Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 783254b44505Smrg_LT_TAGVAR(inherit_rpath, $1)=no 783354b44505Smrg_LT_TAGVAR(module_cmds, $1)= 783454b44505Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 783554b44505Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 783654b44505Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 783754b44505Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 783854b44505Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 783954b44505Smrg_LT_TAGVAR(no_undefined_flag, $1)= 784054b44505Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 784154b44505Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 784254b44505Smrg 784354b44505Smrg# Source file extension for fc test sources. 784454b44505Smrgac_ext=${ac_fc_srcext-f} 784554b44505Smrg 784654b44505Smrg# Object file extension for compiled fc test sources. 784754b44505Smrgobjext=o 784854b44505Smrg_LT_TAGVAR(objext, $1)=$objext 784954b44505Smrg 785054b44505Smrg# No sense in running all these tests if we already determined that 785154b44505Smrg# the FC compiler isn't working. Some variables (like enable_shared) 785254b44505Smrg# are currently assumed to apply to all compilers on this platform, 785354b44505Smrg# and will be corrupted by setting them based on a non-working compiler. 78540a392d7eSmrgif test yes != "$_lt_disable_FC"; then 785554b44505Smrg # Code to be used in simple compile tests 785654b44505Smrg lt_simple_compile_test_code="\ 785754b44505Smrg subroutine t 785854b44505Smrg return 785954b44505Smrg end 786054b44505Smrg" 78614a041c5bSmacallan 786254b44505Smrg # Code to be used in simple link tests 786354b44505Smrg lt_simple_link_test_code="\ 786454b44505Smrg program t 786554b44505Smrg end 786654b44505Smrg" 78674a041c5bSmacallan 786854b44505Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 786954b44505Smrg _LT_TAG_COMPILER 78704a041c5bSmacallan 787154b44505Smrg # save warnings/boilerplate of simple test code 787254b44505Smrg _LT_COMPILER_BOILERPLATE 787354b44505Smrg _LT_LINKER_BOILERPLATE 78744a041c5bSmacallan 787554b44505Smrg # Allow CC to be a program name with arguments. 78760a392d7eSmrg lt_save_CC=$CC 787754b44505Smrg lt_save_GCC=$GCC 787854b44505Smrg lt_save_CFLAGS=$CFLAGS 787954b44505Smrg CC=${FC-"f95"} 788054b44505Smrg CFLAGS=$FCFLAGS 788154b44505Smrg compiler=$CC 788254b44505Smrg GCC=$ac_cv_fc_compiler_gnu 78834a041c5bSmacallan 788454b44505Smrg _LT_TAGVAR(compiler, $1)=$CC 788554b44505Smrg _LT_CC_BASENAME([$compiler]) 78864a041c5bSmacallan 788754b44505Smrg if test -n "$compiler"; then 788854b44505Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 788954b44505Smrg AC_MSG_RESULT([$can_build_shared]) 78904a041c5bSmacallan 789154b44505Smrg AC_MSG_CHECKING([whether to build shared libraries]) 78920a392d7eSmrg test no = "$can_build_shared" && enable_shared=no 78934a041c5bSmacallan 789454b44505Smrg # On AIX, shared libraries and static libraries use the same namespace, and 789554b44505Smrg # are all built from PIC. 789654b44505Smrg case $host_os in 789754b44505Smrg aix3*) 78980a392d7eSmrg test yes = "$enable_shared" && enable_static=no 789954b44505Smrg if test -n "$RANLIB"; then 790054b44505Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 790154b44505Smrg postinstall_cmds='$RANLIB $lib' 790254b44505Smrg fi 790354b44505Smrg ;; 790454b44505Smrg aix[[4-9]]*) 79050a392d7eSmrg if test ia64 != "$host_cpu"; then 79060a392d7eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79070a392d7eSmrg yes,aix,yes) ;; # shared object as lib.so file only 79080a392d7eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 79090a392d7eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79100a392d7eSmrg esac 791154b44505Smrg fi 791254b44505Smrg ;; 791354b44505Smrg esac 791454b44505Smrg AC_MSG_RESULT([$enable_shared]) 791554b44505Smrg 791654b44505Smrg AC_MSG_CHECKING([whether to build static libraries]) 791754b44505Smrg # Make sure either enable_shared or enable_static is yes. 79180a392d7eSmrg test yes = "$enable_shared" || enable_static=yes 791954b44505Smrg AC_MSG_RESULT([$enable_static]) 792054b44505Smrg 79210a392d7eSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79220a392d7eSmrg _LT_TAGVAR(LD, $1)=$LD 792354b44505Smrg 792454b44505Smrg ## CAVEAT EMPTOR: 792554b44505Smrg ## There is no encapsulation within the following macros, do not change 792654b44505Smrg ## the running order or otherwise move them around unless you know exactly 792754b44505Smrg ## what you are doing... 792854b44505Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 792954b44505Smrg _LT_COMPILER_PIC($1) 793054b44505Smrg _LT_COMPILER_C_O($1) 793154b44505Smrg _LT_COMPILER_FILE_LOCKS($1) 793254b44505Smrg _LT_LINKER_SHLIBS($1) 793354b44505Smrg _LT_SYS_DYNAMIC_LINKER($1) 793454b44505Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 793554b44505Smrg 793654b44505Smrg _LT_CONFIG($1) 793754b44505Smrg fi # test -n "$compiler" 793854b44505Smrg 793954b44505Smrg GCC=$lt_save_GCC 794054b44505Smrg CC=$lt_save_CC 794154b44505Smrg CFLAGS=$lt_save_CFLAGS 79420a392d7eSmrgfi # test yes != "$_lt_disable_FC" 79434a041c5bSmacallan 794454b44505SmrgAC_LANG_POP 794554b44505Smrg])# _LT_LANG_FC_CONFIG 79464a041c5bSmacallan 79474a041c5bSmacallan 794854b44505Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 794954b44505Smrg# -------------------------- 795054b44505Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 795154b44505Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79520a392d7eSmrg# to write the compiler configuration to 'libtool'. 795354b44505Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 795454b44505Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 795554b44505SmrgAC_LANG_SAVE 79564a041c5bSmacallan 795754b44505Smrg# Source file extension for Java test sources. 795854b44505Smrgac_ext=java 79594a041c5bSmacallan 796054b44505Smrg# Object file extension for compiled Java test sources. 796154b44505Smrgobjext=o 796254b44505Smrg_LT_TAGVAR(objext, $1)=$objext 79634a041c5bSmacallan 796454b44505Smrg# Code to be used in simple compile tests 796554b44505Smrglt_simple_compile_test_code="class foo {}" 79664a041c5bSmacallan 796754b44505Smrg# Code to be used in simple link tests 796854b44505Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79694a041c5bSmacallan 797054b44505Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 797154b44505Smrg_LT_TAG_COMPILER 79724a041c5bSmacallan 797354b44505Smrg# save warnings/boilerplate of simple test code 797454b44505Smrg_LT_COMPILER_BOILERPLATE 797554b44505Smrg_LT_LINKER_BOILERPLATE 79764a041c5bSmacallan 797754b44505Smrg# Allow CC to be a program name with arguments. 797854b44505Smrglt_save_CC=$CC 797954b44505Smrglt_save_CFLAGS=$CFLAGS 798054b44505Smrglt_save_GCC=$GCC 798154b44505SmrgGCC=yes 798254b44505SmrgCC=${GCJ-"gcj"} 798354b44505SmrgCFLAGS=$GCJFLAGS 798454b44505Smrgcompiler=$CC 798554b44505Smrg_LT_TAGVAR(compiler, $1)=$CC 79860a392d7eSmrg_LT_TAGVAR(LD, $1)=$LD 798754b44505Smrg_LT_CC_BASENAME([$compiler]) 79884a041c5bSmacallan 798954b44505Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 799054b44505Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79914a041c5bSmacallan 799254b44505Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 799354b44505Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 799454b44505Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79954a041c5bSmacallan 799654b44505Smrgif test -n "$compiler"; then 799754b44505Smrg _LT_COMPILER_NO_RTTI($1) 799854b44505Smrg _LT_COMPILER_PIC($1) 799954b44505Smrg _LT_COMPILER_C_O($1) 800054b44505Smrg _LT_COMPILER_FILE_LOCKS($1) 800154b44505Smrg _LT_LINKER_SHLIBS($1) 800254b44505Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80034a041c5bSmacallan 800454b44505Smrg _LT_CONFIG($1) 800554b44505Smrgfi 80064a041c5bSmacallan 800754b44505SmrgAC_LANG_RESTORE 80084a041c5bSmacallan 800954b44505SmrgGCC=$lt_save_GCC 801054b44505SmrgCC=$lt_save_CC 801154b44505SmrgCFLAGS=$lt_save_CFLAGS 801254b44505Smrg])# _LT_LANG_GCJ_CONFIG 80134a041c5bSmacallan 80144a041c5bSmacallan 80150a392d7eSmrg# _LT_LANG_GO_CONFIG([TAG]) 80160a392d7eSmrg# -------------------------- 80170a392d7eSmrg# Ensure that the configuration variables for the GNU Go compiler 80180a392d7eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80190a392d7eSmrg# to write the compiler configuration to 'libtool'. 80200a392d7eSmrgm4_defun([_LT_LANG_GO_CONFIG], 80210a392d7eSmrg[AC_REQUIRE([LT_PROG_GO])dnl 80220a392d7eSmrgAC_LANG_SAVE 80230a392d7eSmrg 80240a392d7eSmrg# Source file extension for Go test sources. 80250a392d7eSmrgac_ext=go 80260a392d7eSmrg 80270a392d7eSmrg# Object file extension for compiled Go test sources. 80280a392d7eSmrgobjext=o 80290a392d7eSmrg_LT_TAGVAR(objext, $1)=$objext 80300a392d7eSmrg 80310a392d7eSmrg# Code to be used in simple compile tests 80320a392d7eSmrglt_simple_compile_test_code="package main; func main() { }" 80330a392d7eSmrg 80340a392d7eSmrg# Code to be used in simple link tests 80350a392d7eSmrglt_simple_link_test_code='package main; func main() { }' 80360a392d7eSmrg 80370a392d7eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80380a392d7eSmrg_LT_TAG_COMPILER 80390a392d7eSmrg 80400a392d7eSmrg# save warnings/boilerplate of simple test code 80410a392d7eSmrg_LT_COMPILER_BOILERPLATE 80420a392d7eSmrg_LT_LINKER_BOILERPLATE 80430a392d7eSmrg 80440a392d7eSmrg# Allow CC to be a program name with arguments. 80450a392d7eSmrglt_save_CC=$CC 80460a392d7eSmrglt_save_CFLAGS=$CFLAGS 80470a392d7eSmrglt_save_GCC=$GCC 80480a392d7eSmrgGCC=yes 80490a392d7eSmrgCC=${GOC-"gccgo"} 80500a392d7eSmrgCFLAGS=$GOFLAGS 80510a392d7eSmrgcompiler=$CC 80520a392d7eSmrg_LT_TAGVAR(compiler, $1)=$CC 80530a392d7eSmrg_LT_TAGVAR(LD, $1)=$LD 80540a392d7eSmrg_LT_CC_BASENAME([$compiler]) 80550a392d7eSmrg 80560a392d7eSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 80570a392d7eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80580a392d7eSmrg 80590a392d7eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80600a392d7eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80610a392d7eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80620a392d7eSmrg 80630a392d7eSmrgif test -n "$compiler"; then 80640a392d7eSmrg _LT_COMPILER_NO_RTTI($1) 80650a392d7eSmrg _LT_COMPILER_PIC($1) 80660a392d7eSmrg _LT_COMPILER_C_O($1) 80670a392d7eSmrg _LT_COMPILER_FILE_LOCKS($1) 80680a392d7eSmrg _LT_LINKER_SHLIBS($1) 80690a392d7eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80700a392d7eSmrg 80710a392d7eSmrg _LT_CONFIG($1) 80720a392d7eSmrgfi 80730a392d7eSmrg 80740a392d7eSmrgAC_LANG_RESTORE 80750a392d7eSmrg 80760a392d7eSmrgGCC=$lt_save_GCC 80770a392d7eSmrgCC=$lt_save_CC 80780a392d7eSmrgCFLAGS=$lt_save_CFLAGS 80790a392d7eSmrg])# _LT_LANG_GO_CONFIG 80800a392d7eSmrg 80810a392d7eSmrg 808254b44505Smrg# _LT_LANG_RC_CONFIG([TAG]) 808354b44505Smrg# ------------------------- 808454b44505Smrg# Ensure that the configuration variables for the Windows resource compiler 808554b44505Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80860a392d7eSmrg# to write the compiler configuration to 'libtool'. 808754b44505Smrgm4_defun([_LT_LANG_RC_CONFIG], 808854b44505Smrg[AC_REQUIRE([LT_PROG_RC])dnl 808954b44505SmrgAC_LANG_SAVE 80904a041c5bSmacallan 809154b44505Smrg# Source file extension for RC test sources. 809254b44505Smrgac_ext=rc 80934a041c5bSmacallan 809454b44505Smrg# Object file extension for compiled RC test sources. 809554b44505Smrgobjext=o 809654b44505Smrg_LT_TAGVAR(objext, $1)=$objext 80974a041c5bSmacallan 809854b44505Smrg# Code to be used in simple compile tests 809954b44505Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81004a041c5bSmacallan 810154b44505Smrg# Code to be used in simple link tests 81020a392d7eSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81034a041c5bSmacallan 810454b44505Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 810554b44505Smrg_LT_TAG_COMPILER 81064a041c5bSmacallan 810754b44505Smrg# save warnings/boilerplate of simple test code 810854b44505Smrg_LT_COMPILER_BOILERPLATE 810954b44505Smrg_LT_LINKER_BOILERPLATE 811054b44505Smrg 811154b44505Smrg# Allow CC to be a program name with arguments. 81120a392d7eSmrglt_save_CC=$CC 811354b44505Smrglt_save_CFLAGS=$CFLAGS 811454b44505Smrglt_save_GCC=$GCC 811554b44505SmrgGCC= 811654b44505SmrgCC=${RC-"windres"} 811754b44505SmrgCFLAGS= 811854b44505Smrgcompiler=$CC 811954b44505Smrg_LT_TAGVAR(compiler, $1)=$CC 812054b44505Smrg_LT_CC_BASENAME([$compiler]) 812154b44505Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81224a041c5bSmacallan 812354b44505Smrgif test -n "$compiler"; then 812454b44505Smrg : 812554b44505Smrg _LT_CONFIG($1) 812654b44505Smrgfi 812754b44505Smrg 812854b44505SmrgGCC=$lt_save_GCC 812954b44505SmrgAC_LANG_RESTORE 813054b44505SmrgCC=$lt_save_CC 813154b44505SmrgCFLAGS=$lt_save_CFLAGS 813254b44505Smrg])# _LT_LANG_RC_CONFIG 81334a041c5bSmacallan 81344a041c5bSmacallan 813554b44505Smrg# LT_PROG_GCJ 813654b44505Smrg# ----------- 813754b44505SmrgAC_DEFUN([LT_PROG_GCJ], 813854b44505Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 813954b44505Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 814054b44505Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81410a392d7eSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 814254b44505Smrg AC_SUBST(GCJFLAGS)])])[]dnl 814354b44505Smrg]) 81444a041c5bSmacallan 814554b44505Smrg# Old name: 814654b44505SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 814754b44505Smrgdnl aclocal-1.4 backwards compatibility: 814854b44505Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81494a041c5bSmacallan 81504a041c5bSmacallan 81510a392d7eSmrg# LT_PROG_GO 81520a392d7eSmrg# ---------- 81530a392d7eSmrgAC_DEFUN([LT_PROG_GO], 81540a392d7eSmrg[AC_CHECK_TOOL(GOC, gccgo,) 81550a392d7eSmrg]) 81560a392d7eSmrg 81570a392d7eSmrg 815854b44505Smrg# LT_PROG_RC 815954b44505Smrg# ---------- 816054b44505SmrgAC_DEFUN([LT_PROG_RC], 816154b44505Smrg[AC_CHECK_TOOL(RC, windres,) 81624a041c5bSmacallan]) 81634a041c5bSmacallan 816454b44505Smrg# Old name: 816554b44505SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 816654b44505Smrgdnl aclocal-1.4 backwards compatibility: 816754b44505Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 816854b44505Smrg 816954b44505Smrg 817054b44505Smrg# _LT_DECL_EGREP 817154b44505Smrg# -------------- 817254b44505Smrg# If we don't have a new enough Autoconf to choose the best grep 817354b44505Smrg# available, choose the one first in the user's PATH. 817454b44505Smrgm4_defun([_LT_DECL_EGREP], 817554b44505Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 817654b44505SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 817754b44505Smrgtest -z "$GREP" && GREP=grep 817854b44505Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 817954b44505Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 818054b44505Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 818154b44505Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 818254b44505SmrgAC_SUBST([GREP]) 81834a041c5bSmacallan]) 81844a041c5bSmacallan 81854a041c5bSmacallan 818654b44505Smrg# _LT_DECL_OBJDUMP 818754b44505Smrg# -------------- 818854b44505Smrg# If we don't have a new enough Autoconf to choose the best objdump 818954b44505Smrg# available, choose the one first in the user's PATH. 819054b44505Smrgm4_defun([_LT_DECL_OBJDUMP], 819154b44505Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 819254b44505Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 819354b44505Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 819454b44505SmrgAC_SUBST([OBJDUMP]) 819554b44505Smrg]) 81964a041c5bSmacallan 819754b44505Smrg# _LT_DECL_DLLTOOL 81984a041c5bSmacallan# ---------------- 819954b44505Smrg# Ensure DLLTOOL variable is set. 820054b44505Smrgm4_defun([_LT_DECL_DLLTOOL], 820154b44505Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 820254b44505Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 820354b44505Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 820454b44505SmrgAC_SUBST([DLLTOOL]) 820554b44505Smrg]) 82064a041c5bSmacallan 820754b44505Smrg# _LT_DECL_SED 820854b44505Smrg# ------------ 820954b44505Smrg# Check for a fully-functional sed program, that truncates 821054b44505Smrg# as few characters as possible. Prefer GNU sed if found. 821154b44505Smrgm4_defun([_LT_DECL_SED], 821254b44505Smrg[AC_PROG_SED 821354b44505Smrgtest -z "$SED" && SED=sed 821454b44505SmrgXsed="$SED -e 1s/^X//" 821554b44505Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 821654b44505Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 821754b44505Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 821854b44505Smrg])# _LT_DECL_SED 82194a041c5bSmacallan 822054b44505Smrgm4_ifndef([AC_PROG_SED], [ 82214a041c5bSmacallan# NOTE: This macro has been submitted for inclusion into # 82224a041c5bSmacallan# GNU Autoconf as AC_PROG_SED. When it is available in # 82234a041c5bSmacallan# a released version of Autoconf we should remove this # 82244a041c5bSmacallan# macro and use it instead. # 822554b44505Smrg 822654b44505Smrgm4_defun([AC_PROG_SED], 82274a041c5bSmacallan[AC_MSG_CHECKING([for a sed that does not truncate output]) 82284a041c5bSmacallanAC_CACHE_VAL(lt_cv_path_SED, 82294a041c5bSmacallan[# Loop through the user's path and test for sed and gsed. 82304a041c5bSmacallan# Then use that list of sed's as ones to test for truncation. 82314a041c5bSmacallanas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82324a041c5bSmacallanfor as_dir in $PATH 82334a041c5bSmacallando 82344a041c5bSmacallan IFS=$as_save_IFS 82354a041c5bSmacallan test -z "$as_dir" && as_dir=. 82364a041c5bSmacallan for lt_ac_prog in sed gsed; do 82374a041c5bSmacallan for ac_exec_ext in '' $ac_executable_extensions; do 823854b44505Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82394a041c5bSmacallan lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82404a041c5bSmacallan fi 82414a041c5bSmacallan done 82424a041c5bSmacallan done 82434a041c5bSmacallandone 82444a041c5bSmacallanIFS=$as_save_IFS 82454a041c5bSmacallanlt_ac_max=0 82464a041c5bSmacallanlt_ac_count=0 82474a041c5bSmacallan# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82484a041c5bSmacallan# along with /bin/sed that truncates output. 82494a041c5bSmacallanfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82500a392d7eSmrg test ! -f "$lt_ac_sed" && continue 82514a041c5bSmacallan cat /dev/null > conftest.in 82524a041c5bSmacallan lt_ac_count=0 82534a041c5bSmacallan echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82544a041c5bSmacallan # Check for GNU sed and select it if it is found. 82554a041c5bSmacallan if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82564a041c5bSmacallan lt_cv_path_SED=$lt_ac_sed 82574a041c5bSmacallan break 82584a041c5bSmacallan fi 82594a041c5bSmacallan while true; do 82604a041c5bSmacallan cat conftest.in conftest.in >conftest.tmp 82614a041c5bSmacallan mv conftest.tmp conftest.in 82624a041c5bSmacallan cp conftest.in conftest.nl 82634a041c5bSmacallan echo >>conftest.nl 82644a041c5bSmacallan $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82654a041c5bSmacallan cmp -s conftest.out conftest.nl || break 82664a041c5bSmacallan # 10000 chars as input seems more than enough 82670a392d7eSmrg test 10 -lt "$lt_ac_count" && break 82684a041c5bSmacallan lt_ac_count=`expr $lt_ac_count + 1` 82690a392d7eSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82704a041c5bSmacallan lt_ac_max=$lt_ac_count 82714a041c5bSmacallan lt_cv_path_SED=$lt_ac_sed 82724a041c5bSmacallan fi 82734a041c5bSmacallan done 82744a041c5bSmacallandone 82754a041c5bSmacallan]) 82764a041c5bSmacallanSED=$lt_cv_path_SED 82774a041c5bSmacallanAC_SUBST([SED]) 82784a041c5bSmacallanAC_MSG_RESULT([$SED]) 827954b44505Smrg])#AC_PROG_SED 828054b44505Smrg])#m4_ifndef 828154b44505Smrg 828254b44505Smrg# Old name: 828354b44505SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 828454b44505Smrgdnl aclocal-1.4 backwards compatibility: 828554b44505Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 828654b44505Smrg 828754b44505Smrg 828854b44505Smrg# _LT_CHECK_SHELL_FEATURES 828954b44505Smrg# ------------------------ 829054b44505Smrg# Find out whether the shell is Bourne or XSI compatible, 829154b44505Smrg# or has some other useful features. 829254b44505Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 82930a392d7eSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 829454b44505Smrg lt_unset=unset 829554b44505Smrgelse 829654b44505Smrg lt_unset=false 829754b44505Smrgfi 829854b44505Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 829954b44505Smrg 830054b44505Smrg# test EBCDIC or ASCII 830154b44505Smrgcase `echo X|tr X '\101'` in 830254b44505Smrg A) # ASCII based system 830354b44505Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 830454b44505Smrg lt_SP2NL='tr \040 \012' 830554b44505Smrg lt_NL2SP='tr \015\012 \040\040' 830654b44505Smrg ;; 830754b44505Smrg *) # EBCDIC based system 830854b44505Smrg lt_SP2NL='tr \100 \n' 830954b44505Smrg lt_NL2SP='tr \r\n \100\100' 831054b44505Smrg ;; 831154b44505Smrgesac 831254b44505Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 831354b44505Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 831454b44505Smrg])# _LT_CHECK_SHELL_FEATURES 831554b44505Smrg 831654b44505Smrg 831754b44505Smrg# _LT_PATH_CONVERSION_FUNCTIONS 831854b44505Smrg# ----------------------------- 83190a392d7eSmrg# Determine what file name conversion functions should be used by 832054b44505Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 832154b44505Smrg# for certain cross-compile configurations and native mingw. 832254b44505Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 832354b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 832454b44505SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 832554b44505SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 832654b44505SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 832754b44505Smrg[case $host in 832854b44505Smrg *-*-mingw* ) 832954b44505Smrg case $build in 833054b44505Smrg *-*-mingw* ) # actually msys 833154b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 833254b44505Smrg ;; 833354b44505Smrg *-*-cygwin* ) 833454b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 833554b44505Smrg ;; 833654b44505Smrg * ) # otherwise, assume *nix 833754b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 833854b44505Smrg ;; 833954b44505Smrg esac 834054b44505Smrg ;; 834154b44505Smrg *-*-cygwin* ) 834254b44505Smrg case $build in 834354b44505Smrg *-*-mingw* ) # actually msys 834454b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 834554b44505Smrg ;; 834654b44505Smrg *-*-cygwin* ) 834754b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 834854b44505Smrg ;; 834954b44505Smrg * ) # otherwise, assume *nix 835054b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 835154b44505Smrg ;; 835254b44505Smrg esac 835354b44505Smrg ;; 835454b44505Smrg * ) # unhandled hosts (and "normal" native builds) 835554b44505Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 835654b44505Smrg ;; 835754b44505Smrgesac 835854b44505Smrg]) 835954b44505Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 836054b44505SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 836154b44505Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 836254b44505Smrg [0], [convert $build file names to $host format])dnl 836354b44505Smrg 836454b44505SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 836554b44505SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 836654b44505Smrg[#assume ordinary cross tools, or native build. 836754b44505Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 836854b44505Smrgcase $host in 836954b44505Smrg *-*-mingw* ) 837054b44505Smrg case $build in 837154b44505Smrg *-*-mingw* ) # actually msys 837254b44505Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 837354b44505Smrg ;; 837454b44505Smrg esac 837554b44505Smrg ;; 837654b44505Smrgesac 837754b44505Smrg]) 837854b44505Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 837954b44505SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 838054b44505Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 838154b44505Smrg [0], [convert $build files to toolchain format])dnl 838254b44505Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 838354b44505Smrg 838454b44505Smrg# Helper functions for option handling. -*- Autoconf -*- 838554b44505Smrg# 83860a392d7eSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 83870a392d7eSmrg# Foundation, Inc. 838854b44505Smrg# Written by Gary V. Vaughan, 2004 838954b44505Smrg# 839054b44505Smrg# This file is free software; the Free Software Foundation gives 839154b44505Smrg# unlimited permission to copy and/or distribute it, with or without 839254b44505Smrg# modifications, as long as this notice is preserved. 839354b44505Smrg 83940a392d7eSmrg# serial 8 ltoptions.m4 839554b44505Smrg 839654b44505Smrg# This is to help aclocal find these macros, as it can't see m4_define. 839754b44505SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 839854b44505Smrg 839954b44505Smrg 840054b44505Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 840154b44505Smrg# ------------------------------------------ 840254b44505Smrgm4_define([_LT_MANGLE_OPTION], 840354b44505Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 840454b44505Smrg 840554b44505Smrg 840654b44505Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 840754b44505Smrg# --------------------------------------- 840854b44505Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 840954b44505Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 841054b44505Smrg# saved as a flag. 841154b44505Smrgm4_define([_LT_SET_OPTION], 841254b44505Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 841354b44505Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 841454b44505Smrg _LT_MANGLE_DEFUN([$1], [$2]), 84150a392d7eSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 841654b44505Smrg]) 841754b44505Smrg 841854b44505Smrg 841954b44505Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 842054b44505Smrg# ------------------------------------------------------------ 842154b44505Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 842254b44505Smrgm4_define([_LT_IF_OPTION], 842354b44505Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 842454b44505Smrg 842554b44505Smrg 842654b44505Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 842754b44505Smrg# ------------------------------------------------------- 842854b44505Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 842954b44505Smrg# are set. 843054b44505Smrgm4_define([_LT_UNLESS_OPTIONS], 843154b44505Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 843254b44505Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 843354b44505Smrg [m4_define([$0_found])])])[]dnl 843454b44505Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 843554b44505Smrg])[]dnl 843654b44505Smrg]) 843754b44505Smrg 843854b44505Smrg 843954b44505Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 844054b44505Smrg# ---------------------------------------- 844154b44505Smrg# OPTION-LIST is a space-separated list of Libtool options associated 844254b44505Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 844354b44505Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 844454b44505Smrg# the unknown option and exit. 844554b44505Smrgm4_defun([_LT_SET_OPTIONS], 844654b44505Smrg[# Set options 844754b44505Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 844854b44505Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 844954b44505Smrg 845054b44505Smrgm4_if([$1],[LT_INIT],[ 845154b44505Smrg dnl 845254b44505Smrg dnl Simply set some default values (i.e off) if boolean options were not 845354b44505Smrg dnl specified: 845454b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 845554b44505Smrg ]) 845654b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 845754b44505Smrg ]) 845854b44505Smrg dnl 845954b44505Smrg dnl If no reference was made to various pairs of opposing options, then 846054b44505Smrg dnl we run the default mode handler for the pair. For example, if neither 84610a392d7eSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 846254b44505Smrg dnl archives by default: 846354b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 846454b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 846554b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 846654b44505Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 84670a392d7eSmrg [_LT_ENABLE_FAST_INSTALL]) 84680a392d7eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 84690a392d7eSmrg [_LT_WITH_AIX_SONAME([aix])]) 847054b44505Smrg ]) 847154b44505Smrg])# _LT_SET_OPTIONS 847254b44505Smrg 847354b44505Smrg 847454b44505Smrg 847554b44505Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 847654b44505Smrg# ----------------------------------------- 847754b44505Smrgm4_define([_LT_MANGLE_DEFUN], 847854b44505Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 847954b44505Smrg 848054b44505Smrg 848154b44505Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 848254b44505Smrg# ----------------------------------------------- 848354b44505Smrgm4_define([LT_OPTION_DEFINE], 848454b44505Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 848554b44505Smrg])# LT_OPTION_DEFINE 848654b44505Smrg 848754b44505Smrg 848854b44505Smrg# dlopen 848954b44505Smrg# ------ 849054b44505SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 849154b44505Smrg]) 849254b44505Smrg 849354b44505SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 849454b44505Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 849554b44505SmrgAC_DIAGNOSE([obsolete], 849654b44505Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 84970a392d7eSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 849854b44505Smrg]) 849954b44505Smrg 850054b44505Smrgdnl aclocal-1.4 backwards compatibility: 850154b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 850254b44505Smrg 850354b44505Smrg 850454b44505Smrg# win32-dll 850554b44505Smrg# --------- 850654b44505Smrg# Declare package support for building win32 dll's. 850754b44505SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 850854b44505Smrg[enable_win32_dll=yes 850954b44505Smrg 851054b44505Smrgcase $host in 851154b44505Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 851254b44505Smrg AC_CHECK_TOOL(AS, as, false) 851354b44505Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 851454b44505Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 851554b44505Smrg ;; 851654b44505Smrgesac 851754b44505Smrg 851854b44505Smrgtest -z "$AS" && AS=as 851954b44505Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 852054b44505Smrg 852154b44505Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 852254b44505Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 852354b44505Smrg 852454b44505Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 852554b44505Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 852654b44505Smrg])# win32-dll 852754b44505Smrg 852854b44505SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 852954b44505Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 853054b44505Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 853154b44505SmrgAC_DIAGNOSE([obsolete], 853254b44505Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85330a392d7eSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 853454b44505Smrg]) 853554b44505Smrg 853654b44505Smrgdnl aclocal-1.4 backwards compatibility: 853754b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 853854b44505Smrg 853954b44505Smrg 854054b44505Smrg# _LT_ENABLE_SHARED([DEFAULT]) 854154b44505Smrg# ---------------------------- 85420a392d7eSmrg# implement the --enable-shared flag, and supports the 'shared' and 85430a392d7eSmrg# 'disable-shared' LT_INIT options. 85440a392d7eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 854554b44505Smrgm4_define([_LT_ENABLE_SHARED], 854654b44505Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 854754b44505SmrgAC_ARG_ENABLE([shared], 854854b44505Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 854954b44505Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 855054b44505Smrg [p=${PACKAGE-default} 855154b44505Smrg case $enableval in 855254b44505Smrg yes) enable_shared=yes ;; 855354b44505Smrg no) enable_shared=no ;; 855454b44505Smrg *) 855554b44505Smrg enable_shared=no 855654b44505Smrg # Look at the argument we got. We use all the common list separators. 85570a392d7eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 855854b44505Smrg for pkg in $enableval; do 85590a392d7eSmrg IFS=$lt_save_ifs 856054b44505Smrg if test "X$pkg" = "X$p"; then 856154b44505Smrg enable_shared=yes 856254b44505Smrg fi 856354b44505Smrg done 85640a392d7eSmrg IFS=$lt_save_ifs 856554b44505Smrg ;; 856654b44505Smrg esac], 856754b44505Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 856854b44505Smrg 856954b44505Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 857054b44505Smrg [Whether or not to build shared libraries]) 857154b44505Smrg])# _LT_ENABLE_SHARED 857254b44505Smrg 857354b44505SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 857454b44505SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 857554b44505Smrg 857654b44505Smrg# Old names: 857754b44505SmrgAC_DEFUN([AC_ENABLE_SHARED], 857854b44505Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 857954b44505Smrg]) 858054b44505Smrg 858154b44505SmrgAC_DEFUN([AC_DISABLE_SHARED], 858254b44505Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 858354b44505Smrg]) 858454b44505Smrg 858554b44505SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 858654b44505SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 858754b44505Smrg 858854b44505Smrgdnl aclocal-1.4 backwards compatibility: 858954b44505Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 859054b44505Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 859154b44505Smrg 859254b44505Smrg 859354b44505Smrg 859454b44505Smrg# _LT_ENABLE_STATIC([DEFAULT]) 859554b44505Smrg# ---------------------------- 85960a392d7eSmrg# implement the --enable-static flag, and support the 'static' and 85970a392d7eSmrg# 'disable-static' LT_INIT options. 85980a392d7eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 859954b44505Smrgm4_define([_LT_ENABLE_STATIC], 860054b44505Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 860154b44505SmrgAC_ARG_ENABLE([static], 860254b44505Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 860354b44505Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 860454b44505Smrg [p=${PACKAGE-default} 860554b44505Smrg case $enableval in 860654b44505Smrg yes) enable_static=yes ;; 860754b44505Smrg no) enable_static=no ;; 860854b44505Smrg *) 860954b44505Smrg enable_static=no 861054b44505Smrg # Look at the argument we got. We use all the common list separators. 86110a392d7eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 861254b44505Smrg for pkg in $enableval; do 86130a392d7eSmrg IFS=$lt_save_ifs 861454b44505Smrg if test "X$pkg" = "X$p"; then 861554b44505Smrg enable_static=yes 861654b44505Smrg fi 861754b44505Smrg done 86180a392d7eSmrg IFS=$lt_save_ifs 861954b44505Smrg ;; 862054b44505Smrg esac], 862154b44505Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 862254b44505Smrg 862354b44505Smrg _LT_DECL([build_old_libs], [enable_static], [0], 862454b44505Smrg [Whether or not to build static libraries]) 862554b44505Smrg])# _LT_ENABLE_STATIC 862654b44505Smrg 862754b44505SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 862854b44505SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 862954b44505Smrg 863054b44505Smrg# Old names: 863154b44505SmrgAC_DEFUN([AC_ENABLE_STATIC], 863254b44505Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 863354b44505Smrg]) 863454b44505Smrg 863554b44505SmrgAC_DEFUN([AC_DISABLE_STATIC], 863654b44505Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 863754b44505Smrg]) 863854b44505Smrg 863954b44505SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 864054b44505SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 864154b44505Smrg 864254b44505Smrgdnl aclocal-1.4 backwards compatibility: 864354b44505Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 864454b44505Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 864554b44505Smrg 864654b44505Smrg 864754b44505Smrg 864854b44505Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 864954b44505Smrg# ---------------------------------- 86500a392d7eSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 86510a392d7eSmrg# and 'disable-fast-install' LT_INIT options. 86520a392d7eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 865354b44505Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 865454b44505Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 865554b44505SmrgAC_ARG_ENABLE([fast-install], 865654b44505Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 865754b44505Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 865854b44505Smrg [p=${PACKAGE-default} 865954b44505Smrg case $enableval in 866054b44505Smrg yes) enable_fast_install=yes ;; 866154b44505Smrg no) enable_fast_install=no ;; 866254b44505Smrg *) 866354b44505Smrg enable_fast_install=no 866454b44505Smrg # Look at the argument we got. We use all the common list separators. 86650a392d7eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 866654b44505Smrg for pkg in $enableval; do 86670a392d7eSmrg IFS=$lt_save_ifs 866854b44505Smrg if test "X$pkg" = "X$p"; then 866954b44505Smrg enable_fast_install=yes 867054b44505Smrg fi 867154b44505Smrg done 86720a392d7eSmrg IFS=$lt_save_ifs 867354b44505Smrg ;; 867454b44505Smrg esac], 867554b44505Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 867654b44505Smrg 867754b44505Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 867854b44505Smrg [Whether or not to optimize for fast installation])dnl 867954b44505Smrg])# _LT_ENABLE_FAST_INSTALL 868054b44505Smrg 868154b44505SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 868254b44505SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 868354b44505Smrg 868454b44505Smrg# Old names: 868554b44505SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 868654b44505Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 868754b44505SmrgAC_DIAGNOSE([obsolete], 868854b44505Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86890a392d7eSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 869054b44505Smrg]) 869154b44505Smrg 869254b44505SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 869354b44505Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 869454b44505SmrgAC_DIAGNOSE([obsolete], 869554b44505Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86960a392d7eSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 869754b44505Smrg]) 869854b44505Smrg 869954b44505Smrgdnl aclocal-1.4 backwards compatibility: 870054b44505Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 870154b44505Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 870254b44505Smrg 870354b44505Smrg 87040a392d7eSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 87050a392d7eSmrg# ---------------------------------- 87060a392d7eSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 87070a392d7eSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 87080a392d7eSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 87090a392d7eSmrgm4_define([_LT_WITH_AIX_SONAME], 87100a392d7eSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 87110a392d7eSmrgshared_archive_member_spec= 87120a392d7eSmrgcase $host,$enable_shared in 87130a392d7eSmrgpower*-*-aix[[5-9]]*,yes) 87140a392d7eSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 87150a392d7eSmrg AC_ARG_WITH([aix-soname], 87160a392d7eSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 87170a392d7eSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 87180a392d7eSmrg [case $withval in 87190a392d7eSmrg aix|svr4|both) 87200a392d7eSmrg ;; 87210a392d7eSmrg *) 87220a392d7eSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 87230a392d7eSmrg ;; 87240a392d7eSmrg esac 87250a392d7eSmrg lt_cv_with_aix_soname=$with_aix_soname], 87260a392d7eSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 87270a392d7eSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 87280a392d7eSmrg with_aix_soname=$lt_cv_with_aix_soname]) 87290a392d7eSmrg AC_MSG_RESULT([$with_aix_soname]) 87300a392d7eSmrg if test aix != "$with_aix_soname"; then 87310a392d7eSmrg # For the AIX way of multilib, we name the shared archive member 87320a392d7eSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 87330a392d7eSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 87340a392d7eSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 87350a392d7eSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 87360a392d7eSmrg if test 64 = "${OBJECT_MODE-32}"; then 87370a392d7eSmrg shared_archive_member_spec=shr_64 87380a392d7eSmrg else 87390a392d7eSmrg shared_archive_member_spec=shr 87400a392d7eSmrg fi 87410a392d7eSmrg fi 87420a392d7eSmrg ;; 87430a392d7eSmrg*) 87440a392d7eSmrg with_aix_soname=aix 87450a392d7eSmrg ;; 87460a392d7eSmrgesac 87470a392d7eSmrg 87480a392d7eSmrg_LT_DECL([], [shared_archive_member_spec], [0], 87490a392d7eSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 87500a392d7eSmrg])# _LT_WITH_AIX_SONAME 87510a392d7eSmrg 87520a392d7eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 87530a392d7eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 87540a392d7eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 87550a392d7eSmrg 87560a392d7eSmrg 875754b44505Smrg# _LT_WITH_PIC([MODE]) 875854b44505Smrg# -------------------- 87590a392d7eSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 876054b44505Smrg# LT_INIT options. 87610a392d7eSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 876254b44505Smrgm4_define([_LT_WITH_PIC], 876354b44505Smrg[AC_ARG_WITH([pic], 87640a392d7eSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 876554b44505Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 87660a392d7eSmrg [lt_p=${PACKAGE-default} 87670a392d7eSmrg case $withval in 87680a392d7eSmrg yes|no) pic_mode=$withval ;; 87690a392d7eSmrg *) 87700a392d7eSmrg pic_mode=default 87710a392d7eSmrg # Look at the argument we got. We use all the common list separators. 87720a392d7eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87730a392d7eSmrg for lt_pkg in $withval; do 87740a392d7eSmrg IFS=$lt_save_ifs 87750a392d7eSmrg if test "X$lt_pkg" = "X$lt_p"; then 87760a392d7eSmrg pic_mode=yes 87770a392d7eSmrg fi 87780a392d7eSmrg done 87790a392d7eSmrg IFS=$lt_save_ifs 87800a392d7eSmrg ;; 87810a392d7eSmrg esac], 87820a392d7eSmrg [pic_mode=m4_default([$1], [default])]) 878354b44505Smrg 878454b44505Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 878554b44505Smrg])# _LT_WITH_PIC 878654b44505Smrg 878754b44505SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 878854b44505SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 878954b44505Smrg 879054b44505Smrg# Old name: 879154b44505SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 879254b44505Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 879354b44505SmrgAC_DIAGNOSE([obsolete], 879454b44505Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 87950a392d7eSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 879654b44505Smrg]) 879754b44505Smrg 879854b44505Smrgdnl aclocal-1.4 backwards compatibility: 879954b44505Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 880054b44505Smrg 880154b44505Smrg 880254b44505Smrgm4_define([_LTDL_MODE], []) 880354b44505SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 880454b44505Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 880554b44505SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 880654b44505Smrg [m4_define([_LTDL_MODE], [recursive])]) 880754b44505SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 880854b44505Smrg [m4_define([_LTDL_MODE], [subproject])]) 880954b44505Smrg 881054b44505Smrgm4_define([_LTDL_TYPE], []) 881154b44505SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 881254b44505Smrg [m4_define([_LTDL_TYPE], [installable])]) 881354b44505SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 881454b44505Smrg [m4_define([_LTDL_TYPE], [convenience])]) 881554b44505Smrg 881654b44505Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 881754b44505Smrg# 88180a392d7eSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 88190a392d7eSmrg# Foundation, Inc. 882054b44505Smrg# Written by Gary V. Vaughan, 2004 882154b44505Smrg# 882254b44505Smrg# This file is free software; the Free Software Foundation gives 882354b44505Smrg# unlimited permission to copy and/or distribute it, with or without 882454b44505Smrg# modifications, as long as this notice is preserved. 882554b44505Smrg 882654b44505Smrg# serial 6 ltsugar.m4 882754b44505Smrg 882854b44505Smrg# This is to help aclocal find these macros, as it can't see m4_define. 882954b44505SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 883054b44505Smrg 883154b44505Smrg 883254b44505Smrg# lt_join(SEP, ARG1, [ARG2...]) 883354b44505Smrg# ----------------------------- 883454b44505Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 883554b44505Smrg# associated separator. 883654b44505Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 883754b44505Smrg# versions in m4sugar had bugs. 883854b44505Smrgm4_define([lt_join], 883954b44505Smrg[m4_if([$#], [1], [], 884054b44505Smrg [$#], [2], [[$2]], 884154b44505Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 884254b44505Smrgm4_define([_lt_join], 884354b44505Smrg[m4_if([$#$2], [2], [], 884454b44505Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 884554b44505Smrg 884654b44505Smrg 884754b44505Smrg# lt_car(LIST) 884854b44505Smrg# lt_cdr(LIST) 884954b44505Smrg# ------------ 885054b44505Smrg# Manipulate m4 lists. 885154b44505Smrg# These macros are necessary as long as will still need to support 88520a392d7eSmrg# Autoconf-2.59, which quotes differently. 885354b44505Smrgm4_define([lt_car], [[$1]]) 885454b44505Smrgm4_define([lt_cdr], 885554b44505Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 885654b44505Smrg [$#], 1, [], 885754b44505Smrg [m4_dquote(m4_shift($@))])]) 885854b44505Smrgm4_define([lt_unquote], $1) 885954b44505Smrg 886054b44505Smrg 886154b44505Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 886254b44505Smrg# ------------------------------------------ 88630a392d7eSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 886454b44505Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 886554b44505Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 886654b44505Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 886754b44505Smrg# than defined and empty). 886854b44505Smrg# 886954b44505Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 887054b44505Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 887154b44505Smrgm4_define([lt_append], 887254b44505Smrg[m4_define([$1], 887354b44505Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 887454b44505Smrg 887554b44505Smrg 887654b44505Smrg 887754b44505Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 887854b44505Smrg# ---------------------------------------------------------- 887954b44505Smrg# Produce a SEP delimited list of all paired combinations of elements of 888054b44505Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 888154b44505Smrg# has the form PREFIXmINFIXSUFFIXn. 888254b44505Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 888354b44505Smrgm4_define([lt_combine], 888454b44505Smrg[m4_if(m4_eval([$# > 3]), [1], 888554b44505Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 888654b44505Smrg[[m4_foreach([_Lt_prefix], [$2], 888754b44505Smrg [m4_foreach([_Lt_suffix], 888854b44505Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 888954b44505Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 889054b44505Smrg 889154b44505Smrg 889254b44505Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 889354b44505Smrg# ----------------------------------------------------------------------- 889454b44505Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 889554b44505Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 889654b44505Smrgm4_define([lt_if_append_uniq], 889754b44505Smrg[m4_ifdef([$1], 889854b44505Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 889954b44505Smrg [lt_append([$1], [$2], [$3])$4], 890054b44505Smrg [$5])], 890154b44505Smrg [lt_append([$1], [$2], [$3])$4])]) 890254b44505Smrg 890354b44505Smrg 890454b44505Smrg# lt_dict_add(DICT, KEY, VALUE) 890554b44505Smrg# ----------------------------- 890654b44505Smrgm4_define([lt_dict_add], 890754b44505Smrg[m4_define([$1($2)], [$3])]) 890854b44505Smrg 890954b44505Smrg 891054b44505Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 891154b44505Smrg# -------------------------------------------- 891254b44505Smrgm4_define([lt_dict_add_subkey], 891354b44505Smrg[m4_define([$1($2:$3)], [$4])]) 891454b44505Smrg 891554b44505Smrg 891654b44505Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 891754b44505Smrg# ---------------------------------- 891854b44505Smrgm4_define([lt_dict_fetch], 891954b44505Smrg[m4_ifval([$3], 892054b44505Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 892154b44505Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 892254b44505Smrg 892354b44505Smrg 892454b44505Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 892554b44505Smrg# ----------------------------------------------------------------- 892654b44505Smrgm4_define([lt_if_dict_fetch], 892754b44505Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 892854b44505Smrg [$5], 892954b44505Smrg [$6])]) 893054b44505Smrg 893154b44505Smrg 893254b44505Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 893354b44505Smrg# -------------------------------------------------------------- 893454b44505Smrgm4_define([lt_dict_filter], 893554b44505Smrg[m4_if([$5], [], [], 893654b44505Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 893754b44505Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 893854b44505Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 893954b44505Smrg]) 894054b44505Smrg 894154b44505Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 894254b44505Smrg# 89430a392d7eSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 894454b44505Smrg# Written by Scott James Remnant, 2004 894554b44505Smrg# 894654b44505Smrg# This file is free software; the Free Software Foundation gives 894754b44505Smrg# unlimited permission to copy and/or distribute it, with or without 894854b44505Smrg# modifications, as long as this notice is preserved. 894954b44505Smrg 895054b44505Smrg# @configure_input@ 895154b44505Smrg 89520a392d7eSmrg# serial 4179 ltversion.m4 895354b44505Smrg# This file is part of GNU Libtool 895454b44505Smrg 89550a392d7eSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 89560a392d7eSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 895754b44505Smrg 895854b44505SmrgAC_DEFUN([LTVERSION_VERSION], 89590a392d7eSmrg[macro_version='2.4.6' 89600a392d7eSmrgmacro_revision='2.4.6' 896154b44505Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 896254b44505Smrg_LT_DECL(, macro_revision, 0) 89634a041c5bSmacallan]) 89644a041c5bSmacallan 896554b44505Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 896654b44505Smrg# 89670a392d7eSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 89680a392d7eSmrg# Foundation, Inc. 896954b44505Smrg# Written by Scott James Remnant, 2004. 897054b44505Smrg# 897154b44505Smrg# This file is free software; the Free Software Foundation gives 897254b44505Smrg# unlimited permission to copy and/or distribute it, with or without 897354b44505Smrg# modifications, as long as this notice is preserved. 897454b44505Smrg 897554b44505Smrg# serial 5 lt~obsolete.m4 897654b44505Smrg 897754b44505Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 897854b44505Smrg# 89790a392d7eSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 898054b44505Smrg# which have later been changed to m4_define as they aren't part of the 898154b44505Smrg# exported API, or moved to Autoconf or Automake where they belong. 898254b44505Smrg# 898354b44505Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 898454b44505Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 898554b44505Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 898654b44505Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 898754b44505Smrg# and doesn't know about Autoconf macros at all.) 898854b44505Smrg# 898954b44505Smrg# So we provide this file, which has a silly filename so it's always 899054b44505Smrg# included after everything else. This provides aclocal with the 899154b44505Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 899254b44505Smrg# because those macros already exist, or will be overwritten later. 89930a392d7eSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 899454b44505Smrg# 899554b44505Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 899654b44505Smrg# Yes, that means every name once taken will need to remain here until 899754b44505Smrg# we give up compatibility with versions before 1.7, at which point 899854b44505Smrg# we need to keep only those names which we still refer to. 899954b44505Smrg 900054b44505Smrg# This is to help aclocal find these macros, as it can't see m4_define. 900154b44505SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 900254b44505Smrg 900354b44505Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 900454b44505Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 900554b44505Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 900654b44505Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 900754b44505Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 900854b44505Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 900954b44505Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 901054b44505Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 901154b44505Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 901254b44505Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 901354b44505Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 901454b44505Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 901554b44505Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 901654b44505Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 901754b44505Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 901854b44505Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 901954b44505Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 902054b44505Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 902154b44505Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 902254b44505Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 902354b44505Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 902454b44505Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 902554b44505Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 902654b44505Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 902754b44505Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 902854b44505Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 902954b44505Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 903054b44505Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 903154b44505Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 903254b44505Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 903354b44505Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 903454b44505Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 903554b44505Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 903654b44505Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 903754b44505Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 903854b44505Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 903954b44505Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 904054b44505Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 904154b44505Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 904254b44505Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 904354b44505Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 904454b44505Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 904554b44505Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 904654b44505Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 904754b44505Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 904854b44505Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 904954b44505Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 905054b44505Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 905154b44505Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 905254b44505Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 905354b44505Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 905454b44505Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 905554b44505Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 905654b44505Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 905754b44505Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 905854b44505Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 905954b44505Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 906054b44505Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 906154b44505Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 906254b44505Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 906354b44505Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 906454b44505Smrg 90654a041c5bSmacallan# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 906654b44505Smrg# serial 1 (pkg-config-0.24) 90674a041c5bSmacallan# 90684a041c5bSmacallan# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 90694a041c5bSmacallan# 90704a041c5bSmacallan# This program is free software; you can redistribute it and/or modify 90714a041c5bSmacallan# it under the terms of the GNU General Public License as published by 90724a041c5bSmacallan# the Free Software Foundation; either version 2 of the License, or 90734a041c5bSmacallan# (at your option) any later version. 90744a041c5bSmacallan# 90754a041c5bSmacallan# This program is distributed in the hope that it will be useful, but 90764a041c5bSmacallan# WITHOUT ANY WARRANTY; without even the implied warranty of 90774a041c5bSmacallan# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 90784a041c5bSmacallan# General Public License for more details. 90794a041c5bSmacallan# 90804a041c5bSmacallan# You should have received a copy of the GNU General Public License 90814a041c5bSmacallan# along with this program; if not, write to the Free Software 90824a041c5bSmacallan# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 90834a041c5bSmacallan# 90844a041c5bSmacallan# As a special exception to the GNU General Public License, if you 90854a041c5bSmacallan# distribute this file as part of a program that contains a 90864a041c5bSmacallan# configuration script generated by Autoconf, you may include it under 90874a041c5bSmacallan# the same distribution terms that you use for the rest of that program. 90884a041c5bSmacallan 90894a041c5bSmacallan# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 90904a041c5bSmacallan# ---------------------------------- 90914a041c5bSmacallanAC_DEFUN([PKG_PROG_PKG_CONFIG], 90924a041c5bSmacallan[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 909354b44505Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 909454b44505Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 909554b44505SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 909654b44505SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 909754b44505SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 909854b44505Smrg 90994a041c5bSmacallanif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91004a041c5bSmacallan AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91014a041c5bSmacallanfi 91024a041c5bSmacallanif test -n "$PKG_CONFIG"; then 91034a041c5bSmacallan _pkg_min_version=m4_default([$1], [0.9.0]) 91044a041c5bSmacallan AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91054a041c5bSmacallan if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91064a041c5bSmacallan AC_MSG_RESULT([yes]) 91074a041c5bSmacallan else 91084a041c5bSmacallan AC_MSG_RESULT([no]) 91094a041c5bSmacallan PKG_CONFIG="" 91104a041c5bSmacallan fi 91114a041c5bSmacallanfi[]dnl 91124a041c5bSmacallan])# PKG_PROG_PKG_CONFIG 91134a041c5bSmacallan 91144a041c5bSmacallan# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 91154a041c5bSmacallan# 91164a041c5bSmacallan# Check to see whether a particular set of modules exists. Similar 91174a041c5bSmacallan# to PKG_CHECK_MODULES(), but does not set variables or print errors. 91184a041c5bSmacallan# 911954b44505Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 912054b44505Smrg# only at the first occurence in configure.ac, so if the first place 912154b44505Smrg# it's called might be skipped (such as if it is within an "if", you 912254b44505Smrg# have to call PKG_CHECK_EXISTS manually 91234a041c5bSmacallan# -------------------------------------------------------------- 91244a041c5bSmacallanAC_DEFUN([PKG_CHECK_EXISTS], 91254a041c5bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91264a041c5bSmacallanif test -n "$PKG_CONFIG" && \ 91274a041c5bSmacallan AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 912854b44505Smrg m4_default([$2], [:]) 91294a041c5bSmacallanm4_ifvaln([$3], [else 91304a041c5bSmacallan $3])dnl 91314a041c5bSmacallanfi]) 91324a041c5bSmacallan 91334a041c5bSmacallan# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 91344a041c5bSmacallan# --------------------------------------------- 91354a041c5bSmacallanm4_define([_PKG_CONFIG], 91364a041c5bSmacallan[if test -n "$$1"; then 91374a041c5bSmacallan pkg_cv_[]$1="$$1" 91384a041c5bSmacallan elif test -n "$PKG_CONFIG"; then 91394a041c5bSmacallan PKG_CHECK_EXISTS([$3], 914054b44505Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 914154b44505Smrg test "x$?" != "x0" && pkg_failed=yes ], 91424a041c5bSmacallan [pkg_failed=yes]) 91434a041c5bSmacallan else 91444a041c5bSmacallan pkg_failed=untried 91454a041c5bSmacallanfi[]dnl 91464a041c5bSmacallan])# _PKG_CONFIG 91474a041c5bSmacallan 91484a041c5bSmacallan# _PKG_SHORT_ERRORS_SUPPORTED 91494a041c5bSmacallan# ----------------------------- 91504a041c5bSmacallanAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 91514a041c5bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91524a041c5bSmacallanif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 91534a041c5bSmacallan _pkg_short_errors_supported=yes 91544a041c5bSmacallanelse 91554a041c5bSmacallan _pkg_short_errors_supported=no 91564a041c5bSmacallanfi[]dnl 91574a041c5bSmacallan])# _PKG_SHORT_ERRORS_SUPPORTED 91584a041c5bSmacallan 91594a041c5bSmacallan 91604a041c5bSmacallan# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 91614a041c5bSmacallan# [ACTION-IF-NOT-FOUND]) 91624a041c5bSmacallan# 91634a041c5bSmacallan# 91644a041c5bSmacallan# Note that if there is a possibility the first call to 91654a041c5bSmacallan# PKG_CHECK_MODULES might not happen, you should be sure to include an 91664a041c5bSmacallan# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 91674a041c5bSmacallan# 91684a041c5bSmacallan# 91694a041c5bSmacallan# -------------------------------------------------------------- 91704a041c5bSmacallanAC_DEFUN([PKG_CHECK_MODULES], 91714a041c5bSmacallan[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91724a041c5bSmacallanAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 91734a041c5bSmacallanAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 91744a041c5bSmacallan 91754a041c5bSmacallanpkg_failed=no 91764a041c5bSmacallanAC_MSG_CHECKING([for $1]) 91774a041c5bSmacallan 91784a041c5bSmacallan_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 91794a041c5bSmacallan_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 91804a041c5bSmacallan 91814a041c5bSmacallanm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 91824a041c5bSmacallanand $1[]_LIBS to avoid the need to call pkg-config. 91834a041c5bSmacallanSee the pkg-config man page for more details.]) 91844a041c5bSmacallan 91854a041c5bSmacallanif test $pkg_failed = yes; then 918654b44505Smrg AC_MSG_RESULT([no]) 91874a041c5bSmacallan _PKG_SHORT_ERRORS_SUPPORTED 91884a041c5bSmacallan if test $_pkg_short_errors_supported = yes; then 918954b44505Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 91904a041c5bSmacallan else 919154b44505Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 91924a041c5bSmacallan fi 91934a041c5bSmacallan # Put the nasty error message in config.log where it belongs 91944a041c5bSmacallan echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 91954a041c5bSmacallan 919654b44505Smrg m4_default([$4], [AC_MSG_ERROR( 91974a041c5bSmacallan[Package requirements ($2) were not met: 91984a041c5bSmacallan 91994a041c5bSmacallan$$1_PKG_ERRORS 92004a041c5bSmacallan 92014a041c5bSmacallanConsider adjusting the PKG_CONFIG_PATH environment variable if you 92024a041c5bSmacallaninstalled software in a non-standard prefix. 92034a041c5bSmacallan 920454b44505Smrg_PKG_TEXT])[]dnl 920554b44505Smrg ]) 92064a041c5bSmacallanelif test $pkg_failed = untried; then 920754b44505Smrg AC_MSG_RESULT([no]) 920854b44505Smrg m4_default([$4], [AC_MSG_FAILURE( 92094a041c5bSmacallan[The pkg-config script could not be found or is too old. Make sure it 92104a041c5bSmacallanis in your PATH or set the PKG_CONFIG environment variable to the full 92114a041c5bSmacallanpath to pkg-config. 92124a041c5bSmacallan 92134a041c5bSmacallan_PKG_TEXT 92144a041c5bSmacallan 921554b44505SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 921654b44505Smrg ]) 92174a041c5bSmacallanelse 92184a041c5bSmacallan $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92194a041c5bSmacallan $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92204a041c5bSmacallan AC_MSG_RESULT([yes]) 922154b44505Smrg $3 92224a041c5bSmacallanfi[]dnl 92234a041c5bSmacallan])# PKG_CHECK_MODULES 92244a041c5bSmacallan 922554b44505Smrg 922654b44505Smrg# PKG_INSTALLDIR(DIRECTORY) 922754b44505Smrg# ------------------------- 922854b44505Smrg# Substitutes the variable pkgconfigdir as the location where a module 922954b44505Smrg# should install pkg-config .pc files. By default the directory is 923054b44505Smrg# $libdir/pkgconfig, but the default can be changed by passing 923154b44505Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 923254b44505Smrg# parameter. 923354b44505SmrgAC_DEFUN([PKG_INSTALLDIR], 923454b44505Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 923554b44505Smrgm4_pushdef([pkg_description], 923654b44505Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 923754b44505SmrgAC_ARG_WITH([pkgconfigdir], 923854b44505Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 923954b44505Smrg [with_pkgconfigdir=]pkg_default) 924054b44505SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 924154b44505Smrgm4_popdef([pkg_default]) 924254b44505Smrgm4_popdef([pkg_description]) 924354b44505Smrg]) dnl PKG_INSTALLDIR 924454b44505Smrg 924554b44505Smrg 924654b44505Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 924754b44505Smrg# ------------------------- 924854b44505Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 924954b44505Smrg# module should install arch-independent pkg-config .pc files. By 925054b44505Smrg# default the directory is $datadir/pkgconfig, but the default can be 925154b44505Smrg# changed by passing DIRECTORY. The user can override through the 925254b44505Smrg# --with-noarch-pkgconfigdir parameter. 925354b44505SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 925454b44505Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 925554b44505Smrgm4_pushdef([pkg_description], 925654b44505Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 925754b44505SmrgAC_ARG_WITH([noarch-pkgconfigdir], 925854b44505Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 925954b44505Smrg [with_noarch_pkgconfigdir=]pkg_default) 926054b44505SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 926154b44505Smrgm4_popdef([pkg_default]) 926254b44505Smrgm4_popdef([pkg_description]) 926354b44505Smrg]) dnl PKG_NOARCH_INSTALLDIR 926454b44505Smrg 92650a392d7eSmrg 92660a392d7eSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 92670a392d7eSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 92680a392d7eSmrg# ------------------------------------------- 92690a392d7eSmrg# Retrieves the value of the pkg-config variable for the given module. 92700a392d7eSmrgAC_DEFUN([PKG_CHECK_VAR], 92710a392d7eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92720a392d7eSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 92730a392d7eSmrg 92740a392d7eSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 92750a392d7eSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 92760a392d7eSmrg 92770a392d7eSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 92780a392d7eSmrg])# PKG_CHECK_VAR 92790a392d7eSmrg 928054b44505Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 92814a041c5bSmacallandnl 928254b44505Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 92830a392d7eSmrgdnl 92844a041c5bSmacallandnl Permission is hereby granted, free of charge, to any person obtaining a 928554b44505Smrgdnl copy of this software and associated documentation files (the "Software"), 928654b44505Smrgdnl to deal in the Software without restriction, including without limitation 928754b44505Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 928854b44505Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 928954b44505Smrgdnl Software is furnished to do so, subject to the following conditions: 92904a041c5bSmacallandnl 929154b44505Smrgdnl The above copyright notice and this permission notice (including the next 929254b44505Smrgdnl paragraph) shall be included in all copies or substantial portions of the 929354b44505Smrgdnl Software. 92944a041c5bSmacallandnl 929554b44505Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 929654b44505Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 929754b44505Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 929854b44505Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 929954b44505Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 930054b44505Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 930154b44505Smrgdnl DEALINGS IN THE SOFTWARE. 93024a041c5bSmacallan 93034a041c5bSmacallan# XORG_MACROS_VERSION(required-version) 93044a041c5bSmacallan# ------------------------------------- 93054a041c5bSmacallan# Minimum version: 1.1.0 93064a041c5bSmacallan# 93074a041c5bSmacallan# If you're using a macro added in Version 1.1 or newer, include this in 93084a041c5bSmacallan# your configure.ac with the minimum required version, such as: 93094a041c5bSmacallan# XORG_MACROS_VERSION(1.1) 93104a041c5bSmacallan# 931154b44505Smrg# To ensure that this macro is defined, also add: 931254b44505Smrg# m4_ifndef([XORG_MACROS_VERSION], 931354b44505Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 93144a041c5bSmacallan# 93154a041c5bSmacallan# 93160a392d7eSmrg# See the "minimum version" comment for each macro you use to see what 93174a041c5bSmacallan# version you require. 931854b44505Smrgm4_defun([XORG_MACROS_VERSION],[ 93190a392d7eSmrgm4_define([vers_have], [1.19.0]) 932054b44505Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 932154b44505Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 932254b44505Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 932354b44505Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 932454b44505Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 932554b44505Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 932654b44505Smrgm4_undefine([vers_have]) 932754b44505Smrgm4_undefine([maj_have]) 932854b44505Smrgm4_undefine([maj_needed]) 93294a041c5bSmacallan]) # XORG_MACROS_VERSION 93304a041c5bSmacallan 93314a041c5bSmacallan# XORG_PROG_RAWCPP() 93324a041c5bSmacallan# ------------------ 93334a041c5bSmacallan# Minimum version: 1.0.0 93344a041c5bSmacallan# 93354a041c5bSmacallan# Find cpp program and necessary flags for use in pre-processing text files 93364a041c5bSmacallan# such as man pages and config files 93374a041c5bSmacallanAC_DEFUN([XORG_PROG_RAWCPP],[ 93384a041c5bSmacallanAC_REQUIRE([AC_PROG_CPP]) 93390a392d7eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 93404a041c5bSmacallan [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 93414a041c5bSmacallan 93424a041c5bSmacallan# Check for flag to avoid builtin definitions - assumes unix is predefined, 93434a041c5bSmacallan# which is not the best choice for supporting other OS'es, but covers most 93444a041c5bSmacallan# of the ones we need for now. 93454a041c5bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -undef]) 934654b44505SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 93474a041c5bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93484a041c5bSmacallan AC_MSG_RESULT([no]) 93494a041c5bSmacallanelse 93504a041c5bSmacallan if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93514a041c5bSmacallan RAWCPPFLAGS=-undef 93524a041c5bSmacallan AC_MSG_RESULT([yes]) 935354b44505Smrg # under Cygwin unix is still defined even with -undef 935454b44505Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 935554b44505Smrg RAWCPPFLAGS="-undef -ansi" 935654b44505Smrg AC_MSG_RESULT([yes, with -ansi]) 93574a041c5bSmacallan else 93584a041c5bSmacallan AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 93594a041c5bSmacallan fi 93604a041c5bSmacallanfi 93614a041c5bSmacallanrm -f conftest.$ac_ext 93624a041c5bSmacallan 93634a041c5bSmacallanAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 936454b44505SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 93654a041c5bSmacallanif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93664a041c5bSmacallan AC_MSG_RESULT([no]) 93674a041c5bSmacallanelse 93684a041c5bSmacallan if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93690a392d7eSmrg TRADITIONALCPPFLAGS="-traditional" 93704a041c5bSmacallan RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 93714a041c5bSmacallan AC_MSG_RESULT([yes]) 93724a041c5bSmacallan else 93734a041c5bSmacallan AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 93744a041c5bSmacallan fi 93754a041c5bSmacallanfi 93764a041c5bSmacallanrm -f conftest.$ac_ext 93774a041c5bSmacallanAC_SUBST(RAWCPPFLAGS) 93780a392d7eSmrgAC_SUBST(TRADITIONALCPPFLAGS) 93794a041c5bSmacallan]) # XORG_PROG_RAWCPP 93804a041c5bSmacallan 93814a041c5bSmacallan# XORG_MANPAGE_SECTIONS() 93824a041c5bSmacallan# ----------------------- 93834a041c5bSmacallan# Minimum version: 1.0.0 93844a041c5bSmacallan# 93854a041c5bSmacallan# Determine which sections man pages go in for the different man page types 93864a041c5bSmacallan# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 93874a041c5bSmacallan# Not sure if there's any better way than just hardcoding by OS name. 93884a041c5bSmacallan# Override default settings by setting environment variables 938954b44505Smrg# Added MAN_SUBSTS in version 1.8 939054b44505Smrg# Added AC_PROG_SED in version 1.8 93914a041c5bSmacallan 93924a041c5bSmacallanAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 93934a041c5bSmacallanAC_REQUIRE([AC_CANONICAL_HOST]) 939454b44505SmrgAC_REQUIRE([AC_PROG_SED]) 93954a041c5bSmacallan 93964a041c5bSmacallanif test x$APP_MAN_SUFFIX = x ; then 93974a041c5bSmacallan APP_MAN_SUFFIX=1 93984a041c5bSmacallanfi 93994a041c5bSmacallanif test x$APP_MAN_DIR = x ; then 94004a041c5bSmacallan APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 94014a041c5bSmacallanfi 94024a041c5bSmacallan 94034a041c5bSmacallanif test x$LIB_MAN_SUFFIX = x ; then 94044a041c5bSmacallan LIB_MAN_SUFFIX=3 94054a041c5bSmacallanfi 94064a041c5bSmacallanif test x$LIB_MAN_DIR = x ; then 94074a041c5bSmacallan LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 94084a041c5bSmacallanfi 94094a041c5bSmacallan 94104a041c5bSmacallanif test x$FILE_MAN_SUFFIX = x ; then 94114a041c5bSmacallan case $host_os in 94124a041c5bSmacallan solaris*) FILE_MAN_SUFFIX=4 ;; 94134a041c5bSmacallan *) FILE_MAN_SUFFIX=5 ;; 94144a041c5bSmacallan esac 94154a041c5bSmacallanfi 94164a041c5bSmacallanif test x$FILE_MAN_DIR = x ; then 94174a041c5bSmacallan FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 94184a041c5bSmacallanfi 94194a041c5bSmacallan 94204a041c5bSmacallanif test x$MISC_MAN_SUFFIX = x ; then 94214a041c5bSmacallan case $host_os in 94224a041c5bSmacallan solaris*) MISC_MAN_SUFFIX=5 ;; 94234a041c5bSmacallan *) MISC_MAN_SUFFIX=7 ;; 94244a041c5bSmacallan esac 94254a041c5bSmacallanfi 94264a041c5bSmacallanif test x$MISC_MAN_DIR = x ; then 94274a041c5bSmacallan MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 94284a041c5bSmacallanfi 94294a041c5bSmacallan 94304a041c5bSmacallanif test x$DRIVER_MAN_SUFFIX = x ; then 94314a041c5bSmacallan case $host_os in 94324a041c5bSmacallan solaris*) DRIVER_MAN_SUFFIX=7 ;; 94334a041c5bSmacallan *) DRIVER_MAN_SUFFIX=4 ;; 94344a041c5bSmacallan esac 94354a041c5bSmacallanfi 94364a041c5bSmacallanif test x$DRIVER_MAN_DIR = x ; then 94374a041c5bSmacallan DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 94384a041c5bSmacallanfi 94394a041c5bSmacallan 94404a041c5bSmacallanif test x$ADMIN_MAN_SUFFIX = x ; then 94414a041c5bSmacallan case $host_os in 94424a041c5bSmacallan solaris*) ADMIN_MAN_SUFFIX=1m ;; 94434a041c5bSmacallan *) ADMIN_MAN_SUFFIX=8 ;; 94444a041c5bSmacallan esac 94454a041c5bSmacallanfi 94464a041c5bSmacallanif test x$ADMIN_MAN_DIR = x ; then 94474a041c5bSmacallan ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 94484a041c5bSmacallanfi 94494a041c5bSmacallan 94504a041c5bSmacallan 94514a041c5bSmacallanAC_SUBST([APP_MAN_SUFFIX]) 94524a041c5bSmacallanAC_SUBST([LIB_MAN_SUFFIX]) 94534a041c5bSmacallanAC_SUBST([FILE_MAN_SUFFIX]) 94544a041c5bSmacallanAC_SUBST([MISC_MAN_SUFFIX]) 94554a041c5bSmacallanAC_SUBST([DRIVER_MAN_SUFFIX]) 94564a041c5bSmacallanAC_SUBST([ADMIN_MAN_SUFFIX]) 94574a041c5bSmacallanAC_SUBST([APP_MAN_DIR]) 94584a041c5bSmacallanAC_SUBST([LIB_MAN_DIR]) 94594a041c5bSmacallanAC_SUBST([FILE_MAN_DIR]) 94604a041c5bSmacallanAC_SUBST([MISC_MAN_DIR]) 94614a041c5bSmacallanAC_SUBST([DRIVER_MAN_DIR]) 94624a041c5bSmacallanAC_SUBST([ADMIN_MAN_DIR]) 946354b44505Smrg 946454b44505SmrgXORG_MAN_PAGE="X Version 11" 946554b44505SmrgAC_SUBST([XORG_MAN_PAGE]) 946654b44505SmrgMAN_SUBSTS="\ 946754b44505Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 946854b44505Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 946954b44505Smrg -e 's|__xservername__|Xorg|g' \ 947054b44505Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 947154b44505Smrg -e 's|__projectroot__|\$(prefix)|g' \ 947254b44505Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 947354b44505Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 947454b44505Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 947554b44505Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 947654b44505Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 947754b44505Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 947854b44505Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 947954b44505SmrgAC_SUBST([MAN_SUBSTS]) 948054b44505Smrg 94814a041c5bSmacallan]) # XORG_MANPAGE_SECTIONS 94824a041c5bSmacallan 948354b44505Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 948454b44505Smrg# ------------------------ 948554b44505Smrg# Minimum version: 1.7.0 948654b44505Smrg# 948754b44505Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 948854b44505Smrg# provided by xorg-sgml-doctools, if installed. 948954b44505SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 949054b44505SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 949154b44505SmrgXORG_SGML_PATH= 949254b44505SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 949354b44505Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 949454b44505Smrg [m4_ifval([$1],[:], 949554b44505Smrg [if test x"$cross_compiling" != x"yes" ; then 949654b44505Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 949754b44505Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 949854b44505Smrg fi]) 949954b44505Smrg ]) 950054b44505Smrg 950154b44505Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 950254b44505Smrg# the path and the name of the doc stylesheet 950354b44505Smrgif test "x$XORG_SGML_PATH" != "x" ; then 950454b44505Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 950554b44505Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 950654b44505Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 950754b44505Smrgelse 950854b44505Smrg AC_MSG_RESULT([no]) 950954b44505Smrgfi 951054b44505Smrg 951154b44505SmrgAC_SUBST(XORG_SGML_PATH) 951254b44505SmrgAC_SUBST(STYLESHEET_SRCDIR) 951354b44505SmrgAC_SUBST(XSL_STYLESHEET) 951454b44505SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 951554b44505Smrg]) # XORG_CHECK_SGML_DOCTOOLS 951654b44505Smrg 95174a041c5bSmacallan# XORG_CHECK_LINUXDOC 95184a041c5bSmacallan# ------------------- 95194a041c5bSmacallan# Minimum version: 1.0.0 95204a041c5bSmacallan# 95214a041c5bSmacallan# Defines the variable MAKE_TEXT if the necessary tools and 95224a041c5bSmacallan# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 95234a041c5bSmacallan# Whether or not the necessary tools and files are found can be checked 95244a041c5bSmacallan# with the AM_CONDITIONAL "BUILD_LINUXDOC" 95254a041c5bSmacallanAC_DEFUN([XORG_CHECK_LINUXDOC],[ 952654b44505SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 952754b44505SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 95284a041c5bSmacallan 95294a041c5bSmacallanAC_PATH_PROG(LINUXDOC, linuxdoc) 95304a041c5bSmacallan 953154b44505SmrgAC_MSG_CHECKING([whether to build documentation]) 95324a041c5bSmacallan 953354b44505Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 95344a041c5bSmacallan BUILDDOC=yes 95354a041c5bSmacallanelse 95364a041c5bSmacallan BUILDDOC=no 95374a041c5bSmacallanfi 95384a041c5bSmacallan 95394a041c5bSmacallanAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 95404a041c5bSmacallan 95414a041c5bSmacallanAC_MSG_RESULT([$BUILDDOC]) 95424a041c5bSmacallan 954354b44505SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 95444a041c5bSmacallan 954554b44505Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 95464a041c5bSmacallan BUILDPDFDOC=yes 95474a041c5bSmacallanelse 95484a041c5bSmacallan BUILDPDFDOC=no 95494a041c5bSmacallanfi 95504a041c5bSmacallan 95514a041c5bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 95524a041c5bSmacallan 95534a041c5bSmacallanAC_MSG_RESULT([$BUILDPDFDOC]) 95544a041c5bSmacallan 955554b44505SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 95564a041c5bSmacallanMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 95574a041c5bSmacallanMAKE_PDF="$PS2PDF" 95584a041c5bSmacallanMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 95594a041c5bSmacallan 95604a041c5bSmacallanAC_SUBST(MAKE_TEXT) 95614a041c5bSmacallanAC_SUBST(MAKE_PS) 95624a041c5bSmacallanAC_SUBST(MAKE_PDF) 95634a041c5bSmacallanAC_SUBST(MAKE_HTML) 95644a041c5bSmacallan]) # XORG_CHECK_LINUXDOC 95654a041c5bSmacallan 95664a041c5bSmacallan# XORG_CHECK_DOCBOOK 95674a041c5bSmacallan# ------------------- 95684a041c5bSmacallan# Minimum version: 1.0.0 95694a041c5bSmacallan# 95704a041c5bSmacallan# Checks for the ability to build output formats from SGML DocBook source. 95714a041c5bSmacallan# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 95724a041c5bSmacallan# indicates whether the necessary tools and files are found and, if set, 95734a041c5bSmacallan# $(MAKE_XXX) blah.sgml will produce blah.xxx. 95744a041c5bSmacallanAC_DEFUN([XORG_CHECK_DOCBOOK],[ 957554b44505SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 957654b44505Smrg 95774a041c5bSmacallanBUILDTXTDOC=no 95784a041c5bSmacallanBUILDPDFDOC=no 95794a041c5bSmacallanBUILDPSDOC=no 95804a041c5bSmacallanBUILDHTMLDOC=no 95814a041c5bSmacallan 95824a041c5bSmacallanAC_PATH_PROG(DOCBOOKPS, docbook2ps) 95834a041c5bSmacallanAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 95844a041c5bSmacallanAC_PATH_PROG(DOCBOOKHTML, docbook2html) 95854a041c5bSmacallanAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 95864a041c5bSmacallan 958754b44505SmrgAC_MSG_CHECKING([whether to build text documentation]) 958854b44505Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 95894a041c5bSmacallan test x$BUILD_TXTDOC != xno; then 95904a041c5bSmacallan BUILDTXTDOC=yes 95914a041c5bSmacallanfi 95924a041c5bSmacallanAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 95934a041c5bSmacallanAC_MSG_RESULT([$BUILDTXTDOC]) 95944a041c5bSmacallan 959554b44505SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 959654b44505Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 95974a041c5bSmacallan test x$BUILD_PDFDOC != xno; then 95984a041c5bSmacallan BUILDPDFDOC=yes 95994a041c5bSmacallanfi 96004a041c5bSmacallanAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 96014a041c5bSmacallanAC_MSG_RESULT([$BUILDPDFDOC]) 96024a041c5bSmacallan 960354b44505SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 960454b44505Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 96054a041c5bSmacallan test x$BUILD_PSDOC != xno; then 96064a041c5bSmacallan BUILDPSDOC=yes 96074a041c5bSmacallanfi 96084a041c5bSmacallanAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 96094a041c5bSmacallanAC_MSG_RESULT([$BUILDPSDOC]) 96104a041c5bSmacallan 961154b44505SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 961254b44505Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 96134a041c5bSmacallan test x$BUILD_HTMLDOC != xno; then 96144a041c5bSmacallan BUILDHTMLDOC=yes 96154a041c5bSmacallanfi 96164a041c5bSmacallanAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 96174a041c5bSmacallanAC_MSG_RESULT([$BUILDHTMLDOC]) 96184a041c5bSmacallan 96194a041c5bSmacallanMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 96204a041c5bSmacallanMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 96214a041c5bSmacallanMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 96224a041c5bSmacallanMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 96234a041c5bSmacallan 96244a041c5bSmacallanAC_SUBST(MAKE_TEXT) 96254a041c5bSmacallanAC_SUBST(MAKE_PS) 96264a041c5bSmacallanAC_SUBST(MAKE_PDF) 96274a041c5bSmacallanAC_SUBST(MAKE_HTML) 96284a041c5bSmacallan]) # XORG_CHECK_DOCBOOK 96294a041c5bSmacallan 963054b44505Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 963154b44505Smrg# ---------------- 963254b44505Smrg# Minimum version: 1.5.0 963354b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 963454b44505Smrg# 963554b44505Smrg# Documentation tools are not always available on all platforms and sometimes 963654b44505Smrg# not at the appropriate level. This macro enables a module to test for the 963754b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 963854b44505Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 963954b44505Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 964054b44505Smrg# --with-xmlto assumes 'auto'. 964154b44505Smrg# 964254b44505Smrg# Interface to module: 964354b44505Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 964454b44505Smrg# XMLTO: returns the path of the xmlto program found 964554b44505Smrg# returns the path set by the user in the environment 964654b44505Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 964754b44505Smrg# 'no' user instructs the module not to use xmlto 964854b44505Smrg# 964954b44505Smrg# Added in version 1.10.0 965054b44505Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 965154b44505Smrg# xmlto for text output requires either lynx, links, or w3m browsers 965254b44505Smrg# 965354b44505Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 965454b44505Smrg# 965554b44505SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 965654b44505SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 965754b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 965854b44505SmrgAC_ARG_WITH(xmlto, 965954b44505Smrg AS_HELP_STRING([--with-xmlto], 966054b44505Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 966154b44505Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 966254b44505Smrgm4_undefine([_defopt]) 966354b44505Smrg 966454b44505Smrgif test "x$use_xmlto" = x"auto"; then 966554b44505Smrg AC_PATH_PROG([XMLTO], [xmlto]) 966654b44505Smrg if test "x$XMLTO" = "x"; then 966754b44505Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 966854b44505Smrg have_xmlto=no 966954b44505Smrg else 967054b44505Smrg have_xmlto=yes 967154b44505Smrg fi 967254b44505Smrgelif test "x$use_xmlto" = x"yes" ; then 967354b44505Smrg AC_PATH_PROG([XMLTO], [xmlto]) 967454b44505Smrg if test "x$XMLTO" = "x"; then 967554b44505Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 967654b44505Smrg fi 967754b44505Smrg have_xmlto=yes 967854b44505Smrgelif test "x$use_xmlto" = x"no" ; then 967954b44505Smrg if test "x$XMLTO" != "x"; then 968054b44505Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 968154b44505Smrg fi 968254b44505Smrg have_xmlto=no 968354b44505Smrgelse 968454b44505Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 968554b44505Smrgfi 968654b44505Smrg 968754b44505Smrg# Test for a minimum version of xmlto, if provided. 968854b44505Smrgm4_ifval([$1], 968954b44505Smrg[if test "$have_xmlto" = yes; then 969054b44505Smrg # scrape the xmlto version 969154b44505Smrg AC_MSG_CHECKING([the xmlto version]) 969254b44505Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 969354b44505Smrg AC_MSG_RESULT([$xmlto_version]) 969454b44505Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 969554b44505Smrg [if test "x$use_xmlto" = xauto; then 969654b44505Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 969754b44505Smrg have_xmlto=no 969854b44505Smrg else 969954b44505Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 970054b44505Smrg fi]) 970154b44505Smrgfi]) 970254b44505Smrg 970354b44505Smrg# Test for the ability of xmlto to generate a text target 970454b44505Smrghave_xmlto_text=no 970554b44505Smrgcat > conftest.xml << "EOF" 970654b44505SmrgEOF 970754b44505SmrgAS_IF([test "$have_xmlto" = yes], 970854b44505Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 970954b44505Smrg [have_xmlto_text=yes], 971054b44505Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 971154b44505Smrgrm -f conftest.xml 971254b44505SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 971354b44505SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 971454b44505Smrg]) # XORG_WITH_XMLTO 971554b44505Smrg 971654b44505Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 971754b44505Smrg# -------------------------------------------- 971854b44505Smrg# Minimum version: 1.12.0 971954b44505Smrg# Minimum version for optional DEFAULT argument: 1.12.0 972054b44505Smrg# 972154b44505Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 972254b44505Smrg# XML-based language used for the transformation of XML documents. 972354b44505Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 972454b44505Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 972554b44505Smrg# The XSLT processor is often used as a standalone tool for transformations. 972654b44505Smrg# It should not be assumed that this tool is used only to work with documnetation. 972754b44505Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 972854b44505Smrg# 972954b44505Smrg# Interface to module: 973054b44505Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 973154b44505Smrg# XSLTPROC: returns the path of the xsltproc program found 973254b44505Smrg# returns the path set by the user in the environment 973354b44505Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 973454b44505Smrg# 'no' user instructs the module not to use xsltproc 973554b44505Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 973654b44505Smrg# 973754b44505Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 973854b44505Smrg# 973954b44505SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 974054b44505SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 974154b44505Smrg# Preserves the interface, should it be implemented later 974254b44505Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 974354b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 974454b44505SmrgAC_ARG_WITH(xsltproc, 974554b44505Smrg AS_HELP_STRING([--with-xsltproc], 974654b44505Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 974754b44505Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 974854b44505Smrgm4_undefine([_defopt]) 974954b44505Smrg 975054b44505Smrgif test "x$use_xsltproc" = x"auto"; then 975154b44505Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 975254b44505Smrg if test "x$XSLTPROC" = "x"; then 975354b44505Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 975454b44505Smrg have_xsltproc=no 975554b44505Smrg else 975654b44505Smrg have_xsltproc=yes 975754b44505Smrg fi 975854b44505Smrgelif test "x$use_xsltproc" = x"yes" ; then 975954b44505Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 976054b44505Smrg if test "x$XSLTPROC" = "x"; then 976154b44505Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 976254b44505Smrg fi 976354b44505Smrg have_xsltproc=yes 976454b44505Smrgelif test "x$use_xsltproc" = x"no" ; then 976554b44505Smrg if test "x$XSLTPROC" != "x"; then 976654b44505Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 976754b44505Smrg fi 976854b44505Smrg have_xsltproc=no 976954b44505Smrgelse 977054b44505Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 977154b44505Smrgfi 977254b44505Smrg 977354b44505SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 977454b44505Smrg]) # XORG_WITH_XSLTPROC 977554b44505Smrg 977654b44505Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 977754b44505Smrg# ---------------------------------------- 977854b44505Smrg# Minimum version: 1.15.0 977954b44505Smrg# 978054b44505Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 978154b44505Smrg# scanning arbitrary text files, extracting information from those text files, 978254b44505Smrg# and printing reports based on that information. 978354b44505Smrg# 978454b44505Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 978554b44505Smrg# 978654b44505Smrg# Interface to module: 978754b44505Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 978854b44505Smrg# PERL: returns the path of the perl program found 978954b44505Smrg# returns the path set by the user in the environment 979054b44505Smrg# --with-perl: 'yes' user instructs the module to use perl 979154b44505Smrg# 'no' user instructs the module not to use perl 979254b44505Smrg# have_perl: returns yes if perl found in PATH or no 979354b44505Smrg# 979454b44505Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 979554b44505Smrg# 979654b44505SmrgAC_DEFUN([XORG_WITH_PERL],[ 979754b44505SmrgAC_ARG_VAR([PERL], [Path to perl command]) 979854b44505Smrg# Preserves the interface, should it be implemented later 979954b44505Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 980054b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 980154b44505SmrgAC_ARG_WITH(perl, 980254b44505Smrg AS_HELP_STRING([--with-perl], 980354b44505Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 980454b44505Smrg [use_perl=$withval], [use_perl=]_defopt) 980554b44505Smrgm4_undefine([_defopt]) 980654b44505Smrg 980754b44505Smrgif test "x$use_perl" = x"auto"; then 980854b44505Smrg AC_PATH_PROG([PERL], [perl]) 980954b44505Smrg if test "x$PERL" = "x"; then 981054b44505Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 981154b44505Smrg have_perl=no 981254b44505Smrg else 981354b44505Smrg have_perl=yes 981454b44505Smrg fi 981554b44505Smrgelif test "x$use_perl" = x"yes" ; then 981654b44505Smrg AC_PATH_PROG([PERL], [perl]) 981754b44505Smrg if test "x$PERL" = "x"; then 981854b44505Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 981954b44505Smrg fi 982054b44505Smrg have_perl=yes 982154b44505Smrgelif test "x$use_perl" = x"no" ; then 982254b44505Smrg if test "x$PERL" != "x"; then 982354b44505Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 982454b44505Smrg fi 982554b44505Smrg have_perl=no 982654b44505Smrgelse 982754b44505Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 982854b44505Smrgfi 982954b44505Smrg 983054b44505SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 983154b44505Smrg]) # XORG_WITH_PERL 983254b44505Smrg 983354b44505Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 983454b44505Smrg# ---------------- 983554b44505Smrg# Minimum version: 1.5.0 983654b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 983754b44505Smrg# 983854b44505Smrg# Documentation tools are not always available on all platforms and sometimes 983954b44505Smrg# not at the appropriate level. This macro enables a module to test for the 984054b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 984154b44505Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 984254b44505Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 984354b44505Smrg# --with-asciidoc assumes 'auto'. 984454b44505Smrg# 984554b44505Smrg# Interface to module: 984654b44505Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 984754b44505Smrg# ASCIIDOC: returns the path of the asciidoc program found 984854b44505Smrg# returns the path set by the user in the environment 984954b44505Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 985054b44505Smrg# 'no' user instructs the module not to use asciidoc 985154b44505Smrg# 985254b44505Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 985354b44505Smrg# 985454b44505SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 985554b44505SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 985654b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 985754b44505SmrgAC_ARG_WITH(asciidoc, 985854b44505Smrg AS_HELP_STRING([--with-asciidoc], 985954b44505Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 986054b44505Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 986154b44505Smrgm4_undefine([_defopt]) 986254b44505Smrg 986354b44505Smrgif test "x$use_asciidoc" = x"auto"; then 986454b44505Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 986554b44505Smrg if test "x$ASCIIDOC" = "x"; then 986654b44505Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 986754b44505Smrg have_asciidoc=no 986854b44505Smrg else 986954b44505Smrg have_asciidoc=yes 987054b44505Smrg fi 987154b44505Smrgelif test "x$use_asciidoc" = x"yes" ; then 987254b44505Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 987354b44505Smrg if test "x$ASCIIDOC" = "x"; then 987454b44505Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 987554b44505Smrg fi 987654b44505Smrg have_asciidoc=yes 987754b44505Smrgelif test "x$use_asciidoc" = x"no" ; then 987854b44505Smrg if test "x$ASCIIDOC" != "x"; then 987954b44505Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 988054b44505Smrg fi 988154b44505Smrg have_asciidoc=no 988254b44505Smrgelse 988354b44505Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 988454b44505Smrgfi 988554b44505Smrgm4_ifval([$1], 988654b44505Smrg[if test "$have_asciidoc" = yes; then 988754b44505Smrg # scrape the asciidoc version 988854b44505Smrg AC_MSG_CHECKING([the asciidoc version]) 988954b44505Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 989054b44505Smrg AC_MSG_RESULT([$asciidoc_version]) 989154b44505Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 989254b44505Smrg [if test "x$use_asciidoc" = xauto; then 989354b44505Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 989454b44505Smrg have_asciidoc=no 989554b44505Smrg else 989654b44505Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 989754b44505Smrg fi]) 989854b44505Smrgfi]) 989954b44505SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 990054b44505Smrg]) # XORG_WITH_ASCIIDOC 990154b44505Smrg 990254b44505Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 99030a392d7eSmrg# ------------------------------------------- 990454b44505Smrg# Minimum version: 1.5.0 990554b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99060a392d7eSmrg# Minimum version for optional DOT checking: 1.18.0 990754b44505Smrg# 990854b44505Smrg# Documentation tools are not always available on all platforms and sometimes 990954b44505Smrg# not at the appropriate level. This macro enables a module to test for the 991054b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 991154b44505Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 991254b44505Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 991354b44505Smrg# --with-doxygen assumes 'auto'. 991454b44505Smrg# 991554b44505Smrg# Interface to module: 991654b44505Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 991754b44505Smrg# DOXYGEN: returns the path of the doxygen program found 991854b44505Smrg# returns the path set by the user in the environment 991954b44505Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 992054b44505Smrg# 'no' user instructs the module not to use doxygen 992154b44505Smrg# 992254b44505Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 992354b44505Smrg# 992454b44505SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 992554b44505SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 99260a392d7eSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 992754b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 992854b44505SmrgAC_ARG_WITH(doxygen, 992954b44505Smrg AS_HELP_STRING([--with-doxygen], 993054b44505Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 993154b44505Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 993254b44505Smrgm4_undefine([_defopt]) 993354b44505Smrg 993454b44505Smrgif test "x$use_doxygen" = x"auto"; then 993554b44505Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 993654b44505Smrg if test "x$DOXYGEN" = "x"; then 993754b44505Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 993854b44505Smrg have_doxygen=no 993954b44505Smrg else 994054b44505Smrg have_doxygen=yes 994154b44505Smrg fi 994254b44505Smrgelif test "x$use_doxygen" = x"yes" ; then 994354b44505Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 994454b44505Smrg if test "x$DOXYGEN" = "x"; then 994554b44505Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 994654b44505Smrg fi 994754b44505Smrg have_doxygen=yes 994854b44505Smrgelif test "x$use_doxygen" = x"no" ; then 994954b44505Smrg if test "x$DOXYGEN" != "x"; then 995054b44505Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 995154b44505Smrg fi 995254b44505Smrg have_doxygen=no 995354b44505Smrgelse 995454b44505Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 995554b44505Smrgfi 995654b44505Smrgm4_ifval([$1], 995754b44505Smrg[if test "$have_doxygen" = yes; then 995854b44505Smrg # scrape the doxygen version 995954b44505Smrg AC_MSG_CHECKING([the doxygen version]) 996054b44505Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 996154b44505Smrg AC_MSG_RESULT([$doxygen_version]) 996254b44505Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 996354b44505Smrg [if test "x$use_doxygen" = xauto; then 996454b44505Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 996554b44505Smrg have_doxygen=no 996654b44505Smrg else 996754b44505Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 996854b44505Smrg fi]) 996954b44505Smrgfi]) 99700a392d7eSmrg 99710a392d7eSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 99720a392d7eSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 99730a392d7eSmrgdnl HAVE_DOT = @HAVE_DOT@ 99740a392d7eSmrgHAVE_DOT=no 99750a392d7eSmrgif test "x$have_doxygen" = "xyes"; then 99760a392d7eSmrg AC_PATH_PROG([DOT], [dot]) 99770a392d7eSmrg if test "x$DOT" != "x"; then 99780a392d7eSmrg HAVE_DOT=yes 99790a392d7eSmrg fi 99800a392d7eSmrgfi 99810a392d7eSmrg 99820a392d7eSmrgAC_SUBST([HAVE_DOT]) 99830a392d7eSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 998454b44505SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 998554b44505Smrg]) # XORG_WITH_DOXYGEN 998654b44505Smrg 998754b44505Smrg# XORG_WITH_GROFF([DEFAULT]) 998854b44505Smrg# ---------------- 998954b44505Smrg# Minimum version: 1.6.0 999054b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 999154b44505Smrg# 999254b44505Smrg# Documentation tools are not always available on all platforms and sometimes 999354b44505Smrg# not at the appropriate level. This macro enables a module to test for the 999454b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 999554b44505Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 999654b44505Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 999754b44505Smrg# --with-groff assumes 'auto'. 999854b44505Smrg# 999954b44505Smrg# Interface to module: 1000054b44505Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1000154b44505Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1000254b44505Smrg# HAVE_GROFF_MS: the -ms macros package 1000354b44505Smrg# GROFF: returns the path of the groff program found 1000454b44505Smrg# returns the path set by the user in the environment 1000554b44505Smrg# --with-groff: 'yes' user instructs the module to use groff 1000654b44505Smrg# 'no' user instructs the module not to use groff 1000754b44505Smrg# 1000854b44505Smrg# Added in version 1.9.0: 1000954b44505Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1001054b44505Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1001154b44505Smrg# psselect from the psutils package. 1001254b44505Smrg# the ghostcript package. Refer to the grohtml man pages 1001354b44505Smrg# 1001454b44505Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1001554b44505Smrg# 1001654b44505Smrg# OS and distros often splits groff in a basic and full package, the former 1001754b44505Smrg# having the groff program and the later having devices, fonts and macros 1001854b44505Smrg# Checking for the groff executable is not enough. 1001954b44505Smrg# 1002054b44505Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1002154b44505Smrg# unset HAVE_GROFF or GROFF env variables. 1002254b44505Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1002354b44505Smrg# 1002454b44505SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1002554b44505SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1002654b44505Smrgm4_define([_defopt], m4_default([$1], [auto])) 1002754b44505SmrgAC_ARG_WITH(groff, 1002854b44505Smrg AS_HELP_STRING([--with-groff], 1002954b44505Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1003054b44505Smrg [use_groff=$withval], [use_groff=]_defopt) 1003154b44505Smrgm4_undefine([_defopt]) 1003254b44505Smrg 1003354b44505Smrgif test "x$use_groff" = x"auto"; then 1003454b44505Smrg AC_PATH_PROG([GROFF], [groff]) 1003554b44505Smrg if test "x$GROFF" = "x"; then 1003654b44505Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1003754b44505Smrg have_groff=no 1003854b44505Smrg else 1003954b44505Smrg have_groff=yes 1004054b44505Smrg fi 1004154b44505Smrgelif test "x$use_groff" = x"yes" ; then 1004254b44505Smrg AC_PATH_PROG([GROFF], [groff]) 1004354b44505Smrg if test "x$GROFF" = "x"; then 1004454b44505Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1004554b44505Smrg fi 1004654b44505Smrg have_groff=yes 1004754b44505Smrgelif test "x$use_groff" = x"no" ; then 1004854b44505Smrg if test "x$GROFF" != "x"; then 1004954b44505Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1005054b44505Smrg fi 1005154b44505Smrg have_groff=no 1005254b44505Smrgelse 1005354b44505Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1005454b44505Smrgfi 1005554b44505Smrg 1005654b44505Smrg# We have groff, test for the presence of the macro packages 1005754b44505Smrgif test "x$have_groff" = x"yes"; then 1005854b44505Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1005954b44505Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1006054b44505Smrg groff_ms_works=yes 1006154b44505Smrg else 1006254b44505Smrg groff_ms_works=no 1006354b44505Smrg fi 1006454b44505Smrg AC_MSG_RESULT([$groff_ms_works]) 1006554b44505Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1006654b44505Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1006754b44505Smrg groff_mm_works=yes 1006854b44505Smrg else 1006954b44505Smrg groff_mm_works=no 1007054b44505Smrg fi 1007154b44505Smrg AC_MSG_RESULT([$groff_mm_works]) 1007254b44505Smrgfi 1007354b44505Smrg 1007454b44505Smrg# We have groff, test for HTML dependencies, one command per package 1007554b44505Smrgif test "x$have_groff" = x"yes"; then 1007654b44505Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1007754b44505Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1007854b44505Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1007954b44505Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1008054b44505Smrg have_groff_html=yes 1008154b44505Smrg else 1008254b44505Smrg have_groff_html=no 1008354b44505Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1008454b44505Smrg fi 1008554b44505Smrgfi 1008654b44505Smrg 1008754b44505Smrg# Set Automake conditionals for Makefiles 1008854b44505SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1008954b44505SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1009054b44505SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1009154b44505SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1009254b44505Smrg]) # XORG_WITH_GROFF 1009354b44505Smrg 1009454b44505Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1009554b44505Smrg# --------------------------------------- 1009654b44505Smrg# Minimum version: 1.6.0 1009754b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1009854b44505Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1009954b44505Smrg# 1010054b44505Smrg# Documentation tools are not always available on all platforms and sometimes 1010154b44505Smrg# not at the appropriate level. This macro enables a module to test for the 1010254b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1010354b44505Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1010454b44505Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1010554b44505Smrg# --with-fop assumes 'auto'. 1010654b44505Smrg# 1010754b44505Smrg# Interface to module: 1010854b44505Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1010954b44505Smrg# FOP: returns the path of the fop program found 1011054b44505Smrg# returns the path set by the user in the environment 1011154b44505Smrg# --with-fop: 'yes' user instructs the module to use fop 1011254b44505Smrg# 'no' user instructs the module not to use fop 1011354b44505Smrg# 1011454b44505Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1011554b44505Smrg# 1011654b44505SmrgAC_DEFUN([XORG_WITH_FOP],[ 1011754b44505SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1011854b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 1011954b44505SmrgAC_ARG_WITH(fop, 1012054b44505Smrg AS_HELP_STRING([--with-fop], 1012154b44505Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1012254b44505Smrg [use_fop=$withval], [use_fop=]_defopt) 1012354b44505Smrgm4_undefine([_defopt]) 1012454b44505Smrg 1012554b44505Smrgif test "x$use_fop" = x"auto"; then 1012654b44505Smrg AC_PATH_PROG([FOP], [fop]) 1012754b44505Smrg if test "x$FOP" = "x"; then 1012854b44505Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1012954b44505Smrg have_fop=no 1013054b44505Smrg else 1013154b44505Smrg have_fop=yes 1013254b44505Smrg fi 1013354b44505Smrgelif test "x$use_fop" = x"yes" ; then 1013454b44505Smrg AC_PATH_PROG([FOP], [fop]) 1013554b44505Smrg if test "x$FOP" = "x"; then 1013654b44505Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1013754b44505Smrg fi 1013854b44505Smrg have_fop=yes 1013954b44505Smrgelif test "x$use_fop" = x"no" ; then 1014054b44505Smrg if test "x$FOP" != "x"; then 1014154b44505Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1014254b44505Smrg fi 1014354b44505Smrg have_fop=no 1014454b44505Smrgelse 1014554b44505Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1014654b44505Smrgfi 1014754b44505Smrg 1014854b44505Smrg# Test for a minimum version of fop, if provided. 1014954b44505Smrgm4_ifval([$1], 1015054b44505Smrg[if test "$have_fop" = yes; then 1015154b44505Smrg # scrape the fop version 1015254b44505Smrg AC_MSG_CHECKING([for fop minimum version]) 1015354b44505Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1015454b44505Smrg AC_MSG_RESULT([$fop_version]) 1015554b44505Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1015654b44505Smrg [if test "x$use_fop" = xauto; then 1015754b44505Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1015854b44505Smrg have_fop=no 1015954b44505Smrg else 1016054b44505Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1016154b44505Smrg fi]) 1016254b44505Smrgfi]) 1016354b44505SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1016454b44505Smrg]) # XORG_WITH_FOP 1016554b44505Smrg 101660a392d7eSmrg# XORG_WITH_M4([MIN-VERSION]) 101670a392d7eSmrg# --------------------------- 101680a392d7eSmrg# Minimum version: 1.19.0 101690a392d7eSmrg# 101700a392d7eSmrg# This macro attempts to locate an m4 macro processor which supports 101710a392d7eSmrg# -I option and is only useful for modules relying on M4 in order to 101720a392d7eSmrg# expand macros in source code files. 101730a392d7eSmrg# 101740a392d7eSmrg# Interface to module: 101750a392d7eSmrg# M4: returns the path of the m4 program found 101760a392d7eSmrg# returns the path set by the user in the environment 101770a392d7eSmrg# 101780a392d7eSmrgAC_DEFUN([XORG_WITH_M4], [ 101790a392d7eSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 101800a392d7eSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 101810a392d7eSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 101820a392d7eSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 101830a392d7eSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 101840a392d7eSmrg [$PATH:/usr/gnu/bin])]) 101850a392d7eSmrg 101860a392d7eSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 101870a392d7eSmrg]) # XORG_WITH_M4 101880a392d7eSmrg 1018954b44505Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1019054b44505Smrg# ---------------- 1019154b44505Smrg# Minimum version: 1.6.0 1019254b44505Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1019354b44505Smrg# 1019454b44505Smrg# Documentation tools are not always available on all platforms and sometimes 1019554b44505Smrg# not at the appropriate level. This macro enables a module to test for the 1019654b44505Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1019754b44505Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1019854b44505Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1019954b44505Smrg# --with-ps2pdf assumes 'auto'. 1020054b44505Smrg# 1020154b44505Smrg# Interface to module: 1020254b44505Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1020354b44505Smrg# PS2PDF: returns the path of the ps2pdf program found 1020454b44505Smrg# returns the path set by the user in the environment 1020554b44505Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1020654b44505Smrg# 'no' user instructs the module not to use ps2pdf 1020754b44505Smrg# 1020854b44505Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1020954b44505Smrg# 1021054b44505SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1021154b44505SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1021254b44505Smrgm4_define([_defopt], m4_default([$1], [auto])) 1021354b44505SmrgAC_ARG_WITH(ps2pdf, 1021454b44505Smrg AS_HELP_STRING([--with-ps2pdf], 1021554b44505Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1021654b44505Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1021754b44505Smrgm4_undefine([_defopt]) 1021854b44505Smrg 1021954b44505Smrgif test "x$use_ps2pdf" = x"auto"; then 1022054b44505Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1022154b44505Smrg if test "x$PS2PDF" = "x"; then 1022254b44505Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1022354b44505Smrg have_ps2pdf=no 1022454b44505Smrg else 1022554b44505Smrg have_ps2pdf=yes 1022654b44505Smrg fi 1022754b44505Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1022854b44505Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1022954b44505Smrg if test "x$PS2PDF" = "x"; then 1023054b44505Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1023154b44505Smrg fi 1023254b44505Smrg have_ps2pdf=yes 1023354b44505Smrgelif test "x$use_ps2pdf" = x"no" ; then 1023454b44505Smrg if test "x$PS2PDF" != "x"; then 1023554b44505Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1023654b44505Smrg fi 1023754b44505Smrg have_ps2pdf=no 1023854b44505Smrgelse 1023954b44505Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1024054b44505Smrgfi 1024154b44505SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1024254b44505Smrg]) # XORG_WITH_PS2PDF 1024354b44505Smrg 1024454b44505Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1024554b44505Smrg# ---------------- 1024654b44505Smrg# Minimum version: 1.6.0 1024754b44505Smrg# 1024854b44505Smrg# Documentation tools are not always available on all platforms and sometimes 1024954b44505Smrg# not at the appropriate level. This macro enables a builder to skip all 1025054b44505Smrg# documentation targets except traditional man pages. 1025154b44505Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1025254b44505Smrg# maximum flexibilty in controlling documentation building. 1025354b44505Smrg# Refer to: 1025454b44505Smrg# XORG_WITH_XMLTO --with-xmlto 1025554b44505Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1025654b44505Smrg# XORG_WITH_DOXYGEN --with-doxygen 1025754b44505Smrg# XORG_WITH_FOP --with-fop 1025854b44505Smrg# XORG_WITH_GROFF --with-groff 1025954b44505Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1026054b44505Smrg# 1026154b44505Smrg# Interface to module: 1026254b44505Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1026354b44505Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1026454b44505Smrg# 'no' user instructs the module not to generate docs 1026554b44505Smrg# parm1: specify the default value, yes or no. 1026654b44505Smrg# 1026754b44505SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1026854b44505Smrgm4_define([docs_default], m4_default([$1], [yes])) 1026954b44505SmrgAC_ARG_ENABLE(docs, 1027054b44505Smrg AS_HELP_STRING([--enable-docs], 1027154b44505Smrg [Enable building the documentation (default: ]docs_default[)]), 1027254b44505Smrg [build_docs=$enableval], [build_docs=]docs_default) 1027354b44505Smrgm4_undefine([docs_default]) 1027454b44505SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1027554b44505SmrgAC_MSG_CHECKING([whether to build documentation]) 1027654b44505SmrgAC_MSG_RESULT([$build_docs]) 1027754b44505Smrg]) # XORG_ENABLE_DOCS 1027854b44505Smrg 1027954b44505Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1028054b44505Smrg# ---------------- 1028154b44505Smrg# Minimum version: 1.6.0 1028254b44505Smrg# 1028354b44505Smrg# This macro enables a builder to skip all developer documentation. 1028454b44505Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1028554b44505Smrg# maximum flexibilty in controlling documentation building. 1028654b44505Smrg# Refer to: 1028754b44505Smrg# XORG_WITH_XMLTO --with-xmlto 1028854b44505Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1028954b44505Smrg# XORG_WITH_DOXYGEN --with-doxygen 1029054b44505Smrg# XORG_WITH_FOP --with-fop 1029154b44505Smrg# XORG_WITH_GROFF --with-groff 1029254b44505Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1029354b44505Smrg# 1029454b44505Smrg# Interface to module: 1029554b44505Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1029654b44505Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1029754b44505Smrg# 'no' user instructs the module not to generate developer docs 1029854b44505Smrg# parm1: specify the default value, yes or no. 1029954b44505Smrg# 1030054b44505SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1030154b44505Smrgm4_define([devel_default], m4_default([$1], [yes])) 1030254b44505SmrgAC_ARG_ENABLE(devel-docs, 1030354b44505Smrg AS_HELP_STRING([--enable-devel-docs], 1030454b44505Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1030554b44505Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1030654b44505Smrgm4_undefine([devel_default]) 1030754b44505SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1030854b44505SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1030954b44505SmrgAC_MSG_RESULT([$build_devel_docs]) 1031054b44505Smrg]) # XORG_ENABLE_DEVEL_DOCS 1031154b44505Smrg 1031254b44505Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1031354b44505Smrg# ---------------- 1031454b44505Smrg# Minimum version: 1.6.0 1031554b44505Smrg# 1031654b44505Smrg# This macro enables a builder to skip all functional specification targets. 1031754b44505Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1031854b44505Smrg# maximum flexibilty in controlling documentation building. 1031954b44505Smrg# Refer to: 1032054b44505Smrg# XORG_WITH_XMLTO --with-xmlto 1032154b44505Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1032254b44505Smrg# XORG_WITH_DOXYGEN --with-doxygen 1032354b44505Smrg# XORG_WITH_FOP --with-fop 1032454b44505Smrg# XORG_WITH_GROFF --with-groff 1032554b44505Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1032654b44505Smrg# 1032754b44505Smrg# Interface to module: 1032854b44505Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1032954b44505Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1033054b44505Smrg# 'no' user instructs the module not to generate specs 1033154b44505Smrg# parm1: specify the default value, yes or no. 1033254b44505Smrg# 1033354b44505SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1033454b44505Smrgm4_define([spec_default], m4_default([$1], [yes])) 1033554b44505SmrgAC_ARG_ENABLE(specs, 1033654b44505Smrg AS_HELP_STRING([--enable-specs], 1033754b44505Smrg [Enable building the specs (default: ]spec_default[)]), 1033854b44505Smrg [build_specs=$enableval], [build_specs=]spec_default) 1033954b44505Smrgm4_undefine([spec_default]) 1034054b44505SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1034154b44505SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1034254b44505SmrgAC_MSG_RESULT([$build_specs]) 1034354b44505Smrg]) # XORG_ENABLE_SPECS 1034454b44505Smrg 1034554b44505Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1034654b44505Smrg# ---------------------------------------------- 1034754b44505Smrg# Minimum version: 1.13.0 1034854b44505Smrg# 1034954b44505Smrg# This macro enables a builder to enable/disable unit testing 1035054b44505Smrg# It makes no assumption about the test cases implementation 1035154b44505Smrg# Test cases may or may not use Automake "Support for test suites" 1035254b44505Smrg# They may or may not use the software utility library GLib 1035354b44505Smrg# 1035454b44505Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1035554b44505Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1035654b44505Smrg# The variable enable_unit_tests is used by other macros in this file. 1035754b44505Smrg# 1035854b44505Smrg# Interface to module: 1035954b44505Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1036054b44505Smrg# enable_unit_tests: used in configure.ac for additional configuration 1036154b44505Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1036254b44505Smrg# 'no' user instructs the module not to build tests 1036354b44505Smrg# parm1: specify the default value, yes or no. 1036454b44505Smrg# 1036554b44505SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1036654b44505SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1036754b44505SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1036854b44505SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1036954b44505Smrgm4_define([_defopt], m4_default([$1], [auto])) 1037054b44505SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1037154b44505Smrg [Enable building unit test cases (default: ]_defopt[)]), 1037254b44505Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1037354b44505Smrgm4_undefine([_defopt]) 1037454b44505SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1037554b44505SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1037654b44505SmrgAC_MSG_RESULT([$enable_unit_tests]) 1037754b44505Smrg]) # XORG_ENABLE_UNIT_TESTS 1037854b44505Smrg 1037954b44505Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1038054b44505Smrg# ------------------------------------------------------ 1038154b44505Smrg# Minimum version: 1.17.0 1038254b44505Smrg# 1038354b44505Smrg# This macro enables a builder to enable/disable integration testing 1038454b44505Smrg# It makes no assumption about the test cases' implementation 1038554b44505Smrg# Test cases may or may not use Automake "Support for test suites" 1038654b44505Smrg# 1038754b44505Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1038854b44505Smrg# usually requires less dependencies and may be built and run under less 1038954b44505Smrg# stringent environments than integration tests. 1039054b44505Smrg# 1039154b44505Smrg# Interface to module: 1039254b44505Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1039354b44505Smrg# enable_integration_tests: used in configure.ac for additional configuration 1039454b44505Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1039554b44505Smrg# 'no' user instructs the module not to build tests 1039654b44505Smrg# parm1: specify the default value, yes or no. 1039754b44505Smrg# 1039854b44505SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1039954b44505SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1040054b44505Smrgm4_define([_defopt], m4_default([$1], [auto])) 1040154b44505SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1040254b44505Smrg [Enable building integration test cases (default: ]_defopt[)]), 1040354b44505Smrg [enable_integration_tests=$enableval], 1040454b44505Smrg [enable_integration_tests=]_defopt) 1040554b44505Smrgm4_undefine([_defopt]) 1040654b44505SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1040754b44505Smrg [test "x$enable_integration_tests" != xno]) 1040854b44505SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1040954b44505SmrgAC_MSG_RESULT([$enable_integration_tests]) 1041054b44505Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1041154b44505Smrg 1041254b44505Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1041354b44505Smrg# ---------------------------------------- 1041454b44505Smrg# Minimum version: 1.13.0 1041554b44505Smrg# 1041654b44505Smrg# GLib is a library which provides advanced data structures and functions. 1041754b44505Smrg# This macro enables a module to test for the presence of Glib. 1041854b44505Smrg# 1041954b44505Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1042054b44505Smrg# Otherwise the value of $enable_unit_tests is blank. 1042154b44505Smrg# 1042254b44505Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1042354b44505Smrg# test support usually requires less dependencies and may be built and run under 1042454b44505Smrg# less stringent environments than integration tests. 1042554b44505Smrg# 1042654b44505Smrg# Interface to module: 1042754b44505Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1042854b44505Smrg# with_glib: used in configure.ac to know if GLib has been found 1042954b44505Smrg# --with-glib: 'yes' user instructs the module to use glib 1043054b44505Smrg# 'no' user instructs the module not to use glib 1043154b44505Smrg# 1043254b44505SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1043354b44505SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1043454b44505Smrgm4_define([_defopt], m4_default([$2], [auto])) 1043554b44505SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1043654b44505Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1043754b44505Smrg [with_glib=$withval], [with_glib=]_defopt) 1043854b44505Smrgm4_undefine([_defopt]) 1043954b44505Smrg 1044054b44505Smrghave_glib=no 1044154b44505Smrg# Do not probe GLib if user explicitly disabled unit testing 1044254b44505Smrgif test "x$enable_unit_tests" != x"no"; then 1044354b44505Smrg # Do not probe GLib if user explicitly disabled it 1044454b44505Smrg if test "x$with_glib" != x"no"; then 1044554b44505Smrg m4_ifval( 1044654b44505Smrg [$1], 1044754b44505Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1044854b44505Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1044954b44505Smrg ) 1045054b44505Smrg fi 1045154b44505Smrgfi 1045254b44505Smrg 1045354b44505Smrg# Not having GLib when unit testing has been explicitly requested is an error 1045454b44505Smrgif test "x$enable_unit_tests" = x"yes"; then 1045554b44505Smrg if test "x$have_glib" = x"no"; then 1045654b44505Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1045754b44505Smrg fi 1045854b44505Smrgfi 1045954b44505Smrg 1046054b44505Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1046154b44505Smrgif test "x$enable_unit_tests" = x"no"; then 1046254b44505Smrg if test "x$with_glib" = x"yes"; then 1046354b44505Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1046454b44505Smrg fi 1046554b44505Smrgfi 1046654b44505Smrg 1046754b44505Smrg# Not having GLib when it has been explicitly requested is an error 1046854b44505Smrgif test "x$with_glib" = x"yes"; then 1046954b44505Smrg if test "x$have_glib" = x"no"; then 1047054b44505Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1047154b44505Smrg fi 1047254b44505Smrgfi 1047354b44505Smrg 1047454b44505SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1047554b44505Smrg]) # XORG_WITH_GLIB 1047654b44505Smrg 1047754b44505Smrg# XORG_LD_WRAP([required|optional]) 1047854b44505Smrg# --------------------------------- 1047954b44505Smrg# Minimum version: 1.13.0 1048054b44505Smrg# 1048154b44505Smrg# Check if linker supports -wrap, passed via compiler flags 1048254b44505Smrg# 1048354b44505Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1048454b44505Smrg# Otherwise the value of $enable_unit_tests is blank. 1048554b44505Smrg# 1048654b44505Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1048754b44505Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1048854b44505Smrg# available, an argument of "optional" allows use when some unit tests require 1048954b44505Smrg# ld -wrap and others do not. 1049054b44505Smrg# 1049154b44505SmrgAC_DEFUN([XORG_LD_WRAP],[ 1049254b44505SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1049354b44505Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1049454b44505Smrg void __wrap_exit(int status) { return; }], 1049554b44505Smrg [exit(0);])]) 1049654b44505Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1049754b44505Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1049854b44505Smrg if test "x$have_ld_wrap" = x"no"; then 1049954b44505Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1050054b44505Smrg fi 1050154b44505Smrgfi 1050254b44505SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1050354b44505Smrg# 1050454b44505Smrg]) # XORG_LD_WRAP 1050554b44505Smrg 1050654b44505Smrg# XORG_CHECK_LINKER_FLAGS 1050754b44505Smrg# ----------------------- 1050854b44505Smrg# SYNOPSIS 1050954b44505Smrg# 1051054b44505Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1051154b44505Smrg# 1051254b44505Smrg# DESCRIPTION 1051354b44505Smrg# 1051454b44505Smrg# Check whether the given linker FLAGS work with the current language's 1051554b44505Smrg# linker, or whether they give an error. 1051654b44505Smrg# 1051754b44505Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1051854b44505Smrg# success/failure. 1051954b44505Smrg# 1052054b44505Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1052154b44505Smrg# 1052254b44505Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1052354b44505Smrg# 1052454b44505Smrg# LICENSE 1052554b44505Smrg# 1052654b44505Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1052754b44505Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1052854b44505Smrg# Copyright (c) 2009 Matteo Frigo 1052954b44505Smrg# 1053054b44505Smrg# This program is free software: you can redistribute it and/or modify it 1053154b44505Smrg# under the terms of the GNU General Public License as published by the 1053254b44505Smrg# Free Software Foundation, either version 3 of the License, or (at your 1053354b44505Smrg# option) any later version. 1053454b44505Smrg# 1053554b44505Smrg# This program is distributed in the hope that it will be useful, but 1053654b44505Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1053754b44505Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1053854b44505Smrg# Public License for more details. 1053954b44505Smrg# 1054054b44505Smrg# You should have received a copy of the GNU General Public License along 1054154b44505Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1054254b44505Smrg# 1054354b44505Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1054454b44505Smrg# gives unlimited permission to copy, distribute and modify the configure 1054554b44505Smrg# scripts that are the output of Autoconf when processing the Macro. You 1054654b44505Smrg# need not follow the terms of the GNU General Public License when using 1054754b44505Smrg# or distributing such scripts, even though portions of the text of the 1054854b44505Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1054954b44505Smrg# all other use of the material that constitutes the Autoconf Macro. 1055054b44505Smrg# 1055154b44505Smrg# This special exception to the GPL applies to versions of the Autoconf 1055254b44505Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1055354b44505Smrg# modified version of the Autoconf Macro, you may extend this special 1055454b44505Smrg# exception to the GPL to apply to your modified version as well.# 1055554b44505SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1055654b44505Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1055754b44505Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1055854b44505SmrgAS_LITERAL_IF([$1], 1055954b44505Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1056054b44505Smrg ax_save_FLAGS=$LDFLAGS 1056154b44505Smrg LDFLAGS="$1" 1056254b44505Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1056354b44505Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1056454b44505Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1056554b44505Smrg LDFLAGS=$ax_save_FLAGS])], 1056654b44505Smrg [ax_save_FLAGS=$LDFLAGS 1056754b44505Smrg LDFLAGS="$1" 1056854b44505Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1056954b44505Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1057054b44505Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1057154b44505Smrg LDFLAGS=$ax_save_FLAGS]) 1057254b44505Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1057354b44505SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1057454b44505Smrgif test "x$xorg_check_linker_flags" = xyes; then 1057554b44505Smrg m4_default([$2], :) 1057654b44505Smrgelse 1057754b44505Smrg m4_default([$3], :) 1057854b44505Smrgfi 1057954b44505Smrg]) # XORG_CHECK_LINKER_FLAGS 1058054b44505Smrg 1058154b44505Smrg# XORG_MEMORY_CHECK_FLAGS 1058254b44505Smrg# ----------------------- 1058354b44505Smrg# Minimum version: 1.16.0 1058454b44505Smrg# 1058554b44505Smrg# This macro attempts to find appropriate memory checking functionality 1058654b44505Smrg# for various platforms which unit testing code may use to catch various 1058754b44505Smrg# forms of memory allocation and access errors in testing. 1058854b44505Smrg# 1058954b44505Smrg# Interface to module: 1059054b44505Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1059154b44505Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1059254b44505Smrg# 1059354b44505Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1059454b44505Smrg# 1059554b44505SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1059654b44505Smrg 1059754b44505SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1059854b44505SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1059954b44505Smrg [Environment variables to enable memory checking in tests]) 1060054b44505Smrg 1060154b44505Smrg# Check for different types of support on different platforms 1060254b44505Smrgcase $host_os in 1060354b44505Smrg solaris*) 1060454b44505Smrg AC_CHECK_LIB([umem], [umem_alloc], 1060554b44505Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1060654b44505Smrg ;; 1060754b44505Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1060854b44505Smrg # both directly and inverted, so should not be 0 or 255. 1060954b44505Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1061054b44505Smrg ;; 1061154b44505Smrg darwin*) 1061254b44505Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1061354b44505Smrg ;; 1061454b44505Smrg *bsd*) 1061554b44505Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1061654b44505Smrg ;; 1061754b44505Smrgesac 1061854b44505Smrg 1061954b44505Smrg# User supplied flags override default flags 1062054b44505Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1062154b44505Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1062254b44505Smrgfi 1062354b44505Smrg 1062454b44505SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1062554b44505Smrg]) # XORG_WITH_LINT 1062654b44505Smrg 106274a041c5bSmacallan# XORG_CHECK_MALLOC_ZERO 106284a041c5bSmacallan# ---------------------- 106294a041c5bSmacallan# Minimum version: 1.0.0 106304a041c5bSmacallan# 106314a041c5bSmacallan# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 106324a041c5bSmacallan# malloc(0) returns NULL. Packages should add one of these cflags to 106334a041c5bSmacallan# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 106344a041c5bSmacallanAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 106354a041c5bSmacallanAC_ARG_ENABLE(malloc0returnsnull, 1063654b44505Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 106374a041c5bSmacallan [malloc(0) returns NULL (default: auto)]), 106384a041c5bSmacallan [MALLOC_ZERO_RETURNS_NULL=$enableval], 106394a041c5bSmacallan [MALLOC_ZERO_RETURNS_NULL=auto]) 106404a041c5bSmacallan 106414a041c5bSmacallanAC_MSG_CHECKING([whether malloc(0) returns NULL]) 106424a041c5bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 106430a392d7eSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 106440a392d7eSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1064554b44505Smrg#include <stdlib.h> 1064654b44505Smrg],[ 106474a041c5bSmacallan char *m0, *r0, *c0, *p; 106484a041c5bSmacallan m0 = malloc(0); 106494a041c5bSmacallan p = malloc(10); 106504a041c5bSmacallan r0 = realloc(p,0); 1065154b44505Smrg c0 = calloc(0,10); 1065254b44505Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1065354b44505Smrg])], 106540a392d7eSmrg [xorg_cv_malloc0_returns_null=yes], 106550a392d7eSmrg [xorg_cv_malloc0_returns_null=no])]) 106560a392d7eSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 106574a041c5bSmacallanfi 106584a041c5bSmacallanAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 106594a041c5bSmacallan 106604a041c5bSmacallanif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 106614a041c5bSmacallan MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 106624a041c5bSmacallan XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 106634a041c5bSmacallan XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 106644a041c5bSmacallanelse 106654a041c5bSmacallan MALLOC_ZERO_CFLAGS="" 106664a041c5bSmacallan XMALLOC_ZERO_CFLAGS="" 106674a041c5bSmacallan XTMALLOC_ZERO_CFLAGS="" 106684a041c5bSmacallanfi 106694a041c5bSmacallan 106704a041c5bSmacallanAC_SUBST([MALLOC_ZERO_CFLAGS]) 106714a041c5bSmacallanAC_SUBST([XMALLOC_ZERO_CFLAGS]) 106724a041c5bSmacallanAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 106734a041c5bSmacallan]) # XORG_CHECK_MALLOC_ZERO 106744a041c5bSmacallan 106754a041c5bSmacallan# XORG_WITH_LINT() 106764a041c5bSmacallan# ---------------- 106774a041c5bSmacallan# Minimum version: 1.1.0 106784a041c5bSmacallan# 1067954b44505Smrg# This macro enables the use of a tool that flags some suspicious and 1068054b44505Smrg# non-portable constructs (likely to be bugs) in C language source code. 1068154b44505Smrg# It will attempt to locate the tool and use appropriate options. 1068254b44505Smrg# There are various lint type tools on different platforms. 1068354b44505Smrg# 1068454b44505Smrg# Interface to module: 1068554b44505Smrg# LINT: returns the path to the tool found on the platform 1068654b44505Smrg# or the value set to LINT on the configure cmd line 1068754b44505Smrg# also an Automake conditional 1068854b44505Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1068954b44505Smrg# 1069054b44505Smrg# --with-lint: 'yes' user instructs the module to use lint 1069154b44505Smrg# 'no' user instructs the module not to use lint (default) 1069254b44505Smrg# 1069354b44505Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1069454b44505Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 106954a041c5bSmacallan# 106964a041c5bSmacallanAC_DEFUN([XORG_WITH_LINT],[ 106974a041c5bSmacallan 1069854b44505SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1069954b44505SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1070054b44505SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1070154b44505Smrg [Use a lint-style source code checker (default: disabled)])], 1070254b44505Smrg [use_lint=$withval], [use_lint=no]) 1070354b44505Smrg 1070454b44505Smrg# Obtain platform specific info like program name and options 1070554b44505Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1070654b44505Smrgcase $host_os in 1070754b44505Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1070854b44505Smrg lint_name=splint 1070954b44505Smrg lint_options="-badflag" 1071054b44505Smrg ;; 1071154b44505Smrg *freebsd* | *netbsd*) 1071254b44505Smrg lint_name=lint 1071354b44505Smrg lint_options="-u -b" 1071454b44505Smrg ;; 1071554b44505Smrg *solaris*) 1071654b44505Smrg lint_name=lint 1071754b44505Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1071854b44505Smrg ;; 1071954b44505Smrgesac 1072054b44505Smrg 1072154b44505Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1072254b44505Smrgif test "x$use_lint" = x"yes" ; then 1072354b44505Smrg AC_PATH_PROG([LINT], [$lint_name]) 1072454b44505Smrg if test "x$LINT" = "x"; then 1072554b44505Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1072654b44505Smrg fi 1072754b44505Smrgelif test "x$use_lint" = x"no" ; then 1072854b44505Smrg if test "x$LINT" != "x"; then 1072954b44505Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1073054b44505Smrg fi 107314a041c5bSmacallanelse 1073254b44505Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 107334a041c5bSmacallanfi 1073454b44505Smrg 1073554b44505Smrg# User supplied flags override default flags 1073654b44505Smrgif test "x$LINT_FLAGS" != "x"; then 1073754b44505Smrg lint_options=$LINT_FLAGS 107384a041c5bSmacallanfi 107394a041c5bSmacallan 1074054b44505SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1074154b44505SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 107424a041c5bSmacallan 107434a041c5bSmacallan]) # XORG_WITH_LINT 107444a041c5bSmacallan 107454a041c5bSmacallan# XORG_LINT_LIBRARY(LIBNAME) 107464a041c5bSmacallan# -------------------------- 107474a041c5bSmacallan# Minimum version: 1.1.0 107484a041c5bSmacallan# 107494a041c5bSmacallan# Sets up flags for building lint libraries for checking programs that call 107504a041c5bSmacallan# functions in the library. 107514a041c5bSmacallan# 1075254b44505Smrg# Interface to module: 1075354b44505Smrg# LINTLIB - Automake variable with the name of lint library file to make 1075454b44505Smrg# MAKE_LINT_LIB - Automake conditional 1075554b44505Smrg# 1075654b44505Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1075754b44505Smrg# - 'no' user instructs the module not to create a lint library (default) 107584a041c5bSmacallan 107594a041c5bSmacallanAC_DEFUN([XORG_LINT_LIBRARY],[ 107604a041c5bSmacallanAC_REQUIRE([XORG_WITH_LINT]) 1076154b44505SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 107624a041c5bSmacallan [Create lint library (default: disabled)])], 107634a041c5bSmacallan [make_lint_lib=$enableval], [make_lint_lib=no]) 1076454b44505Smrg 1076554b44505Smrgif test "x$make_lint_lib" = x"yes" ; then 1076654b44505Smrg LINTLIB=llib-l$1.ln 1076754b44505Smrg if test "x$LINT" = "x"; then 1076854b44505Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1076954b44505Smrg fi 1077054b44505Smrgelif test "x$make_lint_lib" != x"no" ; then 1077154b44505Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 107724a041c5bSmacallanfi 1077354b44505Smrg 107744a041c5bSmacallanAC_SUBST(LINTLIB) 107754a041c5bSmacallanAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 107764a041c5bSmacallan 107774a041c5bSmacallan]) # XORG_LINT_LIBRARY 107784a041c5bSmacallan 1077954b44505Smrg# XORG_COMPILER_BRAND 1078054b44505Smrg# ------------------- 1078154b44505Smrg# Minimum version: 1.14.0 1078254b44505Smrg# 1078354b44505Smrg# Checks for various brands of compilers and sets flags as appropriate: 1078454b44505Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1078554b44505Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1078654b44505Smrg# clang compiler - sets CLANGCC to "yes" 1078754b44505Smrg# Intel compiler - sets INTELCC to "yes" 1078854b44505Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1078954b44505Smrg# 1079054b44505SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1079154b44505SmrgAC_LANG_CASE( 1079254b44505Smrg [C], [ 1079354b44505Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1079454b44505Smrg ], 1079554b44505Smrg [C++], [ 1079654b44505Smrg AC_REQUIRE([AC_PROG_CXX]) 1079754b44505Smrg ] 1079854b44505Smrg) 1079954b44505SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1080054b44505SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1080154b44505SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1080254b44505Smrg]) # XORG_COMPILER_BRAND 108034a041c5bSmacallan 1080454b44505Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1080554b44505Smrg# --------------- 1080654b44505Smrg# Minimum version: 1.16.0 1080754b44505Smrg# 1080854b44505Smrg# Test if the compiler works when passed the given flag as a command line argument. 1080954b44505Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1081054b44505Smrg# next flag in the list until there are no more options. 1081154b44505Smrg# 1081254b44505Smrg# Note that this does not guarantee that the compiler supports the flag as some 1081354b44505Smrg# compilers will simply ignore arguments that they do not understand, but we do 1081454b44505Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1081554b44505Smrg# -Werror=unused-command-line-argument 1081654b44505Smrg# 1081754b44505SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1081854b44505Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1081954b44505Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1082054b44505Smrg 1082154b44505SmrgAC_LANG_COMPILER_REQUIRE 1082254b44505Smrg 1082354b44505SmrgAC_LANG_CASE( 1082454b44505Smrg [C], [ 1082554b44505Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1082654b44505Smrg define([PREFIX], [C]) 1082754b44505Smrg define([CACHE_PREFIX], [cc]) 1082854b44505Smrg define([COMPILER], [$CC]) 1082954b44505Smrg ], 1083054b44505Smrg [C++], [ 1083154b44505Smrg define([PREFIX], [CXX]) 1083254b44505Smrg define([CACHE_PREFIX], [cxx]) 1083354b44505Smrg define([COMPILER], [$CXX]) 1083454b44505Smrg ] 1083554b44505Smrg) 108364a041c5bSmacallan 1083754b44505Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1083854b44505Smrg 1083954b44505Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1084054b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1084154b44505Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1084254b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1084354b44505Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1084454b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1084554b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1084654b44505Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1084754b44505Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1084854b44505Smrgfi 1084954b44505Smrg 1085054b44505Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1085154b44505Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1085254b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1085354b44505Smrg fi 1085454b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1085554b44505Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1085654b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1085754b44505Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1085854b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1085954b44505Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1086054b44505Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1086154b44505Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1086254b44505Smrgfi 1086354b44505Smrg 1086454b44505Smrgfound="no" 1086554b44505Smrgm4_foreach([flag], m4_cdr($@), [ 1086654b44505Smrg if test $found = "no" ; then 108670a392d7eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1086854b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1086954b44505Smrg fi 1087054b44505Smrg 108710a392d7eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1087254b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1087354b44505Smrg fi 1087454b44505Smrg 1087554b44505Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1087654b44505Smrg 1087754b44505Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1087854b44505Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1087954b44505Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1088054b44505Smrg AC_CACHE_VAL($cacheid, 1088154b44505Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1088254b44505Smrg [eval $cacheid=yes], 1088354b44505Smrg [eval $cacheid=no])]) 1088454b44505Smrg 1088554b44505Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1088654b44505Smrg 1088754b44505Smrg eval supported=\$$cacheid 1088854b44505Smrg AC_MSG_RESULT([$supported]) 1088954b44505Smrg if test "$supported" = "yes" ; then 1089054b44505Smrg $1="$$1 ]flag[" 1089154b44505Smrg found="yes" 1089254b44505Smrg fi 108934a041c5bSmacallan fi 108944a041c5bSmacallan]) 1089554b44505Smrg]) # XORG_TESTSET_CFLAG 1089654b44505Smrg 1089754b44505Smrg# XORG_COMPILER_FLAGS 1089854b44505Smrg# --------------- 1089954b44505Smrg# Minimum version: 1.16.0 1090054b44505Smrg# 1090154b44505Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1090254b44505Smrg# arguments supported by the selected compiler which do NOT alter the generated 1090354b44505Smrg# code. These arguments will cause the compiler to print various warnings 1090454b44505Smrg# during compilation AND turn a conservative set of warnings into errors. 1090554b44505Smrg# 1090654b44505Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1090754b44505Smrg# future versions of util-macros as options are added to new compilers. 1090854b44505Smrg# 1090954b44505SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1091054b44505SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1091154b44505Smrg 1091254b44505SmrgAC_ARG_ENABLE(selective-werror, 1091354b44505Smrg AS_HELP_STRING([--disable-selective-werror], 1091454b44505Smrg [Turn off selective compiler errors. (default: enabled)]), 1091554b44505Smrg [SELECTIVE_WERROR=$enableval], 1091654b44505Smrg [SELECTIVE_WERROR=yes]) 1091754b44505Smrg 1091854b44505SmrgAC_LANG_CASE( 1091954b44505Smrg [C], [ 1092054b44505Smrg define([PREFIX], [C]) 1092154b44505Smrg ], 1092254b44505Smrg [C++], [ 1092354b44505Smrg define([PREFIX], [CXX]) 1092454b44505Smrg ] 1092554b44505Smrg) 1092654b44505Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1092754b44505Smrgif test "x$SUNCC" = "xyes"; then 1092854b44505Smrg [BASE_]PREFIX[FLAGS]="-v" 1092954b44505Smrgelse 1093054b44505Smrg [BASE_]PREFIX[FLAGS]="" 1093154b44505Smrgfi 1093254b44505Smrg 1093354b44505Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1093454b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1093554b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1093654b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1093754b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1093854b44505Smrg 1093954b44505SmrgAC_LANG_CASE( 1094054b44505Smrg [C], [ 1094154b44505Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1094254b44505Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1094354b44505Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1094454b44505Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 109450a392d7eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1094654b44505Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1094754b44505Smrg ] 1094854b44505Smrg) 1094954b44505Smrg 1095054b44505Smrg# This chunk adds additional warnings that could catch undesired effects. 1095154b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1095254b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1095354b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1095454b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1095554b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1095654b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 109570a392d7eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1095854b44505Smrg 1095954b44505Smrg# These are currently disabled because they are noisy. They will be enabled 1096054b44505Smrg# in the future once the codebase is sufficiently modernized to silence 1096154b44505Smrg# them. For now, I don't want them to drown out the other warnings. 1096254b44505Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1096354b44505Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 109640a392d7eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1096554b44505Smrg 1096654b44505Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1096754b44505Smrg# when there are problems that should be fixed. 1096854b44505Smrg 1096954b44505Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1097054b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1097154b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1097254b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1097354b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1097454b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1097554b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1097654b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1097754b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1097854b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1097954b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1098054b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1098154b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1098254b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1098354b44505Smrgelse 1098454b44505SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 1098554b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1098654b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1098754b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1098854b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1098954b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1099054b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1099154b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1099254b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1099354b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1099454b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1099554b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1099654b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1099754b44505SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1099854b44505Smrgfi 1099954b44505Smrg 1100054b44505SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1100154b44505Smrg]) # XORG_COMPILER_FLAGS 1100254b44505Smrg 1100354b44505Smrg# XORG_CWARNFLAGS 1100454b44505Smrg# --------------- 1100554b44505Smrg# Minimum version: 1.2.0 1100654b44505Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1100754b44505Smrg# 1100854b44505Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1100954b44505Smrg# 1101054b44505Smrg# This function is deprecated because it defines -fno-strict-aliasing 1101154b44505Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1101254b44505Smrg# is needed, then it should be added explicitly in the module when 1101354b44505Smrg# it is updated to use BASE_CFLAGS. 1101454b44505Smrg# 1101554b44505SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1101654b44505SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1101754b44505SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1101854b44505SmrgAC_LANG_CASE( 1101954b44505Smrg [C], [ 1102054b44505Smrg CWARNFLAGS="$BASE_CFLAGS" 1102154b44505Smrg if test "x$GCC" = xyes ; then 1102254b44505Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1102354b44505Smrg fi 1102454b44505Smrg AC_SUBST(CWARNFLAGS) 1102554b44505Smrg ] 1102654b44505Smrg) 1102754b44505Smrg]) # XORG_CWARNFLAGS 1102854b44505Smrg 1102954b44505Smrg# XORG_STRICT_OPTION 1103054b44505Smrg# ----------------------- 1103154b44505Smrg# Minimum version: 1.3.0 1103254b44505Smrg# 1103354b44505Smrg# Add configure option to enable strict compilation flags, such as treating 1103454b44505Smrg# warnings as fatal errors. 1103554b44505Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1103654b44505Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1103754b44505Smrg# 1103854b44505Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1103954b44505Smrg# when strict compilation is unconditionally desired. 1104054b44505SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1104154b44505SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1104254b44505SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1104354b44505Smrg 1104454b44505SmrgAC_ARG_ENABLE(strict-compilation, 1104554b44505Smrg AS_HELP_STRING([--enable-strict-compilation], 1104654b44505Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1104754b44505Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1104854b44505Smrg 1104954b44505SmrgAC_LANG_CASE( 1105054b44505Smrg [C], [ 1105154b44505Smrg define([PREFIX], [C]) 1105254b44505Smrg ], 1105354b44505Smrg [C++], [ 1105454b44505Smrg define([PREFIX], [CXX]) 1105554b44505Smrg ] 1105654b44505Smrg) 1105754b44505Smrg 1105854b44505Smrg[STRICT_]PREFIX[FLAGS]="" 1105954b44505SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1106054b44505SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1106154b44505Smrg 1106254b44505Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1106354b44505Smrg# activate it with -Werror, so we add it here explicitly. 1106454b44505SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1106554b44505Smrg 1106654b44505Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1106754b44505Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1106854b44505Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1106954b44505Smrgfi 1107054b44505SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1107154b44505SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1107254b44505SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1107354b44505Smrg]) # XORG_STRICT_OPTION 110744a041c5bSmacallan 1107554b44505Smrg# XORG_DEFAULT_OPTIONS 1107654b44505Smrg# -------------------- 1107754b44505Smrg# Minimum version: 1.3.0 1107854b44505Smrg# 1107954b44505Smrg# Defines default options for X.Org modules. 1108054b44505Smrg# 1108154b44505SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1108254b44505SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1108354b44505SmrgXORG_COMPILER_FLAGS 1108454b44505SmrgXORG_CWARNFLAGS 1108554b44505SmrgXORG_STRICT_OPTION 1108654b44505SmrgXORG_RELEASE_VERSION 1108754b44505SmrgXORG_CHANGELOG 1108854b44505SmrgXORG_INSTALL 1108954b44505SmrgXORG_MANPAGE_SECTIONS 1109054b44505Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1109154b44505Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1109254b44505Smrg]) # XORG_DEFAULT_OPTIONS 1109354b44505Smrg 1109454b44505Smrg# XORG_INSTALL() 1109554b44505Smrg# ---------------- 1109654b44505Smrg# Minimum version: 1.4.0 1109754b44505Smrg# 1109854b44505Smrg# Defines the variable INSTALL_CMD as the command to copy 1109954b44505Smrg# INSTALL from $prefix/share/util-macros. 1110054b44505Smrg# 1110154b44505SmrgAC_DEFUN([XORG_INSTALL], [ 1110254b44505SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1110354b44505Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1110454b44505SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1110554b44505Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1110654b44505Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1110754b44505Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1110854b44505SmrgAC_SUBST([INSTALL_CMD]) 1110954b44505Smrg]) # XORG_INSTALL 111104a041c5bSmacallandnl Copyright 2005 Red Hat, Inc 111114a041c5bSmacallandnl 111124a041c5bSmacallandnl Permission to use, copy, modify, distribute, and sell this software and its 111134a041c5bSmacallandnl documentation for any purpose is hereby granted without fee, provided that 111144a041c5bSmacallandnl the above copyright notice appear in all copies and that both that 111154a041c5bSmacallandnl copyright notice and this permission notice appear in supporting 111164a041c5bSmacallandnl documentation. 111174a041c5bSmacallandnl 111184a041c5bSmacallandnl The above copyright notice and this permission notice shall be included 111194a041c5bSmacallandnl in all copies or substantial portions of the Software. 111204a041c5bSmacallandnl 111214a041c5bSmacallandnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111224a041c5bSmacallandnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111234a041c5bSmacallandnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111244a041c5bSmacallandnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111254a041c5bSmacallandnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111264a041c5bSmacallandnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111274a041c5bSmacallandnl OTHER DEALINGS IN THE SOFTWARE. 111284a041c5bSmacallandnl 111294a041c5bSmacallandnl Except as contained in this notice, the name of the copyright holders shall 111304a041c5bSmacallandnl not be used in advertising or otherwise to promote the sale, use or 111314a041c5bSmacallandnl other dealings in this Software without prior written authorization 111324a041c5bSmacallandnl from the copyright holders. 111334a041c5bSmacallandnl 111344a041c5bSmacallan 111354a041c5bSmacallan# XORG_RELEASE_VERSION 111364a041c5bSmacallan# -------------------- 1113754b44505Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 111380a392d7eSmrg 111394a041c5bSmacallanAC_DEFUN([XORG_RELEASE_VERSION],[ 111404a041c5bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 111414a041c5bSmacallan [`echo $PACKAGE_VERSION | cut -d . -f 1`], 111424a041c5bSmacallan [Major version of this package]) 111434a041c5bSmacallan PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 111444a041c5bSmacallan if test "x$PVM" = "x"; then 111454a041c5bSmacallan PVM="0" 111464a041c5bSmacallan fi 111474a041c5bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 111484a041c5bSmacallan [$PVM], 111494a041c5bSmacallan [Minor version of this package]) 111504a041c5bSmacallan PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 111514a041c5bSmacallan if test "x$PVP" = "x"; then 111524a041c5bSmacallan PVP="0" 111534a041c5bSmacallan fi 111544a041c5bSmacallan AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 111554a041c5bSmacallan [$PVP], 111564a041c5bSmacallan [Patch version of this package]) 111574a041c5bSmacallan]) 111584a041c5bSmacallan 1115954b44505Smrg# XORG_CHANGELOG() 1116054b44505Smrg# ---------------- 1116154b44505Smrg# Minimum version: 1.2.0 1116254b44505Smrg# 1116354b44505Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1116454b44505Smrg# ChangeLog from git. 1116554b44505Smrg# 1116654b44505Smrg# 1116754b44505SmrgAC_DEFUN([XORG_CHANGELOG], [ 1116854b44505SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1116954b44505Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1117054b44505Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1117154b44505Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1117254b44505SmrgAC_SUBST([CHANGELOG_CMD]) 1117354b44505Smrg]) # XORG_CHANGELOG 1117454b44505Smrg 1117554b44505Smrgdnl Copyright 2005 Red Hat, Inc 1117654b44505Smrgdnl 1117754b44505Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1117854b44505Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1117954b44505Smrgdnl the above copyright notice appear in all copies and that both that 1118054b44505Smrgdnl copyright notice and this permission notice appear in supporting 1118154b44505Smrgdnl documentation. 1118254b44505Smrgdnl 1118354b44505Smrgdnl The above copyright notice and this permission notice shall be included 1118454b44505Smrgdnl in all copies or substantial portions of the Software. 1118554b44505Smrgdnl 1118654b44505Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1118754b44505Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1118854b44505Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1118954b44505Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1119054b44505Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1119154b44505Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1119254b44505Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1119354b44505Smrgdnl 1119454b44505Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1119554b44505Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1119654b44505Smrgdnl other dealings in this Software without prior written authorization 1119754b44505Smrgdnl from the copyright holders. 1119854b44505Smrgdnl 1119954b44505Smrg 112000a392d7eSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1120154b44505Smrg# -------------------------- 112020a392d7eSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 112030a392d7eSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1120454b44505Smrg 1120554b44505SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1120654b44505Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1120754b44505Smrg SAVE_CFLAGS="$CFLAGS" 1120854b44505Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1120954b44505Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1121054b44505Smrg#include "xorg-server.h" 1121154b44505Smrg#if !defined $1 1121254b44505Smrg#error $1 not defined 1121354b44505Smrg#endif 1121454b44505Smrg ]])], 1121554b44505Smrg [_EXT_CHECK=yes], 1121654b44505Smrg [_EXT_CHECK=no]) 1121754b44505Smrg CFLAGS="$SAVE_CFLAGS" 1121854b44505Smrg AC_MSG_CHECKING([if $1 is defined]) 1121954b44505Smrg AC_MSG_RESULT([$_EXT_CHECK]) 1122054b44505Smrg if test "$_EXT_CHECK" != no; then 1122154b44505Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1122254b44505Smrg fi 1122354b44505Smrg]) 1122454b44505Smrg 112250a392d7eSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 112264a041c5bSmacallan# 112274a041c5bSmacallan# This file is free software; the Free Software Foundation 112284a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 112294a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 112304a041c5bSmacallan 112314a041c5bSmacallan# AM_AUTOMAKE_VERSION(VERSION) 112324a041c5bSmacallan# ---------------------------- 112334a041c5bSmacallan# Automake X.Y traces this macro to ensure aclocal.m4 has been 112344a041c5bSmacallan# generated from the m4 files accompanying Automake X.Y. 112354a041c5bSmacallan# (This private macro should not be called outside this file.) 112364a041c5bSmacallanAC_DEFUN([AM_AUTOMAKE_VERSION], 112370a392d7eSmrg[am__api_version='1.15' 112384a041c5bSmacallandnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 112394a041c5bSmacallandnl require some minimum version. Point them to the right macro. 112400a392d7eSmrgm4_if([$1], [1.15], [], 112414a041c5bSmacallan [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 112424a041c5bSmacallan]) 112434a041c5bSmacallan 112444a041c5bSmacallan# _AM_AUTOCONF_VERSION(VERSION) 112454a041c5bSmacallan# ----------------------------- 112464a041c5bSmacallan# aclocal traces this macro to find the Autoconf version. 112474a041c5bSmacallan# This is a private macro too. Using m4_define simplifies 112484a041c5bSmacallan# the logic in aclocal, which can simply ignore this definition. 112494a041c5bSmacallanm4_define([_AM_AUTOCONF_VERSION], []) 112504a041c5bSmacallan 112514a041c5bSmacallan# AM_SET_CURRENT_AUTOMAKE_VERSION 112524a041c5bSmacallan# ------------------------------- 112534a041c5bSmacallan# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1125454b44505Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 112554a041c5bSmacallanAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 112560a392d7eSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 112574a041c5bSmacallanm4_ifndef([AC_AUTOCONF_VERSION], 112584a041c5bSmacallan [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1125954b44505Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 112604a041c5bSmacallan 112614a041c5bSmacallan# AM_AUX_DIR_EXPAND -*- Autoconf -*- 112624a041c5bSmacallan 112630a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 112644a041c5bSmacallan# 112654a041c5bSmacallan# This file is free software; the Free Software Foundation 112664a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 112674a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 112684a041c5bSmacallan 112694a041c5bSmacallan# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1127054b44505Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1127154b44505Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 112724a041c5bSmacallan# 112734a041c5bSmacallan# Of course, Automake must honor this variable whenever it calls a 112744a041c5bSmacallan# tool from the auxiliary directory. The problem is that $srcdir (and 112754a041c5bSmacallan# therefore $ac_aux_dir as well) can be either absolute or relative, 112764a041c5bSmacallan# depending on how configure is run. This is pretty annoying, since 112774a041c5bSmacallan# it makes $ac_aux_dir quite unusable in subdirectories: in the top 112784a041c5bSmacallan# source directory, any form will work fine, but in subdirectories a 112794a041c5bSmacallan# relative path needs to be adjusted first. 112804a041c5bSmacallan# 112814a041c5bSmacallan# $ac_aux_dir/missing 112824a041c5bSmacallan# fails when called from a subdirectory if $ac_aux_dir is relative 112834a041c5bSmacallan# $top_srcdir/$ac_aux_dir/missing 112844a041c5bSmacallan# fails if $ac_aux_dir is absolute, 112854a041c5bSmacallan# fails when called from a subdirectory in a VPATH build with 112864a041c5bSmacallan# a relative $ac_aux_dir 112874a041c5bSmacallan# 112884a041c5bSmacallan# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 112894a041c5bSmacallan# are both prefixed by $srcdir. In an in-source build this is usually 1129054b44505Smrg# harmless because $srcdir is '.', but things will broke when you 112914a041c5bSmacallan# start a VPATH build or use an absolute $srcdir. 112924a041c5bSmacallan# 112934a041c5bSmacallan# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 112944a041c5bSmacallan# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 112954a041c5bSmacallan# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 112964a041c5bSmacallan# and then we would define $MISSING as 112974a041c5bSmacallan# MISSING="\${SHELL} $am_aux_dir/missing" 112984a041c5bSmacallan# This will work as long as MISSING is not called from configure, because 112994a041c5bSmacallan# unfortunately $(top_srcdir) has no meaning in configure. 113004a041c5bSmacallan# However there are other variables, like CC, which are often used in 113014a041c5bSmacallan# configure, and could therefore not use this "fixed" $ac_aux_dir. 113024a041c5bSmacallan# 113034a041c5bSmacallan# Another solution, used here, is to always expand $ac_aux_dir to an 113044a041c5bSmacallan# absolute PATH. The drawback is that using absolute paths prevent a 113054a041c5bSmacallan# configured tree to be moved without reconfiguration. 113064a041c5bSmacallan 113074a041c5bSmacallanAC_DEFUN([AM_AUX_DIR_EXPAND], 113080a392d7eSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 113090a392d7eSmrg# Expand $ac_aux_dir to an absolute path. 113100a392d7eSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 113114a041c5bSmacallan]) 113124a041c5bSmacallan 113134a041c5bSmacallan# AM_CONDITIONAL -*- Autoconf -*- 113144a041c5bSmacallan 113150a392d7eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 113164a041c5bSmacallan# 113174a041c5bSmacallan# This file is free software; the Free Software Foundation 113184a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 113194a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 113204a041c5bSmacallan 113214a041c5bSmacallan# AM_CONDITIONAL(NAME, SHELL-CONDITION) 113224a041c5bSmacallan# ------------------------------------- 113234a041c5bSmacallan# Define a conditional. 113244a041c5bSmacallanAC_DEFUN([AM_CONDITIONAL], 1132554b44505Smrg[AC_PREREQ([2.52])dnl 1132654b44505Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1132754b44505Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 113284a041c5bSmacallanAC_SUBST([$1_TRUE])dnl 113294a041c5bSmacallanAC_SUBST([$1_FALSE])dnl 113304a041c5bSmacallan_AM_SUBST_NOTMAKE([$1_TRUE])dnl 113314a041c5bSmacallan_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1133254b44505Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 113334a041c5bSmacallanif $2; then 113344a041c5bSmacallan $1_TRUE= 113354a041c5bSmacallan $1_FALSE='#' 113364a041c5bSmacallanelse 113374a041c5bSmacallan $1_TRUE='#' 113384a041c5bSmacallan $1_FALSE= 113394a041c5bSmacallanfi 113404a041c5bSmacallanAC_CONFIG_COMMANDS_PRE( 113414a041c5bSmacallan[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 113424a041c5bSmacallan AC_MSG_ERROR([[conditional "$1" was never defined. 113434a041c5bSmacallanUsually this means the macro was only invoked conditionally.]]) 113444a041c5bSmacallanfi])]) 113454a041c5bSmacallan 113460a392d7eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 113474a041c5bSmacallan# 113484a041c5bSmacallan# This file is free software; the Free Software Foundation 113494a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 113504a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 113514a041c5bSmacallan 113524a041c5bSmacallan 1135354b44505Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 113544a041c5bSmacallan# written in clear, in which case automake, when reading aclocal.m4, 113554a041c5bSmacallan# will think it sees a *use*, and therefore will trigger all it's 113564a041c5bSmacallan# C support machinery. Also note that it means that autoscan, seeing 113574a041c5bSmacallan# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 113584a041c5bSmacallan 113594a041c5bSmacallan 113604a041c5bSmacallan# _AM_DEPENDENCIES(NAME) 113614a041c5bSmacallan# ---------------------- 113624a041c5bSmacallan# See how the compiler implements dependency checking. 1136354b44505Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 113644a041c5bSmacallan# We try a few techniques and use that to set a single cache variable. 113654a041c5bSmacallan# 113664a041c5bSmacallan# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 113674a041c5bSmacallan# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 113684a041c5bSmacallan# dependency, and given that the user is not expected to run this macro, 113694a041c5bSmacallan# just rely on AC_PROG_CC. 113704a041c5bSmacallanAC_DEFUN([_AM_DEPENDENCIES], 113714a041c5bSmacallan[AC_REQUIRE([AM_SET_DEPDIR])dnl 113724a041c5bSmacallanAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 113734a041c5bSmacallanAC_REQUIRE([AM_MAKE_INCLUDE])dnl 113744a041c5bSmacallanAC_REQUIRE([AM_DEP_TRACK])dnl 113754a041c5bSmacallan 1137654b44505Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1137754b44505Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1137854b44505Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1137954b44505Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1138054b44505Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1138154b44505Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1138254b44505Smrg [depcc="$$1" am_compiler_list=]) 113834a041c5bSmacallan 113844a041c5bSmacallanAC_CACHE_CHECK([dependency style of $depcc], 113854a041c5bSmacallan [am_cv_$1_dependencies_compiler_type], 113864a041c5bSmacallan[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 113874a041c5bSmacallan # We make a subdir and do the tests there. Otherwise we can end up 113884a041c5bSmacallan # making bogus files that we don't know about and never remove. For 113894a041c5bSmacallan # instance it was reported that on HP-UX the gcc test will end up 1139054b44505Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1139154b44505Smrg # in D". 1139254b44505Smrg rm -rf conftest.dir 113934a041c5bSmacallan mkdir conftest.dir 113944a041c5bSmacallan # Copy depcomp to subdir because otherwise we won't find it if we're 113954a041c5bSmacallan # using a relative directory. 113964a041c5bSmacallan cp "$am_depcomp" conftest.dir 113974a041c5bSmacallan cd conftest.dir 113984a041c5bSmacallan # We will build objects and dependencies in a subdirectory because 113994a041c5bSmacallan # it helps to detect inapplicable dependency modes. For instance 114004a041c5bSmacallan # both Tru64's cc and ICC support -MD to output dependencies as a 114014a041c5bSmacallan # side effect of compilation, but ICC will put the dependencies in 114024a041c5bSmacallan # the current directory while Tru64 will put them in the object 114034a041c5bSmacallan # directory. 114044a041c5bSmacallan mkdir sub 114054a041c5bSmacallan 114064a041c5bSmacallan am_cv_$1_dependencies_compiler_type=none 114074a041c5bSmacallan if test "$am_compiler_list" = ""; then 114084a041c5bSmacallan am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 114094a041c5bSmacallan fi 1141054b44505Smrg am__universal=false 1141154b44505Smrg m4_case([$1], [CC], 1141254b44505Smrg [case " $depcc " in #( 1141354b44505Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1141454b44505Smrg esac], 1141554b44505Smrg [CXX], 1141654b44505Smrg [case " $depcc " in #( 1141754b44505Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1141854b44505Smrg esac]) 1141954b44505Smrg 114204a041c5bSmacallan for depmode in $am_compiler_list; do 114214a041c5bSmacallan # Setup a source with many dependencies, because some compilers 114224a041c5bSmacallan # like to wrap large dependency lists on column 80 (with \), and 114234a041c5bSmacallan # we should not choose a depcomp mode which is confused by this. 114244a041c5bSmacallan # 114254a041c5bSmacallan # We need to recreate these files for each test, as the compiler may 114264a041c5bSmacallan # overwrite some of them when testing with obscure command lines. 114274a041c5bSmacallan # This happens at least with the AIX C compiler. 114284a041c5bSmacallan : > sub/conftest.c 114294a041c5bSmacallan for i in 1 2 3 4 5 6; do 114304a041c5bSmacallan echo '#include "conftst'$i'.h"' >> sub/conftest.c 1143154b44505Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1143254b44505Smrg # Solaris 10 /bin/sh. 1143354b44505Smrg echo '/* dummy */' > sub/conftst$i.h 114344a041c5bSmacallan done 114354a041c5bSmacallan echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 114364a041c5bSmacallan 1143754b44505Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 1143854b44505Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1143954b44505Smrg # handle '-M -o', and we need to detect this. Also, some Intel 1144054b44505Smrg # versions had trouble with output in subdirs. 1144154b44505Smrg am__obj=sub/conftest.${OBJEXT-o} 1144254b44505Smrg am__minus_obj="-o $am__obj" 114434a041c5bSmacallan case $depmode in 1144454b44505Smrg gcc) 1144554b44505Smrg # This depmode causes a compiler race in universal mode. 1144654b44505Smrg test "$am__universal" = false || continue 1144754b44505Smrg ;; 114484a041c5bSmacallan nosideeffect) 1144954b44505Smrg # After this tag, mechanisms are not by side-effect, so they'll 1145054b44505Smrg # only be used when explicitly requested. 114514a041c5bSmacallan if test "x$enable_dependency_tracking" = xyes; then 114524a041c5bSmacallan continue 114534a041c5bSmacallan else 114544a041c5bSmacallan break 114554a041c5bSmacallan fi 114564a041c5bSmacallan ;; 1145754b44505Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1145854b44505Smrg # This compiler won't grok '-c -o', but also, the minuso test has 1145954b44505Smrg # not run yet. These depmodes are late enough in the game, and 1146054b44505Smrg # so weak that their functioning should not be impacted. 1146154b44505Smrg am__obj=conftest.${OBJEXT-o} 1146254b44505Smrg am__minus_obj= 1146354b44505Smrg ;; 114644a041c5bSmacallan none) break ;; 114654a041c5bSmacallan esac 114664a041c5bSmacallan if depmode=$depmode \ 1146754b44505Smrg source=sub/conftest.c object=$am__obj \ 114684a041c5bSmacallan depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1146954b44505Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 114704a041c5bSmacallan >/dev/null 2>conftest.err && 114714a041c5bSmacallan grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 114724a041c5bSmacallan grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1147354b44505Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 114744a041c5bSmacallan ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 114754a041c5bSmacallan # icc doesn't choke on unknown options, it will just issue warnings 114764a041c5bSmacallan # or remarks (even with -Werror). So we grep stderr for any message 114774a041c5bSmacallan # that says an option was ignored or not supported. 114784a041c5bSmacallan # When given -MP, icc 7.0 and 7.1 complain thusly: 114794a041c5bSmacallan # icc: Command line warning: ignoring option '-M'; no argument required 114804a041c5bSmacallan # The diagnosis changed in icc 8.0: 114814a041c5bSmacallan # icc: Command line remark: option '-MP' not supported 114824a041c5bSmacallan if (grep 'ignoring option' conftest.err || 114834a041c5bSmacallan grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 114844a041c5bSmacallan am_cv_$1_dependencies_compiler_type=$depmode 114854a041c5bSmacallan break 114864a041c5bSmacallan fi 114874a041c5bSmacallan fi 114884a041c5bSmacallan done 114894a041c5bSmacallan 114904a041c5bSmacallan cd .. 114914a041c5bSmacallan rm -rf conftest.dir 114924a041c5bSmacallanelse 114934a041c5bSmacallan am_cv_$1_dependencies_compiler_type=none 114944a041c5bSmacallanfi 114954a041c5bSmacallan]) 114964a041c5bSmacallanAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 114974a041c5bSmacallanAM_CONDITIONAL([am__fastdep$1], [ 114984a041c5bSmacallan test "x$enable_dependency_tracking" != xno \ 114994a041c5bSmacallan && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 115004a041c5bSmacallan]) 115014a041c5bSmacallan 115024a041c5bSmacallan 115034a041c5bSmacallan# AM_SET_DEPDIR 115044a041c5bSmacallan# ------------- 115054a041c5bSmacallan# Choose a directory name for dependency files. 1150654b44505Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 115074a041c5bSmacallanAC_DEFUN([AM_SET_DEPDIR], 115084a041c5bSmacallan[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 115094a041c5bSmacallanAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 115104a041c5bSmacallan]) 115114a041c5bSmacallan 115124a041c5bSmacallan 115134a041c5bSmacallan# AM_DEP_TRACK 115144a041c5bSmacallan# ------------ 115154a041c5bSmacallanAC_DEFUN([AM_DEP_TRACK], 1151654b44505Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 1151754b44505SmrgAS_HELP_STRING( 1151854b44505Smrg [--enable-dependency-tracking], 1151954b44505Smrg [do not reject slow dependency extractors]) 1152054b44505SmrgAS_HELP_STRING( 1152154b44505Smrg [--disable-dependency-tracking], 1152254b44505Smrg [speeds up one-time build])]) 115234a041c5bSmacallanif test "x$enable_dependency_tracking" != xno; then 115244a041c5bSmacallan am_depcomp="$ac_aux_dir/depcomp" 115254a041c5bSmacallan AMDEPBACKSLASH='\' 1152654b44505Smrg am__nodep='_no' 115274a041c5bSmacallanfi 115284a041c5bSmacallanAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 115294a041c5bSmacallanAC_SUBST([AMDEPBACKSLASH])dnl 115304a041c5bSmacallan_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1153154b44505SmrgAC_SUBST([am__nodep])dnl 1153254b44505Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 115334a041c5bSmacallan]) 115344a041c5bSmacallan 115354a041c5bSmacallan# Generate code to set up dependency tracking. -*- Autoconf -*- 115364a041c5bSmacallan 115370a392d7eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 115384a041c5bSmacallan# 115394a041c5bSmacallan# This file is free software; the Free Software Foundation 115404a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 115414a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 115424a041c5bSmacallan 115434a041c5bSmacallan 115444a041c5bSmacallan# _AM_OUTPUT_DEPENDENCY_COMMANDS 115454a041c5bSmacallan# ------------------------------ 115464a041c5bSmacallanAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1154754b44505Smrg[{ 115480a392d7eSmrg # Older Autoconf quotes --file arguments for eval, but not when files 1154954b44505Smrg # are listed without --file. Let's play safe and only enable the eval 1155054b44505Smrg # if we detect the quoting. 1155154b44505Smrg case $CONFIG_FILES in 1155254b44505Smrg *\'*) eval set x "$CONFIG_FILES" ;; 1155354b44505Smrg *) set x $CONFIG_FILES ;; 1155454b44505Smrg esac 1155554b44505Smrg shift 1155654b44505Smrg for mf 1155754b44505Smrg do 1155854b44505Smrg # Strip MF so we end up with the name of the file. 1155954b44505Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 1156054b44505Smrg # Check whether this is an Automake generated Makefile or not. 1156154b44505Smrg # We used to match only the files named 'Makefile.in', but 1156254b44505Smrg # some people rename them; so instead we look at the file content. 1156354b44505Smrg # Grep'ing the first line is not enough: some people post-process 1156454b44505Smrg # each Makefile.in and add a new line on top of each file to say so. 1156554b44505Smrg # Grep'ing the whole file is not good either: AIX grep has a line 1156654b44505Smrg # limit of 2048, but all sed's we know have understand at least 4000. 1156754b44505Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1156854b44505Smrg dirpart=`AS_DIRNAME("$mf")` 1156954b44505Smrg else 1157054b44505Smrg continue 1157154b44505Smrg fi 1157254b44505Smrg # Extract the definition of DEPDIR, am__include, and am__quote 1157354b44505Smrg # from the Makefile without running 'make'. 1157454b44505Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1157554b44505Smrg test -z "$DEPDIR" && continue 1157654b44505Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 115770a392d7eSmrg test -z "$am__include" && continue 1157854b44505Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1157954b44505Smrg # Find all dependency output files, they are included files with 1158054b44505Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 1158154b44505Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 1158254b44505Smrg # expansion. 1158354b44505Smrg for file in `sed -n " 1158454b44505Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1158554b44505Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 1158654b44505Smrg # Make sure the directory exists. 1158754b44505Smrg test -f "$dirpart/$file" && continue 1158854b44505Smrg fdir=`AS_DIRNAME(["$file"])` 1158954b44505Smrg AS_MKDIR_P([$dirpart/$fdir]) 1159054b44505Smrg # echo "creating $dirpart/$file" 1159154b44505Smrg echo '# dummy' > "$dirpart/$file" 1159254b44505Smrg done 115934a041c5bSmacallan done 1159454b44505Smrg} 115954a041c5bSmacallan])# _AM_OUTPUT_DEPENDENCY_COMMANDS 115964a041c5bSmacallan 115974a041c5bSmacallan 115984a041c5bSmacallan# AM_OUTPUT_DEPENDENCY_COMMANDS 115994a041c5bSmacallan# ----------------------------- 116004a041c5bSmacallan# This macro should only be invoked once -- use via AC_REQUIRE. 116014a041c5bSmacallan# 116024a041c5bSmacallan# This code is only required when automatic dependency tracking 1160354b44505Smrg# is enabled. FIXME. This creates each '.P' file that we will 116044a041c5bSmacallan# need in order to bootstrap the dependency handling code. 116054a041c5bSmacallanAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 116064a041c5bSmacallan[AC_CONFIG_COMMANDS([depfiles], 116074a041c5bSmacallan [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 116084a041c5bSmacallan [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 116094a041c5bSmacallan]) 116104a041c5bSmacallan 116114a041c5bSmacallan# Do all the work for Automake. -*- Autoconf -*- 116124a041c5bSmacallan 116130a392d7eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 116144a041c5bSmacallan# 116154a041c5bSmacallan# This file is free software; the Free Software Foundation 116164a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 116174a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 116184a041c5bSmacallan 116194a041c5bSmacallan# This macro actually does too much. Some checks are only needed if 116204a041c5bSmacallan# your package does certain things. But this isn't really a big deal. 116214a041c5bSmacallan 116220a392d7eSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 116230a392d7eSmrgm4_define([AC_PROG_CC], 116240a392d7eSmrgm4_defn([AC_PROG_CC]) 116250a392d7eSmrg[_AM_PROG_CC_C_O 116260a392d7eSmrg]) 116270a392d7eSmrg 116284a041c5bSmacallan# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 116294a041c5bSmacallan# AM_INIT_AUTOMAKE([OPTIONS]) 116304a041c5bSmacallan# ----------------------------------------------- 116314a041c5bSmacallan# The call with PACKAGE and VERSION arguments is the old style 116324a041c5bSmacallan# call (pre autoconf-2.50), which is being phased out. PACKAGE 116334a041c5bSmacallan# and VERSION should now be passed to AC_INIT and removed from 116344a041c5bSmacallan# the call to AM_INIT_AUTOMAKE. 116354a041c5bSmacallan# We support both call styles for the transition. After 116364a041c5bSmacallan# the next Automake release, Autoconf can make the AC_INIT 116374a041c5bSmacallan# arguments mandatory, and then we can depend on a new Autoconf 116384a041c5bSmacallan# release and drop the old call support. 116394a041c5bSmacallanAC_DEFUN([AM_INIT_AUTOMAKE], 116400a392d7eSmrg[AC_PREREQ([2.65])dnl 116414a041c5bSmacallandnl Autoconf wants to disallow AM_ names. We explicitly allow 116424a041c5bSmacallandnl the ones we care about. 116434a041c5bSmacallanm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 116444a041c5bSmacallanAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 116454a041c5bSmacallanAC_REQUIRE([AC_PROG_INSTALL])dnl 116464a041c5bSmacallanif test "`cd $srcdir && pwd`" != "`pwd`"; then 116474a041c5bSmacallan # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 116484a041c5bSmacallan # is not polluted with repeated "-I." 116494a041c5bSmacallan AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 116504a041c5bSmacallan # test to see if srcdir already configured 116514a041c5bSmacallan if test -f $srcdir/config.status; then 116524a041c5bSmacallan AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 116534a041c5bSmacallan fi 116544a041c5bSmacallanfi 116554a041c5bSmacallan 116564a041c5bSmacallan# test whether we have cygpath 116574a041c5bSmacallanif test -z "$CYGPATH_W"; then 116584a041c5bSmacallan if (cygpath --version) >/dev/null 2>/dev/null; then 116594a041c5bSmacallan CYGPATH_W='cygpath -w' 116604a041c5bSmacallan else 116614a041c5bSmacallan CYGPATH_W=echo 116624a041c5bSmacallan fi 116634a041c5bSmacallanfi 116644a041c5bSmacallanAC_SUBST([CYGPATH_W]) 116654a041c5bSmacallan 116664a041c5bSmacallan# Define the identity of the package. 116674a041c5bSmacallandnl Distinguish between old-style and new-style calls. 116684a041c5bSmacallanm4_ifval([$2], 1166954b44505Smrg[AC_DIAGNOSE([obsolete], 116700a392d7eSmrg [$0: two- and three-arguments forms are deprecated.]) 1167154b44505Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 116724a041c5bSmacallan AC_SUBST([PACKAGE], [$1])dnl 116734a041c5bSmacallan AC_SUBST([VERSION], [$2])], 116744a041c5bSmacallan[_AM_SET_OPTIONS([$1])dnl 116754a041c5bSmacallandnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1167654b44505Smrgm4_if( 1167754b44505Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1167854b44505Smrg [ok:ok],, 116794a041c5bSmacallan [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 116804a041c5bSmacallan AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 116814a041c5bSmacallan AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 116824a041c5bSmacallan 116834a041c5bSmacallan_AM_IF_OPTION([no-define],, 1168454b44505Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1168554b44505Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 116864a041c5bSmacallan 116874a041c5bSmacallan# Some tools Automake needs. 116884a041c5bSmacallanAC_REQUIRE([AM_SANITY_CHECK])dnl 116894a041c5bSmacallanAC_REQUIRE([AC_ARG_PROGRAM])dnl 1169054b44505SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1169154b44505SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 1169254b44505SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1169354b44505SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 1169454b44505SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 1169554b44505SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1169654b44505SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1169754b44505SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1169854b44505Smrg# For better backward compatibility. To be removed once Automake 1.9.x 1169954b44505Smrg# dies out for good. For more background, see: 1170054b44505Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1170154b44505Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1170254b44505SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 117030a392d7eSmrg# We need awk for the "check" target (and possibly the TAP driver). The 117040a392d7eSmrg# system "awk" is bad on some platforms. 117054a041c5bSmacallanAC_REQUIRE([AC_PROG_AWK])dnl 117064a041c5bSmacallanAC_REQUIRE([AC_PROG_MAKE_SET])dnl 117074a041c5bSmacallanAC_REQUIRE([AM_SET_LEADING_DOT])dnl 117084a041c5bSmacallan_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1170954b44505Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1171054b44505Smrg [_AM_PROG_TAR([v7])])]) 117114a041c5bSmacallan_AM_IF_OPTION([no-dependencies],, 117124a041c5bSmacallan[AC_PROVIDE_IFELSE([AC_PROG_CC], 1171354b44505Smrg [_AM_DEPENDENCIES([CC])], 1171454b44505Smrg [m4_define([AC_PROG_CC], 1171554b44505Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 117164a041c5bSmacallanAC_PROVIDE_IFELSE([AC_PROG_CXX], 1171754b44505Smrg [_AM_DEPENDENCIES([CXX])], 1171854b44505Smrg [m4_define([AC_PROG_CXX], 1171954b44505Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 117204a041c5bSmacallanAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1172154b44505Smrg [_AM_DEPENDENCIES([OBJC])], 1172254b44505Smrg [m4_define([AC_PROG_OBJC], 1172354b44505Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 117240a392d7eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1172554b44505Smrg [_AM_DEPENDENCIES([OBJCXX])], 1172654b44505Smrg [m4_define([AC_PROG_OBJCXX], 117270a392d7eSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 117284a041c5bSmacallan]) 117290a392d7eSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 117300a392d7eSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 117310a392d7eSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 117320a392d7eSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1173354b44505SmrgAC_CONFIG_COMMANDS_PRE(dnl 1173454b44505Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 1173554b44505Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 117360a392d7eSmrg 117370a392d7eSmrg# POSIX will say in a future version that running "rm -f" with no argument 117380a392d7eSmrg# is OK; and we want to be able to make that assumption in our Makefile 117390a392d7eSmrg# recipes. So use an aggressive probe to check that the usage we want is 117400a392d7eSmrg# actually supported "in the wild" to an acceptable degree. 117410a392d7eSmrg# See automake bug#10828. 117420a392d7eSmrg# To make any issue more visible, cause the running configure to be aborted 117430a392d7eSmrg# by default if the 'rm' program in use doesn't match our expectations; the 117440a392d7eSmrg# user can still override this though. 117450a392d7eSmrgif rm -f && rm -fr && rm -rf; then : OK; else 117460a392d7eSmrg cat >&2 <<'END' 117470a392d7eSmrgOops! 117480a392d7eSmrg 117490a392d7eSmrgYour 'rm' program seems unable to run without file operands specified 117500a392d7eSmrgon the command line, even when the '-f' option is present. This is contrary 117510a392d7eSmrgto the behaviour of most rm programs out there, and not conforming with 117520a392d7eSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 117530a392d7eSmrg 117540a392d7eSmrgPlease tell bug-automake@gnu.org about your system, including the value 117550a392d7eSmrgof your $PATH and any error possibly output before this message. This 117560a392d7eSmrgcan help us improve future automake versions. 117570a392d7eSmrg 117580a392d7eSmrgEND 117590a392d7eSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 117600a392d7eSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 117610a392d7eSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 117620a392d7eSmrg echo >&2 117630a392d7eSmrg else 117640a392d7eSmrg cat >&2 <<'END' 117650a392d7eSmrgAborting the configuration process, to ensure you take notice of the issue. 117660a392d7eSmrg 117670a392d7eSmrgYou can download and install GNU coreutils to get an 'rm' implementation 117680a392d7eSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 117690a392d7eSmrg 117700a392d7eSmrgIf you want to complete the configuration process using your problematic 117710a392d7eSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 117720a392d7eSmrgto "yes", and re-run configure. 117730a392d7eSmrg 117740a392d7eSmrgEND 117750a392d7eSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 117760a392d7eSmrg fi 117770a392d7eSmrgfi 117780a392d7eSmrgdnl The trailing newline in this macro's definition is deliberate, for 117790a392d7eSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 117800a392d7eSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 117814a041c5bSmacallan]) 117824a041c5bSmacallan 1178354b44505Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1178454b44505Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1178554b44505Smrgdnl mangled by Autoconf and run in a shell conditional statement. 1178654b44505Smrgm4_define([_AC_COMPILER_EXEEXT], 1178754b44505Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1178854b44505Smrg 117894a041c5bSmacallan# When config.status generates a header, we must update the stamp-h file. 117904a041c5bSmacallan# This file resides in the same directory as the config header 117914a041c5bSmacallan# that is generated. The stamp files are numbered to have different names. 117924a041c5bSmacallan 117934a041c5bSmacallan# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 117944a041c5bSmacallan# loop where config.status creates the headers, so we can generate 117954a041c5bSmacallan# our stamp files there. 117964a041c5bSmacallanAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 117974a041c5bSmacallan[# Compute $1's index in $config_headers. 117984a041c5bSmacallan_am_arg=$1 117994a041c5bSmacallan_am_stamp_count=1 118004a041c5bSmacallanfor _am_header in $config_headers :; do 118014a041c5bSmacallan case $_am_header in 118024a041c5bSmacallan $_am_arg | $_am_arg:* ) 118034a041c5bSmacallan break ;; 118044a041c5bSmacallan * ) 118054a041c5bSmacallan _am_stamp_count=`expr $_am_stamp_count + 1` ;; 118064a041c5bSmacallan esac 118074a041c5bSmacallandone 118084a041c5bSmacallanecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 118094a041c5bSmacallan 118100a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118114a041c5bSmacallan# 118124a041c5bSmacallan# This file is free software; the Free Software Foundation 118134a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 118144a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 118154a041c5bSmacallan 118164a041c5bSmacallan# AM_PROG_INSTALL_SH 118174a041c5bSmacallan# ------------------ 118184a041c5bSmacallan# Define $install_sh. 118194a041c5bSmacallanAC_DEFUN([AM_PROG_INSTALL_SH], 118204a041c5bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 118210a392d7eSmrgif test x"${install_sh+set}" != xset; then 1182254b44505Smrg case $am_aux_dir in 1182354b44505Smrg *\ * | *\ *) 1182454b44505Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1182554b44505Smrg *) 1182654b44505Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 1182754b44505Smrg esac 1182854b44505Smrgfi 1182954b44505SmrgAC_SUBST([install_sh])]) 118304a041c5bSmacallan 118310a392d7eSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 118324a041c5bSmacallan# 118334a041c5bSmacallan# This file is free software; the Free Software Foundation 118344a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 118354a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 118364a041c5bSmacallan 118374a041c5bSmacallan# Check whether the underlying file-system supports filenames 118384a041c5bSmacallan# with a leading dot. For instance MS-DOS doesn't. 118394a041c5bSmacallanAC_DEFUN([AM_SET_LEADING_DOT], 118404a041c5bSmacallan[rm -rf .tst 2>/dev/null 118414a041c5bSmacallanmkdir .tst 2>/dev/null 118424a041c5bSmacallanif test -d .tst; then 118434a041c5bSmacallan am__leading_dot=. 118444a041c5bSmacallanelse 118454a041c5bSmacallan am__leading_dot=_ 118464a041c5bSmacallanfi 118474a041c5bSmacallanrmdir .tst 2>/dev/null 118484a041c5bSmacallanAC_SUBST([am__leading_dot])]) 118494a041c5bSmacallan 118504a041c5bSmacallan# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 118514a041c5bSmacallan# From Jim Meyering 118524a041c5bSmacallan 118530a392d7eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 118544a041c5bSmacallan# 118554a041c5bSmacallan# This file is free software; the Free Software Foundation 118564a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 118574a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 118584a041c5bSmacallan 1185954b44505Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1186054b44505Smrg# ---------------------------------- 1186154b44505Smrg# Control maintainer-specific portions of Makefiles. 1186254b44505Smrg# Default is to disable them, unless 'enable' is passed literally. 1186354b44505Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 1186454b44505Smrg# can override the default with the --enable/--disable switch. 118654a041c5bSmacallanAC_DEFUN([AM_MAINTAINER_MODE], 1186654b44505Smrg[m4_case(m4_default([$1], [disable]), 1186754b44505Smrg [enable], [m4_define([am_maintainer_other], [disable])], 1186854b44505Smrg [disable], [m4_define([am_maintainer_other], [enable])], 1186954b44505Smrg [m4_define([am_maintainer_other], [enable]) 1187054b44505Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1187154b44505SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1187254b44505Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1187354b44505Smrg AC_ARG_ENABLE([maintainer-mode], 1187454b44505Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 1187554b44505Smrg am_maintainer_other[ make rules and dependencies not useful 1187654b44505Smrg (and sometimes confusing) to the casual installer])], 1187754b44505Smrg [USE_MAINTAINER_MODE=$enableval], 1187854b44505Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 118794a041c5bSmacallan AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1188054b44505Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 118814a041c5bSmacallan MAINT=$MAINTAINER_MODE_TRUE 1188254b44505Smrg AC_SUBST([MAINT])dnl 118834a041c5bSmacallan] 118844a041c5bSmacallan) 118854a041c5bSmacallan 118864a041c5bSmacallan# Check to see how 'make' treats includes. -*- Autoconf -*- 118874a041c5bSmacallan 118880a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118894a041c5bSmacallan# 118904a041c5bSmacallan# This file is free software; the Free Software Foundation 118914a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 118924a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 118934a041c5bSmacallan 118944a041c5bSmacallan# AM_MAKE_INCLUDE() 118954a041c5bSmacallan# ----------------- 118964a041c5bSmacallan# Check to see how make treats includes. 118974a041c5bSmacallanAC_DEFUN([AM_MAKE_INCLUDE], 118984a041c5bSmacallan[am_make=${MAKE-make} 118994a041c5bSmacallancat > confinc << 'END' 119004a041c5bSmacallanam__doit: 1190154b44505Smrg @echo this is the am__doit target 119024a041c5bSmacallan.PHONY: am__doit 119034a041c5bSmacallanEND 119044a041c5bSmacallan# If we don't find an include directive, just comment out the code. 119054a041c5bSmacallanAC_MSG_CHECKING([for style of include used by $am_make]) 119064a041c5bSmacallanam__include="#" 119074a041c5bSmacallanam__quote= 119084a041c5bSmacallan_am_result=none 119094a041c5bSmacallan# First try GNU make style include. 119104a041c5bSmacallanecho "include confinc" > confmf 1191154b44505Smrg# Ignore all kinds of additional output from 'make'. 1191254b44505Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 1191354b44505Smrg*the\ am__doit\ target*) 1191454b44505Smrg am__include=include 1191554b44505Smrg am__quote= 1191654b44505Smrg _am_result=GNU 1191754b44505Smrg ;; 1191854b44505Smrgesac 119194a041c5bSmacallan# Now try BSD make style include. 119204a041c5bSmacallanif test "$am__include" = "#"; then 119214a041c5bSmacallan echo '.include "confinc"' > confmf 1192254b44505Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 1192354b44505Smrg *the\ am__doit\ target*) 1192454b44505Smrg am__include=.include 1192554b44505Smrg am__quote="\"" 1192654b44505Smrg _am_result=BSD 1192754b44505Smrg ;; 1192854b44505Smrg esac 119294a041c5bSmacallanfi 119304a041c5bSmacallanAC_SUBST([am__include]) 119314a041c5bSmacallanAC_SUBST([am__quote]) 119324a041c5bSmacallanAC_MSG_RESULT([$_am_result]) 119334a041c5bSmacallanrm -f confinc confmf 119344a041c5bSmacallan]) 119354a041c5bSmacallan 119364a041c5bSmacallan# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 119374a041c5bSmacallan 119380a392d7eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 119394a041c5bSmacallan# 119404a041c5bSmacallan# This file is free software; the Free Software Foundation 119414a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 119424a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 119434a041c5bSmacallan 119444a041c5bSmacallan# AM_MISSING_PROG(NAME, PROGRAM) 119454a041c5bSmacallan# ------------------------------ 119464a041c5bSmacallanAC_DEFUN([AM_MISSING_PROG], 119474a041c5bSmacallan[AC_REQUIRE([AM_MISSING_HAS_RUN]) 119484a041c5bSmacallan$1=${$1-"${am_missing_run}$2"} 119494a041c5bSmacallanAC_SUBST($1)]) 119504a041c5bSmacallan 119514a041c5bSmacallan# AM_MISSING_HAS_RUN 119524a041c5bSmacallan# ------------------ 119530a392d7eSmrg# Define MISSING if not defined so far and test if it is modern enough. 119540a392d7eSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 119554a041c5bSmacallanAC_DEFUN([AM_MISSING_HAS_RUN], 119564a041c5bSmacallan[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119574a041c5bSmacallanAC_REQUIRE_AUX_FILE([missing])dnl 1195854b44505Smrgif test x"${MISSING+set}" != xset; then 1195954b44505Smrg case $am_aux_dir in 1196054b44505Smrg *\ * | *\ *) 1196154b44505Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1196254b44505Smrg *) 1196354b44505Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1196454b44505Smrg esac 1196554b44505Smrgfi 119664a041c5bSmacallan# Use eval to expand $SHELL 119670a392d7eSmrgif eval "$MISSING --is-lightweight"; then 119680a392d7eSmrg am_missing_run="$MISSING " 119694a041c5bSmacallanelse 119704a041c5bSmacallan am_missing_run= 1197154b44505Smrg AC_MSG_WARN(['missing' script is too old or missing]) 119724a041c5bSmacallanfi 119734a041c5bSmacallan]) 119744a041c5bSmacallan 119754a041c5bSmacallan# Helper functions for option handling. -*- Autoconf -*- 119764a041c5bSmacallan 119770a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 119784a041c5bSmacallan# 119794a041c5bSmacallan# This file is free software; the Free Software Foundation 119804a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 119814a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 119824a041c5bSmacallan 119834a041c5bSmacallan# _AM_MANGLE_OPTION(NAME) 119844a041c5bSmacallan# ----------------------- 119854a041c5bSmacallanAC_DEFUN([_AM_MANGLE_OPTION], 119864a041c5bSmacallan[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 119874a041c5bSmacallan 119884a041c5bSmacallan# _AM_SET_OPTION(NAME) 1198954b44505Smrg# -------------------- 119904a041c5bSmacallan# Set option NAME. Presently that only means defining a flag for this option. 119914a041c5bSmacallanAC_DEFUN([_AM_SET_OPTION], 1199254b44505Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 119934a041c5bSmacallan 119944a041c5bSmacallan# _AM_SET_OPTIONS(OPTIONS) 1199554b44505Smrg# ------------------------ 119964a041c5bSmacallan# OPTIONS is a space-separated list of Automake options. 119974a041c5bSmacallanAC_DEFUN([_AM_SET_OPTIONS], 1199854b44505Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 119994a041c5bSmacallan 120004a041c5bSmacallan# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 120014a041c5bSmacallan# ------------------------------------------- 120024a041c5bSmacallan# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 120034a041c5bSmacallanAC_DEFUN([_AM_IF_OPTION], 120044a041c5bSmacallan[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 120054a041c5bSmacallan 120060a392d7eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 120070a392d7eSmrg# 120080a392d7eSmrg# This file is free software; the Free Software Foundation 120090a392d7eSmrg# gives unlimited permission to copy and/or distribute it, 120100a392d7eSmrg# with or without modifications, as long as this notice is preserved. 120110a392d7eSmrg 120120a392d7eSmrg# _AM_PROG_CC_C_O 120130a392d7eSmrg# --------------- 120140a392d7eSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 120150a392d7eSmrg# to automatically call this. 120160a392d7eSmrgAC_DEFUN([_AM_PROG_CC_C_O], 120170a392d7eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120180a392d7eSmrgAC_REQUIRE_AUX_FILE([compile])dnl 120190a392d7eSmrgAC_LANG_PUSH([C])dnl 120200a392d7eSmrgAC_CACHE_CHECK( 120210a392d7eSmrg [whether $CC understands -c and -o together], 120220a392d7eSmrg [am_cv_prog_cc_c_o], 120230a392d7eSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 120240a392d7eSmrg # Make sure it works both with $CC and with simple cc. 120250a392d7eSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 120260a392d7eSmrg # compilers refuse to overwrite an existing .o file with -o, 120270a392d7eSmrg # though they will create one. 120280a392d7eSmrg am_cv_prog_cc_c_o=yes 120290a392d7eSmrg for am_i in 1 2; do 120300a392d7eSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 120310a392d7eSmrg && test -f conftest2.$ac_objext; then 120320a392d7eSmrg : OK 120330a392d7eSmrg else 120340a392d7eSmrg am_cv_prog_cc_c_o=no 120350a392d7eSmrg break 120360a392d7eSmrg fi 120370a392d7eSmrg done 120380a392d7eSmrg rm -f core conftest* 120390a392d7eSmrg unset am_i]) 120400a392d7eSmrgif test "$am_cv_prog_cc_c_o" != yes; then 120410a392d7eSmrg # Losing compiler, so override with the script. 120420a392d7eSmrg # FIXME: It is wrong to rewrite CC. 120430a392d7eSmrg # But if we don't then we get into trouble of one sort or another. 120440a392d7eSmrg # A longer-term fix would be to have automake use am__CC in this case, 120450a392d7eSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 120460a392d7eSmrg CC="$am_aux_dir/compile $CC" 120470a392d7eSmrgfi 120480a392d7eSmrgAC_LANG_POP([C])]) 120490a392d7eSmrg 120500a392d7eSmrg# For backward compatibility. 120510a392d7eSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 120520a392d7eSmrg 120530a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 120540a392d7eSmrg# 120550a392d7eSmrg# This file is free software; the Free Software Foundation 120560a392d7eSmrg# gives unlimited permission to copy and/or distribute it, 120570a392d7eSmrg# with or without modifications, as long as this notice is preserved. 120580a392d7eSmrg 120590a392d7eSmrg# AM_RUN_LOG(COMMAND) 120600a392d7eSmrg# ------------------- 120610a392d7eSmrg# Run COMMAND, save the exit status in ac_status, and log it. 120620a392d7eSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 120630a392d7eSmrgAC_DEFUN([AM_RUN_LOG], 120640a392d7eSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 120650a392d7eSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 120660a392d7eSmrg ac_status=$? 120670a392d7eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 120680a392d7eSmrg (exit $ac_status); }]) 120690a392d7eSmrg 120704a041c5bSmacallan# Check to make sure that the build environment is sane. -*- Autoconf -*- 120714a041c5bSmacallan 120720a392d7eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 120734a041c5bSmacallan# 120744a041c5bSmacallan# This file is free software; the Free Software Foundation 120754a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 120764a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 120774a041c5bSmacallan 120784a041c5bSmacallan# AM_SANITY_CHECK 120794a041c5bSmacallan# --------------- 120804a041c5bSmacallanAC_DEFUN([AM_SANITY_CHECK], 120814a041c5bSmacallan[AC_MSG_CHECKING([whether build environment is sane]) 1208254b44505Smrg# Reject unsafe characters in $srcdir or the absolute working directory 1208354b44505Smrg# name. Accept space and tab only in the latter. 1208454b44505Smrgam_lf=' 1208554b44505Smrg' 1208654b44505Smrgcase `pwd` in 1208754b44505Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1208854b44505Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1208954b44505Smrgesac 1209054b44505Smrgcase $srcdir in 1209154b44505Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1209254b44505Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1209354b44505Smrgesac 1209454b44505Smrg 1209554b44505Smrg# Do 'set' in a subshell so we don't clobber the current shell's 120964a041c5bSmacallan# arguments. Must try -L first in case configure is actually a 120974a041c5bSmacallan# symlink; some systems play weird games with the mod time of symlinks 120984a041c5bSmacallan# (eg FreeBSD returns the mod time of the symlink's containing 120994a041c5bSmacallan# directory). 121004a041c5bSmacallanif ( 1210154b44505Smrg am_has_slept=no 1210254b44505Smrg for am_try in 1 2; do 1210354b44505Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 1210454b44505Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1210554b44505Smrg if test "$[*]" = "X"; then 1210654b44505Smrg # -L didn't work. 1210754b44505Smrg set X `ls -t "$srcdir/configure" conftest.file` 1210854b44505Smrg fi 1210954b44505Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1211054b44505Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1211154b44505Smrg 1211254b44505Smrg # If neither matched, then we have a broken ls. This can happen 1211354b44505Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1211454b44505Smrg # broken ls alias from the environment. This has actually 1211554b44505Smrg # happened. Such a system could not be considered "sane". 1211654b44505Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1211754b44505Smrg alias in your environment]) 1211854b44505Smrg fi 1211954b44505Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1212054b44505Smrg break 1212154b44505Smrg fi 1212254b44505Smrg # Just in case. 1212354b44505Smrg sleep 1 1212454b44505Smrg am_has_slept=yes 1212554b44505Smrg done 121264a041c5bSmacallan test "$[2]" = conftest.file 121274a041c5bSmacallan ) 121284a041c5bSmacallanthen 121294a041c5bSmacallan # Ok. 121304a041c5bSmacallan : 121314a041c5bSmacallanelse 121324a041c5bSmacallan AC_MSG_ERROR([newly created file is older than distributed files! 121334a041c5bSmacallanCheck your system clock]) 121344a041c5bSmacallanfi 1213554b44505SmrgAC_MSG_RESULT([yes]) 1213654b44505Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1213754b44505Smrg# generated files are strictly newer. 1213854b44505Smrgam_sleep_pid= 1213954b44505Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1214054b44505Smrg ( sleep 1 ) & 1214154b44505Smrg am_sleep_pid=$! 1214254b44505Smrgfi 1214354b44505SmrgAC_CONFIG_COMMANDS_PRE( 1214454b44505Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1214554b44505Smrg if test -n "$am_sleep_pid"; then 1214654b44505Smrg # Hide warnings about reused PIDs. 1214754b44505Smrg wait $am_sleep_pid 2>/dev/null 1214854b44505Smrg fi 1214954b44505Smrg AC_MSG_RESULT([done])]) 1215054b44505Smrgrm -f conftest.file 1215154b44505Smrg]) 1215254b44505Smrg 121530a392d7eSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 1215454b44505Smrg# 1215554b44505Smrg# This file is free software; the Free Software Foundation 1215654b44505Smrg# gives unlimited permission to copy and/or distribute it, 1215754b44505Smrg# with or without modifications, as long as this notice is preserved. 1215854b44505Smrg 1215954b44505Smrg# AM_SILENT_RULES([DEFAULT]) 1216054b44505Smrg# -------------------------- 1216154b44505Smrg# Enable less verbose build rules; with the default set to DEFAULT 1216254b44505Smrg# ("yes" being less verbose, "no" or empty being verbose). 1216354b44505SmrgAC_DEFUN([AM_SILENT_RULES], 1216454b44505Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1216554b44505SmrgAS_HELP_STRING( 1216654b44505Smrg [--enable-silent-rules], 1216754b44505Smrg [less verbose build output (undo: "make V=1")]) 1216854b44505SmrgAS_HELP_STRING( 1216954b44505Smrg [--disable-silent-rules], 1217054b44505Smrg [verbose build output (undo: "make V=0")])dnl 1217154b44505Smrg]) 1217254b44505Smrgcase $enable_silent_rules in @%:@ ((( 1217354b44505Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1217454b44505Smrg no) AM_DEFAULT_VERBOSITY=1;; 1217554b44505Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1217654b44505Smrgesac 1217754b44505Smrgdnl 1217854b44505Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1217954b44505Smrgdnl do not support nested variable expansions. 1218054b44505Smrgdnl See automake bug#9928 and bug#10237. 1218154b44505Smrgam_make=${MAKE-make} 1218254b44505SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1218354b44505Smrg [am_cv_make_support_nested_variables], 1218454b44505Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1218554b44505SmrgBAR0=false 1218654b44505SmrgBAR1=true 1218754b44505SmrgV=1 1218854b44505Smrgam__doit: 1218954b44505Smrg @$(TRUE) 1219054b44505Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1219154b44505Smrg am_cv_make_support_nested_variables=yes 1219254b44505Smrgelse 1219354b44505Smrg am_cv_make_support_nested_variables=no 1219454b44505Smrgfi]) 1219554b44505Smrgif test $am_cv_make_support_nested_variables = yes; then 1219654b44505Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1219754b44505Smrg AM_V='$(V)' 1219854b44505Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1219954b44505Smrgelse 1220054b44505Smrg AM_V=$AM_DEFAULT_VERBOSITY 1220154b44505Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1220254b44505Smrgfi 1220354b44505SmrgAC_SUBST([AM_V])dnl 1220454b44505SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1220554b44505SmrgAC_SUBST([AM_DEFAULT_V])dnl 1220654b44505SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1220754b44505SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1220854b44505SmrgAM_BACKSLASH='\' 1220954b44505SmrgAC_SUBST([AM_BACKSLASH])dnl 1221054b44505Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1221154b44505Smrg]) 122124a041c5bSmacallan 122130a392d7eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 122144a041c5bSmacallan# 122154a041c5bSmacallan# This file is free software; the Free Software Foundation 122164a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 122174a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 122184a041c5bSmacallan 122194a041c5bSmacallan# AM_PROG_INSTALL_STRIP 122204a041c5bSmacallan# --------------------- 1222154b44505Smrg# One issue with vendor 'install' (even GNU) is that you can't 122224a041c5bSmacallan# specify the program used to strip binaries. This is especially 122234a041c5bSmacallan# annoying in cross-compiling environments, where the build's strip 122244a041c5bSmacallan# is unlikely to handle the host's binaries. 122254a041c5bSmacallan# Fortunately install-sh will honor a STRIPPROG variable, so we 1222654b44505Smrg# always use install-sh in "make install-strip", and initialize 122274a041c5bSmacallan# STRIPPROG with the value of the STRIP variable (set by the user). 122284a041c5bSmacallanAC_DEFUN([AM_PROG_INSTALL_STRIP], 122294a041c5bSmacallan[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1223054b44505Smrg# Installed binaries are usually stripped using 'strip' when the user 1223154b44505Smrg# run "make install-strip". However 'strip' might not be the right 122324a041c5bSmacallan# tool to use in cross-compilation environments, therefore Automake 1223354b44505Smrg# will honor the 'STRIP' environment variable to overrule this program. 1223454b44505Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 122354a041c5bSmacallanif test "$cross_compiling" != no; then 122364a041c5bSmacallan AC_CHECK_TOOL([STRIP], [strip], :) 122374a041c5bSmacallanfi 122384a041c5bSmacallanINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 122394a041c5bSmacallanAC_SUBST([INSTALL_STRIP_PROGRAM])]) 122404a041c5bSmacallan 122410a392d7eSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 122424a041c5bSmacallan# 122434a041c5bSmacallan# This file is free software; the Free Software Foundation 122444a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 122454a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 122464a041c5bSmacallan 122474a041c5bSmacallan# _AM_SUBST_NOTMAKE(VARIABLE) 122484a041c5bSmacallan# --------------------------- 122494a041c5bSmacallan# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 122504a041c5bSmacallan# This macro is traced by Automake. 122514a041c5bSmacallanAC_DEFUN([_AM_SUBST_NOTMAKE]) 122524a041c5bSmacallan 1225354b44505Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1225454b44505Smrg# -------------------------- 1225554b44505Smrg# Public sister of _AM_SUBST_NOTMAKE. 1225654b44505SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1225754b44505Smrg 122584a041c5bSmacallan# Check how to create a tarball. -*- Autoconf -*- 122594a041c5bSmacallan 122600a392d7eSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 122614a041c5bSmacallan# 122624a041c5bSmacallan# This file is free software; the Free Software Foundation 122634a041c5bSmacallan# gives unlimited permission to copy and/or distribute it, 122644a041c5bSmacallan# with or without modifications, as long as this notice is preserved. 122654a041c5bSmacallan 122664a041c5bSmacallan# _AM_PROG_TAR(FORMAT) 122674a041c5bSmacallan# -------------------- 122684a041c5bSmacallan# Check how to create a tarball in format FORMAT. 1226954b44505Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 122704a041c5bSmacallan# 122714a041c5bSmacallan# Substitute a variable $(am__tar) that is a command 122724a041c5bSmacallan# writing to stdout a FORMAT-tarball containing the directory 122734a041c5bSmacallan# $tardir. 122744a041c5bSmacallan# tardir=directory && $(am__tar) > result.tar 122754a041c5bSmacallan# 122764a041c5bSmacallan# Substitute a variable $(am__untar) that extract such 122774a041c5bSmacallan# a tarball read from stdin. 122784a041c5bSmacallan# $(am__untar) < result.tar 122790a392d7eSmrg# 122804a041c5bSmacallanAC_DEFUN([_AM_PROG_TAR], 1228154b44505Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1228254b44505Smrg# in the wild :-( We should find a proper way to deprecate it ... 1228354b44505SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 122840a392d7eSmrg 122850a392d7eSmrg# We'll loop over all known methods to create a tar archive until one works. 122864a041c5bSmacallan_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 122874a041c5bSmacallan 122880a392d7eSmrgm4_if([$1], [v7], 122890a392d7eSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 122900a392d7eSmrg 122910a392d7eSmrg [m4_case([$1], 122920a392d7eSmrg [ustar], 122930a392d7eSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 122940a392d7eSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 122950a392d7eSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 122960a392d7eSmrg # and bug#13588). 122970a392d7eSmrg am_max_uid=2097151 # 2^21 - 1 122980a392d7eSmrg am_max_gid=$am_max_uid 122990a392d7eSmrg # The $UID and $GID variables are not portable, so we need to resort 123000a392d7eSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 123010a392d7eSmrg # below are definitely unexpected, so allow the users to see them 123020a392d7eSmrg # (that is, avoid stderr redirection). 123030a392d7eSmrg am_uid=`id -u || echo unknown` 123040a392d7eSmrg am_gid=`id -g || echo unknown` 123050a392d7eSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 123060a392d7eSmrg if test $am_uid -le $am_max_uid; then 123070a392d7eSmrg AC_MSG_RESULT([yes]) 123080a392d7eSmrg else 123090a392d7eSmrg AC_MSG_RESULT([no]) 123100a392d7eSmrg _am_tools=none 123110a392d7eSmrg fi 123120a392d7eSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 123130a392d7eSmrg if test $am_gid -le $am_max_gid; then 123140a392d7eSmrg AC_MSG_RESULT([yes]) 123150a392d7eSmrg else 123160a392d7eSmrg AC_MSG_RESULT([no]) 123170a392d7eSmrg _am_tools=none 123180a392d7eSmrg fi], 123190a392d7eSmrg 123200a392d7eSmrg [pax], 123210a392d7eSmrg [], 123224a041c5bSmacallan 123230a392d7eSmrg [m4_fatal([Unknown tar format])]) 123240a392d7eSmrg 123250a392d7eSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 123260a392d7eSmrg 123270a392d7eSmrg # Go ahead even if we have the value already cached. We do so because we 123280a392d7eSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 123290a392d7eSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 123300a392d7eSmrg 123310a392d7eSmrg for _am_tool in $_am_tools; do 123320a392d7eSmrg case $_am_tool in 123330a392d7eSmrg gnutar) 123340a392d7eSmrg for _am_tar in tar gnutar gtar; do 123350a392d7eSmrg AM_RUN_LOG([$_am_tar --version]) && break 123360a392d7eSmrg done 123370a392d7eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 123380a392d7eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 123390a392d7eSmrg am__untar="$_am_tar -xf -" 123400a392d7eSmrg ;; 123410a392d7eSmrg plaintar) 123420a392d7eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 123430a392d7eSmrg # ustar tarball either. 123440a392d7eSmrg (tar --version) >/dev/null 2>&1 && continue 123450a392d7eSmrg am__tar='tar chf - "$$tardir"' 123460a392d7eSmrg am__tar_='tar chf - "$tardir"' 123470a392d7eSmrg am__untar='tar xf -' 123480a392d7eSmrg ;; 123490a392d7eSmrg pax) 123500a392d7eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 123510a392d7eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 123520a392d7eSmrg am__untar='pax -r' 123530a392d7eSmrg ;; 123540a392d7eSmrg cpio) 123550a392d7eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 123560a392d7eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 123570a392d7eSmrg am__untar='cpio -i -H $1 -d' 123580a392d7eSmrg ;; 123590a392d7eSmrg none) 123600a392d7eSmrg am__tar=false 123610a392d7eSmrg am__tar_=false 123620a392d7eSmrg am__untar=false 123630a392d7eSmrg ;; 123640a392d7eSmrg esac 123650a392d7eSmrg 123660a392d7eSmrg # If the value was cached, stop now. We just wanted to have am__tar 123670a392d7eSmrg # and am__untar set. 123680a392d7eSmrg test -n "${am_cv_prog_tar_$1}" && break 123690a392d7eSmrg 123700a392d7eSmrg # tar/untar a dummy directory, and stop if the command works. 123710a392d7eSmrg rm -rf conftest.dir 123720a392d7eSmrg mkdir conftest.dir 123730a392d7eSmrg echo GrepMe > conftest.dir/file 123740a392d7eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 123750a392d7eSmrg rm -rf conftest.dir 123760a392d7eSmrg if test -s conftest.tar; then 123770a392d7eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 123780a392d7eSmrg AM_RUN_LOG([cat conftest.dir/file]) 123790a392d7eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 123800a392d7eSmrg fi 123810a392d7eSmrg done 123824a041c5bSmacallan rm -rf conftest.dir 123834a041c5bSmacallan 123840a392d7eSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 123850a392d7eSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 123860a392d7eSmrg 123874a041c5bSmacallanAC_SUBST([am__tar]) 123884a041c5bSmacallanAC_SUBST([am__untar]) 123894a041c5bSmacallan]) # _AM_PROG_TAR 123904a041c5bSmacallan 12391