1cfa76ccdSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2e96acad6Smrg 3cfa76ccdSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4dbbd9e4bSmacallan 5dbbd9e4bSmacallan# This file is free software; the Free Software Foundation 6dbbd9e4bSmacallan# gives unlimited permission to copy and/or distribute it, 7dbbd9e4bSmacallan# with or without modifications, as long as this notice is preserved. 8dbbd9e4bSmacallan 9dbbd9e4bSmacallan# This program is distributed in the hope that it will be useful, 10dbbd9e4bSmacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11dbbd9e4bSmacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12dbbd9e4bSmacallan# PARTICULAR PURPOSE. 13dbbd9e4bSmacallan 14cfa76ccdSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15dbbd9e4bSmacallanm4_ifndef([AC_AUTOCONF_VERSION], 16dbbd9e4bSmacallan [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17cfa76ccdSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18cfa76ccdSmrg[m4_warning([this file was generated for autoconf 2.71. 19dbbd9e4bSmacallanYou have another version of autoconf. It may work, but is not guaranteed to. 20dbbd9e4bSmacallanIf you have problems, you may need to regenerate the build system entirely. 21e96acad6SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22dbbd9e4bSmacallan 23cfa76ccdSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24e96acad6Smrg# 25cfa76ccdSmrg# This file is free software; the Free Software Foundation 26cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 27cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 28e96acad6Smrg 29cfa76ccdSmrg# AM_AUTOMAKE_VERSION(VERSION) 30cfa76ccdSmrg# ---------------------------- 31cfa76ccdSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32cfa76ccdSmrg# generated from the m4 files accompanying Automake X.Y. 33cfa76ccdSmrg# (This private macro should not be called outside this file.) 34cfa76ccdSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35cfa76ccdSmrg[am__api_version='1.16' 36cfa76ccdSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37cfa76ccdSmrgdnl require some minimum version. Point them to the right macro. 38cfa76ccdSmrgm4_if([$1], [1.16.5], [], 39cfa76ccdSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40e96acad6Smrg]) 41dbbd9e4bSmacallan 42cfa76ccdSmrg# _AM_AUTOCONF_VERSION(VERSION) 43cfa76ccdSmrg# ----------------------------- 44cfa76ccdSmrg# aclocal traces this macro to find the Autoconf version. 45cfa76ccdSmrg# This is a private macro too. Using m4_define simplifies 46cfa76ccdSmrg# the logic in aclocal, which can simply ignore this definition. 47cfa76ccdSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48dbbd9e4bSmacallan 49cfa76ccdSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50cfa76ccdSmrg# ------------------------------- 51cfa76ccdSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52cfa76ccdSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53cfa76ccdSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54cfa76ccdSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55cfa76ccdSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56cfa76ccdSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57cfa76ccdSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58dbbd9e4bSmacallan 59cfa76ccdSmrg# Figure out how to run the assembler. -*- Autoconf -*- 60dbbd9e4bSmacallan 61cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62cfa76ccdSmrg# 63cfa76ccdSmrg# This file is free software; the Free Software Foundation 64cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 65cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 66dbbd9e4bSmacallan 67cfa76ccdSmrg# AM_PROG_AS 68cfa76ccdSmrg# ---------- 69cfa76ccdSmrgAC_DEFUN([AM_PROG_AS], 70cfa76ccdSmrg[# By default we simply use the C compiler to build assembly code. 71cfa76ccdSmrgAC_REQUIRE([AC_PROG_CC]) 72cfa76ccdSmrgtest "${CCAS+set}" = set || CCAS=$CC 73cfa76ccdSmrgtest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS 74cfa76ccdSmrgAC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) 75cfa76ccdSmrgAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) 76cfa76ccdSmrg_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl 77e96acad6Smrg]) 78e96acad6Smrg 79cfa76ccdSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 80e96acad6Smrg 81cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 82cfa76ccdSmrg# 83cfa76ccdSmrg# This file is free software; the Free Software Foundation 84cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 85cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 86e96acad6Smrg 87cfa76ccdSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 88cfa76ccdSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 89cfa76ccdSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 90cfa76ccdSmrg# 91cfa76ccdSmrg# Of course, Automake must honor this variable whenever it calls a 92cfa76ccdSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 93cfa76ccdSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 94cfa76ccdSmrg# depending on how configure is run. This is pretty annoying, since 95cfa76ccdSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 96cfa76ccdSmrg# source directory, any form will work fine, but in subdirectories a 97cfa76ccdSmrg# relative path needs to be adjusted first. 98cfa76ccdSmrg# 99cfa76ccdSmrg# $ac_aux_dir/missing 100cfa76ccdSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 101cfa76ccdSmrg# $top_srcdir/$ac_aux_dir/missing 102cfa76ccdSmrg# fails if $ac_aux_dir is absolute, 103cfa76ccdSmrg# fails when called from a subdirectory in a VPATH build with 104cfa76ccdSmrg# a relative $ac_aux_dir 105cfa76ccdSmrg# 106cfa76ccdSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 107cfa76ccdSmrg# are both prefixed by $srcdir. In an in-source build this is usually 108cfa76ccdSmrg# harmless because $srcdir is '.', but things will broke when you 109cfa76ccdSmrg# start a VPATH build or use an absolute $srcdir. 110cfa76ccdSmrg# 111cfa76ccdSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 112cfa76ccdSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 113cfa76ccdSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 114cfa76ccdSmrg# and then we would define $MISSING as 115cfa76ccdSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 116cfa76ccdSmrg# This will work as long as MISSING is not called from configure, because 117cfa76ccdSmrg# unfortunately $(top_srcdir) has no meaning in configure. 118cfa76ccdSmrg# However there are other variables, like CC, which are often used in 119cfa76ccdSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 120cfa76ccdSmrg# 121cfa76ccdSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 122cfa76ccdSmrg# absolute PATH. The drawback is that using absolute paths prevent a 123cfa76ccdSmrg# configured tree to be moved without reconfiguration. 124dbbd9e4bSmacallan 125cfa76ccdSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 126cfa76ccdSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 127cfa76ccdSmrg# Expand $ac_aux_dir to an absolute path. 128cfa76ccdSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 129cfa76ccdSmrg]) 130dbbd9e4bSmacallan 131cfa76ccdSmrg# AM_CONDITIONAL -*- Autoconf -*- 132dbbd9e4bSmacallan 133cfa76ccdSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 134cfa76ccdSmrg# 135cfa76ccdSmrg# This file is free software; the Free Software Foundation 136cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 137cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 138dbbd9e4bSmacallan 139cfa76ccdSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 140cfa76ccdSmrg# ------------------------------------- 141cfa76ccdSmrg# Define a conditional. 142cfa76ccdSmrgAC_DEFUN([AM_CONDITIONAL], 143cfa76ccdSmrg[AC_PREREQ([2.52])dnl 144cfa76ccdSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 145cfa76ccdSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 146cfa76ccdSmrgAC_SUBST([$1_TRUE])dnl 147cfa76ccdSmrgAC_SUBST([$1_FALSE])dnl 148cfa76ccdSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 149cfa76ccdSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 150cfa76ccdSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 151cfa76ccdSmrgif $2; then 152cfa76ccdSmrg $1_TRUE= 153cfa76ccdSmrg $1_FALSE='#' 154cfa76ccdSmrgelse 155cfa76ccdSmrg $1_TRUE='#' 156cfa76ccdSmrg $1_FALSE= 157cfa76ccdSmrgfi 158cfa76ccdSmrgAC_CONFIG_COMMANDS_PRE( 159cfa76ccdSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 160cfa76ccdSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 161cfa76ccdSmrgUsually this means the macro was only invoked conditionally.]]) 162cfa76ccdSmrgfi])]) 163dbbd9e4bSmacallan 164cfa76ccdSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 165cfa76ccdSmrg# 166cfa76ccdSmrg# This file is free software; the Free Software Foundation 167cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 168cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 169e96acad6Smrg 170e96acad6Smrg 171cfa76ccdSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 172cfa76ccdSmrg# written in clear, in which case automake, when reading aclocal.m4, 173cfa76ccdSmrg# will think it sees a *use*, and therefore will trigger all it's 174cfa76ccdSmrg# C support machinery. Also note that it means that autoscan, seeing 175cfa76ccdSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 176e96acad6Smrg 177e96acad6Smrg 178cfa76ccdSmrg# _AM_DEPENDENCIES(NAME) 179e96acad6Smrg# ---------------------- 180cfa76ccdSmrg# See how the compiler implements dependency checking. 181cfa76ccdSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 182cfa76ccdSmrg# We try a few techniques and use that to set a single cache variable. 183cfa76ccdSmrg# 184cfa76ccdSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 185cfa76ccdSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 186cfa76ccdSmrg# dependency, and given that the user is not expected to run this macro, 187cfa76ccdSmrg# just rely on AC_PROG_CC. 188cfa76ccdSmrgAC_DEFUN([_AM_DEPENDENCIES], 189cfa76ccdSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 190cfa76ccdSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 191cfa76ccdSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 192cfa76ccdSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 193e96acad6Smrg 194cfa76ccdSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 195cfa76ccdSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 196cfa76ccdSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 197cfa76ccdSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 198cfa76ccdSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 199cfa76ccdSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 200cfa76ccdSmrg [depcc="$$1" am_compiler_list=]) 201e96acad6Smrg 202cfa76ccdSmrgAC_CACHE_CHECK([dependency style of $depcc], 203cfa76ccdSmrg [am_cv_$1_dependencies_compiler_type], 204cfa76ccdSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 205cfa76ccdSmrg # We make a subdir and do the tests there. Otherwise we can end up 206cfa76ccdSmrg # making bogus files that we don't know about and never remove. For 207cfa76ccdSmrg # instance it was reported that on HP-UX the gcc test will end up 208cfa76ccdSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 209cfa76ccdSmrg # in D". 210cfa76ccdSmrg rm -rf conftest.dir 211cfa76ccdSmrg mkdir conftest.dir 212cfa76ccdSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 213cfa76ccdSmrg # using a relative directory. 214cfa76ccdSmrg cp "$am_depcomp" conftest.dir 215cfa76ccdSmrg cd conftest.dir 216cfa76ccdSmrg # We will build objects and dependencies in a subdirectory because 217cfa76ccdSmrg # it helps to detect inapplicable dependency modes. For instance 218cfa76ccdSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 219cfa76ccdSmrg # side effect of compilation, but ICC will put the dependencies in 220cfa76ccdSmrg # the current directory while Tru64 will put them in the object 221cfa76ccdSmrg # directory. 222cfa76ccdSmrg mkdir sub 223dbbd9e4bSmacallan 224cfa76ccdSmrg am_cv_$1_dependencies_compiler_type=none 225cfa76ccdSmrg if test "$am_compiler_list" = ""; then 226cfa76ccdSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 227cfa76ccdSmrg fi 228cfa76ccdSmrg am__universal=false 229cfa76ccdSmrg m4_case([$1], [CC], 230cfa76ccdSmrg [case " $depcc " in #( 231cfa76ccdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 232cfa76ccdSmrg esac], 233cfa76ccdSmrg [CXX], 234cfa76ccdSmrg [case " $depcc " in #( 235cfa76ccdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 236cfa76ccdSmrg esac]) 237dbbd9e4bSmacallan 238cfa76ccdSmrg for depmode in $am_compiler_list; do 239cfa76ccdSmrg # Setup a source with many dependencies, because some compilers 240cfa76ccdSmrg # like to wrap large dependency lists on column 80 (with \), and 241cfa76ccdSmrg # we should not choose a depcomp mode which is confused by this. 242cfa76ccdSmrg # 243cfa76ccdSmrg # We need to recreate these files for each test, as the compiler may 244cfa76ccdSmrg # overwrite some of them when testing with obscure command lines. 245cfa76ccdSmrg # This happens at least with the AIX C compiler. 246cfa76ccdSmrg : > sub/conftest.c 247cfa76ccdSmrg for i in 1 2 3 4 5 6; do 248cfa76ccdSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 249cfa76ccdSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 250cfa76ccdSmrg # Solaris 10 /bin/sh. 251cfa76ccdSmrg echo '/* dummy */' > sub/conftst$i.h 252cfa76ccdSmrg done 253cfa76ccdSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 254e96acad6Smrg 255cfa76ccdSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 256cfa76ccdSmrg # mode. It turns out that the SunPro C++ compiler does not properly 257cfa76ccdSmrg # handle '-M -o', and we need to detect this. Also, some Intel 258cfa76ccdSmrg # versions had trouble with output in subdirs. 259cfa76ccdSmrg am__obj=sub/conftest.${OBJEXT-o} 260cfa76ccdSmrg am__minus_obj="-o $am__obj" 261cfa76ccdSmrg case $depmode in 262cfa76ccdSmrg gcc) 263cfa76ccdSmrg # This depmode causes a compiler race in universal mode. 264cfa76ccdSmrg test "$am__universal" = false || continue 265cfa76ccdSmrg ;; 266cfa76ccdSmrg nosideeffect) 267cfa76ccdSmrg # After this tag, mechanisms are not by side-effect, so they'll 268cfa76ccdSmrg # only be used when explicitly requested. 269cfa76ccdSmrg if test "x$enable_dependency_tracking" = xyes; then 270cfa76ccdSmrg continue 271cfa76ccdSmrg else 272cfa76ccdSmrg break 273cfa76ccdSmrg fi 274cfa76ccdSmrg ;; 275cfa76ccdSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 276cfa76ccdSmrg # This compiler won't grok '-c -o', but also, the minuso test has 277cfa76ccdSmrg # not run yet. These depmodes are late enough in the game, and 278cfa76ccdSmrg # so weak that their functioning should not be impacted. 279cfa76ccdSmrg am__obj=conftest.${OBJEXT-o} 280cfa76ccdSmrg am__minus_obj= 281cfa76ccdSmrg ;; 282cfa76ccdSmrg none) break ;; 283cfa76ccdSmrg esac 284cfa76ccdSmrg if depmode=$depmode \ 285cfa76ccdSmrg source=sub/conftest.c object=$am__obj \ 286cfa76ccdSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 287cfa76ccdSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 288cfa76ccdSmrg >/dev/null 2>conftest.err && 289cfa76ccdSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 290cfa76ccdSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 291cfa76ccdSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 292cfa76ccdSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 293cfa76ccdSmrg # icc doesn't choke on unknown options, it will just issue warnings 294cfa76ccdSmrg # or remarks (even with -Werror). So we grep stderr for any message 295cfa76ccdSmrg # that says an option was ignored or not supported. 296cfa76ccdSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 297cfa76ccdSmrg # icc: Command line warning: ignoring option '-M'; no argument required 298cfa76ccdSmrg # The diagnosis changed in icc 8.0: 299cfa76ccdSmrg # icc: Command line remark: option '-MP' not supported 300cfa76ccdSmrg if (grep 'ignoring option' conftest.err || 301cfa76ccdSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 302cfa76ccdSmrg am_cv_$1_dependencies_compiler_type=$depmode 303cfa76ccdSmrg break 304cfa76ccdSmrg fi 305cfa76ccdSmrg fi 306cfa76ccdSmrg done 307dbbd9e4bSmacallan 308cfa76ccdSmrg cd .. 309cfa76ccdSmrg rm -rf conftest.dir 310cfa76ccdSmrgelse 311cfa76ccdSmrg am_cv_$1_dependencies_compiler_type=none 312cfa76ccdSmrgfi 313cfa76ccdSmrg]) 314cfa76ccdSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 315cfa76ccdSmrgAM_CONDITIONAL([am__fastdep$1], [ 316cfa76ccdSmrg test "x$enable_dependency_tracking" != xno \ 317cfa76ccdSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 318cfa76ccdSmrg]) 319dbbd9e4bSmacallan 320dbbd9e4bSmacallan 321cfa76ccdSmrg# AM_SET_DEPDIR 322cfa76ccdSmrg# ------------- 323cfa76ccdSmrg# Choose a directory name for dependency files. 324cfa76ccdSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 325cfa76ccdSmrgAC_DEFUN([AM_SET_DEPDIR], 326cfa76ccdSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 327cfa76ccdSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 328cfa76ccdSmrg]) 329dbbd9e4bSmacallan 330dbbd9e4bSmacallan 331cfa76ccdSmrg# AM_DEP_TRACK 332cfa76ccdSmrg# ------------ 333cfa76ccdSmrgAC_DEFUN([AM_DEP_TRACK], 334cfa76ccdSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 335cfa76ccdSmrgAS_HELP_STRING( 336cfa76ccdSmrg [--enable-dependency-tracking], 337cfa76ccdSmrg [do not reject slow dependency extractors]) 338cfa76ccdSmrgAS_HELP_STRING( 339cfa76ccdSmrg [--disable-dependency-tracking], 340cfa76ccdSmrg [speeds up one-time build])]) 341cfa76ccdSmrgif test "x$enable_dependency_tracking" != xno; then 342cfa76ccdSmrg am_depcomp="$ac_aux_dir/depcomp" 343cfa76ccdSmrg AMDEPBACKSLASH='\' 344cfa76ccdSmrg am__nodep='_no' 345cfa76ccdSmrgfi 346cfa76ccdSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 347cfa76ccdSmrgAC_SUBST([AMDEPBACKSLASH])dnl 348cfa76ccdSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 349cfa76ccdSmrgAC_SUBST([am__nodep])dnl 350cfa76ccdSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 351cfa76ccdSmrg]) 352dbbd9e4bSmacallan 353cfa76ccdSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 354dbbd9e4bSmacallan 355cfa76ccdSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 356cfa76ccdSmrg# 357cfa76ccdSmrg# This file is free software; the Free Software Foundation 358cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 359cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 360dbbd9e4bSmacallan 361cfa76ccdSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 362cfa76ccdSmrg# ------------------------------ 363cfa76ccdSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 364cfa76ccdSmrg[{ 365cfa76ccdSmrg # Older Autoconf quotes --file arguments for eval, but not when files 366cfa76ccdSmrg # are listed without --file. Let's play safe and only enable the eval 367cfa76ccdSmrg # if we detect the quoting. 368cfa76ccdSmrg # TODO: see whether this extra hack can be removed once we start 369cfa76ccdSmrg # requiring Autoconf 2.70 or later. 370cfa76ccdSmrg AS_CASE([$CONFIG_FILES], 371cfa76ccdSmrg [*\'*], [eval set x "$CONFIG_FILES"], 372cfa76ccdSmrg [*], [set x $CONFIG_FILES]) 373cfa76ccdSmrg shift 374cfa76ccdSmrg # Used to flag and report bootstrapping failures. 375cfa76ccdSmrg am_rc=0 376cfa76ccdSmrg for am_mf 377cfa76ccdSmrg do 378cfa76ccdSmrg # Strip MF so we end up with the name of the file. 379cfa76ccdSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 380cfa76ccdSmrg # Check whether this is an Automake generated Makefile which includes 381cfa76ccdSmrg # dependency-tracking related rules and includes. 382cfa76ccdSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 383cfa76ccdSmrg # limit of 2048, but all sed's we know have understand at least 4000. 384cfa76ccdSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 385cfa76ccdSmrg || continue 386cfa76ccdSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 387cfa76ccdSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 388cfa76ccdSmrg AM_RUN_LOG([cd "$am_dirpart" \ 389cfa76ccdSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 390cfa76ccdSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 391cfa76ccdSmrg done 392cfa76ccdSmrg if test $am_rc -ne 0; then 393cfa76ccdSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 394cfa76ccdSmrg for automatic dependency tracking. If GNU make was not used, consider 395cfa76ccdSmrg re-running the configure script with MAKE="gmake" (or whatever is 396cfa76ccdSmrg necessary). You can also try re-running configure with the 397cfa76ccdSmrg '--disable-dependency-tracking' option to at least be able to build 398cfa76ccdSmrg the package (albeit without support for automatic dependency tracking).]) 399dbbd9e4bSmacallan fi 400cfa76ccdSmrg AS_UNSET([am_dirpart]) 401cfa76ccdSmrg AS_UNSET([am_filepart]) 402cfa76ccdSmrg AS_UNSET([am_mf]) 403cfa76ccdSmrg AS_UNSET([am_rc]) 404cfa76ccdSmrg rm -f conftest-deps.mk 405cfa76ccdSmrg} 406cfa76ccdSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 407dbbd9e4bSmacallan 408dbbd9e4bSmacallan 409cfa76ccdSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 410cfa76ccdSmrg# ----------------------------- 411cfa76ccdSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 412cfa76ccdSmrg# 413cfa76ccdSmrg# This code is only required when automatic dependency tracking is enabled. 414cfa76ccdSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 415cfa76ccdSmrg# order to bootstrap the dependency handling code. 416cfa76ccdSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 417cfa76ccdSmrg[AC_CONFIG_COMMANDS([depfiles], 418cfa76ccdSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 419cfa76ccdSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 420dbbd9e4bSmacallan 421cfa76ccdSmrg# Do all the work for Automake. -*- Autoconf -*- 422dbbd9e4bSmacallan 423cfa76ccdSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 424cfa76ccdSmrg# 425cfa76ccdSmrg# This file is free software; the Free Software Foundation 426cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 427cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 428dbbd9e4bSmacallan 429cfa76ccdSmrg# This macro actually does too much. Some checks are only needed if 430cfa76ccdSmrg# your package does certain things. But this isn't really a big deal. 431dbbd9e4bSmacallan 432cfa76ccdSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 433cfa76ccdSmrgm4_define([AC_PROG_CC], 434cfa76ccdSmrgm4_defn([AC_PROG_CC]) 435cfa76ccdSmrg[_AM_PROG_CC_C_O 436e96acad6Smrg]) 437dbbd9e4bSmacallan 438cfa76ccdSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 439cfa76ccdSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 440cfa76ccdSmrg# ----------------------------------------------- 441cfa76ccdSmrg# The call with PACKAGE and VERSION arguments is the old style 442cfa76ccdSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 443cfa76ccdSmrg# and VERSION should now be passed to AC_INIT and removed from 444cfa76ccdSmrg# the call to AM_INIT_AUTOMAKE. 445cfa76ccdSmrg# We support both call styles for the transition. After 446cfa76ccdSmrg# the next Automake release, Autoconf can make the AC_INIT 447cfa76ccdSmrg# arguments mandatory, and then we can depend on a new Autoconf 448cfa76ccdSmrg# release and drop the old call support. 449cfa76ccdSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 450cfa76ccdSmrg[AC_PREREQ([2.65])dnl 451cfa76ccdSmrgm4_ifdef([_$0_ALREADY_INIT], 452cfa76ccdSmrg [m4_fatal([$0 expanded multiple times 453cfa76ccdSmrg]m4_defn([_$0_ALREADY_INIT]))], 454cfa76ccdSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 455cfa76ccdSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 456cfa76ccdSmrgdnl the ones we care about. 457cfa76ccdSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 458cfa76ccdSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 459cfa76ccdSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 460cfa76ccdSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 461cfa76ccdSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 462cfa76ccdSmrg # is not polluted with repeated "-I." 463cfa76ccdSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 464cfa76ccdSmrg # test to see if srcdir already configured 465cfa76ccdSmrg if test -f $srcdir/config.status; then 466cfa76ccdSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 467cfa76ccdSmrg fi 468cfa76ccdSmrgfi 469dbbd9e4bSmacallan 470cfa76ccdSmrg# test whether we have cygpath 471cfa76ccdSmrgif test -z "$CYGPATH_W"; then 472cfa76ccdSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 473cfa76ccdSmrg CYGPATH_W='cygpath -w' 474cfa76ccdSmrg else 475cfa76ccdSmrg CYGPATH_W=echo 476cfa76ccdSmrg fi 477cfa76ccdSmrgfi 478cfa76ccdSmrgAC_SUBST([CYGPATH_W]) 479e96acad6Smrg 480cfa76ccdSmrg# Define the identity of the package. 481cfa76ccdSmrgdnl Distinguish between old-style and new-style calls. 482cfa76ccdSmrgm4_ifval([$2], 483cfa76ccdSmrg[AC_DIAGNOSE([obsolete], 484cfa76ccdSmrg [$0: two- and three-arguments forms are deprecated.]) 485cfa76ccdSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 486cfa76ccdSmrg AC_SUBST([PACKAGE], [$1])dnl 487cfa76ccdSmrg AC_SUBST([VERSION], [$2])], 488cfa76ccdSmrg[_AM_SET_OPTIONS([$1])dnl 489cfa76ccdSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 490cfa76ccdSmrgm4_if( 491cfa76ccdSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 492cfa76ccdSmrg [ok:ok],, 493cfa76ccdSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 494cfa76ccdSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 495cfa76ccdSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 496e96acad6Smrg 497cfa76ccdSmrg_AM_IF_OPTION([no-define],, 498cfa76ccdSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 499cfa76ccdSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 500e96acad6Smrg 501cfa76ccdSmrg# Some tools Automake needs. 502cfa76ccdSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 503cfa76ccdSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 504cfa76ccdSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 505cfa76ccdSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 506cfa76ccdSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 507cfa76ccdSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 508cfa76ccdSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 509cfa76ccdSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 510cfa76ccdSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 511cfa76ccdSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 512cfa76ccdSmrg# For better backward compatibility. To be removed once Automake 1.9.x 513cfa76ccdSmrg# dies out for good. For more background, see: 514cfa76ccdSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 515cfa76ccdSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 516cfa76ccdSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 517cfa76ccdSmrg# We need awk for the "check" target (and possibly the TAP driver). The 518cfa76ccdSmrg# system "awk" is bad on some platforms. 519cfa76ccdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 520cfa76ccdSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 521cfa76ccdSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 522cfa76ccdSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 523cfa76ccdSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 524cfa76ccdSmrg [_AM_PROG_TAR([v7])])]) 525cfa76ccdSmrg_AM_IF_OPTION([no-dependencies],, 526cfa76ccdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 527cfa76ccdSmrg [_AM_DEPENDENCIES([CC])], 528cfa76ccdSmrg [m4_define([AC_PROG_CC], 529cfa76ccdSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 530cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 531cfa76ccdSmrg [_AM_DEPENDENCIES([CXX])], 532cfa76ccdSmrg [m4_define([AC_PROG_CXX], 533cfa76ccdSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 534cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 535cfa76ccdSmrg [_AM_DEPENDENCIES([OBJC])], 536cfa76ccdSmrg [m4_define([AC_PROG_OBJC], 537cfa76ccdSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 538cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 539cfa76ccdSmrg [_AM_DEPENDENCIES([OBJCXX])], 540cfa76ccdSmrg [m4_define([AC_PROG_OBJCXX], 541cfa76ccdSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 542e96acad6Smrg]) 543cfa76ccdSmrg# Variables for tags utilities; see am/tags.am 544cfa76ccdSmrgif test -z "$CTAGS"; then 545cfa76ccdSmrg CTAGS=ctags 546cfa76ccdSmrgfi 547cfa76ccdSmrgAC_SUBST([CTAGS]) 548cfa76ccdSmrgif test -z "$ETAGS"; then 549cfa76ccdSmrg ETAGS=etags 550cfa76ccdSmrgfi 551cfa76ccdSmrgAC_SUBST([ETAGS]) 552cfa76ccdSmrgif test -z "$CSCOPE"; then 553cfa76ccdSmrg CSCOPE=cscope 554cfa76ccdSmrgfi 555cfa76ccdSmrgAC_SUBST([CSCOPE]) 556dbbd9e4bSmacallan 557cfa76ccdSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 558cfa76ccdSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 559cfa76ccdSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 560cfa76ccdSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 561cfa76ccdSmrgAC_CONFIG_COMMANDS_PRE(dnl 562cfa76ccdSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 563cfa76ccdSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 564dbbd9e4bSmacallan 565cfa76ccdSmrg# POSIX will say in a future version that running "rm -f" with no argument 566cfa76ccdSmrg# is OK; and we want to be able to make that assumption in our Makefile 567cfa76ccdSmrg# recipes. So use an aggressive probe to check that the usage we want is 568cfa76ccdSmrg# actually supported "in the wild" to an acceptable degree. 569cfa76ccdSmrg# See automake bug#10828. 570cfa76ccdSmrg# To make any issue more visible, cause the running configure to be aborted 571cfa76ccdSmrg# by default if the 'rm' program in use doesn't match our expectations; the 572cfa76ccdSmrg# user can still override this though. 573cfa76ccdSmrgif rm -f && rm -fr && rm -rf; then : OK; else 574cfa76ccdSmrg cat >&2 <<'END' 575cfa76ccdSmrgOops! 576cfa76ccdSmrg 577cfa76ccdSmrgYour 'rm' program seems unable to run without file operands specified 578cfa76ccdSmrgon the command line, even when the '-f' option is present. This is contrary 579cfa76ccdSmrgto the behaviour of most rm programs out there, and not conforming with 580cfa76ccdSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 581cfa76ccdSmrg 582cfa76ccdSmrgPlease tell bug-automake@gnu.org about your system, including the value 583cfa76ccdSmrgof your $PATH and any error possibly output before this message. This 584cfa76ccdSmrgcan help us improve future automake versions. 585e96acad6Smrg 586cfa76ccdSmrgEND 587cfa76ccdSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 588cfa76ccdSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 589cfa76ccdSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 590cfa76ccdSmrg echo >&2 591cfa76ccdSmrg else 592cfa76ccdSmrg cat >&2 <<'END' 593cfa76ccdSmrgAborting the configuration process, to ensure you take notice of the issue. 594e96acad6Smrg 595cfa76ccdSmrgYou can download and install GNU coreutils to get an 'rm' implementation 596cfa76ccdSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 597e96acad6Smrg 598cfa76ccdSmrgIf you want to complete the configuration process using your problematic 599cfa76ccdSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 600cfa76ccdSmrgto "yes", and re-run configure. 601e96acad6Smrg 602cfa76ccdSmrgEND 603cfa76ccdSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 604cfa76ccdSmrg fi 605cfa76ccdSmrgfi 606cfa76ccdSmrgdnl The trailing newline in this macro's definition is deliberate, for 607cfa76ccdSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 608cfa76ccdSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 609dbbd9e4bSmacallan]) 610dbbd9e4bSmacallan 611cfa76ccdSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 612cfa76ccdSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 613cfa76ccdSmrgdnl mangled by Autoconf and run in a shell conditional statement. 614cfa76ccdSmrgm4_define([_AC_COMPILER_EXEEXT], 615cfa76ccdSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 616dbbd9e4bSmacallan 617cfa76ccdSmrg# When config.status generates a header, we must update the stamp-h file. 618cfa76ccdSmrg# This file resides in the same directory as the config header 619cfa76ccdSmrg# that is generated. The stamp files are numbered to have different names. 620dbbd9e4bSmacallan 621cfa76ccdSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 622cfa76ccdSmrg# loop where config.status creates the headers, so we can generate 623cfa76ccdSmrg# our stamp files there. 624cfa76ccdSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 625cfa76ccdSmrg[# Compute $1's index in $config_headers. 626cfa76ccdSmrg_am_arg=$1 627cfa76ccdSmrg_am_stamp_count=1 628cfa76ccdSmrgfor _am_header in $config_headers :; do 629cfa76ccdSmrg case $_am_header in 630cfa76ccdSmrg $_am_arg | $_am_arg:* ) 631cfa76ccdSmrg break ;; 632cfa76ccdSmrg * ) 633cfa76ccdSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 634cfa76ccdSmrg esac 635cfa76ccdSmrgdone 636cfa76ccdSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 637dbbd9e4bSmacallan 638cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 639cfa76ccdSmrg# 640cfa76ccdSmrg# This file is free software; the Free Software Foundation 641cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 642cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 643dbbd9e4bSmacallan 644cfa76ccdSmrg# AM_PROG_INSTALL_SH 645cfa76ccdSmrg# ------------------ 646cfa76ccdSmrg# Define $install_sh. 647cfa76ccdSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 648cfa76ccdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 649cfa76ccdSmrgif test x"${install_sh+set}" != xset; then 650cfa76ccdSmrg case $am_aux_dir in 651cfa76ccdSmrg *\ * | *\ *) 652cfa76ccdSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 653cfa76ccdSmrg *) 654cfa76ccdSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 655cfa76ccdSmrg esac 656cfa76ccdSmrgfi 657cfa76ccdSmrgAC_SUBST([install_sh])]) 658dbbd9e4bSmacallan 659cfa76ccdSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 660cfa76ccdSmrg# 661cfa76ccdSmrg# This file is free software; the Free Software Foundation 662cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 663cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 664dbbd9e4bSmacallan 665cfa76ccdSmrg# Check whether the underlying file-system supports filenames 666cfa76ccdSmrg# with a leading dot. For instance MS-DOS doesn't. 667cfa76ccdSmrgAC_DEFUN([AM_SET_LEADING_DOT], 668cfa76ccdSmrg[rm -rf .tst 2>/dev/null 669cfa76ccdSmrgmkdir .tst 2>/dev/null 670cfa76ccdSmrgif test -d .tst; then 671cfa76ccdSmrg am__leading_dot=. 672cfa76ccdSmrgelse 673cfa76ccdSmrg am__leading_dot=_ 674cfa76ccdSmrgfi 675cfa76ccdSmrgrmdir .tst 2>/dev/null 676cfa76ccdSmrgAC_SUBST([am__leading_dot])]) 677dbbd9e4bSmacallan 678cfa76ccdSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 679cfa76ccdSmrg# From Jim Meyering 680dbbd9e4bSmacallan 681cfa76ccdSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 682cfa76ccdSmrg# 683cfa76ccdSmrg# This file is free software; the Free Software Foundation 684cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 685cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 686dbbd9e4bSmacallan 687cfa76ccdSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 688cfa76ccdSmrg# ---------------------------------- 689cfa76ccdSmrg# Control maintainer-specific portions of Makefiles. 690cfa76ccdSmrg# Default is to disable them, unless 'enable' is passed literally. 691cfa76ccdSmrg# For symmetry, 'disable' may be passed as well. Anyway, the user 692cfa76ccdSmrg# can override the default with the --enable/--disable switch. 693cfa76ccdSmrgAC_DEFUN([AM_MAINTAINER_MODE], 694cfa76ccdSmrg[m4_case(m4_default([$1], [disable]), 695cfa76ccdSmrg [enable], [m4_define([am_maintainer_other], [disable])], 696cfa76ccdSmrg [disable], [m4_define([am_maintainer_other], [enable])], 697cfa76ccdSmrg [m4_define([am_maintainer_other], [enable]) 698cfa76ccdSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 699cfa76ccdSmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 700cfa76ccdSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 701cfa76ccdSmrg AC_ARG_ENABLE([maintainer-mode], 702cfa76ccdSmrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 703cfa76ccdSmrg am_maintainer_other[ make rules and dependencies not useful 704cfa76ccdSmrg (and sometimes confusing) to the casual installer])], 705cfa76ccdSmrg [USE_MAINTAINER_MODE=$enableval], 706cfa76ccdSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 707cfa76ccdSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 708cfa76ccdSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 709cfa76ccdSmrg MAINT=$MAINTAINER_MODE_TRUE 710cfa76ccdSmrg AC_SUBST([MAINT])dnl 711cfa76ccdSmrg] 712cfa76ccdSmrg) 713dbbd9e4bSmacallan 714cfa76ccdSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 715dbbd9e4bSmacallan 716cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 717cfa76ccdSmrg# 718cfa76ccdSmrg# This file is free software; the Free Software Foundation 719cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 720cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 721dbbd9e4bSmacallan 722cfa76ccdSmrg# AM_MAKE_INCLUDE() 723cfa76ccdSmrg# ----------------- 724cfa76ccdSmrg# Check whether make has an 'include' directive that can support all 725cfa76ccdSmrg# the idioms we need for our automatic dependency tracking code. 726cfa76ccdSmrgAC_DEFUN([AM_MAKE_INCLUDE], 727cfa76ccdSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 728cfa76ccdSmrgcat > confinc.mk << 'END' 729cfa76ccdSmrgam__doit: 730cfa76ccdSmrg @echo this is the am__doit target >confinc.out 731cfa76ccdSmrg.PHONY: am__doit 732cfa76ccdSmrgEND 733cfa76ccdSmrgam__include="#" 734cfa76ccdSmrgam__quote= 735cfa76ccdSmrg# BSD make does it like this. 736cfa76ccdSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 737cfa76ccdSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 738cfa76ccdSmrgecho 'include confinc.mk # ignored' > confmf.GNU 739cfa76ccdSmrg_am_result=no 740cfa76ccdSmrgfor s in GNU BSD; do 741cfa76ccdSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 742cfa76ccdSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 743cfa76ccdSmrg ['0:this is the am__doit target'], 744cfa76ccdSmrg [AS_CASE([$s], 745cfa76ccdSmrg [BSD], [am__include='.include' am__quote='"'], 746cfa76ccdSmrg [am__include='include' am__quote=''])]) 747cfa76ccdSmrg if test "$am__include" != "#"; then 748cfa76ccdSmrg _am_result="yes ($s style)" 749cfa76ccdSmrg break 750cfa76ccdSmrg fi 751cfa76ccdSmrgdone 752cfa76ccdSmrgrm -f confinc.* confmf.* 753cfa76ccdSmrgAC_MSG_RESULT([${_am_result}]) 754cfa76ccdSmrgAC_SUBST([am__include])]) 755cfa76ccdSmrgAC_SUBST([am__quote])]) 756dbbd9e4bSmacallan 757cfa76ccdSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 758cfa76ccdSmrg 759cfa76ccdSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 760e96acad6Smrg# 761cfa76ccdSmrg# This file is free software; the Free Software Foundation 762cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 763cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 764dbbd9e4bSmacallan 765cfa76ccdSmrg# AM_MISSING_PROG(NAME, PROGRAM) 766cfa76ccdSmrg# ------------------------------ 767cfa76ccdSmrgAC_DEFUN([AM_MISSING_PROG], 768cfa76ccdSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 769cfa76ccdSmrg$1=${$1-"${am_missing_run}$2"} 770cfa76ccdSmrgAC_SUBST($1)]) 771e96acad6Smrg 772cfa76ccdSmrg# AM_MISSING_HAS_RUN 773cfa76ccdSmrg# ------------------ 774cfa76ccdSmrg# Define MISSING if not defined so far and test if it is modern enough. 775cfa76ccdSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 776cfa76ccdSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 777cfa76ccdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778cfa76ccdSmrgAC_REQUIRE_AUX_FILE([missing])dnl 779cfa76ccdSmrgif test x"${MISSING+set}" != xset; then 780cfa76ccdSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 781cfa76ccdSmrgfi 782cfa76ccdSmrg# Use eval to expand $SHELL 783cfa76ccdSmrgif eval "$MISSING --is-lightweight"; then 784cfa76ccdSmrg am_missing_run="$MISSING " 785cfa76ccdSmrgelse 786cfa76ccdSmrg am_missing_run= 787cfa76ccdSmrg AC_MSG_WARN(['missing' script is too old or missing]) 788cfa76ccdSmrgfi 789e96acad6Smrg]) 790e96acad6Smrg 791cfa76ccdSmrg# Helper functions for option handling. -*- Autoconf -*- 792e96acad6Smrg 793cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 794e96acad6Smrg# 795cfa76ccdSmrg# This file is free software; the Free Software Foundation 796cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 797cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 798e96acad6Smrg 799cfa76ccdSmrg# _AM_MANGLE_OPTION(NAME) 800e96acad6Smrg# ----------------------- 801cfa76ccdSmrgAC_DEFUN([_AM_MANGLE_OPTION], 802cfa76ccdSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 803e96acad6Smrg 804cfa76ccdSmrg# _AM_SET_OPTION(NAME) 805cfa76ccdSmrg# -------------------- 806cfa76ccdSmrg# Set option NAME. Presently that only means defining a flag for this option. 807cfa76ccdSmrgAC_DEFUN([_AM_SET_OPTION], 808cfa76ccdSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 809e96acad6Smrg 810cfa76ccdSmrg# _AM_SET_OPTIONS(OPTIONS) 811cfa76ccdSmrg# ------------------------ 812cfa76ccdSmrg# OPTIONS is a space-separated list of Automake options. 813cfa76ccdSmrgAC_DEFUN([_AM_SET_OPTIONS], 814cfa76ccdSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 815e96acad6Smrg 816cfa76ccdSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 817cfa76ccdSmrg# ------------------------------------------- 818cfa76ccdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 819cfa76ccdSmrgAC_DEFUN([_AM_IF_OPTION], 820cfa76ccdSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 821e96acad6Smrg 822cfa76ccdSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 823cfa76ccdSmrg# 824cfa76ccdSmrg# This file is free software; the Free Software Foundation 825cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 826cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 827e96acad6Smrg 828cfa76ccdSmrg# _AM_PROG_CC_C_O 829cfa76ccdSmrg# --------------- 830cfa76ccdSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 831cfa76ccdSmrg# to automatically call this. 832cfa76ccdSmrgAC_DEFUN([_AM_PROG_CC_C_O], 833cfa76ccdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 834cfa76ccdSmrgAC_REQUIRE_AUX_FILE([compile])dnl 835cfa76ccdSmrgAC_LANG_PUSH([C])dnl 836cfa76ccdSmrgAC_CACHE_CHECK( 837cfa76ccdSmrg [whether $CC understands -c and -o together], 838cfa76ccdSmrg [am_cv_prog_cc_c_o], 839cfa76ccdSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 840cfa76ccdSmrg # Make sure it works both with $CC and with simple cc. 841cfa76ccdSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 842cfa76ccdSmrg # compilers refuse to overwrite an existing .o file with -o, 843cfa76ccdSmrg # though they will create one. 844cfa76ccdSmrg am_cv_prog_cc_c_o=yes 845cfa76ccdSmrg for am_i in 1 2; do 846cfa76ccdSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 847cfa76ccdSmrg && test -f conftest2.$ac_objext; then 848cfa76ccdSmrg : OK 849cfa76ccdSmrg else 850cfa76ccdSmrg am_cv_prog_cc_c_o=no 851cfa76ccdSmrg break 852cfa76ccdSmrg fi 853cfa76ccdSmrg done 854cfa76ccdSmrg rm -f core conftest* 855cfa76ccdSmrg unset am_i]) 856cfa76ccdSmrgif test "$am_cv_prog_cc_c_o" != yes; then 857cfa76ccdSmrg # Losing compiler, so override with the script. 858cfa76ccdSmrg # FIXME: It is wrong to rewrite CC. 859cfa76ccdSmrg # But if we don't then we get into trouble of one sort or another. 860cfa76ccdSmrg # A longer-term fix would be to have automake use am__CC in this case, 861cfa76ccdSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 862cfa76ccdSmrg CC="$am_aux_dir/compile $CC" 863cfa76ccdSmrgfi 864cfa76ccdSmrgAC_LANG_POP([C])]) 865e96acad6Smrg 866cfa76ccdSmrg# For backward compatibility. 867cfa76ccdSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 868e96acad6Smrg 869cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 870cfa76ccdSmrg# 871cfa76ccdSmrg# This file is free software; the Free Software Foundation 872cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 873cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 874e96acad6Smrg 875cfa76ccdSmrg# AM_RUN_LOG(COMMAND) 876cfa76ccdSmrg# ------------------- 877cfa76ccdSmrg# Run COMMAND, save the exit status in ac_status, and log it. 878cfa76ccdSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 879cfa76ccdSmrgAC_DEFUN([AM_RUN_LOG], 880cfa76ccdSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 881cfa76ccdSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 882cfa76ccdSmrg ac_status=$? 883cfa76ccdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 884cfa76ccdSmrg (exit $ac_status); }]) 885e96acad6Smrg 886cfa76ccdSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 887e96acad6Smrg 888cfa76ccdSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 889cfa76ccdSmrg# 890cfa76ccdSmrg# This file is free software; the Free Software Foundation 891cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 892cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 893dbbd9e4bSmacallan 894cfa76ccdSmrg# AM_SANITY_CHECK 895cfa76ccdSmrg# --------------- 896cfa76ccdSmrgAC_DEFUN([AM_SANITY_CHECK], 897cfa76ccdSmrg[AC_MSG_CHECKING([whether build environment is sane]) 898cfa76ccdSmrg# Reject unsafe characters in $srcdir or the absolute working directory 899cfa76ccdSmrg# name. Accept space and tab only in the latter. 900cfa76ccdSmrgam_lf=' 901cfa76ccdSmrg' 902cfa76ccdSmrgcase `pwd` in 903cfa76ccdSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 904cfa76ccdSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 905cfa76ccdSmrgesac 906cfa76ccdSmrgcase $srcdir in 907cfa76ccdSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 908cfa76ccdSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 909cfa76ccdSmrgesac 910dbbd9e4bSmacallan 911cfa76ccdSmrg# Do 'set' in a subshell so we don't clobber the current shell's 912cfa76ccdSmrg# arguments. Must try -L first in case configure is actually a 913cfa76ccdSmrg# symlink; some systems play weird games with the mod time of symlinks 914cfa76ccdSmrg# (eg FreeBSD returns the mod time of the symlink's containing 915cfa76ccdSmrg# directory). 916cfa76ccdSmrgif ( 917cfa76ccdSmrg am_has_slept=no 918cfa76ccdSmrg for am_try in 1 2; do 919cfa76ccdSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 920cfa76ccdSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 921cfa76ccdSmrg if test "$[*]" = "X"; then 922cfa76ccdSmrg # -L didn't work. 923cfa76ccdSmrg set X `ls -t "$srcdir/configure" conftest.file` 924cfa76ccdSmrg fi 925cfa76ccdSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 926cfa76ccdSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 927cfa76ccdSmrg 928cfa76ccdSmrg # If neither matched, then we have a broken ls. This can happen 929cfa76ccdSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 930cfa76ccdSmrg # broken ls alias from the environment. This has actually 931cfa76ccdSmrg # happened. Such a system could not be considered "sane". 932cfa76ccdSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 933cfa76ccdSmrg alias in your environment]) 934cfa76ccdSmrg fi 935cfa76ccdSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 936cfa76ccdSmrg break 937cfa76ccdSmrg fi 938cfa76ccdSmrg # Just in case. 939cfa76ccdSmrg sleep 1 940cfa76ccdSmrg am_has_slept=yes 941cfa76ccdSmrg done 942cfa76ccdSmrg test "$[2]" = conftest.file 943cfa76ccdSmrg ) 944cfa76ccdSmrgthen 945cfa76ccdSmrg # Ok. 946cfa76ccdSmrg : 947cfa76ccdSmrgelse 948cfa76ccdSmrg AC_MSG_ERROR([newly created file is older than distributed files! 949cfa76ccdSmrgCheck your system clock]) 950cfa76ccdSmrgfi 951cfa76ccdSmrgAC_MSG_RESULT([yes]) 952cfa76ccdSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 953cfa76ccdSmrg# generated files are strictly newer. 954cfa76ccdSmrgam_sleep_pid= 955cfa76ccdSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 956cfa76ccdSmrg ( sleep 1 ) & 957cfa76ccdSmrg am_sleep_pid=$! 958cfa76ccdSmrgfi 959cfa76ccdSmrgAC_CONFIG_COMMANDS_PRE( 960cfa76ccdSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 961cfa76ccdSmrg if test -n "$am_sleep_pid"; then 962cfa76ccdSmrg # Hide warnings about reused PIDs. 963cfa76ccdSmrg wait $am_sleep_pid 2>/dev/null 964cfa76ccdSmrg fi 965cfa76ccdSmrg AC_MSG_RESULT([done])]) 966cfa76ccdSmrgrm -f conftest.file 967e96acad6Smrg]) 968dbbd9e4bSmacallan 969cfa76ccdSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 970cfa76ccdSmrg# 971cfa76ccdSmrg# This file is free software; the Free Software Foundation 972cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 973cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 974e96acad6Smrg 975cfa76ccdSmrg# AM_SILENT_RULES([DEFAULT]) 976cfa76ccdSmrg# -------------------------- 977cfa76ccdSmrg# Enable less verbose build rules; with the default set to DEFAULT 978cfa76ccdSmrg# ("yes" being less verbose, "no" or empty being verbose). 979cfa76ccdSmrgAC_DEFUN([AM_SILENT_RULES], 980cfa76ccdSmrg[AC_ARG_ENABLE([silent-rules], [dnl 981cfa76ccdSmrgAS_HELP_STRING( 982cfa76ccdSmrg [--enable-silent-rules], 983cfa76ccdSmrg [less verbose build output (undo: "make V=1")]) 984cfa76ccdSmrgAS_HELP_STRING( 985cfa76ccdSmrg [--disable-silent-rules], 986cfa76ccdSmrg [verbose build output (undo: "make V=0")])dnl 987cfa76ccdSmrg]) 988cfa76ccdSmrgcase $enable_silent_rules in @%:@ ((( 989cfa76ccdSmrg yes) AM_DEFAULT_VERBOSITY=0;; 990cfa76ccdSmrg no) AM_DEFAULT_VERBOSITY=1;; 991cfa76ccdSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 992cfa76ccdSmrgesac 993cfa76ccdSmrgdnl 994cfa76ccdSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 995cfa76ccdSmrgdnl do not support nested variable expansions. 996cfa76ccdSmrgdnl See automake bug#9928 and bug#10237. 997cfa76ccdSmrgam_make=${MAKE-make} 998cfa76ccdSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 999cfa76ccdSmrg [am_cv_make_support_nested_variables], 1000cfa76ccdSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1001cfa76ccdSmrgBAR0=false 1002cfa76ccdSmrgBAR1=true 1003cfa76ccdSmrgV=1 1004cfa76ccdSmrgam__doit: 1005cfa76ccdSmrg @$(TRUE) 1006cfa76ccdSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1007cfa76ccdSmrg am_cv_make_support_nested_variables=yes 1008cfa76ccdSmrgelse 1009cfa76ccdSmrg am_cv_make_support_nested_variables=no 1010cfa76ccdSmrgfi]) 1011cfa76ccdSmrgif test $am_cv_make_support_nested_variables = yes; then 1012cfa76ccdSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1013cfa76ccdSmrg AM_V='$(V)' 1014cfa76ccdSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1015cfa76ccdSmrgelse 1016cfa76ccdSmrg AM_V=$AM_DEFAULT_VERBOSITY 1017cfa76ccdSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1018cfa76ccdSmrgfi 1019cfa76ccdSmrgAC_SUBST([AM_V])dnl 1020cfa76ccdSmrgAM_SUBST_NOTMAKE([AM_V])dnl 1021cfa76ccdSmrgAC_SUBST([AM_DEFAULT_V])dnl 1022cfa76ccdSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1023cfa76ccdSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1024cfa76ccdSmrgAM_BACKSLASH='\' 1025cfa76ccdSmrgAC_SUBST([AM_BACKSLASH])dnl 1026cfa76ccdSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1027cfa76ccdSmrg]) 1028e96acad6Smrg 1029cfa76ccdSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 1030cfa76ccdSmrg# 1031cfa76ccdSmrg# This file is free software; the Free Software Foundation 1032cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 1033cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 1034dbbd9e4bSmacallan 1035cfa76ccdSmrg# AM_PROG_INSTALL_STRIP 1036cfa76ccdSmrg# --------------------- 1037cfa76ccdSmrg# One issue with vendor 'install' (even GNU) is that you can't 1038cfa76ccdSmrg# specify the program used to strip binaries. This is especially 1039cfa76ccdSmrg# annoying in cross-compiling environments, where the build's strip 1040cfa76ccdSmrg# is unlikely to handle the host's binaries. 1041cfa76ccdSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1042cfa76ccdSmrg# always use install-sh in "make install-strip", and initialize 1043cfa76ccdSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 1044cfa76ccdSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1045cfa76ccdSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1046cfa76ccdSmrg# Installed binaries are usually stripped using 'strip' when the user 1047cfa76ccdSmrg# run "make install-strip". However 'strip' might not be the right 1048cfa76ccdSmrg# tool to use in cross-compilation environments, therefore Automake 1049cfa76ccdSmrg# will honor the 'STRIP' environment variable to overrule this program. 1050cfa76ccdSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1051cfa76ccdSmrgif test "$cross_compiling" != no; then 1052cfa76ccdSmrg AC_CHECK_TOOL([STRIP], [strip], :) 1053cfa76ccdSmrgfi 1054cfa76ccdSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1055cfa76ccdSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1056dbbd9e4bSmacallan 1057cfa76ccdSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1058cfa76ccdSmrg# 1059cfa76ccdSmrg# This file is free software; the Free Software Foundation 1060cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 1061cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 1062dbbd9e4bSmacallan 1063cfa76ccdSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1064cfa76ccdSmrg# --------------------------- 1065cfa76ccdSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1066cfa76ccdSmrg# This macro is traced by Automake. 1067cfa76ccdSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1068dbbd9e4bSmacallan 1069cfa76ccdSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1070cfa76ccdSmrg# -------------------------- 1071cfa76ccdSmrg# Public sister of _AM_SUBST_NOTMAKE. 1072cfa76ccdSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1073dbbd9e4bSmacallan 1074cfa76ccdSmrg# Check how to create a tarball. -*- Autoconf -*- 1075dbbd9e4bSmacallan 1076cfa76ccdSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1077cfa76ccdSmrg# 1078cfa76ccdSmrg# This file is free software; the Free Software Foundation 1079cfa76ccdSmrg# gives unlimited permission to copy and/or distribute it, 1080cfa76ccdSmrg# with or without modifications, as long as this notice is preserved. 1081dbbd9e4bSmacallan 1082cfa76ccdSmrg# _AM_PROG_TAR(FORMAT) 1083cfa76ccdSmrg# -------------------- 1084cfa76ccdSmrg# Check how to create a tarball in format FORMAT. 1085cfa76ccdSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1086cfa76ccdSmrg# 1087cfa76ccdSmrg# Substitute a variable $(am__tar) that is a command 1088cfa76ccdSmrg# writing to stdout a FORMAT-tarball containing the directory 1089cfa76ccdSmrg# $tardir. 1090cfa76ccdSmrg# tardir=directory && $(am__tar) > result.tar 1091cfa76ccdSmrg# 1092cfa76ccdSmrg# Substitute a variable $(am__untar) that extract such 1093cfa76ccdSmrg# a tarball read from stdin. 1094cfa76ccdSmrg# $(am__untar) < result.tar 1095cfa76ccdSmrg# 1096cfa76ccdSmrgAC_DEFUN([_AM_PROG_TAR], 1097cfa76ccdSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1098cfa76ccdSmrg# in the wild :-( We should find a proper way to deprecate it ... 1099cfa76ccdSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1100e96acad6Smrg 1101cfa76ccdSmrg# We'll loop over all known methods to create a tar archive until one works. 1102cfa76ccdSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1103e96acad6Smrg 1104cfa76ccdSmrgm4_if([$1], [v7], 1105cfa76ccdSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1106cfa76ccdSmrg 1107cfa76ccdSmrg [m4_case([$1], 1108cfa76ccdSmrg [ustar], 1109cfa76ccdSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1110cfa76ccdSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1111cfa76ccdSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1112cfa76ccdSmrg # and bug#13588). 1113cfa76ccdSmrg am_max_uid=2097151 # 2^21 - 1 1114cfa76ccdSmrg am_max_gid=$am_max_uid 1115cfa76ccdSmrg # The $UID and $GID variables are not portable, so we need to resort 1116cfa76ccdSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1117cfa76ccdSmrg # below are definitely unexpected, so allow the users to see them 1118cfa76ccdSmrg # (that is, avoid stderr redirection). 1119cfa76ccdSmrg am_uid=`id -u || echo unknown` 1120cfa76ccdSmrg am_gid=`id -g || echo unknown` 1121cfa76ccdSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1122cfa76ccdSmrg if test $am_uid -le $am_max_uid; then 1123cfa76ccdSmrg AC_MSG_RESULT([yes]) 1124cfa76ccdSmrg else 1125cfa76ccdSmrg AC_MSG_RESULT([no]) 1126cfa76ccdSmrg _am_tools=none 1127cfa76ccdSmrg fi 1128cfa76ccdSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1129cfa76ccdSmrg if test $am_gid -le $am_max_gid; then 1130cfa76ccdSmrg AC_MSG_RESULT([yes]) 1131cfa76ccdSmrg else 1132cfa76ccdSmrg AC_MSG_RESULT([no]) 1133cfa76ccdSmrg _am_tools=none 1134cfa76ccdSmrg fi], 1135dbbd9e4bSmacallan 1136cfa76ccdSmrg [pax], 1137cfa76ccdSmrg [], 1138e96acad6Smrg 1139cfa76ccdSmrg [m4_fatal([Unknown tar format])]) 1140e96acad6Smrg 1141cfa76ccdSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1142e96acad6Smrg 1143cfa76ccdSmrg # Go ahead even if we have the value already cached. We do so because we 1144cfa76ccdSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1145cfa76ccdSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1146e96acad6Smrg 1147cfa76ccdSmrg for _am_tool in $_am_tools; do 1148cfa76ccdSmrg case $_am_tool in 1149cfa76ccdSmrg gnutar) 1150cfa76ccdSmrg for _am_tar in tar gnutar gtar; do 1151cfa76ccdSmrg AM_RUN_LOG([$_am_tar --version]) && break 1152cfa76ccdSmrg done 1153cfa76ccdSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1154cfa76ccdSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1155cfa76ccdSmrg am__untar="$_am_tar -xf -" 1156cfa76ccdSmrg ;; 1157cfa76ccdSmrg plaintar) 1158cfa76ccdSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1159cfa76ccdSmrg # ustar tarball either. 1160cfa76ccdSmrg (tar --version) >/dev/null 2>&1 && continue 1161cfa76ccdSmrg am__tar='tar chf - "$$tardir"' 1162cfa76ccdSmrg am__tar_='tar chf - "$tardir"' 1163cfa76ccdSmrg am__untar='tar xf -' 1164cfa76ccdSmrg ;; 1165cfa76ccdSmrg pax) 1166cfa76ccdSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1167cfa76ccdSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1168cfa76ccdSmrg am__untar='pax -r' 1169cfa76ccdSmrg ;; 1170cfa76ccdSmrg cpio) 1171cfa76ccdSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1172cfa76ccdSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1173cfa76ccdSmrg am__untar='cpio -i -H $1 -d' 1174cfa76ccdSmrg ;; 1175cfa76ccdSmrg none) 1176cfa76ccdSmrg am__tar=false 1177cfa76ccdSmrg am__tar_=false 1178cfa76ccdSmrg am__untar=false 1179cfa76ccdSmrg ;; 1180cfa76ccdSmrg esac 1181e96acad6Smrg 1182cfa76ccdSmrg # If the value was cached, stop now. We just wanted to have am__tar 1183cfa76ccdSmrg # and am__untar set. 1184cfa76ccdSmrg test -n "${am_cv_prog_tar_$1}" && break 1185cfa76ccdSmrg 1186cfa76ccdSmrg # tar/untar a dummy directory, and stop if the command works. 1187cfa76ccdSmrg rm -rf conftest.dir 1188cfa76ccdSmrg mkdir conftest.dir 1189cfa76ccdSmrg echo GrepMe > conftest.dir/file 1190cfa76ccdSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1191cfa76ccdSmrg rm -rf conftest.dir 1192cfa76ccdSmrg if test -s conftest.tar; then 1193cfa76ccdSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1194cfa76ccdSmrg AM_RUN_LOG([cat conftest.dir/file]) 1195cfa76ccdSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1196e96acad6Smrg fi 1197cfa76ccdSmrg done 1198cfa76ccdSmrg rm -rf conftest.dir 1199dbbd9e4bSmacallan 1200cfa76ccdSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1201cfa76ccdSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1202dbbd9e4bSmacallan 1203cfa76ccdSmrgAC_SUBST([am__tar]) 1204cfa76ccdSmrgAC_SUBST([am__untar]) 1205cfa76ccdSmrg]) # _AM_PROG_TAR 1206dbbd9e4bSmacallan 1207cfa76ccdSmrgdnl Copyright 2005 Red Hat, Inc 1208cfa76ccdSmrgdnl 1209cfa76ccdSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1210cfa76ccdSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1211cfa76ccdSmrgdnl the above copyright notice appear in all copies and that both that 1212cfa76ccdSmrgdnl copyright notice and this permission notice appear in supporting 1213cfa76ccdSmrgdnl documentation. 1214cfa76ccdSmrgdnl 1215cfa76ccdSmrgdnl The above copyright notice and this permission notice shall be included 1216cfa76ccdSmrgdnl in all copies or substantial portions of the Software. 1217cfa76ccdSmrgdnl 1218cfa76ccdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1219cfa76ccdSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1220cfa76ccdSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1221cfa76ccdSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1222cfa76ccdSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1223cfa76ccdSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1224cfa76ccdSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1225cfa76ccdSmrgdnl 1226cfa76ccdSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1227cfa76ccdSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1228cfa76ccdSmrgdnl other dealings in this Software without prior written authorization 1229cfa76ccdSmrgdnl from the copyright holders. 1230cfa76ccdSmrgdnl 1231dbbd9e4bSmacallan 1232cfa76ccdSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1233cfa76ccdSmrg# -------------------------- 1234cfa76ccdSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1235cfa76ccdSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1236dbbd9e4bSmacallan 1237cfa76ccdSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1238cfa76ccdSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239cfa76ccdSmrg SAVE_CFLAGS="$CFLAGS" 1240cfa76ccdSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1241cfa76ccdSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1242cfa76ccdSmrg#include "xorg-server.h" 1243cfa76ccdSmrg#if !defined $1 1244cfa76ccdSmrg#error $1 not defined 1245cfa76ccdSmrg#endif 1246cfa76ccdSmrg ]])], 1247cfa76ccdSmrg [_EXT_CHECK=yes], 1248cfa76ccdSmrg [_EXT_CHECK=no]) 1249cfa76ccdSmrg CFLAGS="$SAVE_CFLAGS" 1250cfa76ccdSmrg AC_MSG_CHECKING([if $1 is defined]) 1251cfa76ccdSmrg AC_MSG_RESULT([$_EXT_CHECK]) 1252cfa76ccdSmrg if test "$_EXT_CHECK" != no; then 1253cfa76ccdSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1254cfa76ccdSmrg fi 1255cfa76ccdSmrg]) 1256dbbd9e4bSmacallan 1257cfa76ccdSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1258cfa76ccdSmrgdnl serial 11 (pkg-config-0.29) 1259cfa76ccdSmrgdnl 1260cfa76ccdSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1261cfa76ccdSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1262cfa76ccdSmrgdnl 1263cfa76ccdSmrgdnl This program is free software; you can redistribute it and/or modify 1264cfa76ccdSmrgdnl it under the terms of the GNU General Public License as published by 1265cfa76ccdSmrgdnl the Free Software Foundation; either version 2 of the License, or 1266cfa76ccdSmrgdnl (at your option) any later version. 1267cfa76ccdSmrgdnl 1268cfa76ccdSmrgdnl This program is distributed in the hope that it will be useful, but 1269cfa76ccdSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1270cfa76ccdSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1271cfa76ccdSmrgdnl General Public License for more details. 1272cfa76ccdSmrgdnl 1273cfa76ccdSmrgdnl You should have received a copy of the GNU General Public License 1274cfa76ccdSmrgdnl along with this program; if not, write to the Free Software 1275cfa76ccdSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1276cfa76ccdSmrgdnl 02111-1307, USA. 1277cfa76ccdSmrgdnl 1278cfa76ccdSmrgdnl As a special exception to the GNU General Public License, if you 1279cfa76ccdSmrgdnl distribute this file as part of a program that contains a 1280cfa76ccdSmrgdnl configuration script generated by Autoconf, you may include it under 1281cfa76ccdSmrgdnl the same distribution terms that you use for the rest of that 1282cfa76ccdSmrgdnl program. 1283cfa76ccdSmrg 1284cfa76ccdSmrgdnl PKG_PREREQ(MIN-VERSION) 1285cfa76ccdSmrgdnl ----------------------- 1286cfa76ccdSmrgdnl Since: 0.29 1287cfa76ccdSmrgdnl 1288cfa76ccdSmrgdnl Verify that the version of the pkg-config macros are at least 1289cfa76ccdSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1290cfa76ccdSmrgdnl installed version of pkg-config, this checks the developer's version 1291cfa76ccdSmrgdnl of pkg.m4 when generating configure. 1292cfa76ccdSmrgdnl 1293cfa76ccdSmrgdnl To ensure that this macro is defined, also add: 1294cfa76ccdSmrgdnl m4_ifndef([PKG_PREREQ], 1295cfa76ccdSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1296cfa76ccdSmrgdnl 1297cfa76ccdSmrgdnl See the "Since" comment for each macro you use to see what version 1298cfa76ccdSmrgdnl of the macros you require. 1299cfa76ccdSmrgm4_defun([PKG_PREREQ], 1300cfa76ccdSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1301cfa76ccdSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1302cfa76ccdSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1303cfa76ccdSmrg])dnl PKG_PREREQ 1304cfa76ccdSmrg 1305cfa76ccdSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1306cfa76ccdSmrgdnl ---------------------------------- 1307cfa76ccdSmrgdnl Since: 0.16 1308cfa76ccdSmrgdnl 1309cfa76ccdSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1310cfa76ccdSmrgdnl first found in the path. Checks that the version of pkg-config found 1311cfa76ccdSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1312cfa76ccdSmrgdnl used since that's the first version where most current features of 1313cfa76ccdSmrgdnl pkg-config existed. 1314cfa76ccdSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1315cfa76ccdSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1316cfa76ccdSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1317cfa76ccdSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1318cfa76ccdSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1319cfa76ccdSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1320cfa76ccdSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1321cfa76ccdSmrg 1322cfa76ccdSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1323cfa76ccdSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1324e96acad6Smrgfi 1325cfa76ccdSmrgif test -n "$PKG_CONFIG"; then 1326cfa76ccdSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1327cfa76ccdSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1328cfa76ccdSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1329cfa76ccdSmrg AC_MSG_RESULT([yes]) 1330cfa76ccdSmrg else 1331cfa76ccdSmrg AC_MSG_RESULT([no]) 1332cfa76ccdSmrg PKG_CONFIG="" 1333cfa76ccdSmrg fi 1334cfa76ccdSmrgfi[]dnl 1335cfa76ccdSmrg])dnl PKG_PROG_PKG_CONFIG 1336dbbd9e4bSmacallan 1337cfa76ccdSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1338cfa76ccdSmrgdnl ------------------------------------------------------------------- 1339cfa76ccdSmrgdnl Since: 0.18 1340cfa76ccdSmrgdnl 1341cfa76ccdSmrgdnl Check to see whether a particular set of modules exists. Similar to 1342cfa76ccdSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1343cfa76ccdSmrgdnl 1344cfa76ccdSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1345cfa76ccdSmrgdnl only at the first occurence in configure.ac, so if the first place 1346cfa76ccdSmrgdnl it's called might be skipped (such as if it is within an "if", you 1347cfa76ccdSmrgdnl have to call PKG_CHECK_EXISTS manually 1348cfa76ccdSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1349cfa76ccdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1350cfa76ccdSmrgif test -n "$PKG_CONFIG" && \ 1351cfa76ccdSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1352cfa76ccdSmrg m4_default([$2], [:]) 1353cfa76ccdSmrgm4_ifvaln([$3], [else 1354cfa76ccdSmrg $3])dnl 1355cfa76ccdSmrgfi]) 1356dbbd9e4bSmacallan 1357cfa76ccdSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1358cfa76ccdSmrgdnl --------------------------------------------- 1359cfa76ccdSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1360cfa76ccdSmrgdnl pkg_failed based on the result. 1361cfa76ccdSmrgm4_define([_PKG_CONFIG], 1362cfa76ccdSmrg[if test -n "$$1"; then 1363cfa76ccdSmrg pkg_cv_[]$1="$$1" 1364cfa76ccdSmrg elif test -n "$PKG_CONFIG"; then 1365cfa76ccdSmrg PKG_CHECK_EXISTS([$3], 1366cfa76ccdSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1367cfa76ccdSmrg test "x$?" != "x0" && pkg_failed=yes ], 1368cfa76ccdSmrg [pkg_failed=yes]) 1369cfa76ccdSmrg else 1370cfa76ccdSmrg pkg_failed=untried 1371cfa76ccdSmrgfi[]dnl 1372cfa76ccdSmrg])dnl _PKG_CONFIG 1373dbbd9e4bSmacallan 1374cfa76ccdSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1375cfa76ccdSmrgdnl --------------------------- 1376cfa76ccdSmrgdnl Internal check to see if pkg-config supports short errors. 1377cfa76ccdSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1378cfa76ccdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1379cfa76ccdSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1380cfa76ccdSmrg _pkg_short_errors_supported=yes 1381cfa76ccdSmrgelse 1382cfa76ccdSmrg _pkg_short_errors_supported=no 1383cfa76ccdSmrgfi[]dnl 1384cfa76ccdSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1385e96acad6Smrg 1386e96acad6Smrg 1387cfa76ccdSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1388cfa76ccdSmrgdnl [ACTION-IF-NOT-FOUND]) 1389cfa76ccdSmrgdnl -------------------------------------------------------------- 1390cfa76ccdSmrgdnl Since: 0.4.0 1391cfa76ccdSmrgdnl 1392cfa76ccdSmrgdnl Note that if there is a possibility the first call to 1393cfa76ccdSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1394cfa76ccdSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1395cfa76ccdSmrgAC_DEFUN([PKG_CHECK_MODULES], 1396cfa76ccdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1397cfa76ccdSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1398cfa76ccdSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1399e96acad6Smrg 1400cfa76ccdSmrgpkg_failed=no 1401cfa76ccdSmrgAC_MSG_CHECKING([for $1]) 1402e96acad6Smrg 1403cfa76ccdSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1404cfa76ccdSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1405e96acad6Smrg 1406cfa76ccdSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1407cfa76ccdSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1408cfa76ccdSmrgSee the pkg-config man page for more details.]) 1409e96acad6Smrg 1410cfa76ccdSmrgif test $pkg_failed = yes; then 1411cfa76ccdSmrg AC_MSG_RESULT([no]) 1412cfa76ccdSmrg _PKG_SHORT_ERRORS_SUPPORTED 1413cfa76ccdSmrg if test $_pkg_short_errors_supported = yes; then 1414cfa76ccdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1415cfa76ccdSmrg else 1416cfa76ccdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1417cfa76ccdSmrg fi 1418cfa76ccdSmrg # Put the nasty error message in config.log where it belongs 1419cfa76ccdSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1420e96acad6Smrg 1421cfa76ccdSmrg m4_default([$4], [AC_MSG_ERROR( 1422cfa76ccdSmrg[Package requirements ($2) were not met: 1423e96acad6Smrg 1424cfa76ccdSmrg$$1_PKG_ERRORS 1425e96acad6Smrg 1426cfa76ccdSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1427cfa76ccdSmrginstalled software in a non-standard prefix. 1428e96acad6Smrg 1429cfa76ccdSmrg_PKG_TEXT])[]dnl 1430cfa76ccdSmrg ]) 1431cfa76ccdSmrgelif test $pkg_failed = untried; then 1432cfa76ccdSmrg AC_MSG_RESULT([no]) 1433cfa76ccdSmrg m4_default([$4], [AC_MSG_FAILURE( 1434cfa76ccdSmrg[The pkg-config script could not be found or is too old. Make sure it 1435cfa76ccdSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1436cfa76ccdSmrgpath to pkg-config. 1437e96acad6Smrg 1438cfa76ccdSmrg_PKG_TEXT 1439e96acad6Smrg 1440cfa76ccdSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1441cfa76ccdSmrg ]) 1442cfa76ccdSmrgelse 1443cfa76ccdSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1444cfa76ccdSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1445cfa76ccdSmrg AC_MSG_RESULT([yes]) 1446cfa76ccdSmrg $3 1447cfa76ccdSmrgfi[]dnl 1448cfa76ccdSmrg])dnl PKG_CHECK_MODULES 1449e96acad6Smrg 1450e96acad6Smrg 1451cfa76ccdSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1452cfa76ccdSmrgdnl [ACTION-IF-NOT-FOUND]) 1453cfa76ccdSmrgdnl --------------------------------------------------------------------- 1454cfa76ccdSmrgdnl Since: 0.29 1455cfa76ccdSmrgdnl 1456cfa76ccdSmrgdnl Checks for existence of MODULES and gathers its build flags with 1457cfa76ccdSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1458cfa76ccdSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1459cfa76ccdSmrgdnl 1460cfa76ccdSmrgdnl Note that if there is a possibility the first call to 1461cfa76ccdSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1462cfa76ccdSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1463cfa76ccdSmrgdnl configure.ac. 1464cfa76ccdSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1465cfa76ccdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1466cfa76ccdSmrg_save_PKG_CONFIG=$PKG_CONFIG 1467cfa76ccdSmrgPKG_CONFIG="$PKG_CONFIG --static" 1468cfa76ccdSmrgPKG_CHECK_MODULES($@) 1469cfa76ccdSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1470cfa76ccdSmrg])dnl PKG_CHECK_MODULES_STATIC 1471e96acad6Smrg 1472e96acad6Smrg 1473cfa76ccdSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 1474cfa76ccdSmrgdnl ------------------------- 1475cfa76ccdSmrgdnl Since: 0.27 1476cfa76ccdSmrgdnl 1477cfa76ccdSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 1478cfa76ccdSmrgdnl should install pkg-config .pc files. By default the directory is 1479cfa76ccdSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 1480cfa76ccdSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1481cfa76ccdSmrgdnl parameter. 1482cfa76ccdSmrgAC_DEFUN([PKG_INSTALLDIR], 1483cfa76ccdSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1484cfa76ccdSmrgm4_pushdef([pkg_description], 1485cfa76ccdSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1486cfa76ccdSmrgAC_ARG_WITH([pkgconfigdir], 1487cfa76ccdSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1488cfa76ccdSmrg [with_pkgconfigdir=]pkg_default) 1489cfa76ccdSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1490cfa76ccdSmrgm4_popdef([pkg_default]) 1491cfa76ccdSmrgm4_popdef([pkg_description]) 1492cfa76ccdSmrg])dnl PKG_INSTALLDIR 1493e96acad6Smrg 1494e96acad6Smrg 1495cfa76ccdSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1496cfa76ccdSmrgdnl -------------------------------- 1497cfa76ccdSmrgdnl Since: 0.27 1498cfa76ccdSmrgdnl 1499cfa76ccdSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1500cfa76ccdSmrgdnl module should install arch-independent pkg-config .pc files. By 1501cfa76ccdSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 1502cfa76ccdSmrgdnl changed by passing DIRECTORY. The user can override through the 1503cfa76ccdSmrgdnl --with-noarch-pkgconfigdir parameter. 1504cfa76ccdSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1505cfa76ccdSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1506cfa76ccdSmrgm4_pushdef([pkg_description], 1507cfa76ccdSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1508cfa76ccdSmrgAC_ARG_WITH([noarch-pkgconfigdir], 1509cfa76ccdSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1510cfa76ccdSmrg [with_noarch_pkgconfigdir=]pkg_default) 1511cfa76ccdSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1512cfa76ccdSmrgm4_popdef([pkg_default]) 1513cfa76ccdSmrgm4_popdef([pkg_description]) 1514cfa76ccdSmrg])dnl PKG_NOARCH_INSTALLDIR 1515e96acad6Smrg 1516e96acad6Smrg 1517cfa76ccdSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1518cfa76ccdSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1519cfa76ccdSmrgdnl ------------------------------------------- 1520cfa76ccdSmrgdnl Since: 0.28 1521cfa76ccdSmrgdnl 1522cfa76ccdSmrgdnl Retrieves the value of the pkg-config variable for the given module. 1523cfa76ccdSmrgAC_DEFUN([PKG_CHECK_VAR], 1524cfa76ccdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1525cfa76ccdSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1526e96acad6Smrg 1527cfa76ccdSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1528cfa76ccdSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1529e96acad6Smrg 1530cfa76ccdSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1531cfa76ccdSmrg])dnl PKG_CHECK_VAR 1532e96acad6Smrg 1533cfa76ccdSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1534cfa76ccdSmrgdnl 1535cfa76ccdSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1536cfa76ccdSmrgdnl 1537cfa76ccdSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1538cfa76ccdSmrgdnl copy of this software and associated documentation files (the "Software"), 1539cfa76ccdSmrgdnl to deal in the Software without restriction, including without limitation 1540cfa76ccdSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1541cfa76ccdSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1542cfa76ccdSmrgdnl Software is furnished to do so, subject to the following conditions: 1543cfa76ccdSmrgdnl 1544cfa76ccdSmrgdnl The above copyright notice and this permission notice (including the next 1545cfa76ccdSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1546cfa76ccdSmrgdnl Software. 1547cfa76ccdSmrgdnl 1548cfa76ccdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1549cfa76ccdSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1550cfa76ccdSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1551cfa76ccdSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1552cfa76ccdSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1553cfa76ccdSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1554cfa76ccdSmrgdnl DEALINGS IN THE SOFTWARE. 1555e96acad6Smrg 1556cfa76ccdSmrg# XORG_MACROS_VERSION(required-version) 1557cfa76ccdSmrg# ------------------------------------- 1558cfa76ccdSmrg# Minimum version: 1.1.0 1559cfa76ccdSmrg# 1560cfa76ccdSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1561cfa76ccdSmrg# your configure.ac with the minimum required version, such as: 1562cfa76ccdSmrg# XORG_MACROS_VERSION(1.1) 1563cfa76ccdSmrg# 1564cfa76ccdSmrg# To ensure that this macro is defined, also add: 1565cfa76ccdSmrg# m4_ifndef([XORG_MACROS_VERSION], 1566cfa76ccdSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1567cfa76ccdSmrg# 1568cfa76ccdSmrg# 1569cfa76ccdSmrg# See the "minimum version" comment for each macro you use to see what 1570cfa76ccdSmrg# version you require. 1571cfa76ccdSmrgm4_defun([XORG_MACROS_VERSION],[ 1572cfa76ccdSmrgm4_define([vers_have], [1.19.3]) 1573cfa76ccdSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1574cfa76ccdSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1575cfa76ccdSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1576cfa76ccdSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1577cfa76ccdSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1578cfa76ccdSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1579cfa76ccdSmrgm4_undefine([vers_have]) 1580cfa76ccdSmrgm4_undefine([maj_have]) 1581cfa76ccdSmrgm4_undefine([maj_needed]) 1582cfa76ccdSmrg]) # XORG_MACROS_VERSION 1583e96acad6Smrg 1584cfa76ccdSmrg# XORG_PROG_RAWCPP() 1585cfa76ccdSmrg# ------------------ 1586cfa76ccdSmrg# Minimum version: 1.0.0 1587cfa76ccdSmrg# 1588cfa76ccdSmrg# Find cpp program and necessary flags for use in pre-processing text files 1589cfa76ccdSmrg# such as man pages and config files 1590cfa76ccdSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1591cfa76ccdSmrgAC_REQUIRE([AC_PROG_CPP]) 1592cfa76ccdSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1593cfa76ccdSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1594e96acad6Smrg 1595cfa76ccdSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1596cfa76ccdSmrg# which is not the best choice for supporting other OS'es, but covers most 1597cfa76ccdSmrg# of the ones we need for now. 1598cfa76ccdSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1599cfa76ccdSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1600cfa76ccdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1601cfa76ccdSmrg AC_MSG_RESULT([no]) 1602cfa76ccdSmrgelse 1603cfa76ccdSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1604cfa76ccdSmrg RAWCPPFLAGS=-undef 1605cfa76ccdSmrg AC_MSG_RESULT([yes]) 1606cfa76ccdSmrg # under Cygwin unix is still defined even with -undef 1607cfa76ccdSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1608cfa76ccdSmrg RAWCPPFLAGS="-undef -ansi" 1609cfa76ccdSmrg AC_MSG_RESULT([yes, with -ansi]) 1610cfa76ccdSmrg else 1611cfa76ccdSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1612cfa76ccdSmrg fi 1613cfa76ccdSmrgfi 1614cfa76ccdSmrgrm -f conftest.$ac_ext 1615e96acad6Smrg 1616cfa76ccdSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1617cfa76ccdSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1618cfa76ccdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1619cfa76ccdSmrg AC_MSG_RESULT([no]) 1620cfa76ccdSmrgelse 1621cfa76ccdSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1622cfa76ccdSmrg TRADITIONALCPPFLAGS="-traditional" 1623cfa76ccdSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1624cfa76ccdSmrg AC_MSG_RESULT([yes]) 1625e96acad6Smrg else 1626cfa76ccdSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1627e96acad6Smrg fi 1628cfa76ccdSmrgfi 1629cfa76ccdSmrgrm -f conftest.$ac_ext 1630cfa76ccdSmrgAC_SUBST(RAWCPPFLAGS) 1631cfa76ccdSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1632cfa76ccdSmrg]) # XORG_PROG_RAWCPP 1633dbbd9e4bSmacallan 1634cfa76ccdSmrg# XORG_MANPAGE_SECTIONS() 1635cfa76ccdSmrg# ----------------------- 1636cfa76ccdSmrg# Minimum version: 1.0.0 1637cfa76ccdSmrg# 1638cfa76ccdSmrg# Determine which sections man pages go in for the different man page types 1639cfa76ccdSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1640cfa76ccdSmrg# Not sure if there's any better way than just hardcoding by OS name. 1641cfa76ccdSmrg# Override default settings by setting environment variables 1642cfa76ccdSmrg# Added MAN_SUBSTS in version 1.8 1643cfa76ccdSmrg# Added AC_PROG_SED in version 1.8 1644dbbd9e4bSmacallan 1645cfa76ccdSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1646cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1647cfa76ccdSmrgAC_REQUIRE([AC_PROG_SED]) 1648dbbd9e4bSmacallan 1649cfa76ccdSmrgcase $host_os in 1650cfa76ccdSmrg solaris*) 1651cfa76ccdSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1652cfa76ccdSmrg # check for a man page file found in later versions that use 1653cfa76ccdSmrg # traditional section numbers instead 1654cfa76ccdSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1655cfa76ccdSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1656cfa76ccdSmrg ;; 1657cfa76ccdSmrg *) SYSV_MAN_SECTIONS=false ;; 1658cfa76ccdSmrgesac 1659dbbd9e4bSmacallan 1660cfa76ccdSmrgif test x$APP_MAN_SUFFIX = x ; then 1661cfa76ccdSmrg APP_MAN_SUFFIX=1 1662cfa76ccdSmrgfi 1663cfa76ccdSmrgif test x$APP_MAN_DIR = x ; then 1664cfa76ccdSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1665cfa76ccdSmrgfi 1666dbbd9e4bSmacallan 1667cfa76ccdSmrgif test x$LIB_MAN_SUFFIX = x ; then 1668cfa76ccdSmrg LIB_MAN_SUFFIX=3 1669cfa76ccdSmrgfi 1670cfa76ccdSmrgif test x$LIB_MAN_DIR = x ; then 1671cfa76ccdSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1672cfa76ccdSmrgfi 1673dbbd9e4bSmacallan 1674cfa76ccdSmrgif test x$FILE_MAN_SUFFIX = x ; then 1675cfa76ccdSmrg case $SYSV_MAN_SECTIONS in 1676cfa76ccdSmrg true) FILE_MAN_SUFFIX=4 ;; 1677cfa76ccdSmrg *) FILE_MAN_SUFFIX=5 ;; 1678cfa76ccdSmrg esac 1679cfa76ccdSmrgfi 1680cfa76ccdSmrgif test x$FILE_MAN_DIR = x ; then 1681cfa76ccdSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1682cfa76ccdSmrgfi 1683dbbd9e4bSmacallan 1684cfa76ccdSmrgif test x$MISC_MAN_SUFFIX = x ; then 1685cfa76ccdSmrg case $SYSV_MAN_SECTIONS in 1686cfa76ccdSmrg true) MISC_MAN_SUFFIX=5 ;; 1687cfa76ccdSmrg *) MISC_MAN_SUFFIX=7 ;; 1688cfa76ccdSmrg esac 1689cfa76ccdSmrgfi 1690cfa76ccdSmrgif test x$MISC_MAN_DIR = x ; then 1691cfa76ccdSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1692cfa76ccdSmrgfi 1693dbbd9e4bSmacallan 1694cfa76ccdSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1695cfa76ccdSmrg case $SYSV_MAN_SECTIONS in 1696cfa76ccdSmrg true) DRIVER_MAN_SUFFIX=7 ;; 1697cfa76ccdSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1698cfa76ccdSmrg esac 1699cfa76ccdSmrgfi 1700cfa76ccdSmrgif test x$DRIVER_MAN_DIR = x ; then 1701cfa76ccdSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1702cfa76ccdSmrgfi 1703e96acad6Smrg 1704cfa76ccdSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1705cfa76ccdSmrg case $SYSV_MAN_SECTIONS in 1706cfa76ccdSmrg true) ADMIN_MAN_SUFFIX=1m ;; 1707cfa76ccdSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1708cfa76ccdSmrg esac 1709cfa76ccdSmrgfi 1710cfa76ccdSmrgif test x$ADMIN_MAN_DIR = x ; then 1711cfa76ccdSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1712e96acad6Smrgfi 1713dbbd9e4bSmacallan 1714dbbd9e4bSmacallan 1715cfa76ccdSmrgAC_SUBST([APP_MAN_SUFFIX]) 1716cfa76ccdSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1717cfa76ccdSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1718cfa76ccdSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1719cfa76ccdSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1720cfa76ccdSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1721cfa76ccdSmrgAC_SUBST([APP_MAN_DIR]) 1722cfa76ccdSmrgAC_SUBST([LIB_MAN_DIR]) 1723cfa76ccdSmrgAC_SUBST([FILE_MAN_DIR]) 1724cfa76ccdSmrgAC_SUBST([MISC_MAN_DIR]) 1725cfa76ccdSmrgAC_SUBST([DRIVER_MAN_DIR]) 1726cfa76ccdSmrgAC_SUBST([ADMIN_MAN_DIR]) 1727dbbd9e4bSmacallan 1728cfa76ccdSmrgXORG_MAN_PAGE="X Version 11" 1729cfa76ccdSmrgAC_SUBST([XORG_MAN_PAGE]) 1730cfa76ccdSmrgMAN_SUBSTS="\ 1731cfa76ccdSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1732cfa76ccdSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1733cfa76ccdSmrg -e 's|__xservername__|Xorg|g' \ 1734cfa76ccdSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1735cfa76ccdSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1736cfa76ccdSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1737cfa76ccdSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1738cfa76ccdSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1739cfa76ccdSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1740cfa76ccdSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1741cfa76ccdSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1742cfa76ccdSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1743cfa76ccdSmrgAC_SUBST([MAN_SUBSTS]) 1744dbbd9e4bSmacallan 1745cfa76ccdSmrg]) # XORG_MANPAGE_SECTIONS 1746dbbd9e4bSmacallan 1747cfa76ccdSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1748cfa76ccdSmrg# ------------------------ 1749cfa76ccdSmrg# Minimum version: 1.7.0 1750cfa76ccdSmrg# 1751cfa76ccdSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1752cfa76ccdSmrg# provided by xorg-sgml-doctools, if installed. 1753cfa76ccdSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1754cfa76ccdSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1755cfa76ccdSmrgXORG_SGML_PATH= 1756cfa76ccdSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1757cfa76ccdSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1758cfa76ccdSmrg [m4_ifval([$1],[:], 1759cfa76ccdSmrg [if test x"$cross_compiling" != x"yes" ; then 1760cfa76ccdSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1761cfa76ccdSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1762cfa76ccdSmrg fi]) 1763cfa76ccdSmrg ]) 1764dbbd9e4bSmacallan 1765cfa76ccdSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1766cfa76ccdSmrg# the path and the name of the doc stylesheet 1767cfa76ccdSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1768cfa76ccdSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1769cfa76ccdSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1770cfa76ccdSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1771cfa76ccdSmrgelse 1772cfa76ccdSmrg AC_MSG_RESULT([no]) 1773cfa76ccdSmrgfi 1774dbbd9e4bSmacallan 1775cfa76ccdSmrgAC_SUBST(XORG_SGML_PATH) 1776cfa76ccdSmrgAC_SUBST(STYLESHEET_SRCDIR) 1777cfa76ccdSmrgAC_SUBST(XSL_STYLESHEET) 1778cfa76ccdSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1779cfa76ccdSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1780dbbd9e4bSmacallan 1781cfa76ccdSmrg# XORG_CHECK_LINUXDOC 1782cfa76ccdSmrg# ------------------- 1783cfa76ccdSmrg# Minimum version: 1.0.0 1784cfa76ccdSmrg# 1785cfa76ccdSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1786cfa76ccdSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1787cfa76ccdSmrg# Whether or not the necessary tools and files are found can be checked 1788cfa76ccdSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1789cfa76ccdSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1790cfa76ccdSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1791cfa76ccdSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1792dbbd9e4bSmacallan 1793cfa76ccdSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1794dbbd9e4bSmacallan 1795cfa76ccdSmrgAC_MSG_CHECKING([whether to build documentation]) 1796dbbd9e4bSmacallan 1797cfa76ccdSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1798cfa76ccdSmrg BUILDDOC=yes 1799cfa76ccdSmrgelse 1800cfa76ccdSmrg BUILDDOC=no 1801cfa76ccdSmrgfi 1802dbbd9e4bSmacallan 1803cfa76ccdSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1804dbbd9e4bSmacallan 1805cfa76ccdSmrgAC_MSG_RESULT([$BUILDDOC]) 1806e96acad6Smrg 1807cfa76ccdSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1808dbbd9e4bSmacallan 1809cfa76ccdSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1810cfa76ccdSmrg BUILDPDFDOC=yes 1811e96acad6Smrgelse 1812cfa76ccdSmrg BUILDPDFDOC=no 1813e96acad6Smrgfi 1814dbbd9e4bSmacallan 1815cfa76ccdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1816dbbd9e4bSmacallan 1817cfa76ccdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1818dbbd9e4bSmacallan 1819cfa76ccdSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1820cfa76ccdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1821cfa76ccdSmrgMAKE_PDF="$PS2PDF" 1822cfa76ccdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1823e96acad6Smrg 1824cfa76ccdSmrgAC_SUBST(MAKE_TEXT) 1825cfa76ccdSmrgAC_SUBST(MAKE_PS) 1826cfa76ccdSmrgAC_SUBST(MAKE_PDF) 1827cfa76ccdSmrgAC_SUBST(MAKE_HTML) 1828cfa76ccdSmrg]) # XORG_CHECK_LINUXDOC 1829e96acad6Smrg 1830cfa76ccdSmrg# XORG_CHECK_DOCBOOK 1831cfa76ccdSmrg# ------------------- 1832cfa76ccdSmrg# Minimum version: 1.0.0 1833cfa76ccdSmrg# 1834cfa76ccdSmrg# Checks for the ability to build output formats from SGML DocBook source. 1835cfa76ccdSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1836cfa76ccdSmrg# indicates whether the necessary tools and files are found and, if set, 1837cfa76ccdSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1838cfa76ccdSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1839cfa76ccdSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1840e96acad6Smrg 1841cfa76ccdSmrgBUILDTXTDOC=no 1842cfa76ccdSmrgBUILDPDFDOC=no 1843cfa76ccdSmrgBUILDPSDOC=no 1844cfa76ccdSmrgBUILDHTMLDOC=no 1845dbbd9e4bSmacallan 1846cfa76ccdSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1847cfa76ccdSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1848cfa76ccdSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1849cfa76ccdSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1850dbbd9e4bSmacallan 1851cfa76ccdSmrgAC_MSG_CHECKING([whether to build text documentation]) 1852cfa76ccdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1853cfa76ccdSmrg test x$BUILD_TXTDOC != xno; then 1854cfa76ccdSmrg BUILDTXTDOC=yes 1855cfa76ccdSmrgfi 1856cfa76ccdSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1857cfa76ccdSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1858dbbd9e4bSmacallan 1859cfa76ccdSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1860cfa76ccdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1861cfa76ccdSmrg test x$BUILD_PDFDOC != xno; then 1862cfa76ccdSmrg BUILDPDFDOC=yes 1863cfa76ccdSmrgfi 1864cfa76ccdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1865cfa76ccdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1866dbbd9e4bSmacallan 1867cfa76ccdSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1868cfa76ccdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1869cfa76ccdSmrg test x$BUILD_PSDOC != xno; then 1870cfa76ccdSmrg BUILDPSDOC=yes 1871dbbd9e4bSmacallanfi 1872cfa76ccdSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1873cfa76ccdSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1874dbbd9e4bSmacallan 1875cfa76ccdSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1876cfa76ccdSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1877cfa76ccdSmrg test x$BUILD_HTMLDOC != xno; then 1878cfa76ccdSmrg BUILDHTMLDOC=yes 1879cfa76ccdSmrgfi 1880cfa76ccdSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1881cfa76ccdSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1882dbbd9e4bSmacallan 1883cfa76ccdSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1884cfa76ccdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1885cfa76ccdSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1886cfa76ccdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1887e96acad6Smrg 1888cfa76ccdSmrgAC_SUBST(MAKE_TEXT) 1889cfa76ccdSmrgAC_SUBST(MAKE_PS) 1890cfa76ccdSmrgAC_SUBST(MAKE_PDF) 1891cfa76ccdSmrgAC_SUBST(MAKE_HTML) 1892cfa76ccdSmrg]) # XORG_CHECK_DOCBOOK 1893e96acad6Smrg 1894cfa76ccdSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1895cfa76ccdSmrg# ---------------- 1896cfa76ccdSmrg# Minimum version: 1.5.0 1897cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1898cfa76ccdSmrg# 1899cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 1900cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 1901cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1902cfa76ccdSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1903cfa76ccdSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1904cfa76ccdSmrg# --with-xmlto assumes 'auto'. 1905cfa76ccdSmrg# 1906cfa76ccdSmrg# Interface to module: 1907cfa76ccdSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1908cfa76ccdSmrg# XMLTO: returns the path of the xmlto program found 1909cfa76ccdSmrg# returns the path set by the user in the environment 1910cfa76ccdSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1911cfa76ccdSmrg# 'no' user instructs the module not to use xmlto 1912cfa76ccdSmrg# 1913cfa76ccdSmrg# Added in version 1.10.0 1914cfa76ccdSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1915cfa76ccdSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1916cfa76ccdSmrg# 1917cfa76ccdSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1918cfa76ccdSmrg# 1919cfa76ccdSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1920cfa76ccdSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1921cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 1922cfa76ccdSmrgAC_ARG_WITH(xmlto, 1923cfa76ccdSmrg AS_HELP_STRING([--with-xmlto], 1924cfa76ccdSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1925cfa76ccdSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1926cfa76ccdSmrgm4_undefine([_defopt]) 1927cfa76ccdSmrg 1928cfa76ccdSmrgif test "x$use_xmlto" = x"auto"; then 1929cfa76ccdSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1930cfa76ccdSmrg if test "x$XMLTO" = "x"; then 1931cfa76ccdSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1932cfa76ccdSmrg have_xmlto=no 1933cfa76ccdSmrg else 1934cfa76ccdSmrg have_xmlto=yes 1935cfa76ccdSmrg fi 1936cfa76ccdSmrgelif test "x$use_xmlto" = x"yes" ; then 1937cfa76ccdSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1938cfa76ccdSmrg if test "x$XMLTO" = "x"; then 1939cfa76ccdSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1940cfa76ccdSmrg fi 1941cfa76ccdSmrg have_xmlto=yes 1942cfa76ccdSmrgelif test "x$use_xmlto" = x"no" ; then 1943cfa76ccdSmrg if test "x$XMLTO" != "x"; then 1944cfa76ccdSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1945cfa76ccdSmrg fi 1946cfa76ccdSmrg have_xmlto=no 1947dbbd9e4bSmacallanelse 1948cfa76ccdSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1949dbbd9e4bSmacallanfi 1950dbbd9e4bSmacallan 1951cfa76ccdSmrg# Test for a minimum version of xmlto, if provided. 1952cfa76ccdSmrgm4_ifval([$1], 1953cfa76ccdSmrg[if test "$have_xmlto" = yes; then 1954cfa76ccdSmrg # scrape the xmlto version 1955cfa76ccdSmrg AC_MSG_CHECKING([the xmlto version]) 1956cfa76ccdSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1957cfa76ccdSmrg AC_MSG_RESULT([$xmlto_version]) 1958cfa76ccdSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1959cfa76ccdSmrg [if test "x$use_xmlto" = xauto; then 1960cfa76ccdSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1961cfa76ccdSmrg have_xmlto=no 1962cfa76ccdSmrg else 1963cfa76ccdSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1964cfa76ccdSmrg fi]) 1965cfa76ccdSmrgfi]) 1966dbbd9e4bSmacallan 1967cfa76ccdSmrg# Test for the ability of xmlto to generate a text target 1968cfa76ccdSmrg# 1969cfa76ccdSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1970cfa76ccdSmrg# following test for empty XML docbook files. 1971cfa76ccdSmrg# For compatibility reasons use the following empty XML docbook file and if 1972cfa76ccdSmrg# it fails try it again with a non-empty XML file. 1973cfa76ccdSmrghave_xmlto_text=no 1974cfa76ccdSmrgcat > conftest.xml << "EOF" 1975cfa76ccdSmrgEOF 1976cfa76ccdSmrgAS_IF([test "$have_xmlto" = yes], 1977cfa76ccdSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1978cfa76ccdSmrg [have_xmlto_text=yes], 1979cfa76ccdSmrg [# Try it again with a non-empty XML file. 1980cfa76ccdSmrg cat > conftest.xml << "EOF" 1981cfa76ccdSmrg<x></x> 1982cfa76ccdSmrgEOF 1983cfa76ccdSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1984cfa76ccdSmrg [have_xmlto_text=yes], 1985cfa76ccdSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1986cfa76ccdSmrgrm -f conftest.xml 1987cfa76ccdSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1988cfa76ccdSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1989cfa76ccdSmrg]) # XORG_WITH_XMLTO 1990dbbd9e4bSmacallan 1991cfa76ccdSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1992cfa76ccdSmrg# -------------------------------------------- 1993cfa76ccdSmrg# Minimum version: 1.12.0 1994cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1995cfa76ccdSmrg# 1996cfa76ccdSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1997cfa76ccdSmrg# XML-based language used for the transformation of XML documents. 1998cfa76ccdSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1999cfa76ccdSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 2000cfa76ccdSmrg# The XSLT processor is often used as a standalone tool for transformations. 2001cfa76ccdSmrg# It should not be assumed that this tool is used only to work with documnetation. 2002cfa76ccdSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 2003cfa76ccdSmrg# 2004cfa76ccdSmrg# Interface to module: 2005cfa76ccdSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 2006cfa76ccdSmrg# XSLTPROC: returns the path of the xsltproc program found 2007cfa76ccdSmrg# returns the path set by the user in the environment 2008cfa76ccdSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 2009cfa76ccdSmrg# 'no' user instructs the module not to use xsltproc 2010cfa76ccdSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 2011cfa76ccdSmrg# 2012cfa76ccdSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 2013cfa76ccdSmrg# 2014cfa76ccdSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 2015cfa76ccdSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 2016cfa76ccdSmrg# Preserves the interface, should it be implemented later 2017cfa76ccdSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 2018cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2019cfa76ccdSmrgAC_ARG_WITH(xsltproc, 2020cfa76ccdSmrg AS_HELP_STRING([--with-xsltproc], 2021cfa76ccdSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 2022cfa76ccdSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 2023cfa76ccdSmrgm4_undefine([_defopt]) 2024dbbd9e4bSmacallan 2025cfa76ccdSmrgif test "x$use_xsltproc" = x"auto"; then 2026cfa76ccdSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 2027cfa76ccdSmrg if test "x$XSLTPROC" = "x"; then 2028cfa76ccdSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 2029cfa76ccdSmrg have_xsltproc=no 2030cfa76ccdSmrg else 2031cfa76ccdSmrg have_xsltproc=yes 2032cfa76ccdSmrg fi 2033cfa76ccdSmrgelif test "x$use_xsltproc" = x"yes" ; then 2034cfa76ccdSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 2035cfa76ccdSmrg if test "x$XSLTPROC" = "x"; then 2036cfa76ccdSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 2037cfa76ccdSmrg fi 2038cfa76ccdSmrg have_xsltproc=yes 2039cfa76ccdSmrgelif test "x$use_xsltproc" = x"no" ; then 2040cfa76ccdSmrg if test "x$XSLTPROC" != "x"; then 2041cfa76ccdSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 2042cfa76ccdSmrg fi 2043cfa76ccdSmrg have_xsltproc=no 2044cfa76ccdSmrgelse 2045cfa76ccdSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 2046cfa76ccdSmrgfi 2047dbbd9e4bSmacallan 2048cfa76ccdSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 2049cfa76ccdSmrg]) # XORG_WITH_XSLTPROC 2050dbbd9e4bSmacallan 2051cfa76ccdSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 2052cfa76ccdSmrg# ---------------------------------------- 2053cfa76ccdSmrg# Minimum version: 1.15.0 2054cfa76ccdSmrg# 2055cfa76ccdSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 2056cfa76ccdSmrg# scanning arbitrary text files, extracting information from those text files, 2057cfa76ccdSmrg# and printing reports based on that information. 2058cfa76ccdSmrg# 2059cfa76ccdSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 2060cfa76ccdSmrg# 2061cfa76ccdSmrg# Interface to module: 2062cfa76ccdSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 2063cfa76ccdSmrg# PERL: returns the path of the perl program found 2064cfa76ccdSmrg# returns the path set by the user in the environment 2065cfa76ccdSmrg# --with-perl: 'yes' user instructs the module to use perl 2066cfa76ccdSmrg# 'no' user instructs the module not to use perl 2067cfa76ccdSmrg# have_perl: returns yes if perl found in PATH or no 2068cfa76ccdSmrg# 2069cfa76ccdSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 2070cfa76ccdSmrg# 2071cfa76ccdSmrgAC_DEFUN([XORG_WITH_PERL],[ 2072cfa76ccdSmrgAC_ARG_VAR([PERL], [Path to perl command]) 2073cfa76ccdSmrg# Preserves the interface, should it be implemented later 2074cfa76ccdSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 2075cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2076cfa76ccdSmrgAC_ARG_WITH(perl, 2077cfa76ccdSmrg AS_HELP_STRING([--with-perl], 2078cfa76ccdSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 2079cfa76ccdSmrg [use_perl=$withval], [use_perl=]_defopt) 2080cfa76ccdSmrgm4_undefine([_defopt]) 2081dbbd9e4bSmacallan 2082cfa76ccdSmrgif test "x$use_perl" = x"auto"; then 2083cfa76ccdSmrg AC_PATH_PROG([PERL], [perl]) 2084cfa76ccdSmrg if test "x$PERL" = "x"; then 2085cfa76ccdSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 2086cfa76ccdSmrg have_perl=no 2087cfa76ccdSmrg else 2088cfa76ccdSmrg have_perl=yes 2089cfa76ccdSmrg fi 2090cfa76ccdSmrgelif test "x$use_perl" = x"yes" ; then 2091cfa76ccdSmrg AC_PATH_PROG([PERL], [perl]) 2092cfa76ccdSmrg if test "x$PERL" = "x"; then 2093cfa76ccdSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 2094cfa76ccdSmrg fi 2095cfa76ccdSmrg have_perl=yes 2096cfa76ccdSmrgelif test "x$use_perl" = x"no" ; then 2097cfa76ccdSmrg if test "x$PERL" != "x"; then 2098cfa76ccdSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 2099cfa76ccdSmrg fi 2100cfa76ccdSmrg have_perl=no 2101e96acad6Smrgelse 2102cfa76ccdSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2103e96acad6Smrgfi 2104dbbd9e4bSmacallan 2105cfa76ccdSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2106cfa76ccdSmrg]) # XORG_WITH_PERL 2107dbbd9e4bSmacallan 2108cfa76ccdSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2109e96acad6Smrg# ---------------- 2110cfa76ccdSmrg# Minimum version: 1.5.0 2111cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2112cfa76ccdSmrg# 2113cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2114cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 2115cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2116cfa76ccdSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2117cfa76ccdSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2118cfa76ccdSmrg# --with-asciidoc assumes 'auto'. 2119cfa76ccdSmrg# 2120cfa76ccdSmrg# Interface to module: 2121cfa76ccdSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2122cfa76ccdSmrg# ASCIIDOC: returns the path of the asciidoc program found 2123cfa76ccdSmrg# returns the path set by the user in the environment 2124cfa76ccdSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2125cfa76ccdSmrg# 'no' user instructs the module not to use asciidoc 2126cfa76ccdSmrg# 2127cfa76ccdSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2128cfa76ccdSmrg# 2129cfa76ccdSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2130cfa76ccdSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2131cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2132cfa76ccdSmrgAC_ARG_WITH(asciidoc, 2133cfa76ccdSmrg AS_HELP_STRING([--with-asciidoc], 2134cfa76ccdSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2135cfa76ccdSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2136cfa76ccdSmrgm4_undefine([_defopt]) 2137dbbd9e4bSmacallan 2138cfa76ccdSmrgif test "x$use_asciidoc" = x"auto"; then 2139cfa76ccdSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2140cfa76ccdSmrg if test "x$ASCIIDOC" = "x"; then 2141cfa76ccdSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2142cfa76ccdSmrg have_asciidoc=no 2143cfa76ccdSmrg else 2144cfa76ccdSmrg have_asciidoc=yes 2145cfa76ccdSmrg fi 2146cfa76ccdSmrgelif test "x$use_asciidoc" = x"yes" ; then 2147cfa76ccdSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2148cfa76ccdSmrg if test "x$ASCIIDOC" = "x"; then 2149cfa76ccdSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2150cfa76ccdSmrg fi 2151cfa76ccdSmrg have_asciidoc=yes 2152cfa76ccdSmrgelif test "x$use_asciidoc" = x"no" ; then 2153cfa76ccdSmrg if test "x$ASCIIDOC" != "x"; then 2154cfa76ccdSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2155cfa76ccdSmrg fi 2156cfa76ccdSmrg have_asciidoc=no 2157e96acad6Smrgelse 2158cfa76ccdSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2159e96acad6Smrgfi 2160cfa76ccdSmrgm4_ifval([$1], 2161cfa76ccdSmrg[if test "$have_asciidoc" = yes; then 2162cfa76ccdSmrg # scrape the asciidoc version 2163cfa76ccdSmrg AC_MSG_CHECKING([the asciidoc version]) 2164cfa76ccdSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2165cfa76ccdSmrg AC_MSG_RESULT([$asciidoc_version]) 2166cfa76ccdSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2167cfa76ccdSmrg [if test "x$use_asciidoc" = xauto; then 2168cfa76ccdSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2169cfa76ccdSmrg have_asciidoc=no 2170cfa76ccdSmrg else 2171cfa76ccdSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2172cfa76ccdSmrg fi]) 2173cfa76ccdSmrgfi]) 2174cfa76ccdSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2175cfa76ccdSmrg]) # XORG_WITH_ASCIIDOC 2176e96acad6Smrg 2177cfa76ccdSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2178cfa76ccdSmrg# ------------------------------------------- 2179cfa76ccdSmrg# Minimum version: 1.5.0 2180cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2181cfa76ccdSmrg# Minimum version for optional DOT checking: 1.18.0 2182cfa76ccdSmrg# 2183cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2184cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 2185cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2186cfa76ccdSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2187cfa76ccdSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2188cfa76ccdSmrg# --with-doxygen assumes 'auto'. 2189cfa76ccdSmrg# 2190cfa76ccdSmrg# Interface to module: 2191cfa76ccdSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2192cfa76ccdSmrg# DOXYGEN: returns the path of the doxygen program found 2193cfa76ccdSmrg# returns the path set by the user in the environment 2194cfa76ccdSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2195cfa76ccdSmrg# 'no' user instructs the module not to use doxygen 2196cfa76ccdSmrg# 2197cfa76ccdSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2198cfa76ccdSmrg# 2199cfa76ccdSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2200cfa76ccdSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2201cfa76ccdSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2202cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2203cfa76ccdSmrgAC_ARG_WITH(doxygen, 2204cfa76ccdSmrg AS_HELP_STRING([--with-doxygen], 2205cfa76ccdSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2206cfa76ccdSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2207cfa76ccdSmrgm4_undefine([_defopt]) 2208e96acad6Smrg 2209cfa76ccdSmrgif test "x$use_doxygen" = x"auto"; then 2210cfa76ccdSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2211cfa76ccdSmrg if test "x$DOXYGEN" = "x"; then 2212cfa76ccdSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2213cfa76ccdSmrg have_doxygen=no 2214cfa76ccdSmrg else 2215cfa76ccdSmrg have_doxygen=yes 2216cfa76ccdSmrg fi 2217cfa76ccdSmrgelif test "x$use_doxygen" = x"yes" ; then 2218cfa76ccdSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2219cfa76ccdSmrg if test "x$DOXYGEN" = "x"; then 2220cfa76ccdSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2221cfa76ccdSmrg fi 2222cfa76ccdSmrg have_doxygen=yes 2223cfa76ccdSmrgelif test "x$use_doxygen" = x"no" ; then 2224cfa76ccdSmrg if test "x$DOXYGEN" != "x"; then 2225cfa76ccdSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2226cfa76ccdSmrg fi 2227cfa76ccdSmrg have_doxygen=no 2228e96acad6Smrgelse 2229cfa76ccdSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2230cfa76ccdSmrgfi 2231cfa76ccdSmrgm4_ifval([$1], 2232cfa76ccdSmrg[if test "$have_doxygen" = yes; then 2233cfa76ccdSmrg # scrape the doxygen version 2234cfa76ccdSmrg AC_MSG_CHECKING([the doxygen version]) 2235cfa76ccdSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2236cfa76ccdSmrg AC_MSG_RESULT([$doxygen_version]) 2237cfa76ccdSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2238cfa76ccdSmrg [if test "x$use_doxygen" = xauto; then 2239cfa76ccdSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2240cfa76ccdSmrg have_doxygen=no 2241cfa76ccdSmrg else 2242cfa76ccdSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2243cfa76ccdSmrg fi]) 2244cfa76ccdSmrgfi]) 2245e96acad6Smrg 2246cfa76ccdSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2247cfa76ccdSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2248cfa76ccdSmrgdnl HAVE_DOT = @HAVE_DOT@ 2249cfa76ccdSmrgHAVE_DOT=no 2250cfa76ccdSmrgif test "x$have_doxygen" = "xyes"; then 2251cfa76ccdSmrg AC_PATH_PROG([DOT], [dot]) 2252cfa76ccdSmrg if test "x$DOT" != "x"; then 2253cfa76ccdSmrg HAVE_DOT=yes 2254dbbd9e4bSmacallan fi 2255e96acad6Smrgfi 2256dbbd9e4bSmacallan 2257cfa76ccdSmrgAC_SUBST([HAVE_DOT]) 2258cfa76ccdSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2259cfa76ccdSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2260cfa76ccdSmrg]) # XORG_WITH_DOXYGEN 2261dbbd9e4bSmacallan 2262cfa76ccdSmrg# XORG_WITH_GROFF([DEFAULT]) 2263cfa76ccdSmrg# ---------------- 2264cfa76ccdSmrg# Minimum version: 1.6.0 2265cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2266cfa76ccdSmrg# 2267cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2268cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 2269cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2270cfa76ccdSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 2271cfa76ccdSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2272cfa76ccdSmrg# --with-groff assumes 'auto'. 2273cfa76ccdSmrg# 2274cfa76ccdSmrg# Interface to module: 2275cfa76ccdSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2276cfa76ccdSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2277cfa76ccdSmrg# HAVE_GROFF_MS: the -ms macros package 2278cfa76ccdSmrg# GROFF: returns the path of the groff program found 2279cfa76ccdSmrg# returns the path set by the user in the environment 2280cfa76ccdSmrg# --with-groff: 'yes' user instructs the module to use groff 2281cfa76ccdSmrg# 'no' user instructs the module not to use groff 2282cfa76ccdSmrg# 2283cfa76ccdSmrg# Added in version 1.9.0: 2284cfa76ccdSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2285cfa76ccdSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2286cfa76ccdSmrg# psselect from the psutils package. 2287cfa76ccdSmrg# the ghostcript package. Refer to the grohtml man pages 2288cfa76ccdSmrg# 2289cfa76ccdSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2290cfa76ccdSmrg# 2291cfa76ccdSmrg# OS and distros often splits groff in a basic and full package, the former 2292cfa76ccdSmrg# having the groff program and the later having devices, fonts and macros 2293cfa76ccdSmrg# Checking for the groff executable is not enough. 2294cfa76ccdSmrg# 2295cfa76ccdSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2296cfa76ccdSmrg# unset HAVE_GROFF or GROFF env variables. 2297cfa76ccdSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2298cfa76ccdSmrg# 2299cfa76ccdSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2300cfa76ccdSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2301cfa76ccdSmrgm4_define([_defopt], m4_default([$1], [auto])) 2302cfa76ccdSmrgAC_ARG_WITH(groff, 2303cfa76ccdSmrg AS_HELP_STRING([--with-groff], 2304cfa76ccdSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2305cfa76ccdSmrg [use_groff=$withval], [use_groff=]_defopt) 2306cfa76ccdSmrgm4_undefine([_defopt]) 2307e96acad6Smrg 2308cfa76ccdSmrgif test "x$use_groff" = x"auto"; then 2309cfa76ccdSmrg AC_PATH_PROG([GROFF], [groff]) 2310cfa76ccdSmrg if test "x$GROFF" = "x"; then 2311cfa76ccdSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2312cfa76ccdSmrg have_groff=no 2313cfa76ccdSmrg else 2314cfa76ccdSmrg have_groff=yes 2315e96acad6Smrg fi 2316cfa76ccdSmrgelif test "x$use_groff" = x"yes" ; then 2317cfa76ccdSmrg AC_PATH_PROG([GROFF], [groff]) 2318cfa76ccdSmrg if test "x$GROFF" = "x"; then 2319cfa76ccdSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2320cfa76ccdSmrg fi 2321cfa76ccdSmrg have_groff=yes 2322cfa76ccdSmrgelif test "x$use_groff" = x"no" ; then 2323cfa76ccdSmrg if test "x$GROFF" != "x"; then 2324cfa76ccdSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2325cfa76ccdSmrg fi 2326cfa76ccdSmrg have_groff=no 2327e96acad6Smrgelse 2328cfa76ccdSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2329e96acad6Smrgfi 2330dbbd9e4bSmacallan 2331cfa76ccdSmrg# We have groff, test for the presence of the macro packages 2332cfa76ccdSmrgif test "x$have_groff" = x"yes"; then 2333cfa76ccdSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2334cfa76ccdSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2335cfa76ccdSmrg groff_ms_works=yes 2336cfa76ccdSmrg else 2337cfa76ccdSmrg groff_ms_works=no 2338cfa76ccdSmrg fi 2339cfa76ccdSmrg AC_MSG_RESULT([$groff_ms_works]) 2340cfa76ccdSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2341cfa76ccdSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2342cfa76ccdSmrg groff_mm_works=yes 2343cfa76ccdSmrg else 2344cfa76ccdSmrg groff_mm_works=no 2345cfa76ccdSmrg fi 2346cfa76ccdSmrg AC_MSG_RESULT([$groff_mm_works]) 2347cfa76ccdSmrgfi 2348dbbd9e4bSmacallan 2349cfa76ccdSmrg# We have groff, test for HTML dependencies, one command per package 2350cfa76ccdSmrgif test "x$have_groff" = x"yes"; then 2351cfa76ccdSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2352cfa76ccdSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2353cfa76ccdSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2354cfa76ccdSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2355cfa76ccdSmrg have_groff_html=yes 2356cfa76ccdSmrg else 2357cfa76ccdSmrg have_groff_html=no 2358cfa76ccdSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2359cfa76ccdSmrg fi 2360e96acad6Smrgfi 2361e96acad6Smrg 2362cfa76ccdSmrg# Set Automake conditionals for Makefiles 2363cfa76ccdSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2364cfa76ccdSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2365cfa76ccdSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2366cfa76ccdSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2367cfa76ccdSmrg]) # XORG_WITH_GROFF 2368e96acad6Smrg 2369cfa76ccdSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2370cfa76ccdSmrg# --------------------------------------- 2371cfa76ccdSmrg# Minimum version: 1.6.0 2372cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2373cfa76ccdSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2374cfa76ccdSmrg# 2375cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2376cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 2377cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2378cfa76ccdSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 2379cfa76ccdSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2380cfa76ccdSmrg# --with-fop assumes 'auto'. 2381cfa76ccdSmrg# 2382cfa76ccdSmrg# Interface to module: 2383cfa76ccdSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2384cfa76ccdSmrg# FOP: returns the path of the fop program found 2385cfa76ccdSmrg# returns the path set by the user in the environment 2386cfa76ccdSmrg# --with-fop: 'yes' user instructs the module to use fop 2387cfa76ccdSmrg# 'no' user instructs the module not to use fop 2388cfa76ccdSmrg# 2389cfa76ccdSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2390cfa76ccdSmrg# 2391cfa76ccdSmrgAC_DEFUN([XORG_WITH_FOP],[ 2392cfa76ccdSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2393cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2394cfa76ccdSmrgAC_ARG_WITH(fop, 2395cfa76ccdSmrg AS_HELP_STRING([--with-fop], 2396cfa76ccdSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2397cfa76ccdSmrg [use_fop=$withval], [use_fop=]_defopt) 2398cfa76ccdSmrgm4_undefine([_defopt]) 2399e96acad6Smrg 2400cfa76ccdSmrgif test "x$use_fop" = x"auto"; then 2401cfa76ccdSmrg AC_PATH_PROG([FOP], [fop]) 2402cfa76ccdSmrg if test "x$FOP" = "x"; then 2403cfa76ccdSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2404cfa76ccdSmrg have_fop=no 2405cfa76ccdSmrg else 2406cfa76ccdSmrg have_fop=yes 2407cfa76ccdSmrg fi 2408cfa76ccdSmrgelif test "x$use_fop" = x"yes" ; then 2409cfa76ccdSmrg AC_PATH_PROG([FOP], [fop]) 2410cfa76ccdSmrg if test "x$FOP" = "x"; then 2411cfa76ccdSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2412cfa76ccdSmrg fi 2413cfa76ccdSmrg have_fop=yes 2414cfa76ccdSmrgelif test "x$use_fop" = x"no" ; then 2415cfa76ccdSmrg if test "x$FOP" != "x"; then 2416cfa76ccdSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2417cfa76ccdSmrg fi 2418cfa76ccdSmrg have_fop=no 2419e96acad6Smrgelse 2420cfa76ccdSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2421e96acad6Smrgfi 2422dbbd9e4bSmacallan 2423cfa76ccdSmrg# Test for a minimum version of fop, if provided. 2424cfa76ccdSmrgm4_ifval([$1], 2425cfa76ccdSmrg[if test "$have_fop" = yes; then 2426cfa76ccdSmrg # scrape the fop version 2427cfa76ccdSmrg AC_MSG_CHECKING([for fop minimum version]) 2428cfa76ccdSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2429cfa76ccdSmrg AC_MSG_RESULT([$fop_version]) 2430cfa76ccdSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2431cfa76ccdSmrg [if test "x$use_fop" = xauto; then 2432cfa76ccdSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2433cfa76ccdSmrg have_fop=no 2434cfa76ccdSmrg else 2435cfa76ccdSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2436cfa76ccdSmrg fi]) 2437cfa76ccdSmrgfi]) 2438cfa76ccdSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2439cfa76ccdSmrg]) # XORG_WITH_FOP 2440cfa76ccdSmrg 2441cfa76ccdSmrg# XORG_WITH_M4([MIN-VERSION]) 2442cfa76ccdSmrg# --------------------------- 2443cfa76ccdSmrg# Minimum version: 1.19.0 2444cfa76ccdSmrg# 2445cfa76ccdSmrg# This macro attempts to locate an m4 macro processor which supports 2446cfa76ccdSmrg# -I option and is only useful for modules relying on M4 in order to 2447cfa76ccdSmrg# expand macros in source code files. 2448cfa76ccdSmrg# 2449cfa76ccdSmrg# Interface to module: 2450cfa76ccdSmrg# M4: returns the path of the m4 program found 2451cfa76ccdSmrg# returns the path set by the user in the environment 2452cfa76ccdSmrg# 2453cfa76ccdSmrgAC_DEFUN([XORG_WITH_M4], [ 2454cfa76ccdSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2455cfa76ccdSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2456cfa76ccdSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2457cfa76ccdSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2458cfa76ccdSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2459cfa76ccdSmrg [$PATH:/usr/gnu/bin])]) 2460dbbd9e4bSmacallan 2461cfa76ccdSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2462cfa76ccdSmrg]) # XORG_WITH_M4 2463dbbd9e4bSmacallan 2464cfa76ccdSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2465e96acad6Smrg# ---------------- 2466cfa76ccdSmrg# Minimum version: 1.6.0 2467cfa76ccdSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2468cfa76ccdSmrg# 2469cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2470cfa76ccdSmrg# not at the appropriate level. This macro enables a module to test for the 2471cfa76ccdSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2472cfa76ccdSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2473cfa76ccdSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2474cfa76ccdSmrg# --with-ps2pdf assumes 'auto'. 2475cfa76ccdSmrg# 2476cfa76ccdSmrg# Interface to module: 2477cfa76ccdSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2478cfa76ccdSmrg# PS2PDF: returns the path of the ps2pdf program found 2479cfa76ccdSmrg# returns the path set by the user in the environment 2480cfa76ccdSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2481cfa76ccdSmrg# 'no' user instructs the module not to use ps2pdf 2482cfa76ccdSmrg# 2483cfa76ccdSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2484cfa76ccdSmrg# 2485cfa76ccdSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2486cfa76ccdSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2487cfa76ccdSmrgm4_define([_defopt], m4_default([$1], [auto])) 2488cfa76ccdSmrgAC_ARG_WITH(ps2pdf, 2489cfa76ccdSmrg AS_HELP_STRING([--with-ps2pdf], 2490cfa76ccdSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2491cfa76ccdSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2492cfa76ccdSmrgm4_undefine([_defopt]) 2493dbbd9e4bSmacallan 2494cfa76ccdSmrgif test "x$use_ps2pdf" = x"auto"; then 2495cfa76ccdSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2496cfa76ccdSmrg if test "x$PS2PDF" = "x"; then 2497cfa76ccdSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2498cfa76ccdSmrg have_ps2pdf=no 2499cfa76ccdSmrg else 2500cfa76ccdSmrg have_ps2pdf=yes 2501cfa76ccdSmrg fi 2502cfa76ccdSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2503cfa76ccdSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2504cfa76ccdSmrg if test "x$PS2PDF" = "x"; then 2505cfa76ccdSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2506cfa76ccdSmrg fi 2507cfa76ccdSmrg have_ps2pdf=yes 2508cfa76ccdSmrgelif test "x$use_ps2pdf" = x"no" ; then 2509cfa76ccdSmrg if test "x$PS2PDF" != "x"; then 2510cfa76ccdSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2511cfa76ccdSmrg fi 2512cfa76ccdSmrg have_ps2pdf=no 2513e96acad6Smrgelse 2514cfa76ccdSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2515cfa76ccdSmrgfi 2516cfa76ccdSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2517cfa76ccdSmrg]) # XORG_WITH_PS2PDF 2518dbbd9e4bSmacallan 2519cfa76ccdSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2520cfa76ccdSmrg# ---------------- 2521cfa76ccdSmrg# Minimum version: 1.6.0 2522cfa76ccdSmrg# 2523cfa76ccdSmrg# Documentation tools are not always available on all platforms and sometimes 2524cfa76ccdSmrg# not at the appropriate level. This macro enables a builder to skip all 2525cfa76ccdSmrg# documentation targets except traditional man pages. 2526cfa76ccdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2527cfa76ccdSmrg# maximum flexibilty in controlling documentation building. 2528cfa76ccdSmrg# Refer to: 2529cfa76ccdSmrg# XORG_WITH_XMLTO --with-xmlto 2530cfa76ccdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2531cfa76ccdSmrg# XORG_WITH_DOXYGEN --with-doxygen 2532cfa76ccdSmrg# XORG_WITH_FOP --with-fop 2533cfa76ccdSmrg# XORG_WITH_GROFF --with-groff 2534cfa76ccdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2535cfa76ccdSmrg# 2536cfa76ccdSmrg# Interface to module: 2537cfa76ccdSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2538cfa76ccdSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2539cfa76ccdSmrg# 'no' user instructs the module not to generate docs 2540cfa76ccdSmrg# parm1: specify the default value, yes or no. 2541cfa76ccdSmrg# 2542cfa76ccdSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2543cfa76ccdSmrgm4_define([docs_default], m4_default([$1], [yes])) 2544cfa76ccdSmrgAC_ARG_ENABLE(docs, 2545cfa76ccdSmrg AS_HELP_STRING([--enable-docs], 2546cfa76ccdSmrg [Enable building the documentation (default: ]docs_default[)]), 2547cfa76ccdSmrg [build_docs=$enableval], [build_docs=]docs_default) 2548cfa76ccdSmrgm4_undefine([docs_default]) 2549cfa76ccdSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2550cfa76ccdSmrgAC_MSG_CHECKING([whether to build documentation]) 2551cfa76ccdSmrgAC_MSG_RESULT([$build_docs]) 2552cfa76ccdSmrg]) # XORG_ENABLE_DOCS 2553dbbd9e4bSmacallan 2554cfa76ccdSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2555cfa76ccdSmrg# ---------------- 2556cfa76ccdSmrg# Minimum version: 1.6.0 2557cfa76ccdSmrg# 2558cfa76ccdSmrg# This macro enables a builder to skip all developer documentation. 2559cfa76ccdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2560cfa76ccdSmrg# maximum flexibilty in controlling documentation building. 2561cfa76ccdSmrg# Refer to: 2562cfa76ccdSmrg# XORG_WITH_XMLTO --with-xmlto 2563cfa76ccdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2564cfa76ccdSmrg# XORG_WITH_DOXYGEN --with-doxygen 2565cfa76ccdSmrg# XORG_WITH_FOP --with-fop 2566cfa76ccdSmrg# XORG_WITH_GROFF --with-groff 2567cfa76ccdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2568cfa76ccdSmrg# 2569cfa76ccdSmrg# Interface to module: 2570cfa76ccdSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2571cfa76ccdSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2572cfa76ccdSmrg# 'no' user instructs the module not to generate developer docs 2573cfa76ccdSmrg# parm1: specify the default value, yes or no. 2574cfa76ccdSmrg# 2575cfa76ccdSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2576cfa76ccdSmrgm4_define([devel_default], m4_default([$1], [yes])) 2577cfa76ccdSmrgAC_ARG_ENABLE(devel-docs, 2578cfa76ccdSmrg AS_HELP_STRING([--enable-devel-docs], 2579cfa76ccdSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2580cfa76ccdSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2581cfa76ccdSmrgm4_undefine([devel_default]) 2582cfa76ccdSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2583cfa76ccdSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2584cfa76ccdSmrgAC_MSG_RESULT([$build_devel_docs]) 2585cfa76ccdSmrg]) # XORG_ENABLE_DEVEL_DOCS 2586dbbd9e4bSmacallan 2587cfa76ccdSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2588cfa76ccdSmrg# ---------------- 2589cfa76ccdSmrg# Minimum version: 1.6.0 2590cfa76ccdSmrg# 2591cfa76ccdSmrg# This macro enables a builder to skip all functional specification targets. 2592cfa76ccdSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2593cfa76ccdSmrg# maximum flexibilty in controlling documentation building. 2594cfa76ccdSmrg# Refer to: 2595cfa76ccdSmrg# XORG_WITH_XMLTO --with-xmlto 2596cfa76ccdSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2597cfa76ccdSmrg# XORG_WITH_DOXYGEN --with-doxygen 2598cfa76ccdSmrg# XORG_WITH_FOP --with-fop 2599cfa76ccdSmrg# XORG_WITH_GROFF --with-groff 2600cfa76ccdSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2601cfa76ccdSmrg# 2602cfa76ccdSmrg# Interface to module: 2603cfa76ccdSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2604cfa76ccdSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2605cfa76ccdSmrg# 'no' user instructs the module not to generate specs 2606cfa76ccdSmrg# parm1: specify the default value, yes or no. 2607cfa76ccdSmrg# 2608cfa76ccdSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2609cfa76ccdSmrgm4_define([spec_default], m4_default([$1], [yes])) 2610cfa76ccdSmrgAC_ARG_ENABLE(specs, 2611cfa76ccdSmrg AS_HELP_STRING([--enable-specs], 2612cfa76ccdSmrg [Enable building the specs (default: ]spec_default[)]), 2613cfa76ccdSmrg [build_specs=$enableval], [build_specs=]spec_default) 2614cfa76ccdSmrgm4_undefine([spec_default]) 2615cfa76ccdSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2616cfa76ccdSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2617cfa76ccdSmrgAC_MSG_RESULT([$build_specs]) 2618cfa76ccdSmrg]) # XORG_ENABLE_SPECS 2619dbbd9e4bSmacallan 2620cfa76ccdSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2621cfa76ccdSmrg# ---------------------------------------------- 2622cfa76ccdSmrg# Minimum version: 1.13.0 2623cfa76ccdSmrg# 2624cfa76ccdSmrg# This macro enables a builder to enable/disable unit testing 2625cfa76ccdSmrg# It makes no assumption about the test cases implementation 2626cfa76ccdSmrg# Test cases may or may not use Automake "Support for test suites" 2627cfa76ccdSmrg# They may or may not use the software utility library GLib 2628cfa76ccdSmrg# 2629cfa76ccdSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2630cfa76ccdSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2631cfa76ccdSmrg# The variable enable_unit_tests is used by other macros in this file. 2632cfa76ccdSmrg# 2633cfa76ccdSmrg# Interface to module: 2634cfa76ccdSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2635cfa76ccdSmrg# enable_unit_tests: used in configure.ac for additional configuration 2636cfa76ccdSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2637cfa76ccdSmrg# 'no' user instructs the module not to build tests 2638cfa76ccdSmrg# parm1: specify the default value, yes or no. 2639cfa76ccdSmrg# 2640cfa76ccdSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2641cfa76ccdSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2642cfa76ccdSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2643cfa76ccdSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2644cfa76ccdSmrgm4_define([_defopt], m4_default([$1], [auto])) 2645cfa76ccdSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2646cfa76ccdSmrg [Enable building unit test cases (default: ]_defopt[)]), 2647cfa76ccdSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2648cfa76ccdSmrgm4_undefine([_defopt]) 2649cfa76ccdSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2650cfa76ccdSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2651cfa76ccdSmrgAC_MSG_RESULT([$enable_unit_tests]) 2652cfa76ccdSmrg]) # XORG_ENABLE_UNIT_TESTS 2653dbbd9e4bSmacallan 2654cfa76ccdSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2655cfa76ccdSmrg# ------------------------------------------------------ 2656cfa76ccdSmrg# Minimum version: 1.17.0 2657cfa76ccdSmrg# 2658cfa76ccdSmrg# This macro enables a builder to enable/disable integration testing 2659cfa76ccdSmrg# It makes no assumption about the test cases' implementation 2660cfa76ccdSmrg# Test cases may or may not use Automake "Support for test suites" 2661cfa76ccdSmrg# 2662cfa76ccdSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2663cfa76ccdSmrg# usually requires less dependencies and may be built and run under less 2664cfa76ccdSmrg# stringent environments than integration tests. 2665cfa76ccdSmrg# 2666cfa76ccdSmrg# Interface to module: 2667cfa76ccdSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2668cfa76ccdSmrg# enable_integration_tests: used in configure.ac for additional configuration 2669cfa76ccdSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2670cfa76ccdSmrg# 'no' user instructs the module not to build tests 2671cfa76ccdSmrg# parm1: specify the default value, yes or no. 2672cfa76ccdSmrg# 2673cfa76ccdSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2674cfa76ccdSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2675cfa76ccdSmrgm4_define([_defopt], m4_default([$1], [auto])) 2676cfa76ccdSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2677cfa76ccdSmrg [Enable building integration test cases (default: ]_defopt[)]), 2678cfa76ccdSmrg [enable_integration_tests=$enableval], 2679cfa76ccdSmrg [enable_integration_tests=]_defopt) 2680cfa76ccdSmrgm4_undefine([_defopt]) 2681cfa76ccdSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2682cfa76ccdSmrg [test "x$enable_integration_tests" != xno]) 2683cfa76ccdSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2684cfa76ccdSmrgAC_MSG_RESULT([$enable_integration_tests]) 2685cfa76ccdSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2686e96acad6Smrg 2687cfa76ccdSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2688cfa76ccdSmrg# ---------------------------------------- 2689cfa76ccdSmrg# Minimum version: 1.13.0 2690cfa76ccdSmrg# 2691cfa76ccdSmrg# GLib is a library which provides advanced data structures and functions. 2692cfa76ccdSmrg# This macro enables a module to test for the presence of Glib. 2693cfa76ccdSmrg# 2694cfa76ccdSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2695cfa76ccdSmrg# Otherwise the value of $enable_unit_tests is blank. 2696cfa76ccdSmrg# 2697cfa76ccdSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2698cfa76ccdSmrg# test support usually requires less dependencies and may be built and run under 2699cfa76ccdSmrg# less stringent environments than integration tests. 2700cfa76ccdSmrg# 2701cfa76ccdSmrg# Interface to module: 2702cfa76ccdSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2703cfa76ccdSmrg# with_glib: used in configure.ac to know if GLib has been found 2704cfa76ccdSmrg# --with-glib: 'yes' user instructs the module to use glib 2705cfa76ccdSmrg# 'no' user instructs the module not to use glib 2706cfa76ccdSmrg# 2707cfa76ccdSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2708cfa76ccdSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2709cfa76ccdSmrgm4_define([_defopt], m4_default([$2], [auto])) 2710cfa76ccdSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2711cfa76ccdSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2712cfa76ccdSmrg [with_glib=$withval], [with_glib=]_defopt) 2713cfa76ccdSmrgm4_undefine([_defopt]) 2714e96acad6Smrg 2715cfa76ccdSmrghave_glib=no 2716cfa76ccdSmrg# Do not probe GLib if user explicitly disabled unit testing 2717cfa76ccdSmrgif test "x$enable_unit_tests" != x"no"; then 2718cfa76ccdSmrg # Do not probe GLib if user explicitly disabled it 2719cfa76ccdSmrg if test "x$with_glib" != x"no"; then 2720cfa76ccdSmrg m4_ifval( 2721cfa76ccdSmrg [$1], 2722cfa76ccdSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2723cfa76ccdSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2724cfa76ccdSmrg ) 2725cfa76ccdSmrg fi 2726cfa76ccdSmrgfi 2727dbbd9e4bSmacallan 2728cfa76ccdSmrg# Not having GLib when unit testing has been explicitly requested is an error 2729cfa76ccdSmrgif test "x$enable_unit_tests" = x"yes"; then 2730cfa76ccdSmrg if test "x$have_glib" = x"no"; then 2731cfa76ccdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2732cfa76ccdSmrg fi 2733cfa76ccdSmrgfi 2734dbbd9e4bSmacallan 2735cfa76ccdSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2736cfa76ccdSmrgif test "x$enable_unit_tests" = x"no"; then 2737cfa76ccdSmrg if test "x$with_glib" = x"yes"; then 2738cfa76ccdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2739cfa76ccdSmrg fi 2740cfa76ccdSmrgfi 2741dbbd9e4bSmacallan 2742cfa76ccdSmrg# Not having GLib when it has been explicitly requested is an error 2743cfa76ccdSmrgif test "x$with_glib" = x"yes"; then 2744cfa76ccdSmrg if test "x$have_glib" = x"no"; then 2745cfa76ccdSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2746cfa76ccdSmrg fi 2747cfa76ccdSmrgfi 2748dbbd9e4bSmacallan 2749cfa76ccdSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2750cfa76ccdSmrg]) # XORG_WITH_GLIB 2751dbbd9e4bSmacallan 2752cfa76ccdSmrg# XORG_LD_WRAP([required|optional]) 2753cfa76ccdSmrg# --------------------------------- 2754cfa76ccdSmrg# Minimum version: 1.13.0 2755cfa76ccdSmrg# 2756cfa76ccdSmrg# Check if linker supports -wrap, passed via compiler flags 2757cfa76ccdSmrg# 2758cfa76ccdSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2759cfa76ccdSmrg# Otherwise the value of $enable_unit_tests is blank. 2760cfa76ccdSmrg# 2761cfa76ccdSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2762cfa76ccdSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2763cfa76ccdSmrg# available, an argument of "optional" allows use when some unit tests require 2764cfa76ccdSmrg# ld -wrap and others do not. 2765cfa76ccdSmrg# 2766cfa76ccdSmrgAC_DEFUN([XORG_LD_WRAP],[ 2767cfa76ccdSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2768cfa76ccdSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2769cfa76ccdSmrg void __wrap_exit(int status) { return; }], 2770cfa76ccdSmrg [exit(0);])]) 2771cfa76ccdSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2772cfa76ccdSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2773cfa76ccdSmrg if test "x$have_ld_wrap" = x"no"; then 2774cfa76ccdSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2775cfa76ccdSmrg fi 2776cfa76ccdSmrgfi 2777cfa76ccdSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2778cfa76ccdSmrg# 2779cfa76ccdSmrg]) # XORG_LD_WRAP 2780dbbd9e4bSmacallan 2781cfa76ccdSmrg# XORG_CHECK_LINKER_FLAGS 2782cfa76ccdSmrg# ----------------------- 2783cfa76ccdSmrg# SYNOPSIS 2784cfa76ccdSmrg# 2785cfa76ccdSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2786cfa76ccdSmrg# 2787cfa76ccdSmrg# DESCRIPTION 2788cfa76ccdSmrg# 2789cfa76ccdSmrg# Check whether the given linker FLAGS work with the current language's 2790cfa76ccdSmrg# linker, or whether they give an error. 2791cfa76ccdSmrg# 2792cfa76ccdSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2793cfa76ccdSmrg# success/failure. 2794cfa76ccdSmrg# 2795cfa76ccdSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2796cfa76ccdSmrg# 2797cfa76ccdSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2798cfa76ccdSmrg# 2799cfa76ccdSmrg# LICENSE 2800cfa76ccdSmrg# 2801cfa76ccdSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2802cfa76ccdSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2803cfa76ccdSmrg# Copyright (c) 2009 Matteo Frigo 2804cfa76ccdSmrg# 2805cfa76ccdSmrg# This program is free software: you can redistribute it and/or modify it 2806cfa76ccdSmrg# under the terms of the GNU General Public License as published by the 2807cfa76ccdSmrg# Free Software Foundation, either version 3 of the License, or (at your 2808cfa76ccdSmrg# option) any later version. 2809cfa76ccdSmrg# 2810cfa76ccdSmrg# This program is distributed in the hope that it will be useful, but 2811cfa76ccdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2812cfa76ccdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2813cfa76ccdSmrg# Public License for more details. 2814cfa76ccdSmrg# 2815cfa76ccdSmrg# You should have received a copy of the GNU General Public License along 2816cfa76ccdSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2817cfa76ccdSmrg# 2818cfa76ccdSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2819cfa76ccdSmrg# gives unlimited permission to copy, distribute and modify the configure 2820cfa76ccdSmrg# scripts that are the output of Autoconf when processing the Macro. You 2821cfa76ccdSmrg# need not follow the terms of the GNU General Public License when using 2822cfa76ccdSmrg# or distributing such scripts, even though portions of the text of the 2823cfa76ccdSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2824cfa76ccdSmrg# all other use of the material that constitutes the Autoconf Macro. 2825cfa76ccdSmrg# 2826cfa76ccdSmrg# This special exception to the GPL applies to versions of the Autoconf 2827cfa76ccdSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2828cfa76ccdSmrg# modified version of the Autoconf Macro, you may extend this special 2829cfa76ccdSmrg# exception to the GPL to apply to your modified version as well.# 2830cfa76ccdSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2831cfa76ccdSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2832cfa76ccdSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2833cfa76ccdSmrgAS_LITERAL_IF([$1], 2834cfa76ccdSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2835cfa76ccdSmrg ax_save_FLAGS=$LDFLAGS 2836cfa76ccdSmrg LDFLAGS="$1" 2837cfa76ccdSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2838cfa76ccdSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2839cfa76ccdSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2840cfa76ccdSmrg LDFLAGS=$ax_save_FLAGS])], 2841cfa76ccdSmrg [ax_save_FLAGS=$LDFLAGS 2842cfa76ccdSmrg LDFLAGS="$1" 2843cfa76ccdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2844cfa76ccdSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2845cfa76ccdSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2846cfa76ccdSmrg LDFLAGS=$ax_save_FLAGS]) 2847cfa76ccdSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2848cfa76ccdSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2849cfa76ccdSmrgif test "x$xorg_check_linker_flags" = xyes; then 2850cfa76ccdSmrg m4_default([$2], :) 2851cfa76ccdSmrgelse 2852cfa76ccdSmrg m4_default([$3], :) 2853cfa76ccdSmrgfi 2854cfa76ccdSmrg]) # XORG_CHECK_LINKER_FLAGS 2855dbbd9e4bSmacallan 2856cfa76ccdSmrg# XORG_MEMORY_CHECK_FLAGS 2857cfa76ccdSmrg# ----------------------- 2858cfa76ccdSmrg# Minimum version: 1.16.0 2859cfa76ccdSmrg# 2860cfa76ccdSmrg# This macro attempts to find appropriate memory checking functionality 2861cfa76ccdSmrg# for various platforms which unit testing code may use to catch various 2862cfa76ccdSmrg# forms of memory allocation and access errors in testing. 2863cfa76ccdSmrg# 2864cfa76ccdSmrg# Interface to module: 2865cfa76ccdSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2866cfa76ccdSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2867cfa76ccdSmrg# 2868cfa76ccdSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2869cfa76ccdSmrg# 2870cfa76ccdSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2871dbbd9e4bSmacallan 2872cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2873cfa76ccdSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2874cfa76ccdSmrg [Environment variables to enable memory checking in tests]) 2875dbbd9e4bSmacallan 2876cfa76ccdSmrg# Check for different types of support on different platforms 2877cfa76ccdSmrgcase $host_os in 2878cfa76ccdSmrg solaris*) 2879cfa76ccdSmrg AC_CHECK_LIB([umem], [umem_alloc], 2880cfa76ccdSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2881cfa76ccdSmrg ;; 2882cfa76ccdSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2883cfa76ccdSmrg # both directly and inverted, so should not be 0 or 255. 2884cfa76ccdSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2885cfa76ccdSmrg ;; 2886cfa76ccdSmrg darwin*) 2887cfa76ccdSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2888cfa76ccdSmrg ;; 2889cfa76ccdSmrg *bsd*) 2890cfa76ccdSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2891cfa76ccdSmrg ;; 2892cfa76ccdSmrgesac 2893dbbd9e4bSmacallan 2894cfa76ccdSmrg# User supplied flags override default flags 2895cfa76ccdSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2896cfa76ccdSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2897cfa76ccdSmrgfi 2898dbbd9e4bSmacallan 2899cfa76ccdSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2900cfa76ccdSmrg]) # XORG_WITH_LINT 2901dbbd9e4bSmacallan 2902cfa76ccdSmrg# XORG_CHECK_MALLOC_ZERO 2903cfa76ccdSmrg# ---------------------- 2904cfa76ccdSmrg# Minimum version: 1.0.0 2905cfa76ccdSmrg# 2906cfa76ccdSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2907cfa76ccdSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2908cfa76ccdSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2909cfa76ccdSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2910cfa76ccdSmrgAC_ARG_ENABLE(malloc0returnsnull, 2911cfa76ccdSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2912cfa76ccdSmrg [malloc(0) returns NULL (default: auto)]), 2913cfa76ccdSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2914cfa76ccdSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2915dbbd9e4bSmacallan 2916cfa76ccdSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2917cfa76ccdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2918cfa76ccdSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2919cfa76ccdSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2920cfa76ccdSmrg#include <stdlib.h> 2921cfa76ccdSmrg],[ 2922cfa76ccdSmrg char *m0, *r0, *c0, *p; 2923cfa76ccdSmrg m0 = malloc(0); 2924cfa76ccdSmrg p = malloc(10); 2925cfa76ccdSmrg r0 = realloc(p,0); 2926cfa76ccdSmrg c0 = calloc(0,10); 2927cfa76ccdSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2928cfa76ccdSmrg])], 2929cfa76ccdSmrg [xorg_cv_malloc0_returns_null=yes], 2930cfa76ccdSmrg [xorg_cv_malloc0_returns_null=no])]) 2931cfa76ccdSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2932cfa76ccdSmrgfi 2933cfa76ccdSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2934dbbd9e4bSmacallan 2935cfa76ccdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2936cfa76ccdSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2937cfa76ccdSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2938cfa76ccdSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2939cfa76ccdSmrgelse 2940cfa76ccdSmrg MALLOC_ZERO_CFLAGS="" 2941cfa76ccdSmrg XMALLOC_ZERO_CFLAGS="" 2942cfa76ccdSmrg XTMALLOC_ZERO_CFLAGS="" 2943cfa76ccdSmrgfi 2944e96acad6Smrg 2945cfa76ccdSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2946cfa76ccdSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2947cfa76ccdSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2948cfa76ccdSmrg]) # XORG_CHECK_MALLOC_ZERO 2949dbbd9e4bSmacallan 2950cfa76ccdSmrg# XORG_WITH_LINT() 2951cfa76ccdSmrg# ---------------- 2952cfa76ccdSmrg# Minimum version: 1.1.0 2953cfa76ccdSmrg# 2954cfa76ccdSmrg# This macro enables the use of a tool that flags some suspicious and 2955cfa76ccdSmrg# non-portable constructs (likely to be bugs) in C language source code. 2956cfa76ccdSmrg# It will attempt to locate the tool and use appropriate options. 2957cfa76ccdSmrg# There are various lint type tools on different platforms. 2958cfa76ccdSmrg# 2959cfa76ccdSmrg# Interface to module: 2960cfa76ccdSmrg# LINT: returns the path to the tool found on the platform 2961cfa76ccdSmrg# or the value set to LINT on the configure cmd line 2962cfa76ccdSmrg# also an Automake conditional 2963cfa76ccdSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2964cfa76ccdSmrg# 2965cfa76ccdSmrg# --with-lint: 'yes' user instructs the module to use lint 2966cfa76ccdSmrg# 'no' user instructs the module not to use lint (default) 2967cfa76ccdSmrg# 2968cfa76ccdSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2969cfa76ccdSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2970cfa76ccdSmrg# 2971cfa76ccdSmrgAC_DEFUN([XORG_WITH_LINT],[ 2972e96acad6Smrg 2973cfa76ccdSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2974cfa76ccdSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2975cfa76ccdSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2976cfa76ccdSmrg [Use a lint-style source code checker (default: disabled)])], 2977cfa76ccdSmrg [use_lint=$withval], [use_lint=no]) 2978e96acad6Smrg 2979cfa76ccdSmrg# Obtain platform specific info like program name and options 2980cfa76ccdSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2981cfa76ccdSmrgcase $host_os in 2982cfa76ccdSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2983cfa76ccdSmrg lint_name=splint 2984cfa76ccdSmrg lint_options="-badflag" 2985cfa76ccdSmrg ;; 2986cfa76ccdSmrg *freebsd* | *netbsd*) 2987cfa76ccdSmrg lint_name=lint 2988cfa76ccdSmrg lint_options="-u -b" 2989cfa76ccdSmrg ;; 2990cfa76ccdSmrg *solaris*) 2991cfa76ccdSmrg lint_name=lint 2992cfa76ccdSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2993cfa76ccdSmrg ;; 2994cfa76ccdSmrgesac 2995e96acad6Smrg 2996cfa76ccdSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2997cfa76ccdSmrgif test "x$use_lint" = x"yes" ; then 2998cfa76ccdSmrg AC_PATH_PROG([LINT], [$lint_name]) 2999cfa76ccdSmrg if test "x$LINT" = "x"; then 3000cfa76ccdSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 3001cfa76ccdSmrg fi 3002cfa76ccdSmrgelif test "x$use_lint" = x"no" ; then 3003cfa76ccdSmrg if test "x$LINT" != "x"; then 3004cfa76ccdSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 3005cfa76ccdSmrg fi 3006cfa76ccdSmrgelse 3007cfa76ccdSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 3008cfa76ccdSmrgfi 3009e96acad6Smrg 3010cfa76ccdSmrg# User supplied flags override default flags 3011cfa76ccdSmrgif test "x$LINT_FLAGS" != "x"; then 3012cfa76ccdSmrg lint_options=$LINT_FLAGS 3013cfa76ccdSmrgfi 3014dbbd9e4bSmacallan 3015cfa76ccdSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 3016cfa76ccdSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 3017dbbd9e4bSmacallan 3018cfa76ccdSmrg]) # XORG_WITH_LINT 3019dbbd9e4bSmacallan 3020cfa76ccdSmrg# XORG_LINT_LIBRARY(LIBNAME) 3021cfa76ccdSmrg# -------------------------- 3022cfa76ccdSmrg# Minimum version: 1.1.0 3023cfa76ccdSmrg# 3024cfa76ccdSmrg# Sets up flags for building lint libraries for checking programs that call 3025cfa76ccdSmrg# functions in the library. 3026cfa76ccdSmrg# 3027cfa76ccdSmrg# Interface to module: 3028cfa76ccdSmrg# LINTLIB - Automake variable with the name of lint library file to make 3029cfa76ccdSmrg# MAKE_LINT_LIB - Automake conditional 3030cfa76ccdSmrg# 3031cfa76ccdSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 3032cfa76ccdSmrg# - 'no' user instructs the module not to create a lint library (default) 3033dbbd9e4bSmacallan 3034cfa76ccdSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 3035cfa76ccdSmrgAC_REQUIRE([XORG_WITH_LINT]) 3036cfa76ccdSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 3037cfa76ccdSmrg [Create lint library (default: disabled)])], 3038cfa76ccdSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 3039dbbd9e4bSmacallan 3040cfa76ccdSmrgif test "x$make_lint_lib" = x"yes" ; then 3041cfa76ccdSmrg LINTLIB=llib-l$1.ln 3042cfa76ccdSmrg if test "x$LINT" = "x"; then 3043cfa76ccdSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 3044cfa76ccdSmrg fi 3045cfa76ccdSmrgelif test "x$make_lint_lib" != x"no" ; then 3046cfa76ccdSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 3047cfa76ccdSmrgfi 3048e96acad6Smrg 3049cfa76ccdSmrgAC_SUBST(LINTLIB) 3050cfa76ccdSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 3051dbbd9e4bSmacallan 3052cfa76ccdSmrg]) # XORG_LINT_LIBRARY 3053dbbd9e4bSmacallan 3054cfa76ccdSmrg# XORG_COMPILER_BRAND 3055cfa76ccdSmrg# ------------------- 3056cfa76ccdSmrg# Minimum version: 1.14.0 3057cfa76ccdSmrg# 3058cfa76ccdSmrg# Checks for various brands of compilers and sets flags as appropriate: 3059cfa76ccdSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 3060cfa76ccdSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 3061cfa76ccdSmrg# clang compiler - sets CLANGCC to "yes" 3062cfa76ccdSmrg# Intel compiler - sets INTELCC to "yes" 3063cfa76ccdSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 3064cfa76ccdSmrg# 3065cfa76ccdSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 3066cfa76ccdSmrgAC_LANG_CASE( 3067cfa76ccdSmrg [C], [ 3068cfa76ccdSmrg AC_REQUIRE([AC_PROG_CC_C99]) 3069cfa76ccdSmrg ], 3070cfa76ccdSmrg [C++], [ 3071cfa76ccdSmrg AC_REQUIRE([AC_PROG_CXX]) 3072cfa76ccdSmrg ] 3073cfa76ccdSmrg) 3074cfa76ccdSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3075cfa76ccdSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3076cfa76ccdSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3077cfa76ccdSmrg]) # XORG_COMPILER_BRAND 3078e96acad6Smrg 3079cfa76ccdSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3080cfa76ccdSmrg# --------------- 3081cfa76ccdSmrg# Minimum version: 1.16.0 3082cfa76ccdSmrg# 3083cfa76ccdSmrg# Test if the compiler works when passed the given flag as a command line argument. 3084cfa76ccdSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 3085cfa76ccdSmrg# next flag in the list until there are no more options. 3086cfa76ccdSmrg# 3087cfa76ccdSmrg# Note that this does not guarantee that the compiler supports the flag as some 3088cfa76ccdSmrg# compilers will simply ignore arguments that they do not understand, but we do 3089cfa76ccdSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 3090cfa76ccdSmrg# -Werror=unused-command-line-argument 3091cfa76ccdSmrg# 3092cfa76ccdSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 3093cfa76ccdSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3094cfa76ccdSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3095dbbd9e4bSmacallan 3096cfa76ccdSmrgAC_LANG_COMPILER_REQUIRE 3097dbbd9e4bSmacallan 3098cfa76ccdSmrgAC_LANG_CASE( 3099cfa76ccdSmrg [C], [ 3100cfa76ccdSmrg AC_REQUIRE([AC_PROG_CC_C99]) 3101cfa76ccdSmrg define([PREFIX], [C]) 3102cfa76ccdSmrg define([CACHE_PREFIX], [cc]) 3103cfa76ccdSmrg define([COMPILER], [$CC]) 3104cfa76ccdSmrg ], 3105cfa76ccdSmrg [C++], [ 3106cfa76ccdSmrg define([PREFIX], [CXX]) 3107cfa76ccdSmrg define([CACHE_PREFIX], [cxx]) 3108cfa76ccdSmrg define([COMPILER], [$CXX]) 3109cfa76ccdSmrg ] 3110cfa76ccdSmrg) 3111dbbd9e4bSmacallan 3112cfa76ccdSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3113dbbd9e4bSmacallan 3114cfa76ccdSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3115cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3116cfa76ccdSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3117cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3118cfa76ccdSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3119cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3120cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3121cfa76ccdSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3122cfa76ccdSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3123cfa76ccdSmrgfi 3124e96acad6Smrg 3125cfa76ccdSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3126cfa76ccdSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3127cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3128cfa76ccdSmrg fi 3129cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3130cfa76ccdSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3131cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3132cfa76ccdSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3133cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3134cfa76ccdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3135cfa76ccdSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3136cfa76ccdSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3137cfa76ccdSmrgfi 3138e96acad6Smrg 3139cfa76ccdSmrgfound="no" 3140cfa76ccdSmrgm4_foreach([flag], m4_cdr($@), [ 3141cfa76ccdSmrg if test $found = "no" ; then 3142cfa76ccdSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3143cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3144cfa76ccdSmrg fi 3145dbbd9e4bSmacallan 3146cfa76ccdSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3147cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3148cfa76ccdSmrg fi 3149dbbd9e4bSmacallan 3150cfa76ccdSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3151dbbd9e4bSmacallan 3152cfa76ccdSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3153cfa76ccdSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3154cfa76ccdSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3155cfa76ccdSmrg AC_CACHE_VAL($cacheid, 3156cfa76ccdSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3157cfa76ccdSmrg [eval $cacheid=yes], 3158cfa76ccdSmrg [eval $cacheid=no])]) 3159e96acad6Smrg 3160cfa76ccdSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3161e96acad6Smrg 3162cfa76ccdSmrg eval supported=\$$cacheid 3163cfa76ccdSmrg AC_MSG_RESULT([$supported]) 3164cfa76ccdSmrg if test "$supported" = "yes" ; then 3165cfa76ccdSmrg $1="$$1 ]flag[" 3166cfa76ccdSmrg found="yes" 3167cfa76ccdSmrg fi 3168cfa76ccdSmrg fi 3169cfa76ccdSmrg]) 3170cfa76ccdSmrg]) # XORG_TESTSET_CFLAG 3171dbbd9e4bSmacallan 3172cfa76ccdSmrg# XORG_COMPILER_FLAGS 3173cfa76ccdSmrg# --------------- 3174cfa76ccdSmrg# Minimum version: 1.16.0 3175cfa76ccdSmrg# 3176cfa76ccdSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3177cfa76ccdSmrg# arguments supported by the selected compiler which do NOT alter the generated 3178cfa76ccdSmrg# code. These arguments will cause the compiler to print various warnings 3179cfa76ccdSmrg# during compilation AND turn a conservative set of warnings into errors. 3180cfa76ccdSmrg# 3181cfa76ccdSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3182cfa76ccdSmrg# future versions of util-macros as options are added to new compilers. 3183cfa76ccdSmrg# 3184cfa76ccdSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3185cfa76ccdSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3186dbbd9e4bSmacallan 3187cfa76ccdSmrgAC_ARG_ENABLE(selective-werror, 3188cfa76ccdSmrg AS_HELP_STRING([--disable-selective-werror], 3189cfa76ccdSmrg [Turn off selective compiler errors. (default: enabled)]), 3190cfa76ccdSmrg [SELECTIVE_WERROR=$enableval], 3191cfa76ccdSmrg [SELECTIVE_WERROR=yes]) 3192cfa76ccdSmrg 3193cfa76ccdSmrgAC_LANG_CASE( 3194cfa76ccdSmrg [C], [ 3195cfa76ccdSmrg define([PREFIX], [C]) 3196cfa76ccdSmrg ], 3197cfa76ccdSmrg [C++], [ 3198cfa76ccdSmrg define([PREFIX], [CXX]) 3199cfa76ccdSmrg ] 3200cfa76ccdSmrg) 3201cfa76ccdSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3202cfa76ccdSmrgif test "x$SUNCC" = "xyes"; then 3203cfa76ccdSmrg [BASE_]PREFIX[FLAGS]="-v" 3204e96acad6Smrgelse 3205cfa76ccdSmrg [BASE_]PREFIX[FLAGS]="" 3206dbbd9e4bSmacallanfi 3207dbbd9e4bSmacallan 3208cfa76ccdSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3209cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3210cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3211cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3212cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3213dbbd9e4bSmacallan 3214cfa76ccdSmrgAC_LANG_CASE( 3215cfa76ccdSmrg [C], [ 3216cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3217cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3218cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3219cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3220cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3221cfa76ccdSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3222cfa76ccdSmrg ] 3223cfa76ccdSmrg) 3224dbbd9e4bSmacallan 3225cfa76ccdSmrg# This chunk adds additional warnings that could catch undesired effects. 3226cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3227cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3228cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3229cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3230cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3231cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3232cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3233dbbd9e4bSmacallan 3234cfa76ccdSmrg# These are currently disabled because they are noisy. They will be enabled 3235cfa76ccdSmrg# in the future once the codebase is sufficiently modernized to silence 3236cfa76ccdSmrg# them. For now, I don't want them to drown out the other warnings. 3237cfa76ccdSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3238cfa76ccdSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3239cfa76ccdSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3240dbbd9e4bSmacallan 3241cfa76ccdSmrg# Turn some warnings into errors, so we don't accidently get successful builds 3242cfa76ccdSmrg# when there are problems that should be fixed. 3243dbbd9e4bSmacallan 3244cfa76ccdSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3245cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3246cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3247cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3248cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3249cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3250cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3251cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3252cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3253cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3254cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3255cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3256cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3257cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3258e96acad6Smrgelse 3259cfa76ccdSmrgAC_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]) 3260cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3261cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3262cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3263cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3264cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3265cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3266cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3267cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3268cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3269cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3270cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3271cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3272cfa76ccdSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3273e96acad6Smrgfi 3274dbbd9e4bSmacallan 3275cfa76ccdSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3276cfa76ccdSmrg]) # XORG_COMPILER_FLAGS 3277dbbd9e4bSmacallan 3278cfa76ccdSmrg# XORG_CWARNFLAGS 3279cfa76ccdSmrg# --------------- 3280cfa76ccdSmrg# Minimum version: 1.2.0 3281cfa76ccdSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3282cfa76ccdSmrg# 3283cfa76ccdSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3284cfa76ccdSmrg# 3285cfa76ccdSmrg# This function is deprecated because it defines -fno-strict-aliasing 3286cfa76ccdSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3287cfa76ccdSmrg# is needed, then it should be added explicitly in the module when 3288cfa76ccdSmrg# it is updated to use BASE_CFLAGS. 3289cfa76ccdSmrg# 3290cfa76ccdSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3291cfa76ccdSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3292cfa76ccdSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3293cfa76ccdSmrgAC_LANG_CASE( 3294cfa76ccdSmrg [C], [ 3295cfa76ccdSmrg CWARNFLAGS="$BASE_CFLAGS" 3296cfa76ccdSmrg if test "x$GCC" = xyes ; then 3297cfa76ccdSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3298cfa76ccdSmrg fi 3299cfa76ccdSmrg AC_SUBST(CWARNFLAGS) 3300cfa76ccdSmrg ] 3301cfa76ccdSmrg) 3302cfa76ccdSmrg]) # XORG_CWARNFLAGS 3303dbbd9e4bSmacallan 3304cfa76ccdSmrg# XORG_STRICT_OPTION 3305cfa76ccdSmrg# ----------------------- 3306cfa76ccdSmrg# Minimum version: 1.3.0 3307cfa76ccdSmrg# 3308cfa76ccdSmrg# Add configure option to enable strict compilation flags, such as treating 3309cfa76ccdSmrg# warnings as fatal errors. 3310cfa76ccdSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3311cfa76ccdSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3312cfa76ccdSmrg# 3313cfa76ccdSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3314cfa76ccdSmrg# when strict compilation is unconditionally desired. 3315cfa76ccdSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3316cfa76ccdSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3317cfa76ccdSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3318dbbd9e4bSmacallan 3319cfa76ccdSmrgAC_ARG_ENABLE(strict-compilation, 3320cfa76ccdSmrg AS_HELP_STRING([--enable-strict-compilation], 3321cfa76ccdSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3322cfa76ccdSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3323dbbd9e4bSmacallan 3324cfa76ccdSmrgAC_LANG_CASE( 3325cfa76ccdSmrg [C], [ 3326cfa76ccdSmrg define([PREFIX], [C]) 3327cfa76ccdSmrg ], 3328cfa76ccdSmrg [C++], [ 3329cfa76ccdSmrg define([PREFIX], [CXX]) 3330cfa76ccdSmrg ] 3331cfa76ccdSmrg) 3332dbbd9e4bSmacallan 3333cfa76ccdSmrg[STRICT_]PREFIX[FLAGS]="" 3334cfa76ccdSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3335cfa76ccdSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3336dbbd9e4bSmacallan 3337cfa76ccdSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3338cfa76ccdSmrg# activate it with -Werror, so we add it here explicitly. 3339cfa76ccdSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3340dbbd9e4bSmacallan 3341cfa76ccdSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3342cfa76ccdSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3343cfa76ccdSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3344cfa76ccdSmrgfi 3345cfa76ccdSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3346cfa76ccdSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3347cfa76ccdSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3348cfa76ccdSmrg]) # XORG_STRICT_OPTION 3349dbbd9e4bSmacallan 3350cfa76ccdSmrg# XORG_DEFAULT_OPTIONS 3351cfa76ccdSmrg# -------------------- 3352cfa76ccdSmrg# Minimum version: 1.3.0 3353cfa76ccdSmrg# 3354cfa76ccdSmrg# Defines default options for X.Org modules. 3355cfa76ccdSmrg# 3356cfa76ccdSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3357cfa76ccdSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3358cfa76ccdSmrgXORG_COMPILER_FLAGS 3359cfa76ccdSmrgXORG_CWARNFLAGS 3360cfa76ccdSmrgXORG_STRICT_OPTION 3361cfa76ccdSmrgXORG_RELEASE_VERSION 3362cfa76ccdSmrgXORG_CHANGELOG 3363cfa76ccdSmrgXORG_INSTALL 3364cfa76ccdSmrgXORG_MANPAGE_SECTIONS 3365cfa76ccdSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3366cfa76ccdSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3367cfa76ccdSmrg]) # XORG_DEFAULT_OPTIONS 3368dbbd9e4bSmacallan 3369cfa76ccdSmrg# XORG_INSTALL() 3370cfa76ccdSmrg# ---------------- 3371cfa76ccdSmrg# Minimum version: 1.4.0 3372cfa76ccdSmrg# 3373cfa76ccdSmrg# Defines the variable INSTALL_CMD as the command to copy 3374cfa76ccdSmrg# INSTALL from $prefix/share/util-macros. 3375cfa76ccdSmrg# 3376cfa76ccdSmrgAC_DEFUN([XORG_INSTALL], [ 3377cfa76ccdSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3378cfa76ccdSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3379cfa76ccdSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3380cfa76ccdSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3381cfa76ccdSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3382cfa76ccdSmrgtouch \$(top_srcdir)/INSTALL; \ 3383cfa76ccdSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3384cfa76ccdSmrgAC_SUBST([INSTALL_CMD]) 3385cfa76ccdSmrg]) # XORG_INSTALL 3386cfa76ccdSmrgdnl Copyright 2005 Red Hat, Inc 3387cfa76ccdSmrgdnl 3388cfa76ccdSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3389cfa76ccdSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3390cfa76ccdSmrgdnl the above copyright notice appear in all copies and that both that 3391cfa76ccdSmrgdnl copyright notice and this permission notice appear in supporting 3392cfa76ccdSmrgdnl documentation. 3393cfa76ccdSmrgdnl 3394cfa76ccdSmrgdnl The above copyright notice and this permission notice shall be included 3395cfa76ccdSmrgdnl in all copies or substantial portions of the Software. 3396cfa76ccdSmrgdnl 3397cfa76ccdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3398cfa76ccdSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3399cfa76ccdSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3400cfa76ccdSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3401cfa76ccdSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3402cfa76ccdSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3403cfa76ccdSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3404cfa76ccdSmrgdnl 3405cfa76ccdSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3406cfa76ccdSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3407cfa76ccdSmrgdnl other dealings in this Software without prior written authorization 3408cfa76ccdSmrgdnl from the copyright holders. 3409cfa76ccdSmrgdnl 3410dbbd9e4bSmacallan 3411cfa76ccdSmrg# XORG_RELEASE_VERSION 3412cfa76ccdSmrg# -------------------- 3413cfa76ccdSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3414dbbd9e4bSmacallan 3415cfa76ccdSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3416cfa76ccdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3417cfa76ccdSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3418cfa76ccdSmrg [Major version of this package]) 3419cfa76ccdSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3420cfa76ccdSmrg if test "x$PVM" = "x"; then 3421cfa76ccdSmrg PVM="0" 3422cfa76ccdSmrg fi 3423cfa76ccdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3424cfa76ccdSmrg [$PVM], 3425cfa76ccdSmrg [Minor version of this package]) 3426cfa76ccdSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3427cfa76ccdSmrg if test "x$PVP" = "x"; then 3428cfa76ccdSmrg PVP="0" 3429cfa76ccdSmrg fi 3430cfa76ccdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3431cfa76ccdSmrg [$PVP], 3432cfa76ccdSmrg [Patch version of this package]) 3433cfa76ccdSmrg]) 3434dbbd9e4bSmacallan 3435cfa76ccdSmrg# XORG_CHANGELOG() 3436cfa76ccdSmrg# ---------------- 3437cfa76ccdSmrg# Minimum version: 1.2.0 3438cfa76ccdSmrg# 3439cfa76ccdSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3440cfa76ccdSmrg# ChangeLog from git. 3441cfa76ccdSmrg# 3442cfa76ccdSmrg# 3443cfa76ccdSmrgAC_DEFUN([XORG_CHANGELOG], [ 3444cfa76ccdSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3445cfa76ccdSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3446cfa76ccdSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3447cfa76ccdSmrgtouch \$(top_srcdir)/ChangeLog; \ 3448cfa76ccdSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3449cfa76ccdSmrgAC_SUBST([CHANGELOG_CMD]) 3450cfa76ccdSmrg]) # XORG_CHANGELOG 3451dbbd9e4bSmacallan 3452cfa76ccdSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3453cfa76ccdSmrg# 3454cfa76ccdSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3455cfa76ccdSmrg# Foundation, Inc. 3456cfa76ccdSmrg# Written by Gordon Matzigkeit, 1996 3457cfa76ccdSmrg# 3458cfa76ccdSmrg# This file is free software; the Free Software Foundation gives 3459cfa76ccdSmrg# unlimited permission to copy and/or distribute it, with or without 3460cfa76ccdSmrg# modifications, as long as this notice is preserved. 3461dbbd9e4bSmacallan 3462cfa76ccdSmrgm4_define([_LT_COPYING], [dnl 3463cfa76ccdSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3464cfa76ccdSmrg# This is free software; see the source for copying conditions. There is NO 3465cfa76ccdSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3466dbbd9e4bSmacallan 3467cfa76ccdSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3468cfa76ccdSmrg# it under the terms of the GNU General Public License as published by 3469cfa76ccdSmrg# the Free Software Foundation; either version 2 of of the License, or 3470cfa76ccdSmrg# (at your option) any later version. 3471cfa76ccdSmrg# 3472cfa76ccdSmrg# As a special exception to the GNU General Public License, if you 3473cfa76ccdSmrg# distribute this file as part of a program or library that is built 3474cfa76ccdSmrg# using GNU Libtool, you may include this file under the same 3475cfa76ccdSmrg# distribution terms that you use for the rest of that program. 3476cfa76ccdSmrg# 3477cfa76ccdSmrg# GNU Libtool is distributed in the hope that it will be useful, but 3478cfa76ccdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3479cfa76ccdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3480cfa76ccdSmrg# GNU General Public License for more details. 3481cfa76ccdSmrg# 3482cfa76ccdSmrg# You should have received a copy of the GNU General Public License 3483cfa76ccdSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3484cfa76ccdSmrg]) 3485dbbd9e4bSmacallan 3486cfa76ccdSmrg# serial 59 LT_INIT 3487dbbd9e4bSmacallan 3488dbbd9e4bSmacallan 3489cfa76ccdSmrg# LT_PREREQ(VERSION) 3490cfa76ccdSmrg# ------------------ 3491cfa76ccdSmrg# Complain and exit if this libtool version is less that VERSION. 3492cfa76ccdSmrgm4_defun([LT_PREREQ], 3493cfa76ccdSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3494cfa76ccdSmrg [m4_default([$3], 3495cfa76ccdSmrg [m4_fatal([Libtool version $1 or higher is required], 3496cfa76ccdSmrg 63)])], 3497cfa76ccdSmrg [$2])]) 3498dbbd9e4bSmacallan 3499dbbd9e4bSmacallan 3500cfa76ccdSmrg# _LT_CHECK_BUILDDIR 3501cfa76ccdSmrg# ------------------ 3502cfa76ccdSmrg# Complain if the absolute build directory name contains unusual characters 3503cfa76ccdSmrgm4_defun([_LT_CHECK_BUILDDIR], 3504cfa76ccdSmrg[case `pwd` in 3505cfa76ccdSmrg *\ * | *\ *) 3506cfa76ccdSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3507cfa76ccdSmrgesac 3508cfa76ccdSmrg]) 3509dbbd9e4bSmacallan 3510dbbd9e4bSmacallan 3511cfa76ccdSmrg# LT_INIT([OPTIONS]) 3512cfa76ccdSmrg# ------------------ 3513cfa76ccdSmrgAC_DEFUN([LT_INIT], 3514cfa76ccdSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3515cfa76ccdSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3516cfa76ccdSmrgAC_BEFORE([$0], [LT_LANG])dnl 3517cfa76ccdSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3518cfa76ccdSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3519cfa76ccdSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3520dbbd9e4bSmacallan 3521cfa76ccdSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3522cfa76ccdSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3523cfa76ccdSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3524cfa76ccdSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3525cfa76ccdSmrgdnl unless we require an AC_DEFUNed macro: 3526cfa76ccdSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3527cfa76ccdSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3528cfa76ccdSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3529cfa76ccdSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3530cfa76ccdSmrgm4_require([_LT_PROG_LTMAIN])dnl 3531dbbd9e4bSmacallan 3532cfa76ccdSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3533dbbd9e4bSmacallan 3534cfa76ccdSmrgdnl Parse OPTIONS 3535cfa76ccdSmrg_LT_SET_OPTIONS([$0], [$1]) 3536dbbd9e4bSmacallan 3537cfa76ccdSmrg# This can be used to rebuild libtool when needed 3538cfa76ccdSmrgLIBTOOL_DEPS=$ltmain 3539e96acad6Smrg 3540cfa76ccdSmrg# Always use our own libtool. 3541cfa76ccdSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3542cfa76ccdSmrgAC_SUBST(LIBTOOL)dnl 3543e96acad6Smrg 3544cfa76ccdSmrg_LT_SETUP 3545e96acad6Smrg 3546cfa76ccdSmrg# Only expand once: 3547cfa76ccdSmrgm4_define([LT_INIT]) 3548cfa76ccdSmrg])# LT_INIT 3549cfa76ccdSmrg 3550cfa76ccdSmrg# Old names: 3551cfa76ccdSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3552cfa76ccdSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3553cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 3554cfa76ccdSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3555cfa76ccdSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3556cfa76ccdSmrg 3557cfa76ccdSmrg 3558cfa76ccdSmrg# _LT_PREPARE_CC_BASENAME 3559cfa76ccdSmrg# ----------------------- 3560cfa76ccdSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3561cfa76ccdSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3562cfa76ccdSmrgfunc_cc_basename () 3563cfa76ccdSmrg{ 3564cfa76ccdSmrg for cc_temp in @S|@*""; do 3565cfa76ccdSmrg case $cc_temp in 3566cfa76ccdSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3567cfa76ccdSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3568cfa76ccdSmrg \-*) ;; 3569cfa76ccdSmrg *) break;; 3570cfa76ccdSmrg esac 3571cfa76ccdSmrg done 3572cfa76ccdSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3573cfa76ccdSmrg} 3574cfa76ccdSmrg])# _LT_PREPARE_CC_BASENAME 3575cfa76ccdSmrg 3576cfa76ccdSmrg 3577cfa76ccdSmrg# _LT_CC_BASENAME(CC) 3578cfa76ccdSmrg# ------------------- 3579cfa76ccdSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3580cfa76ccdSmrg# but that macro is also expanded into generated libtool script, which 3581cfa76ccdSmrg# arranges for $SED and $ECHO to be set by different means. 3582cfa76ccdSmrgm4_defun([_LT_CC_BASENAME], 3583cfa76ccdSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3584cfa76ccdSmrgAC_REQUIRE([_LT_DECL_SED])dnl 3585cfa76ccdSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3586cfa76ccdSmrgfunc_cc_basename $1 3587cfa76ccdSmrgcc_basename=$func_cc_basename_result 3588e96acad6Smrg]) 3589dbbd9e4bSmacallan 3590dbbd9e4bSmacallan 3591cfa76ccdSmrg# _LT_FILEUTILS_DEFAULTS 3592cfa76ccdSmrg# ---------------------- 3593cfa76ccdSmrg# It is okay to use these file commands and assume they have been set 3594cfa76ccdSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3595cfa76ccdSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3596cfa76ccdSmrg[: ${CP="cp -f"} 3597cfa76ccdSmrg: ${MV="mv -f"} 3598cfa76ccdSmrg: ${RM="rm -f"} 3599cfa76ccdSmrg])# _LT_FILEUTILS_DEFAULTS 3600dbbd9e4bSmacallan 3601dbbd9e4bSmacallan 3602cfa76ccdSmrg# _LT_SETUP 3603cfa76ccdSmrg# --------- 3604cfa76ccdSmrgm4_defun([_LT_SETUP], 3605cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3606cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3607cfa76ccdSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3608cfa76ccdSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3609dbbd9e4bSmacallan 3610cfa76ccdSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3611cfa76ccdSmrgdnl 3612cfa76ccdSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3613cfa76ccdSmrg_LT_DECL([], [host], [0])dnl 3614cfa76ccdSmrg_LT_DECL([], [host_os], [0])dnl 3615cfa76ccdSmrgdnl 3616cfa76ccdSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3617cfa76ccdSmrg_LT_DECL([], [build], [0])dnl 3618cfa76ccdSmrg_LT_DECL([], [build_os], [0])dnl 3619cfa76ccdSmrgdnl 3620cfa76ccdSmrgAC_REQUIRE([AC_PROG_CC])dnl 3621cfa76ccdSmrgAC_REQUIRE([LT_PATH_LD])dnl 3622cfa76ccdSmrgAC_REQUIRE([LT_PATH_NM])dnl 3623cfa76ccdSmrgdnl 3624cfa76ccdSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3625cfa76ccdSmrgtest -z "$LN_S" && LN_S="ln -s" 3626cfa76ccdSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3627cfa76ccdSmrgdnl 3628cfa76ccdSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3629cfa76ccdSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3630cfa76ccdSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3631cfa76ccdSmrgdnl 3632cfa76ccdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3633cfa76ccdSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3634cfa76ccdSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3635cfa76ccdSmrgm4_require([_LT_CMD_RELOAD])dnl 3636cfa76ccdSmrgm4_require([_LT_DECL_FILECMD])dnl 3637cfa76ccdSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3638cfa76ccdSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3639cfa76ccdSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3640cfa76ccdSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3641cfa76ccdSmrgm4_require([_LT_WITH_SYSROOT])dnl 3642cfa76ccdSmrgm4_require([_LT_CMD_TRUNCATE])dnl 3643e96acad6Smrg 3644cfa76ccdSmrg_LT_CONFIG_LIBTOOL_INIT([ 3645cfa76ccdSmrg# See if we are running on zsh, and set the options that allow our 3646cfa76ccdSmrg# commands through without removal of \ escapes INIT. 3647cfa76ccdSmrgif test -n "\${ZSH_VERSION+set}"; then 3648cfa76ccdSmrg setopt NO_GLOB_SUBST 3649cfa76ccdSmrgfi 3650cfa76ccdSmrg]) 3651cfa76ccdSmrgif test -n "${ZSH_VERSION+set}"; then 3652cfa76ccdSmrg setopt NO_GLOB_SUBST 3653cfa76ccdSmrgfi 3654e96acad6Smrg 3655cfa76ccdSmrg_LT_CHECK_OBJDIR 3656e96acad6Smrg 3657cfa76ccdSmrgm4_require([_LT_TAG_COMPILER])dnl 3658dbbd9e4bSmacallan 3659e96acad6Smrgcase $host_os in 3660cfa76ccdSmrgaix3*) 3661cfa76ccdSmrg # AIX sometimes has problems with the GCC collect2 program. For some 3662cfa76ccdSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3663cfa76ccdSmrg # vanish in a puff of smoke. 3664cfa76ccdSmrg if test set != "${COLLECT_NAMES+set}"; then 3665cfa76ccdSmrg COLLECT_NAMES= 3666cfa76ccdSmrg export COLLECT_NAMES 3667cfa76ccdSmrg fi 3668e96acad6Smrg ;; 3669e96acad6Smrgesac 3670dbbd9e4bSmacallan 3671cfa76ccdSmrg# Global variables: 3672cfa76ccdSmrgofile=libtool 3673cfa76ccdSmrgcan_build_shared=yes 3674dbbd9e4bSmacallan 3675cfa76ccdSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 3676cfa76ccdSmrg# ICC, which need '.lib'). 3677cfa76ccdSmrglibext=a 3678dbbd9e4bSmacallan 3679cfa76ccdSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3680dbbd9e4bSmacallan 3681cfa76ccdSmrgold_CC=$CC 3682cfa76ccdSmrgold_CFLAGS=$CFLAGS 3683dbbd9e4bSmacallan 3684cfa76ccdSmrg# Set sane defaults for various variables 3685cfa76ccdSmrgtest -z "$CC" && CC=cc 3686cfa76ccdSmrgtest -z "$LTCC" && LTCC=$CC 3687cfa76ccdSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3688cfa76ccdSmrgtest -z "$LD" && LD=ld 3689cfa76ccdSmrgtest -z "$ac_objext" && ac_objext=o 3690cfa76ccdSmrg 3691cfa76ccdSmrg_LT_CC_BASENAME([$compiler]) 3692cfa76ccdSmrg 3693cfa76ccdSmrg# Only perform the check for file, if the check method requires it 3694cfa76ccdSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3695cfa76ccdSmrgcase $deplibs_check_method in 3696cfa76ccdSmrgfile_magic*) 3697cfa76ccdSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3698cfa76ccdSmrg _LT_PATH_MAGIC 3699cfa76ccdSmrg fi 3700e96acad6Smrg ;; 3701e96acad6Smrgesac 3702dbbd9e4bSmacallan 3703cfa76ccdSmrg# Use C for the default configuration in the libtool script 3704cfa76ccdSmrgLT_SUPPORTED_TAG([CC]) 3705cfa76ccdSmrg_LT_LANG_C_CONFIG 3706cfa76ccdSmrg_LT_LANG_DEFAULT_CONFIG 3707cfa76ccdSmrg_LT_CONFIG_COMMANDS 3708cfa76ccdSmrg])# _LT_SETUP 3709dbbd9e4bSmacallan 3710dbbd9e4bSmacallan 3711cfa76ccdSmrg# _LT_PREPARE_SED_QUOTE_VARS 3712cfa76ccdSmrg# -------------------------- 3713cfa76ccdSmrg# Define a few sed substitution that help us do robust quoting. 3714cfa76ccdSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3715cfa76ccdSmrg[# Backslashify metacharacters that are still active within 3716cfa76ccdSmrg# double-quoted strings. 3717cfa76ccdSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3718dbbd9e4bSmacallan 3719cfa76ccdSmrg# Same as above, but do not quote variable references. 3720cfa76ccdSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3721dbbd9e4bSmacallan 3722cfa76ccdSmrg# Sed substitution to delay expansion of an escaped shell variable in a 3723cfa76ccdSmrg# double_quote_subst'ed string. 3724cfa76ccdSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3725dbbd9e4bSmacallan 3726cfa76ccdSmrg# Sed substitution to delay expansion of an escaped single quote. 3727cfa76ccdSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3728dbbd9e4bSmacallan 3729cfa76ccdSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3730cfa76ccdSmrgno_glob_subst='s/\*/\\\*/g' 3731cfa76ccdSmrg]) 3732dbbd9e4bSmacallan 3733cfa76ccdSmrg# _LT_PROG_LTMAIN 3734cfa76ccdSmrg# --------------- 3735cfa76ccdSmrg# Note that this code is called both from 'configure', and 'config.status' 3736cfa76ccdSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3737cfa76ccdSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3738cfa76ccdSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3739cfa76ccdSmrgm4_defun([_LT_PROG_LTMAIN], 3740cfa76ccdSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3741cfa76ccdSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3742cfa76ccdSmrgltmain=$ac_aux_dir/ltmain.sh 3743cfa76ccdSmrg])# _LT_PROG_LTMAIN 3744dbbd9e4bSmacallan 3745dbbd9e4bSmacallan 3746dbbd9e4bSmacallan 3747cfa76ccdSmrg# So that we can recreate a full libtool script including additional 3748cfa76ccdSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3749cfa76ccdSmrg# in macros and then make a single call at the end using the 'libtool' 3750cfa76ccdSmrg# label. 3751dbbd9e4bSmacallan 3752dbbd9e4bSmacallan 3753cfa76ccdSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3754cfa76ccdSmrg# ---------------------------------------- 3755cfa76ccdSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3756cfa76ccdSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3757cfa76ccdSmrg[m4_ifval([$1], 3758cfa76ccdSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3759cfa76ccdSmrg [$1 3760cfa76ccdSmrg])])]) 3761dbbd9e4bSmacallan 3762cfa76ccdSmrg# Initialize. 3763cfa76ccdSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3764dbbd9e4bSmacallan 3765dbbd9e4bSmacallan 3766cfa76ccdSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3767cfa76ccdSmrg# ------------------------------ 3768cfa76ccdSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3769cfa76ccdSmrgm4_define([_LT_CONFIG_LIBTOOL], 3770cfa76ccdSmrg[m4_ifval([$1], 3771cfa76ccdSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3772cfa76ccdSmrg [$1 3773cfa76ccdSmrg])])]) 3774dbbd9e4bSmacallan 3775cfa76ccdSmrg# Initialize. 3776cfa76ccdSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3777dbbd9e4bSmacallan 3778dbbd9e4bSmacallan 3779cfa76ccdSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3780cfa76ccdSmrg# ----------------------------------------------------- 3781cfa76ccdSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3782cfa76ccdSmrg[_LT_CONFIG_LIBTOOL([$1]) 3783cfa76ccdSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3784cfa76ccdSmrg]) 3785dbbd9e4bSmacallan 3786dbbd9e4bSmacallan 3787cfa76ccdSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3788cfa76ccdSmrg# ----------------------------- 3789cfa76ccdSmrg# Add leading comment marks to the start of each line, and a trailing 3790cfa76ccdSmrg# full-stop to the whole comment if one is not present already. 3791cfa76ccdSmrgm4_define([_LT_FORMAT_COMMENT], 3792cfa76ccdSmrg[m4_ifval([$1], [ 3793cfa76ccdSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3794cfa76ccdSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3795cfa76ccdSmrg)]) 3796dbbd9e4bSmacallan 3797dbbd9e4bSmacallan 3798dbbd9e4bSmacallan 3799dbbd9e4bSmacallan 3800dbbd9e4bSmacallan 3801cfa76ccdSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3802cfa76ccdSmrg# ------------------------------------------------------------------- 3803cfa76ccdSmrg# CONFIGNAME is the name given to the value in the libtool script. 3804cfa76ccdSmrg# VARNAME is the (base) name used in the configure script. 3805cfa76ccdSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3806cfa76ccdSmrg# VARNAME. Any other value will be used directly. 3807cfa76ccdSmrgm4_define([_LT_DECL], 3808cfa76ccdSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3809cfa76ccdSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3810cfa76ccdSmrg [m4_ifval([$1], [$1], [$2])]) 3811cfa76ccdSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3812cfa76ccdSmrg m4_ifval([$4], 3813cfa76ccdSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3814cfa76ccdSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3815cfa76ccdSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3816cfa76ccdSmrg]) 3817dbbd9e4bSmacallan 3818dbbd9e4bSmacallan 3819cfa76ccdSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3820cfa76ccdSmrg# -------------------------------------------------------- 3821cfa76ccdSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3822dbbd9e4bSmacallan 3823dbbd9e4bSmacallan 3824cfa76ccdSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3825cfa76ccdSmrg# ------------------------------------------------ 3826cfa76ccdSmrgm4_define([lt_decl_tag_varnames], 3827cfa76ccdSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3828cfa76ccdSmrg 3829cfa76ccdSmrg 3830cfa76ccdSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3831cfa76ccdSmrg# --------------------------------------------------------- 3832cfa76ccdSmrgm4_define([_lt_decl_filter], 3833cfa76ccdSmrg[m4_case([$#], 3834cfa76ccdSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3835cfa76ccdSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3836cfa76ccdSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3837cfa76ccdSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3838cfa76ccdSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3839e96acad6Smrg]) 3840dbbd9e4bSmacallan 3841dbbd9e4bSmacallan 3842cfa76ccdSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3843cfa76ccdSmrg# -------------------------------------------------- 3844cfa76ccdSmrgm4_define([lt_decl_quote_varnames], 3845cfa76ccdSmrg[_lt_decl_filter([value], [1], $@)]) 3846e96acad6Smrg 3847e96acad6Smrg 3848cfa76ccdSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3849cfa76ccdSmrg# --------------------------------------------------- 3850cfa76ccdSmrgm4_define([lt_decl_dquote_varnames], 3851cfa76ccdSmrg[_lt_decl_filter([value], [2], $@)]) 3852dbbd9e4bSmacallan 3853dbbd9e4bSmacallan 3854cfa76ccdSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3855cfa76ccdSmrg# --------------------------------------------------- 3856cfa76ccdSmrgm4_define([lt_decl_varnames_tagged], 3857cfa76ccdSmrg[m4_assert([$# <= 2])dnl 3858cfa76ccdSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 3859cfa76ccdSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3860cfa76ccdSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3861cfa76ccdSmrgm4_define([_lt_decl_varnames_tagged], 3862cfa76ccdSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3863dbbd9e4bSmacallan 3864dbbd9e4bSmacallan 3865cfa76ccdSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3866cfa76ccdSmrg# ------------------------------------------------ 3867cfa76ccdSmrgm4_define([lt_decl_all_varnames], 3868cfa76ccdSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3869cfa76ccdSmrg m4_if([$2], [], 3870cfa76ccdSmrg m4_quote(lt_decl_varnames), 3871cfa76ccdSmrg m4_quote(m4_shift($@))))[]dnl 3872cfa76ccdSmrg]) 3873cfa76ccdSmrgm4_define([_lt_decl_all_varnames], 3874cfa76ccdSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 3875cfa76ccdSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3876cfa76ccdSmrg]) 3877cfa76ccdSmrg 3878cfa76ccdSmrg 3879cfa76ccdSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3880cfa76ccdSmrg# ------------------------------------ 3881cfa76ccdSmrg# Quote a variable value, and forward it to 'config.status' so that its 3882cfa76ccdSmrg# declaration there will have the same value as in 'configure'. VARNAME 3883cfa76ccdSmrg# must have a single quote delimited value for this to work. 3884cfa76ccdSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3885cfa76ccdSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3886cfa76ccdSmrg 3887cfa76ccdSmrg 3888cfa76ccdSmrg# _LT_CONFIG_STATUS_DECLARATIONS 3889cfa76ccdSmrg# ------------------------------ 3890cfa76ccdSmrg# We delimit libtool config variables with single quotes, so when 3891cfa76ccdSmrg# we write them to config.status, we have to be sure to quote all 3892cfa76ccdSmrg# embedded single quotes properly. In configure, this macro expands 3893cfa76ccdSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3894cfa76ccdSmrg# 3895cfa76ccdSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3896cfa76ccdSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3897cfa76ccdSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3898cfa76ccdSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3899cfa76ccdSmrg 3900cfa76ccdSmrg 3901cfa76ccdSmrg# _LT_LIBTOOL_TAGS 3902cfa76ccdSmrg# ---------------- 3903cfa76ccdSmrg# Output comment and list of tags supported by the script 3904cfa76ccdSmrgm4_defun([_LT_LIBTOOL_TAGS], 3905cfa76ccdSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3906cfa76ccdSmrgavailable_tags='_LT_TAGS'dnl 3907cfa76ccdSmrg]) 3908cfa76ccdSmrg 3909cfa76ccdSmrg 3910cfa76ccdSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3911cfa76ccdSmrg# ----------------------------------- 3912cfa76ccdSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3913cfa76ccdSmrg# expand to a commented shell variable setting: 3914cfa76ccdSmrg# 3915cfa76ccdSmrg# # Some comment about what VAR is for. 3916cfa76ccdSmrg# visible_name=$lt_internal_name 3917cfa76ccdSmrgm4_define([_LT_LIBTOOL_DECLARE], 3918cfa76ccdSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3919cfa76ccdSmrg [description])))[]dnl 3920cfa76ccdSmrgm4_pushdef([_libtool_name], 3921cfa76ccdSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3922cfa76ccdSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3923cfa76ccdSmrg [0], [_libtool_name=[$]$1], 3924cfa76ccdSmrg [1], [_libtool_name=$lt_[]$1], 3925cfa76ccdSmrg [2], [_libtool_name=$lt_[]$1], 3926cfa76ccdSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3927cfa76ccdSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3928cfa76ccdSmrg]) 3929cfa76ccdSmrg 3930cfa76ccdSmrg 3931cfa76ccdSmrg# _LT_LIBTOOL_CONFIG_VARS 3932cfa76ccdSmrg# ----------------------- 3933cfa76ccdSmrg# Produce commented declarations of non-tagged libtool config variables 3934cfa76ccdSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3935cfa76ccdSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3936cfa76ccdSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3937cfa76ccdSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3938cfa76ccdSmrg[m4_foreach([_lt_var], 3939cfa76ccdSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3940cfa76ccdSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3941cfa76ccdSmrg 3942cfa76ccdSmrg 3943cfa76ccdSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 3944cfa76ccdSmrg# ------------------------- 3945cfa76ccdSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 3946cfa76ccdSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3947cfa76ccdSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3948cfa76ccdSmrg 3949cfa76ccdSmrg 3950cfa76ccdSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3951cfa76ccdSmrg# ------------------------------ 3952cfa76ccdSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3953cfa76ccdSmrg 3954cfa76ccdSmrg 3955cfa76ccdSmrg# _LT_CONFIG_COMMANDS 3956cfa76ccdSmrg# ------------------- 3957cfa76ccdSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3958cfa76ccdSmrg# variables for single and double quote escaping we saved from calls 3959cfa76ccdSmrg# to _LT_DECL, we can put quote escaped variables declarations 3960cfa76ccdSmrg# into 'config.status', and then the shell code to quote escape them in 3961cfa76ccdSmrg# for loops in 'config.status'. Finally, any additional code accumulated 3962cfa76ccdSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3963cfa76ccdSmrgm4_defun([_LT_CONFIG_COMMANDS], 3964cfa76ccdSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3965cfa76ccdSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3966cfa76ccdSmrg dnl instead of duplicating it all over again into config.status, 3967cfa76ccdSmrg dnl then we will have config.status run $CONFIG_LT later, so it 3968cfa76ccdSmrg dnl needs to know what name is stored there: 3969cfa76ccdSmrg [AC_CONFIG_COMMANDS([libtool], 3970cfa76ccdSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3971cfa76ccdSmrg dnl If the libtool generation code is destined for config.status, 3972cfa76ccdSmrg dnl expand the accumulated commands and init code now: 3973cfa76ccdSmrg [AC_CONFIG_COMMANDS([libtool], 3974cfa76ccdSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3975cfa76ccdSmrg])#_LT_CONFIG_COMMANDS 3976cfa76ccdSmrg 3977cfa76ccdSmrg 3978cfa76ccdSmrg# Initialize. 3979cfa76ccdSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3980cfa76ccdSmrg[ 3981cfa76ccdSmrg 3982cfa76ccdSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3983cfa76ccdSmrg# if CDPATH is set. 3984cfa76ccdSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3985cfa76ccdSmrg 3986cfa76ccdSmrgsed_quote_subst='$sed_quote_subst' 3987cfa76ccdSmrgdouble_quote_subst='$double_quote_subst' 3988cfa76ccdSmrgdelay_variable_subst='$delay_variable_subst' 3989cfa76ccdSmrg_LT_CONFIG_STATUS_DECLARATIONS 3990cfa76ccdSmrgLTCC='$LTCC' 3991cfa76ccdSmrgLTCFLAGS='$LTCFLAGS' 3992cfa76ccdSmrgcompiler='$compiler_DEFAULT' 3993cfa76ccdSmrg 3994cfa76ccdSmrg# A function that is used when there is no print builtin or printf. 3995cfa76ccdSmrgfunc_fallback_echo () 3996cfa76ccdSmrg{ 3997cfa76ccdSmrg eval 'cat <<_LTECHO_EOF 3998cfa76ccdSmrg\$[]1 3999cfa76ccdSmrg_LTECHO_EOF' 4000cfa76ccdSmrg} 4001cfa76ccdSmrg 4002cfa76ccdSmrg# Quote evaled strings. 4003cfa76ccdSmrgfor var in lt_decl_all_varnames([[ \ 4004cfa76ccdSmrg]], lt_decl_quote_varnames); do 4005cfa76ccdSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4006cfa76ccdSmrg *[[\\\\\\\`\\"\\\$]]*) 4007cfa76ccdSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4008e96acad6Smrg ;; 4009cfa76ccdSmrg *) 4010cfa76ccdSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4011e96acad6Smrg ;; 4012cfa76ccdSmrg esac 4013cfa76ccdSmrgdone 4014cfa76ccdSmrg 4015cfa76ccdSmrg# Double-quote double-evaled strings. 4016cfa76ccdSmrgfor var in lt_decl_all_varnames([[ \ 4017cfa76ccdSmrg]], lt_decl_dquote_varnames); do 4018cfa76ccdSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4019cfa76ccdSmrg *[[\\\\\\\`\\"\\\$]]*) 4020cfa76ccdSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4021dbbd9e4bSmacallan ;; 4022dbbd9e4bSmacallan *) 4023cfa76ccdSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4024dbbd9e4bSmacallan ;; 4025dbbd9e4bSmacallan esac 4026cfa76ccdSmrgdone 4027cfa76ccdSmrg 4028cfa76ccdSmrg_LT_OUTPUT_LIBTOOL_INIT 4029cfa76ccdSmrg]) 4030cfa76ccdSmrg 4031cfa76ccdSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4032cfa76ccdSmrg# ------------------------------------ 4033cfa76ccdSmrg# Generate a child script FILE with all initialization necessary to 4034cfa76ccdSmrg# reuse the environment learned by the parent script, and make the 4035cfa76ccdSmrg# file executable. If COMMENT is supplied, it is inserted after the 4036cfa76ccdSmrg# '#!' sequence but before initialization text begins. After this 4037cfa76ccdSmrg# macro, additional text can be appended to FILE to form the body of 4038cfa76ccdSmrg# the child script. The macro ends with non-zero status if the 4039cfa76ccdSmrg# file could not be fully written (such as if the disk is full). 4040cfa76ccdSmrgm4_ifdef([AS_INIT_GENERATED], 4041cfa76ccdSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4042cfa76ccdSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 4043cfa76ccdSmrg[m4_require([AS_PREPARE])]dnl 4044cfa76ccdSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4045cfa76ccdSmrg[lt_write_fail=0 4046cfa76ccdSmrgcat >$1 <<_ASEOF || lt_write_fail=1 4047cfa76ccdSmrg#! $SHELL 4048cfa76ccdSmrg# Generated by $as_me. 4049cfa76ccdSmrg$2 4050cfa76ccdSmrgSHELL=\${CONFIG_SHELL-$SHELL} 4051cfa76ccdSmrgexport SHELL 4052cfa76ccdSmrg_ASEOF 4053cfa76ccdSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4054cfa76ccdSmrgAS_SHELL_SANITIZE 4055cfa76ccdSmrg_AS_PREPARE 4056cfa76ccdSmrgexec AS_MESSAGE_FD>&1 4057cfa76ccdSmrg_ASEOF 4058cfa76ccdSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4059cfa76ccdSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4060cfa76ccdSmrg 4061cfa76ccdSmrg# LT_OUTPUT 4062cfa76ccdSmrg# --------- 4063cfa76ccdSmrg# This macro allows early generation of the libtool script (before 4064cfa76ccdSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 4065cfa76ccdSmrg# tests. 4066cfa76ccdSmrgAC_DEFUN([LT_OUTPUT], 4067cfa76ccdSmrg[: ${CONFIG_LT=./config.lt} 4068cfa76ccdSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4069cfa76ccdSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4070cfa76ccdSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 4071cfa76ccdSmrg 4072cfa76ccdSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4073cfa76ccdSmrglt_cl_silent=false 4074cfa76ccdSmrgexec AS_MESSAGE_LOG_FD>>config.log 4075cfa76ccdSmrg{ 4076cfa76ccdSmrg echo 4077cfa76ccdSmrg AS_BOX([Running $as_me.]) 4078cfa76ccdSmrg} >&AS_MESSAGE_LOG_FD 4079cfa76ccdSmrg 4080cfa76ccdSmrglt_cl_help="\ 4081cfa76ccdSmrg'$as_me' creates a local libtool stub from the current configuration, 4082cfa76ccdSmrgfor use in further configure time tests before the real libtool is 4083cfa76ccdSmrggenerated. 4084cfa76ccdSmrg 4085cfa76ccdSmrgUsage: $[0] [[OPTIONS]] 4086cfa76ccdSmrg 4087cfa76ccdSmrg -h, --help print this help, then exit 4088cfa76ccdSmrg -V, --version print version number, then exit 4089cfa76ccdSmrg -q, --quiet do not print progress messages 4090cfa76ccdSmrg -d, --debug don't remove temporary files 4091cfa76ccdSmrg 4092cfa76ccdSmrgReport bugs to <bug-libtool@gnu.org>." 4093cfa76ccdSmrg 4094cfa76ccdSmrglt_cl_version="\ 4095cfa76ccdSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4096cfa76ccdSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4097cfa76ccdSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4098cfa76ccdSmrg 4099cfa76ccdSmrgCopyright (C) 2011 Free Software Foundation, Inc. 4100cfa76ccdSmrgThis config.lt script is free software; the Free Software Foundation 4101cfa76ccdSmrggives unlimited permision to copy, distribute and modify it." 4102cfa76ccdSmrg 4103cfa76ccdSmrgwhile test 0 != $[#] 4104cfa76ccdSmrgdo 4105cfa76ccdSmrg case $[1] in 4106cfa76ccdSmrg --version | --v* | -V ) 4107cfa76ccdSmrg echo "$lt_cl_version"; exit 0 ;; 4108cfa76ccdSmrg --help | --h* | -h ) 4109cfa76ccdSmrg echo "$lt_cl_help"; exit 0 ;; 4110cfa76ccdSmrg --debug | --d* | -d ) 4111cfa76ccdSmrg debug=: ;; 4112cfa76ccdSmrg --quiet | --q* | --silent | --s* | -q ) 4113cfa76ccdSmrg lt_cl_silent=: ;; 4114cfa76ccdSmrg 4115cfa76ccdSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4116cfa76ccdSmrgTry '$[0] --help' for more information.]) ;; 4117cfa76ccdSmrg 4118cfa76ccdSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4119cfa76ccdSmrgTry '$[0] --help' for more information.]) ;; 4120cfa76ccdSmrg esac 4121cfa76ccdSmrg shift 4122cfa76ccdSmrgdone 4123cfa76ccdSmrg 4124cfa76ccdSmrgif $lt_cl_silent; then 4125cfa76ccdSmrg exec AS_MESSAGE_FD>/dev/null 4126cfa76ccdSmrgfi 4127cfa76ccdSmrg_LTEOF 4128cfa76ccdSmrg 4129cfa76ccdSmrgcat >>"$CONFIG_LT" <<_LTEOF 4130cfa76ccdSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4131cfa76ccdSmrg_LTEOF 4132cfa76ccdSmrg 4133cfa76ccdSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4134cfa76ccdSmrgAC_MSG_NOTICE([creating $ofile]) 4135cfa76ccdSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 4136cfa76ccdSmrgAS_EXIT(0) 4137cfa76ccdSmrg_LTEOF 4138cfa76ccdSmrgchmod +x "$CONFIG_LT" 4139cfa76ccdSmrg 4140cfa76ccdSmrg# configure is writing to config.log, but config.lt does its own redirection, 4141cfa76ccdSmrg# appending to config.log, which fails on DOS, as config.log is still kept 4142cfa76ccdSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4143cfa76ccdSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4144cfa76ccdSmrglt_cl_success=: 4145cfa76ccdSmrgtest yes = "$silent" && 4146cfa76ccdSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 4147cfa76ccdSmrgexec AS_MESSAGE_LOG_FD>/dev/null 4148cfa76ccdSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4149cfa76ccdSmrgexec AS_MESSAGE_LOG_FD>>config.log 4150cfa76ccdSmrg$lt_cl_success || AS_EXIT(1) 4151cfa76ccdSmrg])# LT_OUTPUT 4152cfa76ccdSmrg 4153cfa76ccdSmrg 4154cfa76ccdSmrg# _LT_CONFIG(TAG) 4155cfa76ccdSmrg# --------------- 4156cfa76ccdSmrg# If TAG is the built-in tag, create an initial libtool script with a 4157cfa76ccdSmrg# default configuration from the untagged config vars. Otherwise add code 4158cfa76ccdSmrg# to config.status for appending the configuration named by TAG from the 4159cfa76ccdSmrg# matching tagged config vars. 4160cfa76ccdSmrgm4_defun([_LT_CONFIG], 4161cfa76ccdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4162cfa76ccdSmrg_LT_CONFIG_SAVE_COMMANDS([ 4163cfa76ccdSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4164cfa76ccdSmrg m4_if(_LT_TAG, [C], [ 4165cfa76ccdSmrg # See if we are running on zsh, and set the options that allow our 4166cfa76ccdSmrg # commands through without removal of \ escapes. 4167cfa76ccdSmrg if test -n "${ZSH_VERSION+set}"; then 4168cfa76ccdSmrg setopt NO_GLOB_SUBST 4169cfa76ccdSmrg fi 4170cfa76ccdSmrg 4171cfa76ccdSmrg cfgfile=${ofile}T 4172cfa76ccdSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4173cfa76ccdSmrg $RM "$cfgfile" 4174cfa76ccdSmrg 4175cfa76ccdSmrg cat <<_LT_EOF >> "$cfgfile" 4176cfa76ccdSmrg#! $SHELL 4177cfa76ccdSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4178cfa76ccdSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4179cfa76ccdSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4180cfa76ccdSmrg 4181cfa76ccdSmrg# Provide generalized library-building support services. 4182cfa76ccdSmrg# Written by Gordon Matzigkeit, 1996 4183cfa76ccdSmrg 4184cfa76ccdSmrg_LT_COPYING 4185cfa76ccdSmrg_LT_LIBTOOL_TAGS 4186cfa76ccdSmrg 4187cfa76ccdSmrg# Configured defaults for sys_lib_dlsearch_path munging. 4188cfa76ccdSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4189cfa76ccdSmrg 4190cfa76ccdSmrg# ### BEGIN LIBTOOL CONFIG 4191cfa76ccdSmrg_LT_LIBTOOL_CONFIG_VARS 4192cfa76ccdSmrg_LT_LIBTOOL_TAG_VARS 4193cfa76ccdSmrg# ### END LIBTOOL CONFIG 4194cfa76ccdSmrg 4195cfa76ccdSmrg_LT_EOF 4196cfa76ccdSmrg 4197cfa76ccdSmrg cat <<'_LT_EOF' >> "$cfgfile" 4198cfa76ccdSmrg 4199cfa76ccdSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4200cfa76ccdSmrg 4201cfa76ccdSmrg_LT_PREPARE_MUNGE_PATH_LIST 4202cfa76ccdSmrg_LT_PREPARE_CC_BASENAME 4203cfa76ccdSmrg 4204cfa76ccdSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4205cfa76ccdSmrg 4206cfa76ccdSmrg_LT_EOF 4207cfa76ccdSmrg 4208cfa76ccdSmrg case $host_os in 4209cfa76ccdSmrg aix3*) 4210cfa76ccdSmrg cat <<\_LT_EOF >> "$cfgfile" 4211cfa76ccdSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4212cfa76ccdSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4213cfa76ccdSmrg# vanish in a puff of smoke. 4214cfa76ccdSmrgif test set != "${COLLECT_NAMES+set}"; then 4215cfa76ccdSmrg COLLECT_NAMES= 4216cfa76ccdSmrg export COLLECT_NAMES 4217cfa76ccdSmrgfi 4218cfa76ccdSmrg_LT_EOF 4219cfa76ccdSmrg ;; 4220cfa76ccdSmrg esac 4221cfa76ccdSmrg 4222cfa76ccdSmrg _LT_PROG_LTMAIN 4223cfa76ccdSmrg 4224cfa76ccdSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4225cfa76ccdSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4226cfa76ccdSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4227cfa76ccdSmrg # is reportedly fixed, but why not run on old versions too? 4228cfa76ccdSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4229cfa76ccdSmrg || (rm -f "$cfgfile"; exit 1) 4230cfa76ccdSmrg 4231cfa76ccdSmrg mv -f "$cfgfile" "$ofile" || 4232cfa76ccdSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4233cfa76ccdSmrg chmod +x "$ofile" 4234cfa76ccdSmrg], 4235cfa76ccdSmrg[cat <<_LT_EOF >> "$ofile" 4236cfa76ccdSmrg 4237cfa76ccdSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4238cfa76ccdSmrgdnl in a comment (ie after a #). 4239cfa76ccdSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4240cfa76ccdSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4241cfa76ccdSmrg# ### END LIBTOOL TAG CONFIG: $1 4242cfa76ccdSmrg_LT_EOF 4243cfa76ccdSmrg])dnl /m4_if 4244cfa76ccdSmrg], 4245cfa76ccdSmrg[m4_if([$1], [], [ 4246cfa76ccdSmrg PACKAGE='$PACKAGE' 4247cfa76ccdSmrg VERSION='$VERSION' 4248cfa76ccdSmrg RM='$RM' 4249cfa76ccdSmrg ofile='$ofile'], []) 4250cfa76ccdSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4251cfa76ccdSmrg])# _LT_CONFIG 4252cfa76ccdSmrg 4253cfa76ccdSmrg 4254cfa76ccdSmrg# LT_SUPPORTED_TAG(TAG) 4255cfa76ccdSmrg# --------------------- 4256cfa76ccdSmrg# Trace this macro to discover what tags are supported by the libtool 4257cfa76ccdSmrg# --tag option, using: 4258cfa76ccdSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4259cfa76ccdSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4260cfa76ccdSmrg 4261cfa76ccdSmrg 4262cfa76ccdSmrg# C support is built-in for now 4263cfa76ccdSmrgm4_define([_LT_LANG_C_enabled], []) 4264cfa76ccdSmrgm4_define([_LT_TAGS], []) 4265cfa76ccdSmrg 4266cfa76ccdSmrg 4267cfa76ccdSmrg# LT_LANG(LANG) 4268cfa76ccdSmrg# ------------- 4269cfa76ccdSmrg# Enable libtool support for the given language if not already enabled. 4270cfa76ccdSmrgAC_DEFUN([LT_LANG], 4271cfa76ccdSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4272cfa76ccdSmrgm4_case([$1], 4273cfa76ccdSmrg [C], [_LT_LANG(C)], 4274cfa76ccdSmrg [C++], [_LT_LANG(CXX)], 4275cfa76ccdSmrg [Go], [_LT_LANG(GO)], 4276cfa76ccdSmrg [Java], [_LT_LANG(GCJ)], 4277cfa76ccdSmrg [Fortran 77], [_LT_LANG(F77)], 4278cfa76ccdSmrg [Fortran], [_LT_LANG(FC)], 4279cfa76ccdSmrg [Windows Resource], [_LT_LANG(RC)], 4280cfa76ccdSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4281cfa76ccdSmrg [_LT_LANG($1)], 4282cfa76ccdSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4283cfa76ccdSmrg])# LT_LANG 4284cfa76ccdSmrg 4285cfa76ccdSmrg 4286cfa76ccdSmrg# _LT_LANG(LANGNAME) 4287cfa76ccdSmrg# ------------------ 4288cfa76ccdSmrgm4_defun([_LT_LANG], 4289cfa76ccdSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4290cfa76ccdSmrg [LT_SUPPORTED_TAG([$1])dnl 4291cfa76ccdSmrg m4_append([_LT_TAGS], [$1 ])dnl 4292cfa76ccdSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4293cfa76ccdSmrg _LT_LANG_$1_CONFIG($1)])dnl 4294cfa76ccdSmrg])# _LT_LANG 4295cfa76ccdSmrg 4296cfa76ccdSmrg 4297cfa76ccdSmrgm4_ifndef([AC_PROG_GO], [ 4298cfa76ccdSmrg# NOTE: This macro has been submitted for inclusion into # 4299cfa76ccdSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4300cfa76ccdSmrg# a released version of Autoconf we should remove this # 4301cfa76ccdSmrg# macro and use it instead. # 4302cfa76ccdSmrgm4_defun([AC_PROG_GO], 4303cfa76ccdSmrg[AC_LANG_PUSH(Go)dnl 4304cfa76ccdSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4305cfa76ccdSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4306cfa76ccdSmrg_AC_ARG_VAR_LDFLAGS()dnl 4307cfa76ccdSmrgAC_CHECK_TOOL(GOC, gccgo) 4308cfa76ccdSmrgif test -z "$GOC"; then 4309cfa76ccdSmrg if test -n "$ac_tool_prefix"; then 4310cfa76ccdSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4311cfa76ccdSmrg fi 4312cfa76ccdSmrgfi 4313cfa76ccdSmrgif test -z "$GOC"; then 4314cfa76ccdSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4315cfa76ccdSmrgfi 4316cfa76ccdSmrg])#m4_defun 4317cfa76ccdSmrg])#m4_ifndef 4318cfa76ccdSmrg 4319cfa76ccdSmrg 4320cfa76ccdSmrg# _LT_LANG_DEFAULT_CONFIG 4321cfa76ccdSmrg# ----------------------- 4322cfa76ccdSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4323cfa76ccdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4324cfa76ccdSmrg [LT_LANG(CXX)], 4325cfa76ccdSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4326cfa76ccdSmrg 4327cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4328cfa76ccdSmrg [LT_LANG(F77)], 4329cfa76ccdSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4330cfa76ccdSmrg 4331cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4332cfa76ccdSmrg [LT_LANG(FC)], 4333cfa76ccdSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4334cfa76ccdSmrg 4335cfa76ccdSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4336cfa76ccdSmrgdnl pulling things in needlessly. 4337cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4338cfa76ccdSmrg [LT_LANG(GCJ)], 4339cfa76ccdSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4340cfa76ccdSmrg [LT_LANG(GCJ)], 4341cfa76ccdSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4342cfa76ccdSmrg [LT_LANG(GCJ)], 4343cfa76ccdSmrg [m4_ifdef([AC_PROG_GCJ], 4344cfa76ccdSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4345cfa76ccdSmrg m4_ifdef([A][M_PROG_GCJ], 4346cfa76ccdSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4347cfa76ccdSmrg m4_ifdef([LT_PROG_GCJ], 4348cfa76ccdSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4349cfa76ccdSmrg 4350cfa76ccdSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4351cfa76ccdSmrg [LT_LANG(GO)], 4352cfa76ccdSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4353cfa76ccdSmrg 4354cfa76ccdSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4355cfa76ccdSmrg [LT_LANG(RC)], 4356cfa76ccdSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4357cfa76ccdSmrg])# _LT_LANG_DEFAULT_CONFIG 4358cfa76ccdSmrg 4359cfa76ccdSmrg# Obsolete macros: 4360cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4361cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4362cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4363cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4364cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4365cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 4366cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4367cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4368cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4369cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4370cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4371cfa76ccdSmrg 4372cfa76ccdSmrg 4373cfa76ccdSmrg# _LT_TAG_COMPILER 4374cfa76ccdSmrg# ---------------- 4375cfa76ccdSmrgm4_defun([_LT_TAG_COMPILER], 4376cfa76ccdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4377cfa76ccdSmrg 4378cfa76ccdSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4379cfa76ccdSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4380cfa76ccdSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4381cfa76ccdSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4382cfa76ccdSmrg 4383cfa76ccdSmrg# If no C compiler was specified, use CC. 4384cfa76ccdSmrgLTCC=${LTCC-"$CC"} 4385cfa76ccdSmrg 4386cfa76ccdSmrg# If no C compiler flags were specified, use CFLAGS. 4387cfa76ccdSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4388cfa76ccdSmrg 4389cfa76ccdSmrg# Allow CC to be a program name with arguments. 4390cfa76ccdSmrgcompiler=$CC 4391cfa76ccdSmrg])# _LT_TAG_COMPILER 4392cfa76ccdSmrg 4393cfa76ccdSmrg 4394cfa76ccdSmrg# _LT_COMPILER_BOILERPLATE 4395cfa76ccdSmrg# ------------------------ 4396cfa76ccdSmrg# Check for compiler boilerplate output or warnings with 4397cfa76ccdSmrg# the simple compiler test code. 4398cfa76ccdSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 4399cfa76ccdSmrg[m4_require([_LT_DECL_SED])dnl 4400cfa76ccdSmrgac_outfile=conftest.$ac_objext 4401cfa76ccdSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4402cfa76ccdSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4403cfa76ccdSmrg_lt_compiler_boilerplate=`cat conftest.err` 4404cfa76ccdSmrg$RM conftest* 4405cfa76ccdSmrg])# _LT_COMPILER_BOILERPLATE 4406cfa76ccdSmrg 4407cfa76ccdSmrg 4408cfa76ccdSmrg# _LT_LINKER_BOILERPLATE 4409cfa76ccdSmrg# ---------------------- 4410cfa76ccdSmrg# Check for linker boilerplate output or warnings with 4411cfa76ccdSmrg# the simple link test code. 4412cfa76ccdSmrgm4_defun([_LT_LINKER_BOILERPLATE], 4413cfa76ccdSmrg[m4_require([_LT_DECL_SED])dnl 4414cfa76ccdSmrgac_outfile=conftest.$ac_objext 4415cfa76ccdSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4416cfa76ccdSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4417cfa76ccdSmrg_lt_linker_boilerplate=`cat conftest.err` 4418cfa76ccdSmrg$RM -r conftest* 4419cfa76ccdSmrg])# _LT_LINKER_BOILERPLATE 4420cfa76ccdSmrg 4421cfa76ccdSmrg# _LT_REQUIRED_DARWIN_CHECKS 4422cfa76ccdSmrg# ------------------------- 4423cfa76ccdSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4424cfa76ccdSmrg case $host_os in 4425cfa76ccdSmrg rhapsody* | darwin*) 4426cfa76ccdSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4427cfa76ccdSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4428cfa76ccdSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4429cfa76ccdSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4430cfa76ccdSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4431cfa76ccdSmrg _LT_DECL([], [DSYMUTIL], [1], 4432cfa76ccdSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4433cfa76ccdSmrg _LT_DECL([], [NMEDIT], [1], 4434cfa76ccdSmrg [Tool to change global to local symbols on Mac OS X]) 4435cfa76ccdSmrg _LT_DECL([], [LIPO], [1], 4436cfa76ccdSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 4437cfa76ccdSmrg _LT_DECL([], [OTOOL], [1], 4438cfa76ccdSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4439cfa76ccdSmrg _LT_DECL([], [OTOOL64], [1], 4440cfa76ccdSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4441cfa76ccdSmrg 4442cfa76ccdSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4443cfa76ccdSmrg [lt_cv_apple_cc_single_mod=no 4444cfa76ccdSmrg if test -z "$LT_MULTI_MODULE"; then 4445cfa76ccdSmrg # By default we will add the -single_module flag. You can override 4446cfa76ccdSmrg # by either setting the environment variable LT_MULTI_MODULE 4447cfa76ccdSmrg # non-empty at configure time, or by adding -multi_module to the 4448cfa76ccdSmrg # link flags. 4449cfa76ccdSmrg rm -rf libconftest.dylib* 4450cfa76ccdSmrg echo "int foo(void){return 1;}" > conftest.c 4451cfa76ccdSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4452cfa76ccdSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4453cfa76ccdSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4454cfa76ccdSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4455cfa76ccdSmrg _lt_result=$? 4456cfa76ccdSmrg # If there is a non-empty error log, and "single_module" 4457cfa76ccdSmrg # appears in it, assume the flag caused a linker warning 4458cfa76ccdSmrg if test -s conftest.err && $GREP single_module conftest.err; then 4459cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4460cfa76ccdSmrg # Otherwise, if the output was created with a 0 exit code from 4461cfa76ccdSmrg # the compiler, it worked. 4462cfa76ccdSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4463cfa76ccdSmrg lt_cv_apple_cc_single_mod=yes 4464e96acad6Smrg else 4465cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4466e96acad6Smrg fi 4467cfa76ccdSmrg rm -rf libconftest.dylib* 4468cfa76ccdSmrg rm -f conftest.* 4469cfa76ccdSmrg fi]) 4470cfa76ccdSmrg 4471cfa76ccdSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4472cfa76ccdSmrg [lt_cv_ld_exported_symbols_list], 4473cfa76ccdSmrg [lt_cv_ld_exported_symbols_list=no 4474cfa76ccdSmrg save_LDFLAGS=$LDFLAGS 4475cfa76ccdSmrg echo "_main" > conftest.sym 4476cfa76ccdSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4477cfa76ccdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4478cfa76ccdSmrg [lt_cv_ld_exported_symbols_list=yes], 4479cfa76ccdSmrg [lt_cv_ld_exported_symbols_list=no]) 4480cfa76ccdSmrg LDFLAGS=$save_LDFLAGS 4481cfa76ccdSmrg ]) 4482cfa76ccdSmrg 4483cfa76ccdSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4484cfa76ccdSmrg [lt_cv_ld_force_load=no 4485cfa76ccdSmrg cat > conftest.c << _LT_EOF 4486cfa76ccdSmrgint forced_loaded() { return 2;} 4487cfa76ccdSmrg_LT_EOF 4488cfa76ccdSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4489cfa76ccdSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4490cfa76ccdSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4491cfa76ccdSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4492cfa76ccdSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4493cfa76ccdSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4494cfa76ccdSmrg cat > conftest.c << _LT_EOF 4495cfa76ccdSmrgint main() { return 0;} 4496cfa76ccdSmrg_LT_EOF 4497cfa76ccdSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4498cfa76ccdSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4499cfa76ccdSmrg _lt_result=$? 4500cfa76ccdSmrg if test -s conftest.err && $GREP force_load conftest.err; then 4501cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4502cfa76ccdSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4503cfa76ccdSmrg lt_cv_ld_force_load=yes 4504cfa76ccdSmrg else 4505cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4506cfa76ccdSmrg fi 4507cfa76ccdSmrg rm -f conftest.err libconftest.a conftest conftest.c 4508cfa76ccdSmrg rm -rf conftest.dSYM 4509cfa76ccdSmrg ]) 4510cfa76ccdSmrg case $host_os in 4511cfa76ccdSmrg rhapsody* | darwin1.[[012]]) 4512cfa76ccdSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4513cfa76ccdSmrg darwin1.*) 4514cfa76ccdSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4515cfa76ccdSmrg darwin*) 4516cfa76ccdSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4517cfa76ccdSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4518cfa76ccdSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4519cfa76ccdSmrg *) 4520cfa76ccdSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4521cfa76ccdSmrg esac 4522cfa76ccdSmrg ;; 4523cfa76ccdSmrg esac 4524cfa76ccdSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4525cfa76ccdSmrg _lt_dar_single_mod='$single_module' 4526cfa76ccdSmrg fi 4527cfa76ccdSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4528cfa76ccdSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4529cfa76ccdSmrg else 4530cfa76ccdSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4531cfa76ccdSmrg fi 4532cfa76ccdSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4533cfa76ccdSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4534cfa76ccdSmrg else 4535cfa76ccdSmrg _lt_dsymutil= 4536cfa76ccdSmrg fi 4537cfa76ccdSmrg ;; 4538cfa76ccdSmrg esac 4539cfa76ccdSmrg]) 4540cfa76ccdSmrg 4541cfa76ccdSmrg 4542cfa76ccdSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4543cfa76ccdSmrg# --------------------------------- 4544cfa76ccdSmrg# Checks for linker and compiler features on darwin 4545cfa76ccdSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4546cfa76ccdSmrg[ 4547cfa76ccdSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4548cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4549cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4550cfa76ccdSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4551cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4552cfa76ccdSmrg if test yes = "$lt_cv_ld_force_load"; then 4553cfa76ccdSmrg _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\"`' 4554cfa76ccdSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4555cfa76ccdSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4556cfa76ccdSmrg else 4557cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4558cfa76ccdSmrg fi 4559cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4560cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4561cfa76ccdSmrg case $cc_basename in 4562cfa76ccdSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4563cfa76ccdSmrg *) _lt_dar_can_shared=$GCC ;; 4564cfa76ccdSmrg esac 4565cfa76ccdSmrg if test yes = "$_lt_dar_can_shared"; then 4566cfa76ccdSmrg output_verbose_link_cmd=func_echo_all 4567cfa76ccdSmrg _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" 4568cfa76ccdSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4569cfa76ccdSmrg _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" 4570cfa76ccdSmrg _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" 4571cfa76ccdSmrg m4_if([$1], [CXX], 4572cfa76ccdSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4573cfa76ccdSmrg _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" 4574cfa76ccdSmrg _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" 4575cfa76ccdSmrg fi 4576cfa76ccdSmrg],[]) 4577cfa76ccdSmrg else 4578cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4579cfa76ccdSmrg fi 4580cfa76ccdSmrg]) 4581cfa76ccdSmrg 4582cfa76ccdSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4583cfa76ccdSmrg# ---------------------------------- 4584cfa76ccdSmrg# Links a minimal program and checks the executable 4585cfa76ccdSmrg# for the system default hardcoded library path. In most cases, 4586cfa76ccdSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 4587cfa76ccdSmrg# the location of the communication and MPI libs are included too. 4588cfa76ccdSmrg# If we don't find anything, use the default library path according 4589cfa76ccdSmrg# to the aix ld manual. 4590cfa76ccdSmrg# Store the results from the different compilers for each TAGNAME. 4591cfa76ccdSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 4592cfa76ccdSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4593cfa76ccdSmrg[m4_require([_LT_DECL_SED])dnl 4594cfa76ccdSmrgif test set = "${lt_cv_aix_libpath+set}"; then 4595cfa76ccdSmrg aix_libpath=$lt_cv_aix_libpath 4596cfa76ccdSmrgelse 4597cfa76ccdSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4598cfa76ccdSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4599cfa76ccdSmrg lt_aix_libpath_sed='[ 4600cfa76ccdSmrg /Import File Strings/,/^$/ { 4601cfa76ccdSmrg /^0/ { 4602cfa76ccdSmrg s/^0 *\([^ ]*\) *$/\1/ 4603cfa76ccdSmrg p 4604cfa76ccdSmrg } 4605cfa76ccdSmrg }]' 4606cfa76ccdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4607cfa76ccdSmrg # Check for a 64-bit object if we didn't find anything. 4608cfa76ccdSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4609cfa76ccdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4610cfa76ccdSmrg fi],[]) 4611cfa76ccdSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4612cfa76ccdSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4613cfa76ccdSmrg fi 4614cfa76ccdSmrg ]) 4615cfa76ccdSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4616cfa76ccdSmrgfi 4617cfa76ccdSmrg])# _LT_SYS_MODULE_PATH_AIX 4618cfa76ccdSmrg 4619cfa76ccdSmrg 4620cfa76ccdSmrg# _LT_SHELL_INIT(ARG) 4621cfa76ccdSmrg# ------------------- 4622cfa76ccdSmrgm4_define([_LT_SHELL_INIT], 4623cfa76ccdSmrg[m4_divert_text([M4SH-INIT], [$1 4624cfa76ccdSmrg])])# _LT_SHELL_INIT 4625cfa76ccdSmrg 4626cfa76ccdSmrg 4627cfa76ccdSmrg 4628cfa76ccdSmrg# _LT_PROG_ECHO_BACKSLASH 4629cfa76ccdSmrg# ----------------------- 4630cfa76ccdSmrg# Find how we can fake an echo command that does not interpret backslash. 4631cfa76ccdSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 4632cfa76ccdSmrg# of the generated configure script that will find a shell with a builtin 4633cfa76ccdSmrg# printf (that we can use as an echo command). 4634cfa76ccdSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4635cfa76ccdSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4636cfa76ccdSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4637cfa76ccdSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4638cfa76ccdSmrg 4639cfa76ccdSmrgAC_MSG_CHECKING([how to print strings]) 4640cfa76ccdSmrg# Test print first, because it will be a builtin if present. 4641cfa76ccdSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4642cfa76ccdSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4643cfa76ccdSmrg ECHO='print -r --' 4644cfa76ccdSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4645cfa76ccdSmrg ECHO='printf %s\n' 4646cfa76ccdSmrgelse 4647cfa76ccdSmrg # Use this function as a fallback that always works. 4648cfa76ccdSmrg func_fallback_echo () 4649cfa76ccdSmrg { 4650cfa76ccdSmrg eval 'cat <<_LTECHO_EOF 4651cfa76ccdSmrg$[]1 4652cfa76ccdSmrg_LTECHO_EOF' 4653cfa76ccdSmrg } 4654cfa76ccdSmrg ECHO='func_fallback_echo' 4655cfa76ccdSmrgfi 4656cfa76ccdSmrg 4657cfa76ccdSmrg# func_echo_all arg... 4658cfa76ccdSmrg# Invoke $ECHO with all args, space-separated. 4659cfa76ccdSmrgfunc_echo_all () 4660cfa76ccdSmrg{ 4661cfa76ccdSmrg $ECHO "$*" 4662cfa76ccdSmrg} 4663cfa76ccdSmrg 4664cfa76ccdSmrgcase $ECHO in 4665cfa76ccdSmrg printf*) AC_MSG_RESULT([printf]) ;; 4666cfa76ccdSmrg print*) AC_MSG_RESULT([print -r]) ;; 4667cfa76ccdSmrg *) AC_MSG_RESULT([cat]) ;; 4668cfa76ccdSmrgesac 4669cfa76ccdSmrg 4670cfa76ccdSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 4671cfa76ccdSmrg[_AS_DETECT_SUGGESTED([ 4672cfa76ccdSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4673cfa76ccdSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4674cfa76ccdSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4675cfa76ccdSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4676cfa76ccdSmrg PATH=/empty FPATH=/empty; export PATH FPATH 4677cfa76ccdSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4678cfa76ccdSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4679cfa76ccdSmrg 4680cfa76ccdSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4681cfa76ccdSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4682cfa76ccdSmrg])# _LT_PROG_ECHO_BACKSLASH 4683cfa76ccdSmrg 4684cfa76ccdSmrg 4685cfa76ccdSmrg# _LT_WITH_SYSROOT 4686cfa76ccdSmrg# ---------------- 4687cfa76ccdSmrgAC_DEFUN([_LT_WITH_SYSROOT], 4688cfa76ccdSmrg[m4_require([_LT_DECL_SED])dnl 4689cfa76ccdSmrgAC_MSG_CHECKING([for sysroot]) 4690cfa76ccdSmrgAC_ARG_WITH([sysroot], 4691cfa76ccdSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4692cfa76ccdSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 4693cfa76ccdSmrg if not specified).])], 4694cfa76ccdSmrg[], [with_sysroot=no]) 4695cfa76ccdSmrg 4696cfa76ccdSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 4697cfa76ccdSmrgdnl in case the user passed a directory name. 4698cfa76ccdSmrglt_sysroot= 4699cfa76ccdSmrgcase $with_sysroot in #( 4700cfa76ccdSmrg yes) 4701cfa76ccdSmrg if test yes = "$GCC"; then 4702cfa76ccdSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4703cfa76ccdSmrg fi 4704cfa76ccdSmrg ;; #( 4705cfa76ccdSmrg /*) 4706cfa76ccdSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4707cfa76ccdSmrg ;; #( 4708cfa76ccdSmrg no|'') 4709cfa76ccdSmrg ;; #( 4710cfa76ccdSmrg *) 4711cfa76ccdSmrg AC_MSG_RESULT([$with_sysroot]) 4712cfa76ccdSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4713cfa76ccdSmrg ;; 4714cfa76ccdSmrgesac 4715cfa76ccdSmrg 4716cfa76ccdSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4717cfa76ccdSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4718cfa76ccdSmrg[dependent libraries, and where our libraries should be installed.])]) 4719cfa76ccdSmrg 4720cfa76ccdSmrg# _LT_ENABLE_LOCK 4721cfa76ccdSmrg# --------------- 4722cfa76ccdSmrgm4_defun([_LT_ENABLE_LOCK], 4723cfa76ccdSmrg[AC_ARG_ENABLE([libtool-lock], 4724cfa76ccdSmrg [AS_HELP_STRING([--disable-libtool-lock], 4725cfa76ccdSmrg [avoid locking (might break parallel builds)])]) 4726cfa76ccdSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4727cfa76ccdSmrg 4728cfa76ccdSmrg# Some flags need to be propagated to the compiler or linker for good 4729cfa76ccdSmrg# libtool support. 4730cfa76ccdSmrgcase $host in 4731cfa76ccdSmrgia64-*-hpux*) 4732cfa76ccdSmrg # Find out what ABI is being produced by ac_compile, and set mode 4733cfa76ccdSmrg # options accordingly. 4734cfa76ccdSmrg echo 'int i;' > conftest.$ac_ext 4735cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 4736cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4737cfa76ccdSmrg *ELF-32*) 4738cfa76ccdSmrg HPUX_IA64_MODE=32 4739e96acad6Smrg ;; 4740cfa76ccdSmrg *ELF-64*) 4741cfa76ccdSmrg HPUX_IA64_MODE=64 4742e96acad6Smrg ;; 4743cfa76ccdSmrg esac 4744cfa76ccdSmrg fi 4745cfa76ccdSmrg rm -rf conftest* 4746cfa76ccdSmrg ;; 4747cfa76ccdSmrg*-*-irix6*) 4748cfa76ccdSmrg # Find out what ABI is being produced by ac_compile, and set linker 4749cfa76ccdSmrg # options accordingly. 4750cfa76ccdSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4751cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 4752cfa76ccdSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 4753cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4754cfa76ccdSmrg *32-bit*) 4755cfa76ccdSmrg LD="${LD-ld} -melf32bsmip" 4756cfa76ccdSmrg ;; 4757cfa76ccdSmrg *N32*) 4758cfa76ccdSmrg LD="${LD-ld} -melf32bmipn32" 4759cfa76ccdSmrg ;; 4760cfa76ccdSmrg *64-bit*) 4761cfa76ccdSmrg LD="${LD-ld} -melf64bmip" 4762e96acad6Smrg ;; 4763cfa76ccdSmrg esac 4764cfa76ccdSmrg else 4765cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4766cfa76ccdSmrg *32-bit*) 4767cfa76ccdSmrg LD="${LD-ld} -32" 4768cfa76ccdSmrg ;; 4769cfa76ccdSmrg *N32*) 4770cfa76ccdSmrg LD="${LD-ld} -n32" 4771cfa76ccdSmrg ;; 4772cfa76ccdSmrg *64-bit*) 4773cfa76ccdSmrg LD="${LD-ld} -64" 4774cfa76ccdSmrg ;; 4775cfa76ccdSmrg esac 4776cfa76ccdSmrg fi 4777cfa76ccdSmrg fi 4778cfa76ccdSmrg rm -rf conftest* 4779cfa76ccdSmrg ;; 4780cfa76ccdSmrg 4781cfa76ccdSmrgmips64*-*linux*) 4782cfa76ccdSmrg # Find out what ABI is being produced by ac_compile, and set linker 4783cfa76ccdSmrg # options accordingly. 4784cfa76ccdSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4785cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 4786cfa76ccdSmrg emul=elf 4787cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4788cfa76ccdSmrg *32-bit*) 4789cfa76ccdSmrg emul="${emul}32" 4790e96acad6Smrg ;; 4791cfa76ccdSmrg *64-bit*) 4792cfa76ccdSmrg emul="${emul}64" 4793e96acad6Smrg ;; 4794cfa76ccdSmrg esac 4795cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4796cfa76ccdSmrg *MSB*) 4797cfa76ccdSmrg emul="${emul}btsmip" 4798e96acad6Smrg ;; 4799cfa76ccdSmrg *LSB*) 4800cfa76ccdSmrg emul="${emul}ltsmip" 4801e96acad6Smrg ;; 4802cfa76ccdSmrg esac 4803cfa76ccdSmrg case `$FILECMD conftest.$ac_objext` in 4804cfa76ccdSmrg *N32*) 4805cfa76ccdSmrg emul="${emul}n32" 4806e96acad6Smrg ;; 4807cfa76ccdSmrg esac 4808cfa76ccdSmrg LD="${LD-ld} -m $emul" 4809cfa76ccdSmrg fi 4810cfa76ccdSmrg rm -rf conftest* 4811cfa76ccdSmrg ;; 4812cfa76ccdSmrg 4813cfa76ccdSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4814cfa76ccdSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4815cfa76ccdSmrg # Find out what ABI is being produced by ac_compile, and set linker 4816cfa76ccdSmrg # options accordingly. Note that the listed cases only cover the 4817cfa76ccdSmrg # situations where additional linker options are needed (such as when 4818cfa76ccdSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4819cfa76ccdSmrg # vice versa); the common cases where no linker options are needed do 4820cfa76ccdSmrg # not appear in the list. 4821cfa76ccdSmrg echo 'int i;' > conftest.$ac_ext 4822cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 4823cfa76ccdSmrg case `$FILECMD conftest.o` in 4824cfa76ccdSmrg *32-bit*) 4825cfa76ccdSmrg case $host in 4826cfa76ccdSmrg x86_64-*kfreebsd*-gnu) 4827cfa76ccdSmrg LD="${LD-ld} -m elf_i386_fbsd" 4828e96acad6Smrg ;; 4829cfa76ccdSmrg x86_64-*linux*) 4830cfa76ccdSmrg case `$FILECMD conftest.o` in 4831cfa76ccdSmrg *x86-64*) 4832cfa76ccdSmrg LD="${LD-ld} -m elf32_x86_64" 4833cfa76ccdSmrg ;; 4834cfa76ccdSmrg *) 4835cfa76ccdSmrg LD="${LD-ld} -m elf_i386" 4836cfa76ccdSmrg ;; 4837cfa76ccdSmrg esac 4838e96acad6Smrg ;; 4839cfa76ccdSmrg powerpc64le-*linux*) 4840cfa76ccdSmrg LD="${LD-ld} -m elf32lppclinux" 4841e96acad6Smrg ;; 4842cfa76ccdSmrg powerpc64-*linux*) 4843cfa76ccdSmrg LD="${LD-ld} -m elf32ppclinux" 4844e96acad6Smrg ;; 4845cfa76ccdSmrg s390x-*linux*) 4846cfa76ccdSmrg LD="${LD-ld} -m elf_s390" 4847e96acad6Smrg ;; 4848cfa76ccdSmrg sparc64-*linux*) 4849cfa76ccdSmrg LD="${LD-ld} -m elf32_sparc" 4850e96acad6Smrg ;; 4851e96acad6Smrg esac 4852e96acad6Smrg ;; 4853cfa76ccdSmrg *64-bit*) 4854cfa76ccdSmrg case $host in 4855cfa76ccdSmrg x86_64-*kfreebsd*-gnu) 4856cfa76ccdSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 4857e96acad6Smrg ;; 4858cfa76ccdSmrg x86_64-*linux*) 4859cfa76ccdSmrg LD="${LD-ld} -m elf_x86_64" 4860e96acad6Smrg ;; 4861cfa76ccdSmrg powerpcle-*linux*) 4862cfa76ccdSmrg LD="${LD-ld} -m elf64lppc" 4863e96acad6Smrg ;; 4864cfa76ccdSmrg powerpc-*linux*) 4865cfa76ccdSmrg LD="${LD-ld} -m elf64ppc" 4866e96acad6Smrg ;; 4867cfa76ccdSmrg s390*-*linux*|s390*-*tpf*) 4868cfa76ccdSmrg LD="${LD-ld} -m elf64_s390" 4869e96acad6Smrg ;; 4870cfa76ccdSmrg sparc*-*linux*) 4871cfa76ccdSmrg LD="${LD-ld} -m elf64_sparc" 4872e96acad6Smrg ;; 4873e96acad6Smrg esac 4874e96acad6Smrg ;; 4875e96acad6Smrg esac 4876e96acad6Smrg fi 4877cfa76ccdSmrg rm -rf conftest* 4878cfa76ccdSmrg ;; 4879dbbd9e4bSmacallan 4880cfa76ccdSmrg*-*-sco3.2v5*) 4881cfa76ccdSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4882cfa76ccdSmrg SAVE_CFLAGS=$CFLAGS 4883cfa76ccdSmrg CFLAGS="$CFLAGS -belf" 4884cfa76ccdSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4885cfa76ccdSmrg [AC_LANG_PUSH(C) 4886cfa76ccdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4887cfa76ccdSmrg AC_LANG_POP]) 4888cfa76ccdSmrg if test yes != "$lt_cv_cc_needs_belf"; then 4889cfa76ccdSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4890cfa76ccdSmrg CFLAGS=$SAVE_CFLAGS 4891cfa76ccdSmrg fi 4892cfa76ccdSmrg ;; 4893cfa76ccdSmrg*-*solaris*) 4894cfa76ccdSmrg # Find out what ABI is being produced by ac_compile, and set linker 4895cfa76ccdSmrg # options accordingly. 4896cfa76ccdSmrg echo 'int i;' > conftest.$ac_ext 4897cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 4898cfa76ccdSmrg case `$FILECMD conftest.o` in 4899cfa76ccdSmrg *64-bit*) 4900cfa76ccdSmrg case $lt_cv_prog_gnu_ld in 4901cfa76ccdSmrg yes*) 4902cfa76ccdSmrg case $host in 4903cfa76ccdSmrg i?86-*-solaris*|x86_64-*-solaris*) 4904cfa76ccdSmrg LD="${LD-ld} -m elf_x86_64" 4905cfa76ccdSmrg ;; 4906cfa76ccdSmrg sparc*-*-solaris*) 4907cfa76ccdSmrg LD="${LD-ld} -m elf64_sparc" 4908cfa76ccdSmrg ;; 4909cfa76ccdSmrg esac 4910cfa76ccdSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4911cfa76ccdSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4912cfa76ccdSmrg LD=${LD-ld}_sol2 4913cfa76ccdSmrg fi 4914e96acad6Smrg ;; 4915e96acad6Smrg *) 4916cfa76ccdSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4917cfa76ccdSmrg LD="${LD-ld} -64" 4918cfa76ccdSmrg fi 4919e96acad6Smrg ;; 4920e96acad6Smrg esac 4921e96acad6Smrg ;; 4922cfa76ccdSmrg esac 4923cfa76ccdSmrg fi 4924cfa76ccdSmrg rm -rf conftest* 4925cfa76ccdSmrg ;; 4926cfa76ccdSmrgesac 4927dbbd9e4bSmacallan 4928cfa76ccdSmrgneed_locks=$enable_libtool_lock 4929cfa76ccdSmrg])# _LT_ENABLE_LOCK 4930dbbd9e4bSmacallan 4931dbbd9e4bSmacallan 4932cfa76ccdSmrg# _LT_PROG_AR 4933cfa76ccdSmrg# ----------- 4934cfa76ccdSmrgm4_defun([_LT_PROG_AR], 4935cfa76ccdSmrg[AC_CHECK_TOOLS(AR, [ar], false) 4936cfa76ccdSmrg: ${AR=ar} 4937cfa76ccdSmrg_LT_DECL([], [AR], [1], [The archiver]) 4938dbbd9e4bSmacallan 4939cfa76ccdSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4940cfa76ccdSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4941cfa76ccdSmrg# higher priority because thats what people were doing historically (setting 4942cfa76ccdSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4943cfa76ccdSmrg# variable obsoleted/removed. 4944dbbd9e4bSmacallan 4945cfa76ccdSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4946cfa76ccdSmrglt_ar_flags=$AR_FLAGS 4947cfa76ccdSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4948dbbd9e4bSmacallan 4949cfa76ccdSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4950cfa76ccdSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4951cfa76ccdSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4952cfa76ccdSmrg [Flags to create an archive]) 4953dbbd9e4bSmacallan 4954cfa76ccdSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4955cfa76ccdSmrg [lt_cv_ar_at_file=no 4956cfa76ccdSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4957cfa76ccdSmrg [echo conftest.$ac_objext > conftest.lst 4958cfa76ccdSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4959cfa76ccdSmrg AC_TRY_EVAL([lt_ar_try]) 4960cfa76ccdSmrg if test 0 -eq "$ac_status"; then 4961cfa76ccdSmrg # Ensure the archiver fails upon bogus file names. 4962cfa76ccdSmrg rm -f conftest.$ac_objext libconftest.a 4963cfa76ccdSmrg AC_TRY_EVAL([lt_ar_try]) 4964cfa76ccdSmrg if test 0 -ne "$ac_status"; then 4965cfa76ccdSmrg lt_cv_ar_at_file=@ 4966cfa76ccdSmrg fi 4967e96acad6Smrg fi 4968cfa76ccdSmrg rm -f conftest.* libconftest.a 4969cfa76ccdSmrg ]) 4970cfa76ccdSmrg ]) 4971dbbd9e4bSmacallan 4972cfa76ccdSmrgif test no = "$lt_cv_ar_at_file"; then 4973cfa76ccdSmrg archiver_list_spec= 4974cfa76ccdSmrgelse 4975cfa76ccdSmrg archiver_list_spec=$lt_cv_ar_at_file 4976cfa76ccdSmrgfi 4977cfa76ccdSmrg_LT_DECL([], [archiver_list_spec], [1], 4978cfa76ccdSmrg [How to feed a file listing to the archiver]) 4979cfa76ccdSmrg])# _LT_PROG_AR 4980dbbd9e4bSmacallan 4981dbbd9e4bSmacallan 4982cfa76ccdSmrg# _LT_CMD_OLD_ARCHIVE 4983cfa76ccdSmrg# ------------------- 4984cfa76ccdSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4985cfa76ccdSmrg[_LT_PROG_AR 4986dbbd9e4bSmacallan 4987cfa76ccdSmrgAC_CHECK_TOOL(STRIP, strip, :) 4988cfa76ccdSmrgtest -z "$STRIP" && STRIP=: 4989cfa76ccdSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4990dbbd9e4bSmacallan 4991cfa76ccdSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4992cfa76ccdSmrgtest -z "$RANLIB" && RANLIB=: 4993cfa76ccdSmrg_LT_DECL([], [RANLIB], [1], 4994cfa76ccdSmrg [Commands used to install an old-style archive]) 4995dbbd9e4bSmacallan 4996cfa76ccdSmrg# Determine commands to create old-style static archives. 4997cfa76ccdSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4998cfa76ccdSmrgold_postinstall_cmds='chmod 644 $oldlib' 4999cfa76ccdSmrgold_postuninstall_cmds= 5000dbbd9e4bSmacallan 5001cfa76ccdSmrgif test -n "$RANLIB"; then 5002e96acad6Smrg case $host_os in 5003cfa76ccdSmrg bitrig* | openbsd*) 5004cfa76ccdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5005e96acad6Smrg ;; 5006cfa76ccdSmrg *) 5007cfa76ccdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5008e96acad6Smrg ;; 5009e96acad6Smrg esac 5010cfa76ccdSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5011cfa76ccdSmrgfi 5012dbbd9e4bSmacallan 5013cfa76ccdSmrgcase $host_os in 5014cfa76ccdSmrg darwin*) 5015cfa76ccdSmrg lock_old_archive_extraction=yes ;; 5016cfa76ccdSmrg *) 5017cfa76ccdSmrg lock_old_archive_extraction=no ;; 5018cfa76ccdSmrgesac 5019cfa76ccdSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 5020cfa76ccdSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 5021cfa76ccdSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 5022cfa76ccdSmrg [Commands used to build an old-style archive]) 5023cfa76ccdSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 5024cfa76ccdSmrg [Whether to use a lock for old archive extraction]) 5025cfa76ccdSmrg])# _LT_CMD_OLD_ARCHIVE 5026dbbd9e4bSmacallan 5027dbbd9e4bSmacallan 5028cfa76ccdSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5029cfa76ccdSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5030cfa76ccdSmrg# ---------------------------------------------------------------- 5031cfa76ccdSmrg# Check whether the given compiler option works 5032cfa76ccdSmrgAC_DEFUN([_LT_COMPILER_OPTION], 5033cfa76ccdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5034cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 5035cfa76ccdSmrgAC_CACHE_CHECK([$1], [$2], 5036cfa76ccdSmrg [$2=no 5037cfa76ccdSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5038cfa76ccdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5039cfa76ccdSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5040cfa76ccdSmrg # Insert the option either (1) after the last *FLAGS variable, or 5041cfa76ccdSmrg # (2) before a word containing "conftest.", or (3) at the end. 5042cfa76ccdSmrg # Note that $ac_compile itself does not contain backslashes and begins 5043cfa76ccdSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5044cfa76ccdSmrg # The option is referenced via a variable to avoid confusing sed. 5045cfa76ccdSmrg lt_compile=`echo "$ac_compile" | $SED \ 5046cfa76ccdSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5047cfa76ccdSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5048cfa76ccdSmrg -e 's:$: $lt_compiler_flag:'` 5049cfa76ccdSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5050cfa76ccdSmrg (eval "$lt_compile" 2>conftest.err) 5051cfa76ccdSmrg ac_status=$? 5052cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5053cfa76ccdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5054cfa76ccdSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 5055cfa76ccdSmrg # The compiler can only warn and ignore the option if not recognized 5056cfa76ccdSmrg # So say no if there are warnings other than the usual output. 5057cfa76ccdSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5058cfa76ccdSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5059cfa76ccdSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5060cfa76ccdSmrg $2=yes 5061cfa76ccdSmrg fi 5062cfa76ccdSmrg fi 5063cfa76ccdSmrg $RM conftest* 5064cfa76ccdSmrg]) 5065dbbd9e4bSmacallan 5066cfa76ccdSmrgif test yes = "[$]$2"; then 5067cfa76ccdSmrg m4_if([$5], , :, [$5]) 5068cfa76ccdSmrgelse 5069cfa76ccdSmrg m4_if([$6], , :, [$6]) 5070cfa76ccdSmrgfi 5071cfa76ccdSmrg])# _LT_COMPILER_OPTION 5072dbbd9e4bSmacallan 5073cfa76ccdSmrg# Old name: 5074cfa76ccdSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5075cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 5076cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5077dbbd9e4bSmacallan 5078dbbd9e4bSmacallan 5079cfa76ccdSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5080cfa76ccdSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5081cfa76ccdSmrg# ---------------------------------------------------- 5082cfa76ccdSmrg# Check whether the given linker option works 5083cfa76ccdSmrgAC_DEFUN([_LT_LINKER_OPTION], 5084cfa76ccdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5085cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 5086cfa76ccdSmrgAC_CACHE_CHECK([$1], [$2], 5087cfa76ccdSmrg [$2=no 5088cfa76ccdSmrg save_LDFLAGS=$LDFLAGS 5089cfa76ccdSmrg LDFLAGS="$LDFLAGS $3" 5090cfa76ccdSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5091cfa76ccdSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5092cfa76ccdSmrg # The linker can only warn and ignore the option if not recognized 5093cfa76ccdSmrg # So say no if there are warnings 5094cfa76ccdSmrg if test -s conftest.err; then 5095cfa76ccdSmrg # Append any errors to the config.log. 5096cfa76ccdSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5097cfa76ccdSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5098cfa76ccdSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5099cfa76ccdSmrg if diff conftest.exp conftest.er2 >/dev/null; then 5100cfa76ccdSmrg $2=yes 5101cfa76ccdSmrg fi 5102cfa76ccdSmrg else 5103cfa76ccdSmrg $2=yes 5104cfa76ccdSmrg fi 5105cfa76ccdSmrg fi 5106cfa76ccdSmrg $RM -r conftest* 5107cfa76ccdSmrg LDFLAGS=$save_LDFLAGS 5108cfa76ccdSmrg]) 5109dbbd9e4bSmacallan 5110cfa76ccdSmrgif test yes = "[$]$2"; then 5111cfa76ccdSmrg m4_if([$4], , :, [$4]) 5112cfa76ccdSmrgelse 5113cfa76ccdSmrg m4_if([$5], , :, [$5]) 5114cfa76ccdSmrgfi 5115cfa76ccdSmrg])# _LT_LINKER_OPTION 5116dbbd9e4bSmacallan 5117cfa76ccdSmrg# Old name: 5118cfa76ccdSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5119cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 5120cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5121dbbd9e4bSmacallan 5122e96acad6Smrg 5123cfa76ccdSmrg# LT_CMD_MAX_LEN 5124cfa76ccdSmrg#--------------- 5125cfa76ccdSmrgAC_DEFUN([LT_CMD_MAX_LEN], 5126cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5127cfa76ccdSmrg# find the maximum length of command line arguments 5128cfa76ccdSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5129cfa76ccdSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5130cfa76ccdSmrg i=0 5131cfa76ccdSmrg teststring=ABCD 5132cfa76ccdSmrg 5133cfa76ccdSmrg case $build_os in 5134cfa76ccdSmrg msdosdjgpp*) 5135cfa76ccdSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5136cfa76ccdSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5137cfa76ccdSmrg # during glob expansion). Even if it were fixed, the result of this 5138cfa76ccdSmrg # check would be larger than it should be. 5139cfa76ccdSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5140cfa76ccdSmrg ;; 5141cfa76ccdSmrg 5142cfa76ccdSmrg gnu*) 5143cfa76ccdSmrg # Under GNU Hurd, this test is not required because there is 5144cfa76ccdSmrg # no limit to the length of command line arguments. 5145cfa76ccdSmrg # Libtool will interpret -1 as no limit whatsoever 5146cfa76ccdSmrg lt_cv_sys_max_cmd_len=-1; 5147cfa76ccdSmrg ;; 5148cfa76ccdSmrg 5149cfa76ccdSmrg cygwin* | mingw* | cegcc*) 5150cfa76ccdSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5151cfa76ccdSmrg # about 5 minutes as the teststring grows exponentially. 5152cfa76ccdSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 5153cfa76ccdSmrg # you end up with a "frozen" computer, even though with patience 5154cfa76ccdSmrg # the test eventually succeeds (with a max line length of 256k). 5155cfa76ccdSmrg # Instead, let's just punt: use the minimum linelength reported by 5156cfa76ccdSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 5157cfa76ccdSmrg lt_cv_sys_max_cmd_len=8192; 5158cfa76ccdSmrg ;; 5159cfa76ccdSmrg 5160cfa76ccdSmrg mint*) 5161cfa76ccdSmrg # On MiNT this can take a long time and run out of memory. 5162cfa76ccdSmrg lt_cv_sys_max_cmd_len=8192; 5163cfa76ccdSmrg ;; 5164cfa76ccdSmrg 5165cfa76ccdSmrg amigaos*) 5166cfa76ccdSmrg # On AmigaOS with pdksh, this test takes hours, literally. 5167cfa76ccdSmrg # So we just punt and use a minimum line length of 8192. 5168cfa76ccdSmrg lt_cv_sys_max_cmd_len=8192; 5169cfa76ccdSmrg ;; 5170cfa76ccdSmrg 5171cfa76ccdSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5172cfa76ccdSmrg # This has been around since 386BSD, at least. Likely further. 5173cfa76ccdSmrg if test -x /sbin/sysctl; then 5174cfa76ccdSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5175cfa76ccdSmrg elif test -x /usr/sbin/sysctl; then 5176cfa76ccdSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5177cfa76ccdSmrg else 5178cfa76ccdSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5179cfa76ccdSmrg fi 5180cfa76ccdSmrg # And add a safety zone 5181cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5182cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5183cfa76ccdSmrg ;; 5184dbbd9e4bSmacallan 5185cfa76ccdSmrg interix*) 5186cfa76ccdSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5187cfa76ccdSmrg lt_cv_sys_max_cmd_len=196608 5188cfa76ccdSmrg ;; 5189dbbd9e4bSmacallan 5190cfa76ccdSmrg os2*) 5191cfa76ccdSmrg # The test takes a long time on OS/2. 5192cfa76ccdSmrg lt_cv_sys_max_cmd_len=8192 5193cfa76ccdSmrg ;; 5194dbbd9e4bSmacallan 5195cfa76ccdSmrg osf*) 5196cfa76ccdSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5197cfa76ccdSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5198cfa76ccdSmrg # nice to cause kernel panics so lets avoid the loop below. 5199cfa76ccdSmrg # First set a reasonable default. 5200cfa76ccdSmrg lt_cv_sys_max_cmd_len=16384 5201cfa76ccdSmrg # 5202cfa76ccdSmrg if test -x /sbin/sysconfig; then 5203cfa76ccdSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5204cfa76ccdSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5205cfa76ccdSmrg esac 5206cfa76ccdSmrg fi 5207cfa76ccdSmrg ;; 5208cfa76ccdSmrg sco3.2v5*) 5209cfa76ccdSmrg lt_cv_sys_max_cmd_len=102400 5210cfa76ccdSmrg ;; 5211cfa76ccdSmrg sysv5* | sco5v6* | sysv4.2uw2*) 5212cfa76ccdSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5213cfa76ccdSmrg if test -n "$kargmax"; then 5214cfa76ccdSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5215cfa76ccdSmrg else 5216cfa76ccdSmrg lt_cv_sys_max_cmd_len=32768 5217cfa76ccdSmrg fi 5218cfa76ccdSmrg ;; 5219cfa76ccdSmrg *) 5220cfa76ccdSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5221cfa76ccdSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5222cfa76ccdSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5223cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5224cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5225cfa76ccdSmrg else 5226cfa76ccdSmrg # Make teststring a little bigger before we do anything with it. 5227cfa76ccdSmrg # a 1K string should be a reasonable start. 5228cfa76ccdSmrg for i in 1 2 3 4 5 6 7 8; do 5229cfa76ccdSmrg teststring=$teststring$teststring 5230cfa76ccdSmrg done 5231cfa76ccdSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5232cfa76ccdSmrg # If test is not a shell built-in, we'll probably end up computing a 5233cfa76ccdSmrg # maximum length that is only half of the actual maximum length, but 5234cfa76ccdSmrg # we can't tell. 5235cfa76ccdSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5236cfa76ccdSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5237cfa76ccdSmrg test 17 != "$i" # 1/2 MB should be enough 5238cfa76ccdSmrg do 5239cfa76ccdSmrg i=`expr $i + 1` 5240cfa76ccdSmrg teststring=$teststring$teststring 5241cfa76ccdSmrg done 5242cfa76ccdSmrg # Only check the string length outside the loop. 5243cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5244cfa76ccdSmrg teststring= 5245cfa76ccdSmrg # Add a significant safety factor because C++ compilers can tack on 5246cfa76ccdSmrg # massive amounts of additional arguments before passing them to the 5247cfa76ccdSmrg # linker. It appears as though 1/2 is a usable value. 5248cfa76ccdSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5249cfa76ccdSmrg fi 5250cfa76ccdSmrg ;; 5251cfa76ccdSmrg esac 5252cfa76ccdSmrg]) 5253cfa76ccdSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 5254cfa76ccdSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5255cfa76ccdSmrgelse 5256cfa76ccdSmrg AC_MSG_RESULT(none) 5257cfa76ccdSmrgfi 5258cfa76ccdSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5259cfa76ccdSmrg_LT_DECL([], [max_cmd_len], [0], 5260cfa76ccdSmrg [What is the maximum length of a command?]) 5261cfa76ccdSmrg])# LT_CMD_MAX_LEN 5262dbbd9e4bSmacallan 5263cfa76ccdSmrg# Old name: 5264cfa76ccdSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5265cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 5266cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5267dbbd9e4bSmacallan 5268dbbd9e4bSmacallan 5269cfa76ccdSmrg# _LT_HEADER_DLFCN 5270cfa76ccdSmrg# ---------------- 5271cfa76ccdSmrgm4_defun([_LT_HEADER_DLFCN], 5272cfa76ccdSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5273cfa76ccdSmrg])# _LT_HEADER_DLFCN 5274dbbd9e4bSmacallan 5275dbbd9e4bSmacallan 5276cfa76ccdSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5277cfa76ccdSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5278cfa76ccdSmrg# ---------------------------------------------------------------- 5279cfa76ccdSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 5280cfa76ccdSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5281cfa76ccdSmrgif test yes = "$cross_compiling"; then : 5282cfa76ccdSmrg [$4] 5283cfa76ccdSmrgelse 5284cfa76ccdSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5285cfa76ccdSmrg lt_status=$lt_dlunknown 5286cfa76ccdSmrg cat > conftest.$ac_ext <<_LT_EOF 5287cfa76ccdSmrg[#line $LINENO "configure" 5288cfa76ccdSmrg#include "confdefs.h" 5289dbbd9e4bSmacallan 5290cfa76ccdSmrg#if HAVE_DLFCN_H 5291cfa76ccdSmrg#include <dlfcn.h> 5292cfa76ccdSmrg#endif 5293dbbd9e4bSmacallan 5294cfa76ccdSmrg#include <stdio.h> 5295dbbd9e4bSmacallan 5296cfa76ccdSmrg#ifdef RTLD_GLOBAL 5297cfa76ccdSmrg# define LT_DLGLOBAL RTLD_GLOBAL 5298cfa76ccdSmrg#else 5299cfa76ccdSmrg# ifdef DL_GLOBAL 5300cfa76ccdSmrg# define LT_DLGLOBAL DL_GLOBAL 5301cfa76ccdSmrg# else 5302cfa76ccdSmrg# define LT_DLGLOBAL 0 5303cfa76ccdSmrg# endif 5304cfa76ccdSmrg#endif 5305dbbd9e4bSmacallan 5306cfa76ccdSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5307cfa76ccdSmrg find out it does not work in some platform. */ 5308cfa76ccdSmrg#ifndef LT_DLLAZY_OR_NOW 5309cfa76ccdSmrg# ifdef RTLD_LAZY 5310cfa76ccdSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5311cfa76ccdSmrg# else 5312cfa76ccdSmrg# ifdef DL_LAZY 5313cfa76ccdSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 5314cfa76ccdSmrg# else 5315cfa76ccdSmrg# ifdef RTLD_NOW 5316cfa76ccdSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5317cfa76ccdSmrg# else 5318cfa76ccdSmrg# ifdef DL_NOW 5319cfa76ccdSmrg# define LT_DLLAZY_OR_NOW DL_NOW 5320cfa76ccdSmrg# else 5321cfa76ccdSmrg# define LT_DLLAZY_OR_NOW 0 5322cfa76ccdSmrg# endif 5323cfa76ccdSmrg# endif 5324cfa76ccdSmrg# endif 5325cfa76ccdSmrg# endif 5326cfa76ccdSmrg#endif 5327dbbd9e4bSmacallan 5328cfa76ccdSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 5329cfa76ccdSmrg correspondingly for the symbols needed. */ 5330cfa76ccdSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5331cfa76ccdSmrgint fnord () __attribute__((visibility("default"))); 5332cfa76ccdSmrg#endif 5333dbbd9e4bSmacallan 5334cfa76ccdSmrgint fnord () { return 42; } 5335cfa76ccdSmrgint main () 5336cfa76ccdSmrg{ 5337cfa76ccdSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5338cfa76ccdSmrg int status = $lt_dlunknown; 5339dbbd9e4bSmacallan 5340cfa76ccdSmrg if (self) 5341cfa76ccdSmrg { 5342cfa76ccdSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5343cfa76ccdSmrg else 5344cfa76ccdSmrg { 5345cfa76ccdSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5346cfa76ccdSmrg else puts (dlerror ()); 5347cfa76ccdSmrg } 5348cfa76ccdSmrg /* dlclose (self); */ 5349cfa76ccdSmrg } 5350e96acad6Smrg else 5351cfa76ccdSmrg puts (dlerror ()); 5352dbbd9e4bSmacallan 5353cfa76ccdSmrg return status; 5354cfa76ccdSmrg}] 5355cfa76ccdSmrg_LT_EOF 5356cfa76ccdSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5357cfa76ccdSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5358cfa76ccdSmrg lt_status=$? 5359cfa76ccdSmrg case x$lt_status in 5360cfa76ccdSmrg x$lt_dlno_uscore) $1 ;; 5361cfa76ccdSmrg x$lt_dlneed_uscore) $2 ;; 5362cfa76ccdSmrg x$lt_dlunknown|x*) $3 ;; 5363cfa76ccdSmrg esac 5364cfa76ccdSmrg else : 5365cfa76ccdSmrg # compilation failed 5366cfa76ccdSmrg $3 5367cfa76ccdSmrg fi 5368cfa76ccdSmrgfi 5369cfa76ccdSmrgrm -fr conftest* 5370cfa76ccdSmrg])# _LT_TRY_DLOPEN_SELF 5371dbbd9e4bSmacallan 5372dbbd9e4bSmacallan 5373cfa76ccdSmrg# LT_SYS_DLOPEN_SELF 5374cfa76ccdSmrg# ------------------ 5375cfa76ccdSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5376cfa76ccdSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5377cfa76ccdSmrgif test yes != "$enable_dlopen"; then 5378cfa76ccdSmrg enable_dlopen=unknown 5379cfa76ccdSmrg enable_dlopen_self=unknown 5380cfa76ccdSmrg enable_dlopen_self_static=unknown 5381cfa76ccdSmrgelse 5382cfa76ccdSmrg lt_cv_dlopen=no 5383cfa76ccdSmrg lt_cv_dlopen_libs= 5384dbbd9e4bSmacallan 5385cfa76ccdSmrg case $host_os in 5386cfa76ccdSmrg beos*) 5387cfa76ccdSmrg lt_cv_dlopen=load_add_on 5388cfa76ccdSmrg lt_cv_dlopen_libs= 5389cfa76ccdSmrg lt_cv_dlopen_self=yes 5390cfa76ccdSmrg ;; 5391dbbd9e4bSmacallan 5392cfa76ccdSmrg mingw* | pw32* | cegcc*) 5393cfa76ccdSmrg lt_cv_dlopen=LoadLibrary 5394cfa76ccdSmrg lt_cv_dlopen_libs= 5395cfa76ccdSmrg ;; 5396dbbd9e4bSmacallan 5397cfa76ccdSmrg cygwin*) 5398cfa76ccdSmrg lt_cv_dlopen=dlopen 5399cfa76ccdSmrg lt_cv_dlopen_libs= 5400cfa76ccdSmrg ;; 5401dbbd9e4bSmacallan 5402cfa76ccdSmrg darwin*) 5403cfa76ccdSmrg # if libdl is installed we need to link against it 5404cfa76ccdSmrg AC_CHECK_LIB([dl], [dlopen], 5405cfa76ccdSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5406cfa76ccdSmrg lt_cv_dlopen=dyld 5407cfa76ccdSmrg lt_cv_dlopen_libs= 5408cfa76ccdSmrg lt_cv_dlopen_self=yes 5409cfa76ccdSmrg ]) 5410cfa76ccdSmrg ;; 5411dbbd9e4bSmacallan 5412cfa76ccdSmrg tpf*) 5413cfa76ccdSmrg # Don't try to run any link tests for TPF. We know it's impossible 5414cfa76ccdSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 5415cfa76ccdSmrg lt_cv_dlopen=dlopen 5416cfa76ccdSmrg lt_cv_dlopen_libs= 5417cfa76ccdSmrg lt_cv_dlopen_self=no 5418cfa76ccdSmrg ;; 5419dbbd9e4bSmacallan 5420cfa76ccdSmrg *) 5421cfa76ccdSmrg AC_CHECK_FUNC([shl_load], 5422cfa76ccdSmrg [lt_cv_dlopen=shl_load], 5423cfa76ccdSmrg [AC_CHECK_LIB([dld], [shl_load], 5424cfa76ccdSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5425cfa76ccdSmrg [AC_CHECK_FUNC([dlopen], 5426cfa76ccdSmrg [lt_cv_dlopen=dlopen], 5427cfa76ccdSmrg [AC_CHECK_LIB([dl], [dlopen], 5428cfa76ccdSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5429cfa76ccdSmrg [AC_CHECK_LIB([svld], [dlopen], 5430cfa76ccdSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5431cfa76ccdSmrg [AC_CHECK_LIB([dld], [dld_link], 5432cfa76ccdSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5433cfa76ccdSmrg ]) 5434cfa76ccdSmrg ]) 5435cfa76ccdSmrg ]) 5436cfa76ccdSmrg ]) 5437cfa76ccdSmrg ]) 5438cfa76ccdSmrg ;; 5439cfa76ccdSmrg esac 5440dbbd9e4bSmacallan 5441cfa76ccdSmrg if test no = "$lt_cv_dlopen"; then 5442cfa76ccdSmrg enable_dlopen=no 5443cfa76ccdSmrg else 5444cfa76ccdSmrg enable_dlopen=yes 5445cfa76ccdSmrg fi 5446dbbd9e4bSmacallan 5447cfa76ccdSmrg case $lt_cv_dlopen in 5448cfa76ccdSmrg dlopen) 5449cfa76ccdSmrg save_CPPFLAGS=$CPPFLAGS 5450cfa76ccdSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5451dbbd9e4bSmacallan 5452cfa76ccdSmrg save_LDFLAGS=$LDFLAGS 5453cfa76ccdSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5454dbbd9e4bSmacallan 5455cfa76ccdSmrg save_LIBS=$LIBS 5456cfa76ccdSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 5457dbbd9e4bSmacallan 5458cfa76ccdSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 5459cfa76ccdSmrg lt_cv_dlopen_self, [dnl 5460cfa76ccdSmrg _LT_TRY_DLOPEN_SELF( 5461cfa76ccdSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5462cfa76ccdSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5463cfa76ccdSmrg ]) 5464dbbd9e4bSmacallan 5465cfa76ccdSmrg if test yes = "$lt_cv_dlopen_self"; then 5466cfa76ccdSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5467cfa76ccdSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5468cfa76ccdSmrg lt_cv_dlopen_self_static, [dnl 5469cfa76ccdSmrg _LT_TRY_DLOPEN_SELF( 5470cfa76ccdSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5471cfa76ccdSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5472cfa76ccdSmrg ]) 5473cfa76ccdSmrg fi 5474dbbd9e4bSmacallan 5475cfa76ccdSmrg CPPFLAGS=$save_CPPFLAGS 5476cfa76ccdSmrg LDFLAGS=$save_LDFLAGS 5477cfa76ccdSmrg LIBS=$save_LIBS 5478cfa76ccdSmrg ;; 5479cfa76ccdSmrg esac 5480dbbd9e4bSmacallan 5481cfa76ccdSmrg case $lt_cv_dlopen_self in 5482cfa76ccdSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5483cfa76ccdSmrg *) enable_dlopen_self=unknown ;; 5484cfa76ccdSmrg esac 5485dbbd9e4bSmacallan 5486cfa76ccdSmrg case $lt_cv_dlopen_self_static in 5487cfa76ccdSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5488cfa76ccdSmrg *) enable_dlopen_self_static=unknown ;; 5489cfa76ccdSmrg esac 5490cfa76ccdSmrgfi 5491cfa76ccdSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5492cfa76ccdSmrg [Whether dlopen is supported]) 5493cfa76ccdSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5494cfa76ccdSmrg [Whether dlopen of programs is supported]) 5495cfa76ccdSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5496cfa76ccdSmrg [Whether dlopen of statically linked programs is supported]) 5497cfa76ccdSmrg])# LT_SYS_DLOPEN_SELF 5498dbbd9e4bSmacallan 5499cfa76ccdSmrg# Old name: 5500cfa76ccdSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5501cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 5502cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5503dbbd9e4bSmacallan 5504dbbd9e4bSmacallan 5505cfa76ccdSmrg# _LT_COMPILER_C_O([TAGNAME]) 5506cfa76ccdSmrg# --------------------------- 5507cfa76ccdSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 5508cfa76ccdSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5509cfa76ccdSmrgm4_defun([_LT_COMPILER_C_O], 5510cfa76ccdSmrg[m4_require([_LT_DECL_SED])dnl 5511cfa76ccdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5512cfa76ccdSmrgm4_require([_LT_TAG_COMPILER])dnl 5513cfa76ccdSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5514cfa76ccdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5515cfa76ccdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5516cfa76ccdSmrg $RM -r conftest 2>/dev/null 5517cfa76ccdSmrg mkdir conftest 5518cfa76ccdSmrg cd conftest 5519cfa76ccdSmrg mkdir out 5520cfa76ccdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5521dbbd9e4bSmacallan 5522cfa76ccdSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5523cfa76ccdSmrg # Insert the option either (1) after the last *FLAGS variable, or 5524cfa76ccdSmrg # (2) before a word containing "conftest.", or (3) at the end. 5525cfa76ccdSmrg # Note that $ac_compile itself does not contain backslashes and begins 5526cfa76ccdSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5527cfa76ccdSmrg lt_compile=`echo "$ac_compile" | $SED \ 5528cfa76ccdSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5529cfa76ccdSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5530cfa76ccdSmrg -e 's:$: $lt_compiler_flag:'` 5531cfa76ccdSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5532cfa76ccdSmrg (eval "$lt_compile" 2>out/conftest.err) 5533cfa76ccdSmrg ac_status=$? 5534cfa76ccdSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5535cfa76ccdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5536cfa76ccdSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5537cfa76ccdSmrg then 5538cfa76ccdSmrg # The compiler can only warn and ignore the option if not recognized 5539cfa76ccdSmrg # So say no if there are warnings 5540cfa76ccdSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5541cfa76ccdSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5542cfa76ccdSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5543cfa76ccdSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5544cfa76ccdSmrg fi 5545cfa76ccdSmrg fi 5546cfa76ccdSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5547cfa76ccdSmrg $RM conftest* 5548cfa76ccdSmrg # SGI C++ compiler will create directory out/ii_files/ for 5549cfa76ccdSmrg # template instantiation 5550cfa76ccdSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5551cfa76ccdSmrg $RM out/* && rmdir out 5552cfa76ccdSmrg cd .. 5553cfa76ccdSmrg $RM -r conftest 5554cfa76ccdSmrg $RM conftest* 5555cfa76ccdSmrg]) 5556cfa76ccdSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5557cfa76ccdSmrg [Does compiler simultaneously support -c and -o options?]) 5558cfa76ccdSmrg])# _LT_COMPILER_C_O 5559dbbd9e4bSmacallan 5560dbbd9e4bSmacallan 5561cfa76ccdSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5562cfa76ccdSmrg# ---------------------------------- 5563cfa76ccdSmrg# Check to see if we can do hard links to lock some files if needed 5564cfa76ccdSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5565cfa76ccdSmrg[m4_require([_LT_ENABLE_LOCK])dnl 5566cfa76ccdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5567cfa76ccdSmrg_LT_COMPILER_C_O([$1]) 5568dbbd9e4bSmacallan 5569cfa76ccdSmrghard_links=nottested 5570cfa76ccdSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5571cfa76ccdSmrg # do not overwrite the value of need_locks provided by the user 5572cfa76ccdSmrg AC_MSG_CHECKING([if we can lock with hard links]) 5573cfa76ccdSmrg hard_links=yes 5574cfa76ccdSmrg $RM conftest* 5575cfa76ccdSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5576cfa76ccdSmrg touch conftest.a 5577cfa76ccdSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 5578cfa76ccdSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5579cfa76ccdSmrg AC_MSG_RESULT([$hard_links]) 5580cfa76ccdSmrg if test no = "$hard_links"; then 5581cfa76ccdSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5582cfa76ccdSmrg need_locks=warn 5583cfa76ccdSmrg fi 5584cfa76ccdSmrgelse 5585cfa76ccdSmrg need_locks=no 5586cfa76ccdSmrgfi 5587cfa76ccdSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5588cfa76ccdSmrg])# _LT_COMPILER_FILE_LOCKS 5589cfa76ccdSmrg 5590cfa76ccdSmrg 5591cfa76ccdSmrg# _LT_CHECK_OBJDIR 5592cfa76ccdSmrg# ---------------- 5593cfa76ccdSmrgm4_defun([_LT_CHECK_OBJDIR], 5594cfa76ccdSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5595cfa76ccdSmrg[rm -f .libs 2>/dev/null 5596cfa76ccdSmrgmkdir .libs 2>/dev/null 5597cfa76ccdSmrgif test -d .libs; then 5598cfa76ccdSmrg lt_cv_objdir=.libs 5599cfa76ccdSmrgelse 5600cfa76ccdSmrg # MS-DOS does not allow filenames that begin with a dot. 5601cfa76ccdSmrg lt_cv_objdir=_libs 5602cfa76ccdSmrgfi 5603cfa76ccdSmrgrmdir .libs 2>/dev/null]) 5604cfa76ccdSmrgobjdir=$lt_cv_objdir 5605cfa76ccdSmrg_LT_DECL([], [objdir], [0], 5606cfa76ccdSmrg [The name of the directory that contains temporary libtool files])dnl 5607cfa76ccdSmrgm4_pattern_allow([LT_OBJDIR])dnl 5608cfa76ccdSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5609cfa76ccdSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5610cfa76ccdSmrg])# _LT_CHECK_OBJDIR 5611dbbd9e4bSmacallan 5612dbbd9e4bSmacallan 5613cfa76ccdSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5614cfa76ccdSmrg# -------------------------------------- 5615cfa76ccdSmrg# Check hardcoding attributes. 5616cfa76ccdSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5617cfa76ccdSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5618cfa76ccdSmrg_LT_TAGVAR(hardcode_action, $1)= 5619cfa76ccdSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5620cfa76ccdSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5621cfa76ccdSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5622dbbd9e4bSmacallan 5623cfa76ccdSmrg # We can hardcode non-existent directories. 5624cfa76ccdSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5625cfa76ccdSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5626cfa76ccdSmrg # have to relink, otherwise we might link with an installed library 5627cfa76ccdSmrg # when we should be linking with a yet-to-be-installed one 5628cfa76ccdSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5629cfa76ccdSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5630cfa76ccdSmrg # Linking always hardcodes the temporary library directory. 5631cfa76ccdSmrg _LT_TAGVAR(hardcode_action, $1)=relink 5632cfa76ccdSmrg else 5633cfa76ccdSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5634cfa76ccdSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 5635cfa76ccdSmrg fi 5636cfa76ccdSmrgelse 5637cfa76ccdSmrg # We cannot hardcode anything, or else we can only hardcode existing 5638cfa76ccdSmrg # directories. 5639cfa76ccdSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5640cfa76ccdSmrgfi 5641cfa76ccdSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5642dbbd9e4bSmacallan 5643cfa76ccdSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5644cfa76ccdSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5645cfa76ccdSmrg # Fast installation is not supported 5646cfa76ccdSmrg enable_fast_install=no 5647cfa76ccdSmrgelif test yes = "$shlibpath_overrides_runpath" || 5648cfa76ccdSmrg test no = "$enable_shared"; then 5649cfa76ccdSmrg # Fast installation is not necessary 5650cfa76ccdSmrg enable_fast_install=needless 5651cfa76ccdSmrgfi 5652cfa76ccdSmrg_LT_TAGDECL([], [hardcode_action], [0], 5653cfa76ccdSmrg [How to hardcode a shared library path into an executable]) 5654cfa76ccdSmrg])# _LT_LINKER_HARDCODE_LIBPATH 5655dbbd9e4bSmacallan 5656dbbd9e4bSmacallan 5657cfa76ccdSmrg# _LT_CMD_STRIPLIB 5658cfa76ccdSmrg# ---------------- 5659cfa76ccdSmrgm4_defun([_LT_CMD_STRIPLIB], 5660cfa76ccdSmrg[m4_require([_LT_DECL_EGREP]) 5661cfa76ccdSmrgstriplib= 5662cfa76ccdSmrgold_striplib= 5663cfa76ccdSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5664cfa76ccdSmrgif test -z "$STRIP"; then 5665cfa76ccdSmrg AC_MSG_RESULT([no]) 5666cfa76ccdSmrgelse 5667cfa76ccdSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5668cfa76ccdSmrg old_striplib="$STRIP --strip-debug" 5669cfa76ccdSmrg striplib="$STRIP --strip-unneeded" 5670cfa76ccdSmrg AC_MSG_RESULT([yes]) 5671cfa76ccdSmrg else 5672cfa76ccdSmrg case $host_os in 5673cfa76ccdSmrg darwin*) 5674cfa76ccdSmrg # FIXME - insert some real tests, host_os isn't really good enough 5675cfa76ccdSmrg striplib="$STRIP -x" 5676cfa76ccdSmrg old_striplib="$STRIP -S" 5677cfa76ccdSmrg AC_MSG_RESULT([yes]) 5678e96acad6Smrg ;; 5679cfa76ccdSmrg freebsd*) 5680cfa76ccdSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5681cfa76ccdSmrg old_striplib="$STRIP --strip-debug" 5682cfa76ccdSmrg striplib="$STRIP --strip-unneeded" 5683cfa76ccdSmrg AC_MSG_RESULT([yes]) 5684e96acad6Smrg else 5685cfa76ccdSmrg AC_MSG_RESULT([no]) 5686e96acad6Smrg fi 5687e96acad6Smrg ;; 5688cfa76ccdSmrg *) 5689cfa76ccdSmrg AC_MSG_RESULT([no]) 5690e96acad6Smrg ;; 5691cfa76ccdSmrg esac 5692cfa76ccdSmrg fi 5693cfa76ccdSmrgfi 5694cfa76ccdSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5695cfa76ccdSmrg_LT_DECL([], [striplib], [1]) 5696cfa76ccdSmrg])# _LT_CMD_STRIPLIB 5697dbbd9e4bSmacallan 5698cfa76ccdSmrg 5699cfa76ccdSmrg# _LT_PREPARE_MUNGE_PATH_LIST 5700cfa76ccdSmrg# --------------------------- 5701cfa76ccdSmrg# Make sure func_munge_path_list() is defined correctly. 5702cfa76ccdSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5703cfa76ccdSmrg[[# func_munge_path_list VARIABLE PATH 5704cfa76ccdSmrg# ----------------------------------- 5705cfa76ccdSmrg# VARIABLE is name of variable containing _space_ separated list of 5706cfa76ccdSmrg# directories to be munged by the contents of PATH, which is string 5707cfa76ccdSmrg# having a format: 5708cfa76ccdSmrg# "DIR[:DIR]:" 5709cfa76ccdSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 5710cfa76ccdSmrg# ":DIR[:DIR]" 5711cfa76ccdSmrg# string "DIR[ DIR]" will be appended to VARIABLE 5712cfa76ccdSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5713cfa76ccdSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5714cfa76ccdSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 5715cfa76ccdSmrg# "DIR[:DIR]" 5716cfa76ccdSmrg# VARIABLE will be replaced by "DIR[ DIR]" 5717cfa76ccdSmrgfunc_munge_path_list () 5718cfa76ccdSmrg{ 5719cfa76ccdSmrg case x@S|@2 in 5720cfa76ccdSmrg x) 5721e96acad6Smrg ;; 5722cfa76ccdSmrg *:) 5723cfa76ccdSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5724cfa76ccdSmrg ;; 5725cfa76ccdSmrg x:*) 5726cfa76ccdSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5727cfa76ccdSmrg ;; 5728cfa76ccdSmrg *::*) 5729cfa76ccdSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5730cfa76ccdSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5731cfa76ccdSmrg ;; 5732cfa76ccdSmrg *) 5733cfa76ccdSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5734cfa76ccdSmrg ;; 5735cfa76ccdSmrg esac 5736cfa76ccdSmrg} 5737cfa76ccdSmrg]])# _LT_PREPARE_PATH_LIST 5738dbbd9e4bSmacallan 5739dbbd9e4bSmacallan 5740cfa76ccdSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5741cfa76ccdSmrg# ----------------------------- 5742cfa76ccdSmrg# PORTME Fill in your ld.so characteristics 5743cfa76ccdSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5744cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5745cfa76ccdSmrgm4_require([_LT_DECL_EGREP])dnl 5746cfa76ccdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5747cfa76ccdSmrgm4_require([_LT_DECL_OBJDUMP])dnl 5748cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 5749cfa76ccdSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5750cfa76ccdSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5751cfa76ccdSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5752cfa76ccdSmrgm4_if([$1], 5753cfa76ccdSmrg [], [ 5754cfa76ccdSmrgif test yes = "$GCC"; then 5755cfa76ccdSmrg case $host_os in 5756cfa76ccdSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5757cfa76ccdSmrg *) lt_awk_arg='/^libraries:/' ;; 5758cfa76ccdSmrg esac 5759cfa76ccdSmrg case $host_os in 5760cfa76ccdSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5761cfa76ccdSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5762cfa76ccdSmrg esac 5763cfa76ccdSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5764cfa76ccdSmrg case $lt_search_path_spec in 5765cfa76ccdSmrg *\;*) 5766cfa76ccdSmrg # if the path contains ";" then we assume it to be the separator 5767cfa76ccdSmrg # otherwise default to the standard path separator (i.e. ":") - it is 5768cfa76ccdSmrg # assumed that no part of a normal pathname contains ";" but that should 5769cfa76ccdSmrg # okay in the real world where ";" in dirpaths is itself problematic. 5770cfa76ccdSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5771cfa76ccdSmrg ;; 5772cfa76ccdSmrg *) 5773cfa76ccdSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5774cfa76ccdSmrg ;; 5775cfa76ccdSmrg esac 5776cfa76ccdSmrg # Ok, now we have the path, separated by spaces, we can step through it 5777cfa76ccdSmrg # and add multilib dir if necessary... 5778cfa76ccdSmrg lt_tmp_lt_search_path_spec= 5779cfa76ccdSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5780cfa76ccdSmrg # ...but if some path component already ends with the multilib dir we assume 5781cfa76ccdSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5782cfa76ccdSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5783cfa76ccdSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5784cfa76ccdSmrg lt_multi_os_dir= 5785cfa76ccdSmrg ;; 5786cfa76ccdSmrg esac 5787cfa76ccdSmrg for lt_sys_path in $lt_search_path_spec; do 5788cfa76ccdSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5789cfa76ccdSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5790cfa76ccdSmrg elif test -n "$lt_multi_os_dir"; then 5791cfa76ccdSmrg test -d "$lt_sys_path" && \ 5792cfa76ccdSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5793cfa76ccdSmrg fi 5794cfa76ccdSmrg done 5795cfa76ccdSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5796cfa76ccdSmrgBEGIN {RS = " "; FS = "/|\n";} { 5797cfa76ccdSmrg lt_foo = ""; 5798cfa76ccdSmrg lt_count = 0; 5799cfa76ccdSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 5800cfa76ccdSmrg if ($lt_i != "" && $lt_i != ".") { 5801cfa76ccdSmrg if ($lt_i == "..") { 5802cfa76ccdSmrg lt_count++; 5803cfa76ccdSmrg } else { 5804cfa76ccdSmrg if (lt_count == 0) { 5805cfa76ccdSmrg lt_foo = "/" $lt_i lt_foo; 5806cfa76ccdSmrg } else { 5807cfa76ccdSmrg lt_count--; 5808cfa76ccdSmrg } 5809cfa76ccdSmrg } 5810cfa76ccdSmrg } 5811cfa76ccdSmrg } 5812cfa76ccdSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5813cfa76ccdSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5814cfa76ccdSmrg}'` 5815cfa76ccdSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 5816cfa76ccdSmrg # for these hosts. 5817cfa76ccdSmrg case $host_os in 5818cfa76ccdSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5819cfa76ccdSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5820cfa76ccdSmrg esac 5821cfa76ccdSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5822cfa76ccdSmrgelse 5823cfa76ccdSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5824cfa76ccdSmrgfi]) 5825cfa76ccdSmrglibrary_names_spec= 5826cfa76ccdSmrglibname_spec='lib$name' 5827cfa76ccdSmrgsoname_spec= 5828cfa76ccdSmrgshrext_cmds=.so 5829cfa76ccdSmrgpostinstall_cmds= 5830cfa76ccdSmrgpostuninstall_cmds= 5831cfa76ccdSmrgfinish_cmds= 5832cfa76ccdSmrgfinish_eval= 5833cfa76ccdSmrgshlibpath_var= 5834cfa76ccdSmrgshlibpath_overrides_runpath=unknown 5835cfa76ccdSmrgversion_type=none 5836cfa76ccdSmrgdynamic_linker="$host_os ld.so" 5837cfa76ccdSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5838cfa76ccdSmrgneed_lib_prefix=unknown 5839cfa76ccdSmrghardcode_into_libs=no 5840dbbd9e4bSmacallan 5841cfa76ccdSmrg# when you set need_version to no, make sure it does not cause -set_version 5842cfa76ccdSmrg# flags to be left without arguments 5843cfa76ccdSmrgneed_version=unknown 5844dbbd9e4bSmacallan 5845cfa76ccdSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5846cfa76ccdSmrg[User-defined run-time library search path.]) 5847dbbd9e4bSmacallan 5848cfa76ccdSmrgcase $host_os in 5849cfa76ccdSmrgaix3*) 5850cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 5851cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5852cfa76ccdSmrg shlibpath_var=LIBPATH 5853cfa76ccdSmrg 5854cfa76ccdSmrg # AIX 3 has no versioning support, so we append a major version to the name. 5855cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 5856cfa76ccdSmrg ;; 5857dbbd9e4bSmacallan 5858cfa76ccdSmrgaix[[4-9]]*) 5859cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 5860cfa76ccdSmrg need_lib_prefix=no 5861cfa76ccdSmrg need_version=no 5862cfa76ccdSmrg hardcode_into_libs=yes 5863cfa76ccdSmrg if test ia64 = "$host_cpu"; then 5864cfa76ccdSmrg # AIX 5 supports IA64 5865cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5866cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 5867cfa76ccdSmrg else 5868cfa76ccdSmrg # With GCC up to 2.95.x, collect2 would create an import file 5869cfa76ccdSmrg # for dependence libraries. The import file would start with 5870cfa76ccdSmrg # the line '#! .'. This would cause the generated library to 5871cfa76ccdSmrg # depend on '.', always an invalid library. This was fixed in 5872cfa76ccdSmrg # development snapshots of GCC prior to 3.0. 5873cfa76ccdSmrg case $host_os in 5874cfa76ccdSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5875cfa76ccdSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5876cfa76ccdSmrg echo ' yes ' 5877cfa76ccdSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5878cfa76ccdSmrg : 5879e96acad6Smrg else 5880cfa76ccdSmrg can_build_shared=no 5881e96acad6Smrg fi 5882e96acad6Smrg ;; 5883cfa76ccdSmrg esac 5884cfa76ccdSmrg # Using Import Files as archive members, it is possible to support 5885cfa76ccdSmrg # filename-based versioning of shared library archives on AIX. While 5886cfa76ccdSmrg # this would work for both with and without runtime linking, it will 5887cfa76ccdSmrg # prevent static linking of such archives. So we do filename-based 5888cfa76ccdSmrg # shared library versioning with .so extension only, which is used 5889cfa76ccdSmrg # when both runtime linking and shared linking is enabled. 5890cfa76ccdSmrg # Unfortunately, runtime linking may impact performance, so we do 5891cfa76ccdSmrg # not want this to be the default eventually. Also, we use the 5892cfa76ccdSmrg # versioned .so libs for executables only if there is the -brtl 5893cfa76ccdSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5894cfa76ccdSmrg # To allow for filename-based versioning support, we need to create 5895cfa76ccdSmrg # libNAME.so.V as an archive file, containing: 5896cfa76ccdSmrg # *) an Import File, referring to the versioned filename of the 5897cfa76ccdSmrg # archive as well as the shared archive member, telling the 5898cfa76ccdSmrg # bitwidth (32 or 64) of that shared object, and providing the 5899cfa76ccdSmrg # list of exported symbols of that shared object, eventually 5900cfa76ccdSmrg # decorated with the 'weak' keyword 5901cfa76ccdSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5902cfa76ccdSmrg # it being seen by the linker. 5903cfa76ccdSmrg # At run time we better use the real file rather than another symlink, 5904cfa76ccdSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5905cfa76ccdSmrg 5906cfa76ccdSmrg case $with_aix_soname,$aix_use_runtimelinking in 5907cfa76ccdSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5908cfa76ccdSmrg # soname into executable. Probably we can add versioning support to 5909cfa76ccdSmrg # collect2, so additional links can be useful in future. 5910cfa76ccdSmrg aix,yes) # traditional libtool 5911cfa76ccdSmrg dynamic_linker='AIX unversionable lib.so' 5912cfa76ccdSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5913cfa76ccdSmrg # instead of lib<name>.a to let people know that these are not 5914cfa76ccdSmrg # typical AIX shared libraries. 5915cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5916e96acad6Smrg ;; 5917cfa76ccdSmrg aix,no) # traditional AIX only 5918cfa76ccdSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5919cfa76ccdSmrg # We preserve .a as extension for shared libraries through AIX4.2 5920cfa76ccdSmrg # and later when we are not doing run time linking. 5921cfa76ccdSmrg library_names_spec='$libname$release.a $libname.a' 5922cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 5923e96acad6Smrg ;; 5924cfa76ccdSmrg svr4,*) # full svr4 only 5925cfa76ccdSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5926cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5927cfa76ccdSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5928cfa76ccdSmrg shlibpath_overrides_runpath=yes 5929e96acad6Smrg ;; 5930cfa76ccdSmrg *,yes) # both, prefer svr4 5931cfa76ccdSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5932cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5933cfa76ccdSmrg # unpreferred sharedlib libNAME.a needs extra handling 5934cfa76ccdSmrg 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"' 5935cfa76ccdSmrg 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"' 5936cfa76ccdSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5937cfa76ccdSmrg shlibpath_overrides_runpath=yes 5938cfa76ccdSmrg ;; 5939cfa76ccdSmrg *,no) # both, prefer aix 5940cfa76ccdSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5941cfa76ccdSmrg library_names_spec='$libname$release.a $libname.a' 5942cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 5943cfa76ccdSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5944cfa76ccdSmrg 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)' 5945cfa76ccdSmrg 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"' 5946e96acad6Smrg ;; 5947e96acad6Smrg esac 5948cfa76ccdSmrg shlibpath_var=LIBPATH 5949dbbd9e4bSmacallan fi 5950dbbd9e4bSmacallan ;; 5951dbbd9e4bSmacallan 5952cfa76ccdSmrgamigaos*) 5953cfa76ccdSmrg case $host_cpu in 5954cfa76ccdSmrg powerpc) 5955cfa76ccdSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5956cfa76ccdSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5957cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5958cfa76ccdSmrg ;; 5959cfa76ccdSmrg m68k) 5960cfa76ccdSmrg library_names_spec='$libname.ixlibrary $libname.a' 5961cfa76ccdSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5962cfa76ccdSmrg 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' 5963cfa76ccdSmrg ;; 5964cfa76ccdSmrg esac 5965cfa76ccdSmrg ;; 5966e96acad6Smrg 5967cfa76ccdSmrgbeos*) 5968cfa76ccdSmrg library_names_spec='$libname$shared_ext' 5969cfa76ccdSmrg dynamic_linker="$host_os ld.so" 5970cfa76ccdSmrg shlibpath_var=LIBRARY_PATH 5971cfa76ccdSmrg ;; 5972e96acad6Smrg 5973cfa76ccdSmrgbsdi[[45]]*) 5974cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 5975cfa76ccdSmrg need_version=no 5976cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5977cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 5978cfa76ccdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5979cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 5980cfa76ccdSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5981cfa76ccdSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5982cfa76ccdSmrg # the default ld.so.conf also contains /usr/contrib/lib and 5983cfa76ccdSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5984cfa76ccdSmrg # libtool to hard-code these into programs 5985cfa76ccdSmrg ;; 5986e96acad6Smrg 5987cfa76ccdSmrgcygwin* | mingw* | pw32* | cegcc*) 5988cfa76ccdSmrg version_type=windows 5989cfa76ccdSmrg shrext_cmds=.dll 5990cfa76ccdSmrg need_version=no 5991cfa76ccdSmrg need_lib_prefix=no 5992e96acad6Smrg 5993cfa76ccdSmrg case $GCC,$cc_basename in 5994cfa76ccdSmrg yes,*) 5995cfa76ccdSmrg # gcc 5996cfa76ccdSmrg library_names_spec='$libname.dll.a' 5997cfa76ccdSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5998cfa76ccdSmrg postinstall_cmds='base_file=`basename \$file`~ 5999cfa76ccdSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6000cfa76ccdSmrg dldir=$destdir/`dirname \$dlpath`~ 6001cfa76ccdSmrg test -d \$dldir || mkdir -p \$dldir~ 6002cfa76ccdSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6003cfa76ccdSmrg chmod a+x \$dldir/$dlname~ 6004cfa76ccdSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6005cfa76ccdSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6006cfa76ccdSmrg fi' 6007cfa76ccdSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6008cfa76ccdSmrg dlpath=$dir/\$dldll~ 6009cfa76ccdSmrg $RM \$dlpath' 6010cfa76ccdSmrg shlibpath_overrides_runpath=yes 6011dbbd9e4bSmacallan 6012cfa76ccdSmrg case $host_os in 6013cfa76ccdSmrg cygwin*) 6014cfa76ccdSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6015cfa76ccdSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6016cfa76ccdSmrgm4_if([$1], [],[ 6017cfa76ccdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6018cfa76ccdSmrg ;; 6019cfa76ccdSmrg mingw* | cegcc*) 6020cfa76ccdSmrg # MinGW DLLs use traditional 'lib' prefix 6021cfa76ccdSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6022cfa76ccdSmrg ;; 6023cfa76ccdSmrg pw32*) 6024cfa76ccdSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 6025cfa76ccdSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6026cfa76ccdSmrg ;; 6027cfa76ccdSmrg esac 6028cfa76ccdSmrg dynamic_linker='Win32 ld.exe' 6029cfa76ccdSmrg ;; 6030dbbd9e4bSmacallan 6031cfa76ccdSmrg *,cl* | *,icl*) 6032cfa76ccdSmrg # Native MSVC or ICC 6033cfa76ccdSmrg libname_spec='$name' 6034cfa76ccdSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6035cfa76ccdSmrg library_names_spec='$libname.dll.lib' 6036dbbd9e4bSmacallan 6037cfa76ccdSmrg case $build_os in 6038cfa76ccdSmrg mingw*) 6039cfa76ccdSmrg sys_lib_search_path_spec= 6040cfa76ccdSmrg lt_save_ifs=$IFS 6041cfa76ccdSmrg IFS=';' 6042cfa76ccdSmrg for lt_path in $LIB 6043cfa76ccdSmrg do 6044cfa76ccdSmrg IFS=$lt_save_ifs 6045cfa76ccdSmrg # Let DOS variable expansion print the short 8.3 style file name. 6046cfa76ccdSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6047cfa76ccdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6048cfa76ccdSmrg done 6049cfa76ccdSmrg IFS=$lt_save_ifs 6050cfa76ccdSmrg # Convert to MSYS style. 6051cfa76ccdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6052cfa76ccdSmrg ;; 6053cfa76ccdSmrg cygwin*) 6054cfa76ccdSmrg # Convert to unix form, then to dos form, then back to unix form 6055cfa76ccdSmrg # but this time dos style (no spaces!) so that the unix form looks 6056cfa76ccdSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 6057cfa76ccdSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6058cfa76ccdSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6059cfa76ccdSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6060cfa76ccdSmrg ;; 6061cfa76ccdSmrg *) 6062cfa76ccdSmrg sys_lib_search_path_spec=$LIB 6063cfa76ccdSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6064cfa76ccdSmrg # It is most probably a Windows format PATH. 6065cfa76ccdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6066cfa76ccdSmrg else 6067cfa76ccdSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6068cfa76ccdSmrg fi 6069cfa76ccdSmrg # FIXME: find the short name or the path components, as spaces are 6070cfa76ccdSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 6071cfa76ccdSmrg ;; 6072cfa76ccdSmrg esac 6073dbbd9e4bSmacallan 6074cfa76ccdSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6075cfa76ccdSmrg postinstall_cmds='base_file=`basename \$file`~ 6076cfa76ccdSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6077cfa76ccdSmrg dldir=$destdir/`dirname \$dlpath`~ 6078cfa76ccdSmrg test -d \$dldir || mkdir -p \$dldir~ 6079cfa76ccdSmrg $install_prog $dir/$dlname \$dldir/$dlname' 6080cfa76ccdSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6081cfa76ccdSmrg dlpath=$dir/\$dldll~ 6082cfa76ccdSmrg $RM \$dlpath' 6083cfa76ccdSmrg shlibpath_overrides_runpath=yes 6084cfa76ccdSmrg dynamic_linker='Win32 link.exe' 6085cfa76ccdSmrg ;; 6086dbbd9e4bSmacallan 6087cfa76ccdSmrg *) 6088cfa76ccdSmrg # Assume MSVC and ICC wrapper 6089cfa76ccdSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6090cfa76ccdSmrg dynamic_linker='Win32 ld.exe' 6091cfa76ccdSmrg ;; 6092cfa76ccdSmrg esac 6093cfa76ccdSmrg # FIXME: first we should search . and the directory the executable is in 6094cfa76ccdSmrg shlibpath_var=PATH 6095cfa76ccdSmrg ;; 6096e96acad6Smrg 6097cfa76ccdSmrgdarwin* | rhapsody*) 6098cfa76ccdSmrg dynamic_linker="$host_os dyld" 6099cfa76ccdSmrg version_type=darwin 6100cfa76ccdSmrg need_lib_prefix=no 6101cfa76ccdSmrg need_version=no 6102cfa76ccdSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6103cfa76ccdSmrg soname_spec='$libname$release$major$shared_ext' 6104cfa76ccdSmrg shlibpath_overrides_runpath=yes 6105cfa76ccdSmrg shlibpath_var=DYLD_LIBRARY_PATH 6106cfa76ccdSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6107cfa76ccdSmrgm4_if([$1], [],[ 6108cfa76ccdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6109cfa76ccdSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6110cfa76ccdSmrg ;; 6111e96acad6Smrg 6112cfa76ccdSmrgdgux*) 6113cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6114cfa76ccdSmrg need_lib_prefix=no 6115cfa76ccdSmrg need_version=no 6116cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6117cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6118cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6119cfa76ccdSmrg ;; 6120e96acad6Smrg 6121cfa76ccdSmrgfreebsd* | dragonfly* | midnightbsd*) 6122cfa76ccdSmrg # DragonFly does not have aout. When/if they implement a new 6123cfa76ccdSmrg # versioning mechanism, adjust this. 6124cfa76ccdSmrg if test -x /usr/bin/objformat; then 6125cfa76ccdSmrg objformat=`/usr/bin/objformat` 6126cfa76ccdSmrg else 6127cfa76ccdSmrg case $host_os in 6128cfa76ccdSmrg freebsd[[23]].*) objformat=aout ;; 6129cfa76ccdSmrg *) objformat=elf ;; 6130cfa76ccdSmrg esac 6131cfa76ccdSmrg fi 6132cfa76ccdSmrg version_type=freebsd-$objformat 6133cfa76ccdSmrg case $version_type in 6134cfa76ccdSmrg freebsd-elf*) 6135cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6136cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6137cfa76ccdSmrg need_version=no 6138cfa76ccdSmrg need_lib_prefix=no 6139cfa76ccdSmrg ;; 6140cfa76ccdSmrg freebsd-*) 6141cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6142cfa76ccdSmrg need_version=yes 6143cfa76ccdSmrg ;; 6144cfa76ccdSmrg esac 6145cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6146e96acad6Smrg case $host_os in 6147cfa76ccdSmrg freebsd2.*) 6148cfa76ccdSmrg shlibpath_overrides_runpath=yes 6149e96acad6Smrg ;; 6150cfa76ccdSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6151cfa76ccdSmrg shlibpath_overrides_runpath=yes 6152cfa76ccdSmrg hardcode_into_libs=yes 6153cfa76ccdSmrg ;; 6154cfa76ccdSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6155cfa76ccdSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6156cfa76ccdSmrg shlibpath_overrides_runpath=no 6157cfa76ccdSmrg hardcode_into_libs=yes 6158cfa76ccdSmrg ;; 6159cfa76ccdSmrg *) # from 4.6 on, and DragonFly 6160cfa76ccdSmrg shlibpath_overrides_runpath=yes 6161cfa76ccdSmrg hardcode_into_libs=yes 6162e96acad6Smrg ;; 6163e96acad6Smrg esac 6164cfa76ccdSmrg ;; 6165dbbd9e4bSmacallan 6166cfa76ccdSmrghaiku*) 6167cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6168cfa76ccdSmrg need_lib_prefix=no 6169cfa76ccdSmrg need_version=no 6170cfa76ccdSmrg dynamic_linker="$host_os runtime_loader" 6171cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6172cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6173cfa76ccdSmrg shlibpath_var=LIBRARY_PATH 6174cfa76ccdSmrg shlibpath_overrides_runpath=no 6175cfa76ccdSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6176cfa76ccdSmrg hardcode_into_libs=yes 6177cfa76ccdSmrg ;; 6178dbbd9e4bSmacallan 6179cfa76ccdSmrghpux9* | hpux10* | hpux11*) 6180cfa76ccdSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 6181cfa76ccdSmrg # link against other versions. 6182cfa76ccdSmrg version_type=sunos 6183cfa76ccdSmrg need_lib_prefix=no 6184cfa76ccdSmrg need_version=no 6185cfa76ccdSmrg case $host_cpu in 6186cfa76ccdSmrg ia64*) 6187cfa76ccdSmrg shrext_cmds='.so' 6188cfa76ccdSmrg hardcode_into_libs=yes 6189cfa76ccdSmrg dynamic_linker="$host_os dld.so" 6190cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6191cfa76ccdSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6192cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6193cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6194cfa76ccdSmrg if test 32 = "$HPUX_IA64_MODE"; then 6195cfa76ccdSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6196cfa76ccdSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6197cfa76ccdSmrg else 6198cfa76ccdSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6199cfa76ccdSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6200cfa76ccdSmrg fi 6201cfa76ccdSmrg ;; 6202cfa76ccdSmrg hppa*64*) 6203cfa76ccdSmrg shrext_cmds='.sl' 6204cfa76ccdSmrg hardcode_into_libs=yes 6205cfa76ccdSmrg dynamic_linker="$host_os dld.sl" 6206cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6207cfa76ccdSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6208cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6209cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6210cfa76ccdSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6211cfa76ccdSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6212cfa76ccdSmrg ;; 6213cfa76ccdSmrg *) 6214cfa76ccdSmrg shrext_cmds='.sl' 6215cfa76ccdSmrg dynamic_linker="$host_os dld.sl" 6216cfa76ccdSmrg shlibpath_var=SHLIB_PATH 6217cfa76ccdSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6218cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6219cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6220cfa76ccdSmrg ;; 6221cfa76ccdSmrg esac 6222cfa76ccdSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6223cfa76ccdSmrg postinstall_cmds='chmod 555 $lib' 6224cfa76ccdSmrg # or fails outright, so override atomically: 6225cfa76ccdSmrg install_override_mode=555 6226cfa76ccdSmrg ;; 6227dbbd9e4bSmacallan 6228cfa76ccdSmrginterix[[3-9]]*) 6229cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6230cfa76ccdSmrg need_lib_prefix=no 6231cfa76ccdSmrg need_version=no 6232cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6233cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6234cfa76ccdSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6235cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6236cfa76ccdSmrg shlibpath_overrides_runpath=no 6237cfa76ccdSmrg hardcode_into_libs=yes 6238cfa76ccdSmrg ;; 6239dbbd9e4bSmacallan 6240cfa76ccdSmrgirix5* | irix6* | nonstopux*) 6241cfa76ccdSmrg case $host_os in 6242cfa76ccdSmrg nonstopux*) version_type=nonstopux ;; 6243cfa76ccdSmrg *) 6244cfa76ccdSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 6245cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6246cfa76ccdSmrg else 6247cfa76ccdSmrg version_type=irix 6248cfa76ccdSmrg fi ;; 6249cfa76ccdSmrg esac 6250cfa76ccdSmrg need_lib_prefix=no 6251cfa76ccdSmrg need_version=no 6252cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6253cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6254cfa76ccdSmrg case $host_os in 6255cfa76ccdSmrg irix5* | nonstopux*) 6256cfa76ccdSmrg libsuff= shlibsuff= 6257cfa76ccdSmrg ;; 6258cfa76ccdSmrg *) 6259cfa76ccdSmrg case $LD in # libtool.m4 will add one of these switches to LD 6260cfa76ccdSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6261cfa76ccdSmrg libsuff= shlibsuff= libmagic=32-bit;; 6262cfa76ccdSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6263cfa76ccdSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6264cfa76ccdSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6265cfa76ccdSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6266cfa76ccdSmrg *) libsuff= shlibsuff= libmagic=never-match;; 6267cfa76ccdSmrg esac 6268cfa76ccdSmrg ;; 6269cfa76ccdSmrg esac 6270cfa76ccdSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6271cfa76ccdSmrg shlibpath_overrides_runpath=no 6272cfa76ccdSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6273cfa76ccdSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6274cfa76ccdSmrg hardcode_into_libs=yes 6275cfa76ccdSmrg ;; 6276dbbd9e4bSmacallan 6277cfa76ccdSmrg# No shared lib support for Linux oldld, aout, or coff. 6278cfa76ccdSmrglinux*oldld* | linux*aout* | linux*coff*) 6279cfa76ccdSmrg dynamic_linker=no 6280cfa76ccdSmrg ;; 6281dbbd9e4bSmacallan 6282cfa76ccdSmrglinux*android*) 6283cfa76ccdSmrg version_type=none # Android doesn't support versioned libraries. 6284cfa76ccdSmrg need_lib_prefix=no 6285cfa76ccdSmrg need_version=no 6286cfa76ccdSmrg library_names_spec='$libname$release$shared_ext' 6287cfa76ccdSmrg soname_spec='$libname$release$shared_ext' 6288cfa76ccdSmrg finish_cmds= 6289cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6290cfa76ccdSmrg shlibpath_overrides_runpath=yes 6291e96acad6Smrg 6292cfa76ccdSmrg # This implies no fast_install, which is unacceptable. 6293cfa76ccdSmrg # Some rework will be needed to allow for fast_install 6294cfa76ccdSmrg # before this can be enabled. 6295cfa76ccdSmrg hardcode_into_libs=yes 6296e96acad6Smrg 6297cfa76ccdSmrg dynamic_linker='Android linker' 6298cfa76ccdSmrg # Don't embed -rpath directories since the linker doesn't support them. 6299cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6300cfa76ccdSmrg ;; 6301e96acad6Smrg 6302cfa76ccdSmrg# This must be glibc/ELF. 6303cfa76ccdSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6304cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6305cfa76ccdSmrg need_lib_prefix=no 6306cfa76ccdSmrg need_version=no 6307cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6308cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6309cfa76ccdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6310cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6311cfa76ccdSmrg shlibpath_overrides_runpath=no 6312e96acad6Smrg 6313cfa76ccdSmrg # Some binutils ld are patched to set DT_RUNPATH 6314cfa76ccdSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6315cfa76ccdSmrg [lt_cv_shlibpath_overrides_runpath=no 6316cfa76ccdSmrg save_LDFLAGS=$LDFLAGS 6317cfa76ccdSmrg save_libdir=$libdir 6318cfa76ccdSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6319cfa76ccdSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6320cfa76ccdSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6321cfa76ccdSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6322cfa76ccdSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6323cfa76ccdSmrg LDFLAGS=$save_LDFLAGS 6324cfa76ccdSmrg libdir=$save_libdir 6325cfa76ccdSmrg ]) 6326cfa76ccdSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6327e96acad6Smrg 6328cfa76ccdSmrg # This implies no fast_install, which is unacceptable. 6329cfa76ccdSmrg # Some rework will be needed to allow for fast_install 6330cfa76ccdSmrg # before this can be enabled. 6331cfa76ccdSmrg hardcode_into_libs=yes 6332e96acad6Smrg 6333cfa76ccdSmrg # Ideally, we could use ldconfig to report *all* directores which are 6334cfa76ccdSmrg # searched for libraries, however this is still not possible. Aside from not 6335cfa76ccdSmrg # being certain /sbin/ldconfig is available, command 6336cfa76ccdSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6337cfa76ccdSmrg # even though it is searched at run-time. Try to do the best guess by 6338cfa76ccdSmrg # appending ld.so.conf contents (and includes) to the search path. 6339cfa76ccdSmrg if test -f /etc/ld.so.conf; then 6340cfa76ccdSmrg 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' ' '` 6341cfa76ccdSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6342cfa76ccdSmrg fi 6343cfa76ccdSmrg 6344cfa76ccdSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6345cfa76ccdSmrg # powerpc, because MkLinux only supported shared libraries with the 6346cfa76ccdSmrg # GNU dynamic linker. Since this was broken with cross compilers, 6347cfa76ccdSmrg # most powerpc-linux boxes support dynamic linking these days and 6348cfa76ccdSmrg # people can always --disable-shared, the test was removed, and we 6349cfa76ccdSmrg # assume the GNU/Linux dynamic linker is in use. 6350cfa76ccdSmrg dynamic_linker='GNU/Linux ld.so' 6351cfa76ccdSmrg ;; 6352cfa76ccdSmrg 6353cfa76ccdSmrgnetbsd*) 6354cfa76ccdSmrg version_type=sunos 6355cfa76ccdSmrg need_lib_prefix=no 6356cfa76ccdSmrg need_version=no 6357cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6358cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6359cfa76ccdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6360cfa76ccdSmrg dynamic_linker='NetBSD (a.out) ld.so' 6361dbbd9e4bSmacallan else 6362cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6363cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6364cfa76ccdSmrg dynamic_linker='NetBSD ld.elf_so' 6365dbbd9e4bSmacallan fi 6366cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6367cfa76ccdSmrg shlibpath_overrides_runpath=yes 6368cfa76ccdSmrg hardcode_into_libs=yes 6369cfa76ccdSmrg ;; 6370cfa76ccdSmrg 6371cfa76ccdSmrgnewsos6) 6372cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6373cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6374cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6375cfa76ccdSmrg shlibpath_overrides_runpath=yes 6376cfa76ccdSmrg ;; 6377cfa76ccdSmrg 6378cfa76ccdSmrg*nto* | *qnx*) 6379cfa76ccdSmrg version_type=qnx 6380cfa76ccdSmrg need_lib_prefix=no 6381cfa76ccdSmrg need_version=no 6382cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6383cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6384cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6385cfa76ccdSmrg shlibpath_overrides_runpath=no 6386cfa76ccdSmrg hardcode_into_libs=yes 6387cfa76ccdSmrg dynamic_linker='ldqnx.so' 6388cfa76ccdSmrg ;; 6389cfa76ccdSmrg 6390cfa76ccdSmrgopenbsd* | bitrig*) 6391cfa76ccdSmrg version_type=sunos 6392cfa76ccdSmrg sys_lib_dlsearch_path_spec=/usr/lib 6393cfa76ccdSmrg need_lib_prefix=no 6394cfa76ccdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6395cfa76ccdSmrg need_version=no 6396dbbd9e4bSmacallan else 6397cfa76ccdSmrg need_version=yes 6398dbbd9e4bSmacallan fi 6399cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6400cfa76ccdSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6401cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6402cfa76ccdSmrg shlibpath_overrides_runpath=yes 6403cfa76ccdSmrg ;; 6404dbbd9e4bSmacallan 6405cfa76ccdSmrgos2*) 6406cfa76ccdSmrg libname_spec='$name' 6407cfa76ccdSmrg version_type=windows 6408cfa76ccdSmrg shrext_cmds=.dll 6409cfa76ccdSmrg need_version=no 6410cfa76ccdSmrg need_lib_prefix=no 6411cfa76ccdSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6412cfa76ccdSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6413cfa76ccdSmrg v=$($ECHO $release$versuffix | tr -d .-); 6414cfa76ccdSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6415cfa76ccdSmrg $ECHO $n$v`$shared_ext' 6416cfa76ccdSmrg library_names_spec='${libname}_dll.$libext' 6417cfa76ccdSmrg dynamic_linker='OS/2 ld.exe' 6418cfa76ccdSmrg shlibpath_var=BEGINLIBPATH 6419cfa76ccdSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6420cfa76ccdSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6421cfa76ccdSmrg postinstall_cmds='base_file=`basename \$file`~ 6422cfa76ccdSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6423cfa76ccdSmrg dldir=$destdir/`dirname \$dlpath`~ 6424cfa76ccdSmrg test -d \$dldir || mkdir -p \$dldir~ 6425cfa76ccdSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6426cfa76ccdSmrg chmod a+x \$dldir/$dlname~ 6427cfa76ccdSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6428cfa76ccdSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6429cfa76ccdSmrg fi' 6430cfa76ccdSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6431cfa76ccdSmrg dlpath=$dir/\$dldll~ 6432cfa76ccdSmrg $RM \$dlpath' 6433cfa76ccdSmrg ;; 6434dbbd9e4bSmacallan 6435cfa76ccdSmrgosf3* | osf4* | osf5*) 6436cfa76ccdSmrg version_type=osf 6437cfa76ccdSmrg need_lib_prefix=no 6438cfa76ccdSmrg need_version=no 6439cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6440cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6441cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6442cfa76ccdSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6443cfa76ccdSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6444cfa76ccdSmrg ;; 6445dbbd9e4bSmacallan 6446cfa76ccdSmrgrdos*) 6447cfa76ccdSmrg dynamic_linker=no 6448cfa76ccdSmrg ;; 6449dbbd9e4bSmacallan 6450cfa76ccdSmrgsolaris*) 6451cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6452cfa76ccdSmrg need_lib_prefix=no 6453cfa76ccdSmrg need_version=no 6454cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6455cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6456cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6457cfa76ccdSmrg shlibpath_overrides_runpath=yes 6458cfa76ccdSmrg hardcode_into_libs=yes 6459cfa76ccdSmrg # ldd complains unless libraries are executable 6460cfa76ccdSmrg postinstall_cmds='chmod +x $lib' 6461cfa76ccdSmrg ;; 6462cfa76ccdSmrg 6463cfa76ccdSmrgsunos4*) 6464cfa76ccdSmrg version_type=sunos 6465cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6466cfa76ccdSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6467cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6468cfa76ccdSmrg shlibpath_overrides_runpath=yes 6469cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 6470cfa76ccdSmrg need_lib_prefix=no 6471cfa76ccdSmrg fi 6472cfa76ccdSmrg need_version=yes 6473cfa76ccdSmrg ;; 6474e96acad6Smrg 6475cfa76ccdSmrgsysv4 | sysv4.3*) 6476cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6477cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6478cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6479cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6480cfa76ccdSmrg case $host_vendor in 6481cfa76ccdSmrg sni) 6482cfa76ccdSmrg shlibpath_overrides_runpath=no 6483cfa76ccdSmrg need_lib_prefix=no 6484cfa76ccdSmrg runpath_var=LD_RUN_PATH 6485cfa76ccdSmrg ;; 6486cfa76ccdSmrg siemens) 6487cfa76ccdSmrg need_lib_prefix=no 6488cfa76ccdSmrg ;; 6489cfa76ccdSmrg motorola) 6490cfa76ccdSmrg need_lib_prefix=no 6491cfa76ccdSmrg need_version=no 6492cfa76ccdSmrg shlibpath_overrides_runpath=no 6493cfa76ccdSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6494cfa76ccdSmrg ;; 6495cfa76ccdSmrg esac 6496cfa76ccdSmrg ;; 6497e96acad6Smrg 6498cfa76ccdSmrgsysv4*MP*) 6499cfa76ccdSmrg if test -d /usr/nec; then 6500cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6501cfa76ccdSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6502cfa76ccdSmrg soname_spec='$libname$shared_ext.$major' 6503cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6504cfa76ccdSmrg fi 6505cfa76ccdSmrg ;; 6506e96acad6Smrg 6507cfa76ccdSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6508cfa76ccdSmrg version_type=sco 6509cfa76ccdSmrg need_lib_prefix=no 6510cfa76ccdSmrg need_version=no 6511cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6512cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6513cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6514cfa76ccdSmrg shlibpath_overrides_runpath=yes 6515cfa76ccdSmrg hardcode_into_libs=yes 6516cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 6517cfa76ccdSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6518cfa76ccdSmrg else 6519cfa76ccdSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6520cfa76ccdSmrg case $host_os in 6521cfa76ccdSmrg sco3.2v5*) 6522cfa76ccdSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6523cfa76ccdSmrg ;; 6524cfa76ccdSmrg esac 6525cfa76ccdSmrg fi 6526cfa76ccdSmrg sys_lib_dlsearch_path_spec='/usr/lib' 6527cfa76ccdSmrg ;; 6528cfa76ccdSmrg 6529cfa76ccdSmrgtpf*) 6530cfa76ccdSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6531cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6532cfa76ccdSmrg need_lib_prefix=no 6533cfa76ccdSmrg need_version=no 6534cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6535cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6536cfa76ccdSmrg shlibpath_overrides_runpath=no 6537cfa76ccdSmrg hardcode_into_libs=yes 6538cfa76ccdSmrg ;; 6539e96acad6Smrg 6540cfa76ccdSmrguts4*) 6541cfa76ccdSmrg version_type=linux # correct to gnu/linux during the next big refactor 6542cfa76ccdSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6543cfa76ccdSmrg soname_spec='$libname$release$shared_ext$major' 6544cfa76ccdSmrg shlibpath_var=LD_LIBRARY_PATH 6545cfa76ccdSmrg ;; 6546e96acad6Smrg 6547cfa76ccdSmrg*) 6548cfa76ccdSmrg dynamic_linker=no 6549cfa76ccdSmrg ;; 6550cfa76ccdSmrgesac 6551cfa76ccdSmrgAC_MSG_RESULT([$dynamic_linker]) 6552cfa76ccdSmrgtest no = "$dynamic_linker" && can_build_shared=no 6553e96acad6Smrg 6554cfa76ccdSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6555cfa76ccdSmrgif test yes = "$GCC"; then 6556cfa76ccdSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6557cfa76ccdSmrgfi 6558e96acad6Smrg 6559cfa76ccdSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6560cfa76ccdSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6561cfa76ccdSmrgfi 6562e96acad6Smrg 6563cfa76ccdSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6564cfa76ccdSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6565cfa76ccdSmrgfi 6566e96acad6Smrg 6567cfa76ccdSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6568cfa76ccdSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6569e96acad6Smrg 6570cfa76ccdSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6571cfa76ccdSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6572e96acad6Smrg 6573cfa76ccdSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6574cfa76ccdSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6575e96acad6Smrg 6576cfa76ccdSmrg_LT_DECL([], [variables_saved_for_relink], [1], 6577cfa76ccdSmrg [Variables whose values should be saved in libtool wrapper scripts and 6578cfa76ccdSmrg restored at link time]) 6579cfa76ccdSmrg_LT_DECL([], [need_lib_prefix], [0], 6580cfa76ccdSmrg [Do we need the "lib" prefix for modules?]) 6581cfa76ccdSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6582cfa76ccdSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6583cfa76ccdSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6584cfa76ccdSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6585cfa76ccdSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6586cfa76ccdSmrg [Is shlibpath searched before the hard-coded library search path?]) 6587cfa76ccdSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6588cfa76ccdSmrg_LT_DECL([], [library_names_spec], [1], 6589cfa76ccdSmrg [[List of archive names. First name is the real one, the rest are links. 6590cfa76ccdSmrg The last name is the one that the linker finds with -lNAME]]) 6591cfa76ccdSmrg_LT_DECL([], [soname_spec], [1], 6592cfa76ccdSmrg [[The coded name of the library, if different from the real name]]) 6593cfa76ccdSmrg_LT_DECL([], [install_override_mode], [1], 6594cfa76ccdSmrg [Permission mode override for installation of shared libraries]) 6595cfa76ccdSmrg_LT_DECL([], [postinstall_cmds], [2], 6596cfa76ccdSmrg [Command to use after installation of a shared archive]) 6597cfa76ccdSmrg_LT_DECL([], [postuninstall_cmds], [2], 6598cfa76ccdSmrg [Command to use after uninstallation of a shared archive]) 6599cfa76ccdSmrg_LT_DECL([], [finish_cmds], [2], 6600cfa76ccdSmrg [Commands used to finish a libtool library installation in a directory]) 6601cfa76ccdSmrg_LT_DECL([], [finish_eval], [1], 6602cfa76ccdSmrg [[As "finish_cmds", except a single script fragment to be evaled but 6603cfa76ccdSmrg not shown]]) 6604cfa76ccdSmrg_LT_DECL([], [hardcode_into_libs], [0], 6605cfa76ccdSmrg [Whether we should hardcode library paths into libraries]) 6606cfa76ccdSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6607cfa76ccdSmrg [Compile-time system search path for libraries]) 6608cfa76ccdSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6609cfa76ccdSmrg [Detected run-time system search path for libraries]) 6610cfa76ccdSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6611cfa76ccdSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6612cfa76ccdSmrg])# _LT_SYS_DYNAMIC_LINKER 6613cfa76ccdSmrg 6614cfa76ccdSmrg 6615cfa76ccdSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 6616cfa76ccdSmrg# -------------------------- 6617cfa76ccdSmrg# find a file program that can recognize shared library 6618cfa76ccdSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6619cfa76ccdSmrg[m4_require([_LT_DECL_EGREP])dnl 6620cfa76ccdSmrgAC_MSG_CHECKING([for $1]) 6621cfa76ccdSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6622cfa76ccdSmrg[case $MAGIC_CMD in 6623cfa76ccdSmrg[[\\/*] | ?:[\\/]*]) 6624cfa76ccdSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6625cfa76ccdSmrg ;; 6626cfa76ccdSmrg*) 6627cfa76ccdSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 6628cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6629cfa76ccdSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6630cfa76ccdSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6631cfa76ccdSmrgdnl not every word. This closes a longstanding sh security hole. 6632cfa76ccdSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6633cfa76ccdSmrg for ac_dir in $ac_dummy; do 6634cfa76ccdSmrg IFS=$lt_save_ifs 6635cfa76ccdSmrg test -z "$ac_dir" && ac_dir=. 6636cfa76ccdSmrg if test -f "$ac_dir/$1"; then 6637cfa76ccdSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6638cfa76ccdSmrg if test -n "$file_magic_test_file"; then 6639cfa76ccdSmrg case $deplibs_check_method in 6640cfa76ccdSmrg "file_magic "*) 6641cfa76ccdSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6642cfa76ccdSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6643cfa76ccdSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6644cfa76ccdSmrg $EGREP "$file_magic_regex" > /dev/null; then 6645e96acad6Smrg : 6646e96acad6Smrg else 6647cfa76ccdSmrg cat <<_LT_EOF 1>&2 6648e96acad6Smrg 6649cfa76ccdSmrg*** Warning: the command libtool uses to detect shared libraries, 6650cfa76ccdSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6651cfa76ccdSmrg*** The result is that libtool may fail to recognize shared libraries 6652cfa76ccdSmrg*** as such. This will affect the creation of libtool libraries that 6653cfa76ccdSmrg*** depend on shared libraries, but programs linked with such libtool 6654cfa76ccdSmrg*** libraries will work regardless of this problem. Nevertheless, you 6655cfa76ccdSmrg*** may want to report the problem to your system manager and/or to 6656cfa76ccdSmrg*** bug-libtool@gnu.org 6657e96acad6Smrg 6658cfa76ccdSmrg_LT_EOF 6659cfa76ccdSmrg fi ;; 6660cfa76ccdSmrg esac 6661cfa76ccdSmrg fi 6662cfa76ccdSmrg break 6663cfa76ccdSmrg fi 6664cfa76ccdSmrg done 6665cfa76ccdSmrg IFS=$lt_save_ifs 6666cfa76ccdSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6667cfa76ccdSmrg ;; 6668cfa76ccdSmrgesac]) 6669cfa76ccdSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6670cfa76ccdSmrgif test -n "$MAGIC_CMD"; then 6671cfa76ccdSmrg AC_MSG_RESULT($MAGIC_CMD) 6672cfa76ccdSmrgelse 6673cfa76ccdSmrg AC_MSG_RESULT(no) 6674cfa76ccdSmrgfi 6675cfa76ccdSmrg_LT_DECL([], [MAGIC_CMD], [0], 6676cfa76ccdSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6677cfa76ccdSmrg])# _LT_PATH_TOOL_PREFIX 6678e96acad6Smrg 6679cfa76ccdSmrg# Old name: 6680cfa76ccdSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6681cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 6682cfa76ccdSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6683e96acad6Smrg 6684e96acad6Smrg 6685cfa76ccdSmrg# _LT_PATH_MAGIC 6686cfa76ccdSmrg# -------------- 6687cfa76ccdSmrg# find a file program that can recognize a shared library 6688cfa76ccdSmrgm4_defun([_LT_PATH_MAGIC], 6689cfa76ccdSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6690cfa76ccdSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6691cfa76ccdSmrg if test -n "$ac_tool_prefix"; then 6692cfa76ccdSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6693cfa76ccdSmrg else 6694cfa76ccdSmrg MAGIC_CMD=: 6695cfa76ccdSmrg fi 6696cfa76ccdSmrgfi 6697cfa76ccdSmrg])# _LT_PATH_MAGIC 6698cfa76ccdSmrg 6699cfa76ccdSmrg 6700cfa76ccdSmrg# LT_PATH_LD 6701cfa76ccdSmrg# ---------- 6702cfa76ccdSmrg# find the pathname to the GNU or non-GNU linker 6703cfa76ccdSmrgAC_DEFUN([LT_PATH_LD], 6704cfa76ccdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 6705cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6706cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6707cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 6708cfa76ccdSmrgm4_require([_LT_DECL_EGREP])dnl 6709cfa76ccdSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6710cfa76ccdSmrg 6711cfa76ccdSmrgAC_ARG_WITH([gnu-ld], 6712cfa76ccdSmrg [AS_HELP_STRING([--with-gnu-ld], 6713cfa76ccdSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6714cfa76ccdSmrg [test no = "$withval" || with_gnu_ld=yes], 6715cfa76ccdSmrg [with_gnu_ld=no])dnl 6716e96acad6Smrg 6717cfa76ccdSmrgac_prog=ld 6718cfa76ccdSmrgif test yes = "$GCC"; then 6719cfa76ccdSmrg # Check if gcc -print-prog-name=ld gives a path. 6720cfa76ccdSmrg AC_MSG_CHECKING([for ld used by $CC]) 6721cfa76ccdSmrg case $host in 6722cfa76ccdSmrg *-*-mingw*) 6723cfa76ccdSmrg # gcc leaves a trailing carriage return, which upsets mingw 6724cfa76ccdSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6725cfa76ccdSmrg *) 6726cfa76ccdSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6727cfa76ccdSmrg esac 6728cfa76ccdSmrg case $ac_prog in 6729cfa76ccdSmrg # Accept absolute paths. 6730cfa76ccdSmrg [[\\/]]* | ?:[[\\/]]*) 6731cfa76ccdSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 6732cfa76ccdSmrg # Canonicalize the pathname of ld 6733cfa76ccdSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6734cfa76ccdSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6735cfa76ccdSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6736cfa76ccdSmrg done 6737cfa76ccdSmrg test -z "$LD" && LD=$ac_prog 6738cfa76ccdSmrg ;; 6739cfa76ccdSmrg "") 6740cfa76ccdSmrg # If it fails, then pretend we aren't using GCC. 6741cfa76ccdSmrg ac_prog=ld 6742cfa76ccdSmrg ;; 6743cfa76ccdSmrg *) 6744cfa76ccdSmrg # If it is relative, then search for the first ld in PATH. 6745cfa76ccdSmrg with_gnu_ld=unknown 6746cfa76ccdSmrg ;; 6747cfa76ccdSmrg esac 6748cfa76ccdSmrgelif test yes = "$with_gnu_ld"; then 6749cfa76ccdSmrg AC_MSG_CHECKING([for GNU ld]) 6750cfa76ccdSmrgelse 6751cfa76ccdSmrg AC_MSG_CHECKING([for non-GNU ld]) 6752cfa76ccdSmrgfi 6753cfa76ccdSmrgAC_CACHE_VAL(lt_cv_path_LD, 6754cfa76ccdSmrg[if test -z "$LD"; then 6755cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6756cfa76ccdSmrg for ac_dir in $PATH; do 6757cfa76ccdSmrg IFS=$lt_save_ifs 6758cfa76ccdSmrg test -z "$ac_dir" && ac_dir=. 6759cfa76ccdSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6760cfa76ccdSmrg lt_cv_path_LD=$ac_dir/$ac_prog 6761cfa76ccdSmrg # Check to see if the program is GNU ld. I'd rather use --version, 6762cfa76ccdSmrg # but apparently some variants of GNU ld only accept -v. 6763cfa76ccdSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 6764cfa76ccdSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6765cfa76ccdSmrg *GNU* | *'with BFD'*) 6766cfa76ccdSmrg test no != "$with_gnu_ld" && break 6767dbbd9e4bSmacallan ;; 6768cfa76ccdSmrg *) 6769cfa76ccdSmrg test yes != "$with_gnu_ld" && break 6770e96acad6Smrg ;; 6771cfa76ccdSmrg esac 6772cfa76ccdSmrg fi 6773cfa76ccdSmrg done 6774cfa76ccdSmrg IFS=$lt_save_ifs 6775cfa76ccdSmrgelse 6776cfa76ccdSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6777cfa76ccdSmrgfi]) 6778cfa76ccdSmrgLD=$lt_cv_path_LD 6779cfa76ccdSmrgif test -n "$LD"; then 6780cfa76ccdSmrg AC_MSG_RESULT($LD) 6781cfa76ccdSmrgelse 6782cfa76ccdSmrg AC_MSG_RESULT(no) 6783cfa76ccdSmrgfi 6784cfa76ccdSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6785cfa76ccdSmrg_LT_PATH_LD_GNU 6786cfa76ccdSmrgAC_SUBST([LD]) 6787e96acad6Smrg 6788cfa76ccdSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6789cfa76ccdSmrg])# LT_PATH_LD 6790e96acad6Smrg 6791cfa76ccdSmrg# Old names: 6792cfa76ccdSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6793cfa76ccdSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6794cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 6795cfa76ccdSmrgdnl AC_DEFUN([AM_PROG_LD], []) 6796cfa76ccdSmrgdnl AC_DEFUN([AC_PROG_LD], []) 6797e96acad6Smrg 6798e96acad6Smrg 6799cfa76ccdSmrg# _LT_PATH_LD_GNU 6800cfa76ccdSmrg#- -------------- 6801cfa76ccdSmrgm4_defun([_LT_PATH_LD_GNU], 6802cfa76ccdSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6803cfa76ccdSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6804cfa76ccdSmrgcase `$LD -v 2>&1 </dev/null` in 6805cfa76ccdSmrg*GNU* | *'with BFD'*) 6806cfa76ccdSmrg lt_cv_prog_gnu_ld=yes 6807cfa76ccdSmrg ;; 6808cfa76ccdSmrg*) 6809cfa76ccdSmrg lt_cv_prog_gnu_ld=no 6810cfa76ccdSmrg ;; 6811cfa76ccdSmrgesac]) 6812cfa76ccdSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6813cfa76ccdSmrg])# _LT_PATH_LD_GNU 6814e96acad6Smrg 6815e96acad6Smrg 6816cfa76ccdSmrg# _LT_CMD_RELOAD 6817cfa76ccdSmrg# -------------- 6818cfa76ccdSmrg# find reload flag for linker 6819cfa76ccdSmrg# -- PORTME Some linkers may need a different reload flag. 6820cfa76ccdSmrgm4_defun([_LT_CMD_RELOAD], 6821cfa76ccdSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 6822cfa76ccdSmrg lt_cv_ld_reload_flag, 6823cfa76ccdSmrg [lt_cv_ld_reload_flag='-r']) 6824cfa76ccdSmrgreload_flag=$lt_cv_ld_reload_flag 6825cfa76ccdSmrgcase $reload_flag in 6826cfa76ccdSmrg"" | " "*) ;; 6827cfa76ccdSmrg*) reload_flag=" $reload_flag" ;; 6828cfa76ccdSmrgesac 6829cfa76ccdSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6830cfa76ccdSmrgcase $host_os in 6831cfa76ccdSmrg cygwin* | mingw* | pw32* | cegcc*) 6832cfa76ccdSmrg if test yes != "$GCC"; then 6833cfa76ccdSmrg reload_cmds=false 6834cfa76ccdSmrg fi 6835cfa76ccdSmrg ;; 6836cfa76ccdSmrg darwin*) 6837cfa76ccdSmrg if test yes = "$GCC"; then 6838cfa76ccdSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6839cfa76ccdSmrg else 6840cfa76ccdSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6841cfa76ccdSmrg fi 6842cfa76ccdSmrg ;; 6843cfa76ccdSmrgesac 6844cfa76ccdSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6845cfa76ccdSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6846cfa76ccdSmrg])# _LT_CMD_RELOAD 6847e96acad6Smrg 6848e96acad6Smrg 6849cfa76ccdSmrg# _LT_PATH_DD 6850cfa76ccdSmrg# ----------- 6851cfa76ccdSmrg# find a working dd 6852cfa76ccdSmrgm4_defun([_LT_PATH_DD], 6853cfa76ccdSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6854cfa76ccdSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6855cfa76ccdSmrgcat conftest.i conftest.i >conftest2.i 6856cfa76ccdSmrg: ${lt_DD:=$DD} 6857cfa76ccdSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6858cfa76ccdSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6859cfa76ccdSmrg cmp -s conftest.i conftest.out \ 6860cfa76ccdSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6861cfa76ccdSmrgfi]) 6862cfa76ccdSmrgrm -f conftest.i conftest2.i conftest.out]) 6863cfa76ccdSmrg])# _LT_PATH_DD 6864e96acad6Smrg 6865e96acad6Smrg 6866cfa76ccdSmrg# _LT_CMD_TRUNCATE 6867cfa76ccdSmrg# ---------------- 6868cfa76ccdSmrg# find command to truncate a binary pipe 6869cfa76ccdSmrgm4_defun([_LT_CMD_TRUNCATE], 6870cfa76ccdSmrg[m4_require([_LT_PATH_DD]) 6871cfa76ccdSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6872cfa76ccdSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6873cfa76ccdSmrgcat conftest.i conftest.i >conftest2.i 6874cfa76ccdSmrglt_cv_truncate_bin= 6875cfa76ccdSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6876cfa76ccdSmrg cmp -s conftest.i conftest.out \ 6877cfa76ccdSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6878cfa76ccdSmrgfi 6879cfa76ccdSmrgrm -f conftest.i conftest2.i conftest.out 6880cfa76ccdSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6881cfa76ccdSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6882cfa76ccdSmrg [Command to truncate a binary pipe]) 6883cfa76ccdSmrg])# _LT_CMD_TRUNCATE 6884cfa76ccdSmrg 6885cfa76ccdSmrg 6886cfa76ccdSmrg# _LT_CHECK_MAGIC_METHOD 6887cfa76ccdSmrg# ---------------------- 6888cfa76ccdSmrg# how to check for library dependencies 6889cfa76ccdSmrg# -- PORTME fill in with the dynamic library characteristics 6890cfa76ccdSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6891cfa76ccdSmrg[m4_require([_LT_DECL_EGREP]) 6892cfa76ccdSmrgm4_require([_LT_DECL_OBJDUMP]) 6893cfa76ccdSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6894cfa76ccdSmrglt_cv_deplibs_check_method, 6895cfa76ccdSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6896cfa76ccdSmrglt_cv_file_magic_test_file= 6897cfa76ccdSmrglt_cv_deplibs_check_method='unknown' 6898cfa76ccdSmrg# Need to set the preceding variable on all platforms that support 6899cfa76ccdSmrg# interlibrary dependencies. 6900cfa76ccdSmrg# 'none' -- dependencies not supported. 6901cfa76ccdSmrg# 'unknown' -- same as none, but documents that we really don't know. 6902cfa76ccdSmrg# 'pass_all' -- all dependencies passed with no checks. 6903cfa76ccdSmrg# 'test_compile' -- check by making test program. 6904cfa76ccdSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 6905cfa76ccdSmrg# that responds to the $file_magic_cmd with a given extended regex. 6906cfa76ccdSmrg# If you have 'file' or equivalent on your system and you're not sure 6907cfa76ccdSmrg# whether 'pass_all' will *always* work, you probably want this one. 6908e96acad6Smrg 6909cfa76ccdSmrgcase $host_os in 6910cfa76ccdSmrgaix[[4-9]]*) 6911cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 6912cfa76ccdSmrg ;; 6913e96acad6Smrg 6914cfa76ccdSmrgbeos*) 6915cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 6916cfa76ccdSmrg ;; 6917e96acad6Smrg 6918cfa76ccdSmrgbsdi[[45]]*) 6919cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6920cfa76ccdSmrg lt_cv_file_magic_cmd='$FILECMD -L' 6921cfa76ccdSmrg lt_cv_file_magic_test_file=/shlib/libc.so 6922cfa76ccdSmrg ;; 6923e96acad6Smrg 6924cfa76ccdSmrgcygwin*) 6925cfa76ccdSmrg # func_win32_libid is a shell function defined in ltmain.sh 6926cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6927cfa76ccdSmrg lt_cv_file_magic_cmd='func_win32_libid' 6928cfa76ccdSmrg ;; 6929e96acad6Smrg 6930cfa76ccdSmrgmingw* | pw32*) 6931cfa76ccdSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 6932cfa76ccdSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6933cfa76ccdSmrg # unless we find 'file', for example because we are cross-compiling. 6934cfa76ccdSmrg if ( file / ) >/dev/null 2>&1; then 6935cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6936cfa76ccdSmrg lt_cv_file_magic_cmd='func_win32_libid' 6937cfa76ccdSmrg else 6938cfa76ccdSmrg # Keep this pattern in sync with the one in func_win32_libid. 6939cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6940cfa76ccdSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6941cfa76ccdSmrg fi 6942cfa76ccdSmrg ;; 6943e96acad6Smrg 6944cfa76ccdSmrgcegcc*) 6945cfa76ccdSmrg # use the weaker test based on 'objdump'. See mingw*. 6946cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6947cfa76ccdSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6948cfa76ccdSmrg ;; 6949e96acad6Smrg 6950cfa76ccdSmrgdarwin* | rhapsody*) 6951cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 6952cfa76ccdSmrg ;; 6953e96acad6Smrg 6954cfa76ccdSmrgfreebsd* | dragonfly* | midnightbsd*) 6955cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6956cfa76ccdSmrg case $host_cpu in 6957cfa76ccdSmrg i*86 ) 6958cfa76ccdSmrg # Not sure whether the presence of OpenBSD here was a mistake. 6959cfa76ccdSmrg # Let's accept both of them until this is cleared up. 6960cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6961cfa76ccdSmrg lt_cv_file_magic_cmd=$FILECMD 6962cfa76ccdSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6963cfa76ccdSmrg ;; 6964cfa76ccdSmrg esac 6965cfa76ccdSmrg else 6966cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 6967cfa76ccdSmrg fi 6968cfa76ccdSmrg ;; 6969e96acad6Smrg 6970cfa76ccdSmrghaiku*) 6971cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 6972cfa76ccdSmrg ;; 6973e96acad6Smrg 6974cfa76ccdSmrghpux10.20* | hpux11*) 6975cfa76ccdSmrg lt_cv_file_magic_cmd=$FILECMD 6976cfa76ccdSmrg case $host_cpu in 6977cfa76ccdSmrg ia64*) 6978cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6979cfa76ccdSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6980cfa76ccdSmrg ;; 6981cfa76ccdSmrg hppa*64*) 6982cfa76ccdSmrg [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]'] 6983cfa76ccdSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6984cfa76ccdSmrg ;; 6985cfa76ccdSmrg *) 6986cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6987cfa76ccdSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6988cfa76ccdSmrg ;; 6989cfa76ccdSmrg esac 6990cfa76ccdSmrg ;; 6991e96acad6Smrg 6992cfa76ccdSmrginterix[[3-9]]*) 6993cfa76ccdSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6994cfa76ccdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6995cfa76ccdSmrg ;; 6996e96acad6Smrg 6997cfa76ccdSmrgirix5* | irix6* | nonstopux*) 6998cfa76ccdSmrg case $LD in 6999cfa76ccdSmrg *-32|*"-32 ") libmagic=32-bit;; 7000cfa76ccdSmrg *-n32|*"-n32 ") libmagic=N32;; 7001cfa76ccdSmrg *-64|*"-64 ") libmagic=64-bit;; 7002cfa76ccdSmrg *) libmagic=never-match;; 7003cfa76ccdSmrg esac 7004cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7005cfa76ccdSmrg ;; 7006e96acad6Smrg 7007cfa76ccdSmrg# This must be glibc/ELF. 7008cfa76ccdSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7009cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7010cfa76ccdSmrg ;; 7011e96acad6Smrg 7012cfa76ccdSmrgnetbsd*) 7013cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7014cfa76ccdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7015cfa76ccdSmrg else 7016cfa76ccdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7017cfa76ccdSmrg fi 7018cfa76ccdSmrg ;; 7019e96acad6Smrg 7020cfa76ccdSmrgnewos6*) 7021cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7022cfa76ccdSmrg lt_cv_file_magic_cmd=$FILECMD 7023cfa76ccdSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 7024cfa76ccdSmrg ;; 7025e96acad6Smrg 7026cfa76ccdSmrg*nto* | *qnx*) 7027cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7028cfa76ccdSmrg ;; 7029e96acad6Smrg 7030cfa76ccdSmrgopenbsd* | bitrig*) 7031cfa76ccdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7032cfa76ccdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7033cfa76ccdSmrg else 7034cfa76ccdSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7035cfa76ccdSmrg fi 7036cfa76ccdSmrg ;; 7037e96acad6Smrg 7038cfa76ccdSmrgosf3* | osf4* | osf5*) 7039cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7040cfa76ccdSmrg ;; 7041e96acad6Smrg 7042cfa76ccdSmrgrdos*) 7043cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7044cfa76ccdSmrg ;; 7045e96acad6Smrg 7046cfa76ccdSmrgsolaris*) 7047cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7048cfa76ccdSmrg ;; 7049e96acad6Smrg 7050cfa76ccdSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7051cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7052cfa76ccdSmrg ;; 7053e96acad6Smrg 7054cfa76ccdSmrgsysv4 | sysv4.3*) 7055cfa76ccdSmrg case $host_vendor in 7056cfa76ccdSmrg motorola) 7057cfa76ccdSmrg 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]]' 7058cfa76ccdSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7059cfa76ccdSmrg ;; 7060cfa76ccdSmrg ncr) 7061cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7062cfa76ccdSmrg ;; 7063cfa76ccdSmrg sequent) 7064cfa76ccdSmrg lt_cv_file_magic_cmd='/bin/file' 7065cfa76ccdSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7066cfa76ccdSmrg ;; 7067cfa76ccdSmrg sni) 7068cfa76ccdSmrg lt_cv_file_magic_cmd='/bin/file' 7069cfa76ccdSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7070cfa76ccdSmrg lt_cv_file_magic_test_file=/lib/libc.so 7071cfa76ccdSmrg ;; 7072cfa76ccdSmrg siemens) 7073cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7074cfa76ccdSmrg ;; 7075cfa76ccdSmrg pc) 7076cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7077cfa76ccdSmrg ;; 7078cfa76ccdSmrg esac 7079cfa76ccdSmrg ;; 7080e96acad6Smrg 7081cfa76ccdSmrgtpf*) 7082cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7083cfa76ccdSmrg ;; 7084cfa76ccdSmrgos2*) 7085cfa76ccdSmrg lt_cv_deplibs_check_method=pass_all 7086cfa76ccdSmrg ;; 7087cfa76ccdSmrgesac 7088cfa76ccdSmrg]) 7089e96acad6Smrg 7090cfa76ccdSmrgfile_magic_glob= 7091cfa76ccdSmrgwant_nocaseglob=no 7092cfa76ccdSmrgif test "$build" = "$host"; then 7093cfa76ccdSmrg case $host_os in 7094cfa76ccdSmrg mingw* | pw32*) 7095cfa76ccdSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7096cfa76ccdSmrg want_nocaseglob=yes 7097cfa76ccdSmrg else 7098cfa76ccdSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7099cfa76ccdSmrg fi 7100cfa76ccdSmrg ;; 7101cfa76ccdSmrg esac 7102cfa76ccdSmrgfi 7103e96acad6Smrg 7104cfa76ccdSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 7105cfa76ccdSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 7106cfa76ccdSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7107e96acad6Smrg 7108cfa76ccdSmrg_LT_DECL([], [deplibs_check_method], [1], 7109cfa76ccdSmrg [Method to check whether dependent libraries are shared objects]) 7110cfa76ccdSmrg_LT_DECL([], [file_magic_cmd], [1], 7111cfa76ccdSmrg [Command to use when deplibs_check_method = "file_magic"]) 7112cfa76ccdSmrg_LT_DECL([], [file_magic_glob], [1], 7113cfa76ccdSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 7114cfa76ccdSmrg_LT_DECL([], [want_nocaseglob], [1], 7115cfa76ccdSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7116cfa76ccdSmrg])# _LT_CHECK_MAGIC_METHOD 7117e96acad6Smrg 7118e96acad6Smrg 7119cfa76ccdSmrg# LT_PATH_NM 7120cfa76ccdSmrg# ---------- 7121cfa76ccdSmrg# find the pathname to a BSD- or MS-compatible name lister 7122cfa76ccdSmrgAC_DEFUN([LT_PATH_NM], 7123cfa76ccdSmrg[AC_REQUIRE([AC_PROG_CC])dnl 7124cfa76ccdSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7125cfa76ccdSmrg[if test -n "$NM"; then 7126cfa76ccdSmrg # Let the user override the test. 7127cfa76ccdSmrg lt_cv_path_NM=$NM 7128cfa76ccdSmrgelse 7129cfa76ccdSmrg lt_nm_to_check=${ac_tool_prefix}nm 7130cfa76ccdSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7131cfa76ccdSmrg lt_nm_to_check="$lt_nm_to_check nm" 7132cfa76ccdSmrg fi 7133cfa76ccdSmrg for lt_tmp_nm in $lt_nm_to_check; do 7134cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7135cfa76ccdSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7136cfa76ccdSmrg IFS=$lt_save_ifs 7137cfa76ccdSmrg test -z "$ac_dir" && ac_dir=. 7138cfa76ccdSmrg tmp_nm=$ac_dir/$lt_tmp_nm 7139cfa76ccdSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7140cfa76ccdSmrg # Check to see if the nm accepts a BSD-compat flag. 7141cfa76ccdSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7142cfa76ccdSmrg # nm: unknown option "B" ignored 7143cfa76ccdSmrg # Tru64's nm complains that /dev/null is an invalid object file 7144cfa76ccdSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7145cfa76ccdSmrg case $build_os in 7146cfa76ccdSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7147cfa76ccdSmrg *) lt_bad_file=/dev/null ;; 7148cfa76ccdSmrg esac 7149cfa76ccdSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7150cfa76ccdSmrg *$lt_bad_file* | *'Invalid file or object type'*) 7151cfa76ccdSmrg lt_cv_path_NM="$tmp_nm -B" 7152cfa76ccdSmrg break 2 7153cfa76ccdSmrg ;; 7154cfa76ccdSmrg *) 7155cfa76ccdSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7156cfa76ccdSmrg */dev/null*) 7157cfa76ccdSmrg lt_cv_path_NM="$tmp_nm -p" 7158cfa76ccdSmrg break 2 7159dbbd9e4bSmacallan ;; 7160cfa76ccdSmrg *) 7161cfa76ccdSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7162cfa76ccdSmrg continue # so that we can try to find one that supports BSD flags 7163cfa76ccdSmrg ;; 7164cfa76ccdSmrg esac 7165cfa76ccdSmrg ;; 7166cfa76ccdSmrg esac 7167cfa76ccdSmrg fi 7168cfa76ccdSmrg done 7169cfa76ccdSmrg IFS=$lt_save_ifs 7170cfa76ccdSmrg done 7171cfa76ccdSmrg : ${lt_cv_path_NM=no} 7172cfa76ccdSmrgfi]) 7173cfa76ccdSmrgif test no != "$lt_cv_path_NM"; then 7174cfa76ccdSmrg NM=$lt_cv_path_NM 7175cfa76ccdSmrgelse 7176cfa76ccdSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 7177cfa76ccdSmrg if test -n "$DUMPBIN"; then : 7178cfa76ccdSmrg # Let the user override the test. 7179cfa76ccdSmrg else 7180cfa76ccdSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7181cfa76ccdSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7182cfa76ccdSmrg *COFF*) 7183cfa76ccdSmrg DUMPBIN="$DUMPBIN -symbols -headers" 7184cfa76ccdSmrg ;; 7185cfa76ccdSmrg *) 7186cfa76ccdSmrg DUMPBIN=: 7187cfa76ccdSmrg ;; 7188cfa76ccdSmrg esac 7189cfa76ccdSmrg fi 7190cfa76ccdSmrg AC_SUBST([DUMPBIN]) 7191cfa76ccdSmrg if test : != "$DUMPBIN"; then 7192cfa76ccdSmrg NM=$DUMPBIN 7193cfa76ccdSmrg fi 7194cfa76ccdSmrgfi 7195cfa76ccdSmrgtest -z "$NM" && NM=nm 7196cfa76ccdSmrgAC_SUBST([NM]) 7197cfa76ccdSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7198e96acad6Smrg 7199cfa76ccdSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7200cfa76ccdSmrg [lt_cv_nm_interface="BSD nm" 7201cfa76ccdSmrg echo "int some_variable = 0;" > conftest.$ac_ext 7202cfa76ccdSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7203cfa76ccdSmrg (eval "$ac_compile" 2>conftest.err) 7204cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7205cfa76ccdSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7206cfa76ccdSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7207cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7208cfa76ccdSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7209cfa76ccdSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 7210cfa76ccdSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7211cfa76ccdSmrg lt_cv_nm_interface="MS dumpbin" 7212cfa76ccdSmrg fi 7213cfa76ccdSmrg rm -f conftest*]) 7214cfa76ccdSmrg])# LT_PATH_NM 7215e96acad6Smrg 7216cfa76ccdSmrg# Old names: 7217cfa76ccdSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7218cfa76ccdSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7219cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 7220cfa76ccdSmrgdnl AC_DEFUN([AM_PROG_NM], []) 7221cfa76ccdSmrgdnl AC_DEFUN([AC_PROG_NM], []) 7222dbbd9e4bSmacallan 7223cfa76ccdSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7224cfa76ccdSmrg# -------------------------------- 7225cfa76ccdSmrg# how to determine the name of the shared library 7226cfa76ccdSmrg# associated with a specific link library. 7227cfa76ccdSmrg# -- PORTME fill in with the dynamic library characteristics 7228cfa76ccdSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7229cfa76ccdSmrg[m4_require([_LT_DECL_EGREP]) 7230cfa76ccdSmrgm4_require([_LT_DECL_OBJDUMP]) 7231cfa76ccdSmrgm4_require([_LT_DECL_DLLTOOL]) 7232cfa76ccdSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7233cfa76ccdSmrglt_cv_sharedlib_from_linklib_cmd, 7234cfa76ccdSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7235e96acad6Smrg 7236cfa76ccdSmrgcase $host_os in 7237cfa76ccdSmrgcygwin* | mingw* | pw32* | cegcc*) 7238cfa76ccdSmrg # two different shell functions defined in ltmain.sh; 7239cfa76ccdSmrg # decide which one to use based on capabilities of $DLLTOOL 7240cfa76ccdSmrg case `$DLLTOOL --help 2>&1` in 7241cfa76ccdSmrg *--identify-strict*) 7242cfa76ccdSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7243cfa76ccdSmrg ;; 7244cfa76ccdSmrg *) 7245cfa76ccdSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7246cfa76ccdSmrg ;; 7247cfa76ccdSmrg esac 7248cfa76ccdSmrg ;; 7249cfa76ccdSmrg*) 7250cfa76ccdSmrg # fallback: assume linklib IS sharedlib 7251cfa76ccdSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7252cfa76ccdSmrg ;; 7253cfa76ccdSmrgesac 7254cfa76ccdSmrg]) 7255cfa76ccdSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7256cfa76ccdSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7257dbbd9e4bSmacallan 7258cfa76ccdSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7259cfa76ccdSmrg [Command to associate shared and link libraries]) 7260cfa76ccdSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7261dbbd9e4bSmacallan 7262dbbd9e4bSmacallan 7263cfa76ccdSmrg# _LT_PATH_MANIFEST_TOOL 7264cfa76ccdSmrg# ---------------------- 7265cfa76ccdSmrg# locate the manifest tool 7266cfa76ccdSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7267cfa76ccdSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7268cfa76ccdSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7269cfa76ccdSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7270cfa76ccdSmrg [lt_cv_path_mainfest_tool=no 7271cfa76ccdSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7272cfa76ccdSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7273cfa76ccdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7274cfa76ccdSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7275cfa76ccdSmrg lt_cv_path_mainfest_tool=yes 7276cfa76ccdSmrg fi 7277cfa76ccdSmrg rm -f conftest*]) 7278cfa76ccdSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 7279cfa76ccdSmrg MANIFEST_TOOL=: 7280cfa76ccdSmrgfi 7281cfa76ccdSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7282cfa76ccdSmrg])# _LT_PATH_MANIFEST_TOOL 7283e96acad6Smrg 7284e96acad6Smrg 7285cfa76ccdSmrg# _LT_DLL_DEF_P([FILE]) 7286cfa76ccdSmrg# --------------------- 7287cfa76ccdSmrg# True iff FILE is a Windows DLL '.def' file. 7288cfa76ccdSmrg# Keep in sync with func_dll_def_p in the libtool script 7289cfa76ccdSmrgAC_DEFUN([_LT_DLL_DEF_P], 7290cfa76ccdSmrg[dnl 7291cfa76ccdSmrg test DEF = "`$SED -n dnl 7292cfa76ccdSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7293cfa76ccdSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7294cfa76ccdSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7295cfa76ccdSmrg -e q dnl Only consider the first "real" line 7296cfa76ccdSmrg $1`" dnl 7297cfa76ccdSmrg])# _LT_DLL_DEF_P 7298e96acad6Smrg 7299dbbd9e4bSmacallan 7300cfa76ccdSmrg# LT_LIB_M 7301cfa76ccdSmrg# -------- 7302cfa76ccdSmrg# check for math library 7303cfa76ccdSmrgAC_DEFUN([LT_LIB_M], 7304cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7305cfa76ccdSmrgLIBM= 7306cfa76ccdSmrgcase $host in 7307cfa76ccdSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7308cfa76ccdSmrg # These system don't have libm, or don't need it 7309cfa76ccdSmrg ;; 7310cfa76ccdSmrg*-ncr-sysv4.3*) 7311cfa76ccdSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7312cfa76ccdSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7313cfa76ccdSmrg ;; 7314cfa76ccdSmrg*) 7315cfa76ccdSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7316cfa76ccdSmrg ;; 7317cfa76ccdSmrgesac 7318cfa76ccdSmrgAC_SUBST([LIBM]) 7319cfa76ccdSmrg])# LT_LIB_M 7320dbbd9e4bSmacallan 7321cfa76ccdSmrg# Old name: 7322cfa76ccdSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7323cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 7324cfa76ccdSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7325dbbd9e4bSmacallan 7326dbbd9e4bSmacallan 7327cfa76ccdSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7328cfa76ccdSmrg# ------------------------------- 7329cfa76ccdSmrgm4_defun([_LT_COMPILER_NO_RTTI], 7330cfa76ccdSmrg[m4_require([_LT_TAG_COMPILER])dnl 7331dbbd9e4bSmacallan 7332cfa76ccdSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7333dbbd9e4bSmacallan 7334cfa76ccdSmrgif test yes = "$GCC"; then 7335cfa76ccdSmrg case $cc_basename in 7336cfa76ccdSmrg nvcc*) 7337cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7338cfa76ccdSmrg *) 7339cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7340cfa76ccdSmrg esac 7341dbbd9e4bSmacallan 7342cfa76ccdSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7343cfa76ccdSmrg lt_cv_prog_compiler_rtti_exceptions, 7344cfa76ccdSmrg [-fno-rtti -fno-exceptions], [], 7345cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7346cfa76ccdSmrgfi 7347cfa76ccdSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7348cfa76ccdSmrg [Compiler flag to turn off builtin functions]) 7349cfa76ccdSmrg])# _LT_COMPILER_NO_RTTI 7350dbbd9e4bSmacallan 7351e96acad6Smrg 7352cfa76ccdSmrg# _LT_CMD_GLOBAL_SYMBOLS 7353cfa76ccdSmrg# ---------------------- 7354cfa76ccdSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7355cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7356cfa76ccdSmrgAC_REQUIRE([AC_PROG_CC])dnl 7357cfa76ccdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7358cfa76ccdSmrgAC_REQUIRE([LT_PATH_NM])dnl 7359cfa76ccdSmrgAC_REQUIRE([LT_PATH_LD])dnl 7360cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 7361cfa76ccdSmrgm4_require([_LT_DECL_EGREP])dnl 7362cfa76ccdSmrgm4_require([_LT_TAG_COMPILER])dnl 7363e96acad6Smrg 7364cfa76ccdSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7365cfa76ccdSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7366cfa76ccdSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7367cfa76ccdSmrg[ 7368cfa76ccdSmrg# These are sane defaults that work on at least a few old systems. 7369cfa76ccdSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7370e96acad6Smrg 7371cfa76ccdSmrg# Character class describing NM global symbol codes. 7372cfa76ccdSmrgsymcode='[[BCDEGRST]]' 7373e96acad6Smrg 7374cfa76ccdSmrg# Regexp to match symbols that can be accessed directly from C. 7375cfa76ccdSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7376dbbd9e4bSmacallan 7377cfa76ccdSmrg# Define system-specific variables. 7378cfa76ccdSmrgcase $host_os in 7379cfa76ccdSmrgaix*) 7380cfa76ccdSmrg symcode='[[BCDT]]' 7381cfa76ccdSmrg ;; 7382cfa76ccdSmrgcygwin* | mingw* | pw32* | cegcc*) 7383cfa76ccdSmrg symcode='[[ABCDGISTW]]' 7384cfa76ccdSmrg ;; 7385cfa76ccdSmrghpux*) 7386cfa76ccdSmrg if test ia64 = "$host_cpu"; then 7387cfa76ccdSmrg symcode='[[ABCDEGRST]]' 7388cfa76ccdSmrg fi 7389cfa76ccdSmrg ;; 7390cfa76ccdSmrgirix* | nonstopux*) 7391cfa76ccdSmrg symcode='[[BCDEGRST]]' 7392cfa76ccdSmrg ;; 7393cfa76ccdSmrgosf*) 7394cfa76ccdSmrg symcode='[[BCDEGQRST]]' 7395cfa76ccdSmrg ;; 7396cfa76ccdSmrgsolaris*) 7397cfa76ccdSmrg symcode='[[BDRT]]' 7398cfa76ccdSmrg ;; 7399cfa76ccdSmrgsco3.2v5*) 7400cfa76ccdSmrg symcode='[[DT]]' 7401cfa76ccdSmrg ;; 7402cfa76ccdSmrgsysv4.2uw2*) 7403cfa76ccdSmrg symcode='[[DT]]' 7404cfa76ccdSmrg ;; 7405cfa76ccdSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7406cfa76ccdSmrg symcode='[[ABDT]]' 7407cfa76ccdSmrg ;; 7408cfa76ccdSmrgsysv4) 7409cfa76ccdSmrg symcode='[[DFNSTU]]' 7410cfa76ccdSmrg ;; 7411cfa76ccdSmrgesac 7412dbbd9e4bSmacallan 7413cfa76ccdSmrg# If we're using GNU nm, then use its standard symbol codes. 7414cfa76ccdSmrgcase `$NM -V 2>&1` in 7415cfa76ccdSmrg*GNU* | *'with BFD'*) 7416cfa76ccdSmrg symcode='[[ABCDGIRSTW]]' ;; 7417cfa76ccdSmrgesac 7418dbbd9e4bSmacallan 7419cfa76ccdSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7420cfa76ccdSmrg # Gets list of data symbols to import. 7421cfa76ccdSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7422cfa76ccdSmrg # Adjust the below global symbol transforms to fixup imported variables. 7423cfa76ccdSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7424cfa76ccdSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7425cfa76ccdSmrg lt_c_name_lib_hook="\ 7426cfa76ccdSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7427cfa76ccdSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7428cfa76ccdSmrgelse 7429cfa76ccdSmrg # Disable hooks by default. 7430cfa76ccdSmrg lt_cv_sys_global_symbol_to_import= 7431cfa76ccdSmrg lt_cdecl_hook= 7432cfa76ccdSmrg lt_c_name_hook= 7433cfa76ccdSmrg lt_c_name_lib_hook= 7434cfa76ccdSmrgfi 7435dbbd9e4bSmacallan 7436cfa76ccdSmrg# Transform an extracted symbol line into a proper C declaration. 7437cfa76ccdSmrg# Some systems (esp. on ia64) link data and code symbols differently, 7438cfa76ccdSmrg# so use this general approach. 7439cfa76ccdSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7440cfa76ccdSmrg$lt_cdecl_hook\ 7441cfa76ccdSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7442cfa76ccdSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7443dbbd9e4bSmacallan 7444cfa76ccdSmrg# Transform an extracted symbol line into symbol name and symbol address 7445cfa76ccdSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7446cfa76ccdSmrg$lt_c_name_hook\ 7447cfa76ccdSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7448cfa76ccdSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7449cfa76ccdSmrg 7450cfa76ccdSmrg# Transform an extracted symbol line into symbol name with lib prefix and 7451cfa76ccdSmrg# symbol address. 7452cfa76ccdSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7453cfa76ccdSmrg$lt_c_name_lib_hook\ 7454cfa76ccdSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7455cfa76ccdSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7456cfa76ccdSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7457dbbd9e4bSmacallan 7458cfa76ccdSmrg# Handle CRLF in mingw tool chain 7459cfa76ccdSmrgopt_cr= 7460cfa76ccdSmrgcase $build_os in 7461cfa76ccdSmrgmingw*) 7462cfa76ccdSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7463cfa76ccdSmrg ;; 7464e96acad6Smrgesac 7465dbbd9e4bSmacallan 7466cfa76ccdSmrg# Try without a prefix underscore, then with it. 7467cfa76ccdSmrgfor ac_symprfx in "" "_"; do 7468dbbd9e4bSmacallan 7469cfa76ccdSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7470cfa76ccdSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7471dbbd9e4bSmacallan 7472cfa76ccdSmrg # Write the raw and C identifiers. 7473cfa76ccdSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7474cfa76ccdSmrg # Fake it for dumpbin and say T for any non-static function, 7475cfa76ccdSmrg # D for any global variable and I for any imported variable. 7476cfa76ccdSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7477cfa76ccdSmrg # which start with @ or ?. 7478cfa76ccdSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7479cfa76ccdSmrg" {last_section=section; section=\$ 3};"\ 7480cfa76ccdSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7481cfa76ccdSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7482cfa76ccdSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7483cfa76ccdSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7484cfa76ccdSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7485cfa76ccdSmrg" \$ 0!~/External *\|/{next};"\ 7486cfa76ccdSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7487cfa76ccdSmrg" {if(hide[section]) next};"\ 7488cfa76ccdSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7489cfa76ccdSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7490cfa76ccdSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7491cfa76ccdSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7492cfa76ccdSmrg" ' prfx=^$ac_symprfx]" 7493cfa76ccdSmrg else 7494cfa76ccdSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7495cfa76ccdSmrg fi 7496cfa76ccdSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7497dbbd9e4bSmacallan 7498cfa76ccdSmrg # Check to see that the pipe works correctly. 7499cfa76ccdSmrg pipe_works=no 7500dbbd9e4bSmacallan 7501cfa76ccdSmrg rm -f conftest* 7502cfa76ccdSmrg cat > conftest.$ac_ext <<_LT_EOF 7503cfa76ccdSmrg#ifdef __cplusplus 7504cfa76ccdSmrgextern "C" { 7505cfa76ccdSmrg#endif 7506cfa76ccdSmrgchar nm_test_var; 7507cfa76ccdSmrgvoid nm_test_func(void); 7508cfa76ccdSmrgvoid nm_test_func(void){} 7509cfa76ccdSmrg#ifdef __cplusplus 7510cfa76ccdSmrg} 7511cfa76ccdSmrg#endif 7512cfa76ccdSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 7513cfa76ccdSmrg_LT_EOF 7514dbbd9e4bSmacallan 7515cfa76ccdSmrg if AC_TRY_EVAL(ac_compile); then 7516cfa76ccdSmrg # Now try to grab the symbols. 7517cfa76ccdSmrg nlist=conftest.nm 7518cfa76ccdSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7519cfa76ccdSmrg # Try sorting and uniquifying the output. 7520cfa76ccdSmrg if sort "$nlist" | uniq > "$nlist"T; then 7521cfa76ccdSmrg mv -f "$nlist"T "$nlist" 7522cfa76ccdSmrg else 7523cfa76ccdSmrg rm -f "$nlist"T 7524cfa76ccdSmrg fi 7525dbbd9e4bSmacallan 7526cfa76ccdSmrg # Make sure that we snagged all the symbols we need. 7527cfa76ccdSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7528cfa76ccdSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7529cfa76ccdSmrg cat <<_LT_EOF > conftest.$ac_ext 7530cfa76ccdSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7531cfa76ccdSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7532cfa76ccdSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7533cfa76ccdSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7534cfa76ccdSmrg# define LT@&t@_DLSYM_CONST 7535cfa76ccdSmrg#elif defined __osf__ 7536cfa76ccdSmrg/* This system does not cope well with relocations in const data. */ 7537cfa76ccdSmrg# define LT@&t@_DLSYM_CONST 7538cfa76ccdSmrg#else 7539cfa76ccdSmrg# define LT@&t@_DLSYM_CONST const 7540cfa76ccdSmrg#endif 7541dbbd9e4bSmacallan 7542cfa76ccdSmrg#ifdef __cplusplus 7543cfa76ccdSmrgextern "C" { 7544cfa76ccdSmrg#endif 7545dbbd9e4bSmacallan 7546cfa76ccdSmrg_LT_EOF 7547cfa76ccdSmrg # Now generate the symbol file. 7548cfa76ccdSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7549dbbd9e4bSmacallan 7550cfa76ccdSmrg cat <<_LT_EOF >> conftest.$ac_ext 7551dbbd9e4bSmacallan 7552cfa76ccdSmrg/* The mapping between symbol names and symbols. */ 7553cfa76ccdSmrgLT@&t@_DLSYM_CONST struct { 7554cfa76ccdSmrg const char *name; 7555cfa76ccdSmrg void *address; 7556cfa76ccdSmrg} 7557cfa76ccdSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7558cfa76ccdSmrg{ 7559cfa76ccdSmrg { "@PROGRAM@", (void *) 0 }, 7560cfa76ccdSmrg_LT_EOF 7561cfa76ccdSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7562cfa76ccdSmrg cat <<\_LT_EOF >> conftest.$ac_ext 7563cfa76ccdSmrg {0, (void *) 0} 7564cfa76ccdSmrg}; 7565dbbd9e4bSmacallan 7566cfa76ccdSmrg/* This works around a problem in FreeBSD linker */ 7567cfa76ccdSmrg#ifdef FREEBSD_WORKAROUND 7568cfa76ccdSmrgstatic const void *lt_preloaded_setup() { 7569cfa76ccdSmrg return lt__PROGRAM__LTX_preloaded_symbols; 7570cfa76ccdSmrg} 7571cfa76ccdSmrg#endif 7572dbbd9e4bSmacallan 7573cfa76ccdSmrg#ifdef __cplusplus 7574cfa76ccdSmrg} 7575cfa76ccdSmrg#endif 7576cfa76ccdSmrg_LT_EOF 7577cfa76ccdSmrg # Now try linking the two files. 7578cfa76ccdSmrg mv conftest.$ac_objext conftstm.$ac_objext 7579cfa76ccdSmrg lt_globsym_save_LIBS=$LIBS 7580cfa76ccdSmrg lt_globsym_save_CFLAGS=$CFLAGS 7581cfa76ccdSmrg LIBS=conftstm.$ac_objext 7582cfa76ccdSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7583cfa76ccdSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7584cfa76ccdSmrg pipe_works=yes 7585cfa76ccdSmrg fi 7586cfa76ccdSmrg LIBS=$lt_globsym_save_LIBS 7587cfa76ccdSmrg CFLAGS=$lt_globsym_save_CFLAGS 7588cfa76ccdSmrg else 7589cfa76ccdSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7590cfa76ccdSmrg fi 7591cfa76ccdSmrg else 7592cfa76ccdSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7593cfa76ccdSmrg fi 7594cfa76ccdSmrg else 7595cfa76ccdSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7596e96acad6Smrg fi 7597cfa76ccdSmrg else 7598cfa76ccdSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7599cfa76ccdSmrg cat conftest.$ac_ext >&5 7600cfa76ccdSmrg fi 7601cfa76ccdSmrg rm -rf conftest* conftst* 7602dbbd9e4bSmacallan 7603cfa76ccdSmrg # Do not use the global_symbol_pipe unless it works. 7604cfa76ccdSmrg if test yes = "$pipe_works"; then 7605cfa76ccdSmrg break 7606cfa76ccdSmrg else 7607cfa76ccdSmrg lt_cv_sys_global_symbol_pipe= 7608cfa76ccdSmrg fi 7609cfa76ccdSmrgdone 7610e96acad6Smrg]) 7611cfa76ccdSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7612cfa76ccdSmrg lt_cv_sys_global_symbol_to_cdecl= 7613e96acad6Smrgfi 7614cfa76ccdSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7615cfa76ccdSmrg AC_MSG_RESULT(failed) 7616cfa76ccdSmrgelse 7617cfa76ccdSmrg AC_MSG_RESULT(ok) 7618e96acad6Smrgfi 7619dbbd9e4bSmacallan 7620cfa76ccdSmrg# Response file support. 7621cfa76ccdSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7622cfa76ccdSmrg nm_file_list_spec='@' 7623cfa76ccdSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7624cfa76ccdSmrg nm_file_list_spec='@' 7625cfa76ccdSmrgfi 7626e96acad6Smrg 7627cfa76ccdSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7628cfa76ccdSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 7629cfa76ccdSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7630cfa76ccdSmrg [Transform the output of nm in a proper C declaration]) 7631cfa76ccdSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7632cfa76ccdSmrg [Transform the output of nm into a list of symbols to manually relocate]) 7633cfa76ccdSmrg_LT_DECL([global_symbol_to_c_name_address], 7634cfa76ccdSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7635cfa76ccdSmrg [Transform the output of nm in a C name address pair]) 7636cfa76ccdSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7637cfa76ccdSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7638cfa76ccdSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7639cfa76ccdSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7640cfa76ccdSmrg [The name lister interface]) 7641cfa76ccdSmrg_LT_DECL([], [nm_file_list_spec], [1], 7642cfa76ccdSmrg [Specify filename containing input files for $NM]) 7643cfa76ccdSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 7644dbbd9e4bSmacallan 7645dbbd9e4bSmacallan 7646cfa76ccdSmrg# _LT_COMPILER_PIC([TAGNAME]) 7647cfa76ccdSmrg# --------------------------- 7648cfa76ccdSmrgm4_defun([_LT_COMPILER_PIC], 7649cfa76ccdSmrg[m4_require([_LT_TAG_COMPILER])dnl 7650cfa76ccdSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7651cfa76ccdSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7652cfa76ccdSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7653e96acad6Smrg 7654cfa76ccdSmrgm4_if([$1], [CXX], [ 7655cfa76ccdSmrg # C++ specific cases for pic, static, wl, etc. 7656cfa76ccdSmrg if test yes = "$GXX"; then 7657cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7658cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7659e96acad6Smrg 7660cfa76ccdSmrg case $host_os in 7661cfa76ccdSmrg aix*) 7662cfa76ccdSmrg # All AIX code is PIC. 7663cfa76ccdSmrg if test ia64 = "$host_cpu"; then 7664cfa76ccdSmrg # AIX 5 now supports IA64 processor 7665cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7666cfa76ccdSmrg fi 7667cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7668cfa76ccdSmrg ;; 7669dbbd9e4bSmacallan 7670cfa76ccdSmrg amigaos*) 7671cfa76ccdSmrg case $host_cpu in 7672cfa76ccdSmrg powerpc) 7673cfa76ccdSmrg # see comment about AmigaOS4 .so support 7674cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7675cfa76ccdSmrg ;; 7676cfa76ccdSmrg m68k) 7677cfa76ccdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7678cfa76ccdSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7679cfa76ccdSmrg # like '-m68040'. 7680cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7681cfa76ccdSmrg ;; 7682cfa76ccdSmrg esac 7683cfa76ccdSmrg ;; 7684dbbd9e4bSmacallan 7685cfa76ccdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7686cfa76ccdSmrg # PIC is the default for these OSes. 7687cfa76ccdSmrg ;; 7688cfa76ccdSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7689cfa76ccdSmrg # This hack is so that the source file can tell whether it is being 7690cfa76ccdSmrg # built for inclusion in a dll (and should export symbols for example). 7691cfa76ccdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7692cfa76ccdSmrg # (--disable-auto-import) libraries 7693cfa76ccdSmrg m4_if([$1], [GCJ], [], 7694cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7695cfa76ccdSmrg case $host_os in 7696cfa76ccdSmrg os2*) 7697cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7698cfa76ccdSmrg ;; 7699cfa76ccdSmrg esac 7700cfa76ccdSmrg ;; 7701cfa76ccdSmrg darwin* | rhapsody*) 7702cfa76ccdSmrg # PIC is the default on this platform 7703cfa76ccdSmrg # Common symbols not allowed in MH_DYLIB files 7704cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7705cfa76ccdSmrg ;; 7706cfa76ccdSmrg *djgpp*) 7707cfa76ccdSmrg # DJGPP does not support shared libraries at all 7708cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7709cfa76ccdSmrg ;; 7710cfa76ccdSmrg haiku*) 7711cfa76ccdSmrg # PIC is the default for Haiku. 7712cfa76ccdSmrg # The "-static" flag exists, but is broken. 7713cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7714cfa76ccdSmrg ;; 7715cfa76ccdSmrg interix[[3-9]]*) 7716cfa76ccdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7717cfa76ccdSmrg # Instead, we relocate shared libraries at runtime. 7718cfa76ccdSmrg ;; 7719cfa76ccdSmrg sysv4*MP*) 7720cfa76ccdSmrg if test -d /usr/nec; then 7721cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7722cfa76ccdSmrg fi 7723cfa76ccdSmrg ;; 7724cfa76ccdSmrg hpux*) 7725cfa76ccdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7726cfa76ccdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7727cfa76ccdSmrg # sets the default TLS model and affects inlining. 7728cfa76ccdSmrg case $host_cpu in 7729cfa76ccdSmrg hppa*64*) 7730cfa76ccdSmrg ;; 7731cfa76ccdSmrg *) 7732cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7733cfa76ccdSmrg ;; 7734cfa76ccdSmrg esac 7735cfa76ccdSmrg ;; 7736cfa76ccdSmrg *qnx* | *nto*) 7737cfa76ccdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7738cfa76ccdSmrg # it will coredump. 7739cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7740cfa76ccdSmrg ;; 7741cfa76ccdSmrg *) 7742cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7743cfa76ccdSmrg ;; 7744cfa76ccdSmrg esac 7745cfa76ccdSmrg else 7746e96acad6Smrg case $host_os in 7747e96acad6Smrg aix[[4-9]]*) 7748cfa76ccdSmrg # All AIX code is PIC. 7749cfa76ccdSmrg if test ia64 = "$host_cpu"; then 7750cfa76ccdSmrg # AIX 5 now supports IA64 processor 7751cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7752cfa76ccdSmrg else 7753cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7754e96acad6Smrg fi 7755cfa76ccdSmrg ;; 7756cfa76ccdSmrg chorus*) 7757cfa76ccdSmrg case $cc_basename in 7758cfa76ccdSmrg cxch68*) 7759cfa76ccdSmrg # Green Hills C++ Compiler 7760cfa76ccdSmrg # _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" 7761cfa76ccdSmrg ;; 7762cfa76ccdSmrg esac 7763cfa76ccdSmrg ;; 7764cfa76ccdSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7765cfa76ccdSmrg # This hack is so that the source file can tell whether it is being 7766cfa76ccdSmrg # built for inclusion in a dll (and should export symbols for example). 7767cfa76ccdSmrg m4_if([$1], [GCJ], [], 7768cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7769cfa76ccdSmrg ;; 7770cfa76ccdSmrg dgux*) 7771cfa76ccdSmrg case $cc_basename in 7772cfa76ccdSmrg ec++*) 7773cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7774cfa76ccdSmrg ;; 7775cfa76ccdSmrg ghcx*) 7776cfa76ccdSmrg # Green Hills C++ Compiler 7777cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7778cfa76ccdSmrg ;; 7779cfa76ccdSmrg *) 7780cfa76ccdSmrg ;; 7781cfa76ccdSmrg esac 7782cfa76ccdSmrg ;; 7783cfa76ccdSmrg freebsd* | dragonfly* | midnightbsd*) 7784cfa76ccdSmrg # FreeBSD uses GNU C++ 7785cfa76ccdSmrg ;; 7786cfa76ccdSmrg hpux9* | hpux10* | hpux11*) 7787cfa76ccdSmrg case $cc_basename in 7788cfa76ccdSmrg CC*) 7789cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7790cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7791cfa76ccdSmrg if test ia64 != "$host_cpu"; then 7792cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7793cfa76ccdSmrg fi 7794cfa76ccdSmrg ;; 7795cfa76ccdSmrg aCC*) 7796cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7797cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7798cfa76ccdSmrg case $host_cpu in 7799cfa76ccdSmrg hppa*64*|ia64*) 7800cfa76ccdSmrg # +Z the default 7801cfa76ccdSmrg ;; 7802cfa76ccdSmrg *) 7803cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7804cfa76ccdSmrg ;; 7805cfa76ccdSmrg esac 7806cfa76ccdSmrg ;; 7807cfa76ccdSmrg *) 7808cfa76ccdSmrg ;; 7809cfa76ccdSmrg esac 7810cfa76ccdSmrg ;; 7811cfa76ccdSmrg interix*) 7812cfa76ccdSmrg # This is c89, which is MS Visual C++ (no shared libs) 7813cfa76ccdSmrg # Anyone wants to do a port? 7814cfa76ccdSmrg ;; 7815cfa76ccdSmrg irix5* | irix6* | nonstopux*) 7816cfa76ccdSmrg case $cc_basename in 7817cfa76ccdSmrg CC*) 7818cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7819cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7820cfa76ccdSmrg # CC pic flag -KPIC is the default. 7821cfa76ccdSmrg ;; 7822cfa76ccdSmrg *) 7823cfa76ccdSmrg ;; 7824cfa76ccdSmrg esac 7825cfa76ccdSmrg ;; 7826cfa76ccdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7827cfa76ccdSmrg case $cc_basename in 7828cfa76ccdSmrg KCC*) 7829cfa76ccdSmrg # KAI C++ Compiler 7830cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7831cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7832cfa76ccdSmrg ;; 7833cfa76ccdSmrg ecpc* ) 7834cfa76ccdSmrg # old Intel C++ for x86_64, which still supported -KPIC. 7835cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7836cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7837cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7838cfa76ccdSmrg ;; 7839cfa76ccdSmrg icpc* ) 7840cfa76ccdSmrg # Intel C++, used to be incompatible with GCC. 7841cfa76ccdSmrg # ICC 10 doesn't accept -KPIC any more. 7842cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7843cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7844cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7845cfa76ccdSmrg ;; 7846cfa76ccdSmrg pgCC* | pgcpp*) 7847cfa76ccdSmrg # Portland Group C++ compiler 7848cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7850cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851cfa76ccdSmrg ;; 7852cfa76ccdSmrg cxx*) 7853cfa76ccdSmrg # Compaq C++ 7854cfa76ccdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7855cfa76ccdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7856cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7857cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7858cfa76ccdSmrg ;; 7859cfa76ccdSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7860cfa76ccdSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7861cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7862cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7863cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7864cfa76ccdSmrg ;; 7865cfa76ccdSmrg *) 7866cfa76ccdSmrg case `$CC -V 2>&1 | $SED 5q` in 7867cfa76ccdSmrg *Sun\ C*) 7868cfa76ccdSmrg # Sun C++ 5.9 7869cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7870cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7871cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7872cfa76ccdSmrg ;; 7873cfa76ccdSmrg esac 7874cfa76ccdSmrg ;; 7875cfa76ccdSmrg esac 7876cfa76ccdSmrg ;; 7877cfa76ccdSmrg lynxos*) 7878cfa76ccdSmrg ;; 7879cfa76ccdSmrg m88k*) 7880cfa76ccdSmrg ;; 7881cfa76ccdSmrg mvs*) 7882cfa76ccdSmrg case $cc_basename in 7883cfa76ccdSmrg cxx*) 7884cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7885cfa76ccdSmrg ;; 7886cfa76ccdSmrg *) 7887cfa76ccdSmrg ;; 7888cfa76ccdSmrg esac 7889cfa76ccdSmrg ;; 7890cfa76ccdSmrg netbsd*) 7891cfa76ccdSmrg ;; 7892cfa76ccdSmrg *qnx* | *nto*) 7893cfa76ccdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7894cfa76ccdSmrg # it will coredump. 7895cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7896e96acad6Smrg ;; 7897cfa76ccdSmrg osf3* | osf4* | osf5*) 7898cfa76ccdSmrg case $cc_basename in 7899cfa76ccdSmrg KCC*) 7900cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7901cfa76ccdSmrg ;; 7902cfa76ccdSmrg RCC*) 7903cfa76ccdSmrg # Rational C++ 2.4.1 7904cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905cfa76ccdSmrg ;; 7906cfa76ccdSmrg cxx*) 7907cfa76ccdSmrg # Digital/Compaq C++ 7908cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7909cfa76ccdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7910cfa76ccdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7911cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7912cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7913cfa76ccdSmrg ;; 7914cfa76ccdSmrg *) 7915cfa76ccdSmrg ;; 7916cfa76ccdSmrg esac 7917cfa76ccdSmrg ;; 7918cfa76ccdSmrg psos*) 7919cfa76ccdSmrg ;; 7920cfa76ccdSmrg solaris*) 7921cfa76ccdSmrg case $cc_basename in 7922cfa76ccdSmrg CC* | sunCC*) 7923cfa76ccdSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7924cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7925cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7926cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7927cfa76ccdSmrg ;; 7928cfa76ccdSmrg gcx*) 7929cfa76ccdSmrg # Green Hills C++ Compiler 7930cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7931cfa76ccdSmrg ;; 7932cfa76ccdSmrg *) 7933cfa76ccdSmrg ;; 7934cfa76ccdSmrg esac 7935cfa76ccdSmrg ;; 7936cfa76ccdSmrg sunos4*) 7937cfa76ccdSmrg case $cc_basename in 7938cfa76ccdSmrg CC*) 7939cfa76ccdSmrg # Sun C++ 4.x 7940cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7941cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7942cfa76ccdSmrg ;; 7943cfa76ccdSmrg lcc*) 7944cfa76ccdSmrg # Lucid 7945cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7946cfa76ccdSmrg ;; 7947cfa76ccdSmrg *) 7948cfa76ccdSmrg ;; 7949cfa76ccdSmrg esac 7950cfa76ccdSmrg ;; 7951cfa76ccdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7952cfa76ccdSmrg case $cc_basename in 7953cfa76ccdSmrg CC*) 7954cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7955cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7956cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7957cfa76ccdSmrg ;; 7958cfa76ccdSmrg esac 7959cfa76ccdSmrg ;; 7960cfa76ccdSmrg tandem*) 7961cfa76ccdSmrg case $cc_basename in 7962cfa76ccdSmrg NCC*) 7963cfa76ccdSmrg # NonStop-UX NCC 3.20 7964cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7965cfa76ccdSmrg ;; 7966cfa76ccdSmrg *) 7967cfa76ccdSmrg ;; 7968cfa76ccdSmrg esac 7969cfa76ccdSmrg ;; 7970cfa76ccdSmrg vxworks*) 7971cfa76ccdSmrg ;; 7972cfa76ccdSmrg *) 7973cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7974cfa76ccdSmrg ;; 7975e96acad6Smrg esac 7976cfa76ccdSmrg fi 7977cfa76ccdSmrg], 7978cfa76ccdSmrg[ 7979cfa76ccdSmrg if test yes = "$GCC"; then 7980cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7981cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7982dbbd9e4bSmacallan 7983e96acad6Smrg case $host_os in 7984cfa76ccdSmrg aix*) 7985cfa76ccdSmrg # All AIX code is PIC. 7986cfa76ccdSmrg if test ia64 = "$host_cpu"; then 7987cfa76ccdSmrg # AIX 5 now supports IA64 processor 7988cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7989cfa76ccdSmrg fi 7990cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7991cfa76ccdSmrg ;; 7992cfa76ccdSmrg 7993cfa76ccdSmrg amigaos*) 7994cfa76ccdSmrg case $host_cpu in 7995cfa76ccdSmrg powerpc) 7996cfa76ccdSmrg # see comment about AmigaOS4 .so support 7997cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7998e96acad6Smrg ;; 7999cfa76ccdSmrg m68k) 8000cfa76ccdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 8001cfa76ccdSmrg # adding the '-m68020' flag to GCC prevents building anything better, 8002cfa76ccdSmrg # like '-m68040'. 8003cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8004e96acad6Smrg ;; 8005cfa76ccdSmrg esac 8006cfa76ccdSmrg ;; 8007dbbd9e4bSmacallan 8008cfa76ccdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8009cfa76ccdSmrg # PIC is the default for these OSes. 8010cfa76ccdSmrg ;; 8011dbbd9e4bSmacallan 8012cfa76ccdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8013cfa76ccdSmrg # This hack is so that the source file can tell whether it is being 8014cfa76ccdSmrg # built for inclusion in a dll (and should export symbols for example). 8015cfa76ccdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8016cfa76ccdSmrg # (--disable-auto-import) libraries 8017cfa76ccdSmrg m4_if([$1], [GCJ], [], 8018cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8019cfa76ccdSmrg case $host_os in 8020cfa76ccdSmrg os2*) 8021cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8022cfa76ccdSmrg ;; 8023cfa76ccdSmrg esac 8024cfa76ccdSmrg ;; 8025dbbd9e4bSmacallan 8026cfa76ccdSmrg darwin* | rhapsody*) 8027cfa76ccdSmrg # PIC is the default on this platform 8028cfa76ccdSmrg # Common symbols not allowed in MH_DYLIB files 8029cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8030cfa76ccdSmrg ;; 8031dbbd9e4bSmacallan 8032cfa76ccdSmrg haiku*) 8033cfa76ccdSmrg # PIC is the default for Haiku. 8034cfa76ccdSmrg # The "-static" flag exists, but is broken. 8035cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8036cfa76ccdSmrg ;; 8037dbbd9e4bSmacallan 8038cfa76ccdSmrg hpux*) 8039cfa76ccdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8040cfa76ccdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8041cfa76ccdSmrg # sets the default TLS model and affects inlining. 8042cfa76ccdSmrg case $host_cpu in 8043cfa76ccdSmrg hppa*64*) 8044cfa76ccdSmrg # +Z the default 8045cfa76ccdSmrg ;; 8046cfa76ccdSmrg *) 8047cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8048cfa76ccdSmrg ;; 8049cfa76ccdSmrg esac 8050cfa76ccdSmrg ;; 8051dbbd9e4bSmacallan 8052cfa76ccdSmrg interix[[3-9]]*) 8053cfa76ccdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8054cfa76ccdSmrg # Instead, we relocate shared libraries at runtime. 8055cfa76ccdSmrg ;; 8056dbbd9e4bSmacallan 8057cfa76ccdSmrg msdosdjgpp*) 8058cfa76ccdSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8059cfa76ccdSmrg # on systems that don't support them. 8060cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8061cfa76ccdSmrg enable_shared=no 8062cfa76ccdSmrg ;; 8063dbbd9e4bSmacallan 8064cfa76ccdSmrg *nto* | *qnx*) 8065cfa76ccdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8066cfa76ccdSmrg # it will coredump. 8067cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8068cfa76ccdSmrg ;; 8069dbbd9e4bSmacallan 8070cfa76ccdSmrg sysv4*MP*) 8071cfa76ccdSmrg if test -d /usr/nec; then 8072cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8073cfa76ccdSmrg fi 8074cfa76ccdSmrg ;; 8075dbbd9e4bSmacallan 8076cfa76ccdSmrg *) 8077cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8078cfa76ccdSmrg ;; 8079cfa76ccdSmrg esac 8080dbbd9e4bSmacallan 8081cfa76ccdSmrg case $cc_basename in 8082cfa76ccdSmrg nvcc*) # Cuda Compiler Driver 2.2 8083cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8084cfa76ccdSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8085cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8086cfa76ccdSmrg fi 8087cfa76ccdSmrg ;; 8088cfa76ccdSmrg esac 8089cfa76ccdSmrg else 8090cfa76ccdSmrg # PORTME Check for flag to pass linker flags through the system compiler. 8091cfa76ccdSmrg case $host_os in 8092cfa76ccdSmrg aix*) 8093cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094cfa76ccdSmrg if test ia64 = "$host_cpu"; then 8095cfa76ccdSmrg # AIX 5 now supports IA64 processor 8096cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8097cfa76ccdSmrg else 8098cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8099cfa76ccdSmrg fi 8100cfa76ccdSmrg ;; 8101dbbd9e4bSmacallan 8102cfa76ccdSmrg darwin* | rhapsody*) 8103cfa76ccdSmrg # PIC is the default on this platform 8104cfa76ccdSmrg # Common symbols not allowed in MH_DYLIB files 8105cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8106cfa76ccdSmrg case $cc_basename in 8107cfa76ccdSmrg nagfor*) 8108cfa76ccdSmrg # NAG Fortran compiler 8109cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8110cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8111cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112cfa76ccdSmrg ;; 8113cfa76ccdSmrg esac 8114cfa76ccdSmrg ;; 8115e96acad6Smrg 8116cfa76ccdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8117cfa76ccdSmrg # This hack is so that the source file can tell whether it is being 8118cfa76ccdSmrg # built for inclusion in a dll (and should export symbols for example). 8119cfa76ccdSmrg m4_if([$1], [GCJ], [], 8120cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8121cfa76ccdSmrg case $host_os in 8122cfa76ccdSmrg os2*) 8123cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8124cfa76ccdSmrg ;; 8125cfa76ccdSmrg esac 8126cfa76ccdSmrg ;; 8127dbbd9e4bSmacallan 8128cfa76ccdSmrg hpux9* | hpux10* | hpux11*) 8129cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8130cfa76ccdSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8131cfa76ccdSmrg # not for PA HP-UX. 8132cfa76ccdSmrg case $host_cpu in 8133cfa76ccdSmrg hppa*64*|ia64*) 8134cfa76ccdSmrg # +Z the default 8135cfa76ccdSmrg ;; 8136cfa76ccdSmrg *) 8137cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8138cfa76ccdSmrg ;; 8139cfa76ccdSmrg esac 8140cfa76ccdSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8141cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8142cfa76ccdSmrg ;; 8143dbbd9e4bSmacallan 8144cfa76ccdSmrg irix5* | irix6* | nonstopux*) 8145cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8146cfa76ccdSmrg # PIC (with -KPIC) is the default. 8147cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148cfa76ccdSmrg ;; 8149dbbd9e4bSmacallan 8150cfa76ccdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8151cfa76ccdSmrg case $cc_basename in 8152cfa76ccdSmrg # old Intel for x86_64, which still supported -KPIC. 8153cfa76ccdSmrg ecc*) 8154cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8155cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8156cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8157cfa76ccdSmrg ;; 8158cfa76ccdSmrg # icc used to be incompatible with GCC. 8159cfa76ccdSmrg # ICC 10 doesn't accept -KPIC any more. 8160cfa76ccdSmrg icc* | ifort*) 8161cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8163cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8164cfa76ccdSmrg ;; 8165cfa76ccdSmrg # Lahey Fortran 8.1. 8166cfa76ccdSmrg lf95*) 8167cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8168cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8169cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8170cfa76ccdSmrg ;; 8171cfa76ccdSmrg nagfor*) 8172cfa76ccdSmrg # NAG Fortran compiler 8173cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8174cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8175cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176cfa76ccdSmrg ;; 8177cfa76ccdSmrg tcc*) 8178cfa76ccdSmrg # Fabrice Bellard et al's Tiny C Compiler 8179cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8180cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8181cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8182cfa76ccdSmrg ;; 8183cfa76ccdSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8184cfa76ccdSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 8185cfa76ccdSmrg # which looks to be a dead project) 8186cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8187cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8188cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8189cfa76ccdSmrg ;; 8190cfa76ccdSmrg ccc*) 8191cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8192cfa76ccdSmrg # All Alpha code is PIC. 8193cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8194cfa76ccdSmrg ;; 8195cfa76ccdSmrg xl* | bgxl* | bgf* | mpixl*) 8196cfa76ccdSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8197cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8198cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8199cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8200cfa76ccdSmrg ;; 8201cfa76ccdSmrg *) 8202cfa76ccdSmrg case `$CC -V 2>&1 | $SED 5q` in 8203cfa76ccdSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8204cfa76ccdSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8205cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8206cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8207cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8208cfa76ccdSmrg ;; 8209cfa76ccdSmrg *Sun\ F* | *Sun*Fortran*) 8210cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8211cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8212cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8213cfa76ccdSmrg ;; 8214cfa76ccdSmrg *Sun\ C*) 8215cfa76ccdSmrg # Sun C 5.9 8216cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8217cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8218cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8219cfa76ccdSmrg ;; 8220cfa76ccdSmrg *Intel*\ [[CF]]*Compiler*) 8221cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8222cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8223cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8224cfa76ccdSmrg ;; 8225cfa76ccdSmrg *Portland\ Group*) 8226cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8227cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8228cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8229cfa76ccdSmrg ;; 8230cfa76ccdSmrg esac 8231cfa76ccdSmrg ;; 8232cfa76ccdSmrg esac 8233cfa76ccdSmrg ;; 8234dbbd9e4bSmacallan 8235cfa76ccdSmrg newsos6) 8236cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8237cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8238cfa76ccdSmrg ;; 8239dbbd9e4bSmacallan 8240cfa76ccdSmrg *nto* | *qnx*) 8241cfa76ccdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8242cfa76ccdSmrg # it will coredump. 8243cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8244cfa76ccdSmrg ;; 8245dbbd9e4bSmacallan 8246cfa76ccdSmrg osf3* | osf4* | osf5*) 8247cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8248cfa76ccdSmrg # All OSF/1 code is PIC. 8249cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8250cfa76ccdSmrg ;; 8251dbbd9e4bSmacallan 8252cfa76ccdSmrg rdos*) 8253cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8254cfa76ccdSmrg ;; 8255e96acad6Smrg 8256cfa76ccdSmrg solaris*) 8257cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8258cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8259cfa76ccdSmrg case $cc_basename in 8260cfa76ccdSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8261cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8262cfa76ccdSmrg *) 8263cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8264cfa76ccdSmrg esac 8265cfa76ccdSmrg ;; 8266e96acad6Smrg 8267cfa76ccdSmrg sunos4*) 8268cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8269cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8270cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8271cfa76ccdSmrg ;; 8272dbbd9e4bSmacallan 8273cfa76ccdSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 8274cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8275cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8276cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8277cfa76ccdSmrg ;; 8278dbbd9e4bSmacallan 8279cfa76ccdSmrg sysv4*MP*) 8280cfa76ccdSmrg if test -d /usr/nec; then 8281cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8282cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8283cfa76ccdSmrg fi 8284cfa76ccdSmrg ;; 8285dbbd9e4bSmacallan 8286cfa76ccdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8287cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8288cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8289cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8290cfa76ccdSmrg ;; 8291dbbd9e4bSmacallan 8292cfa76ccdSmrg unicos*) 8293cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8294cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8295cfa76ccdSmrg ;; 8296dbbd9e4bSmacallan 8297cfa76ccdSmrg uts4*) 8298cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8299cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8300cfa76ccdSmrg ;; 8301e96acad6Smrg 8302cfa76ccdSmrg *) 8303cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8304cfa76ccdSmrg ;; 8305cfa76ccdSmrg esac 8306dbbd9e4bSmacallan fi 8307dbbd9e4bSmacallan]) 8308cfa76ccdSmrgcase $host_os in 8309cfa76ccdSmrg # For platforms that do not support PIC, -DPIC is meaningless: 8310cfa76ccdSmrg *djgpp*) 8311cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8312cfa76ccdSmrg ;; 8313cfa76ccdSmrg *) 8314cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8315cfa76ccdSmrg ;; 8316cfa76ccdSmrgesac 8317e96acad6Smrg 8318cfa76ccdSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8319cfa76ccdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8320cfa76ccdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8321cfa76ccdSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8322e96acad6Smrg 8323cfa76ccdSmrg# 8324cfa76ccdSmrg# Check to make sure the PIC flag actually works. 8325cfa76ccdSmrg# 8326cfa76ccdSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8327cfa76ccdSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8328cfa76ccdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8329cfa76ccdSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8330cfa76ccdSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8331cfa76ccdSmrg "" | " "*) ;; 8332cfa76ccdSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8333cfa76ccdSmrg esac], 8334cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8335cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8336e96acad6Smrgfi 8337cfa76ccdSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8338cfa76ccdSmrg [Additional compiler flags for building library objects]) 8339cfa76ccdSmrg 8340cfa76ccdSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8341cfa76ccdSmrg [How to pass a linker flag through the compiler]) 8342cfa76ccdSmrg# 8343cfa76ccdSmrg# Check to make sure the static flag actually works. 8344cfa76ccdSmrg# 8345cfa76ccdSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8346cfa76ccdSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8347cfa76ccdSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8348cfa76ccdSmrg $lt_tmp_static_flag, 8349cfa76ccdSmrg [], 8350cfa76ccdSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8351cfa76ccdSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8352cfa76ccdSmrg [Compiler flag to prevent dynamic linking]) 8353cfa76ccdSmrg])# _LT_COMPILER_PIC 8354e96acad6Smrg 8355e96acad6Smrg 8356cfa76ccdSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8357cfa76ccdSmrg# ---------------------------- 8358cfa76ccdSmrg# See if the linker supports building shared libraries. 8359cfa76ccdSmrgm4_defun([_LT_LINKER_SHLIBS], 8360cfa76ccdSmrg[AC_REQUIRE([LT_PATH_LD])dnl 8361cfa76ccdSmrgAC_REQUIRE([LT_PATH_NM])dnl 8362cfa76ccdSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8363cfa76ccdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8364cfa76ccdSmrgm4_require([_LT_DECL_EGREP])dnl 8365cfa76ccdSmrgm4_require([_LT_DECL_SED])dnl 8366cfa76ccdSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8367cfa76ccdSmrgm4_require([_LT_TAG_COMPILER])dnl 8368cfa76ccdSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8369cfa76ccdSmrgm4_if([$1], [CXX], [ 8370cfa76ccdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8371cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8372cfa76ccdSmrg case $host_os in 8373cfa76ccdSmrg aix[[4-9]]*) 8374cfa76ccdSmrg # If we're using GNU nm, then we don't want the "-C" option. 8375cfa76ccdSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8376cfa76ccdSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8377cfa76ccdSmrg # weak defined symbols like other global defined symbols, whereas 8378cfa76ccdSmrg # GNU nm marks them as "W". 8379cfa76ccdSmrg # While the 'weak' keyword is ignored in the Export File, we need 8380cfa76ccdSmrg # it in the Import File for the 'aix-soname' feature, so we have 8381cfa76ccdSmrg # to replace the "-B" option with "-P" for AIX nm. 8382cfa76ccdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8383cfa76ccdSmrg _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' 8384cfa76ccdSmrg else 8385cfa76ccdSmrg _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 == "L") || (\$ 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' 8386cfa76ccdSmrg fi 8387cfa76ccdSmrg ;; 8388cfa76ccdSmrg pw32*) 8389cfa76ccdSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8390cfa76ccdSmrg ;; 8391cfa76ccdSmrg cygwin* | mingw* | cegcc*) 8392cfa76ccdSmrg case $cc_basename in 8393cfa76ccdSmrg cl* | icl*) 8394cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8395cfa76ccdSmrg ;; 8396cfa76ccdSmrg *) 8397cfa76ccdSmrg _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' 8398cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8399cfa76ccdSmrg ;; 8400cfa76ccdSmrg esac 8401cfa76ccdSmrg ;; 8402cfa76ccdSmrg *) 8403cfa76ccdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8404cfa76ccdSmrg ;; 8405cfa76ccdSmrg esac 8406cfa76ccdSmrg], [ 8407cfa76ccdSmrg runpath_var= 8408cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8409cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8410cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)= 8411cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8412cfa76ccdSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 8413cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8414cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8415cfa76ccdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8416cfa76ccdSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 8417cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8418cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8419cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8420cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8421cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8422cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8423cfa76ccdSmrg _LT_TAGVAR(inherit_rpath, $1)=no 8424cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8425cfa76ccdSmrg _LT_TAGVAR(module_cmds, $1)= 8426cfa76ccdSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 8427cfa76ccdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8428cfa76ccdSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8429cfa76ccdSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8430cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8431cfa76ccdSmrg # include_expsyms should be a list of space-separated symbols to be *always* 8432cfa76ccdSmrg # included in the symbol list 8433cfa76ccdSmrg _LT_TAGVAR(include_expsyms, $1)= 8434cfa76ccdSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 8435cfa76ccdSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8436cfa76ccdSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8437cfa76ccdSmrg # as well as any symbol that contains 'd'. 8438cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8439cfa76ccdSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8440cfa76ccdSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 8441cfa76ccdSmrg # the symbol is explicitly referenced. Since portable code cannot 8442cfa76ccdSmrg # rely on this symbol name, it's probably fine to never include it in 8443cfa76ccdSmrg # preloaded symbol tables. 8444cfa76ccdSmrg # Exclude shared library initialization/finalization symbols. 8445cfa76ccdSmrgdnl Note also adjust exclude_expsyms for C++ above. 8446cfa76ccdSmrg extract_expsyms_cmds= 8447e96acad6Smrg 8448cfa76ccdSmrg case $host_os in 8449cfa76ccdSmrg cygwin* | mingw* | pw32* | cegcc*) 8450cfa76ccdSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8451cfa76ccdSmrg # When not using gcc, we currently assume that we are using 8452cfa76ccdSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8453cfa76ccdSmrg if test yes != "$GCC"; then 8454cfa76ccdSmrg with_gnu_ld=no 8455cfa76ccdSmrg fi 8456cfa76ccdSmrg ;; 8457cfa76ccdSmrg interix*) 8458cfa76ccdSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8459cfa76ccdSmrg with_gnu_ld=yes 8460cfa76ccdSmrg ;; 8461cfa76ccdSmrg openbsd* | bitrig*) 8462cfa76ccdSmrg with_gnu_ld=no 8463cfa76ccdSmrg ;; 8464cfa76ccdSmrg esac 8465e96acad6Smrg 8466cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8467e96acad6Smrg 8468cfa76ccdSmrg # On some targets, GNU ld is compatible enough with the native linker 8469cfa76ccdSmrg # that we're better off using the native interface for both. 8470cfa76ccdSmrg lt_use_gnu_ld_interface=no 8471cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 8472cfa76ccdSmrg case $host_os in 8473cfa76ccdSmrg aix*) 8474cfa76ccdSmrg # The AIX port of GNU ld has always aspired to compatibility 8475cfa76ccdSmrg # with the native linker. However, as the warning in the GNU ld 8476cfa76ccdSmrg # block says, versions before 2.19.5* couldn't really create working 8477cfa76ccdSmrg # shared libraries, regardless of the interface used. 8478cfa76ccdSmrg case `$LD -v 2>&1` in 8479cfa76ccdSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8480cfa76ccdSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8481cfa76ccdSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8482cfa76ccdSmrg *) 8483cfa76ccdSmrg lt_use_gnu_ld_interface=yes 8484cfa76ccdSmrg ;; 8485cfa76ccdSmrg esac 8486cfa76ccdSmrg ;; 8487cfa76ccdSmrg *) 8488cfa76ccdSmrg lt_use_gnu_ld_interface=yes 8489cfa76ccdSmrg ;; 8490e96acad6Smrg esac 8491cfa76ccdSmrg fi 8492e96acad6Smrg 8493cfa76ccdSmrg if test yes = "$lt_use_gnu_ld_interface"; then 8494cfa76ccdSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8495cfa76ccdSmrg wlarc='$wl' 8496e96acad6Smrg 8497cfa76ccdSmrg # Set some defaults for GNU ld with shared library support. These 8498cfa76ccdSmrg # are reset later if shared libraries are not supported. Putting them 8499cfa76ccdSmrg # here allows them to be overridden if necessary. 8500cfa76ccdSmrg runpath_var=LD_RUN_PATH 8501cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8502cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8503cfa76ccdSmrg # ancient GNU ld didn't support --whole-archive et. al. 8504cfa76ccdSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8505cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8506cfa76ccdSmrg else 8507cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8508cfa76ccdSmrg fi 8509cfa76ccdSmrg supports_anon_versioning=no 8510cfa76ccdSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8511cfa76ccdSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 8512cfa76ccdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8513cfa76ccdSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8514cfa76ccdSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8515cfa76ccdSmrg *\ 2.11.*) ;; # other 2.11 versions 8516cfa76ccdSmrg *) supports_anon_versioning=yes ;; 8517cfa76ccdSmrg esac 8518e96acad6Smrg 8519cfa76ccdSmrg # See if GNU ld supports shared libraries. 8520cfa76ccdSmrg case $host_os in 8521cfa76ccdSmrg aix[[3-9]]*) 8522cfa76ccdSmrg # On AIX/PPC, the GNU linker is very broken 8523cfa76ccdSmrg if test ia64 != "$host_cpu"; then 8524cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8525cfa76ccdSmrg cat <<_LT_EOF 1>&2 8526e96acad6Smrg 8527cfa76ccdSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8528cfa76ccdSmrg*** to be unable to reliably create shared libraries on AIX. 8529cfa76ccdSmrg*** Therefore, libtool is disabling shared libraries support. If you 8530cfa76ccdSmrg*** really care for shared libraries, you may want to install binutils 8531cfa76ccdSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8532cfa76ccdSmrg*** You will then need to restart the configuration process. 8533e96acad6Smrg 8534cfa76ccdSmrg_LT_EOF 8535cfa76ccdSmrg fi 8536cfa76ccdSmrg ;; 8537e96acad6Smrg 8538cfa76ccdSmrg amigaos*) 8539cfa76ccdSmrg case $host_cpu in 8540cfa76ccdSmrg powerpc) 8541cfa76ccdSmrg # see comment about AmigaOS4 .so support 8542cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8543cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8544cfa76ccdSmrg ;; 8545cfa76ccdSmrg m68k) 8546cfa76ccdSmrg _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)' 8547cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8548cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8549cfa76ccdSmrg ;; 8550cfa76ccdSmrg esac 8551cfa76ccdSmrg ;; 8552e96acad6Smrg 8553cfa76ccdSmrg beos*) 8554cfa76ccdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8555cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8556cfa76ccdSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8557cfa76ccdSmrg # support --undefined. This deserves some investigation. FIXME 8558cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8559cfa76ccdSmrg else 8560cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8561cfa76ccdSmrg fi 8562cfa76ccdSmrg ;; 8563e96acad6Smrg 8564cfa76ccdSmrg cygwin* | mingw* | pw32* | cegcc*) 8565cfa76ccdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8566cfa76ccdSmrg # as there is no search path for DLLs. 8567cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8568cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8569cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8570cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8571cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8572cfa76ccdSmrg _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' 8573cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8574e96acad6Smrg 8575cfa76ccdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8576cfa76ccdSmrg _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' 8577cfa76ccdSmrg # If the export-symbols file already is a .def file, use it as 8578cfa76ccdSmrg # is; otherwise, prepend EXPORTS... 8579cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8580cfa76ccdSmrg cp $export_symbols $output_objdir/$soname.def; 8581cfa76ccdSmrg else 8582cfa76ccdSmrg echo EXPORTS > $output_objdir/$soname.def; 8583cfa76ccdSmrg cat $export_symbols >> $output_objdir/$soname.def; 8584cfa76ccdSmrg fi~ 8585cfa76ccdSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8586cfa76ccdSmrg else 8587cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8588cfa76ccdSmrg fi 8589cfa76ccdSmrg ;; 8590e96acad6Smrg 8591cfa76ccdSmrg haiku*) 8592cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8593cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8594cfa76ccdSmrg ;; 8595e96acad6Smrg 8596cfa76ccdSmrg os2*) 8597cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8598cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8599cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8600cfa76ccdSmrg shrext_cmds=.dll 8601cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8602cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8603cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8604cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8605cfa76ccdSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8606cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8607cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 8608cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8609cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8610cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8611cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8612cfa76ccdSmrg prefix_cmds="$SED"~ 8613cfa76ccdSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8614cfa76ccdSmrg prefix_cmds="$prefix_cmds -e 1d"; 8615cfa76ccdSmrg fi~ 8616cfa76ccdSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8617cfa76ccdSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8618cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8619cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 8620cfa76ccdSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8621cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8622cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8623cfa76ccdSmrg ;; 8624e96acad6Smrg 8625cfa76ccdSmrg interix[[3-9]]*) 8626cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8627cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8628cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8629cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8630cfa76ccdSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8631cfa76ccdSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8632cfa76ccdSmrg # default) and relocated if they conflict, which is a slow very memory 8633cfa76ccdSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8634cfa76ccdSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8635cfa76ccdSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8636cfa76ccdSmrg _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' 8637cfa76ccdSmrg _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' 8638cfa76ccdSmrg ;; 8639e96acad6Smrg 8640cfa76ccdSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8641cfa76ccdSmrg tmp_diet=no 8642cfa76ccdSmrg if test linux-dietlibc = "$host_os"; then 8643cfa76ccdSmrg case $cc_basename in 8644cfa76ccdSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8645cfa76ccdSmrg esac 8646cfa76ccdSmrg fi 8647cfa76ccdSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8648cfa76ccdSmrg && test no = "$tmp_diet" 8649cfa76ccdSmrg then 8650cfa76ccdSmrg tmp_addflag=' $pic_flag' 8651cfa76ccdSmrg tmp_sharedflag='-shared' 8652cfa76ccdSmrg case $cc_basename,$host_cpu in 8653cfa76ccdSmrg pgcc*) # Portland Group C compiler 8654cfa76ccdSmrg _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' 8655cfa76ccdSmrg tmp_addflag=' $pic_flag' 8656cfa76ccdSmrg ;; 8657cfa76ccdSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 8658cfa76ccdSmrg # Portland Group f77 and f90 compilers 8659cfa76ccdSmrg _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' 8660cfa76ccdSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 8661cfa76ccdSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8662cfa76ccdSmrg tmp_addflag=' -i_dynamic' ;; 8663cfa76ccdSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8664cfa76ccdSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8665cfa76ccdSmrg ifc* | ifort*) # Intel Fortran compiler 8666cfa76ccdSmrg tmp_addflag=' -nofor_main' ;; 8667cfa76ccdSmrg lf95*) # Lahey Fortran 8.1 8668cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8669cfa76ccdSmrg tmp_sharedflag='--shared' ;; 8670cfa76ccdSmrg nagfor*) # NAGFOR 5.3 8671cfa76ccdSmrg tmp_sharedflag='-Wl,-shared' ;; 8672cfa76ccdSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8673cfa76ccdSmrg tmp_sharedflag='-qmkshrobj' 8674cfa76ccdSmrg tmp_addflag= ;; 8675cfa76ccdSmrg nvcc*) # Cuda Compiler Driver 2.2 8676cfa76ccdSmrg _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' 8677cfa76ccdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8678cfa76ccdSmrg ;; 8679cfa76ccdSmrg esac 8680cfa76ccdSmrg case `$CC -V 2>&1 | $SED 5q` in 8681cfa76ccdSmrg *Sun\ C*) # Sun C 5.9 8682cfa76ccdSmrg _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' 8683cfa76ccdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8684cfa76ccdSmrg tmp_sharedflag='-G' ;; 8685cfa76ccdSmrg *Sun\ F*) # Sun Fortran 8.3 8686cfa76ccdSmrg tmp_sharedflag='-G' ;; 8687cfa76ccdSmrg esac 8688cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689e96acad6Smrg 8690cfa76ccdSmrg if test yes = "$supports_anon_versioning"; then 8691cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8692cfa76ccdSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8693cfa76ccdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8694cfa76ccdSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8695cfa76ccdSmrg fi 8696e96acad6Smrg 8697cfa76ccdSmrg case $cc_basename in 8698cfa76ccdSmrg tcc*) 8699cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8700cfa76ccdSmrg ;; 8701cfa76ccdSmrg xlf* | bgf* | bgxlf* | mpixlf*) 8702cfa76ccdSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8703cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8704cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8705cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8706cfa76ccdSmrg if test yes = "$supports_anon_versioning"; then 8707cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8708cfa76ccdSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8709cfa76ccdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8710cfa76ccdSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8711cfa76ccdSmrg fi 8712cfa76ccdSmrg ;; 8713cfa76ccdSmrg esac 8714cfa76ccdSmrg else 8715cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8716cfa76ccdSmrg fi 8717cfa76ccdSmrg ;; 8718e96acad6Smrg 8719cfa76ccdSmrg netbsd*) 8720cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8721cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8722cfa76ccdSmrg wlarc= 8723cfa76ccdSmrg else 8724cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8725cfa76ccdSmrg _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' 8726cfa76ccdSmrg fi 8727cfa76ccdSmrg ;; 8728e96acad6Smrg 8729cfa76ccdSmrg solaris*) 8730cfa76ccdSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8731cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8732cfa76ccdSmrg cat <<_LT_EOF 1>&2 8733e96acad6Smrg 8734cfa76ccdSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8735cfa76ccdSmrg*** create shared libraries on Solaris systems. Therefore, libtool 8736cfa76ccdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8737cfa76ccdSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 8738cfa76ccdSmrg*** your PATH or compiler configuration so that the native linker is 8739cfa76ccdSmrg*** used, and then restart. 8740e96acad6Smrg 8741cfa76ccdSmrg_LT_EOF 8742cfa76ccdSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8743cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8744cfa76ccdSmrg _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' 8745cfa76ccdSmrg else 8746cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8747cfa76ccdSmrg fi 8748cfa76ccdSmrg ;; 8749e96acad6Smrg 8750cfa76ccdSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8751cfa76ccdSmrg case `$LD -v 2>&1` in 8752cfa76ccdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8753cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8754cfa76ccdSmrg cat <<_LT_EOF 1>&2 8755e96acad6Smrg 8756cfa76ccdSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8757cfa76ccdSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8758cfa76ccdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8759cfa76ccdSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8760cfa76ccdSmrg*** your PATH or compiler configuration so that the native linker is 8761cfa76ccdSmrg*** used, and then restart. 8762e96acad6Smrg 8763cfa76ccdSmrg_LT_EOF 8764cfa76ccdSmrg ;; 8765cfa76ccdSmrg *) 8766cfa76ccdSmrg # For security reasons, it is highly recommended that you always 8767cfa76ccdSmrg # use absolute paths for naming shared libraries, and exclude the 8768cfa76ccdSmrg # DT_RUNPATH tag from executables and libraries. But doing so 8769cfa76ccdSmrg # requires that you compile everything twice, which is a pain. 8770cfa76ccdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8771cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8772cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8773cfa76ccdSmrg _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' 8774cfa76ccdSmrg else 8775cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8776cfa76ccdSmrg fi 8777cfa76ccdSmrg ;; 8778cfa76ccdSmrg esac 8779cfa76ccdSmrg ;; 8780e96acad6Smrg 8781cfa76ccdSmrg sunos4*) 8782cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8783cfa76ccdSmrg wlarc= 8784cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8785cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8786cfa76ccdSmrg ;; 8787e96acad6Smrg 8788cfa76ccdSmrg *) 8789cfa76ccdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8790cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8791cfa76ccdSmrg _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' 8792cfa76ccdSmrg else 8793cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8794cfa76ccdSmrg fi 8795cfa76ccdSmrg ;; 8796cfa76ccdSmrg esac 8797e96acad6Smrg 8798cfa76ccdSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8799cfa76ccdSmrg runpath_var= 8800cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8801cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8802cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8803cfa76ccdSmrg fi 8804cfa76ccdSmrg else 8805cfa76ccdSmrg # PORTME fill in a description of your system's linker (not GNU ld) 8806cfa76ccdSmrg case $host_os in 8807cfa76ccdSmrg aix3*) 8808cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8809cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8810cfa76ccdSmrg _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' 8811cfa76ccdSmrg # Note: this linker hardcodes the directories in LIBPATH if there 8812cfa76ccdSmrg # are no directories specified by -L. 8813cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8814cfa76ccdSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8815cfa76ccdSmrg # Neither direct hardcoding nor static linking is supported with a 8816cfa76ccdSmrg # broken collect2. 8817cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8818cfa76ccdSmrg fi 8819cfa76ccdSmrg ;; 8820e96acad6Smrg 8821cfa76ccdSmrg aix[[4-9]]*) 8822cfa76ccdSmrg if test ia64 = "$host_cpu"; then 8823cfa76ccdSmrg # On IA64, the linker does run time linking by default, so we don't 8824cfa76ccdSmrg # have to do anything special. 8825cfa76ccdSmrg aix_use_runtimelinking=no 8826cfa76ccdSmrg exp_sym_flag='-Bexport' 8827cfa76ccdSmrg no_entry_flag= 8828cfa76ccdSmrg else 8829cfa76ccdSmrg # If we're using GNU nm, then we don't want the "-C" option. 8830cfa76ccdSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8831cfa76ccdSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8832cfa76ccdSmrg # weak defined symbols like other global defined symbols, whereas 8833cfa76ccdSmrg # GNU nm marks them as "W". 8834cfa76ccdSmrg # While the 'weak' keyword is ignored in the Export File, we need 8835cfa76ccdSmrg # it in the Import File for the 'aix-soname' feature, so we have 8836cfa76ccdSmrg # to replace the "-B" option with "-P" for AIX nm. 8837cfa76ccdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8838cfa76ccdSmrg _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' 8839cfa76ccdSmrg else 8840cfa76ccdSmrg _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 == "L") || (\$ 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' 8841cfa76ccdSmrg fi 8842cfa76ccdSmrg aix_use_runtimelinking=no 8843e96acad6Smrg 8844cfa76ccdSmrg # Test if we are trying to use run time linking or normal 8845cfa76ccdSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8846cfa76ccdSmrg # have runtime linking enabled, and use it for executables. 8847cfa76ccdSmrg # For shared libraries, we enable/disable runtime linking 8848cfa76ccdSmrg # depending on the kind of the shared library created - 8849cfa76ccdSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 8850cfa76ccdSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8851cfa76ccdSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 8852cfa76ccdSmrg # lib.a static archive 8853cfa76ccdSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8854cfa76ccdSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 8855cfa76ccdSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8856cfa76ccdSmrg # lib.a(lib.so.V) shared, rtl:no 8857cfa76ccdSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8858cfa76ccdSmrg # lib.a static archive 8859cfa76ccdSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8860cfa76ccdSmrg for ld_flag in $LDFLAGS; do 8861cfa76ccdSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8862cfa76ccdSmrg aix_use_runtimelinking=yes 8863cfa76ccdSmrg break 8864cfa76ccdSmrg fi 8865cfa76ccdSmrg done 8866cfa76ccdSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8867cfa76ccdSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8868cfa76ccdSmrg # so we don't have lib.a shared libs to link our executables. 8869cfa76ccdSmrg # We have to force runtime linking in this case. 8870cfa76ccdSmrg aix_use_runtimelinking=yes 8871cfa76ccdSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8872cfa76ccdSmrg fi 8873cfa76ccdSmrg ;; 8874cfa76ccdSmrg esac 8875cfa76ccdSmrg 8876cfa76ccdSmrg exp_sym_flag='-bexport' 8877cfa76ccdSmrg no_entry_flag='-bnoentry' 8878cfa76ccdSmrg fi 8879e96acad6Smrg 8880cfa76ccdSmrg # When large executables or shared objects are built, AIX ld can 8881cfa76ccdSmrg # have problems creating the table of contents. If linking a library 8882cfa76ccdSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8883cfa76ccdSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8884cfa76ccdSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8885e96acad6Smrg 8886cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='' 8887cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8888cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8889cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8890cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8891cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8892cfa76ccdSmrg case $with_aix_soname,$aix_use_runtimelinking in 8893cfa76ccdSmrg aix,*) ;; # traditional, no import file 8894cfa76ccdSmrg svr4,* | *,yes) # use import file 8895cfa76ccdSmrg # The Import File defines what to hardcode. 8896cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8897cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8898cfa76ccdSmrg ;; 8899cfa76ccdSmrg esac 8900e96acad6Smrg 8901cfa76ccdSmrg if test yes = "$GCC"; then 8902cfa76ccdSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8903cfa76ccdSmrg # We only want to do this on AIX 4.2 and lower, the check 8904cfa76ccdSmrg # below for broken collect2 doesn't work under 4.3+ 8905cfa76ccdSmrg collect2name=`$CC -print-prog-name=collect2` 8906cfa76ccdSmrg if test -f "$collect2name" && 8907cfa76ccdSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8908cfa76ccdSmrg then 8909cfa76ccdSmrg # We have reworked collect2 8910cfa76ccdSmrg : 8911cfa76ccdSmrg else 8912cfa76ccdSmrg # We have old collect2 8913cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8914cfa76ccdSmrg # It fails to find uninstalled libraries when the uninstalled 8915cfa76ccdSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8916cfa76ccdSmrg # to unsupported forces relinking 8917cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8918cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8919cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8920cfa76ccdSmrg fi 8921cfa76ccdSmrg ;; 8922cfa76ccdSmrg esac 8923cfa76ccdSmrg shared_flag='-shared' 8924cfa76ccdSmrg if test yes = "$aix_use_runtimelinking"; then 8925cfa76ccdSmrg shared_flag="$shared_flag "'$wl-G' 8926cfa76ccdSmrg fi 8927cfa76ccdSmrg # Need to ensure runtime linking is disabled for the traditional 8928cfa76ccdSmrg # shared library, or the linker may eventually find shared libraries 8929cfa76ccdSmrg # /with/ Import File - we do not want to mix them. 8930cfa76ccdSmrg shared_flag_aix='-shared' 8931cfa76ccdSmrg shared_flag_svr4='-shared $wl-G' 8932cfa76ccdSmrg else 8933cfa76ccdSmrg # not using gcc 8934cfa76ccdSmrg if test ia64 = "$host_cpu"; then 8935cfa76ccdSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8936cfa76ccdSmrg # chokes on -Wl,-G. The following line is correct: 8937cfa76ccdSmrg shared_flag='-G' 8938cfa76ccdSmrg else 8939cfa76ccdSmrg if test yes = "$aix_use_runtimelinking"; then 8940cfa76ccdSmrg shared_flag='$wl-G' 8941cfa76ccdSmrg else 8942cfa76ccdSmrg shared_flag='$wl-bM:SRE' 8943cfa76ccdSmrg fi 8944cfa76ccdSmrg shared_flag_aix='$wl-bM:SRE' 8945cfa76ccdSmrg shared_flag_svr4='$wl-G' 8946cfa76ccdSmrg fi 8947cfa76ccdSmrg fi 8948e96acad6Smrg 8949cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8950cfa76ccdSmrg # It seems that -bexpall does not export symbols beginning with 8951cfa76ccdSmrg # underscore (_), so it is better to generate a list of symbols to export. 8952cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8953cfa76ccdSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8954cfa76ccdSmrg # Warning - without using the other runtime loading flags (-brtl), 8955cfa76ccdSmrg # -berok will link without error, but may produce a broken library. 8956cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8957cfa76ccdSmrg # Determine the default libpath from the value encoded in an 8958cfa76ccdSmrg # empty executable. 8959cfa76ccdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8960cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8961cfa76ccdSmrg _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 8962cfa76ccdSmrg else 8963cfa76ccdSmrg if test ia64 = "$host_cpu"; then 8964cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8965cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8966cfa76ccdSmrg _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" 8967cfa76ccdSmrg else 8968cfa76ccdSmrg # Determine the default libpath from the value encoded in an 8969cfa76ccdSmrg # empty executable. 8970cfa76ccdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8971cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8972cfa76ccdSmrg # Warning - without using the other run time loading flags, 8973cfa76ccdSmrg # -berok will link without error, but may produce a broken library. 8974cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8975cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8976cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 8977cfa76ccdSmrg # We only use this code for GNU lds that support --whole-archive. 8978cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8979cfa76ccdSmrg else 8980cfa76ccdSmrg # Exported symbols can be pulled into shared objects from archives 8981cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8982cfa76ccdSmrg fi 8983cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8984cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8985cfa76ccdSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8986cfa76ccdSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8987cfa76ccdSmrg if test svr4 != "$with_aix_soname"; then 8988cfa76ccdSmrg # This is similar to how AIX traditionally builds its shared libraries. 8989cfa76ccdSmrg _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' 8990cfa76ccdSmrg fi 8991cfa76ccdSmrg if test aix != "$with_aix_soname"; then 8992cfa76ccdSmrg _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' 8993cfa76ccdSmrg else 8994cfa76ccdSmrg # used by -dlpreopen to get the symbols 8995cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8996cfa76ccdSmrg fi 8997cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8998cfa76ccdSmrg fi 8999cfa76ccdSmrg fi 9000cfa76ccdSmrg ;; 9001e96acad6Smrg 9002cfa76ccdSmrg amigaos*) 9003cfa76ccdSmrg case $host_cpu in 9004cfa76ccdSmrg powerpc) 9005cfa76ccdSmrg # see comment about AmigaOS4 .so support 9006cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9007cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9008cfa76ccdSmrg ;; 9009cfa76ccdSmrg m68k) 9010cfa76ccdSmrg _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)' 9011cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9012cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9013cfa76ccdSmrg ;; 9014cfa76ccdSmrg esac 9015cfa76ccdSmrg ;; 9016e96acad6Smrg 9017cfa76ccdSmrg bsdi[[45]]*) 9018cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9019cfa76ccdSmrg ;; 9020e96acad6Smrg 9021cfa76ccdSmrg cygwin* | mingw* | pw32* | cegcc*) 9022cfa76ccdSmrg # When not using gcc, we currently assume that we are using 9023cfa76ccdSmrg # Microsoft Visual C++ or Intel C++ Compiler. 9024cfa76ccdSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9025cfa76ccdSmrg # no search path for DLLs. 9026cfa76ccdSmrg case $cc_basename in 9027cfa76ccdSmrg cl* | icl*) 9028cfa76ccdSmrg # Native MSVC or ICC 9029cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9030cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9031cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9032cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9033cfa76ccdSmrg # Tell ltmain to make .lib files, not .a files. 9034cfa76ccdSmrg libext=lib 9035cfa76ccdSmrg # Tell ltmain to make .dll files, not .so files. 9036cfa76ccdSmrg shrext_cmds=.dll 9037cfa76ccdSmrg # FIXME: Setting linknames here is a bad hack. 9038cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9039cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9040cfa76ccdSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 9041cfa76ccdSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9042cfa76ccdSmrg else 9043cfa76ccdSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9044cfa76ccdSmrg fi~ 9045cfa76ccdSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9046cfa76ccdSmrg linknames=' 9047cfa76ccdSmrg # The linker will not automatically build a static lib if we build a DLL. 9048cfa76ccdSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9049cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9050cfa76ccdSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9051cfa76ccdSmrg _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' 9052cfa76ccdSmrg # Don't use ranlib 9053cfa76ccdSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9054cfa76ccdSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9055cfa76ccdSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9056cfa76ccdSmrg case $lt_outputfile in 9057cfa76ccdSmrg *.exe|*.EXE) ;; 9058cfa76ccdSmrg *) 9059cfa76ccdSmrg lt_outputfile=$lt_outputfile.exe 9060cfa76ccdSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 9061cfa76ccdSmrg ;; 9062cfa76ccdSmrg esac~ 9063cfa76ccdSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9064cfa76ccdSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9065cfa76ccdSmrg $RM "$lt_outputfile.manifest"; 9066cfa76ccdSmrg fi' 9067cfa76ccdSmrg ;; 9068cfa76ccdSmrg *) 9069cfa76ccdSmrg # Assume MSVC and ICC wrapper 9070cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9071cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9072cfa76ccdSmrg # Tell ltmain to make .lib files, not .a files. 9073cfa76ccdSmrg libext=lib 9074cfa76ccdSmrg # Tell ltmain to make .dll files, not .so files. 9075cfa76ccdSmrg shrext_cmds=.dll 9076cfa76ccdSmrg # FIXME: Setting linknames here is a bad hack. 9077cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9078cfa76ccdSmrg # The linker will automatically build a .lib file if we build a DLL. 9079cfa76ccdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9080cfa76ccdSmrg # FIXME: Should let the user specify the lib program. 9081cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9082cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9083cfa76ccdSmrg ;; 9084cfa76ccdSmrg esac 9085cfa76ccdSmrg ;; 9086e96acad6Smrg 9087cfa76ccdSmrg darwin* | rhapsody*) 9088cfa76ccdSmrg _LT_DARWIN_LINKER_FEATURES($1) 9089cfa76ccdSmrg ;; 9090e96acad6Smrg 9091cfa76ccdSmrg dgux*) 9092cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9093cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9094cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9095cfa76ccdSmrg ;; 9096e96acad6Smrg 9097cfa76ccdSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9098cfa76ccdSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 9099cfa76ccdSmrg # does not break anything, and helps significantly (at the cost of a little 9100cfa76ccdSmrg # extra space). 9101cfa76ccdSmrg freebsd2.2*) 9102cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9103cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9104cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9105cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9106cfa76ccdSmrg ;; 9107e96acad6Smrg 9108cfa76ccdSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9109cfa76ccdSmrg freebsd2.*) 9110cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9111cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9112cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9113cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9114cfa76ccdSmrg ;; 9115e96acad6Smrg 9116cfa76ccdSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9117cfa76ccdSmrg freebsd* | dragonfly* | midnightbsd*) 9118cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9119cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9120cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9121cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9122cfa76ccdSmrg ;; 9123e96acad6Smrg 9124cfa76ccdSmrg hpux9*) 9125cfa76ccdSmrg if test yes = "$GCC"; then 9126cfa76ccdSmrg _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' 9127cfa76ccdSmrg else 9128cfa76ccdSmrg _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' 9129cfa76ccdSmrg fi 9130cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9131cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9132cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9133e96acad6Smrg 9134cfa76ccdSmrg # hardcode_minus_L: Not really in the search PATH, 9135cfa76ccdSmrg # but as the default location of the library. 9136cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9137cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9138cfa76ccdSmrg ;; 9139e96acad6Smrg 9140cfa76ccdSmrg hpux10*) 9141cfa76ccdSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9142cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9143cfa76ccdSmrg else 9144cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9145cfa76ccdSmrg fi 9146cfa76ccdSmrg if test no = "$with_gnu_ld"; then 9147cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9148cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9149cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9150cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9151cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9152cfa76ccdSmrg # hardcode_minus_L: Not really in the search PATH, 9153cfa76ccdSmrg # but as the default location of the library. 9154cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9155cfa76ccdSmrg fi 9156cfa76ccdSmrg ;; 9157e96acad6Smrg 9158cfa76ccdSmrg hpux11*) 9159cfa76ccdSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9160cfa76ccdSmrg case $host_cpu in 9161cfa76ccdSmrg hppa*64*) 9162cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9163cfa76ccdSmrg ;; 9164cfa76ccdSmrg ia64*) 9165cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9166cfa76ccdSmrg ;; 9167cfa76ccdSmrg *) 9168cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9169cfa76ccdSmrg ;; 9170cfa76ccdSmrg esac 9171cfa76ccdSmrg else 9172cfa76ccdSmrg case $host_cpu in 9173cfa76ccdSmrg hppa*64*) 9174cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9175cfa76ccdSmrg ;; 9176cfa76ccdSmrg ia64*) 9177cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9178cfa76ccdSmrg ;; 9179cfa76ccdSmrg *) 9180cfa76ccdSmrg m4_if($1, [], [ 9181cfa76ccdSmrg # Older versions of the 11.00 compiler do not understand -b yet 9182cfa76ccdSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9183cfa76ccdSmrg _LT_LINKER_OPTION([if $CC understands -b], 9184cfa76ccdSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9185cfa76ccdSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9186cfa76ccdSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9187cfa76ccdSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9188cfa76ccdSmrg ;; 9189cfa76ccdSmrg esac 9190cfa76ccdSmrg fi 9191cfa76ccdSmrg if test no = "$with_gnu_ld"; then 9192cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9193cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9194e96acad6Smrg 9195cfa76ccdSmrg case $host_cpu in 9196cfa76ccdSmrg hppa*64*|ia64*) 9197cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9198cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9199cfa76ccdSmrg ;; 9200cfa76ccdSmrg *) 9201cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9202cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9203cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9204e96acad6Smrg 9205cfa76ccdSmrg # hardcode_minus_L: Not really in the search PATH, 9206cfa76ccdSmrg # but as the default location of the library. 9207cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9208cfa76ccdSmrg ;; 9209cfa76ccdSmrg esac 9210cfa76ccdSmrg fi 9211cfa76ccdSmrg ;; 9212e96acad6Smrg 9213cfa76ccdSmrg irix5* | irix6* | nonstopux*) 9214cfa76ccdSmrg if test yes = "$GCC"; then 9215cfa76ccdSmrg _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' 9216cfa76ccdSmrg # Try to use the -exported_symbol ld option, if it does not 9217cfa76ccdSmrg # work, assume that -exports_file does not work either and 9218cfa76ccdSmrg # implicitly export all symbols. 9219cfa76ccdSmrg # This should be the same for all languages, so no per-tag cache variable. 9220cfa76ccdSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9221cfa76ccdSmrg [lt_cv_irix_exported_symbol], 9222cfa76ccdSmrg [save_LDFLAGS=$LDFLAGS 9223cfa76ccdSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9224cfa76ccdSmrg AC_LINK_IFELSE( 9225cfa76ccdSmrg [AC_LANG_SOURCE( 9226cfa76ccdSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9227cfa76ccdSmrg [C++], [[int foo (void) { return 0; }]], 9228cfa76ccdSmrg [Fortran 77], [[ 9229cfa76ccdSmrg subroutine foo 9230cfa76ccdSmrg end]], 9231cfa76ccdSmrg [Fortran], [[ 9232cfa76ccdSmrg subroutine foo 9233cfa76ccdSmrg end]])])], 9234cfa76ccdSmrg [lt_cv_irix_exported_symbol=yes], 9235cfa76ccdSmrg [lt_cv_irix_exported_symbol=no]) 9236cfa76ccdSmrg LDFLAGS=$save_LDFLAGS]) 9237cfa76ccdSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 9238cfa76ccdSmrg _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' 9239e96acad6Smrg fi 9240cfa76ccdSmrg else 9241cfa76ccdSmrg _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' 9242cfa76ccdSmrg _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' 9243cfa76ccdSmrg fi 9244cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9245cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9246cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9247cfa76ccdSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 9248cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9249e96acad6Smrg ;; 9250e96acad6Smrg 9251cfa76ccdSmrg linux*) 9252cfa76ccdSmrg case $cc_basename in 9253cfa76ccdSmrg tcc*) 9254cfa76ccdSmrg # Fabrice Bellard et al's Tiny C Compiler 9255cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9256cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9257cfa76ccdSmrg ;; 9258cfa76ccdSmrg esac 9259cfa76ccdSmrg ;; 9260e96acad6Smrg 9261cfa76ccdSmrg netbsd*) 9262cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9263cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9264cfa76ccdSmrg else 9265cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9266cfa76ccdSmrg fi 9267cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9268cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9269cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9270cfa76ccdSmrg ;; 9271e96acad6Smrg 9272cfa76ccdSmrg newsos6) 9273cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9274cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9275cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9276cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9277cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9278cfa76ccdSmrg ;; 9279e96acad6Smrg 9280cfa76ccdSmrg *nto* | *qnx*) 9281cfa76ccdSmrg ;; 9282e96acad6Smrg 9283cfa76ccdSmrg openbsd* | bitrig*) 9284cfa76ccdSmrg if test -f /usr/libexec/ld.so; then 9285cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9286cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9287cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9288cfa76ccdSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9289cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9290cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9291cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9292cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9293cfa76ccdSmrg else 9294cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9295cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9296e96acad6Smrg fi 9297cfa76ccdSmrg else 9298cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9299cfa76ccdSmrg fi 9300e96acad6Smrg ;; 9301e96acad6Smrg 9302cfa76ccdSmrg os2*) 9303cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9304cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9305cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9306cfa76ccdSmrg shrext_cmds=.dll 9307cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9308cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9309cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9310cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9311cfa76ccdSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9312cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9313cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 9314cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9315cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9316cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9317cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9318cfa76ccdSmrg prefix_cmds="$SED"~ 9319cfa76ccdSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9320cfa76ccdSmrg prefix_cmds="$prefix_cmds -e 1d"; 9321cfa76ccdSmrg fi~ 9322cfa76ccdSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9323cfa76ccdSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9324cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9325cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 9326cfa76ccdSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9327cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9328cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9329cfa76ccdSmrg ;; 9330e96acad6Smrg 9331cfa76ccdSmrg osf3*) 9332cfa76ccdSmrg if test yes = "$GCC"; then 9333cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9334cfa76ccdSmrg _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' 9335cfa76ccdSmrg else 9336cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9337cfa76ccdSmrg _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' 9338cfa76ccdSmrg fi 9339cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9340cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9341cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9342cfa76ccdSmrg ;; 9343e96acad6Smrg 9344cfa76ccdSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9345cfa76ccdSmrg if test yes = "$GCC"; then 9346cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9347cfa76ccdSmrg _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' 9348cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9349cfa76ccdSmrg else 9350cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9351cfa76ccdSmrg _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' 9352cfa76ccdSmrg _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~ 9353cfa76ccdSmrg $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' 9354e96acad6Smrg 9355cfa76ccdSmrg # Both c and cxx compiler support -rpath directly 9356cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9357cfa76ccdSmrg fi 9358cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9359cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9360cfa76ccdSmrg ;; 9361e96acad6Smrg 9362cfa76ccdSmrg solaris*) 9363cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9364cfa76ccdSmrg if test yes = "$GCC"; then 9365cfa76ccdSmrg wlarc='$wl' 9366cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9367cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9368cfa76ccdSmrg $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' 9369cfa76ccdSmrg else 9370cfa76ccdSmrg case `$CC -V 2>&1` in 9371cfa76ccdSmrg *"Compilers 5.0"*) 9372cfa76ccdSmrg wlarc='' 9373cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9374cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9375cfa76ccdSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9376cfa76ccdSmrg ;; 9377cfa76ccdSmrg *) 9378cfa76ccdSmrg wlarc='$wl' 9379cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9380cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9381cfa76ccdSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9382cfa76ccdSmrg ;; 9383cfa76ccdSmrg esac 9384cfa76ccdSmrg fi 9385cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9386cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9387cfa76ccdSmrg case $host_os in 9388cfa76ccdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9389cfa76ccdSmrg *) 9390cfa76ccdSmrg # The compiler driver will combine and reorder linker options, 9391cfa76ccdSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9392cfa76ccdSmrg # but is careful enough not to reorder. 9393cfa76ccdSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9394cfa76ccdSmrg if test yes = "$GCC"; then 9395cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9396cfa76ccdSmrg else 9397cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9398cfa76ccdSmrg fi 9399cfa76ccdSmrg ;; 9400cfa76ccdSmrg esac 9401cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9402cfa76ccdSmrg ;; 9403e96acad6Smrg 9404cfa76ccdSmrg sunos4*) 9405cfa76ccdSmrg if test sequent = "$host_vendor"; then 9406cfa76ccdSmrg # Use $CC to link under sequent, because it throws in some extra .o 9407cfa76ccdSmrg # files that make .init and .fini sections work. 9408cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9409cfa76ccdSmrg else 9410cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9411cfa76ccdSmrg fi 9412cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9413cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9414cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9415cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9416cfa76ccdSmrg ;; 9417e96acad6Smrg 9418cfa76ccdSmrg sysv4) 9419cfa76ccdSmrg case $host_vendor in 9420cfa76ccdSmrg sni) 9421cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9422cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9423cfa76ccdSmrg ;; 9424cfa76ccdSmrg siemens) 9425cfa76ccdSmrg ## LD is ld it makes a PLAMLIB 9426cfa76ccdSmrg ## CC just makes a GrossModule. 9427cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9428cfa76ccdSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9429cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9430cfa76ccdSmrg ;; 9431cfa76ccdSmrg motorola) 9432cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9433cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9434cfa76ccdSmrg ;; 9435cfa76ccdSmrg esac 9436cfa76ccdSmrg runpath_var='LD_RUN_PATH' 9437cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9438e96acad6Smrg ;; 9439e96acad6Smrg 9440cfa76ccdSmrg sysv4.3*) 9441cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9442cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9443cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9444cfa76ccdSmrg ;; 9445e96acad6Smrg 9446cfa76ccdSmrg sysv4*MP*) 9447cfa76ccdSmrg if test -d /usr/nec; then 9448cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9449cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9450cfa76ccdSmrg runpath_var=LD_RUN_PATH 9451cfa76ccdSmrg hardcode_runpath_var=yes 9452cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9453cfa76ccdSmrg fi 9454cfa76ccdSmrg ;; 9455e96acad6Smrg 9456cfa76ccdSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9457cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9458cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9459cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9460cfa76ccdSmrg runpath_var='LD_RUN_PATH' 9461e96acad6Smrg 9462cfa76ccdSmrg if test yes = "$GCC"; then 9463cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9464cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9465cfa76ccdSmrg else 9466cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9467cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9468cfa76ccdSmrg fi 9469cfa76ccdSmrg ;; 9470e96acad6Smrg 9471cfa76ccdSmrg sysv5* | sco3.2v5* | sco5v6*) 9472cfa76ccdSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 9473cfa76ccdSmrg # link with -lc, and that would cause any symbols used from libc to 9474cfa76ccdSmrg # always be unresolved, which means just about no library would 9475cfa76ccdSmrg # ever link correctly. If we're not using GNU ld we use -z text 9476cfa76ccdSmrg # though, which does catch some bad symbols but isn't as heavy-handed 9477cfa76ccdSmrg # as -z defs. 9478cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9479cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9480cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9481cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9482cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9483cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9484cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9485cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9486cfa76ccdSmrg runpath_var='LD_RUN_PATH' 9487e96acad6Smrg 9488cfa76ccdSmrg if test yes = "$GCC"; then 9489cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9490cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9491cfa76ccdSmrg else 9492cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9493cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9494cfa76ccdSmrg fi 9495cfa76ccdSmrg ;; 9496e96acad6Smrg 9497cfa76ccdSmrg uts4*) 9498cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9499cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9500cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9501cfa76ccdSmrg ;; 9502e96acad6Smrg 9503cfa76ccdSmrg *) 9504cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9505cfa76ccdSmrg ;; 9506cfa76ccdSmrg esac 9507e96acad6Smrg 9508cfa76ccdSmrg if test sni = "$host_vendor"; then 9509cfa76ccdSmrg case $host in 9510cfa76ccdSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9511cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9512cfa76ccdSmrg ;; 9513cfa76ccdSmrg esac 9514cfa76ccdSmrg fi 9515cfa76ccdSmrg fi 9516cfa76ccdSmrg]) 9517cfa76ccdSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9518cfa76ccdSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9519e96acad6Smrg 9520cfa76ccdSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9521e96acad6Smrg 9522cfa76ccdSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9523cfa76ccdSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9524cfa76ccdSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 9525cfa76ccdSmrg [The commands to extract the exported symbol list from a shared archive]) 9526e96acad6Smrg 9527cfa76ccdSmrg# 9528cfa76ccdSmrg# Do we need to explicitly link libc? 9529cfa76ccdSmrg# 9530cfa76ccdSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9531cfa76ccdSmrgx|xyes) 9532cfa76ccdSmrg # Assume -lc should be added 9533cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9534e96acad6Smrg 9535cfa76ccdSmrg if test yes,yes = "$GCC,$enable_shared"; then 9536cfa76ccdSmrg case $_LT_TAGVAR(archive_cmds, $1) in 9537cfa76ccdSmrg *'~'*) 9538cfa76ccdSmrg # FIXME: we may have to deal with multi-command sequences. 9539cfa76ccdSmrg ;; 9540cfa76ccdSmrg '$CC '*) 9541cfa76ccdSmrg # Test whether the compiler implicitly links with -lc since on some 9542cfa76ccdSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9543cfa76ccdSmrg # to ld, don't add -lc before -lgcc. 9544cfa76ccdSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9545cfa76ccdSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9546cfa76ccdSmrg [$RM conftest* 9547cfa76ccdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9548e96acad6Smrg 9549cfa76ccdSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9550cfa76ccdSmrg soname=conftest 9551cfa76ccdSmrg lib=conftest 9552cfa76ccdSmrg libobjs=conftest.$ac_objext 9553cfa76ccdSmrg deplibs= 9554cfa76ccdSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9555cfa76ccdSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9556cfa76ccdSmrg compiler_flags=-v 9557cfa76ccdSmrg linker_flags=-v 9558cfa76ccdSmrg verstring= 9559cfa76ccdSmrg output_objdir=. 9560cfa76ccdSmrg libname=conftest 9561cfa76ccdSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9562cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 9563cfa76ccdSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9564cfa76ccdSmrg then 9565cfa76ccdSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9566cfa76ccdSmrg else 9567cfa76ccdSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9568cfa76ccdSmrg fi 9569cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9570cfa76ccdSmrg else 9571cfa76ccdSmrg cat conftest.err 1>&5 9572cfa76ccdSmrg fi 9573cfa76ccdSmrg $RM conftest* 9574cfa76ccdSmrg ]) 9575cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9576cfa76ccdSmrg ;; 9577cfa76ccdSmrg esac 9578cfa76ccdSmrg fi 9579cfa76ccdSmrg ;; 9580cfa76ccdSmrgesac 9581e96acad6Smrg 9582cfa76ccdSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9583cfa76ccdSmrg [Whether or not to add -lc for building shared libraries]) 9584cfa76ccdSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9585cfa76ccdSmrg [enable_shared_with_static_runtimes], [0], 9586cfa76ccdSmrg [Whether or not to disallow shared libs when runtime libs are static]) 9587cfa76ccdSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9588cfa76ccdSmrg [Compiler flag to allow reflexive dlopens]) 9589cfa76ccdSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9590cfa76ccdSmrg [Compiler flag to generate shared objects directly from archives]) 9591cfa76ccdSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 9592cfa76ccdSmrg [Whether the compiler copes with passing no objects directly]) 9593cfa76ccdSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9594cfa76ccdSmrg [Create an old-style archive from a shared archive]) 9595cfa76ccdSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9596cfa76ccdSmrg [Create a temporary old-style archive to link instead of a shared archive]) 9597cfa76ccdSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9598cfa76ccdSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9599cfa76ccdSmrg_LT_TAGDECL([], [module_cmds], [2], 9600cfa76ccdSmrg [Commands used to build a loadable module if different from building 9601cfa76ccdSmrg a shared archive.]) 9602cfa76ccdSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9603cfa76ccdSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 9604cfa76ccdSmrg [Whether we are building with GNU ld or not]) 9605cfa76ccdSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9606cfa76ccdSmrg [Flag that allows shared libraries with undefined symbols to be built]) 9607cfa76ccdSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 9608cfa76ccdSmrg [Flag that enforces no undefined symbols]) 9609cfa76ccdSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9610cfa76ccdSmrg [Flag to hardcode $libdir into a binary during linking. 9611cfa76ccdSmrg This must work even if $libdir does not exist]) 9612cfa76ccdSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9613cfa76ccdSmrg [Whether we need a single "-rpath" flag with a separated argument]) 9614cfa76ccdSmrg_LT_TAGDECL([], [hardcode_direct], [0], 9615cfa76ccdSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9616cfa76ccdSmrg DIR into the resulting binary]) 9617cfa76ccdSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9618cfa76ccdSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9619cfa76ccdSmrg DIR into the resulting binary and the resulting library dependency is 9620cfa76ccdSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9621cfa76ccdSmrg library is relocated]) 9622cfa76ccdSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9623cfa76ccdSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9624cfa76ccdSmrg into the resulting binary]) 9625cfa76ccdSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9626cfa76ccdSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9627cfa76ccdSmrg into the resulting binary]) 9628cfa76ccdSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 9629cfa76ccdSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 9630cfa76ccdSmrg into the library and all subsequent libraries and executables linked 9631cfa76ccdSmrg against it]) 9632cfa76ccdSmrg_LT_TAGDECL([], [inherit_rpath], [0], 9633cfa76ccdSmrg [Set to yes if linker adds runtime paths of dependent libraries 9634cfa76ccdSmrg to runtime path list]) 9635cfa76ccdSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 9636cfa76ccdSmrg [Whether libtool must link a program against all its dependency libraries]) 9637cfa76ccdSmrg_LT_TAGDECL([], [always_export_symbols], [0], 9638cfa76ccdSmrg [Set to "yes" if exported symbols are required]) 9639cfa76ccdSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9640cfa76ccdSmrg [The commands to list exported symbols]) 9641cfa76ccdSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 9642cfa76ccdSmrg [Symbols that should not be listed in the preloaded symbols]) 9643cfa76ccdSmrg_LT_TAGDECL([], [include_expsyms], [1], 9644cfa76ccdSmrg [Symbols that must always be exported]) 9645cfa76ccdSmrg_LT_TAGDECL([], [prelink_cmds], [2], 9646cfa76ccdSmrg [Commands necessary for linking programs (against libraries) with templates]) 9647cfa76ccdSmrg_LT_TAGDECL([], [postlink_cmds], [2], 9648cfa76ccdSmrg [Commands necessary for finishing linking programs]) 9649cfa76ccdSmrg_LT_TAGDECL([], [file_list_spec], [1], 9650cfa76ccdSmrg [Specify filename containing input files]) 9651cfa76ccdSmrgdnl FIXME: Not yet implemented 9652cfa76ccdSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9653cfa76ccdSmrgdnl [Compiler flag to generate thread safe objects]) 9654cfa76ccdSmrg])# _LT_LINKER_SHLIBS 9655e96acad6Smrg 9656e96acad6Smrg 9657cfa76ccdSmrg# _LT_LANG_C_CONFIG([TAG]) 9658cfa76ccdSmrg# ------------------------ 9659cfa76ccdSmrg# Ensure that the configuration variables for a C compiler are suitably 9660cfa76ccdSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9661cfa76ccdSmrg# the compiler configuration to 'libtool'. 9662cfa76ccdSmrgm4_defun([_LT_LANG_C_CONFIG], 9663cfa76ccdSmrg[m4_require([_LT_DECL_EGREP])dnl 9664cfa76ccdSmrglt_save_CC=$CC 9665cfa76ccdSmrgAC_LANG_PUSH(C) 9666e96acad6Smrg 9667cfa76ccdSmrg# Source file extension for C test sources. 9668cfa76ccdSmrgac_ext=c 9669e96acad6Smrg 9670cfa76ccdSmrg# Object file extension for compiled C test sources. 9671cfa76ccdSmrgobjext=o 9672cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 9673e96acad6Smrg 9674cfa76ccdSmrg# Code to be used in simple compile tests 9675cfa76ccdSmrglt_simple_compile_test_code="int some_variable = 0;" 9676e96acad6Smrg 9677cfa76ccdSmrg# Code to be used in simple link tests 9678cfa76ccdSmrglt_simple_link_test_code='int main(){return(0);}' 9679e96acad6Smrg 9680cfa76ccdSmrg_LT_TAG_COMPILER 9681cfa76ccdSmrg# Save the default compiler, since it gets overwritten when the other 9682cfa76ccdSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9683cfa76ccdSmrgcompiler_DEFAULT=$CC 9684e96acad6Smrg 9685cfa76ccdSmrg# save warnings/boilerplate of simple test code 9686cfa76ccdSmrg_LT_COMPILER_BOILERPLATE 9687cfa76ccdSmrg_LT_LINKER_BOILERPLATE 9688e96acad6Smrg 9689cfa76ccdSmrgif test -n "$compiler"; then 9690cfa76ccdSmrg _LT_COMPILER_NO_RTTI($1) 9691cfa76ccdSmrg _LT_COMPILER_PIC($1) 9692cfa76ccdSmrg _LT_COMPILER_C_O($1) 9693cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 9694cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 9695cfa76ccdSmrg _LT_SYS_DYNAMIC_LINKER($1) 9696cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9697cfa76ccdSmrg LT_SYS_DLOPEN_SELF 9698cfa76ccdSmrg _LT_CMD_STRIPLIB 9699e96acad6Smrg 9700cfa76ccdSmrg # Report what library types will actually be built 9701cfa76ccdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9702cfa76ccdSmrg AC_MSG_RESULT([$can_build_shared]) 9703e96acad6Smrg 9704cfa76ccdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9705cfa76ccdSmrg test no = "$can_build_shared" && enable_shared=no 9706e96acad6Smrg 9707cfa76ccdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9708cfa76ccdSmrg # are all built from PIC. 9709cfa76ccdSmrg case $host_os in 9710cfa76ccdSmrg aix3*) 9711cfa76ccdSmrg test yes = "$enable_shared" && enable_static=no 9712cfa76ccdSmrg if test -n "$RANLIB"; then 9713cfa76ccdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9714cfa76ccdSmrg postinstall_cmds='$RANLIB $lib' 9715cfa76ccdSmrg fi 9716cfa76ccdSmrg ;; 9717e96acad6Smrg 9718cfa76ccdSmrg aix[[4-9]]*) 9719cfa76ccdSmrg if test ia64 != "$host_cpu"; then 9720cfa76ccdSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9721cfa76ccdSmrg yes,aix,yes) ;; # shared object as lib.so file only 9722cfa76ccdSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 9723cfa76ccdSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9724cfa76ccdSmrg esac 9725cfa76ccdSmrg fi 9726cfa76ccdSmrg ;; 9727cfa76ccdSmrg esac 9728cfa76ccdSmrg AC_MSG_RESULT([$enable_shared]) 9729e96acad6Smrg 9730cfa76ccdSmrg AC_MSG_CHECKING([whether to build static libraries]) 9731cfa76ccdSmrg # Make sure either enable_shared or enable_static is yes. 9732cfa76ccdSmrg test yes = "$enable_shared" || enable_static=yes 9733cfa76ccdSmrg AC_MSG_RESULT([$enable_static]) 9734e96acad6Smrg 9735cfa76ccdSmrg _LT_CONFIG($1) 9736cfa76ccdSmrgfi 9737cfa76ccdSmrgAC_LANG_POP 9738cfa76ccdSmrgCC=$lt_save_CC 9739cfa76ccdSmrg])# _LT_LANG_C_CONFIG 9740e96acad6Smrg 9741e96acad6Smrg 9742cfa76ccdSmrg# _LT_LANG_CXX_CONFIG([TAG]) 9743cfa76ccdSmrg# -------------------------- 9744cfa76ccdSmrg# Ensure that the configuration variables for a C++ compiler are suitably 9745cfa76ccdSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9746cfa76ccdSmrg# the compiler configuration to 'libtool'. 9747cfa76ccdSmrgm4_defun([_LT_LANG_CXX_CONFIG], 9748cfa76ccdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9749cfa76ccdSmrgm4_require([_LT_DECL_EGREP])dnl 9750cfa76ccdSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9751cfa76ccdSmrgif test -n "$CXX" && ( test no != "$CXX" && 9752cfa76ccdSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9753cfa76ccdSmrg (test g++ != "$CXX"))); then 9754cfa76ccdSmrg AC_PROG_CXXCPP 9755cfa76ccdSmrgelse 9756cfa76ccdSmrg _lt_caught_CXX_error=yes 9757cfa76ccdSmrgfi 9758e96acad6Smrg 9759cfa76ccdSmrgAC_LANG_PUSH(C++) 9760cfa76ccdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9761cfa76ccdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9762cfa76ccdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9763cfa76ccdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9764cfa76ccdSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 9765cfa76ccdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9766cfa76ccdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9767cfa76ccdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9768cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9769cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9770cfa76ccdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9771cfa76ccdSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9772cfa76ccdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9773cfa76ccdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9774cfa76ccdSmrg_LT_TAGVAR(module_cmds, $1)= 9775cfa76ccdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9776cfa76ccdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9777cfa76ccdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9778cfa76ccdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9779cfa76ccdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9780cfa76ccdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9781cfa76ccdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9782cfa76ccdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9783e96acad6Smrg 9784cfa76ccdSmrg# Source file extension for C++ test sources. 9785cfa76ccdSmrgac_ext=cpp 9786e96acad6Smrg 9787cfa76ccdSmrg# Object file extension for compiled C++ test sources. 9788cfa76ccdSmrgobjext=o 9789cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 9790e96acad6Smrg 9791cfa76ccdSmrg# No sense in running all these tests if we already determined that 9792cfa76ccdSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 9793cfa76ccdSmrg# are currently assumed to apply to all compilers on this platform, 9794cfa76ccdSmrg# and will be corrupted by setting them based on a non-working compiler. 9795cfa76ccdSmrgif test yes != "$_lt_caught_CXX_error"; then 9796cfa76ccdSmrg # Code to be used in simple compile tests 9797cfa76ccdSmrg lt_simple_compile_test_code="int some_variable = 0;" 9798e96acad6Smrg 9799cfa76ccdSmrg # Code to be used in simple link tests 9800cfa76ccdSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9801e96acad6Smrg 9802cfa76ccdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9803cfa76ccdSmrg _LT_TAG_COMPILER 9804e96acad6Smrg 9805cfa76ccdSmrg # save warnings/boilerplate of simple test code 9806cfa76ccdSmrg _LT_COMPILER_BOILERPLATE 9807cfa76ccdSmrg _LT_LINKER_BOILERPLATE 9808e96acad6Smrg 9809cfa76ccdSmrg # Allow CC to be a program name with arguments. 9810cfa76ccdSmrg lt_save_CC=$CC 9811cfa76ccdSmrg lt_save_CFLAGS=$CFLAGS 9812cfa76ccdSmrg lt_save_LD=$LD 9813cfa76ccdSmrg lt_save_GCC=$GCC 9814cfa76ccdSmrg GCC=$GXX 9815cfa76ccdSmrg lt_save_with_gnu_ld=$with_gnu_ld 9816cfa76ccdSmrg lt_save_path_LD=$lt_cv_path_LD 9817cfa76ccdSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9818cfa76ccdSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9819cfa76ccdSmrg else 9820cfa76ccdSmrg $as_unset lt_cv_prog_gnu_ld 9821cfa76ccdSmrg fi 9822cfa76ccdSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 9823cfa76ccdSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 9824cfa76ccdSmrg else 9825cfa76ccdSmrg $as_unset lt_cv_path_LD 9826cfa76ccdSmrg fi 9827cfa76ccdSmrg test -z "${LDCXX+set}" || LD=$LDCXX 9828cfa76ccdSmrg CC=${CXX-"c++"} 9829cfa76ccdSmrg CFLAGS=$CXXFLAGS 9830cfa76ccdSmrg compiler=$CC 9831cfa76ccdSmrg _LT_TAGVAR(compiler, $1)=$CC 9832cfa76ccdSmrg _LT_CC_BASENAME([$compiler]) 9833e96acad6Smrg 9834cfa76ccdSmrg if test -n "$compiler"; then 9835cfa76ccdSmrg # We don't want -fno-exception when compiling C++ code, so set the 9836cfa76ccdSmrg # no_builtin_flag separately 9837cfa76ccdSmrg if test yes = "$GXX"; then 9838cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9839cfa76ccdSmrg else 9840cfa76ccdSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9841cfa76ccdSmrg fi 9842e96acad6Smrg 9843cfa76ccdSmrg if test yes = "$GXX"; then 9844cfa76ccdSmrg # Set up default GNU C++ configuration 9845e96acad6Smrg 9846cfa76ccdSmrg LT_PATH_LD 9847e96acad6Smrg 9848cfa76ccdSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9849cfa76ccdSmrg # archiving commands below assume that GNU ld is being used. 9850cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 9851cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9852cfa76ccdSmrg _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' 9853dbbd9e4bSmacallan 9854cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9855cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9856e96acad6Smrg 9857cfa76ccdSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 9858cfa76ccdSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9859cfa76ccdSmrg # investigate it a little bit more. (MM) 9860cfa76ccdSmrg wlarc='$wl' 9861e96acad6Smrg 9862cfa76ccdSmrg # ancient GNU ld didn't support --whole-archive et. al. 9863cfa76ccdSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9864cfa76ccdSmrg $GREP 'no-whole-archive' > /dev/null; then 9865cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9866cfa76ccdSmrg else 9867cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9868cfa76ccdSmrg fi 9869cfa76ccdSmrg else 9870cfa76ccdSmrg with_gnu_ld=no 9871cfa76ccdSmrg wlarc= 9872e96acad6Smrg 9873cfa76ccdSmrg # A generic and very simple default shared library creation 9874cfa76ccdSmrg # command for GNU C++ for the case where it uses the native 9875cfa76ccdSmrg # linker, instead of GNU ld. If possible, this setting should 9876cfa76ccdSmrg # overridden to take advantage of the native linker features on 9877cfa76ccdSmrg # the platform it is being used on. 9878cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9879cfa76ccdSmrg fi 9880cfa76ccdSmrg 9881cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 9882cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 9883cfa76ccdSmrg # linking a shared library. 9884cfa76ccdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9885cfa76ccdSmrg 9886cfa76ccdSmrg else 9887cfa76ccdSmrg GXX=no 9888cfa76ccdSmrg with_gnu_ld=no 9889cfa76ccdSmrg wlarc= 9890cfa76ccdSmrg fi 9891cfa76ccdSmrg 9892cfa76ccdSmrg # PORTME: fill in a description of your system's C++ link characteristics 9893cfa76ccdSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9894cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9895cfa76ccdSmrg case $host_os in 9896cfa76ccdSmrg aix3*) 9897cfa76ccdSmrg # FIXME: insert proper C++ library support 9898cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9899cfa76ccdSmrg ;; 9900cfa76ccdSmrg aix[[4-9]]*) 9901cfa76ccdSmrg if test ia64 = "$host_cpu"; then 9902cfa76ccdSmrg # On IA64, the linker does run time linking by default, so we don't 9903cfa76ccdSmrg # have to do anything special. 9904cfa76ccdSmrg aix_use_runtimelinking=no 9905cfa76ccdSmrg exp_sym_flag='-Bexport' 9906cfa76ccdSmrg no_entry_flag= 9907cfa76ccdSmrg else 9908cfa76ccdSmrg aix_use_runtimelinking=no 9909e96acad6Smrg 9910cfa76ccdSmrg # Test if we are trying to use run time linking or normal 9911cfa76ccdSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9912cfa76ccdSmrg # have runtime linking enabled, and use it for executables. 9913cfa76ccdSmrg # For shared libraries, we enable/disable runtime linking 9914cfa76ccdSmrg # depending on the kind of the shared library created - 9915cfa76ccdSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 9916cfa76ccdSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9917cfa76ccdSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 9918cfa76ccdSmrg # lib.a static archive 9919cfa76ccdSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9920cfa76ccdSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 9921cfa76ccdSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9922cfa76ccdSmrg # lib.a(lib.so.V) shared, rtl:no 9923cfa76ccdSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9924cfa76ccdSmrg # lib.a static archive 9925cfa76ccdSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9926cfa76ccdSmrg for ld_flag in $LDFLAGS; do 9927cfa76ccdSmrg case $ld_flag in 9928cfa76ccdSmrg *-brtl*) 9929cfa76ccdSmrg aix_use_runtimelinking=yes 9930cfa76ccdSmrg break 9931cfa76ccdSmrg ;; 9932cfa76ccdSmrg esac 9933cfa76ccdSmrg done 9934cfa76ccdSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9935cfa76ccdSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9936cfa76ccdSmrg # so we don't have lib.a shared libs to link our executables. 9937cfa76ccdSmrg # We have to force runtime linking in this case. 9938cfa76ccdSmrg aix_use_runtimelinking=yes 9939cfa76ccdSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9940cfa76ccdSmrg fi 9941cfa76ccdSmrg ;; 9942cfa76ccdSmrg esac 9943e96acad6Smrg 9944cfa76ccdSmrg exp_sym_flag='-bexport' 9945cfa76ccdSmrg no_entry_flag='-bnoentry' 9946cfa76ccdSmrg fi 9947dbbd9e4bSmacallan 9948cfa76ccdSmrg # When large executables or shared objects are built, AIX ld can 9949cfa76ccdSmrg # have problems creating the table of contents. If linking a library 9950cfa76ccdSmrg # or program results in "error TOC overflow" add -mminimal-toc to 9951cfa76ccdSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9952cfa76ccdSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9953e96acad6Smrg 9954cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='' 9955cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9956cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9957cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9958cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9959cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9960cfa76ccdSmrg case $with_aix_soname,$aix_use_runtimelinking in 9961cfa76ccdSmrg aix,*) ;; # no import file 9962cfa76ccdSmrg svr4,* | *,yes) # use import file 9963cfa76ccdSmrg # The Import File defines what to hardcode. 9964cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9965cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9966cfa76ccdSmrg ;; 9967cfa76ccdSmrg esac 9968dbbd9e4bSmacallan 9969cfa76ccdSmrg if test yes = "$GXX"; then 9970cfa76ccdSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9971cfa76ccdSmrg # We only want to do this on AIX 4.2 and lower, the check 9972cfa76ccdSmrg # below for broken collect2 doesn't work under 4.3+ 9973cfa76ccdSmrg collect2name=`$CC -print-prog-name=collect2` 9974cfa76ccdSmrg if test -f "$collect2name" && 9975cfa76ccdSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9976cfa76ccdSmrg then 9977cfa76ccdSmrg # We have reworked collect2 9978cfa76ccdSmrg : 9979cfa76ccdSmrg else 9980cfa76ccdSmrg # We have old collect2 9981cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9982cfa76ccdSmrg # It fails to find uninstalled libraries when the uninstalled 9983cfa76ccdSmrg # path is not listed in the libpath. Setting hardcode_minus_L 9984cfa76ccdSmrg # to unsupported forces relinking 9985cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9986cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9987cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9988cfa76ccdSmrg fi 9989cfa76ccdSmrg esac 9990cfa76ccdSmrg shared_flag='-shared' 9991cfa76ccdSmrg if test yes = "$aix_use_runtimelinking"; then 9992cfa76ccdSmrg shared_flag=$shared_flag' $wl-G' 9993cfa76ccdSmrg fi 9994cfa76ccdSmrg # Need to ensure runtime linking is disabled for the traditional 9995cfa76ccdSmrg # shared library, or the linker may eventually find shared libraries 9996cfa76ccdSmrg # /with/ Import File - we do not want to mix them. 9997cfa76ccdSmrg shared_flag_aix='-shared' 9998cfa76ccdSmrg shared_flag_svr4='-shared $wl-G' 9999cfa76ccdSmrg else 10000cfa76ccdSmrg # not using gcc 10001cfa76ccdSmrg if test ia64 = "$host_cpu"; then 10002cfa76ccdSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10003cfa76ccdSmrg # chokes on -Wl,-G. The following line is correct: 10004cfa76ccdSmrg shared_flag='-G' 10005cfa76ccdSmrg else 10006cfa76ccdSmrg if test yes = "$aix_use_runtimelinking"; then 10007cfa76ccdSmrg shared_flag='$wl-G' 10008cfa76ccdSmrg else 10009cfa76ccdSmrg shared_flag='$wl-bM:SRE' 10010cfa76ccdSmrg fi 10011cfa76ccdSmrg shared_flag_aix='$wl-bM:SRE' 10012cfa76ccdSmrg shared_flag_svr4='$wl-G' 10013cfa76ccdSmrg fi 10014cfa76ccdSmrg fi 10015dbbd9e4bSmacallan 10016cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10017cfa76ccdSmrg # It seems that -bexpall does not export symbols beginning with 10018cfa76ccdSmrg # underscore (_), so it is better to generate a list of symbols to 10019cfa76ccdSmrg # export. 10020cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 10021cfa76ccdSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10022cfa76ccdSmrg # Warning - without using the other runtime loading flags (-brtl), 10023cfa76ccdSmrg # -berok will link without error, but may produce a broken library. 10024cfa76ccdSmrg # The "-G" linker flag allows undefined symbols. 10025cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10026cfa76ccdSmrg # Determine the default libpath from the value encoded in an empty 10027cfa76ccdSmrg # executable. 10028cfa76ccdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 10029cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10030dbbd9e4bSmacallan 10031cfa76ccdSmrg _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 10032cfa76ccdSmrg else 10033cfa76ccdSmrg if test ia64 = "$host_cpu"; then 10034cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10035cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10036cfa76ccdSmrg _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" 10037cfa76ccdSmrg else 10038cfa76ccdSmrg # Determine the default libpath from the value encoded in an 10039cfa76ccdSmrg # empty executable. 10040cfa76ccdSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 10041cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10042cfa76ccdSmrg # Warning - without using the other run time loading flags, 10043cfa76ccdSmrg # -berok will link without error, but may produce a broken library. 10044cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10045cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10046cfa76ccdSmrg if test yes = "$with_gnu_ld"; then 10047cfa76ccdSmrg # We only use this code for GNU lds that support --whole-archive. 10048cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10049cfa76ccdSmrg else 10050cfa76ccdSmrg # Exported symbols can be pulled into shared objects from archives 10051cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10052cfa76ccdSmrg fi 10053cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10054cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10055cfa76ccdSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10056cfa76ccdSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10057cfa76ccdSmrg if test svr4 != "$with_aix_soname"; then 10058cfa76ccdSmrg # This is similar to how AIX traditionally builds its shared 10059cfa76ccdSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10060cfa76ccdSmrg _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' 10061cfa76ccdSmrg fi 10062cfa76ccdSmrg if test aix != "$with_aix_soname"; then 10063cfa76ccdSmrg _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' 10064cfa76ccdSmrg else 10065cfa76ccdSmrg # used by -dlpreopen to get the symbols 10066cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10067cfa76ccdSmrg fi 10068cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10069cfa76ccdSmrg fi 10070cfa76ccdSmrg fi 10071cfa76ccdSmrg ;; 10072dbbd9e4bSmacallan 10073cfa76ccdSmrg beos*) 10074cfa76ccdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10075cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10076cfa76ccdSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10077cfa76ccdSmrg # support --undefined. This deserves some investigation. FIXME 10078cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10079cfa76ccdSmrg else 10080cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10081cfa76ccdSmrg fi 10082cfa76ccdSmrg ;; 10083dbbd9e4bSmacallan 10084cfa76ccdSmrg chorus*) 10085cfa76ccdSmrg case $cc_basename in 10086cfa76ccdSmrg *) 10087cfa76ccdSmrg # FIXME: insert proper C++ library support 10088cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10089cfa76ccdSmrg ;; 10090cfa76ccdSmrg esac 10091cfa76ccdSmrg ;; 10092dbbd9e4bSmacallan 10093cfa76ccdSmrg cygwin* | mingw* | pw32* | cegcc*) 10094cfa76ccdSmrg case $GXX,$cc_basename in 10095cfa76ccdSmrg ,cl* | no,cl* | ,icl* | no,icl*) 10096cfa76ccdSmrg # Native MSVC or ICC 10097cfa76ccdSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10098cfa76ccdSmrg # no search path for DLLs. 10099cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10100cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10101cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 10102cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10103cfa76ccdSmrg # Tell ltmain to make .lib files, not .a files. 10104cfa76ccdSmrg libext=lib 10105cfa76ccdSmrg # Tell ltmain to make .dll files, not .so files. 10106cfa76ccdSmrg shrext_cmds=.dll 10107cfa76ccdSmrg # FIXME: Setting linknames here is a bad hack. 10108cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10109cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10110cfa76ccdSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 10111cfa76ccdSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10112cfa76ccdSmrg else 10113cfa76ccdSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10114cfa76ccdSmrg fi~ 10115cfa76ccdSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10116cfa76ccdSmrg linknames=' 10117cfa76ccdSmrg # The linker will not automatically build a static lib if we build a DLL. 10118cfa76ccdSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10119cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10120cfa76ccdSmrg # Don't use ranlib 10121cfa76ccdSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10122cfa76ccdSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10123cfa76ccdSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10124cfa76ccdSmrg case $lt_outputfile in 10125cfa76ccdSmrg *.exe|*.EXE) ;; 10126cfa76ccdSmrg *) 10127cfa76ccdSmrg lt_outputfile=$lt_outputfile.exe 10128cfa76ccdSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 10129cfa76ccdSmrg ;; 10130cfa76ccdSmrg esac~ 10131cfa76ccdSmrg func_to_tool_file "$lt_outputfile"~ 10132cfa76ccdSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10133cfa76ccdSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10134cfa76ccdSmrg $RM "$lt_outputfile.manifest"; 10135cfa76ccdSmrg fi' 10136cfa76ccdSmrg ;; 10137cfa76ccdSmrg *) 10138cfa76ccdSmrg # g++ 10139cfa76ccdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10140cfa76ccdSmrg # as there is no search path for DLLs. 10141cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10142cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10143cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10144cfa76ccdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 10145cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10146dbbd9e4bSmacallan 10147cfa76ccdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10148cfa76ccdSmrg _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' 10149cfa76ccdSmrg # If the export-symbols file already is a .def file, use it as 10150cfa76ccdSmrg # is; otherwise, prepend EXPORTS... 10151cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10152cfa76ccdSmrg cp $export_symbols $output_objdir/$soname.def; 10153cfa76ccdSmrg else 10154cfa76ccdSmrg echo EXPORTS > $output_objdir/$soname.def; 10155cfa76ccdSmrg cat $export_symbols >> $output_objdir/$soname.def; 10156cfa76ccdSmrg fi~ 10157cfa76ccdSmrg $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' 10158cfa76ccdSmrg else 10159cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10160cfa76ccdSmrg fi 10161cfa76ccdSmrg ;; 10162cfa76ccdSmrg esac 10163cfa76ccdSmrg ;; 10164cfa76ccdSmrg darwin* | rhapsody*) 10165cfa76ccdSmrg _LT_DARWIN_LINKER_FEATURES($1) 10166cfa76ccdSmrg ;; 10167dbbd9e4bSmacallan 10168cfa76ccdSmrg os2*) 10169cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10170cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10171cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10172cfa76ccdSmrg shrext_cmds=.dll 10173cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10174cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10175cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10176cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10177cfa76ccdSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10178cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10179cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 10180cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10181cfa76ccdSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10182cfa76ccdSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10183cfa76ccdSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10184cfa76ccdSmrg prefix_cmds="$SED"~ 10185cfa76ccdSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10186cfa76ccdSmrg prefix_cmds="$prefix_cmds -e 1d"; 10187cfa76ccdSmrg fi~ 10188cfa76ccdSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10189cfa76ccdSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10190cfa76ccdSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10191cfa76ccdSmrg emximp -o $lib $output_objdir/$libname.def' 10192cfa76ccdSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10193cfa76ccdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10194cfa76ccdSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10195cfa76ccdSmrg ;; 10196dbbd9e4bSmacallan 10197cfa76ccdSmrg dgux*) 10198cfa76ccdSmrg case $cc_basename in 10199cfa76ccdSmrg ec++*) 10200cfa76ccdSmrg # FIXME: insert proper C++ library support 10201cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10202cfa76ccdSmrg ;; 10203cfa76ccdSmrg ghcx*) 10204cfa76ccdSmrg # Green Hills C++ Compiler 10205cfa76ccdSmrg # FIXME: insert proper C++ library support 10206cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10207cfa76ccdSmrg ;; 10208cfa76ccdSmrg *) 10209cfa76ccdSmrg # FIXME: insert proper C++ library support 10210cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10211cfa76ccdSmrg ;; 10212cfa76ccdSmrg esac 10213cfa76ccdSmrg ;; 10214dbbd9e4bSmacallan 10215cfa76ccdSmrg freebsd2.*) 10216cfa76ccdSmrg # C++ shared libraries reported to be fairly broken before 10217cfa76ccdSmrg # switch to ELF 10218cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10219cfa76ccdSmrg ;; 10220dbbd9e4bSmacallan 10221cfa76ccdSmrg freebsd-elf*) 10222cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10223cfa76ccdSmrg ;; 10224dbbd9e4bSmacallan 10225cfa76ccdSmrg freebsd* | dragonfly* | midnightbsd*) 10226cfa76ccdSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10227cfa76ccdSmrg # conventions 10228cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10229cfa76ccdSmrg ;; 10230dbbd9e4bSmacallan 10231cfa76ccdSmrg haiku*) 10232cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10233cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10234cfa76ccdSmrg ;; 10235dbbd9e4bSmacallan 10236cfa76ccdSmrg hpux9*) 10237cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10238cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10239cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10240cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10241cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10242cfa76ccdSmrg # but as the default 10243cfa76ccdSmrg # location of the library. 10244dbbd9e4bSmacallan 10245cfa76ccdSmrg case $cc_basename in 10246cfa76ccdSmrg CC*) 10247cfa76ccdSmrg # FIXME: insert proper C++ library support 10248cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10249cfa76ccdSmrg ;; 10250cfa76ccdSmrg aCC*) 10251cfa76ccdSmrg _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' 10252cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10253cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10254cfa76ccdSmrg # linking a shared library. 10255cfa76ccdSmrg # 10256cfa76ccdSmrg # There doesn't appear to be a way to prevent this compiler from 10257cfa76ccdSmrg # explicitly linking system object files so we need to strip them 10258cfa76ccdSmrg # from the output so that they don't get included in the library 10259cfa76ccdSmrg # dependencies. 10260cfa76ccdSmrg 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"' 10261cfa76ccdSmrg ;; 10262cfa76ccdSmrg *) 10263cfa76ccdSmrg if test yes = "$GXX"; then 10264cfa76ccdSmrg _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' 10265cfa76ccdSmrg else 10266cfa76ccdSmrg # FIXME: insert proper C++ library support 10267cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10268cfa76ccdSmrg fi 10269cfa76ccdSmrg ;; 10270cfa76ccdSmrg esac 10271cfa76ccdSmrg ;; 10272dbbd9e4bSmacallan 10273cfa76ccdSmrg hpux10*|hpux11*) 10274cfa76ccdSmrg if test no = "$with_gnu_ld"; then 10275cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10276cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10277e96acad6Smrg 10278cfa76ccdSmrg case $host_cpu in 10279cfa76ccdSmrg hppa*64*|ia64*) 10280cfa76ccdSmrg ;; 10281cfa76ccdSmrg *) 10282cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10283cfa76ccdSmrg ;; 10284cfa76ccdSmrg esac 10285cfa76ccdSmrg fi 10286cfa76ccdSmrg case $host_cpu in 10287cfa76ccdSmrg hppa*64*|ia64*) 10288cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10289cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10290cfa76ccdSmrg ;; 10291cfa76ccdSmrg *) 10292cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10293cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10294cfa76ccdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10295cfa76ccdSmrg # but as the default 10296cfa76ccdSmrg # location of the library. 10297cfa76ccdSmrg ;; 10298cfa76ccdSmrg esac 10299e96acad6Smrg 10300cfa76ccdSmrg case $cc_basename in 10301cfa76ccdSmrg CC*) 10302cfa76ccdSmrg # FIXME: insert proper C++ library support 10303cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10304cfa76ccdSmrg ;; 10305cfa76ccdSmrg aCC*) 10306cfa76ccdSmrg case $host_cpu in 10307cfa76ccdSmrg hppa*64*) 10308cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10309cfa76ccdSmrg ;; 10310cfa76ccdSmrg ia64*) 10311cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10312cfa76ccdSmrg ;; 10313cfa76ccdSmrg *) 10314cfa76ccdSmrg _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' 10315cfa76ccdSmrg ;; 10316cfa76ccdSmrg esac 10317cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10318cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10319cfa76ccdSmrg # linking a shared library. 10320cfa76ccdSmrg # 10321cfa76ccdSmrg # There doesn't appear to be a way to prevent this compiler from 10322cfa76ccdSmrg # explicitly linking system object files so we need to strip them 10323cfa76ccdSmrg # from the output so that they don't get included in the library 10324cfa76ccdSmrg # dependencies. 10325cfa76ccdSmrg 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"' 10326cfa76ccdSmrg ;; 10327cfa76ccdSmrg *) 10328cfa76ccdSmrg if test yes = "$GXX"; then 10329cfa76ccdSmrg if test no = "$with_gnu_ld"; then 10330cfa76ccdSmrg case $host_cpu in 10331cfa76ccdSmrg hppa*64*) 10332cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10333cfa76ccdSmrg ;; 10334cfa76ccdSmrg ia64*) 10335cfa76ccdSmrg _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' 10336cfa76ccdSmrg ;; 10337cfa76ccdSmrg *) 10338cfa76ccdSmrg _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' 10339cfa76ccdSmrg ;; 10340cfa76ccdSmrg esac 10341cfa76ccdSmrg fi 10342cfa76ccdSmrg else 10343cfa76ccdSmrg # FIXME: insert proper C++ library support 10344cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10345cfa76ccdSmrg fi 10346cfa76ccdSmrg ;; 10347cfa76ccdSmrg esac 10348cfa76ccdSmrg ;; 10349e96acad6Smrg 10350cfa76ccdSmrg interix[[3-9]]*) 10351cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10352cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10353cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10354cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10355cfa76ccdSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10356cfa76ccdSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10357cfa76ccdSmrg # default) and relocated if they conflict, which is a slow very memory 10358cfa76ccdSmrg # consuming and fragmenting process. To avoid this, we pick a random, 10359cfa76ccdSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10360cfa76ccdSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10361cfa76ccdSmrg _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' 10362cfa76ccdSmrg _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' 10363cfa76ccdSmrg ;; 10364cfa76ccdSmrg irix5* | irix6*) 10365cfa76ccdSmrg case $cc_basename in 10366cfa76ccdSmrg CC*) 10367cfa76ccdSmrg # SGI C++ 10368cfa76ccdSmrg _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' 10369e96acad6Smrg 10370cfa76ccdSmrg # Archives containing C++ object files must be created using 10371cfa76ccdSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10372cfa76ccdSmrg # necessary to make sure instantiated templates are included 10373cfa76ccdSmrg # in the archive. 10374cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10375cfa76ccdSmrg ;; 10376cfa76ccdSmrg *) 10377cfa76ccdSmrg if test yes = "$GXX"; then 10378cfa76ccdSmrg if test no = "$with_gnu_ld"; then 10379cfa76ccdSmrg _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' 10380cfa76ccdSmrg else 10381cfa76ccdSmrg _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' 10382cfa76ccdSmrg fi 10383cfa76ccdSmrg fi 10384cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10385cfa76ccdSmrg ;; 10386cfa76ccdSmrg esac 10387cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10388cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10389cfa76ccdSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 10390cfa76ccdSmrg ;; 10391dbbd9e4bSmacallan 10392cfa76ccdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10393cfa76ccdSmrg case $cc_basename in 10394cfa76ccdSmrg KCC*) 10395cfa76ccdSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10396dbbd9e4bSmacallan 10397cfa76ccdSmrg # KCC will only create a shared library if the output file 10398cfa76ccdSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10399cfa76ccdSmrg # to its proper name (with version) after linking. 10400cfa76ccdSmrg _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' 10401cfa76ccdSmrg _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' 10402cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10403cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10404cfa76ccdSmrg # linking a shared library. 10405cfa76ccdSmrg # 10406cfa76ccdSmrg # There doesn't appear to be a way to prevent this compiler from 10407cfa76ccdSmrg # explicitly linking system object files so we need to strip them 10408cfa76ccdSmrg # from the output so that they don't get included in the library 10409cfa76ccdSmrg # dependencies. 10410cfa76ccdSmrg 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"' 10411dbbd9e4bSmacallan 10412cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10413cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10414dbbd9e4bSmacallan 10415cfa76ccdSmrg # Archives containing C++ object files must be created using 10416cfa76ccdSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10417cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10418cfa76ccdSmrg ;; 10419cfa76ccdSmrg icpc* | ecpc* ) 10420cfa76ccdSmrg # Intel C++ 10421cfa76ccdSmrg with_gnu_ld=yes 10422cfa76ccdSmrg # version 8.0 and above of icpc choke on multiply defined symbols 10423cfa76ccdSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10424cfa76ccdSmrg # earlier do not add the objects themselves. 10425cfa76ccdSmrg case `$CC -V 2>&1` in 10426cfa76ccdSmrg *"Version 7."*) 10427cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10428cfa76ccdSmrg _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' 10429cfa76ccdSmrg ;; 10430cfa76ccdSmrg *) # Version 8.0 or newer 10431cfa76ccdSmrg tmp_idyn= 10432cfa76ccdSmrg case $host_cpu in 10433cfa76ccdSmrg ia64*) tmp_idyn=' -i_dynamic';; 10434cfa76ccdSmrg esac 10435cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10436cfa76ccdSmrg _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' 10437cfa76ccdSmrg ;; 10438cfa76ccdSmrg esac 10439cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10440cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10441cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10442cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10443cfa76ccdSmrg ;; 10444cfa76ccdSmrg pgCC* | pgcpp*) 10445cfa76ccdSmrg # Portland Group C++ compiler 10446cfa76ccdSmrg case `$CC -V` in 10447cfa76ccdSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10448cfa76ccdSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10449cfa76ccdSmrg rm -rf $tpldir~ 10450cfa76ccdSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10451cfa76ccdSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10452cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10453cfa76ccdSmrg rm -rf $tpldir~ 10454cfa76ccdSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10455cfa76ccdSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10456cfa76ccdSmrg $RANLIB $oldlib' 10457cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10458cfa76ccdSmrg rm -rf $tpldir~ 10459cfa76ccdSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10460cfa76ccdSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10461cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10462cfa76ccdSmrg rm -rf $tpldir~ 10463cfa76ccdSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10464cfa76ccdSmrg $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' 10465cfa76ccdSmrg ;; 10466cfa76ccdSmrg *) # Version 6 and above use weak symbols 10467cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10468cfa76ccdSmrg _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' 10469cfa76ccdSmrg ;; 10470cfa76ccdSmrg esac 10471dbbd9e4bSmacallan 10472cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10473cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10474cfa76ccdSmrg _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' 10475cfa76ccdSmrg ;; 10476cfa76ccdSmrg cxx*) 10477cfa76ccdSmrg # Compaq C++ 10478cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10479cfa76ccdSmrg _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' 10480dbbd9e4bSmacallan 10481cfa76ccdSmrg runpath_var=LD_RUN_PATH 10482cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10483cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10484dbbd9e4bSmacallan 10485cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10486cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10487cfa76ccdSmrg # linking a shared library. 10488cfa76ccdSmrg # 10489cfa76ccdSmrg # There doesn't appear to be a way to prevent this compiler from 10490cfa76ccdSmrg # explicitly linking system object files so we need to strip them 10491cfa76ccdSmrg # from the output so that they don't get included in the library 10492cfa76ccdSmrg # dependencies. 10493cfa76ccdSmrg 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' 10494cfa76ccdSmrg ;; 10495cfa76ccdSmrg xl* | mpixl* | bgxl*) 10496cfa76ccdSmrg # IBM XL 8.0 on PPC, with GNU ld 10497cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10498cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10499cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10500cfa76ccdSmrg if test yes = "$supports_anon_versioning"; then 10501cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10502cfa76ccdSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10503cfa76ccdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10504cfa76ccdSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10505cfa76ccdSmrg fi 10506cfa76ccdSmrg ;; 10507cfa76ccdSmrg *) 10508cfa76ccdSmrg case `$CC -V 2>&1 | $SED 5q` in 10509cfa76ccdSmrg *Sun\ C*) 10510cfa76ccdSmrg # Sun C++ 5.9 10511cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10512cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10513cfa76ccdSmrg _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' 10514cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10515cfa76ccdSmrg _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' 10516cfa76ccdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10517dbbd9e4bSmacallan 10518cfa76ccdSmrg # Not sure whether something based on 10519cfa76ccdSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10520cfa76ccdSmrg # would be better. 10521cfa76ccdSmrg output_verbose_link_cmd='func_echo_all' 10522dbbd9e4bSmacallan 10523cfa76ccdSmrg # Archives containing C++ object files must be created using 10524cfa76ccdSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10525cfa76ccdSmrg # necessary to make sure instantiated templates are included 10526cfa76ccdSmrg # in the archive. 10527cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10528cfa76ccdSmrg ;; 10529cfa76ccdSmrg esac 10530cfa76ccdSmrg ;; 10531cfa76ccdSmrg esac 10532cfa76ccdSmrg ;; 10533dbbd9e4bSmacallan 10534cfa76ccdSmrg lynxos*) 10535cfa76ccdSmrg # FIXME: insert proper C++ library support 10536cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10537cfa76ccdSmrg ;; 10538dbbd9e4bSmacallan 10539cfa76ccdSmrg m88k*) 10540cfa76ccdSmrg # FIXME: insert proper C++ library support 10541cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10542cfa76ccdSmrg ;; 10543dbbd9e4bSmacallan 10544cfa76ccdSmrg mvs*) 10545cfa76ccdSmrg case $cc_basename in 10546cfa76ccdSmrg cxx*) 10547cfa76ccdSmrg # FIXME: insert proper C++ library support 10548cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10549cfa76ccdSmrg ;; 10550cfa76ccdSmrg *) 10551cfa76ccdSmrg # FIXME: insert proper C++ library support 10552cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10553cfa76ccdSmrg ;; 10554cfa76ccdSmrg esac 10555cfa76ccdSmrg ;; 10556cfa76ccdSmrg 10557cfa76ccdSmrg netbsd*) 10558cfa76ccdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10559cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10560cfa76ccdSmrg wlarc= 10561cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10562cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10563cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10564cfa76ccdSmrg fi 10565cfa76ccdSmrg # Workaround some broken pre-1.5 toolchains 10566cfa76ccdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10567cfa76ccdSmrg ;; 10568cfa76ccdSmrg 10569cfa76ccdSmrg *nto* | *qnx*) 10570cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10571cfa76ccdSmrg ;; 10572cfa76ccdSmrg 10573cfa76ccdSmrg openbsd* | bitrig*) 10574cfa76ccdSmrg if test -f /usr/libexec/ld.so; then 10575cfa76ccdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10576cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10577cfa76ccdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10578cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10579cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10580cfa76ccdSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10581cfa76ccdSmrg _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' 10582cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10583cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10584cfa76ccdSmrg fi 10585cfa76ccdSmrg output_verbose_link_cmd=func_echo_all 10586cfa76ccdSmrg else 10587cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10588cfa76ccdSmrg fi 10589cfa76ccdSmrg ;; 10590dbbd9e4bSmacallan 10591cfa76ccdSmrg osf3* | osf4* | osf5*) 10592cfa76ccdSmrg case $cc_basename in 10593cfa76ccdSmrg KCC*) 10594cfa76ccdSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10595dbbd9e4bSmacallan 10596cfa76ccdSmrg # KCC will only create a shared library if the output file 10597cfa76ccdSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10598cfa76ccdSmrg # to its proper name (with version) after linking. 10599cfa76ccdSmrg _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' 10600e96acad6Smrg 10601cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10602cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10603e96acad6Smrg 10604cfa76ccdSmrg # Archives containing C++ object files must be created using 10605cfa76ccdSmrg # the KAI C++ compiler. 10606cfa76ccdSmrg case $host in 10607cfa76ccdSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10608cfa76ccdSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10609cfa76ccdSmrg esac 10610cfa76ccdSmrg ;; 10611cfa76ccdSmrg RCC*) 10612cfa76ccdSmrg # Rational C++ 2.4.1 10613cfa76ccdSmrg # FIXME: insert proper C++ library support 10614cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10615cfa76ccdSmrg ;; 10616cfa76ccdSmrg cxx*) 10617cfa76ccdSmrg case $host in 10618cfa76ccdSmrg osf3*) 10619cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10620cfa76ccdSmrg _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' 10621cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10622cfa76ccdSmrg ;; 10623cfa76ccdSmrg *) 10624cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10625cfa76ccdSmrg _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' 10626cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10627cfa76ccdSmrg echo "-hidden">> $lib.exp~ 10628cfa76ccdSmrg $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~ 10629cfa76ccdSmrg $RM $lib.exp' 10630cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10631cfa76ccdSmrg ;; 10632cfa76ccdSmrg esac 10633dbbd9e4bSmacallan 10634cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10635e96acad6Smrg 10636cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10637cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10638cfa76ccdSmrg # linking a shared library. 10639cfa76ccdSmrg # 10640cfa76ccdSmrg # There doesn't appear to be a way to prevent this compiler from 10641cfa76ccdSmrg # explicitly linking system object files so we need to strip them 10642cfa76ccdSmrg # from the output so that they don't get included in the library 10643cfa76ccdSmrg # dependencies. 10644cfa76ccdSmrg 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"' 10645cfa76ccdSmrg ;; 10646cfa76ccdSmrg *) 10647cfa76ccdSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10648cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10649cfa76ccdSmrg case $host in 10650cfa76ccdSmrg osf3*) 10651cfa76ccdSmrg _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' 10652cfa76ccdSmrg ;; 10653cfa76ccdSmrg *) 10654cfa76ccdSmrg _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' 10655cfa76ccdSmrg ;; 10656cfa76ccdSmrg esac 10657e96acad6Smrg 10658cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10659cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10660e96acad6Smrg 10661cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10662cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10663cfa76ccdSmrg # linking a shared library. 10664cfa76ccdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10665dbbd9e4bSmacallan 10666cfa76ccdSmrg else 10667cfa76ccdSmrg # FIXME: insert proper C++ library support 10668cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10669cfa76ccdSmrg fi 10670cfa76ccdSmrg ;; 10671cfa76ccdSmrg esac 10672cfa76ccdSmrg ;; 10673dbbd9e4bSmacallan 10674cfa76ccdSmrg psos*) 10675cfa76ccdSmrg # FIXME: insert proper C++ library support 10676cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10677cfa76ccdSmrg ;; 10678dbbd9e4bSmacallan 10679cfa76ccdSmrg sunos4*) 10680cfa76ccdSmrg case $cc_basename in 10681cfa76ccdSmrg CC*) 10682cfa76ccdSmrg # Sun C++ 4.x 10683cfa76ccdSmrg # FIXME: insert proper C++ library support 10684cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10685cfa76ccdSmrg ;; 10686cfa76ccdSmrg lcc*) 10687cfa76ccdSmrg # Lucid 10688cfa76ccdSmrg # FIXME: insert proper C++ library support 10689cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10690cfa76ccdSmrg ;; 10691cfa76ccdSmrg *) 10692cfa76ccdSmrg # FIXME: insert proper C++ library support 10693cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10694cfa76ccdSmrg ;; 10695cfa76ccdSmrg esac 10696cfa76ccdSmrg ;; 10697dbbd9e4bSmacallan 10698cfa76ccdSmrg solaris*) 10699cfa76ccdSmrg case $cc_basename in 10700cfa76ccdSmrg CC* | sunCC*) 10701cfa76ccdSmrg # Sun C++ 4.2, 5.x and Centerline C++ 10702cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10703cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10704cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10705cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10706cfa76ccdSmrg $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' 10707dbbd9e4bSmacallan 10708cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10709cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10710cfa76ccdSmrg case $host_os in 10711cfa76ccdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10712cfa76ccdSmrg *) 10713cfa76ccdSmrg # The compiler driver will combine and reorder linker options, 10714cfa76ccdSmrg # but understands '-z linker_flag'. 10715cfa76ccdSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10716cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10717cfa76ccdSmrg ;; 10718cfa76ccdSmrg esac 10719cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10720dbbd9e4bSmacallan 10721cfa76ccdSmrg output_verbose_link_cmd='func_echo_all' 10722dbbd9e4bSmacallan 10723cfa76ccdSmrg # Archives containing C++ object files must be created using 10724cfa76ccdSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10725cfa76ccdSmrg # necessary to make sure instantiated templates are included 10726cfa76ccdSmrg # in the archive. 10727cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10728cfa76ccdSmrg ;; 10729cfa76ccdSmrg gcx*) 10730cfa76ccdSmrg # Green Hills C++ Compiler 10731cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10732dbbd9e4bSmacallan 10733cfa76ccdSmrg # The C++ compiler must be used to create the archive. 10734cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10735cfa76ccdSmrg ;; 10736cfa76ccdSmrg *) 10737cfa76ccdSmrg # GNU C++ compiler with Solaris linker 10738cfa76ccdSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10739cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10740cfa76ccdSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10741cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10742cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10743cfa76ccdSmrg $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' 10744dbbd9e4bSmacallan 10745cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10746cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10747cfa76ccdSmrg # linking a shared library. 10748cfa76ccdSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10749cfa76ccdSmrg else 10750cfa76ccdSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10751cfa76ccdSmrg # platform. 10752cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10753cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10754cfa76ccdSmrg $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' 10755dbbd9e4bSmacallan 10756cfa76ccdSmrg # Commands to make compiler produce verbose output that lists 10757cfa76ccdSmrg # what "hidden" libraries, object files and flags are used when 10758cfa76ccdSmrg # linking a shared library. 10759cfa76ccdSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10760cfa76ccdSmrg fi 10761dbbd9e4bSmacallan 10762cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10763cfa76ccdSmrg case $host_os in 10764cfa76ccdSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10765cfa76ccdSmrg *) 10766cfa76ccdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10767cfa76ccdSmrg ;; 10768cfa76ccdSmrg esac 10769cfa76ccdSmrg fi 10770cfa76ccdSmrg ;; 10771cfa76ccdSmrg esac 10772cfa76ccdSmrg ;; 10773dbbd9e4bSmacallan 10774cfa76ccdSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10775cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10776cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10777cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10778cfa76ccdSmrg runpath_var='LD_RUN_PATH' 10779e96acad6Smrg 10780cfa76ccdSmrg case $cc_basename in 10781cfa76ccdSmrg CC*) 10782cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10783cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784cfa76ccdSmrg ;; 10785cfa76ccdSmrg *) 10786cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10787cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10788cfa76ccdSmrg ;; 10789cfa76ccdSmrg esac 10790cfa76ccdSmrg ;; 10791dbbd9e4bSmacallan 10792cfa76ccdSmrg sysv5* | sco3.2v5* | sco5v6*) 10793cfa76ccdSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 10794cfa76ccdSmrg # link with -lc, and that would cause any symbols used from libc to 10795cfa76ccdSmrg # always be unresolved, which means just about no library would 10796cfa76ccdSmrg # ever link correctly. If we're not using GNU ld we use -z text 10797cfa76ccdSmrg # though, which does catch some bad symbols but isn't as heavy-handed 10798cfa76ccdSmrg # as -z defs. 10799cfa76ccdSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10800cfa76ccdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10801cfa76ccdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10802cfa76ccdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10803cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10804cfa76ccdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10805cfa76ccdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10806cfa76ccdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10807cfa76ccdSmrg runpath_var='LD_RUN_PATH' 10808dbbd9e4bSmacallan 10809cfa76ccdSmrg case $cc_basename in 10810cfa76ccdSmrg CC*) 10811cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10812cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10813cfa76ccdSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10814cfa76ccdSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10815cfa76ccdSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10816cfa76ccdSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 10817cfa76ccdSmrg ;; 10818cfa76ccdSmrg *) 10819cfa76ccdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10820cfa76ccdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10821cfa76ccdSmrg ;; 10822cfa76ccdSmrg esac 10823cfa76ccdSmrg ;; 10824dbbd9e4bSmacallan 10825cfa76ccdSmrg tandem*) 10826cfa76ccdSmrg case $cc_basename in 10827cfa76ccdSmrg NCC*) 10828cfa76ccdSmrg # NonStop-UX NCC 3.20 10829cfa76ccdSmrg # FIXME: insert proper C++ library support 10830cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10831cfa76ccdSmrg ;; 10832cfa76ccdSmrg *) 10833cfa76ccdSmrg # FIXME: insert proper C++ library support 10834cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10835cfa76ccdSmrg ;; 10836cfa76ccdSmrg esac 10837cfa76ccdSmrg ;; 10838dbbd9e4bSmacallan 10839cfa76ccdSmrg vxworks*) 10840cfa76ccdSmrg # FIXME: insert proper C++ library support 10841cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10842cfa76ccdSmrg ;; 10843dbbd9e4bSmacallan 10844cfa76ccdSmrg *) 10845cfa76ccdSmrg # FIXME: insert proper C++ library support 10846cfa76ccdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10847cfa76ccdSmrg ;; 10848cfa76ccdSmrg esac 10849dbbd9e4bSmacallan 10850cfa76ccdSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10851cfa76ccdSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10852e96acad6Smrg 10853cfa76ccdSmrg _LT_TAGVAR(GCC, $1)=$GXX 10854cfa76ccdSmrg _LT_TAGVAR(LD, $1)=$LD 10855e96acad6Smrg 10856cfa76ccdSmrg ## CAVEAT EMPTOR: 10857cfa76ccdSmrg ## There is no encapsulation within the following macros, do not change 10858cfa76ccdSmrg ## the running order or otherwise move them around unless you know exactly 10859cfa76ccdSmrg ## what you are doing... 10860cfa76ccdSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 10861cfa76ccdSmrg _LT_COMPILER_PIC($1) 10862cfa76ccdSmrg _LT_COMPILER_C_O($1) 10863cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 10864cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 10865cfa76ccdSmrg _LT_SYS_DYNAMIC_LINKER($1) 10866cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 10867e96acad6Smrg 10868cfa76ccdSmrg _LT_CONFIG($1) 10869cfa76ccdSmrg fi # test -n "$compiler" 10870e96acad6Smrg 10871cfa76ccdSmrg CC=$lt_save_CC 10872cfa76ccdSmrg CFLAGS=$lt_save_CFLAGS 10873cfa76ccdSmrg LDCXX=$LD 10874cfa76ccdSmrg LD=$lt_save_LD 10875cfa76ccdSmrg GCC=$lt_save_GCC 10876cfa76ccdSmrg with_gnu_ld=$lt_save_with_gnu_ld 10877cfa76ccdSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 10878cfa76ccdSmrg lt_cv_path_LD=$lt_save_path_LD 10879cfa76ccdSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10880cfa76ccdSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10881cfa76ccdSmrgfi # test yes != "$_lt_caught_CXX_error" 10882e96acad6Smrg 10883cfa76ccdSmrgAC_LANG_POP 10884cfa76ccdSmrg])# _LT_LANG_CXX_CONFIG 10885e96acad6Smrg 10886e96acad6Smrg 10887cfa76ccdSmrg# _LT_FUNC_STRIPNAME_CNF 10888cfa76ccdSmrg# ---------------------- 10889cfa76ccdSmrg# func_stripname_cnf prefix suffix name 10890cfa76ccdSmrg# strip PREFIX and SUFFIX off of NAME. 10891cfa76ccdSmrg# PREFIX and SUFFIX must not contain globbing or regex special 10892cfa76ccdSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10893cfa76ccdSmrg# dot (in which case that matches only a dot). 10894cfa76ccdSmrg# 10895cfa76ccdSmrg# This function is identical to the (non-XSI) version of func_stripname, 10896cfa76ccdSmrg# except this one can be used by m4 code that may be executed by configure, 10897cfa76ccdSmrg# rather than the libtool script. 10898cfa76ccdSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10899cfa76ccdSmrgAC_REQUIRE([_LT_DECL_SED]) 10900cfa76ccdSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10901cfa76ccdSmrgfunc_stripname_cnf () 10902cfa76ccdSmrg{ 10903cfa76ccdSmrg case @S|@2 in 10904cfa76ccdSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10905cfa76ccdSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10906cfa76ccdSmrg esac 10907cfa76ccdSmrg} # func_stripname_cnf 10908cfa76ccdSmrg])# _LT_FUNC_STRIPNAME_CNF 10909e96acad6Smrg 10910e96acad6Smrg 10911cfa76ccdSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10912cfa76ccdSmrg# --------------------------------- 10913cfa76ccdSmrg# Figure out "hidden" library dependencies from verbose 10914cfa76ccdSmrg# compiler output when linking a shared library. 10915cfa76ccdSmrg# Parse the compiler output and extract the necessary 10916cfa76ccdSmrg# objects, libraries and library flags. 10917cfa76ccdSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10918cfa76ccdSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10919cfa76ccdSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10920cfa76ccdSmrg# Dependencies to place before and after the object being linked: 10921cfa76ccdSmrg_LT_TAGVAR(predep_objects, $1)= 10922cfa76ccdSmrg_LT_TAGVAR(postdep_objects, $1)= 10923cfa76ccdSmrg_LT_TAGVAR(predeps, $1)= 10924cfa76ccdSmrg_LT_TAGVAR(postdeps, $1)= 10925cfa76ccdSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10926e96acad6Smrg 10927cfa76ccdSmrgdnl we can't use the lt_simple_compile_test_code here, 10928cfa76ccdSmrgdnl because it contains code intended for an executable, 10929cfa76ccdSmrgdnl not a library. It's possible we should let each 10930cfa76ccdSmrgdnl tag define a new lt_????_link_test_code variable, 10931cfa76ccdSmrgdnl but it's only used here... 10932cfa76ccdSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10933cfa76ccdSmrgint a; 10934cfa76ccdSmrgvoid foo (void) { a = 0; } 10935cfa76ccdSmrg_LT_EOF 10936cfa76ccdSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10937cfa76ccdSmrgclass Foo 10938cfa76ccdSmrg{ 10939cfa76ccdSmrgpublic: 10940cfa76ccdSmrg Foo (void) { a = 0; } 10941cfa76ccdSmrgprivate: 10942cfa76ccdSmrg int a; 10943cfa76ccdSmrg}; 10944cfa76ccdSmrg_LT_EOF 10945cfa76ccdSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10946cfa76ccdSmrg subroutine foo 10947cfa76ccdSmrg implicit none 10948cfa76ccdSmrg integer*4 a 10949cfa76ccdSmrg a=0 10950cfa76ccdSmrg return 10951cfa76ccdSmrg end 10952cfa76ccdSmrg_LT_EOF 10953cfa76ccdSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10954cfa76ccdSmrg subroutine foo 10955cfa76ccdSmrg implicit none 10956cfa76ccdSmrg integer a 10957cfa76ccdSmrg a=0 10958cfa76ccdSmrg return 10959cfa76ccdSmrg end 10960cfa76ccdSmrg_LT_EOF 10961cfa76ccdSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10962cfa76ccdSmrgpublic class foo { 10963cfa76ccdSmrg private int a; 10964cfa76ccdSmrg public void bar (void) { 10965cfa76ccdSmrg a = 0; 10966cfa76ccdSmrg } 10967cfa76ccdSmrg}; 10968cfa76ccdSmrg_LT_EOF 10969cfa76ccdSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10970cfa76ccdSmrgpackage foo 10971cfa76ccdSmrgfunc foo() { 10972cfa76ccdSmrg} 10973cfa76ccdSmrg_LT_EOF 10974cfa76ccdSmrg]) 10975e96acad6Smrg 10976cfa76ccdSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 10977cfa76ccdSmrgcase "$CC $CFLAGS " in #( 10978cfa76ccdSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10979cfa76ccdSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10980cfa76ccdSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10981cfa76ccdSmrgesac 10982e96acad6Smrg 10983cfa76ccdSmrgdnl Parse the compiler output and extract the necessary 10984cfa76ccdSmrgdnl objects, libraries and library flags. 10985cfa76ccdSmrgif AC_TRY_EVAL(ac_compile); then 10986cfa76ccdSmrg # Parse the compiler output and extract the necessary 10987cfa76ccdSmrg # objects, libraries and library flags. 10988e96acad6Smrg 10989cfa76ccdSmrg # Sentinel used to keep track of whether or not we are before 10990cfa76ccdSmrg # the conftest object file. 10991cfa76ccdSmrg pre_test_object_deps_done=no 10992e96acad6Smrg 10993cfa76ccdSmrg for p in `eval "$output_verbose_link_cmd"`; do 10994cfa76ccdSmrg case $prev$p in 10995cfa76ccdSmrg 10996cfa76ccdSmrg -L* | -R* | -l*) 10997cfa76ccdSmrg # Some compilers place space between "-{L,R}" and the path. 10998cfa76ccdSmrg # Remove the space. 10999cfa76ccdSmrg if test x-L = "$p" || 11000cfa76ccdSmrg test x-R = "$p"; then 11001cfa76ccdSmrg prev=$p 11002cfa76ccdSmrg continue 11003cfa76ccdSmrg fi 11004cfa76ccdSmrg 11005cfa76ccdSmrg # Expand the sysroot to ease extracting the directories later. 11006cfa76ccdSmrg if test -z "$prev"; then 11007cfa76ccdSmrg case $p in 11008cfa76ccdSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11009cfa76ccdSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11010cfa76ccdSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11011cfa76ccdSmrg esac 11012cfa76ccdSmrg fi 11013cfa76ccdSmrg case $p in 11014cfa76ccdSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11015cfa76ccdSmrg esac 11016cfa76ccdSmrg if test no = "$pre_test_object_deps_done"; then 11017cfa76ccdSmrg case $prev in 11018cfa76ccdSmrg -L | -R) 11019cfa76ccdSmrg # Internal compiler library paths should come after those 11020cfa76ccdSmrg # provided the user. The postdeps already come after the 11021cfa76ccdSmrg # user supplied libs so there is no need to process them. 11022cfa76ccdSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11023cfa76ccdSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11024cfa76ccdSmrg else 11025cfa76ccdSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11026cfa76ccdSmrg fi 11027cfa76ccdSmrg ;; 11028cfa76ccdSmrg # The "-l" case would never come before the object being 11029cfa76ccdSmrg # linked, so don't bother handling this case. 11030cfa76ccdSmrg esac 11031cfa76ccdSmrg else 11032cfa76ccdSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11033cfa76ccdSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 11034cfa76ccdSmrg else 11035cfa76ccdSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11036cfa76ccdSmrg fi 11037cfa76ccdSmrg fi 11038cfa76ccdSmrg prev= 11039cfa76ccdSmrg ;; 11040e96acad6Smrg 11041cfa76ccdSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 11042cfa76ccdSmrg *.$objext) 11043cfa76ccdSmrg # This assumes that the test object file only shows up 11044cfa76ccdSmrg # once in the compiler output. 11045cfa76ccdSmrg if test "$p" = "conftest.$objext"; then 11046cfa76ccdSmrg pre_test_object_deps_done=yes 11047cfa76ccdSmrg continue 11048cfa76ccdSmrg fi 11049e96acad6Smrg 11050cfa76ccdSmrg if test no = "$pre_test_object_deps_done"; then 11051cfa76ccdSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11052cfa76ccdSmrg _LT_TAGVAR(predep_objects, $1)=$p 11053cfa76ccdSmrg else 11054cfa76ccdSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11055cfa76ccdSmrg fi 11056cfa76ccdSmrg else 11057cfa76ccdSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11058cfa76ccdSmrg _LT_TAGVAR(postdep_objects, $1)=$p 11059cfa76ccdSmrg else 11060cfa76ccdSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11061cfa76ccdSmrg fi 11062cfa76ccdSmrg fi 11063cfa76ccdSmrg ;; 11064e96acad6Smrg 11065cfa76ccdSmrg *) ;; # Ignore the rest. 11066e96acad6Smrg 11067cfa76ccdSmrg esac 11068cfa76ccdSmrg done 11069e96acad6Smrg 11070cfa76ccdSmrg # Clean up. 11071cfa76ccdSmrg rm -f a.out a.exe 11072cfa76ccdSmrgelse 11073cfa76ccdSmrg echo "libtool.m4: error: problem compiling $1 test program" 11074e96acad6Smrgfi 11075e96acad6Smrg 11076cfa76ccdSmrg$RM -f confest.$objext 11077cfa76ccdSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11078e96acad6Smrg 11079cfa76ccdSmrg# PORTME: override above test on systems where it is broken 11080cfa76ccdSmrgm4_if([$1], [CXX], 11081cfa76ccdSmrg[case $host_os in 11082cfa76ccdSmrginterix[[3-9]]*) 11083cfa76ccdSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11084cfa76ccdSmrg # hack all around it, let's just trust "g++" to DTRT. 11085cfa76ccdSmrg _LT_TAGVAR(predep_objects,$1)= 11086cfa76ccdSmrg _LT_TAGVAR(postdep_objects,$1)= 11087cfa76ccdSmrg _LT_TAGVAR(postdeps,$1)= 11088cfa76ccdSmrg ;; 11089cfa76ccdSmrgesac 11090cfa76ccdSmrg]) 11091e96acad6Smrg 11092cfa76ccdSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 11093cfa76ccdSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11094cfa76ccdSmrgesac 11095cfa76ccdSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11096cfa76ccdSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11097cfa76ccdSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11098e96acad6Smrgfi 11099cfa76ccdSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11100cfa76ccdSmrg [The directories searched by this compiler when creating a shared library]) 11101cfa76ccdSmrg_LT_TAGDECL([], [predep_objects], [1], 11102cfa76ccdSmrg [Dependencies to place before and after the objects being linked to 11103cfa76ccdSmrg create a shared library]) 11104cfa76ccdSmrg_LT_TAGDECL([], [postdep_objects], [1]) 11105cfa76ccdSmrg_LT_TAGDECL([], [predeps], [1]) 11106cfa76ccdSmrg_LT_TAGDECL([], [postdeps], [1]) 11107cfa76ccdSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11108cfa76ccdSmrg [The library search path used internally by the compiler when linking 11109cfa76ccdSmrg a shared library]) 11110cfa76ccdSmrg])# _LT_SYS_HIDDEN_LIBDEPS 11111e96acad6Smrg 11112e96acad6Smrg 11113cfa76ccdSmrg# _LT_LANG_F77_CONFIG([TAG]) 11114cfa76ccdSmrg# -------------------------- 11115cfa76ccdSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 11116cfa76ccdSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11117cfa76ccdSmrg# to write the compiler configuration to 'libtool'. 11118cfa76ccdSmrgm4_defun([_LT_LANG_F77_CONFIG], 11119cfa76ccdSmrg[AC_LANG_PUSH(Fortran 77) 11120cfa76ccdSmrgif test -z "$F77" || test no = "$F77"; then 11121cfa76ccdSmrg _lt_disable_F77=yes 11122e96acad6Smrgfi 11123e96acad6Smrg 11124cfa76ccdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11125cfa76ccdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11126cfa76ccdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11127cfa76ccdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11128cfa76ccdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11129cfa76ccdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11130cfa76ccdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11131cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11132cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11133cfa76ccdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11134cfa76ccdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11135cfa76ccdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11136cfa76ccdSmrg_LT_TAGVAR(module_cmds, $1)= 11137cfa76ccdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11138cfa76ccdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11139cfa76ccdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11140cfa76ccdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11141cfa76ccdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11142cfa76ccdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11143cfa76ccdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11144cfa76ccdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11145e96acad6Smrg 11146cfa76ccdSmrg# Source file extension for f77 test sources. 11147cfa76ccdSmrgac_ext=f 11148e96acad6Smrg 11149cfa76ccdSmrg# Object file extension for compiled f77 test sources. 11150cfa76ccdSmrgobjext=o 11151cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 11152e96acad6Smrg 11153cfa76ccdSmrg# No sense in running all these tests if we already determined that 11154cfa76ccdSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 11155cfa76ccdSmrg# are currently assumed to apply to all compilers on this platform, 11156cfa76ccdSmrg# and will be corrupted by setting them based on a non-working compiler. 11157cfa76ccdSmrgif test yes != "$_lt_disable_F77"; then 11158cfa76ccdSmrg # Code to be used in simple compile tests 11159cfa76ccdSmrg lt_simple_compile_test_code="\ 11160cfa76ccdSmrg subroutine t 11161cfa76ccdSmrg return 11162cfa76ccdSmrg end 11163cfa76ccdSmrg" 11164e96acad6Smrg 11165cfa76ccdSmrg # Code to be used in simple link tests 11166cfa76ccdSmrg lt_simple_link_test_code="\ 11167cfa76ccdSmrg program t 11168cfa76ccdSmrg end 11169cfa76ccdSmrg" 11170e96acad6Smrg 11171cfa76ccdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11172cfa76ccdSmrg _LT_TAG_COMPILER 11173e96acad6Smrg 11174cfa76ccdSmrg # save warnings/boilerplate of simple test code 11175cfa76ccdSmrg _LT_COMPILER_BOILERPLATE 11176cfa76ccdSmrg _LT_LINKER_BOILERPLATE 11177e96acad6Smrg 11178cfa76ccdSmrg # Allow CC to be a program name with arguments. 11179cfa76ccdSmrg lt_save_CC=$CC 11180cfa76ccdSmrg lt_save_GCC=$GCC 11181cfa76ccdSmrg lt_save_CFLAGS=$CFLAGS 11182cfa76ccdSmrg CC=${F77-"f77"} 11183cfa76ccdSmrg CFLAGS=$FFLAGS 11184cfa76ccdSmrg compiler=$CC 11185cfa76ccdSmrg _LT_TAGVAR(compiler, $1)=$CC 11186cfa76ccdSmrg _LT_CC_BASENAME([$compiler]) 11187cfa76ccdSmrg GCC=$G77 11188cfa76ccdSmrg if test -n "$compiler"; then 11189cfa76ccdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11190cfa76ccdSmrg AC_MSG_RESULT([$can_build_shared]) 11191e96acad6Smrg 11192cfa76ccdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11193cfa76ccdSmrg test no = "$can_build_shared" && enable_shared=no 11194e96acad6Smrg 11195cfa76ccdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11196cfa76ccdSmrg # are all built from PIC. 11197cfa76ccdSmrg case $host_os in 11198cfa76ccdSmrg aix3*) 11199cfa76ccdSmrg test yes = "$enable_shared" && enable_static=no 11200cfa76ccdSmrg if test -n "$RANLIB"; then 11201cfa76ccdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11202cfa76ccdSmrg postinstall_cmds='$RANLIB $lib' 11203cfa76ccdSmrg fi 11204cfa76ccdSmrg ;; 11205cfa76ccdSmrg aix[[4-9]]*) 11206cfa76ccdSmrg if test ia64 != "$host_cpu"; then 11207cfa76ccdSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11208cfa76ccdSmrg yes,aix,yes) ;; # shared object as lib.so file only 11209cfa76ccdSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11210cfa76ccdSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11211cfa76ccdSmrg esac 11212cfa76ccdSmrg fi 11213cfa76ccdSmrg ;; 11214cfa76ccdSmrg esac 11215cfa76ccdSmrg AC_MSG_RESULT([$enable_shared]) 11216e96acad6Smrg 11217cfa76ccdSmrg AC_MSG_CHECKING([whether to build static libraries]) 11218cfa76ccdSmrg # Make sure either enable_shared or enable_static is yes. 11219cfa76ccdSmrg test yes = "$enable_shared" || enable_static=yes 11220cfa76ccdSmrg AC_MSG_RESULT([$enable_static]) 11221e96acad6Smrg 11222cfa76ccdSmrg _LT_TAGVAR(GCC, $1)=$G77 11223cfa76ccdSmrg _LT_TAGVAR(LD, $1)=$LD 11224e96acad6Smrg 11225cfa76ccdSmrg ## CAVEAT EMPTOR: 11226cfa76ccdSmrg ## There is no encapsulation within the following macros, do not change 11227cfa76ccdSmrg ## the running order or otherwise move them around unless you know exactly 11228cfa76ccdSmrg ## what you are doing... 11229cfa76ccdSmrg _LT_COMPILER_PIC($1) 11230cfa76ccdSmrg _LT_COMPILER_C_O($1) 11231cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 11232cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 11233cfa76ccdSmrg _LT_SYS_DYNAMIC_LINKER($1) 11234cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11235cfa76ccdSmrg 11236cfa76ccdSmrg _LT_CONFIG($1) 11237cfa76ccdSmrg fi # test -n "$compiler" 11238cfa76ccdSmrg 11239cfa76ccdSmrg GCC=$lt_save_GCC 11240cfa76ccdSmrg CC=$lt_save_CC 11241cfa76ccdSmrg CFLAGS=$lt_save_CFLAGS 11242cfa76ccdSmrgfi # test yes != "$_lt_disable_F77" 11243cfa76ccdSmrg 11244cfa76ccdSmrgAC_LANG_POP 11245cfa76ccdSmrg])# _LT_LANG_F77_CONFIG 11246cfa76ccdSmrg 11247cfa76ccdSmrg 11248cfa76ccdSmrg# _LT_LANG_FC_CONFIG([TAG]) 11249cfa76ccdSmrg# ------------------------- 11250cfa76ccdSmrg# Ensure that the configuration variables for a Fortran compiler are 11251cfa76ccdSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11252cfa76ccdSmrg# to write the compiler configuration to 'libtool'. 11253cfa76ccdSmrgm4_defun([_LT_LANG_FC_CONFIG], 11254cfa76ccdSmrg[AC_LANG_PUSH(Fortran) 11255cfa76ccdSmrg 11256cfa76ccdSmrgif test -z "$FC" || test no = "$FC"; then 11257cfa76ccdSmrg _lt_disable_FC=yes 11258e96acad6Smrgfi 11259e96acad6Smrg 11260cfa76ccdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11261cfa76ccdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11262cfa76ccdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11263cfa76ccdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11264cfa76ccdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11265cfa76ccdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11266cfa76ccdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11267cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11268cfa76ccdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11269cfa76ccdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11270cfa76ccdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11271cfa76ccdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11272cfa76ccdSmrg_LT_TAGVAR(module_cmds, $1)= 11273cfa76ccdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11274cfa76ccdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11275cfa76ccdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11276cfa76ccdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11277cfa76ccdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11278cfa76ccdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11279cfa76ccdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11280cfa76ccdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11281e96acad6Smrg 11282cfa76ccdSmrg# Source file extension for fc test sources. 11283cfa76ccdSmrgac_ext=${ac_fc_srcext-f} 11284e96acad6Smrg 11285cfa76ccdSmrg# Object file extension for compiled fc test sources. 11286cfa76ccdSmrgobjext=o 11287cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 11288cfa76ccdSmrg 11289cfa76ccdSmrg# No sense in running all these tests if we already determined that 11290cfa76ccdSmrg# the FC compiler isn't working. Some variables (like enable_shared) 11291cfa76ccdSmrg# are currently assumed to apply to all compilers on this platform, 11292cfa76ccdSmrg# and will be corrupted by setting them based on a non-working compiler. 11293cfa76ccdSmrgif test yes != "$_lt_disable_FC"; then 11294cfa76ccdSmrg # Code to be used in simple compile tests 11295cfa76ccdSmrg lt_simple_compile_test_code="\ 11296cfa76ccdSmrg subroutine t 11297cfa76ccdSmrg return 11298cfa76ccdSmrg end 11299cfa76ccdSmrg" 11300cfa76ccdSmrg 11301cfa76ccdSmrg # Code to be used in simple link tests 11302cfa76ccdSmrg lt_simple_link_test_code="\ 11303cfa76ccdSmrg program t 11304cfa76ccdSmrg end 11305cfa76ccdSmrg" 11306cfa76ccdSmrg 11307cfa76ccdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11308cfa76ccdSmrg _LT_TAG_COMPILER 11309cfa76ccdSmrg 11310cfa76ccdSmrg # save warnings/boilerplate of simple test code 11311cfa76ccdSmrg _LT_COMPILER_BOILERPLATE 11312cfa76ccdSmrg _LT_LINKER_BOILERPLATE 11313cfa76ccdSmrg 11314cfa76ccdSmrg # Allow CC to be a program name with arguments. 11315cfa76ccdSmrg lt_save_CC=$CC 11316cfa76ccdSmrg lt_save_GCC=$GCC 11317cfa76ccdSmrg lt_save_CFLAGS=$CFLAGS 11318cfa76ccdSmrg CC=${FC-"f95"} 11319cfa76ccdSmrg CFLAGS=$FCFLAGS 11320cfa76ccdSmrg compiler=$CC 11321cfa76ccdSmrg GCC=$ac_cv_fc_compiler_gnu 11322cfa76ccdSmrg 11323cfa76ccdSmrg _LT_TAGVAR(compiler, $1)=$CC 11324cfa76ccdSmrg _LT_CC_BASENAME([$compiler]) 11325cfa76ccdSmrg 11326cfa76ccdSmrg if test -n "$compiler"; then 11327cfa76ccdSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11328cfa76ccdSmrg AC_MSG_RESULT([$can_build_shared]) 11329cfa76ccdSmrg 11330cfa76ccdSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11331cfa76ccdSmrg test no = "$can_build_shared" && enable_shared=no 11332cfa76ccdSmrg 11333cfa76ccdSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11334cfa76ccdSmrg # are all built from PIC. 11335cfa76ccdSmrg case $host_os in 11336cfa76ccdSmrg aix3*) 11337cfa76ccdSmrg test yes = "$enable_shared" && enable_static=no 11338cfa76ccdSmrg if test -n "$RANLIB"; then 11339cfa76ccdSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11340cfa76ccdSmrg postinstall_cmds='$RANLIB $lib' 11341cfa76ccdSmrg fi 11342e96acad6Smrg ;; 11343cfa76ccdSmrg aix[[4-9]]*) 11344cfa76ccdSmrg if test ia64 != "$host_cpu"; then 11345cfa76ccdSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11346cfa76ccdSmrg yes,aix,yes) ;; # shared object as lib.so file only 11347cfa76ccdSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11348cfa76ccdSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11349cfa76ccdSmrg esac 11350cfa76ccdSmrg fi 11351e96acad6Smrg ;; 11352cfa76ccdSmrg esac 11353cfa76ccdSmrg AC_MSG_RESULT([$enable_shared]) 11354e96acad6Smrg 11355cfa76ccdSmrg AC_MSG_CHECKING([whether to build static libraries]) 11356cfa76ccdSmrg # Make sure either enable_shared or enable_static is yes. 11357cfa76ccdSmrg test yes = "$enable_shared" || enable_static=yes 11358cfa76ccdSmrg AC_MSG_RESULT([$enable_static]) 11359dbbd9e4bSmacallan 11360cfa76ccdSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11361cfa76ccdSmrg _LT_TAGVAR(LD, $1)=$LD 11362dbbd9e4bSmacallan 11363cfa76ccdSmrg ## CAVEAT EMPTOR: 11364cfa76ccdSmrg ## There is no encapsulation within the following macros, do not change 11365cfa76ccdSmrg ## the running order or otherwise move them around unless you know exactly 11366cfa76ccdSmrg ## what you are doing... 11367cfa76ccdSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 11368cfa76ccdSmrg _LT_COMPILER_PIC($1) 11369cfa76ccdSmrg _LT_COMPILER_C_O($1) 11370cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 11371cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 11372cfa76ccdSmrg _LT_SYS_DYNAMIC_LINKER($1) 11373cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11374dbbd9e4bSmacallan 11375cfa76ccdSmrg _LT_CONFIG($1) 11376cfa76ccdSmrg fi # test -n "$compiler" 11377dbbd9e4bSmacallan 11378cfa76ccdSmrg GCC=$lt_save_GCC 11379cfa76ccdSmrg CC=$lt_save_CC 11380cfa76ccdSmrg CFLAGS=$lt_save_CFLAGS 11381cfa76ccdSmrgfi # test yes != "$_lt_disable_FC" 11382dbbd9e4bSmacallan 11383cfa76ccdSmrgAC_LANG_POP 11384cfa76ccdSmrg])# _LT_LANG_FC_CONFIG 11385dbbd9e4bSmacallan 11386dbbd9e4bSmacallan 11387cfa76ccdSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 11388cfa76ccdSmrg# -------------------------- 11389cfa76ccdSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11390cfa76ccdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11391cfa76ccdSmrg# to write the compiler configuration to 'libtool'. 11392cfa76ccdSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 11393cfa76ccdSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11394cfa76ccdSmrgAC_LANG_SAVE 11395cfa76ccdSmrg 11396cfa76ccdSmrg# Source file extension for Java test sources. 11397cfa76ccdSmrgac_ext=java 11398cfa76ccdSmrg 11399cfa76ccdSmrg# Object file extension for compiled Java test sources. 11400cfa76ccdSmrgobjext=o 11401cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 11402cfa76ccdSmrg 11403cfa76ccdSmrg# Code to be used in simple compile tests 11404cfa76ccdSmrglt_simple_compile_test_code="class foo {}" 11405cfa76ccdSmrg 11406cfa76ccdSmrg# Code to be used in simple link tests 11407cfa76ccdSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11408cfa76ccdSmrg 11409cfa76ccdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11410cfa76ccdSmrg_LT_TAG_COMPILER 11411cfa76ccdSmrg 11412cfa76ccdSmrg# save warnings/boilerplate of simple test code 11413cfa76ccdSmrg_LT_COMPILER_BOILERPLATE 11414cfa76ccdSmrg_LT_LINKER_BOILERPLATE 11415cfa76ccdSmrg 11416cfa76ccdSmrg# Allow CC to be a program name with arguments. 11417cfa76ccdSmrglt_save_CC=$CC 11418cfa76ccdSmrglt_save_CFLAGS=$CFLAGS 11419cfa76ccdSmrglt_save_GCC=$GCC 11420cfa76ccdSmrgGCC=yes 11421cfa76ccdSmrgCC=${GCJ-"gcj"} 11422cfa76ccdSmrgCFLAGS=$GCJFLAGS 11423cfa76ccdSmrgcompiler=$CC 11424cfa76ccdSmrg_LT_TAGVAR(compiler, $1)=$CC 11425cfa76ccdSmrg_LT_TAGVAR(LD, $1)=$LD 11426cfa76ccdSmrg_LT_CC_BASENAME([$compiler]) 11427cfa76ccdSmrg 11428cfa76ccdSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11429cfa76ccdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11430e96acad6Smrg 11431cfa76ccdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11432cfa76ccdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11433cfa76ccdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11434e96acad6Smrg 11435cfa76ccdSmrgif test -n "$compiler"; then 11436cfa76ccdSmrg _LT_COMPILER_NO_RTTI($1) 11437cfa76ccdSmrg _LT_COMPILER_PIC($1) 11438cfa76ccdSmrg _LT_COMPILER_C_O($1) 11439cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 11440cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 11441cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11442e96acad6Smrg 11443cfa76ccdSmrg _LT_CONFIG($1) 11444dbbd9e4bSmacallanfi 11445dbbd9e4bSmacallan 11446cfa76ccdSmrgAC_LANG_RESTORE 11447dbbd9e4bSmacallan 11448cfa76ccdSmrgGCC=$lt_save_GCC 11449cfa76ccdSmrgCC=$lt_save_CC 11450cfa76ccdSmrgCFLAGS=$lt_save_CFLAGS 11451cfa76ccdSmrg])# _LT_LANG_GCJ_CONFIG 11452dbbd9e4bSmacallan 11453cfa76ccdSmrg 11454cfa76ccdSmrg# _LT_LANG_GO_CONFIG([TAG]) 11455dbbd9e4bSmacallan# -------------------------- 11456cfa76ccdSmrg# Ensure that the configuration variables for the GNU Go compiler 11457cfa76ccdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11458cfa76ccdSmrg# to write the compiler configuration to 'libtool'. 11459cfa76ccdSmrgm4_defun([_LT_LANG_GO_CONFIG], 11460cfa76ccdSmrg[AC_REQUIRE([LT_PROG_GO])dnl 11461cfa76ccdSmrgAC_LANG_SAVE 11462dbbd9e4bSmacallan 11463cfa76ccdSmrg# Source file extension for Go test sources. 11464cfa76ccdSmrgac_ext=go 11465e96acad6Smrg 11466cfa76ccdSmrg# Object file extension for compiled Go test sources. 11467cfa76ccdSmrgobjext=o 11468cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 11469e96acad6Smrg 11470cfa76ccdSmrg# Code to be used in simple compile tests 11471cfa76ccdSmrglt_simple_compile_test_code="package main; func main() { }" 11472dbbd9e4bSmacallan 11473cfa76ccdSmrg# Code to be used in simple link tests 11474cfa76ccdSmrglt_simple_link_test_code='package main; func main() { }' 11475dbbd9e4bSmacallan 11476cfa76ccdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11477cfa76ccdSmrg_LT_TAG_COMPILER 11478e96acad6Smrg 11479cfa76ccdSmrg# save warnings/boilerplate of simple test code 11480cfa76ccdSmrg_LT_COMPILER_BOILERPLATE 11481cfa76ccdSmrg_LT_LINKER_BOILERPLATE 11482e96acad6Smrg 11483cfa76ccdSmrg# Allow CC to be a program name with arguments. 11484cfa76ccdSmrglt_save_CC=$CC 11485cfa76ccdSmrglt_save_CFLAGS=$CFLAGS 11486cfa76ccdSmrglt_save_GCC=$GCC 11487cfa76ccdSmrgGCC=yes 11488cfa76ccdSmrgCC=${GOC-"gccgo"} 11489cfa76ccdSmrgCFLAGS=$GOFLAGS 11490cfa76ccdSmrgcompiler=$CC 11491cfa76ccdSmrg_LT_TAGVAR(compiler, $1)=$CC 11492cfa76ccdSmrg_LT_TAGVAR(LD, $1)=$LD 11493cfa76ccdSmrg_LT_CC_BASENAME([$compiler]) 11494e96acad6Smrg 11495cfa76ccdSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 11496cfa76ccdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11497e96acad6Smrg 11498cfa76ccdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11499cfa76ccdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11500cfa76ccdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11501e96acad6Smrg 11502cfa76ccdSmrgif test -n "$compiler"; then 11503cfa76ccdSmrg _LT_COMPILER_NO_RTTI($1) 11504cfa76ccdSmrg _LT_COMPILER_PIC($1) 11505cfa76ccdSmrg _LT_COMPILER_C_O($1) 11506cfa76ccdSmrg _LT_COMPILER_FILE_LOCKS($1) 11507cfa76ccdSmrg _LT_LINKER_SHLIBS($1) 11508cfa76ccdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11509e96acad6Smrg 11510cfa76ccdSmrg _LT_CONFIG($1) 11511e96acad6Smrgfi 11512e96acad6Smrg 11513cfa76ccdSmrgAC_LANG_RESTORE 11514e96acad6Smrg 11515cfa76ccdSmrgGCC=$lt_save_GCC 11516cfa76ccdSmrgCC=$lt_save_CC 11517cfa76ccdSmrgCFLAGS=$lt_save_CFLAGS 11518cfa76ccdSmrg])# _LT_LANG_GO_CONFIG 11519e96acad6Smrg 11520e96acad6Smrg 11521cfa76ccdSmrg# _LT_LANG_RC_CONFIG([TAG]) 11522cfa76ccdSmrg# ------------------------- 11523cfa76ccdSmrg# Ensure that the configuration variables for the Windows resource compiler 11524cfa76ccdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11525cfa76ccdSmrg# to write the compiler configuration to 'libtool'. 11526cfa76ccdSmrgm4_defun([_LT_LANG_RC_CONFIG], 11527cfa76ccdSmrg[AC_REQUIRE([LT_PROG_RC])dnl 11528cfa76ccdSmrgAC_LANG_SAVE 11529cfa76ccdSmrg 11530cfa76ccdSmrg# Source file extension for RC test sources. 11531cfa76ccdSmrgac_ext=rc 11532cfa76ccdSmrg 11533cfa76ccdSmrg# Object file extension for compiled RC test sources. 11534cfa76ccdSmrgobjext=o 11535cfa76ccdSmrg_LT_TAGVAR(objext, $1)=$objext 11536cfa76ccdSmrg 11537cfa76ccdSmrg# Code to be used in simple compile tests 11538cfa76ccdSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11539cfa76ccdSmrg 11540cfa76ccdSmrg# Code to be used in simple link tests 11541cfa76ccdSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11542cfa76ccdSmrg 11543cfa76ccdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11544cfa76ccdSmrg_LT_TAG_COMPILER 11545cfa76ccdSmrg 11546cfa76ccdSmrg# save warnings/boilerplate of simple test code 11547cfa76ccdSmrg_LT_COMPILER_BOILERPLATE 11548cfa76ccdSmrg_LT_LINKER_BOILERPLATE 11549cfa76ccdSmrg 11550cfa76ccdSmrg# Allow CC to be a program name with arguments. 11551cfa76ccdSmrglt_save_CC=$CC 11552cfa76ccdSmrglt_save_CFLAGS=$CFLAGS 11553cfa76ccdSmrglt_save_GCC=$GCC 11554cfa76ccdSmrgGCC= 11555cfa76ccdSmrgCC=${RC-"windres"} 11556cfa76ccdSmrgCFLAGS= 11557cfa76ccdSmrgcompiler=$CC 11558cfa76ccdSmrg_LT_TAGVAR(compiler, $1)=$CC 11559cfa76ccdSmrg_LT_CC_BASENAME([$compiler]) 11560cfa76ccdSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11561cfa76ccdSmrg 11562cfa76ccdSmrgif test -n "$compiler"; then 11563cfa76ccdSmrg : 11564cfa76ccdSmrg _LT_CONFIG($1) 11565cfa76ccdSmrgfi 11566cfa76ccdSmrg 11567cfa76ccdSmrgGCC=$lt_save_GCC 11568cfa76ccdSmrgAC_LANG_RESTORE 11569cfa76ccdSmrgCC=$lt_save_CC 11570cfa76ccdSmrgCFLAGS=$lt_save_CFLAGS 11571cfa76ccdSmrg])# _LT_LANG_RC_CONFIG 11572e96acad6Smrg 11573e96acad6Smrg 11574cfa76ccdSmrg# LT_PROG_GCJ 11575cfa76ccdSmrg# ----------- 11576cfa76ccdSmrgAC_DEFUN([LT_PROG_GCJ], 11577cfa76ccdSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11578cfa76ccdSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11579cfa76ccdSmrg [AC_CHECK_TOOL(GCJ, gcj,) 11580cfa76ccdSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11581cfa76ccdSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11582e96acad6Smrg]) 11583e96acad6Smrg 11584cfa76ccdSmrg# Old name: 11585cfa76ccdSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11586cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 11587cfa76ccdSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11588e96acad6Smrg 11589e96acad6Smrg 11590cfa76ccdSmrg# LT_PROG_GO 11591cfa76ccdSmrg# ---------- 11592cfa76ccdSmrgAC_DEFUN([LT_PROG_GO], 11593cfa76ccdSmrg[AC_CHECK_TOOL(GOC, gccgo,) 11594cfa76ccdSmrg]) 11595e96acad6Smrg 11596e96acad6Smrg 11597cfa76ccdSmrg# LT_PROG_RC 11598cfa76ccdSmrg# ---------- 11599cfa76ccdSmrgAC_DEFUN([LT_PROG_RC], 11600cfa76ccdSmrg[AC_CHECK_TOOL(RC, windres,) 11601cfa76ccdSmrg]) 11602e96acad6Smrg 11603cfa76ccdSmrg# Old name: 11604cfa76ccdSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11605cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 11606cfa76ccdSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11607e96acad6Smrg 11608e96acad6Smrg 11609cfa76ccdSmrg# _LT_DECL_EGREP 11610cfa76ccdSmrg# -------------- 11611cfa76ccdSmrg# If we don't have a new enough Autoconf to choose the best grep 11612cfa76ccdSmrg# available, choose the one first in the user's PATH. 11613cfa76ccdSmrgm4_defun([_LT_DECL_EGREP], 11614cfa76ccdSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11615cfa76ccdSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11616cfa76ccdSmrgtest -z "$GREP" && GREP=grep 11617cfa76ccdSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11618cfa76ccdSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11619cfa76ccdSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11620cfa76ccdSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11621cfa76ccdSmrgAC_SUBST([GREP]) 11622cfa76ccdSmrg]) 11623e96acad6Smrg 11624e96acad6Smrg 11625cfa76ccdSmrg# _LT_DECL_OBJDUMP 11626cfa76ccdSmrg# -------------- 11627cfa76ccdSmrg# If we don't have a new enough Autoconf to choose the best objdump 11628cfa76ccdSmrg# available, choose the one first in the user's PATH. 11629cfa76ccdSmrgm4_defun([_LT_DECL_OBJDUMP], 11630cfa76ccdSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11631cfa76ccdSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11632cfa76ccdSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11633cfa76ccdSmrgAC_SUBST([OBJDUMP]) 11634cfa76ccdSmrg]) 11635e96acad6Smrg 11636cfa76ccdSmrg# _LT_DECL_DLLTOOL 11637cfa76ccdSmrg# ---------------- 11638cfa76ccdSmrg# Ensure DLLTOOL variable is set. 11639cfa76ccdSmrgm4_defun([_LT_DECL_DLLTOOL], 11640cfa76ccdSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11641cfa76ccdSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11642cfa76ccdSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11643cfa76ccdSmrgAC_SUBST([DLLTOOL]) 11644cfa76ccdSmrg]) 11645e96acad6Smrg 11646cfa76ccdSmrg# _LT_DECL_FILECMD 11647cfa76ccdSmrg# ---------------- 11648cfa76ccdSmrg# Check for a file(cmd) program that can be used to detect file type and magic 11649cfa76ccdSmrgm4_defun([_LT_DECL_FILECMD], 11650cfa76ccdSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11651cfa76ccdSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11652cfa76ccdSmrg])# _LD_DECL_FILECMD 11653e96acad6Smrg 11654cfa76ccdSmrg# _LT_DECL_SED 11655cfa76ccdSmrg# ------------ 11656cfa76ccdSmrg# Check for a fully-functional sed program, that truncates 11657cfa76ccdSmrg# as few characters as possible. Prefer GNU sed if found. 11658cfa76ccdSmrgm4_defun([_LT_DECL_SED], 11659cfa76ccdSmrg[AC_PROG_SED 11660cfa76ccdSmrgtest -z "$SED" && SED=sed 11661cfa76ccdSmrgXsed="$SED -e 1s/^X//" 11662cfa76ccdSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11663cfa76ccdSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11664cfa76ccdSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11665cfa76ccdSmrg])# _LT_DECL_SED 11666e96acad6Smrg 11667cfa76ccdSmrgm4_ifndef([AC_PROG_SED], [ 11668cfa76ccdSmrg# NOTE: This macro has been submitted for inclusion into # 11669cfa76ccdSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11670cfa76ccdSmrg# a released version of Autoconf we should remove this # 11671cfa76ccdSmrg# macro and use it instead. # 11672cfa76ccdSmrg 11673cfa76ccdSmrgm4_defun([AC_PROG_SED], 11674cfa76ccdSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11675cfa76ccdSmrgAC_CACHE_VAL(lt_cv_path_SED, 11676cfa76ccdSmrg[# Loop through the user's path and test for sed and gsed. 11677cfa76ccdSmrg# Then use that list of sed's as ones to test for truncation. 11678cfa76ccdSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11679cfa76ccdSmrgfor as_dir in $PATH 11680cfa76ccdSmrgdo 11681cfa76ccdSmrg IFS=$as_save_IFS 11682cfa76ccdSmrg test -z "$as_dir" && as_dir=. 11683cfa76ccdSmrg for lt_ac_prog in sed gsed; do 11684cfa76ccdSmrg for ac_exec_ext in '' $ac_executable_extensions; do 11685cfa76ccdSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11686cfa76ccdSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11687cfa76ccdSmrg fi 11688cfa76ccdSmrg done 11689cfa76ccdSmrg done 11690cfa76ccdSmrgdone 11691cfa76ccdSmrgIFS=$as_save_IFS 11692cfa76ccdSmrglt_ac_max=0 11693cfa76ccdSmrglt_ac_count=0 11694cfa76ccdSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11695cfa76ccdSmrg# along with /bin/sed that truncates output. 11696cfa76ccdSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11697cfa76ccdSmrg test ! -f "$lt_ac_sed" && continue 11698cfa76ccdSmrg cat /dev/null > conftest.in 11699cfa76ccdSmrg lt_ac_count=0 11700cfa76ccdSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11701cfa76ccdSmrg # Check for GNU sed and select it if it is found. 11702cfa76ccdSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11703cfa76ccdSmrg lt_cv_path_SED=$lt_ac_sed 11704cfa76ccdSmrg break 11705cfa76ccdSmrg fi 11706cfa76ccdSmrg while true; do 11707cfa76ccdSmrg cat conftest.in conftest.in >conftest.tmp 11708cfa76ccdSmrg mv conftest.tmp conftest.in 11709cfa76ccdSmrg cp conftest.in conftest.nl 11710cfa76ccdSmrg echo >>conftest.nl 11711cfa76ccdSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11712cfa76ccdSmrg cmp -s conftest.out conftest.nl || break 11713cfa76ccdSmrg # 10000 chars as input seems more than enough 11714cfa76ccdSmrg test 10 -lt "$lt_ac_count" && break 11715cfa76ccdSmrg lt_ac_count=`expr $lt_ac_count + 1` 11716cfa76ccdSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11717cfa76ccdSmrg lt_ac_max=$lt_ac_count 11718cfa76ccdSmrg lt_cv_path_SED=$lt_ac_sed 11719cfa76ccdSmrg fi 11720cfa76ccdSmrg done 11721cfa76ccdSmrgdone 11722cfa76ccdSmrg]) 11723cfa76ccdSmrgSED=$lt_cv_path_SED 11724cfa76ccdSmrgAC_SUBST([SED]) 11725cfa76ccdSmrgAC_MSG_RESULT([$SED]) 11726cfa76ccdSmrg])#AC_PROG_SED 11727cfa76ccdSmrg])#m4_ifndef 11728e96acad6Smrg 11729cfa76ccdSmrg# Old name: 11730cfa76ccdSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11731cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 11732cfa76ccdSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11733e96acad6Smrg 11734e96acad6Smrg 11735cfa76ccdSmrg# _LT_CHECK_SHELL_FEATURES 11736cfa76ccdSmrg# ------------------------ 11737cfa76ccdSmrg# Find out whether the shell is Bourne or XSI compatible, 11738cfa76ccdSmrg# or has some other useful features. 11739cfa76ccdSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11740cfa76ccdSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11741cfa76ccdSmrg lt_unset=unset 11742cfa76ccdSmrgelse 11743cfa76ccdSmrg lt_unset=false 11744e96acad6Smrgfi 11745cfa76ccdSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11746e96acad6Smrg 11747cfa76ccdSmrg# test EBCDIC or ASCII 11748cfa76ccdSmrgcase `echo X|tr X '\101'` in 11749cfa76ccdSmrg A) # ASCII based system 11750cfa76ccdSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11751cfa76ccdSmrg lt_SP2NL='tr \040 \012' 11752cfa76ccdSmrg lt_NL2SP='tr \015\012 \040\040' 11753cfa76ccdSmrg ;; 11754cfa76ccdSmrg *) # EBCDIC based system 11755cfa76ccdSmrg lt_SP2NL='tr \100 \n' 11756cfa76ccdSmrg lt_NL2SP='tr \r\n \100\100' 11757cfa76ccdSmrg ;; 11758cfa76ccdSmrgesac 11759cfa76ccdSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11760cfa76ccdSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11761cfa76ccdSmrg])# _LT_CHECK_SHELL_FEATURES 11762e96acad6Smrg 11763dbbd9e4bSmacallan 11764cfa76ccdSmrg# _LT_PATH_CONVERSION_FUNCTIONS 11765cfa76ccdSmrg# ----------------------------- 11766cfa76ccdSmrg# Determine what file name conversion functions should be used by 11767cfa76ccdSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11768cfa76ccdSmrg# for certain cross-compile configurations and native mingw. 11769cfa76ccdSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11770cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11771cfa76ccdSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11772cfa76ccdSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11773cfa76ccdSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11774cfa76ccdSmrg[case $host in 11775cfa76ccdSmrg *-*-mingw* ) 11776cfa76ccdSmrg case $build in 11777cfa76ccdSmrg *-*-mingw* ) # actually msys 11778cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11779cfa76ccdSmrg ;; 11780cfa76ccdSmrg *-*-cygwin* ) 11781cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11782cfa76ccdSmrg ;; 11783cfa76ccdSmrg * ) # otherwise, assume *nix 11784cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11785cfa76ccdSmrg ;; 11786cfa76ccdSmrg esac 11787cfa76ccdSmrg ;; 11788cfa76ccdSmrg *-*-cygwin* ) 11789cfa76ccdSmrg case $build in 11790cfa76ccdSmrg *-*-mingw* ) # actually msys 11791cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11792cfa76ccdSmrg ;; 11793cfa76ccdSmrg *-*-cygwin* ) 11794cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11795cfa76ccdSmrg ;; 11796cfa76ccdSmrg * ) # otherwise, assume *nix 11797cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11798cfa76ccdSmrg ;; 11799cfa76ccdSmrg esac 11800cfa76ccdSmrg ;; 11801cfa76ccdSmrg * ) # unhandled hosts (and "normal" native builds) 11802cfa76ccdSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11803cfa76ccdSmrg ;; 11804cfa76ccdSmrgesac 11805dbbd9e4bSmacallan]) 11806cfa76ccdSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11807cfa76ccdSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11808cfa76ccdSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11809cfa76ccdSmrg [0], [convert $build file names to $host format])dnl 11810dbbd9e4bSmacallan 11811cfa76ccdSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11812cfa76ccdSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11813cfa76ccdSmrg[#assume ordinary cross tools, or native build. 11814cfa76ccdSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 11815cfa76ccdSmrgcase $host in 11816cfa76ccdSmrg *-*-mingw* ) 11817cfa76ccdSmrg case $build in 11818cfa76ccdSmrg *-*-mingw* ) # actually msys 11819cfa76ccdSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11820cfa76ccdSmrg ;; 11821cfa76ccdSmrg esac 11822cfa76ccdSmrg ;; 11823cfa76ccdSmrgesac 11824e96acad6Smrg]) 11825cfa76ccdSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11826cfa76ccdSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11827cfa76ccdSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11828cfa76ccdSmrg [0], [convert $build files to toolchain format])dnl 11829cfa76ccdSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11830e96acad6Smrg 11831cfa76ccdSmrg# Helper functions for option handling. -*- Autoconf -*- 11832dbbd9e4bSmacallan# 11833cfa76ccdSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11834cfa76ccdSmrg# Software Foundation, Inc. 11835cfa76ccdSmrg# Written by Gary V. Vaughan, 2004 11836cfa76ccdSmrg# 11837cfa76ccdSmrg# This file is free software; the Free Software Foundation gives 11838cfa76ccdSmrg# unlimited permission to copy and/or distribute it, with or without 11839cfa76ccdSmrg# modifications, as long as this notice is preserved. 11840dbbd9e4bSmacallan 11841cfa76ccdSmrg# serial 8 ltoptions.m4 11842dbbd9e4bSmacallan 11843cfa76ccdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 11844cfa76ccdSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11845dbbd9e4bSmacallan 11846dbbd9e4bSmacallan 11847cfa76ccdSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11848cfa76ccdSmrg# ------------------------------------------ 11849cfa76ccdSmrgm4_define([_LT_MANGLE_OPTION], 11850cfa76ccdSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11851dbbd9e4bSmacallan 11852dbbd9e4bSmacallan 11853cfa76ccdSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11854cfa76ccdSmrg# --------------------------------------- 11855cfa76ccdSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11856cfa76ccdSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11857cfa76ccdSmrg# saved as a flag. 11858cfa76ccdSmrgm4_define([_LT_SET_OPTION], 11859cfa76ccdSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11860cfa76ccdSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11861cfa76ccdSmrg _LT_MANGLE_DEFUN([$1], [$2]), 11862cfa76ccdSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11863dbbd9e4bSmacallan]) 11864dbbd9e4bSmacallan 11865dbbd9e4bSmacallan 11866cfa76ccdSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11867cfa76ccdSmrg# ------------------------------------------------------------ 11868cfa76ccdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11869cfa76ccdSmrgm4_define([_LT_IF_OPTION], 11870cfa76ccdSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11871dbbd9e4bSmacallan 11872dbbd9e4bSmacallan 11873cfa76ccdSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11874cfa76ccdSmrg# ------------------------------------------------------- 11875cfa76ccdSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11876cfa76ccdSmrg# are set. 11877cfa76ccdSmrgm4_define([_LT_UNLESS_OPTIONS], 11878cfa76ccdSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11879cfa76ccdSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11880cfa76ccdSmrg [m4_define([$0_found])])])[]dnl 11881cfa76ccdSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11882cfa76ccdSmrg])[]dnl 11883dbbd9e4bSmacallan]) 11884dbbd9e4bSmacallan 11885dbbd9e4bSmacallan 11886cfa76ccdSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11887cfa76ccdSmrg# ---------------------------------------- 11888cfa76ccdSmrg# OPTION-LIST is a space-separated list of Libtool options associated 11889cfa76ccdSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11890cfa76ccdSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11891cfa76ccdSmrg# the unknown option and exit. 11892cfa76ccdSmrgm4_defun([_LT_SET_OPTIONS], 11893cfa76ccdSmrg[# Set options 11894cfa76ccdSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11895cfa76ccdSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 11896dbbd9e4bSmacallan 11897cfa76ccdSmrgm4_if([$1],[LT_INIT],[ 11898cfa76ccdSmrg dnl 11899cfa76ccdSmrg dnl Simply set some default values (i.e off) if boolean options were not 11900cfa76ccdSmrg dnl specified: 11901cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11902cfa76ccdSmrg ]) 11903cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11904cfa76ccdSmrg ]) 11905cfa76ccdSmrg dnl 11906cfa76ccdSmrg dnl If no reference was made to various pairs of opposing options, then 11907cfa76ccdSmrg dnl we run the default mode handler for the pair. For example, if neither 11908cfa76ccdSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11909cfa76ccdSmrg dnl archives by default: 11910cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11911cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11912cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11913cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11914cfa76ccdSmrg [_LT_ENABLE_FAST_INSTALL]) 11915cfa76ccdSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11916cfa76ccdSmrg [_LT_WITH_AIX_SONAME([aix])]) 11917cfa76ccdSmrg ]) 11918cfa76ccdSmrg])# _LT_SET_OPTIONS 11919dbbd9e4bSmacallan 11920dbbd9e4bSmacallan 11921dbbd9e4bSmacallan 11922cfa76ccdSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11923cfa76ccdSmrg# ----------------------------------------- 11924cfa76ccdSmrgm4_define([_LT_MANGLE_DEFUN], 11925cfa76ccdSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 119261c397cbaSmrg 11927dbbd9e4bSmacallan 11928cfa76ccdSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11929cfa76ccdSmrg# ----------------------------------------------- 11930cfa76ccdSmrgm4_define([LT_OPTION_DEFINE], 11931cfa76ccdSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11932cfa76ccdSmrg])# LT_OPTION_DEFINE 11933dbbd9e4bSmacallan 11934cfa76ccdSmrg 11935cfa76ccdSmrg# dlopen 11936cfa76ccdSmrg# ------ 11937cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11938dbbd9e4bSmacallan]) 11939cfa76ccdSmrg 11940cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11941cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11942cfa76ccdSmrgAC_DIAGNOSE([obsolete], 11943cfa76ccdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944cfa76ccdSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 11945dbbd9e4bSmacallan]) 11946dbbd9e4bSmacallan 11947cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 11948cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11949dbbd9e4bSmacallan 11950dbbd9e4bSmacallan 11951cfa76ccdSmrg# win32-dll 11952cfa76ccdSmrg# --------- 11953cfa76ccdSmrg# Declare package support for building win32 dll's. 11954cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11955cfa76ccdSmrg[enable_win32_dll=yes 11956dbbd9e4bSmacallan 11957cfa76ccdSmrgcase $host in 11958cfa76ccdSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11959cfa76ccdSmrg AC_CHECK_TOOL(AS, as, false) 11960cfa76ccdSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11961cfa76ccdSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11962cfa76ccdSmrg ;; 11963cfa76ccdSmrgesac 11964cfa76ccdSmrg 11965cfa76ccdSmrgtest -z "$AS" && AS=as 11966cfa76ccdSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11967cfa76ccdSmrg 11968cfa76ccdSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11969cfa76ccdSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11970cfa76ccdSmrg 11971cfa76ccdSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11972cfa76ccdSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11973cfa76ccdSmrg])# win32-dll 11974cfa76ccdSmrg 11975cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11976cfa76ccdSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11977cfa76ccdSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11978cfa76ccdSmrgAC_DIAGNOSE([obsolete], 11979cfa76ccdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11980cfa76ccdSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11981dbbd9e4bSmacallan]) 11982dbbd9e4bSmacallan 11983cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 11984cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11985dbbd9e4bSmacallan 11986dbbd9e4bSmacallan 11987cfa76ccdSmrg# _LT_ENABLE_SHARED([DEFAULT]) 11988cfa76ccdSmrg# ---------------------------- 11989cfa76ccdSmrg# implement the --enable-shared flag, and supports the 'shared' and 11990cfa76ccdSmrg# 'disable-shared' LT_INIT options. 11991cfa76ccdSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11992cfa76ccdSmrgm4_define([_LT_ENABLE_SHARED], 11993cfa76ccdSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11994cfa76ccdSmrgAC_ARG_ENABLE([shared], 11995cfa76ccdSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11996cfa76ccdSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11997cfa76ccdSmrg [p=${PACKAGE-default} 11998cfa76ccdSmrg case $enableval in 11999cfa76ccdSmrg yes) enable_shared=yes ;; 12000cfa76ccdSmrg no) enable_shared=no ;; 12001cfa76ccdSmrg *) 12002cfa76ccdSmrg enable_shared=no 12003cfa76ccdSmrg # Look at the argument we got. We use all the common list separators. 12004cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12005cfa76ccdSmrg for pkg in $enableval; do 12006cfa76ccdSmrg IFS=$lt_save_ifs 12007cfa76ccdSmrg if test "X$pkg" = "X$p"; then 12008cfa76ccdSmrg enable_shared=yes 12009cfa76ccdSmrg fi 12010cfa76ccdSmrg done 12011cfa76ccdSmrg IFS=$lt_save_ifs 12012cfa76ccdSmrg ;; 12013cfa76ccdSmrg esac], 12014cfa76ccdSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 12015dbbd9e4bSmacallan 12016cfa76ccdSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 12017cfa76ccdSmrg [Whether or not to build shared libraries]) 12018cfa76ccdSmrg])# _LT_ENABLE_SHARED 12019dbbd9e4bSmacallan 12020cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 12021cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 12022dbbd9e4bSmacallan 12023cfa76ccdSmrg# Old names: 12024cfa76ccdSmrgAC_DEFUN([AC_ENABLE_SHARED], 12025cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 12026dbbd9e4bSmacallan]) 12027dbbd9e4bSmacallan 12028cfa76ccdSmrgAC_DEFUN([AC_DISABLE_SHARED], 12029cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 12030cfa76ccdSmrg]) 12031dbbd9e4bSmacallan 12032cfa76ccdSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 12033cfa76ccdSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 12034dbbd9e4bSmacallan 12035cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 12036cfa76ccdSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 12037cfa76ccdSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 12038dbbd9e4bSmacallan 12039dbbd9e4bSmacallan 12040dbbd9e4bSmacallan 12041cfa76ccdSmrg# _LT_ENABLE_STATIC([DEFAULT]) 12042cfa76ccdSmrg# ---------------------------- 12043cfa76ccdSmrg# implement the --enable-static flag, and support the 'static' and 12044cfa76ccdSmrg# 'disable-static' LT_INIT options. 12045cfa76ccdSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12046cfa76ccdSmrgm4_define([_LT_ENABLE_STATIC], 12047cfa76ccdSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12048cfa76ccdSmrgAC_ARG_ENABLE([static], 12049cfa76ccdSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12050cfa76ccdSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12051cfa76ccdSmrg [p=${PACKAGE-default} 12052cfa76ccdSmrg case $enableval in 12053cfa76ccdSmrg yes) enable_static=yes ;; 12054cfa76ccdSmrg no) enable_static=no ;; 12055cfa76ccdSmrg *) 12056cfa76ccdSmrg enable_static=no 12057cfa76ccdSmrg # Look at the argument we got. We use all the common list separators. 12058cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12059cfa76ccdSmrg for pkg in $enableval; do 12060cfa76ccdSmrg IFS=$lt_save_ifs 12061cfa76ccdSmrg if test "X$pkg" = "X$p"; then 12062cfa76ccdSmrg enable_static=yes 12063cfa76ccdSmrg fi 12064cfa76ccdSmrg done 12065cfa76ccdSmrg IFS=$lt_save_ifs 12066cfa76ccdSmrg ;; 12067cfa76ccdSmrg esac], 12068cfa76ccdSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12069dbbd9e4bSmacallan 12070cfa76ccdSmrg _LT_DECL([build_old_libs], [enable_static], [0], 12071cfa76ccdSmrg [Whether or not to build static libraries]) 12072cfa76ccdSmrg])# _LT_ENABLE_STATIC 12073cfa76ccdSmrg 12074cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12075cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12076cfa76ccdSmrg 12077cfa76ccdSmrg# Old names: 12078cfa76ccdSmrgAC_DEFUN([AC_ENABLE_STATIC], 12079cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12080dbbd9e4bSmacallan]) 12081cfa76ccdSmrg 12082cfa76ccdSmrgAC_DEFUN([AC_DISABLE_STATIC], 12083cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 12084dbbd9e4bSmacallan]) 12085dbbd9e4bSmacallan 12086cfa76ccdSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12087cfa76ccdSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 120881c397cbaSmrg 12089cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 12090cfa76ccdSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 12091cfa76ccdSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 12092dbbd9e4bSmacallan 12093dbbd9e4bSmacallan 12094dbbd9e4bSmacallan 12095cfa76ccdSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12096cfa76ccdSmrg# ---------------------------------- 12097cfa76ccdSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 12098cfa76ccdSmrg# and 'disable-fast-install' LT_INIT options. 12099cfa76ccdSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12100cfa76ccdSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 12101cfa76ccdSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12102cfa76ccdSmrgAC_ARG_ENABLE([fast-install], 12103cfa76ccdSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12104cfa76ccdSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12105cfa76ccdSmrg [p=${PACKAGE-default} 12106cfa76ccdSmrg case $enableval in 12107cfa76ccdSmrg yes) enable_fast_install=yes ;; 12108cfa76ccdSmrg no) enable_fast_install=no ;; 12109cfa76ccdSmrg *) 12110cfa76ccdSmrg enable_fast_install=no 12111cfa76ccdSmrg # Look at the argument we got. We use all the common list separators. 12112cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12113cfa76ccdSmrg for pkg in $enableval; do 12114cfa76ccdSmrg IFS=$lt_save_ifs 12115cfa76ccdSmrg if test "X$pkg" = "X$p"; then 12116cfa76ccdSmrg enable_fast_install=yes 12117cfa76ccdSmrg fi 12118cfa76ccdSmrg done 12119cfa76ccdSmrg IFS=$lt_save_ifs 12120cfa76ccdSmrg ;; 12121cfa76ccdSmrg esac], 12122cfa76ccdSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12123dbbd9e4bSmacallan 12124cfa76ccdSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 12125cfa76ccdSmrg [Whether or not to optimize for fast installation])dnl 12126cfa76ccdSmrg])# _LT_ENABLE_FAST_INSTALL 12127dbbd9e4bSmacallan 12128cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12129cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12130dbbd9e4bSmacallan 12131cfa76ccdSmrg# Old names: 12132cfa76ccdSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12133cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12134cfa76ccdSmrgAC_DIAGNOSE([obsolete], 12135cfa76ccdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12136cfa76ccdSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12137cfa76ccdSmrg]) 12138dbbd9e4bSmacallan 12139cfa76ccdSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12140cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12141cfa76ccdSmrgAC_DIAGNOSE([obsolete], 12142cfa76ccdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12143cfa76ccdSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12144cfa76ccdSmrg]) 12145dbbd9e4bSmacallan 12146cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 12147cfa76ccdSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12148cfa76ccdSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12149dbbd9e4bSmacallan 12150cfa76ccdSmrg 12151cfa76ccdSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 121521c397cbaSmrg# ---------------------------------- 12153cfa76ccdSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12154cfa76ccdSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12155cfa76ccdSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12156cfa76ccdSmrgm4_define([_LT_WITH_AIX_SONAME], 12157cfa76ccdSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12158cfa76ccdSmrgshared_archive_member_spec= 12159cfa76ccdSmrgcase $host,$enable_shared in 12160cfa76ccdSmrgpower*-*-aix[[5-9]]*,yes) 12161cfa76ccdSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12162cfa76ccdSmrg AC_ARG_WITH([aix-soname], 12163cfa76ccdSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12164cfa76ccdSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12165cfa76ccdSmrg [case $withval in 12166cfa76ccdSmrg aix|svr4|both) 12167cfa76ccdSmrg ;; 12168cfa76ccdSmrg *) 12169cfa76ccdSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12170cfa76ccdSmrg ;; 12171cfa76ccdSmrg esac 12172cfa76ccdSmrg lt_cv_with_aix_soname=$with_aix_soname], 12173cfa76ccdSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12174cfa76ccdSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12175cfa76ccdSmrg with_aix_soname=$lt_cv_with_aix_soname]) 12176cfa76ccdSmrg AC_MSG_RESULT([$with_aix_soname]) 12177cfa76ccdSmrg if test aix != "$with_aix_soname"; then 12178cfa76ccdSmrg # For the AIX way of multilib, we name the shared archive member 12179cfa76ccdSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12180cfa76ccdSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12181cfa76ccdSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12182cfa76ccdSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12183cfa76ccdSmrg if test 64 = "${OBJECT_MODE-32}"; then 12184cfa76ccdSmrg shared_archive_member_spec=shr_64 12185cfa76ccdSmrg else 12186cfa76ccdSmrg shared_archive_member_spec=shr 12187cfa76ccdSmrg fi 12188cfa76ccdSmrg fi 12189cfa76ccdSmrg ;; 12190cfa76ccdSmrg*) 12191cfa76ccdSmrg with_aix_soname=aix 12192cfa76ccdSmrg ;; 12193cfa76ccdSmrgesac 12194cfa76ccdSmrg 12195cfa76ccdSmrg_LT_DECL([], [shared_archive_member_spec], [0], 12196cfa76ccdSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12197cfa76ccdSmrg])# _LT_WITH_AIX_SONAME 12198dbbd9e4bSmacallan 12199cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12200cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12201cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12202cfa76ccdSmrg 12203cfa76ccdSmrg 12204cfa76ccdSmrg# _LT_WITH_PIC([MODE]) 12205cfa76ccdSmrg# -------------------- 12206cfa76ccdSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12207cfa76ccdSmrg# LT_INIT options. 12208cfa76ccdSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12209cfa76ccdSmrgm4_define([_LT_WITH_PIC], 12210cfa76ccdSmrg[AC_ARG_WITH([pic], 12211cfa76ccdSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12212cfa76ccdSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12213cfa76ccdSmrg [lt_p=${PACKAGE-default} 12214cfa76ccdSmrg case $withval in 12215cfa76ccdSmrg yes|no) pic_mode=$withval ;; 12216cfa76ccdSmrg *) 12217cfa76ccdSmrg pic_mode=default 12218cfa76ccdSmrg # Look at the argument we got. We use all the common list separators. 12219cfa76ccdSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12220cfa76ccdSmrg for lt_pkg in $withval; do 12221cfa76ccdSmrg IFS=$lt_save_ifs 12222cfa76ccdSmrg if test "X$lt_pkg" = "X$lt_p"; then 12223cfa76ccdSmrg pic_mode=yes 12224cfa76ccdSmrg fi 12225cfa76ccdSmrg done 12226cfa76ccdSmrg IFS=$lt_save_ifs 12227cfa76ccdSmrg ;; 12228cfa76ccdSmrg esac], 12229cfa76ccdSmrg [pic_mode=m4_default([$1], [default])]) 12230dbbd9e4bSmacallan 12231cfa76ccdSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12232cfa76ccdSmrg])# _LT_WITH_PIC 12233dbbd9e4bSmacallan 12234cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12235cfa76ccdSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12236dbbd9e4bSmacallan 12237cfa76ccdSmrg# Old name: 12238cfa76ccdSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12239cfa76ccdSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12240cfa76ccdSmrgAC_DIAGNOSE([obsolete], 12241cfa76ccdSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12242cfa76ccdSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 12243dbbd9e4bSmacallan]) 12244dbbd9e4bSmacallan 12245cfa76ccdSmrgdnl aclocal-1.4 backwards compatibility: 12246cfa76ccdSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12247cfa76ccdSmrg 12248cfa76ccdSmrg 12249cfa76ccdSmrgm4_define([_LTDL_MODE], []) 12250cfa76ccdSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12251cfa76ccdSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12252cfa76ccdSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12253cfa76ccdSmrg [m4_define([_LTDL_MODE], [recursive])]) 12254cfa76ccdSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12255cfa76ccdSmrg [m4_define([_LTDL_MODE], [subproject])]) 12256cfa76ccdSmrg 12257cfa76ccdSmrgm4_define([_LTDL_TYPE], []) 12258cfa76ccdSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12259cfa76ccdSmrg [m4_define([_LTDL_TYPE], [installable])]) 12260cfa76ccdSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12261cfa76ccdSmrg [m4_define([_LTDL_TYPE], [convenience])]) 12262dbbd9e4bSmacallan 12263cfa76ccdSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12264dbbd9e4bSmacallan# 12265cfa76ccdSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12266cfa76ccdSmrg# Foundation, Inc. 12267cfa76ccdSmrg# Written by Gary V. Vaughan, 2004 12268cfa76ccdSmrg# 12269cfa76ccdSmrg# This file is free software; the Free Software Foundation gives 12270cfa76ccdSmrg# unlimited permission to copy and/or distribute it, with or without 12271cfa76ccdSmrg# modifications, as long as this notice is preserved. 12272dbbd9e4bSmacallan 12273cfa76ccdSmrg# serial 6 ltsugar.m4 12274dbbd9e4bSmacallan 12275cfa76ccdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12276cfa76ccdSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12277cfa76ccdSmrg 12278cfa76ccdSmrg 12279cfa76ccdSmrg# lt_join(SEP, ARG1, [ARG2...]) 12280cfa76ccdSmrg# ----------------------------- 12281cfa76ccdSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12282cfa76ccdSmrg# associated separator. 12283cfa76ccdSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12284cfa76ccdSmrg# versions in m4sugar had bugs. 12285cfa76ccdSmrgm4_define([lt_join], 12286cfa76ccdSmrg[m4_if([$#], [1], [], 12287cfa76ccdSmrg [$#], [2], [[$2]], 12288cfa76ccdSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12289cfa76ccdSmrgm4_define([_lt_join], 12290cfa76ccdSmrg[m4_if([$#$2], [2], [], 12291cfa76ccdSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12292cfa76ccdSmrg 12293cfa76ccdSmrg 12294cfa76ccdSmrg# lt_car(LIST) 12295cfa76ccdSmrg# lt_cdr(LIST) 12296cfa76ccdSmrg# ------------ 12297cfa76ccdSmrg# Manipulate m4 lists. 12298cfa76ccdSmrg# These macros are necessary as long as will still need to support 12299cfa76ccdSmrg# Autoconf-2.59, which quotes differently. 12300cfa76ccdSmrgm4_define([lt_car], [[$1]]) 12301cfa76ccdSmrgm4_define([lt_cdr], 12302cfa76ccdSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12303cfa76ccdSmrg [$#], 1, [], 12304cfa76ccdSmrg [m4_dquote(m4_shift($@))])]) 12305cfa76ccdSmrgm4_define([lt_unquote], $1) 12306dbbd9e4bSmacallan 12307dbbd9e4bSmacallan 12308cfa76ccdSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12309cfa76ccdSmrg# ------------------------------------------ 12310cfa76ccdSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12311cfa76ccdSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12312cfa76ccdSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12313cfa76ccdSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12314cfa76ccdSmrg# than defined and empty). 12315dbbd9e4bSmacallan# 12316cfa76ccdSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12317cfa76ccdSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12318cfa76ccdSmrgm4_define([lt_append], 12319cfa76ccdSmrg[m4_define([$1], 12320cfa76ccdSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12321dbbd9e4bSmacallan 12322dbbd9e4bSmacallan 12323dbbd9e4bSmacallan 12324cfa76ccdSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12325cfa76ccdSmrg# ---------------------------------------------------------- 12326cfa76ccdSmrg# Produce a SEP delimited list of all paired combinations of elements of 12327cfa76ccdSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12328cfa76ccdSmrg# has the form PREFIXmINFIXSUFFIXn. 12329cfa76ccdSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12330cfa76ccdSmrgm4_define([lt_combine], 12331cfa76ccdSmrg[m4_if(m4_eval([$# > 3]), [1], 12332cfa76ccdSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12333cfa76ccdSmrg[[m4_foreach([_Lt_prefix], [$2], 12334cfa76ccdSmrg [m4_foreach([_Lt_suffix], 12335cfa76ccdSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12336cfa76ccdSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12337dbbd9e4bSmacallan 12338dbbd9e4bSmacallan 12339cfa76ccdSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12340cfa76ccdSmrg# ----------------------------------------------------------------------- 12341cfa76ccdSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12342cfa76ccdSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12343cfa76ccdSmrgm4_define([lt_if_append_uniq], 12344cfa76ccdSmrg[m4_ifdef([$1], 12345cfa76ccdSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12346cfa76ccdSmrg [lt_append([$1], [$2], [$3])$4], 12347cfa76ccdSmrg [$5])], 12348cfa76ccdSmrg [lt_append([$1], [$2], [$3])$4])]) 12349dbbd9e4bSmacallan 12350dbbd9e4bSmacallan 12351cfa76ccdSmrg# lt_dict_add(DICT, KEY, VALUE) 12352cfa76ccdSmrg# ----------------------------- 12353cfa76ccdSmrgm4_define([lt_dict_add], 12354cfa76ccdSmrg[m4_define([$1($2)], [$3])]) 123551c397cbaSmrg 12356e96acad6Smrg 12357cfa76ccdSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12358cfa76ccdSmrg# -------------------------------------------- 12359cfa76ccdSmrgm4_define([lt_dict_add_subkey], 12360cfa76ccdSmrg[m4_define([$1($2:$3)], [$4])]) 12361cfa76ccdSmrg 12362e96acad6Smrg 12363cfa76ccdSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12364cfa76ccdSmrg# ---------------------------------- 12365cfa76ccdSmrgm4_define([lt_dict_fetch], 12366cfa76ccdSmrg[m4_ifval([$3], 12367cfa76ccdSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12368cfa76ccdSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12369e96acad6Smrg 12370dbbd9e4bSmacallan 12371cfa76ccdSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12372cfa76ccdSmrg# ----------------------------------------------------------------- 12373cfa76ccdSmrgm4_define([lt_if_dict_fetch], 12374cfa76ccdSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12375cfa76ccdSmrg [$5], 12376cfa76ccdSmrg [$6])]) 12377dbbd9e4bSmacallan 12378dbbd9e4bSmacallan 12379cfa76ccdSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12380cfa76ccdSmrg# -------------------------------------------------------------- 12381cfa76ccdSmrgm4_define([lt_dict_filter], 12382cfa76ccdSmrg[m4_if([$5], [], [], 12383cfa76ccdSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12384cfa76ccdSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12385cfa76ccdSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12386cfa76ccdSmrg]) 12387cfa76ccdSmrg 12388cfa76ccdSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12389dbbd9e4bSmacallan# 12390cfa76ccdSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12391cfa76ccdSmrg# Inc. 12392cfa76ccdSmrg# Written by Scott James Remnant, 2004 12393cfa76ccdSmrg# 12394cfa76ccdSmrg# This file is free software; the Free Software Foundation gives 12395cfa76ccdSmrg# unlimited permission to copy and/or distribute it, with or without 12396cfa76ccdSmrg# modifications, as long as this notice is preserved. 12397dbbd9e4bSmacallan 12398cfa76ccdSmrg# @configure_input@ 12399dbbd9e4bSmacallan 12400cfa76ccdSmrg# serial 4245 ltversion.m4 12401cfa76ccdSmrg# This file is part of GNU Libtool 124021c397cbaSmrg 12403cfa76ccdSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12404cfa76ccdSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12405dbbd9e4bSmacallan 12406cfa76ccdSmrgAC_DEFUN([LTVERSION_VERSION], 12407cfa76ccdSmrg[macro_version='2.4.7' 12408cfa76ccdSmrgmacro_revision='2.4.7' 12409cfa76ccdSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12410cfa76ccdSmrg_LT_DECL(, macro_revision, 0) 12411cfa76ccdSmrg]) 12412dbbd9e4bSmacallan 12413cfa76ccdSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12414dbbd9e4bSmacallan# 12415cfa76ccdSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12416cfa76ccdSmrg# Software Foundation, Inc. 12417cfa76ccdSmrg# Written by Scott James Remnant, 2004. 12418dbbd9e4bSmacallan# 12419cfa76ccdSmrg# This file is free software; the Free Software Foundation gives 12420cfa76ccdSmrg# unlimited permission to copy and/or distribute it, with or without 12421cfa76ccdSmrg# modifications, as long as this notice is preserved. 12422dbbd9e4bSmacallan 12423cfa76ccdSmrg# serial 5 lt~obsolete.m4 12424dbbd9e4bSmacallan 12425cfa76ccdSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 12426cfa76ccdSmrg# 12427cfa76ccdSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12428cfa76ccdSmrg# which have later been changed to m4_define as they aren't part of the 12429cfa76ccdSmrg# exported API, or moved to Autoconf or Automake where they belong. 12430cfa76ccdSmrg# 12431cfa76ccdSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12432cfa76ccdSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12433cfa76ccdSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 12434cfa76ccdSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12435cfa76ccdSmrg# and doesn't know about Autoconf macros at all.) 12436cfa76ccdSmrg# 12437cfa76ccdSmrg# So we provide this file, which has a silly filename so it's always 12438cfa76ccdSmrg# included after everything else. This provides aclocal with the 12439cfa76ccdSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12440cfa76ccdSmrg# because those macros already exist, or will be overwritten later. 12441cfa76ccdSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12442cfa76ccdSmrg# 12443cfa76ccdSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12444cfa76ccdSmrg# Yes, that means every name once taken will need to remain here until 12445cfa76ccdSmrg# we give up compatibility with versions before 1.7, at which point 12446cfa76ccdSmrg# we need to keep only those names which we still refer to. 12447dbbd9e4bSmacallan 12448cfa76ccdSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12449cfa76ccdSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12450cfa76ccdSmrg 12451cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12452cfa76ccdSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12453cfa76ccdSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12454cfa76ccdSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12455cfa76ccdSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12456cfa76ccdSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12457cfa76ccdSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12458cfa76ccdSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12459cfa76ccdSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12460cfa76ccdSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12461cfa76ccdSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12462cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12463cfa76ccdSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12464cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12465cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12466cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12467cfa76ccdSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12468cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12469cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12470cfa76ccdSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12471cfa76ccdSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12472cfa76ccdSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12473cfa76ccdSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12474cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12475cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12476cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12477cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12478cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12479cfa76ccdSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12480cfa76ccdSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12481cfa76ccdSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12482cfa76ccdSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12483cfa76ccdSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12484cfa76ccdSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12485cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12486cfa76ccdSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12487cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12488cfa76ccdSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12489cfa76ccdSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12490cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12491cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12492cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12493cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12494cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12495cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12496cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12497cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12498cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12499cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12500cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12501cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12502cfa76ccdSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12503cfa76ccdSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12504cfa76ccdSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12505cfa76ccdSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12506cfa76ccdSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12507cfa76ccdSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12508cfa76ccdSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12509cfa76ccdSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12510cfa76ccdSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12511cfa76ccdSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12512dbbd9e4bSmacallan 12513