1621f50c3Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 21a9c160aSmrg 3621f50c3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 43eed67faSmbalmer 53eed67faSmbalmer# This file is free software; the Free Software Foundation 63eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 73eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 83eed67faSmbalmer 93eed67faSmbalmer# This program is distributed in the hope that it will be useful, 103eed67faSmbalmer# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 113eed67faSmbalmer# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 123eed67faSmbalmer# PARTICULAR PURPOSE. 133eed67faSmbalmer 141a9c160aSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15dc407927Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16dc407927Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17901a7df4Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, 18901a7df4Smrg[m4_warning([this file was generated for autoconf 2.72. 19dc407927SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20dc407927SmrgIf you have problems, you may need to regenerate the build system entirely. 211a9c160aSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22dc407927Smrg 23621f50c3Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24dc407927Smrg# 25621f50c3Smrg# This file is free software; the Free Software Foundation 26621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 27621f50c3Smrg# with or without modifications, as long as this notice is preserved. 281a9c160aSmrg 29621f50c3Smrg# AM_AUTOMAKE_VERSION(VERSION) 30621f50c3Smrg# ---------------------------- 31621f50c3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32621f50c3Smrg# generated from the m4 files accompanying Automake X.Y. 33621f50c3Smrg# (This private macro should not be called outside this file.) 34621f50c3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35621f50c3Smrg[am__api_version='1.16' 36621f50c3Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37621f50c3Smrgdnl require some minimum version. Point them to the right macro. 38621f50c3Smrgm4_if([$1], [1.16.5], [], 39621f50c3Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40dc407927Smrg]) 413eed67faSmbalmer 42621f50c3Smrg# _AM_AUTOCONF_VERSION(VERSION) 43621f50c3Smrg# ----------------------------- 44621f50c3Smrg# aclocal traces this macro to find the Autoconf version. 45621f50c3Smrg# This is a private macro too. Using m4_define simplifies 46621f50c3Smrg# the logic in aclocal, which can simply ignore this definition. 47621f50c3Smrgm4_define([_AM_AUTOCONF_VERSION], []) 483eed67faSmbalmer 49621f50c3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50621f50c3Smrg# ------------------------------- 51621f50c3Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52621f50c3Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53621f50c3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54621f50c3Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55621f50c3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56621f50c3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57621f50c3Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 583eed67faSmbalmer 59621f50c3Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 603eed67faSmbalmer 61621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62621f50c3Smrg# 63621f50c3Smrg# This file is free software; the Free Software Foundation 64621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 65621f50c3Smrg# with or without modifications, as long as this notice is preserved. 663eed67faSmbalmer 67621f50c3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68621f50c3Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69621f50c3Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70621f50c3Smrg# 71621f50c3Smrg# Of course, Automake must honor this variable whenever it calls a 72621f50c3Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 73621f50c3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74621f50c3Smrg# depending on how configure is run. This is pretty annoying, since 75621f50c3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76621f50c3Smrg# source directory, any form will work fine, but in subdirectories a 77621f50c3Smrg# relative path needs to be adjusted first. 78621f50c3Smrg# 79621f50c3Smrg# $ac_aux_dir/missing 80621f50c3Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 81621f50c3Smrg# $top_srcdir/$ac_aux_dir/missing 82621f50c3Smrg# fails if $ac_aux_dir is absolute, 83621f50c3Smrg# fails when called from a subdirectory in a VPATH build with 84621f50c3Smrg# a relative $ac_aux_dir 85621f50c3Smrg# 86621f50c3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87621f50c3Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88621f50c3Smrg# harmless because $srcdir is '.', but things will broke when you 89621f50c3Smrg# start a VPATH build or use an absolute $srcdir. 90621f50c3Smrg# 91621f50c3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92621f50c3Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93621f50c3Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94621f50c3Smrg# and then we would define $MISSING as 95621f50c3Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 96621f50c3Smrg# This will work as long as MISSING is not called from configure, because 97621f50c3Smrg# unfortunately $(top_srcdir) has no meaning in configure. 98621f50c3Smrg# However there are other variables, like CC, which are often used in 99621f50c3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100621f50c3Smrg# 101621f50c3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 102621f50c3Smrg# absolute PATH. The drawback is that using absolute paths prevent a 103621f50c3Smrg# configured tree to be moved without reconfiguration. 104621f50c3Smrg 105621f50c3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106621f50c3Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107621f50c3Smrg# Expand $ac_aux_dir to an absolute path. 108621f50c3Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109dc407927Smrg]) 110dc407927Smrg 111621f50c3Smrg# AM_CONDITIONAL -*- Autoconf -*- 112dc407927Smrg 113621f50c3Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114621f50c3Smrg# 115621f50c3Smrg# This file is free software; the Free Software Foundation 116621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 117621f50c3Smrg# with or without modifications, as long as this notice is preserved. 118dc407927Smrg 119621f50c3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120621f50c3Smrg# ------------------------------------- 121621f50c3Smrg# Define a conditional. 122621f50c3SmrgAC_DEFUN([AM_CONDITIONAL], 123621f50c3Smrg[AC_PREREQ([2.52])dnl 124621f50c3Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125621f50c3Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126621f50c3SmrgAC_SUBST([$1_TRUE])dnl 127621f50c3SmrgAC_SUBST([$1_FALSE])dnl 128621f50c3Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129621f50c3Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130621f50c3Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131621f50c3Smrgif $2; then 132621f50c3Smrg $1_TRUE= 133621f50c3Smrg $1_FALSE='#' 134621f50c3Smrgelse 135621f50c3Smrg $1_TRUE='#' 136621f50c3Smrg $1_FALSE= 137621f50c3Smrgfi 138621f50c3SmrgAC_CONFIG_COMMANDS_PRE( 139621f50c3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140621f50c3Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 141621f50c3SmrgUsually this means the macro was only invoked conditionally.]]) 142621f50c3Smrgfi])]) 143dc407927Smrg 144621f50c3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145621f50c3Smrg# 146621f50c3Smrg# This file is free software; the Free Software Foundation 147621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 148621f50c3Smrg# with or without modifications, as long as this notice is preserved. 149dd0822caSmrg 1503eed67faSmbalmer 151621f50c3Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152621f50c3Smrg# written in clear, in which case automake, when reading aclocal.m4, 153621f50c3Smrg# will think it sees a *use*, and therefore will trigger all it's 154621f50c3Smrg# C support machinery. Also note that it means that autoscan, seeing 155621f50c3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1563eed67faSmbalmer 1573eed67faSmbalmer 158621f50c3Smrg# _AM_DEPENDENCIES(NAME) 159621f50c3Smrg# ---------------------- 160621f50c3Smrg# See how the compiler implements dependency checking. 161621f50c3Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162621f50c3Smrg# We try a few techniques and use that to set a single cache variable. 163621f50c3Smrg# 164621f50c3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165621f50c3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166621f50c3Smrg# dependency, and given that the user is not expected to run this macro, 167621f50c3Smrg# just rely on AC_PROG_CC. 168621f50c3SmrgAC_DEFUN([_AM_DEPENDENCIES], 169621f50c3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170621f50c3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171621f50c3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172621f50c3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1733eed67faSmbalmer 174621f50c3Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175621f50c3Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176621f50c3Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177621f50c3Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178621f50c3Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179621f50c3Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180621f50c3Smrg [depcc="$$1" am_compiler_list=]) 1813eed67faSmbalmer 182621f50c3SmrgAC_CACHE_CHECK([dependency style of $depcc], 183621f50c3Smrg [am_cv_$1_dependencies_compiler_type], 184621f50c3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185621f50c3Smrg # We make a subdir and do the tests there. Otherwise we can end up 186621f50c3Smrg # making bogus files that we don't know about and never remove. For 187621f50c3Smrg # instance it was reported that on HP-UX the gcc test will end up 188621f50c3Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189621f50c3Smrg # in D". 190621f50c3Smrg rm -rf conftest.dir 191621f50c3Smrg mkdir conftest.dir 192621f50c3Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 193621f50c3Smrg # using a relative directory. 194621f50c3Smrg cp "$am_depcomp" conftest.dir 195621f50c3Smrg cd conftest.dir 196621f50c3Smrg # We will build objects and dependencies in a subdirectory because 197621f50c3Smrg # it helps to detect inapplicable dependency modes. For instance 198621f50c3Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 199621f50c3Smrg # side effect of compilation, but ICC will put the dependencies in 200621f50c3Smrg # the current directory while Tru64 will put them in the object 201621f50c3Smrg # directory. 202621f50c3Smrg mkdir sub 203dc407927Smrg 204621f50c3Smrg am_cv_$1_dependencies_compiler_type=none 205621f50c3Smrg if test "$am_compiler_list" = ""; then 206621f50c3Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207621f50c3Smrg fi 208621f50c3Smrg am__universal=false 209621f50c3Smrg m4_case([$1], [CC], 210621f50c3Smrg [case " $depcc " in #( 211621f50c3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212621f50c3Smrg esac], 213621f50c3Smrg [CXX], 214621f50c3Smrg [case " $depcc " in #( 215621f50c3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216621f50c3Smrg esac]) 217dc407927Smrg 218621f50c3Smrg for depmode in $am_compiler_list; do 219621f50c3Smrg # Setup a source with many dependencies, because some compilers 220621f50c3Smrg # like to wrap large dependency lists on column 80 (with \), and 221621f50c3Smrg # we should not choose a depcomp mode which is confused by this. 222621f50c3Smrg # 223621f50c3Smrg # We need to recreate these files for each test, as the compiler may 224621f50c3Smrg # overwrite some of them when testing with obscure command lines. 225621f50c3Smrg # This happens at least with the AIX C compiler. 226621f50c3Smrg : > sub/conftest.c 227621f50c3Smrg for i in 1 2 3 4 5 6; do 228621f50c3Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229621f50c3Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230621f50c3Smrg # Solaris 10 /bin/sh. 231621f50c3Smrg echo '/* dummy */' > sub/conftst$i.h 2321a9c160aSmrg done 233621f50c3Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2341a9c160aSmrg 235621f50c3Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236621f50c3Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237621f50c3Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238621f50c3Smrg # versions had trouble with output in subdirs. 239621f50c3Smrg am__obj=sub/conftest.${OBJEXT-o} 240621f50c3Smrg am__minus_obj="-o $am__obj" 241621f50c3Smrg case $depmode in 242621f50c3Smrg gcc) 243621f50c3Smrg # This depmode causes a compiler race in universal mode. 244621f50c3Smrg test "$am__universal" = false || continue 245621f50c3Smrg ;; 246621f50c3Smrg nosideeffect) 247621f50c3Smrg # After this tag, mechanisms are not by side-effect, so they'll 248621f50c3Smrg # only be used when explicitly requested. 249621f50c3Smrg if test "x$enable_dependency_tracking" = xyes; then 250621f50c3Smrg continue 251621f50c3Smrg else 252621f50c3Smrg break 253621f50c3Smrg fi 254621f50c3Smrg ;; 255621f50c3Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256621f50c3Smrg # This compiler won't grok '-c -o', but also, the minuso test has 257621f50c3Smrg # not run yet. These depmodes are late enough in the game, and 258621f50c3Smrg # so weak that their functioning should not be impacted. 259621f50c3Smrg am__obj=conftest.${OBJEXT-o} 260621f50c3Smrg am__minus_obj= 261621f50c3Smrg ;; 262621f50c3Smrg none) break ;; 263621f50c3Smrg esac 264621f50c3Smrg if depmode=$depmode \ 265621f50c3Smrg source=sub/conftest.c object=$am__obj \ 266621f50c3Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267621f50c3Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268621f50c3Smrg >/dev/null 2>conftest.err && 269621f50c3Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270621f50c3Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271621f50c3Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272621f50c3Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273621f50c3Smrg # icc doesn't choke on unknown options, it will just issue warnings 274621f50c3Smrg # or remarks (even with -Werror). So we grep stderr for any message 275621f50c3Smrg # that says an option was ignored or not supported. 276621f50c3Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277621f50c3Smrg # icc: Command line warning: ignoring option '-M'; no argument required 278621f50c3Smrg # The diagnosis changed in icc 8.0: 279621f50c3Smrg # icc: Command line remark: option '-MP' not supported 280621f50c3Smrg if (grep 'ignoring option' conftest.err || 281621f50c3Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282621f50c3Smrg am_cv_$1_dependencies_compiler_type=$depmode 283621f50c3Smrg break 284621f50c3Smrg fi 285621f50c3Smrg fi 286621f50c3Smrg done 2871a9c160aSmrg 288621f50c3Smrg cd .. 289621f50c3Smrg rm -rf conftest.dir 290621f50c3Smrgelse 291621f50c3Smrg am_cv_$1_dependencies_compiler_type=none 292621f50c3Smrgfi 293621f50c3Smrg]) 294621f50c3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295621f50c3SmrgAM_CONDITIONAL([am__fastdep$1], [ 296621f50c3Smrg test "x$enable_dependency_tracking" != xno \ 297621f50c3Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298dc407927Smrg]) 299dc407927Smrg 300dc407927Smrg 301621f50c3Smrg# AM_SET_DEPDIR 302621f50c3Smrg# ------------- 303621f50c3Smrg# Choose a directory name for dependency files. 304621f50c3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305621f50c3SmrgAC_DEFUN([AM_SET_DEPDIR], 306621f50c3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307621f50c3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308621f50c3Smrg]) 309dd0822caSmrg 310dc407927Smrg 311621f50c3Smrg# AM_DEP_TRACK 312621f50c3Smrg# ------------ 313621f50c3SmrgAC_DEFUN([AM_DEP_TRACK], 314621f50c3Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315621f50c3SmrgAS_HELP_STRING( 316621f50c3Smrg [--enable-dependency-tracking], 317621f50c3Smrg [do not reject slow dependency extractors]) 318621f50c3SmrgAS_HELP_STRING( 319621f50c3Smrg [--disable-dependency-tracking], 320621f50c3Smrg [speeds up one-time build])]) 321621f50c3Smrgif test "x$enable_dependency_tracking" != xno; then 322621f50c3Smrg am_depcomp="$ac_aux_dir/depcomp" 323621f50c3Smrg AMDEPBACKSLASH='\' 324621f50c3Smrg am__nodep='_no' 325dc407927Smrgfi 326621f50c3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327621f50c3SmrgAC_SUBST([AMDEPBACKSLASH])dnl 328621f50c3Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329621f50c3SmrgAC_SUBST([am__nodep])dnl 330621f50c3Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331dc407927Smrg]) 3323eed67faSmbalmer 333621f50c3Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334dc407927Smrg 335621f50c3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336621f50c3Smrg# 337621f50c3Smrg# This file is free software; the Free Software Foundation 338621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 339621f50c3Smrg# with or without modifications, as long as this notice is preserved. 3403eed67faSmbalmer 341621f50c3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342621f50c3Smrg# ------------------------------ 343621f50c3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344621f50c3Smrg[{ 345621f50c3Smrg # Older Autoconf quotes --file arguments for eval, but not when files 346621f50c3Smrg # are listed without --file. Let's play safe and only enable the eval 347621f50c3Smrg # if we detect the quoting. 348621f50c3Smrg # TODO: see whether this extra hack can be removed once we start 349621f50c3Smrg # requiring Autoconf 2.70 or later. 350621f50c3Smrg AS_CASE([$CONFIG_FILES], 351621f50c3Smrg [*\'*], [eval set x "$CONFIG_FILES"], 352621f50c3Smrg [*], [set x $CONFIG_FILES]) 353621f50c3Smrg shift 354621f50c3Smrg # Used to flag and report bootstrapping failures. 355621f50c3Smrg am_rc=0 356621f50c3Smrg for am_mf 357621f50c3Smrg do 358621f50c3Smrg # Strip MF so we end up with the name of the file. 359621f50c3Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360621f50c3Smrg # Check whether this is an Automake generated Makefile which includes 361621f50c3Smrg # dependency-tracking related rules and includes. 362621f50c3Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 363621f50c3Smrg # limit of 2048, but all sed's we know have understand at least 4000. 364621f50c3Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365621f50c3Smrg || continue 366621f50c3Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367621f50c3Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 368621f50c3Smrg AM_RUN_LOG([cd "$am_dirpart" \ 369621f50c3Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370621f50c3Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 371621f50c3Smrg done 372621f50c3Smrg if test $am_rc -ne 0; then 373621f50c3Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374621f50c3Smrg for automatic dependency tracking. If GNU make was not used, consider 375621f50c3Smrg re-running the configure script with MAKE="gmake" (or whatever is 376621f50c3Smrg necessary). You can also try re-running configure with the 377621f50c3Smrg '--disable-dependency-tracking' option to at least be able to build 378621f50c3Smrg the package (albeit without support for automatic dependency tracking).]) 3793eed67faSmbalmer fi 380621f50c3Smrg AS_UNSET([am_dirpart]) 381621f50c3Smrg AS_UNSET([am_filepart]) 382621f50c3Smrg AS_UNSET([am_mf]) 383621f50c3Smrg AS_UNSET([am_rc]) 384621f50c3Smrg rm -f conftest-deps.mk 385621f50c3Smrg} 386621f50c3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3873eed67faSmbalmer 3883eed67faSmbalmer 389621f50c3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390621f50c3Smrg# ----------------------------- 391621f50c3Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 392621f50c3Smrg# 393621f50c3Smrg# This code is only required when automatic dependency tracking is enabled. 394621f50c3Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395621f50c3Smrg# order to bootstrap the dependency handling code. 396621f50c3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397621f50c3Smrg[AC_CONFIG_COMMANDS([depfiles], 398621f50c3Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399621f50c3Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4003eed67faSmbalmer 401621f50c3Smrg# Do all the work for Automake. -*- Autoconf -*- 4023eed67faSmbalmer 403621f50c3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404621f50c3Smrg# 405621f50c3Smrg# This file is free software; the Free Software Foundation 406621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 407621f50c3Smrg# with or without modifications, as long as this notice is preserved. 4083eed67faSmbalmer 409621f50c3Smrg# This macro actually does too much. Some checks are only needed if 410621f50c3Smrg# your package does certain things. But this isn't really a big deal. 4113eed67faSmbalmer 412621f50c3Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413621f50c3Smrgm4_define([AC_PROG_CC], 414621f50c3Smrgm4_defn([AC_PROG_CC]) 415621f50c3Smrg[_AM_PROG_CC_C_O 416621f50c3Smrg]) 4173eed67faSmbalmer 418621f50c3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419621f50c3Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 420621f50c3Smrg# ----------------------------------------------- 421621f50c3Smrg# The call with PACKAGE and VERSION arguments is the old style 422621f50c3Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423621f50c3Smrg# and VERSION should now be passed to AC_INIT and removed from 424621f50c3Smrg# the call to AM_INIT_AUTOMAKE. 425621f50c3Smrg# We support both call styles for the transition. After 426621f50c3Smrg# the next Automake release, Autoconf can make the AC_INIT 427621f50c3Smrg# arguments mandatory, and then we can depend on a new Autoconf 428621f50c3Smrg# release and drop the old call support. 429621f50c3SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430621f50c3Smrg[AC_PREREQ([2.65])dnl 431621f50c3Smrgm4_ifdef([_$0_ALREADY_INIT], 432621f50c3Smrg [m4_fatal([$0 expanded multiple times 433621f50c3Smrg]m4_defn([_$0_ALREADY_INIT]))], 434621f50c3Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435621f50c3Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436621f50c3Smrgdnl the ones we care about. 437621f50c3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438621f50c3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439621f50c3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440621f50c3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441621f50c3Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442621f50c3Smrg # is not polluted with repeated "-I." 443621f50c3Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444621f50c3Smrg # test to see if srcdir already configured 445621f50c3Smrg if test -f $srcdir/config.status; then 446621f50c3Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447621f50c3Smrg fi 448621f50c3Smrgfi 449dd0822caSmrg 450621f50c3Smrg# test whether we have cygpath 451621f50c3Smrgif test -z "$CYGPATH_W"; then 452621f50c3Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 453621f50c3Smrg CYGPATH_W='cygpath -w' 454621f50c3Smrg else 455621f50c3Smrg CYGPATH_W=echo 456621f50c3Smrg fi 457621f50c3Smrgfi 458621f50c3SmrgAC_SUBST([CYGPATH_W]) 459dd0822caSmrg 460621f50c3Smrg# Define the identity of the package. 461621f50c3Smrgdnl Distinguish between old-style and new-style calls. 462621f50c3Smrgm4_ifval([$2], 463621f50c3Smrg[AC_DIAGNOSE([obsolete], 464621f50c3Smrg [$0: two- and three-arguments forms are deprecated.]) 465621f50c3Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466621f50c3Smrg AC_SUBST([PACKAGE], [$1])dnl 467621f50c3Smrg AC_SUBST([VERSION], [$2])], 468621f50c3Smrg[_AM_SET_OPTIONS([$1])dnl 469621f50c3Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470621f50c3Smrgm4_if( 471621f50c3Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472621f50c3Smrg [ok:ok],, 473621f50c3Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474621f50c3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475621f50c3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476dd0822caSmrg 477621f50c3Smrg_AM_IF_OPTION([no-define],, 478621f50c3Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479621f50c3Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480dd0822caSmrg 481621f50c3Smrg# Some tools Automake needs. 482621f50c3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483621f50c3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484621f50c3SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485621f50c3SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486621f50c3SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487621f50c3SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488621f50c3SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489621f50c3SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490621f50c3SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491621f50c3SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492621f50c3Smrg# For better backward compatibility. To be removed once Automake 1.9.x 493621f50c3Smrg# dies out for good. For more background, see: 494621f50c3Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495621f50c3Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496621f50c3SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497621f50c3Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498621f50c3Smrg# system "awk" is bad on some platforms. 499621f50c3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 500621f50c3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501621f50c3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502621f50c3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503621f50c3Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504621f50c3Smrg [_AM_PROG_TAR([v7])])]) 505621f50c3Smrg_AM_IF_OPTION([no-dependencies],, 506621f50c3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507621f50c3Smrg [_AM_DEPENDENCIES([CC])], 508621f50c3Smrg [m4_define([AC_PROG_CC], 509621f50c3Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511621f50c3Smrg [_AM_DEPENDENCIES([CXX])], 512621f50c3Smrg [m4_define([AC_PROG_CXX], 513621f50c3Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515621f50c3Smrg [_AM_DEPENDENCIES([OBJC])], 516621f50c3Smrg [m4_define([AC_PROG_OBJC], 517621f50c3Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519621f50c3Smrg [_AM_DEPENDENCIES([OBJCXX])], 520621f50c3Smrg [m4_define([AC_PROG_OBJCXX], 521621f50c3Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522dd0822caSmrg]) 523621f50c3Smrg# Variables for tags utilities; see am/tags.am 524621f50c3Smrgif test -z "$CTAGS"; then 525621f50c3Smrg CTAGS=ctags 526621f50c3Smrgfi 527621f50c3SmrgAC_SUBST([CTAGS]) 528621f50c3Smrgif test -z "$ETAGS"; then 529621f50c3Smrg ETAGS=etags 530621f50c3Smrgfi 531621f50c3SmrgAC_SUBST([ETAGS]) 532621f50c3Smrgif test -z "$CSCOPE"; then 533621f50c3Smrg CSCOPE=cscope 534621f50c3Smrgfi 535621f50c3SmrgAC_SUBST([CSCOPE]) 536dd0822caSmrg 537621f50c3SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538621f50c3Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 539621f50c3Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540621f50c3Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541621f50c3SmrgAC_CONFIG_COMMANDS_PRE(dnl 542621f50c3Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543621f50c3Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544dc407927Smrg 545621f50c3Smrg# POSIX will say in a future version that running "rm -f" with no argument 546621f50c3Smrg# is OK; and we want to be able to make that assumption in our Makefile 547621f50c3Smrg# recipes. So use an aggressive probe to check that the usage we want is 548621f50c3Smrg# actually supported "in the wild" to an acceptable degree. 549621f50c3Smrg# See automake bug#10828. 550621f50c3Smrg# To make any issue more visible, cause the running configure to be aborted 551621f50c3Smrg# by default if the 'rm' program in use doesn't match our expectations; the 552621f50c3Smrg# user can still override this though. 553621f50c3Smrgif rm -f && rm -fr && rm -rf; then : OK; else 554621f50c3Smrg cat >&2 <<'END' 555621f50c3SmrgOops! 556dc407927Smrg 557621f50c3SmrgYour 'rm' program seems unable to run without file operands specified 558621f50c3Smrgon the command line, even when the '-f' option is present. This is contrary 559621f50c3Smrgto the behaviour of most rm programs out there, and not conforming with 560621f50c3Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561dc407927Smrg 562621f50c3SmrgPlease tell bug-automake@gnu.org about your system, including the value 563621f50c3Smrgof your $PATH and any error possibly output before this message. This 564621f50c3Smrgcan help us improve future automake versions. 565dc407927Smrg 566621f50c3SmrgEND 567621f50c3Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568621f50c3Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 569621f50c3Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570621f50c3Smrg echo >&2 571621f50c3Smrg else 572621f50c3Smrg cat >&2 <<'END' 573621f50c3SmrgAborting the configuration process, to ensure you take notice of the issue. 574dc407927Smrg 575621f50c3SmrgYou can download and install GNU coreutils to get an 'rm' implementation 576621f50c3Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577dc407927Smrg 578621f50c3SmrgIf you want to complete the configuration process using your problematic 579621f50c3Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580621f50c3Smrgto "yes", and re-run configure. 581dc407927Smrg 582621f50c3SmrgEND 583621f50c3Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584621f50c3Smrg fi 585621f50c3Smrgfi 586621f50c3Smrgdnl The trailing newline in this macro's definition is deliberate, for 587621f50c3Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588621f50c3Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589dc407927Smrg]) 590dc407927Smrg 591621f50c3Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592621f50c3Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593621f50c3Smrgdnl mangled by Autoconf and run in a shell conditional statement. 594621f50c3Smrgm4_define([_AC_COMPILER_EXEEXT], 595621f50c3Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596dc407927Smrg 597621f50c3Smrg# When config.status generates a header, we must update the stamp-h file. 598621f50c3Smrg# This file resides in the same directory as the config header 599621f50c3Smrg# that is generated. The stamp files are numbered to have different names. 600dc407927Smrg 601621f50c3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602621f50c3Smrg# loop where config.status creates the headers, so we can generate 603621f50c3Smrg# our stamp files there. 604621f50c3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605621f50c3Smrg[# Compute $1's index in $config_headers. 606621f50c3Smrg_am_arg=$1 607621f50c3Smrg_am_stamp_count=1 608621f50c3Smrgfor _am_header in $config_headers :; do 609621f50c3Smrg case $_am_header in 610621f50c3Smrg $_am_arg | $_am_arg:* ) 611621f50c3Smrg break ;; 612621f50c3Smrg * ) 613621f50c3Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614621f50c3Smrg esac 615621f50c3Smrgdone 616621f50c3Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617dc407927Smrg 618621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619621f50c3Smrg# 620621f50c3Smrg# This file is free software; the Free Software Foundation 621621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 622621f50c3Smrg# with or without modifications, as long as this notice is preserved. 623dc407927Smrg 624621f50c3Smrg# AM_PROG_INSTALL_SH 625621f50c3Smrg# ------------------ 626621f50c3Smrg# Define $install_sh. 627621f50c3SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628621f50c3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629621f50c3Smrgif test x"${install_sh+set}" != xset; then 630621f50c3Smrg case $am_aux_dir in 631621f50c3Smrg *\ * | *\ *) 632621f50c3Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633621f50c3Smrg *) 634621f50c3Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635621f50c3Smrg esac 636621f50c3Smrgfi 637621f50c3SmrgAC_SUBST([install_sh])]) 638dc407927Smrg 639621f50c3Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640621f50c3Smrg# 641621f50c3Smrg# This file is free software; the Free Software Foundation 642621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 643621f50c3Smrg# with or without modifications, as long as this notice is preserved. 644dc407927Smrg 645621f50c3Smrg# Check whether the underlying file-system supports filenames 646621f50c3Smrg# with a leading dot. For instance MS-DOS doesn't. 647621f50c3SmrgAC_DEFUN([AM_SET_LEADING_DOT], 648621f50c3Smrg[rm -rf .tst 2>/dev/null 649621f50c3Smrgmkdir .tst 2>/dev/null 650621f50c3Smrgif test -d .tst; then 651621f50c3Smrg am__leading_dot=. 652621f50c3Smrgelse 653621f50c3Smrg am__leading_dot=_ 654621f50c3Smrgfi 655621f50c3Smrgrmdir .tst 2>/dev/null 656621f50c3SmrgAC_SUBST([am__leading_dot])]) 657dc407927Smrg 658621f50c3Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659dc407927Smrg 660621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661621f50c3Smrg# 662621f50c3Smrg# This file is free software; the Free Software Foundation 663621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 664621f50c3Smrg# with or without modifications, as long as this notice is preserved. 665dc407927Smrg 666621f50c3Smrg# AM_MAKE_INCLUDE() 667621f50c3Smrg# ----------------- 668621f50c3Smrg# Check whether make has an 'include' directive that can support all 669621f50c3Smrg# the idioms we need for our automatic dependency tracking code. 670621f50c3SmrgAC_DEFUN([AM_MAKE_INCLUDE], 671621f50c3Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672621f50c3Smrgcat > confinc.mk << 'END' 673621f50c3Smrgam__doit: 674621f50c3Smrg @echo this is the am__doit target >confinc.out 675621f50c3Smrg.PHONY: am__doit 676621f50c3SmrgEND 677621f50c3Smrgam__include="#" 678621f50c3Smrgam__quote= 679621f50c3Smrg# BSD make does it like this. 680621f50c3Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681621f50c3Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682621f50c3Smrgecho 'include confinc.mk # ignored' > confmf.GNU 683621f50c3Smrg_am_result=no 684621f50c3Smrgfor s in GNU BSD; do 685621f50c3Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686621f50c3Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687621f50c3Smrg ['0:this is the am__doit target'], 688621f50c3Smrg [AS_CASE([$s], 689621f50c3Smrg [BSD], [am__include='.include' am__quote='"'], 690621f50c3Smrg [am__include='include' am__quote=''])]) 691621f50c3Smrg if test "$am__include" != "#"; then 692621f50c3Smrg _am_result="yes ($s style)" 693621f50c3Smrg break 694621f50c3Smrg fi 695621f50c3Smrgdone 696621f50c3Smrgrm -f confinc.* confmf.* 697621f50c3SmrgAC_MSG_RESULT([${_am_result}]) 698621f50c3SmrgAC_SUBST([am__include])]) 699621f50c3SmrgAC_SUBST([am__quote])]) 700dc407927Smrg 701621f50c3Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702dc407927Smrg 703621f50c3Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704621f50c3Smrg# 705621f50c3Smrg# This file is free software; the Free Software Foundation 706621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 707621f50c3Smrg# with or without modifications, as long as this notice is preserved. 708dc407927Smrg 709621f50c3Smrg# AM_MISSING_PROG(NAME, PROGRAM) 710621f50c3Smrg# ------------------------------ 711621f50c3SmrgAC_DEFUN([AM_MISSING_PROG], 712621f50c3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713621f50c3Smrg$1=${$1-"${am_missing_run}$2"} 714621f50c3SmrgAC_SUBST($1)]) 715621f50c3Smrg 716621f50c3Smrg# AM_MISSING_HAS_RUN 717621f50c3Smrg# ------------------ 718621f50c3Smrg# Define MISSING if not defined so far and test if it is modern enough. 719621f50c3Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720621f50c3SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721621f50c3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722621f50c3SmrgAC_REQUIRE_AUX_FILE([missing])dnl 723621f50c3Smrgif test x"${MISSING+set}" != xset; then 724621f50c3Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725621f50c3Smrgfi 726621f50c3Smrg# Use eval to expand $SHELL 727621f50c3Smrgif eval "$MISSING --is-lightweight"; then 728621f50c3Smrg am_missing_run="$MISSING " 729621f50c3Smrgelse 730621f50c3Smrg am_missing_run= 731621f50c3Smrg AC_MSG_WARN(['missing' script is too old or missing]) 732621f50c3Smrgfi 733dc407927Smrg]) 734dc407927Smrg 735621f50c3Smrg# Helper functions for option handling. -*- Autoconf -*- 736dc407927Smrg 737621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738621f50c3Smrg# 739621f50c3Smrg# This file is free software; the Free Software Foundation 740621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 741621f50c3Smrg# with or without modifications, as long as this notice is preserved. 742dc407927Smrg 743621f50c3Smrg# _AM_MANGLE_OPTION(NAME) 744621f50c3Smrg# ----------------------- 745621f50c3SmrgAC_DEFUN([_AM_MANGLE_OPTION], 746621f50c3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747dc407927Smrg 748621f50c3Smrg# _AM_SET_OPTION(NAME) 749621f50c3Smrg# -------------------- 750621f50c3Smrg# Set option NAME. Presently that only means defining a flag for this option. 751621f50c3SmrgAC_DEFUN([_AM_SET_OPTION], 752621f50c3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753dc407927Smrg 754621f50c3Smrg# _AM_SET_OPTIONS(OPTIONS) 755621f50c3Smrg# ------------------------ 756621f50c3Smrg# OPTIONS is a space-separated list of Automake options. 757621f50c3SmrgAC_DEFUN([_AM_SET_OPTIONS], 758621f50c3Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759dc407927Smrg 760621f50c3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761621f50c3Smrg# ------------------------------------------- 762621f50c3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763621f50c3SmrgAC_DEFUN([_AM_IF_OPTION], 764621f50c3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765dc407927Smrg 766621f50c3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767621f50c3Smrg# 768621f50c3Smrg# This file is free software; the Free Software Foundation 769621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 770621f50c3Smrg# with or without modifications, as long as this notice is preserved. 771dc407927Smrg 772621f50c3Smrg# _AM_PROG_CC_C_O 773621f50c3Smrg# --------------- 774621f50c3Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775621f50c3Smrg# to automatically call this. 776621f50c3SmrgAC_DEFUN([_AM_PROG_CC_C_O], 777621f50c3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778621f50c3SmrgAC_REQUIRE_AUX_FILE([compile])dnl 779621f50c3SmrgAC_LANG_PUSH([C])dnl 780621f50c3SmrgAC_CACHE_CHECK( 781621f50c3Smrg [whether $CC understands -c and -o together], 782621f50c3Smrg [am_cv_prog_cc_c_o], 783621f50c3Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784621f50c3Smrg # Make sure it works both with $CC and with simple cc. 785621f50c3Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 786621f50c3Smrg # compilers refuse to overwrite an existing .o file with -o, 787621f50c3Smrg # though they will create one. 788621f50c3Smrg am_cv_prog_cc_c_o=yes 789621f50c3Smrg for am_i in 1 2; do 790621f50c3Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791621f50c3Smrg && test -f conftest2.$ac_objext; then 792621f50c3Smrg : OK 793621f50c3Smrg else 794621f50c3Smrg am_cv_prog_cc_c_o=no 795621f50c3Smrg break 796621f50c3Smrg fi 797621f50c3Smrg done 798621f50c3Smrg rm -f core conftest* 799621f50c3Smrg unset am_i]) 800621f50c3Smrgif test "$am_cv_prog_cc_c_o" != yes; then 801621f50c3Smrg # Losing compiler, so override with the script. 802621f50c3Smrg # FIXME: It is wrong to rewrite CC. 803621f50c3Smrg # But if we don't then we get into trouble of one sort or another. 804621f50c3Smrg # A longer-term fix would be to have automake use am__CC in this case, 805621f50c3Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806621f50c3Smrg CC="$am_aux_dir/compile $CC" 807621f50c3Smrgfi 808621f50c3SmrgAC_LANG_POP([C])]) 809dc407927Smrg 810621f50c3Smrg# For backward compatibility. 811621f50c3SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812dc407927Smrg 813621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814621f50c3Smrg# 815621f50c3Smrg# This file is free software; the Free Software Foundation 816621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 817621f50c3Smrg# with or without modifications, as long as this notice is preserved. 818dc407927Smrg 819621f50c3Smrg# AM_RUN_LOG(COMMAND) 820621f50c3Smrg# ------------------- 821621f50c3Smrg# Run COMMAND, save the exit status in ac_status, and log it. 822621f50c3Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823621f50c3SmrgAC_DEFUN([AM_RUN_LOG], 824621f50c3Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825621f50c3Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826621f50c3Smrg ac_status=$? 827621f50c3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828621f50c3Smrg (exit $ac_status); }]) 829dc407927Smrg 830621f50c3Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831621f50c3Smrg 832621f50c3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833dc407927Smrg# 834621f50c3Smrg# This file is free software; the Free Software Foundation 835621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 836621f50c3Smrg# with or without modifications, as long as this notice is preserved. 837dc407927Smrg 838621f50c3Smrg# AM_SANITY_CHECK 839621f50c3Smrg# --------------- 840621f50c3SmrgAC_DEFUN([AM_SANITY_CHECK], 841621f50c3Smrg[AC_MSG_CHECKING([whether build environment is sane]) 842621f50c3Smrg# Reject unsafe characters in $srcdir or the absolute working directory 843621f50c3Smrg# name. Accept space and tab only in the latter. 844621f50c3Smrgam_lf=' 845621f50c3Smrg' 846621f50c3Smrgcase `pwd` in 847621f50c3Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848621f50c3Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849621f50c3Smrgesac 850621f50c3Smrgcase $srcdir in 851621f50c3Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852621f50c3Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853621f50c3Smrgesac 854dc407927Smrg 855621f50c3Smrg# Do 'set' in a subshell so we don't clobber the current shell's 856621f50c3Smrg# arguments. Must try -L first in case configure is actually a 857621f50c3Smrg# symlink; some systems play weird games with the mod time of symlinks 858621f50c3Smrg# (eg FreeBSD returns the mod time of the symlink's containing 859621f50c3Smrg# directory). 860621f50c3Smrgif ( 861621f50c3Smrg am_has_slept=no 862621f50c3Smrg for am_try in 1 2; do 863621f50c3Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 864621f50c3Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865621f50c3Smrg if test "$[*]" = "X"; then 866621f50c3Smrg # -L didn't work. 867621f50c3Smrg set X `ls -t "$srcdir/configure" conftest.file` 868621f50c3Smrg fi 869621f50c3Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870621f50c3Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871dc407927Smrg 872621f50c3Smrg # If neither matched, then we have a broken ls. This can happen 873621f50c3Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874621f50c3Smrg # broken ls alias from the environment. This has actually 875621f50c3Smrg # happened. Such a system could not be considered "sane". 876621f50c3Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877621f50c3Smrg alias in your environment]) 878621f50c3Smrg fi 879621f50c3Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880621f50c3Smrg break 881621f50c3Smrg fi 882621f50c3Smrg # Just in case. 883621f50c3Smrg sleep 1 884621f50c3Smrg am_has_slept=yes 885621f50c3Smrg done 886621f50c3Smrg test "$[2]" = conftest.file 887621f50c3Smrg ) 888621f50c3Smrgthen 889621f50c3Smrg # Ok. 890621f50c3Smrg : 891621f50c3Smrgelse 892621f50c3Smrg AC_MSG_ERROR([newly created file is older than distributed files! 893621f50c3SmrgCheck your system clock]) 894621f50c3Smrgfi 895621f50c3SmrgAC_MSG_RESULT([yes]) 896621f50c3Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897621f50c3Smrg# generated files are strictly newer. 898621f50c3Smrgam_sleep_pid= 899621f50c3Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900621f50c3Smrg ( sleep 1 ) & 901621f50c3Smrg am_sleep_pid=$! 902621f50c3Smrgfi 903621f50c3SmrgAC_CONFIG_COMMANDS_PRE( 904621f50c3Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905621f50c3Smrg if test -n "$am_sleep_pid"; then 906621f50c3Smrg # Hide warnings about reused PIDs. 907621f50c3Smrg wait $am_sleep_pid 2>/dev/null 908621f50c3Smrg fi 909621f50c3Smrg AC_MSG_RESULT([done])]) 910621f50c3Smrgrm -f conftest.file 911621f50c3Smrg]) 912dc407927Smrg 913621f50c3Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914dc407927Smrg# 915621f50c3Smrg# This file is free software; the Free Software Foundation 916621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 917621f50c3Smrg# with or without modifications, as long as this notice is preserved. 918621f50c3Smrg 919621f50c3Smrg# AM_SILENT_RULES([DEFAULT]) 920621f50c3Smrg# -------------------------- 921621f50c3Smrg# Enable less verbose build rules; with the default set to DEFAULT 922621f50c3Smrg# ("yes" being less verbose, "no" or empty being verbose). 923621f50c3SmrgAC_DEFUN([AM_SILENT_RULES], 924621f50c3Smrg[AC_ARG_ENABLE([silent-rules], [dnl 925621f50c3SmrgAS_HELP_STRING( 926621f50c3Smrg [--enable-silent-rules], 927621f50c3Smrg [less verbose build output (undo: "make V=1")]) 928621f50c3SmrgAS_HELP_STRING( 929621f50c3Smrg [--disable-silent-rules], 930621f50c3Smrg [verbose build output (undo: "make V=0")])dnl 931621f50c3Smrg]) 932621f50c3Smrgcase $enable_silent_rules in @%:@ ((( 933621f50c3Smrg yes) AM_DEFAULT_VERBOSITY=0;; 934621f50c3Smrg no) AM_DEFAULT_VERBOSITY=1;; 935621f50c3Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936621f50c3Smrgesac 937621f50c3Smrgdnl 938621f50c3Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939621f50c3Smrgdnl do not support nested variable expansions. 940621f50c3Smrgdnl See automake bug#9928 and bug#10237. 941621f50c3Smrgam_make=${MAKE-make} 942621f50c3SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943621f50c3Smrg [am_cv_make_support_nested_variables], 944621f50c3Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945621f50c3SmrgBAR0=false 946621f50c3SmrgBAR1=true 947621f50c3SmrgV=1 948621f50c3Smrgam__doit: 949621f50c3Smrg @$(TRUE) 950621f50c3Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951621f50c3Smrg am_cv_make_support_nested_variables=yes 952621f50c3Smrgelse 953621f50c3Smrg am_cv_make_support_nested_variables=no 954621f50c3Smrgfi]) 955621f50c3Smrgif test $am_cv_make_support_nested_variables = yes; then 956621f50c3Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957621f50c3Smrg AM_V='$(V)' 958621f50c3Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959621f50c3Smrgelse 960621f50c3Smrg AM_V=$AM_DEFAULT_VERBOSITY 961621f50c3Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962621f50c3Smrgfi 963621f50c3SmrgAC_SUBST([AM_V])dnl 964621f50c3SmrgAM_SUBST_NOTMAKE([AM_V])dnl 965621f50c3SmrgAC_SUBST([AM_DEFAULT_V])dnl 966621f50c3SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967621f50c3SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968621f50c3SmrgAM_BACKSLASH='\' 969621f50c3SmrgAC_SUBST([AM_BACKSLASH])dnl 970621f50c3Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971dc407927Smrg]) 972dc407927Smrg 973621f50c3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974621f50c3Smrg# 975621f50c3Smrg# This file is free software; the Free Software Foundation 976621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 977621f50c3Smrg# with or without modifications, as long as this notice is preserved. 978dc407927Smrg 979621f50c3Smrg# AM_PROG_INSTALL_STRIP 980621f50c3Smrg# --------------------- 981621f50c3Smrg# One issue with vendor 'install' (even GNU) is that you can't 982621f50c3Smrg# specify the program used to strip binaries. This is especially 983621f50c3Smrg# annoying in cross-compiling environments, where the build's strip 984621f50c3Smrg# is unlikely to handle the host's binaries. 985621f50c3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986621f50c3Smrg# always use install-sh in "make install-strip", and initialize 987621f50c3Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 988621f50c3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989621f50c3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990621f50c3Smrg# Installed binaries are usually stripped using 'strip' when the user 991621f50c3Smrg# run "make install-strip". However 'strip' might not be the right 992621f50c3Smrg# tool to use in cross-compilation environments, therefore Automake 993621f50c3Smrg# will honor the 'STRIP' environment variable to overrule this program. 994621f50c3Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995621f50c3Smrgif test "$cross_compiling" != no; then 996621f50c3Smrg AC_CHECK_TOOL([STRIP], [strip], :) 997621f50c3Smrgfi 998621f50c3SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999621f50c3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000dc407927Smrg 1001621f50c3Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002621f50c3Smrg# 1003621f50c3Smrg# This file is free software; the Free Software Foundation 1004621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 1005621f50c3Smrg# with or without modifications, as long as this notice is preserved. 1006dc407927Smrg 1007621f50c3Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008621f50c3Smrg# --------------------------- 1009621f50c3Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010621f50c3Smrg# This macro is traced by Automake. 1011621f50c3SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10123eed67faSmbalmer 1013621f50c3Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1014621f50c3Smrg# -------------------------- 1015621f50c3Smrg# Public sister of _AM_SUBST_NOTMAKE. 1016621f50c3SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10173eed67faSmbalmer 1018621f50c3Smrg# Check how to create a tarball. -*- Autoconf -*- 1019dc407927Smrg 1020621f50c3Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021621f50c3Smrg# 1022621f50c3Smrg# This file is free software; the Free Software Foundation 1023621f50c3Smrg# gives unlimited permission to copy and/or distribute it, 1024621f50c3Smrg# with or without modifications, as long as this notice is preserved. 1025dc407927Smrg 1026621f50c3Smrg# _AM_PROG_TAR(FORMAT) 1027621f50c3Smrg# -------------------- 1028621f50c3Smrg# Check how to create a tarball in format FORMAT. 1029621f50c3Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030621f50c3Smrg# 1031621f50c3Smrg# Substitute a variable $(am__tar) that is a command 1032621f50c3Smrg# writing to stdout a FORMAT-tarball containing the directory 1033621f50c3Smrg# $tardir. 1034621f50c3Smrg# tardir=directory && $(am__tar) > result.tar 1035621f50c3Smrg# 1036621f50c3Smrg# Substitute a variable $(am__untar) that extract such 1037621f50c3Smrg# a tarball read from stdin. 1038621f50c3Smrg# $(am__untar) < result.tar 1039621f50c3Smrg# 1040621f50c3SmrgAC_DEFUN([_AM_PROG_TAR], 1041621f50c3Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042621f50c3Smrg# in the wild :-( We should find a proper way to deprecate it ... 1043621f50c3SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044dc407927Smrg 1045621f50c3Smrg# We'll loop over all known methods to create a tar archive until one works. 1046621f50c3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047dc407927Smrg 1048621f50c3Smrgm4_if([$1], [v7], 1049621f50c3Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050dc407927Smrg 1051621f50c3Smrg [m4_case([$1], 1052621f50c3Smrg [ustar], 1053621f50c3Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054621f50c3Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055621f50c3Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056621f50c3Smrg # and bug#13588). 1057621f50c3Smrg am_max_uid=2097151 # 2^21 - 1 1058621f50c3Smrg am_max_gid=$am_max_uid 1059621f50c3Smrg # The $UID and $GID variables are not portable, so we need to resort 1060621f50c3Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061621f50c3Smrg # below are definitely unexpected, so allow the users to see them 1062621f50c3Smrg # (that is, avoid stderr redirection). 1063621f50c3Smrg am_uid=`id -u || echo unknown` 1064621f50c3Smrg am_gid=`id -g || echo unknown` 1065621f50c3Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066621f50c3Smrg if test $am_uid -le $am_max_uid; then 1067621f50c3Smrg AC_MSG_RESULT([yes]) 1068621f50c3Smrg else 1069621f50c3Smrg AC_MSG_RESULT([no]) 1070621f50c3Smrg _am_tools=none 1071621f50c3Smrg fi 1072621f50c3Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073621f50c3Smrg if test $am_gid -le $am_max_gid; then 1074621f50c3Smrg AC_MSG_RESULT([yes]) 1075621f50c3Smrg else 1076621f50c3Smrg AC_MSG_RESULT([no]) 1077621f50c3Smrg _am_tools=none 1078621f50c3Smrg fi], 1079dc407927Smrg 1080621f50c3Smrg [pax], 1081621f50c3Smrg [], 1082dc407927Smrg 1083621f50c3Smrg [m4_fatal([Unknown tar format])]) 1084dd0822caSmrg 1085621f50c3Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1086621f50c3Smrg 1087621f50c3Smrg # Go ahead even if we have the value already cached. We do so because we 1088621f50c3Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089621f50c3Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090621f50c3Smrg 1091621f50c3Smrg for _am_tool in $_am_tools; do 1092621f50c3Smrg case $_am_tool in 1093621f50c3Smrg gnutar) 1094621f50c3Smrg for _am_tar in tar gnutar gtar; do 1095621f50c3Smrg AM_RUN_LOG([$_am_tar --version]) && break 1096621f50c3Smrg done 1097621f50c3Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098621f50c3Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099621f50c3Smrg am__untar="$_am_tar -xf -" 1100dc407927Smrg ;; 1101621f50c3Smrg plaintar) 1102621f50c3Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103621f50c3Smrg # ustar tarball either. 1104621f50c3Smrg (tar --version) >/dev/null 2>&1 && continue 1105621f50c3Smrg am__tar='tar chf - "$$tardir"' 1106621f50c3Smrg am__tar_='tar chf - "$tardir"' 1107621f50c3Smrg am__untar='tar xf -' 1108dc407927Smrg ;; 1109621f50c3Smrg pax) 1110621f50c3Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1111621f50c3Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1112621f50c3Smrg am__untar='pax -r' 1113dc407927Smrg ;; 1114621f50c3Smrg cpio) 1115621f50c3Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116621f50c3Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117621f50c3Smrg am__untar='cpio -i -H $1 -d' 1118621f50c3Smrg ;; 1119621f50c3Smrg none) 1120621f50c3Smrg am__tar=false 1121621f50c3Smrg am__tar_=false 1122621f50c3Smrg am__untar=false 1123dc407927Smrg ;; 1124dc407927Smrg esac 1125dc407927Smrg 1126621f50c3Smrg # If the value was cached, stop now. We just wanted to have am__tar 1127621f50c3Smrg # and am__untar set. 1128621f50c3Smrg test -n "${am_cv_prog_tar_$1}" && break 1129dc407927Smrg 1130621f50c3Smrg # tar/untar a dummy directory, and stop if the command works. 1131621f50c3Smrg rm -rf conftest.dir 1132621f50c3Smrg mkdir conftest.dir 1133621f50c3Smrg echo GrepMe > conftest.dir/file 1134621f50c3Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135621f50c3Smrg rm -rf conftest.dir 1136621f50c3Smrg if test -s conftest.tar; then 1137621f50c3Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138621f50c3Smrg AM_RUN_LOG([cat conftest.dir/file]) 1139621f50c3Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140621f50c3Smrg fi 1141621f50c3Smrg done 1142621f50c3Smrg rm -rf conftest.dir 1143dc407927Smrg 1144621f50c3Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145621f50c3Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146dc407927Smrg 1147621f50c3SmrgAC_SUBST([am__tar]) 1148621f50c3SmrgAC_SUBST([am__untar]) 1149621f50c3Smrg]) # _AM_PROG_TAR 1150dc407927Smrg 1151621f50c3Smrgdnl Copyright 2005 Red Hat, Inc 1152621f50c3Smrgdnl 1153621f50c3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1154621f50c3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1155621f50c3Smrgdnl the above copyright notice appear in all copies and that both that 1156621f50c3Smrgdnl copyright notice and this permission notice appear in supporting 1157621f50c3Smrgdnl documentation. 1158621f50c3Smrgdnl 1159621f50c3Smrgdnl The above copyright notice and this permission notice shall be included 1160621f50c3Smrgdnl in all copies or substantial portions of the Software. 1161621f50c3Smrgdnl 1162621f50c3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1163621f50c3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1164621f50c3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1165621f50c3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1166621f50c3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1167621f50c3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1168621f50c3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1169621f50c3Smrgdnl 1170621f50c3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1171621f50c3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1172621f50c3Smrgdnl other dealings in this Software without prior written authorization 1173621f50c3Smrgdnl from the copyright holders. 1174621f50c3Smrgdnl 1175dc407927Smrg 1176621f50c3Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1177621f50c3Smrg# -------------------------- 1178621f50c3Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1179621f50c3Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1180dc407927Smrg 1181621f50c3SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1182621f50c3Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1183621f50c3Smrg SAVE_CFLAGS="$CFLAGS" 1184901a7df4Smrg CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" 1185621f50c3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1186621f50c3Smrg#include "xorg-server.h" 1187621f50c3Smrg#if !defined $1 1188621f50c3Smrg#error $1 not defined 1189621f50c3Smrg#endif 1190621f50c3Smrg ]])], 1191621f50c3Smrg [_EXT_CHECK=yes], 1192621f50c3Smrg [_EXT_CHECK=no]) 1193621f50c3Smrg CFLAGS="$SAVE_CFLAGS" 1194621f50c3Smrg AC_MSG_CHECKING([if $1 is defined]) 1195621f50c3Smrg AC_MSG_RESULT([$_EXT_CHECK]) 1196621f50c3Smrg if test "$_EXT_CHECK" != no; then 1197621f50c3Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1198621f50c3Smrg fi 1199621f50c3Smrg]) 1200dc407927Smrg 1201621f50c3Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1202621f50c3Smrgdnl serial 11 (pkg-config-0.29) 1203621f50c3Smrgdnl 1204621f50c3Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1205621f50c3Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1206621f50c3Smrgdnl 1207621f50c3Smrgdnl This program is free software; you can redistribute it and/or modify 1208621f50c3Smrgdnl it under the terms of the GNU General Public License as published by 1209621f50c3Smrgdnl the Free Software Foundation; either version 2 of the License, or 1210621f50c3Smrgdnl (at your option) any later version. 1211621f50c3Smrgdnl 1212621f50c3Smrgdnl This program is distributed in the hope that it will be useful, but 1213621f50c3Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1214621f50c3Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1215621f50c3Smrgdnl General Public License for more details. 1216621f50c3Smrgdnl 1217621f50c3Smrgdnl You should have received a copy of the GNU General Public License 1218621f50c3Smrgdnl along with this program; if not, write to the Free Software 1219621f50c3Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1220621f50c3Smrgdnl 02111-1307, USA. 1221621f50c3Smrgdnl 1222621f50c3Smrgdnl As a special exception to the GNU General Public License, if you 1223621f50c3Smrgdnl distribute this file as part of a program that contains a 1224621f50c3Smrgdnl configuration script generated by Autoconf, you may include it under 1225621f50c3Smrgdnl the same distribution terms that you use for the rest of that 1226621f50c3Smrgdnl program. 1227dc407927Smrg 1228621f50c3Smrgdnl PKG_PREREQ(MIN-VERSION) 1229621f50c3Smrgdnl ----------------------- 1230621f50c3Smrgdnl Since: 0.29 1231621f50c3Smrgdnl 1232621f50c3Smrgdnl Verify that the version of the pkg-config macros are at least 1233621f50c3Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1234621f50c3Smrgdnl installed version of pkg-config, this checks the developer's version 1235621f50c3Smrgdnl of pkg.m4 when generating configure. 1236621f50c3Smrgdnl 1237621f50c3Smrgdnl To ensure that this macro is defined, also add: 1238621f50c3Smrgdnl m4_ifndef([PKG_PREREQ], 1239621f50c3Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1240621f50c3Smrgdnl 1241621f50c3Smrgdnl See the "Since" comment for each macro you use to see what version 1242621f50c3Smrgdnl of the macros you require. 1243621f50c3Smrgm4_defun([PKG_PREREQ], 1244621f50c3Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1245621f50c3Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1246621f50c3Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1247621f50c3Smrg])dnl PKG_PREREQ 1248dc407927Smrg 1249621f50c3Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1250621f50c3Smrgdnl ---------------------------------- 1251621f50c3Smrgdnl Since: 0.16 1252621f50c3Smrgdnl 1253621f50c3Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1254621f50c3Smrgdnl first found in the path. Checks that the version of pkg-config found 1255621f50c3Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1256621f50c3Smrgdnl used since that's the first version where most current features of 1257621f50c3Smrgdnl pkg-config existed. 1258621f50c3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1259621f50c3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1260621f50c3Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1261621f50c3Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1262621f50c3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1263621f50c3SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1264621f50c3SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1265621f50c3Smrg 1266621f50c3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1267621f50c3Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1268dc407927Smrgfi 1269621f50c3Smrgif test -n "$PKG_CONFIG"; then 1270621f50c3Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1271621f50c3Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1272621f50c3Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1273621f50c3Smrg AC_MSG_RESULT([yes]) 1274621f50c3Smrg else 1275621f50c3Smrg AC_MSG_RESULT([no]) 1276621f50c3Smrg PKG_CONFIG="" 1277621f50c3Smrg fi 1278621f50c3Smrgfi[]dnl 1279621f50c3Smrg])dnl PKG_PROG_PKG_CONFIG 1280dc407927Smrg 1281621f50c3Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1282621f50c3Smrgdnl ------------------------------------------------------------------- 1283621f50c3Smrgdnl Since: 0.18 1284621f50c3Smrgdnl 1285621f50c3Smrgdnl Check to see whether a particular set of modules exists. Similar to 1286621f50c3Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1287621f50c3Smrgdnl 1288621f50c3Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1289621f50c3Smrgdnl only at the first occurence in configure.ac, so if the first place 1290621f50c3Smrgdnl it's called might be skipped (such as if it is within an "if", you 1291621f50c3Smrgdnl have to call PKG_CHECK_EXISTS manually 1292621f50c3SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1293621f50c3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1294621f50c3Smrgif test -n "$PKG_CONFIG" && \ 1295621f50c3Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1296621f50c3Smrg m4_default([$2], [:]) 1297621f50c3Smrgm4_ifvaln([$3], [else 1298621f50c3Smrg $3])dnl 1299621f50c3Smrgfi]) 1300dc407927Smrg 1301621f50c3Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1302621f50c3Smrgdnl --------------------------------------------- 1303621f50c3Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1304621f50c3Smrgdnl pkg_failed based on the result. 1305621f50c3Smrgm4_define([_PKG_CONFIG], 1306621f50c3Smrg[if test -n "$$1"; then 1307621f50c3Smrg pkg_cv_[]$1="$$1" 1308621f50c3Smrg elif test -n "$PKG_CONFIG"; then 1309621f50c3Smrg PKG_CHECK_EXISTS([$3], 1310621f50c3Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1311621f50c3Smrg test "x$?" != "x0" && pkg_failed=yes ], 1312621f50c3Smrg [pkg_failed=yes]) 1313621f50c3Smrg else 1314621f50c3Smrg pkg_failed=untried 1315621f50c3Smrgfi[]dnl 1316621f50c3Smrg])dnl _PKG_CONFIG 1317dc407927Smrg 1318621f50c3Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1319621f50c3Smrgdnl --------------------------- 1320621f50c3Smrgdnl Internal check to see if pkg-config supports short errors. 1321621f50c3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1322621f50c3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1323621f50c3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1324621f50c3Smrg _pkg_short_errors_supported=yes 1325621f50c3Smrgelse 1326621f50c3Smrg _pkg_short_errors_supported=no 1327621f50c3Smrgfi[]dnl 1328621f50c3Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1329dc407927Smrg 1330dc407927Smrg 1331621f50c3Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1332621f50c3Smrgdnl [ACTION-IF-NOT-FOUND]) 1333621f50c3Smrgdnl -------------------------------------------------------------- 1334621f50c3Smrgdnl Since: 0.4.0 1335621f50c3Smrgdnl 1336621f50c3Smrgdnl Note that if there is a possibility the first call to 1337621f50c3Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1338621f50c3Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1339621f50c3SmrgAC_DEFUN([PKG_CHECK_MODULES], 1340621f50c3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1341621f50c3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1342621f50c3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1343dc407927Smrg 1344621f50c3Smrgpkg_failed=no 1345621f50c3SmrgAC_MSG_CHECKING([for $1]) 1346dc407927Smrg 1347621f50c3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1348621f50c3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 13491a9c160aSmrg 1350621f50c3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1351621f50c3Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1352621f50c3SmrgSee the pkg-config man page for more details.]) 13531a9c160aSmrg 1354621f50c3Smrgif test $pkg_failed = yes; then 1355621f50c3Smrg AC_MSG_RESULT([no]) 1356621f50c3Smrg _PKG_SHORT_ERRORS_SUPPORTED 1357621f50c3Smrg if test $_pkg_short_errors_supported = yes; then 1358621f50c3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1359621f50c3Smrg else 1360621f50c3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1361621f50c3Smrg fi 1362621f50c3Smrg # Put the nasty error message in config.log where it belongs 1363621f50c3Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1364dc407927Smrg 1365621f50c3Smrg m4_default([$4], [AC_MSG_ERROR( 1366621f50c3Smrg[Package requirements ($2) were not met: 13671a9c160aSmrg 1368621f50c3Smrg$$1_PKG_ERRORS 1369dc407927Smrg 1370621f50c3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1371621f50c3Smrginstalled software in a non-standard prefix. 13721a9c160aSmrg 1373621f50c3Smrg_PKG_TEXT])[]dnl 1374621f50c3Smrg ]) 1375621f50c3Smrgelif test $pkg_failed = untried; then 1376621f50c3Smrg AC_MSG_RESULT([no]) 1377621f50c3Smrg m4_default([$4], [AC_MSG_FAILURE( 1378621f50c3Smrg[The pkg-config script could not be found or is too old. Make sure it 1379621f50c3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1380621f50c3Smrgpath to pkg-config. 13811a9c160aSmrg 1382621f50c3Smrg_PKG_TEXT 13831a9c160aSmrg 1384621f50c3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1385621f50c3Smrg ]) 1386621f50c3Smrgelse 1387621f50c3Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1388621f50c3Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1389621f50c3Smrg AC_MSG_RESULT([yes]) 1390621f50c3Smrg $3 1391621f50c3Smrgfi[]dnl 1392621f50c3Smrg])dnl PKG_CHECK_MODULES 1393dc407927Smrg 1394dc407927Smrg 1395621f50c3Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1396621f50c3Smrgdnl [ACTION-IF-NOT-FOUND]) 1397621f50c3Smrgdnl --------------------------------------------------------------------- 1398621f50c3Smrgdnl Since: 0.29 1399621f50c3Smrgdnl 1400621f50c3Smrgdnl Checks for existence of MODULES and gathers its build flags with 1401621f50c3Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1402621f50c3Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1403621f50c3Smrgdnl 1404621f50c3Smrgdnl Note that if there is a possibility the first call to 1405621f50c3Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1406621f50c3Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1407621f50c3Smrgdnl configure.ac. 1408621f50c3SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1409621f50c3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1410621f50c3Smrg_save_PKG_CONFIG=$PKG_CONFIG 1411621f50c3SmrgPKG_CONFIG="$PKG_CONFIG --static" 1412621f50c3SmrgPKG_CHECK_MODULES($@) 1413621f50c3SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1414621f50c3Smrg])dnl PKG_CHECK_MODULES_STATIC 1415dc407927Smrg 1416dc407927Smrg 1417621f50c3Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 1418621f50c3Smrgdnl ------------------------- 1419621f50c3Smrgdnl Since: 0.27 1420621f50c3Smrgdnl 1421621f50c3Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 1422621f50c3Smrgdnl should install pkg-config .pc files. By default the directory is 1423621f50c3Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 1424621f50c3Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1425621f50c3Smrgdnl parameter. 1426621f50c3SmrgAC_DEFUN([PKG_INSTALLDIR], 1427621f50c3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1428621f50c3Smrgm4_pushdef([pkg_description], 1429621f50c3Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1430621f50c3SmrgAC_ARG_WITH([pkgconfigdir], 1431621f50c3Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1432621f50c3Smrg [with_pkgconfigdir=]pkg_default) 1433621f50c3SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1434621f50c3Smrgm4_popdef([pkg_default]) 1435621f50c3Smrgm4_popdef([pkg_description]) 1436621f50c3Smrg])dnl PKG_INSTALLDIR 1437dc407927Smrg 1438dc407927Smrg 1439621f50c3Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1440621f50c3Smrgdnl -------------------------------- 1441621f50c3Smrgdnl Since: 0.27 1442621f50c3Smrgdnl 1443621f50c3Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1444621f50c3Smrgdnl module should install arch-independent pkg-config .pc files. By 1445621f50c3Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 1446621f50c3Smrgdnl changed by passing DIRECTORY. The user can override through the 1447621f50c3Smrgdnl --with-noarch-pkgconfigdir parameter. 1448621f50c3SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1449621f50c3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1450621f50c3Smrgm4_pushdef([pkg_description], 1451621f50c3Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1452621f50c3SmrgAC_ARG_WITH([noarch-pkgconfigdir], 1453621f50c3Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1454621f50c3Smrg [with_noarch_pkgconfigdir=]pkg_default) 1455621f50c3SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1456621f50c3Smrgm4_popdef([pkg_default]) 1457621f50c3Smrgm4_popdef([pkg_description]) 1458621f50c3Smrg])dnl PKG_NOARCH_INSTALLDIR 1459dc407927Smrg 1460dc407927Smrg 1461621f50c3Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1462621f50c3Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1463621f50c3Smrgdnl ------------------------------------------- 1464621f50c3Smrgdnl Since: 0.28 1465621f50c3Smrgdnl 1466621f50c3Smrgdnl Retrieves the value of the pkg-config variable for the given module. 1467621f50c3SmrgAC_DEFUN([PKG_CHECK_VAR], 1468621f50c3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1469621f50c3SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1470dc407927Smrg 1471621f50c3Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1472621f50c3SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1473dc407927Smrg 1474621f50c3SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1475621f50c3Smrg])dnl PKG_CHECK_VAR 1476dc407927Smrg 1477621f50c3Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1478621f50c3Smrgdnl 1479901a7df4Smrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 1480621f50c3Smrgdnl 1481621f50c3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1482621f50c3Smrgdnl copy of this software and associated documentation files (the "Software"), 1483621f50c3Smrgdnl to deal in the Software without restriction, including without limitation 1484621f50c3Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1485621f50c3Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1486621f50c3Smrgdnl Software is furnished to do so, subject to the following conditions: 1487621f50c3Smrgdnl 1488621f50c3Smrgdnl The above copyright notice and this permission notice (including the next 1489621f50c3Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1490621f50c3Smrgdnl Software. 1491621f50c3Smrgdnl 1492621f50c3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1493621f50c3Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1494621f50c3Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1495621f50c3Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1496621f50c3Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1497621f50c3Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1498621f50c3Smrgdnl DEALINGS IN THE SOFTWARE. 1499dc407927Smrg 1500621f50c3Smrg# XORG_MACROS_VERSION(required-version) 1501621f50c3Smrg# ------------------------------------- 1502621f50c3Smrg# Minimum version: 1.1.0 1503621f50c3Smrg# 1504621f50c3Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1505621f50c3Smrg# your configure.ac with the minimum required version, such as: 1506621f50c3Smrg# XORG_MACROS_VERSION(1.1) 1507621f50c3Smrg# 1508621f50c3Smrg# To ensure that this macro is defined, also add: 1509621f50c3Smrg# m4_ifndef([XORG_MACROS_VERSION], 1510621f50c3Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1511621f50c3Smrg# 1512621f50c3Smrg# 1513621f50c3Smrg# See the "minimum version" comment for each macro you use to see what 1514621f50c3Smrg# version you require. 1515621f50c3Smrgm4_defun([XORG_MACROS_VERSION],[ 1516901a7df4Smrgm4_define([vers_have], [1.20.0]) 1517621f50c3Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1518621f50c3Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1519621f50c3Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1520621f50c3Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1521621f50c3Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1522621f50c3Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1523621f50c3Smrgm4_undefine([vers_have]) 1524621f50c3Smrgm4_undefine([maj_have]) 1525621f50c3Smrgm4_undefine([maj_needed]) 1526621f50c3Smrg]) # XORG_MACROS_VERSION 1527dc407927Smrg 1528621f50c3Smrg# XORG_PROG_RAWCPP() 1529dc407927Smrg# ------------------ 1530621f50c3Smrg# Minimum version: 1.0.0 1531621f50c3Smrg# 1532621f50c3Smrg# Find cpp program and necessary flags for use in pre-processing text files 1533621f50c3Smrg# such as man pages and config files 1534621f50c3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1535621f50c3SmrgAC_REQUIRE([AC_PROG_CPP]) 1536621f50c3SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1537621f50c3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1538dc407927Smrg 1539621f50c3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1540621f50c3Smrg# which is not the best choice for supporting other OS'es, but covers most 1541621f50c3Smrg# of the ones we need for now. 1542621f50c3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1543621f50c3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1544621f50c3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1545621f50c3Smrg AC_MSG_RESULT([no]) 1546621f50c3Smrgelse 1547621f50c3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1548621f50c3Smrg RAWCPPFLAGS=-undef 1549621f50c3Smrg AC_MSG_RESULT([yes]) 1550621f50c3Smrg # under Cygwin unix is still defined even with -undef 1551621f50c3Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1552621f50c3Smrg RAWCPPFLAGS="-undef -ansi" 1553621f50c3Smrg AC_MSG_RESULT([yes, with -ansi]) 1554621f50c3Smrg else 1555621f50c3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1556621f50c3Smrg fi 155775cbef56Smrgfi 1558621f50c3Smrgrm -f conftest.$ac_ext 155975cbef56Smrg 1560621f50c3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1561621f50c3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1562901a7df4Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 1563621f50c3Smrg AC_MSG_RESULT([no]) 1564621f50c3Smrgelse 1565901a7df4Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 1566621f50c3Smrg TRADITIONALCPPFLAGS="-traditional" 1567621f50c3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1568621f50c3Smrg AC_MSG_RESULT([yes]) 1569621f50c3Smrg else 1570621f50c3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1571621f50c3Smrg fi 1572621f50c3Smrgfi 1573621f50c3Smrgrm -f conftest.$ac_ext 1574621f50c3SmrgAC_SUBST(RAWCPPFLAGS) 1575621f50c3SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1576621f50c3Smrg]) # XORG_PROG_RAWCPP 157775cbef56Smrg 1578621f50c3Smrg# XORG_MANPAGE_SECTIONS() 1579dc407927Smrg# ----------------------- 1580621f50c3Smrg# Minimum version: 1.0.0 1581621f50c3Smrg# 1582621f50c3Smrg# Determine which sections man pages go in for the different man page types 1583621f50c3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1584621f50c3Smrg# Not sure if there's any better way than just hardcoding by OS name. 1585621f50c3Smrg# Override default settings by setting environment variables 1586621f50c3Smrg# Added MAN_SUBSTS in version 1.8 1587621f50c3Smrg# Added AC_PROG_SED in version 1.8 1588dc407927Smrg 1589621f50c3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1590621f50c3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1591621f50c3SmrgAC_REQUIRE([AC_PROG_SED]) 1592dc407927Smrg 1593621f50c3Smrgcase $host_os in 1594621f50c3Smrg solaris*) 1595621f50c3Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1596621f50c3Smrg # check for a man page file found in later versions that use 1597621f50c3Smrg # traditional section numbers instead 1598621f50c3Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1599621f50c3Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1600621f50c3Smrg ;; 1601621f50c3Smrg *) SYSV_MAN_SECTIONS=false ;; 1602621f50c3Smrgesac 1603dc407927Smrg 1604621f50c3Smrgif test x$APP_MAN_SUFFIX = x ; then 1605621f50c3Smrg APP_MAN_SUFFIX=1 1606621f50c3Smrgfi 1607621f50c3Smrgif test x$APP_MAN_DIR = x ; then 1608621f50c3Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1609621f50c3Smrgfi 161075cbef56Smrg 1611621f50c3Smrgif test x$LIB_MAN_SUFFIX = x ; then 1612621f50c3Smrg LIB_MAN_SUFFIX=3 1613621f50c3Smrgfi 1614621f50c3Smrgif test x$LIB_MAN_DIR = x ; then 1615621f50c3Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1616621f50c3Smrgfi 1617dc407927Smrg 1618621f50c3Smrgif test x$FILE_MAN_SUFFIX = x ; then 1619621f50c3Smrg case $SYSV_MAN_SECTIONS in 1620621f50c3Smrg true) FILE_MAN_SUFFIX=4 ;; 1621621f50c3Smrg *) FILE_MAN_SUFFIX=5 ;; 1622621f50c3Smrg esac 1623621f50c3Smrgfi 1624621f50c3Smrgif test x$FILE_MAN_DIR = x ; then 1625621f50c3Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1626621f50c3Smrgfi 1627dc407927Smrg 1628621f50c3Smrgif test x$MISC_MAN_SUFFIX = x ; then 1629621f50c3Smrg case $SYSV_MAN_SECTIONS in 1630621f50c3Smrg true) MISC_MAN_SUFFIX=5 ;; 1631621f50c3Smrg *) MISC_MAN_SUFFIX=7 ;; 1632621f50c3Smrg esac 1633621f50c3Smrgfi 1634621f50c3Smrgif test x$MISC_MAN_DIR = x ; then 1635621f50c3Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1636621f50c3Smrgfi 1637dc407927Smrg 1638621f50c3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1639621f50c3Smrg case $SYSV_MAN_SECTIONS in 1640621f50c3Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1641621f50c3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1642621f50c3Smrg esac 1643621f50c3Smrgfi 1644621f50c3Smrgif test x$DRIVER_MAN_DIR = x ; then 1645621f50c3Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1646621f50c3Smrgfi 16473eed67faSmbalmer 1648621f50c3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1649621f50c3Smrg case $SYSV_MAN_SECTIONS in 1650621f50c3Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1651621f50c3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1652621f50c3Smrg esac 1653621f50c3Smrgfi 1654621f50c3Smrgif test x$ADMIN_MAN_DIR = x ; then 1655621f50c3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1656621f50c3Smrgfi 1657dc407927Smrg 16583eed67faSmbalmer 1659621f50c3SmrgAC_SUBST([APP_MAN_SUFFIX]) 1660621f50c3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1661621f50c3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1662621f50c3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1663621f50c3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1664621f50c3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1665621f50c3SmrgAC_SUBST([APP_MAN_DIR]) 1666621f50c3SmrgAC_SUBST([LIB_MAN_DIR]) 1667621f50c3SmrgAC_SUBST([FILE_MAN_DIR]) 1668621f50c3SmrgAC_SUBST([MISC_MAN_DIR]) 1669621f50c3SmrgAC_SUBST([DRIVER_MAN_DIR]) 1670621f50c3SmrgAC_SUBST([ADMIN_MAN_DIR]) 16713eed67faSmbalmer 1672621f50c3SmrgXORG_MAN_PAGE="X Version 11" 1673621f50c3SmrgAC_SUBST([XORG_MAN_PAGE]) 1674621f50c3SmrgMAN_SUBSTS="\ 1675621f50c3Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1676621f50c3Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1677621f50c3Smrg -e 's|__xservername__|Xorg|g' \ 1678621f50c3Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1679621f50c3Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1680621f50c3Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1681621f50c3Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1682621f50c3Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1683621f50c3Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1684621f50c3Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1685621f50c3Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1686621f50c3Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1687621f50c3SmrgAC_SUBST([MAN_SUBSTS]) 16883eed67faSmbalmer 1689621f50c3Smrg]) # XORG_MANPAGE_SECTIONS 16903eed67faSmbalmer 1691621f50c3Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 16923eed67faSmbalmer# ------------------------ 1693621f50c3Smrg# Minimum version: 1.7.0 1694621f50c3Smrg# 1695621f50c3Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1696621f50c3Smrg# provided by xorg-sgml-doctools, if installed. 1697621f50c3SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1698621f50c3SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1699621f50c3SmrgXORG_SGML_PATH= 1700621f50c3SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1701621f50c3Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1702621f50c3Smrg [m4_ifval([$1],[:], 1703621f50c3Smrg [if test x"$cross_compiling" != x"yes" ; then 1704621f50c3Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1705621f50c3Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1706621f50c3Smrg fi]) 1707621f50c3Smrg ]) 17083eed67faSmbalmer 1709621f50c3Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1710621f50c3Smrg# the path and the name of the doc stylesheet 1711621f50c3Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1712621f50c3Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1713621f50c3Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1714621f50c3Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1715621f50c3Smrgelse 1716621f50c3Smrg AC_MSG_RESULT([no]) 1717621f50c3Smrgfi 17183eed67faSmbalmer 1719621f50c3SmrgAC_SUBST(XORG_SGML_PATH) 1720621f50c3SmrgAC_SUBST(STYLESHEET_SRCDIR) 1721621f50c3SmrgAC_SUBST(XSL_STYLESHEET) 1722621f50c3SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1723621f50c3Smrg]) # XORG_CHECK_SGML_DOCTOOLS 17243eed67faSmbalmer 1725621f50c3Smrg# XORG_CHECK_LINUXDOC 1726621f50c3Smrg# ------------------- 1727621f50c3Smrg# Minimum version: 1.0.0 1728621f50c3Smrg# 1729621f50c3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1730621f50c3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1731621f50c3Smrg# Whether or not the necessary tools and files are found can be checked 1732621f50c3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1733621f50c3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1734621f50c3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1735621f50c3SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 17363eed67faSmbalmer 1737621f50c3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1738dc407927Smrg 1739621f50c3SmrgAC_MSG_CHECKING([whether to build documentation]) 1740dc407927Smrg 1741621f50c3Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1742621f50c3Smrg BUILDDOC=yes 1743dd0822caSmrgelse 1744621f50c3Smrg BUILDDOC=no 1745dd0822caSmrgfi 1746dd0822caSmrg 1747621f50c3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 17483eed67faSmbalmer 1749621f50c3SmrgAC_MSG_RESULT([$BUILDDOC]) 17503eed67faSmbalmer 1751621f50c3SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1752dd0822caSmrg 1753621f50c3Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1754621f50c3Smrg BUILDPDFDOC=yes 17553eed67faSmbalmerelse 1756621f50c3Smrg BUILDPDFDOC=no 17573eed67faSmbalmerfi 17583eed67faSmbalmer 1759621f50c3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17603eed67faSmbalmer 1761621f50c3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17623eed67faSmbalmer 1763621f50c3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1764621f50c3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1765621f50c3SmrgMAKE_PDF="$PS2PDF" 1766621f50c3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17673eed67faSmbalmer 1768621f50c3SmrgAC_SUBST(MAKE_TEXT) 1769621f50c3SmrgAC_SUBST(MAKE_PS) 1770621f50c3SmrgAC_SUBST(MAKE_PDF) 1771621f50c3SmrgAC_SUBST(MAKE_HTML) 1772621f50c3Smrg]) # XORG_CHECK_LINUXDOC 17733eed67faSmbalmer 1774621f50c3Smrg# XORG_CHECK_DOCBOOK 1775621f50c3Smrg# ------------------- 1776621f50c3Smrg# Minimum version: 1.0.0 1777621f50c3Smrg# 1778621f50c3Smrg# Checks for the ability to build output formats from SGML DocBook source. 1779621f50c3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1780621f50c3Smrg# indicates whether the necessary tools and files are found and, if set, 1781621f50c3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1782621f50c3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1783621f50c3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17843eed67faSmbalmer 1785621f50c3SmrgBUILDTXTDOC=no 1786621f50c3SmrgBUILDPDFDOC=no 1787621f50c3SmrgBUILDPSDOC=no 1788621f50c3SmrgBUILDHTMLDOC=no 1789dd0822caSmrg 1790621f50c3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1791621f50c3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1792621f50c3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1793621f50c3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1794dd0822caSmrg 1795621f50c3SmrgAC_MSG_CHECKING([whether to build text documentation]) 1796621f50c3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1797621f50c3Smrg test x$BUILD_TXTDOC != xno; then 1798621f50c3Smrg BUILDTXTDOC=yes 1799621f50c3Smrgfi 1800621f50c3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1801621f50c3SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1802dd0822caSmrg 1803621f50c3SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1804621f50c3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1805621f50c3Smrg test x$BUILD_PDFDOC != xno; then 1806621f50c3Smrg BUILDPDFDOC=yes 1807621f50c3Smrgfi 1808621f50c3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1809621f50c3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 18103eed67faSmbalmer 1811621f50c3SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1812621f50c3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1813621f50c3Smrg test x$BUILD_PSDOC != xno; then 1814621f50c3Smrg BUILDPSDOC=yes 1815621f50c3Smrgfi 1816621f50c3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1817621f50c3SmrgAC_MSG_RESULT([$BUILDPSDOC]) 18183eed67faSmbalmer 1819621f50c3SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1820621f50c3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1821621f50c3Smrg test x$BUILD_HTMLDOC != xno; then 1822621f50c3Smrg BUILDHTMLDOC=yes 1823621f50c3Smrgfi 1824621f50c3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1825621f50c3SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 18261a9c160aSmrg 1827621f50c3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1828621f50c3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1829621f50c3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1830621f50c3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 18313eed67faSmbalmer 1832621f50c3SmrgAC_SUBST(MAKE_TEXT) 1833621f50c3SmrgAC_SUBST(MAKE_PS) 1834621f50c3SmrgAC_SUBST(MAKE_PDF) 1835621f50c3SmrgAC_SUBST(MAKE_HTML) 1836621f50c3Smrg]) # XORG_CHECK_DOCBOOK 18373eed67faSmbalmer 1838621f50c3Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1839621f50c3Smrg# ---------------- 1840621f50c3Smrg# Minimum version: 1.5.0 1841621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1842621f50c3Smrg# 1843621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 1844621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 1845621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1846901a7df4Smrg# the --with-xmlto option, it allows maximum flexibility in making decisions 1847621f50c3Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1848621f50c3Smrg# --with-xmlto assumes 'auto'. 1849621f50c3Smrg# 1850621f50c3Smrg# Interface to module: 1851621f50c3Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1852621f50c3Smrg# XMLTO: returns the path of the xmlto program found 1853621f50c3Smrg# returns the path set by the user in the environment 1854621f50c3Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1855621f50c3Smrg# 'no' user instructs the module not to use xmlto 1856621f50c3Smrg# 1857621f50c3Smrg# Added in version 1.10.0 1858621f50c3Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1859621f50c3Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1860621f50c3Smrg# 1861621f50c3Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1862621f50c3Smrg# 1863621f50c3SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1864621f50c3SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1865621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1866621f50c3SmrgAC_ARG_WITH(xmlto, 1867621f50c3Smrg AS_HELP_STRING([--with-xmlto], 1868621f50c3Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1869621f50c3Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1870621f50c3Smrgm4_undefine([_defopt]) 1871dc407927Smrg 1872621f50c3Smrgif test "x$use_xmlto" = x"auto"; then 1873621f50c3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1874621f50c3Smrg if test "x$XMLTO" = "x"; then 1875621f50c3Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1876621f50c3Smrg have_xmlto=no 1877621f50c3Smrg else 1878621f50c3Smrg have_xmlto=yes 1879621f50c3Smrg fi 1880621f50c3Smrgelif test "x$use_xmlto" = x"yes" ; then 1881621f50c3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1882621f50c3Smrg if test "x$XMLTO" = "x"; then 1883621f50c3Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1884621f50c3Smrg fi 1885621f50c3Smrg have_xmlto=yes 1886621f50c3Smrgelif test "x$use_xmlto" = x"no" ; then 1887621f50c3Smrg if test "x$XMLTO" != "x"; then 1888621f50c3Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1889621f50c3Smrg fi 1890621f50c3Smrg have_xmlto=no 1891621f50c3Smrgelse 1892621f50c3Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1893621f50c3Smrgfi 1894dc407927Smrg 1895621f50c3Smrg# Test for a minimum version of xmlto, if provided. 1896621f50c3Smrgm4_ifval([$1], 1897621f50c3Smrg[if test "$have_xmlto" = yes; then 1898621f50c3Smrg # scrape the xmlto version 1899621f50c3Smrg AC_MSG_CHECKING([the xmlto version]) 1900621f50c3Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1901621f50c3Smrg AC_MSG_RESULT([$xmlto_version]) 1902621f50c3Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1903621f50c3Smrg [if test "x$use_xmlto" = xauto; then 1904621f50c3Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1905621f50c3Smrg have_xmlto=no 1906621f50c3Smrg else 1907621f50c3Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1908621f50c3Smrg fi]) 1909621f50c3Smrgfi]) 1910dd0822caSmrg 1911621f50c3Smrg# Test for the ability of xmlto to generate a text target 1912621f50c3Smrg# 1913621f50c3Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1914621f50c3Smrg# following test for empty XML docbook files. 1915621f50c3Smrg# For compatibility reasons use the following empty XML docbook file and if 1916621f50c3Smrg# it fails try it again with a non-empty XML file. 1917621f50c3Smrghave_xmlto_text=no 1918621f50c3Smrgcat > conftest.xml << "EOF" 1919621f50c3SmrgEOF 1920621f50c3SmrgAS_IF([test "$have_xmlto" = yes], 1921621f50c3Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1922621f50c3Smrg [have_xmlto_text=yes], 1923621f50c3Smrg [# Try it again with a non-empty XML file. 1924621f50c3Smrg cat > conftest.xml << "EOF" 1925621f50c3Smrg<x></x> 1926621f50c3SmrgEOF 1927621f50c3Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1928621f50c3Smrg [have_xmlto_text=yes], 1929621f50c3Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1930621f50c3Smrgrm -f conftest.xml 1931621f50c3SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1932621f50c3SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1933621f50c3Smrg]) # XORG_WITH_XMLTO 1934dd0822caSmrg 1935621f50c3Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1936621f50c3Smrg# -------------------------------------------- 1937621f50c3Smrg# Minimum version: 1.12.0 1938621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1939621f50c3Smrg# 1940621f50c3Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1941621f50c3Smrg# XML-based language used for the transformation of XML documents. 1942621f50c3Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1943621f50c3Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1944621f50c3Smrg# The XSLT processor is often used as a standalone tool for transformations. 1945621f50c3Smrg# It should not be assumed that this tool is used only to work with documnetation. 1946621f50c3Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1947621f50c3Smrg# 1948621f50c3Smrg# Interface to module: 1949621f50c3Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1950621f50c3Smrg# XSLTPROC: returns the path of the xsltproc program found 1951621f50c3Smrg# returns the path set by the user in the environment 1952621f50c3Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1953621f50c3Smrg# 'no' user instructs the module not to use xsltproc 1954621f50c3Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1955621f50c3Smrg# 1956621f50c3Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1957621f50c3Smrg# 1958621f50c3SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1959621f50c3SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1960621f50c3Smrg# Preserves the interface, should it be implemented later 1961621f50c3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1962621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1963621f50c3SmrgAC_ARG_WITH(xsltproc, 1964621f50c3Smrg AS_HELP_STRING([--with-xsltproc], 1965621f50c3Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1966621f50c3Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1967621f50c3Smrgm4_undefine([_defopt]) 1968621f50c3Smrg 1969621f50c3Smrgif test "x$use_xsltproc" = x"auto"; then 1970621f50c3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1971621f50c3Smrg if test "x$XSLTPROC" = "x"; then 1972621f50c3Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1973621f50c3Smrg have_xsltproc=no 1974621f50c3Smrg else 1975621f50c3Smrg have_xsltproc=yes 1976621f50c3Smrg fi 1977621f50c3Smrgelif test "x$use_xsltproc" = x"yes" ; then 1978621f50c3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1979621f50c3Smrg if test "x$XSLTPROC" = "x"; then 1980621f50c3Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1981621f50c3Smrg fi 1982621f50c3Smrg have_xsltproc=yes 1983621f50c3Smrgelif test "x$use_xsltproc" = x"no" ; then 1984621f50c3Smrg if test "x$XSLTPROC" != "x"; then 1985621f50c3Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1986621f50c3Smrg fi 1987621f50c3Smrg have_xsltproc=no 1988dd0822caSmrgelse 1989621f50c3Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1990dd0822caSmrgfi 1991dd0822caSmrg 1992621f50c3SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1993621f50c3Smrg]) # XORG_WITH_XSLTPROC 1994dd0822caSmrg 1995621f50c3Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1996621f50c3Smrg# ---------------------------------------- 1997621f50c3Smrg# Minimum version: 1.15.0 1998621f50c3Smrg# 1999621f50c3Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 2000621f50c3Smrg# scanning arbitrary text files, extracting information from those text files, 2001621f50c3Smrg# and printing reports based on that information. 2002621f50c3Smrg# 2003621f50c3Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 2004621f50c3Smrg# 2005621f50c3Smrg# Interface to module: 2006621f50c3Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 2007621f50c3Smrg# PERL: returns the path of the perl program found 2008621f50c3Smrg# returns the path set by the user in the environment 2009621f50c3Smrg# --with-perl: 'yes' user instructs the module to use perl 2010621f50c3Smrg# 'no' user instructs the module not to use perl 2011621f50c3Smrg# have_perl: returns yes if perl found in PATH or no 2012621f50c3Smrg# 2013621f50c3Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 2014621f50c3Smrg# 2015621f50c3SmrgAC_DEFUN([XORG_WITH_PERL],[ 2016621f50c3SmrgAC_ARG_VAR([PERL], [Path to perl command]) 2017621f50c3Smrg# Preserves the interface, should it be implemented later 2018621f50c3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 2019621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2020621f50c3SmrgAC_ARG_WITH(perl, 2021621f50c3Smrg AS_HELP_STRING([--with-perl], 2022621f50c3Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 2023621f50c3Smrg [use_perl=$withval], [use_perl=]_defopt) 2024621f50c3Smrgm4_undefine([_defopt]) 2025dc407927Smrg 2026621f50c3Smrgif test "x$use_perl" = x"auto"; then 2027621f50c3Smrg AC_PATH_PROG([PERL], [perl]) 2028621f50c3Smrg if test "x$PERL" = "x"; then 2029621f50c3Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 2030621f50c3Smrg have_perl=no 2031621f50c3Smrg else 2032621f50c3Smrg have_perl=yes 2033621f50c3Smrg fi 2034621f50c3Smrgelif test "x$use_perl" = x"yes" ; then 2035621f50c3Smrg AC_PATH_PROG([PERL], [perl]) 2036621f50c3Smrg if test "x$PERL" = "x"; then 2037621f50c3Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 2038621f50c3Smrg fi 2039621f50c3Smrg have_perl=yes 2040621f50c3Smrgelif test "x$use_perl" = x"no" ; then 2041621f50c3Smrg if test "x$PERL" != "x"; then 2042621f50c3Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 2043621f50c3Smrg fi 2044621f50c3Smrg have_perl=no 2045621f50c3Smrgelse 2046621f50c3Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2047621f50c3Smrgfi 2048dc407927Smrg 2049621f50c3SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2050621f50c3Smrg]) # XORG_WITH_PERL 20513eed67faSmbalmer 2052621f50c3Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2053621f50c3Smrg# ---------------- 2054621f50c3Smrg# Minimum version: 1.5.0 2055621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2056621f50c3Smrg# 2057621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2058621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 2059621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2060901a7df4Smrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 2061621f50c3Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2062621f50c3Smrg# --with-asciidoc assumes 'auto'. 2063621f50c3Smrg# 2064621f50c3Smrg# Interface to module: 2065621f50c3Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2066621f50c3Smrg# ASCIIDOC: returns the path of the asciidoc program found 2067621f50c3Smrg# returns the path set by the user in the environment 2068621f50c3Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2069621f50c3Smrg# 'no' user instructs the module not to use asciidoc 2070621f50c3Smrg# 2071621f50c3Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2072621f50c3Smrg# 2073621f50c3SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2074621f50c3SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2075621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2076621f50c3SmrgAC_ARG_WITH(asciidoc, 2077621f50c3Smrg AS_HELP_STRING([--with-asciidoc], 2078621f50c3Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2079621f50c3Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2080621f50c3Smrgm4_undefine([_defopt]) 20813eed67faSmbalmer 2082621f50c3Smrgif test "x$use_asciidoc" = x"auto"; then 2083621f50c3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2084621f50c3Smrg if test "x$ASCIIDOC" = "x"; then 2085621f50c3Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2086621f50c3Smrg have_asciidoc=no 2087621f50c3Smrg else 2088621f50c3Smrg have_asciidoc=yes 20893eed67faSmbalmer fi 2090621f50c3Smrgelif test "x$use_asciidoc" = x"yes" ; then 2091621f50c3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2092621f50c3Smrg if test "x$ASCIIDOC" = "x"; then 2093621f50c3Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2094621f50c3Smrg fi 2095621f50c3Smrg have_asciidoc=yes 2096621f50c3Smrgelif test "x$use_asciidoc" = x"no" ; then 2097621f50c3Smrg if test "x$ASCIIDOC" != "x"; then 2098621f50c3Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2099621f50c3Smrg fi 2100621f50c3Smrg have_asciidoc=no 21013eed67faSmbalmerelse 2102621f50c3Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 21033eed67faSmbalmerfi 2104621f50c3Smrgm4_ifval([$1], 2105621f50c3Smrg[if test "$have_asciidoc" = yes; then 2106621f50c3Smrg # scrape the asciidoc version 2107621f50c3Smrg AC_MSG_CHECKING([the asciidoc version]) 2108621f50c3Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2109621f50c3Smrg AC_MSG_RESULT([$asciidoc_version]) 2110621f50c3Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2111621f50c3Smrg [if test "x$use_asciidoc" = xauto; then 2112621f50c3Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2113621f50c3Smrg have_asciidoc=no 2114621f50c3Smrg else 2115621f50c3Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2116621f50c3Smrg fi]) 2117621f50c3Smrgfi]) 2118621f50c3SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2119621f50c3Smrg]) # XORG_WITH_ASCIIDOC 21203eed67faSmbalmer 2121621f50c3Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2122621f50c3Smrg# ------------------------------------------- 2123621f50c3Smrg# Minimum version: 1.5.0 2124621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2125621f50c3Smrg# Minimum version for optional DOT checking: 1.18.0 2126621f50c3Smrg# 2127621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2128621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 2129621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2130901a7df4Smrg# the --with-doxygen option, it allows maximum flexibility in making decisions 2131621f50c3Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2132621f50c3Smrg# --with-doxygen assumes 'auto'. 2133621f50c3Smrg# 2134621f50c3Smrg# Interface to module: 2135621f50c3Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2136621f50c3Smrg# DOXYGEN: returns the path of the doxygen program found 2137621f50c3Smrg# returns the path set by the user in the environment 2138621f50c3Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2139621f50c3Smrg# 'no' user instructs the module not to use doxygen 2140621f50c3Smrg# 2141621f50c3Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2142621f50c3Smrg# 2143621f50c3SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2144621f50c3SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2145621f50c3SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2146621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2147621f50c3SmrgAC_ARG_WITH(doxygen, 2148621f50c3Smrg AS_HELP_STRING([--with-doxygen], 2149621f50c3Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2150621f50c3Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2151621f50c3Smrgm4_undefine([_defopt]) 2152dc407927Smrg 2153621f50c3Smrgif test "x$use_doxygen" = x"auto"; then 2154621f50c3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2155621f50c3Smrg if test "x$DOXYGEN" = "x"; then 2156621f50c3Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2157621f50c3Smrg have_doxygen=no 2158621f50c3Smrg else 2159621f50c3Smrg have_doxygen=yes 21603eed67faSmbalmer fi 2161621f50c3Smrgelif test "x$use_doxygen" = x"yes" ; then 2162621f50c3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2163621f50c3Smrg if test "x$DOXYGEN" = "x"; then 2164621f50c3Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2165621f50c3Smrg fi 2166621f50c3Smrg have_doxygen=yes 2167621f50c3Smrgelif test "x$use_doxygen" = x"no" ; then 2168621f50c3Smrg if test "x$DOXYGEN" != "x"; then 2169621f50c3Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2170621f50c3Smrg fi 2171621f50c3Smrg have_doxygen=no 21723eed67faSmbalmerelse 2173621f50c3Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 21743eed67faSmbalmerfi 2175621f50c3Smrgm4_ifval([$1], 2176621f50c3Smrg[if test "$have_doxygen" = yes; then 2177621f50c3Smrg # scrape the doxygen version 2178621f50c3Smrg AC_MSG_CHECKING([the doxygen version]) 2179621f50c3Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2180621f50c3Smrg AC_MSG_RESULT([$doxygen_version]) 2181621f50c3Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2182621f50c3Smrg [if test "x$use_doxygen" = xauto; then 2183621f50c3Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2184621f50c3Smrg have_doxygen=no 2185621f50c3Smrg else 2186621f50c3Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2187621f50c3Smrg fi]) 2188621f50c3Smrgfi]) 21893eed67faSmbalmer 2190621f50c3Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2191621f50c3Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2192621f50c3Smrgdnl HAVE_DOT = @HAVE_DOT@ 2193621f50c3SmrgHAVE_DOT=no 2194621f50c3Smrgif test "x$have_doxygen" = "xyes"; then 2195621f50c3Smrg AC_PATH_PROG([DOT], [dot]) 2196621f50c3Smrg if test "x$DOT" != "x"; then 2197621f50c3Smrg HAVE_DOT=yes 2198621f50c3Smrg fi 2199621f50c3Smrgfi 22003eed67faSmbalmer 2201621f50c3SmrgAC_SUBST([HAVE_DOT]) 2202621f50c3SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2203621f50c3SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2204621f50c3Smrg]) # XORG_WITH_DOXYGEN 2205dc407927Smrg 2206621f50c3Smrg# XORG_WITH_GROFF([DEFAULT]) 2207621f50c3Smrg# ---------------- 2208621f50c3Smrg# Minimum version: 1.6.0 2209621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2210621f50c3Smrg# 2211621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2212621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 2213621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2214901a7df4Smrg# the --with-groff option, it allows maximum flexibility in making decisions 2215621f50c3Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 2216621f50c3Smrg# --with-groff assumes 'auto'. 2217621f50c3Smrg# 2218621f50c3Smrg# Interface to module: 2219621f50c3Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2220621f50c3Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2221621f50c3Smrg# HAVE_GROFF_MS: the -ms macros package 2222621f50c3Smrg# GROFF: returns the path of the groff program found 2223621f50c3Smrg# returns the path set by the user in the environment 2224621f50c3Smrg# --with-groff: 'yes' user instructs the module to use groff 2225621f50c3Smrg# 'no' user instructs the module not to use groff 2226621f50c3Smrg# 2227621f50c3Smrg# Added in version 1.9.0: 2228621f50c3Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2229621f50c3Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2230621f50c3Smrg# psselect from the psutils package. 2231621f50c3Smrg# the ghostcript package. Refer to the grohtml man pages 2232621f50c3Smrg# 2233621f50c3Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2234621f50c3Smrg# 2235621f50c3Smrg# OS and distros often splits groff in a basic and full package, the former 2236621f50c3Smrg# having the groff program and the later having devices, fonts and macros 2237621f50c3Smrg# Checking for the groff executable is not enough. 2238621f50c3Smrg# 2239621f50c3Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 2240621f50c3Smrg# unset HAVE_GROFF or GROFF env variables. 2241621f50c3Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2242621f50c3Smrg# 2243621f50c3SmrgAC_DEFUN([XORG_WITH_GROFF],[ 2244621f50c3SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2245621f50c3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2246621f50c3SmrgAC_ARG_WITH(groff, 2247621f50c3Smrg AS_HELP_STRING([--with-groff], 2248621f50c3Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2249621f50c3Smrg [use_groff=$withval], [use_groff=]_defopt) 2250621f50c3Smrgm4_undefine([_defopt]) 22513eed67faSmbalmer 2252621f50c3Smrgif test "x$use_groff" = x"auto"; then 2253621f50c3Smrg AC_PATH_PROG([GROFF], [groff]) 2254621f50c3Smrg if test "x$GROFF" = "x"; then 2255621f50c3Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2256621f50c3Smrg have_groff=no 2257621f50c3Smrg else 2258621f50c3Smrg have_groff=yes 2259621f50c3Smrg fi 2260621f50c3Smrgelif test "x$use_groff" = x"yes" ; then 2261621f50c3Smrg AC_PATH_PROG([GROFF], [groff]) 2262621f50c3Smrg if test "x$GROFF" = "x"; then 2263621f50c3Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2264621f50c3Smrg fi 2265621f50c3Smrg have_groff=yes 2266621f50c3Smrgelif test "x$use_groff" = x"no" ; then 2267621f50c3Smrg if test "x$GROFF" != "x"; then 2268621f50c3Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2269621f50c3Smrg fi 2270621f50c3Smrg have_groff=no 2271621f50c3Smrgelse 2272621f50c3Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2273621f50c3Smrgfi 227475cbef56Smrg 2275621f50c3Smrg# We have groff, test for the presence of the macro packages 2276621f50c3Smrgif test "x$have_groff" = x"yes"; then 2277621f50c3Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2278621f50c3Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2279621f50c3Smrg groff_ms_works=yes 22803eed67faSmbalmer else 2281621f50c3Smrg groff_ms_works=no 22823eed67faSmbalmer fi 2283621f50c3Smrg AC_MSG_RESULT([$groff_ms_works]) 2284621f50c3Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2285621f50c3Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2286621f50c3Smrg groff_mm_works=yes 22873eed67faSmbalmer else 2288621f50c3Smrg groff_mm_works=no 22893eed67faSmbalmer fi 2290621f50c3Smrg AC_MSG_RESULT([$groff_mm_works]) 22913eed67faSmbalmerfi 22923eed67faSmbalmer 2293621f50c3Smrg# We have groff, test for HTML dependencies, one command per package 2294621f50c3Smrgif test "x$have_groff" = x"yes"; then 2295621f50c3Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2296621f50c3Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2297621f50c3Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2298621f50c3Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2299621f50c3Smrg have_groff_html=yes 2300621f50c3Smrg else 2301621f50c3Smrg have_groff_html=no 2302621f50c3Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2303621f50c3Smrg fi 2304621f50c3Smrgfi 23053eed67faSmbalmer 2306621f50c3Smrg# Set Automake conditionals for Makefiles 2307621f50c3SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2308621f50c3SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2309621f50c3SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2310621f50c3SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2311621f50c3Smrg]) # XORG_WITH_GROFF 23123eed67faSmbalmer 2313621f50c3Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2314621f50c3Smrg# --------------------------------------- 2315621f50c3Smrg# Minimum version: 1.6.0 2316621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2317621f50c3Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2318621f50c3Smrg# 2319621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2320621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 2321621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2322901a7df4Smrg# the --with-fop option, it allows maximum flexibility in making decisions 2323621f50c3Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 2324621f50c3Smrg# --with-fop assumes 'auto'. 2325621f50c3Smrg# 2326621f50c3Smrg# Interface to module: 2327621f50c3Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2328621f50c3Smrg# FOP: returns the path of the fop program found 2329621f50c3Smrg# returns the path set by the user in the environment 2330621f50c3Smrg# --with-fop: 'yes' user instructs the module to use fop 2331621f50c3Smrg# 'no' user instructs the module not to use fop 2332621f50c3Smrg# 2333621f50c3Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2334621f50c3Smrg# 2335621f50c3SmrgAC_DEFUN([XORG_WITH_FOP],[ 2336621f50c3SmrgAC_ARG_VAR([FOP], [Path to fop command]) 2337621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2338621f50c3SmrgAC_ARG_WITH(fop, 2339621f50c3Smrg AS_HELP_STRING([--with-fop], 2340621f50c3Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2341621f50c3Smrg [use_fop=$withval], [use_fop=]_defopt) 2342621f50c3Smrgm4_undefine([_defopt]) 23433eed67faSmbalmer 2344621f50c3Smrgif test "x$use_fop" = x"auto"; then 2345621f50c3Smrg AC_PATH_PROG([FOP], [fop]) 2346621f50c3Smrg if test "x$FOP" = "x"; then 2347621f50c3Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2348621f50c3Smrg have_fop=no 2349621f50c3Smrg else 2350621f50c3Smrg have_fop=yes 2351621f50c3Smrg fi 2352621f50c3Smrgelif test "x$use_fop" = x"yes" ; then 2353621f50c3Smrg AC_PATH_PROG([FOP], [fop]) 2354621f50c3Smrg if test "x$FOP" = "x"; then 2355621f50c3Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2356621f50c3Smrg fi 2357621f50c3Smrg have_fop=yes 2358621f50c3Smrgelif test "x$use_fop" = x"no" ; then 2359621f50c3Smrg if test "x$FOP" != "x"; then 2360621f50c3Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2361621f50c3Smrg fi 2362621f50c3Smrg have_fop=no 2363621f50c3Smrgelse 2364621f50c3Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2365621f50c3Smrgfi 23663eed67faSmbalmer 2367621f50c3Smrg# Test for a minimum version of fop, if provided. 2368621f50c3Smrgm4_ifval([$1], 2369621f50c3Smrg[if test "$have_fop" = yes; then 2370621f50c3Smrg # scrape the fop version 2371621f50c3Smrg AC_MSG_CHECKING([for fop minimum version]) 2372621f50c3Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2373621f50c3Smrg AC_MSG_RESULT([$fop_version]) 2374621f50c3Smrg AS_VERSION_COMPARE([$fop_version], [$1], 2375621f50c3Smrg [if test "x$use_fop" = xauto; then 2376621f50c3Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2377621f50c3Smrg have_fop=no 2378621f50c3Smrg else 2379621f50c3Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2380621f50c3Smrg fi]) 2381621f50c3Smrgfi]) 2382621f50c3SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2383621f50c3Smrg]) # XORG_WITH_FOP 23843eed67faSmbalmer 2385621f50c3Smrg# XORG_WITH_M4([MIN-VERSION]) 2386621f50c3Smrg# --------------------------- 2387621f50c3Smrg# Minimum version: 1.19.0 2388621f50c3Smrg# 2389621f50c3Smrg# This macro attempts to locate an m4 macro processor which supports 2390621f50c3Smrg# -I option and is only useful for modules relying on M4 in order to 2391621f50c3Smrg# expand macros in source code files. 2392621f50c3Smrg# 2393621f50c3Smrg# Interface to module: 2394621f50c3Smrg# M4: returns the path of the m4 program found 2395621f50c3Smrg# returns the path set by the user in the environment 2396621f50c3Smrg# 2397621f50c3SmrgAC_DEFUN([XORG_WITH_M4], [ 2398621f50c3SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2399621f50c3Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2400621f50c3Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2401621f50c3Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2402621f50c3Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2403621f50c3Smrg [$PATH:/usr/gnu/bin])]) 2404dd0822caSmrg 2405621f50c3SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2406621f50c3Smrg]) # XORG_WITH_M4 24073eed67faSmbalmer 2408621f50c3Smrg# XORG_WITH_PS2PDF([DEFAULT]) 2409621f50c3Smrg# ---------------- 2410621f50c3Smrg# Minimum version: 1.6.0 2411621f50c3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2412621f50c3Smrg# 2413621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2414621f50c3Smrg# not at the appropriate level. This macro enables a module to test for the 2415621f50c3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2416901a7df4Smrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 2417621f50c3Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2418621f50c3Smrg# --with-ps2pdf assumes 'auto'. 2419621f50c3Smrg# 2420621f50c3Smrg# Interface to module: 2421621f50c3Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2422621f50c3Smrg# PS2PDF: returns the path of the ps2pdf program found 2423621f50c3Smrg# returns the path set by the user in the environment 2424621f50c3Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2425621f50c3Smrg# 'no' user instructs the module not to use ps2pdf 2426621f50c3Smrg# 2427621f50c3Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2428621f50c3Smrg# 2429621f50c3SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2430621f50c3SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2431621f50c3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2432621f50c3SmrgAC_ARG_WITH(ps2pdf, 2433621f50c3Smrg AS_HELP_STRING([--with-ps2pdf], 2434621f50c3Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2435621f50c3Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2436621f50c3Smrgm4_undefine([_defopt]) 24373eed67faSmbalmer 2438621f50c3Smrgif test "x$use_ps2pdf" = x"auto"; then 2439621f50c3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2440621f50c3Smrg if test "x$PS2PDF" = "x"; then 2441621f50c3Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2442621f50c3Smrg have_ps2pdf=no 2443621f50c3Smrg else 2444621f50c3Smrg have_ps2pdf=yes 2445621f50c3Smrg fi 2446621f50c3Smrgelif test "x$use_ps2pdf" = x"yes" ; then 2447621f50c3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2448621f50c3Smrg if test "x$PS2PDF" = "x"; then 2449621f50c3Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2450621f50c3Smrg fi 2451621f50c3Smrg have_ps2pdf=yes 2452621f50c3Smrgelif test "x$use_ps2pdf" = x"no" ; then 2453621f50c3Smrg if test "x$PS2PDF" != "x"; then 2454621f50c3Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2455621f50c3Smrg fi 2456621f50c3Smrg have_ps2pdf=no 2457621f50c3Smrgelse 2458621f50c3Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 24593eed67faSmbalmerfi 2460621f50c3SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2461621f50c3Smrg]) # XORG_WITH_PS2PDF 24623eed67faSmbalmer 2463621f50c3Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2464621f50c3Smrg# ---------------- 2465621f50c3Smrg# Minimum version: 1.6.0 2466621f50c3Smrg# 2467621f50c3Smrg# Documentation tools are not always available on all platforms and sometimes 2468621f50c3Smrg# not at the appropriate level. This macro enables a builder to skip all 2469621f50c3Smrg# documentation targets except traditional man pages. 2470621f50c3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2471901a7df4Smrg# maximum flexibility in controlling documentation building. 2472621f50c3Smrg# Refer to: 2473621f50c3Smrg# XORG_WITH_XMLTO --with-xmlto 2474621f50c3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2475621f50c3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2476621f50c3Smrg# XORG_WITH_FOP --with-fop 2477621f50c3Smrg# XORG_WITH_GROFF --with-groff 2478621f50c3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2479621f50c3Smrg# 2480621f50c3Smrg# Interface to module: 2481621f50c3Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2482621f50c3Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2483621f50c3Smrg# 'no' user instructs the module not to generate docs 2484621f50c3Smrg# parm1: specify the default value, yes or no. 2485621f50c3Smrg# 2486621f50c3SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2487621f50c3Smrgm4_define([docs_default], m4_default([$1], [yes])) 2488621f50c3SmrgAC_ARG_ENABLE(docs, 2489621f50c3Smrg AS_HELP_STRING([--enable-docs], 2490621f50c3Smrg [Enable building the documentation (default: ]docs_default[)]), 2491621f50c3Smrg [build_docs=$enableval], [build_docs=]docs_default) 2492621f50c3Smrgm4_undefine([docs_default]) 2493621f50c3SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2494621f50c3SmrgAC_MSG_CHECKING([whether to build documentation]) 2495621f50c3SmrgAC_MSG_RESULT([$build_docs]) 2496621f50c3Smrg]) # XORG_ENABLE_DOCS 24973eed67faSmbalmer 2498621f50c3Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2499621f50c3Smrg# ---------------- 2500621f50c3Smrg# Minimum version: 1.6.0 2501621f50c3Smrg# 2502621f50c3Smrg# This macro enables a builder to skip all developer documentation. 2503621f50c3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2504901a7df4Smrg# maximum flexibility in controlling documentation building. 2505621f50c3Smrg# Refer to: 2506621f50c3Smrg# XORG_WITH_XMLTO --with-xmlto 2507621f50c3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2508621f50c3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2509621f50c3Smrg# XORG_WITH_FOP --with-fop 2510621f50c3Smrg# XORG_WITH_GROFF --with-groff 2511621f50c3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2512621f50c3Smrg# 2513621f50c3Smrg# Interface to module: 2514621f50c3Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2515621f50c3Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2516621f50c3Smrg# 'no' user instructs the module not to generate developer docs 2517621f50c3Smrg# parm1: specify the default value, yes or no. 2518621f50c3Smrg# 2519621f50c3SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2520621f50c3Smrgm4_define([devel_default], m4_default([$1], [yes])) 2521621f50c3SmrgAC_ARG_ENABLE(devel-docs, 2522621f50c3Smrg AS_HELP_STRING([--enable-devel-docs], 2523621f50c3Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2524621f50c3Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2525621f50c3Smrgm4_undefine([devel_default]) 2526621f50c3SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2527621f50c3SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2528621f50c3SmrgAC_MSG_RESULT([$build_devel_docs]) 2529621f50c3Smrg]) # XORG_ENABLE_DEVEL_DOCS 25303eed67faSmbalmer 2531621f50c3Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2532621f50c3Smrg# ---------------- 2533621f50c3Smrg# Minimum version: 1.6.0 2534621f50c3Smrg# 2535621f50c3Smrg# This macro enables a builder to skip all functional specification targets. 2536621f50c3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2537901a7df4Smrg# maximum flexibility in controlling documentation building. 2538621f50c3Smrg# Refer to: 2539621f50c3Smrg# XORG_WITH_XMLTO --with-xmlto 2540621f50c3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2541621f50c3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2542621f50c3Smrg# XORG_WITH_FOP --with-fop 2543621f50c3Smrg# XORG_WITH_GROFF --with-groff 2544621f50c3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2545621f50c3Smrg# 2546621f50c3Smrg# Interface to module: 2547621f50c3Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2548621f50c3Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2549621f50c3Smrg# 'no' user instructs the module not to generate specs 2550621f50c3Smrg# parm1: specify the default value, yes or no. 2551621f50c3Smrg# 2552621f50c3SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2553621f50c3Smrgm4_define([spec_default], m4_default([$1], [yes])) 2554621f50c3SmrgAC_ARG_ENABLE(specs, 2555621f50c3Smrg AS_HELP_STRING([--enable-specs], 2556621f50c3Smrg [Enable building the specs (default: ]spec_default[)]), 2557621f50c3Smrg [build_specs=$enableval], [build_specs=]spec_default) 2558621f50c3Smrgm4_undefine([spec_default]) 2559621f50c3SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2560621f50c3SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2561621f50c3SmrgAC_MSG_RESULT([$build_specs]) 2562621f50c3Smrg]) # XORG_ENABLE_SPECS 25633eed67faSmbalmer 2564621f50c3Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2565621f50c3Smrg# ---------------------------------------------- 2566621f50c3Smrg# Minimum version: 1.13.0 2567621f50c3Smrg# 2568621f50c3Smrg# This macro enables a builder to enable/disable unit testing 2569621f50c3Smrg# It makes no assumption about the test cases implementation 2570621f50c3Smrg# Test cases may or may not use Automake "Support for test suites" 2571621f50c3Smrg# They may or may not use the software utility library GLib 2572621f50c3Smrg# 2573621f50c3Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2574621f50c3Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2575621f50c3Smrg# The variable enable_unit_tests is used by other macros in this file. 2576621f50c3Smrg# 2577621f50c3Smrg# Interface to module: 2578621f50c3Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2579621f50c3Smrg# enable_unit_tests: used in configure.ac for additional configuration 2580621f50c3Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2581621f50c3Smrg# 'no' user instructs the module not to build tests 2582621f50c3Smrg# parm1: specify the default value, yes or no. 2583621f50c3Smrg# 2584621f50c3SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2585621f50c3SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2586621f50c3SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2587621f50c3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2588621f50c3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2589621f50c3SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2590621f50c3Smrg [Enable building unit test cases (default: ]_defopt[)]), 2591621f50c3Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2592621f50c3Smrgm4_undefine([_defopt]) 2593621f50c3SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2594621f50c3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2595621f50c3SmrgAC_MSG_RESULT([$enable_unit_tests]) 2596621f50c3Smrg]) # XORG_ENABLE_UNIT_TESTS 25973eed67faSmbalmer 2598621f50c3Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2599621f50c3Smrg# ------------------------------------------------------ 2600621f50c3Smrg# Minimum version: 1.17.0 2601621f50c3Smrg# 2602621f50c3Smrg# This macro enables a builder to enable/disable integration testing 2603621f50c3Smrg# It makes no assumption about the test cases' implementation 2604621f50c3Smrg# Test cases may or may not use Automake "Support for test suites" 2605621f50c3Smrg# 2606621f50c3Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2607621f50c3Smrg# usually requires less dependencies and may be built and run under less 2608621f50c3Smrg# stringent environments than integration tests. 2609621f50c3Smrg# 2610621f50c3Smrg# Interface to module: 2611621f50c3Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2612621f50c3Smrg# enable_integration_tests: used in configure.ac for additional configuration 2613621f50c3Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2614621f50c3Smrg# 'no' user instructs the module not to build tests 2615621f50c3Smrg# parm1: specify the default value, yes or no. 2616621f50c3Smrg# 2617621f50c3SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2618621f50c3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2619621f50c3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2620621f50c3SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2621621f50c3Smrg [Enable building integration test cases (default: ]_defopt[)]), 2622621f50c3Smrg [enable_integration_tests=$enableval], 2623621f50c3Smrg [enable_integration_tests=]_defopt) 2624621f50c3Smrgm4_undefine([_defopt]) 2625621f50c3SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2626621f50c3Smrg [test "x$enable_integration_tests" != xno]) 2627621f50c3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2628621f50c3SmrgAC_MSG_RESULT([$enable_integration_tests]) 2629621f50c3Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 26303eed67faSmbalmer 2631621f50c3Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2632621f50c3Smrg# ---------------------------------------- 2633621f50c3Smrg# Minimum version: 1.13.0 2634621f50c3Smrg# 2635621f50c3Smrg# GLib is a library which provides advanced data structures and functions. 2636621f50c3Smrg# This macro enables a module to test for the presence of Glib. 2637621f50c3Smrg# 2638621f50c3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2639621f50c3Smrg# Otherwise the value of $enable_unit_tests is blank. 2640621f50c3Smrg# 2641621f50c3Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2642621f50c3Smrg# test support usually requires less dependencies and may be built and run under 2643621f50c3Smrg# less stringent environments than integration tests. 2644621f50c3Smrg# 2645621f50c3Smrg# Interface to module: 2646621f50c3Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2647621f50c3Smrg# with_glib: used in configure.ac to know if GLib has been found 2648621f50c3Smrg# --with-glib: 'yes' user instructs the module to use glib 2649621f50c3Smrg# 'no' user instructs the module not to use glib 2650621f50c3Smrg# 2651621f50c3SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2652621f50c3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2653621f50c3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2654621f50c3SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2655621f50c3Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2656621f50c3Smrg [with_glib=$withval], [with_glib=]_defopt) 2657621f50c3Smrgm4_undefine([_defopt]) 26581a9c160aSmrg 2659621f50c3Smrghave_glib=no 2660621f50c3Smrg# Do not probe GLib if user explicitly disabled unit testing 2661621f50c3Smrgif test "x$enable_unit_tests" != x"no"; then 2662621f50c3Smrg # Do not probe GLib if user explicitly disabled it 2663621f50c3Smrg if test "x$with_glib" != x"no"; then 2664621f50c3Smrg m4_ifval( 2665621f50c3Smrg [$1], 2666621f50c3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2667621f50c3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2668621f50c3Smrg ) 2669621f50c3Smrg fi 2670621f50c3Smrgfi 26713eed67faSmbalmer 2672621f50c3Smrg# Not having GLib when unit testing has been explicitly requested is an error 2673621f50c3Smrgif test "x$enable_unit_tests" = x"yes"; then 2674621f50c3Smrg if test "x$have_glib" = x"no"; then 2675621f50c3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26763eed67faSmbalmer fi 2677621f50c3Smrgfi 26783eed67faSmbalmer 2679621f50c3Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2680621f50c3Smrgif test "x$enable_unit_tests" = x"no"; then 2681621f50c3Smrg if test "x$with_glib" = x"yes"; then 2682621f50c3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2683621f50c3Smrg fi 2684621f50c3Smrgfi 26853eed67faSmbalmer 2686621f50c3Smrg# Not having GLib when it has been explicitly requested is an error 2687621f50c3Smrgif test "x$with_glib" = x"yes"; then 2688621f50c3Smrg if test "x$have_glib" = x"no"; then 2689621f50c3Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2690621f50c3Smrg fi 2691621f50c3Smrgfi 26923eed67faSmbalmer 2693621f50c3SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2694621f50c3Smrg]) # XORG_WITH_GLIB 26953eed67faSmbalmer 2696621f50c3Smrg# XORG_LD_WRAP([required|optional]) 2697621f50c3Smrg# --------------------------------- 2698621f50c3Smrg# Minimum version: 1.13.0 2699621f50c3Smrg# 2700621f50c3Smrg# Check if linker supports -wrap, passed via compiler flags 2701621f50c3Smrg# 2702621f50c3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2703621f50c3Smrg# Otherwise the value of $enable_unit_tests is blank. 2704621f50c3Smrg# 2705621f50c3Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2706621f50c3Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2707621f50c3Smrg# available, an argument of "optional" allows use when some unit tests require 2708621f50c3Smrg# ld -wrap and others do not. 2709621f50c3Smrg# 2710621f50c3SmrgAC_DEFUN([XORG_LD_WRAP],[ 2711621f50c3SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2712621f50c3Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2713621f50c3Smrg void __wrap_exit(int status) { return; }], 2714621f50c3Smrg [exit(0);])]) 2715621f50c3Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2716621f50c3Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2717621f50c3Smrg if test "x$have_ld_wrap" = x"no"; then 2718621f50c3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2719621f50c3Smrg fi 2720621f50c3Smrgfi 2721621f50c3SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2722621f50c3Smrg# 2723621f50c3Smrg]) # XORG_LD_WRAP 27243eed67faSmbalmer 2725621f50c3Smrg# XORG_CHECK_LINKER_FLAGS 2726621f50c3Smrg# ----------------------- 2727621f50c3Smrg# SYNOPSIS 2728621f50c3Smrg# 2729621f50c3Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2730621f50c3Smrg# 2731621f50c3Smrg# DESCRIPTION 2732621f50c3Smrg# 2733621f50c3Smrg# Check whether the given linker FLAGS work with the current language's 2734621f50c3Smrg# linker, or whether they give an error. 2735621f50c3Smrg# 2736621f50c3Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2737621f50c3Smrg# success/failure. 2738621f50c3Smrg# 2739621f50c3Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2740621f50c3Smrg# 2741621f50c3Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2742621f50c3Smrg# 2743621f50c3Smrg# LICENSE 2744621f50c3Smrg# 2745621f50c3Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2746621f50c3Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2747621f50c3Smrg# Copyright (c) 2009 Matteo Frigo 2748621f50c3Smrg# 2749621f50c3Smrg# This program is free software: you can redistribute it and/or modify it 2750621f50c3Smrg# under the terms of the GNU General Public License as published by the 2751621f50c3Smrg# Free Software Foundation, either version 3 of the License, or (at your 2752621f50c3Smrg# option) any later version. 2753621f50c3Smrg# 2754621f50c3Smrg# This program is distributed in the hope that it will be useful, but 2755621f50c3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2756621f50c3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2757621f50c3Smrg# Public License for more details. 2758621f50c3Smrg# 2759621f50c3Smrg# You should have received a copy of the GNU General Public License along 2760621f50c3Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2761621f50c3Smrg# 2762621f50c3Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2763621f50c3Smrg# gives unlimited permission to copy, distribute and modify the configure 2764621f50c3Smrg# scripts that are the output of Autoconf when processing the Macro. You 2765621f50c3Smrg# need not follow the terms of the GNU General Public License when using 2766621f50c3Smrg# or distributing such scripts, even though portions of the text of the 2767621f50c3Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2768621f50c3Smrg# all other use of the material that constitutes the Autoconf Macro. 2769621f50c3Smrg# 2770621f50c3Smrg# This special exception to the GPL applies to versions of the Autoconf 2771621f50c3Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2772621f50c3Smrg# modified version of the Autoconf Macro, you may extend this special 2773621f50c3Smrg# exception to the GPL to apply to your modified version as well.# 2774621f50c3SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2775621f50c3Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2776621f50c3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2777621f50c3SmrgAS_LITERAL_IF([$1], 2778621f50c3Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2779621f50c3Smrg ax_save_FLAGS=$LDFLAGS 2780621f50c3Smrg LDFLAGS="$1" 2781621f50c3Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2782621f50c3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2783621f50c3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2784621f50c3Smrg LDFLAGS=$ax_save_FLAGS])], 2785621f50c3Smrg [ax_save_FLAGS=$LDFLAGS 2786621f50c3Smrg LDFLAGS="$1" 2787621f50c3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2788621f50c3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2789621f50c3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2790621f50c3Smrg LDFLAGS=$ax_save_FLAGS]) 2791621f50c3Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2792621f50c3SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2793621f50c3Smrgif test "x$xorg_check_linker_flags" = xyes; then 2794621f50c3Smrg m4_default([$2], :) 2795621f50c3Smrgelse 2796621f50c3Smrg m4_default([$3], :) 27973eed67faSmbalmerfi 2798621f50c3Smrg]) # XORG_CHECK_LINKER_FLAGS 27993eed67faSmbalmer 2800621f50c3Smrg# XORG_MEMORY_CHECK_FLAGS 2801621f50c3Smrg# ----------------------- 2802621f50c3Smrg# Minimum version: 1.16.0 2803621f50c3Smrg# 2804621f50c3Smrg# This macro attempts to find appropriate memory checking functionality 2805621f50c3Smrg# for various platforms which unit testing code may use to catch various 2806621f50c3Smrg# forms of memory allocation and access errors in testing. 2807621f50c3Smrg# 2808621f50c3Smrg# Interface to module: 2809621f50c3Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2810621f50c3Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2811621f50c3Smrg# 2812621f50c3Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2813621f50c3Smrg# 2814621f50c3SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 28153eed67faSmbalmer 2816621f50c3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2817621f50c3SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2818621f50c3Smrg [Environment variables to enable memory checking in tests]) 2819dc407927Smrg 2820621f50c3Smrg# Check for different types of support on different platforms 2821621f50c3Smrgcase $host_os in 2822621f50c3Smrg solaris*) 2823621f50c3Smrg AC_CHECK_LIB([umem], [umem_alloc], 2824621f50c3Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2825621f50c3Smrg ;; 2826621f50c3Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2827621f50c3Smrg # both directly and inverted, so should not be 0 or 255. 2828621f50c3Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2829621f50c3Smrg ;; 2830621f50c3Smrg darwin*) 2831621f50c3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2832621f50c3Smrg ;; 2833621f50c3Smrg *bsd*) 2834621f50c3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2835621f50c3Smrg ;; 2836621f50c3Smrgesac 28373eed67faSmbalmer 2838621f50c3Smrg# User supplied flags override default flags 2839621f50c3Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2840621f50c3Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2841621f50c3Smrgfi 28423eed67faSmbalmer 2843621f50c3SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2844621f50c3Smrg]) # XORG_WITH_LINT 28453eed67faSmbalmer 2846621f50c3Smrg# XORG_CHECK_MALLOC_ZERO 2847621f50c3Smrg# ---------------------- 2848621f50c3Smrg# Minimum version: 1.0.0 2849621f50c3Smrg# 2850621f50c3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2851621f50c3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2852621f50c3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2853621f50c3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2854621f50c3SmrgAC_ARG_ENABLE(malloc0returnsnull, 2855621f50c3Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2856621f50c3Smrg [malloc(0) returns NULL (default: auto)]), 2857621f50c3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2858621f50c3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 28593eed67faSmbalmer 2860621f50c3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2861621f50c3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2862621f50c3SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2863621f50c3Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2864621f50c3Smrg#include <stdlib.h> 2865621f50c3Smrg],[ 2866621f50c3Smrg char *m0, *r0, *c0, *p; 2867621f50c3Smrg m0 = malloc(0); 2868621f50c3Smrg p = malloc(10); 2869621f50c3Smrg r0 = realloc(p,0); 2870621f50c3Smrg c0 = calloc(0,10); 2871621f50c3Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2872621f50c3Smrg])], 2873621f50c3Smrg [xorg_cv_malloc0_returns_null=yes], 2874621f50c3Smrg [xorg_cv_malloc0_returns_null=no])]) 2875621f50c3SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2876621f50c3Smrgfi 2877621f50c3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2878621f50c3Smrg 2879621f50c3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2880621f50c3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2881621f50c3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2882621f50c3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28833eed67faSmbalmerelse 2884621f50c3Smrg MALLOC_ZERO_CFLAGS="" 2885621f50c3Smrg XMALLOC_ZERO_CFLAGS="" 2886621f50c3Smrg XTMALLOC_ZERO_CFLAGS="" 28873eed67faSmbalmerfi 28883eed67faSmbalmer 2889621f50c3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2890621f50c3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2891621f50c3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2892621f50c3Smrg]) # XORG_CHECK_MALLOC_ZERO 28933eed67faSmbalmer 2894621f50c3Smrg# XORG_WITH_LINT() 2895dc407927Smrg# ---------------- 2896621f50c3Smrg# Minimum version: 1.1.0 2897621f50c3Smrg# 2898621f50c3Smrg# This macro enables the use of a tool that flags some suspicious and 2899621f50c3Smrg# non-portable constructs (likely to be bugs) in C language source code. 2900621f50c3Smrg# It will attempt to locate the tool and use appropriate options. 2901621f50c3Smrg# There are various lint type tools on different platforms. 2902621f50c3Smrg# 2903621f50c3Smrg# Interface to module: 2904621f50c3Smrg# LINT: returns the path to the tool found on the platform 2905621f50c3Smrg# or the value set to LINT on the configure cmd line 2906621f50c3Smrg# also an Automake conditional 2907621f50c3Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2908621f50c3Smrg# 2909621f50c3Smrg# --with-lint: 'yes' user instructs the module to use lint 2910621f50c3Smrg# 'no' user instructs the module not to use lint (default) 2911621f50c3Smrg# 2912621f50c3Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2913621f50c3Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2914621f50c3Smrg# 2915621f50c3SmrgAC_DEFUN([XORG_WITH_LINT],[ 29163eed67faSmbalmer 2917621f50c3SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2918621f50c3SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2919621f50c3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2920621f50c3Smrg [Use a lint-style source code checker (default: disabled)])], 2921621f50c3Smrg [use_lint=$withval], [use_lint=no]) 29223eed67faSmbalmer 2923621f50c3Smrg# Obtain platform specific info like program name and options 2924621f50c3Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2925621f50c3Smrgcase $host_os in 2926621f50c3Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2927621f50c3Smrg lint_name=splint 2928621f50c3Smrg lint_options="-badflag" 2929621f50c3Smrg ;; 2930621f50c3Smrg *freebsd* | *netbsd*) 2931621f50c3Smrg lint_name=lint 2932621f50c3Smrg lint_options="-u -b" 2933621f50c3Smrg ;; 2934621f50c3Smrg *solaris*) 2935621f50c3Smrg lint_name=lint 2936621f50c3Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2937621f50c3Smrg ;; 2938621f50c3Smrgesac 29393eed67faSmbalmer 2940621f50c3Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2941621f50c3Smrgif test "x$use_lint" = x"yes" ; then 2942621f50c3Smrg AC_PATH_PROG([LINT], [$lint_name]) 2943621f50c3Smrg if test "x$LINT" = "x"; then 2944621f50c3Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2945621f50c3Smrg fi 2946621f50c3Smrgelif test "x$use_lint" = x"no" ; then 2947621f50c3Smrg if test "x$LINT" != "x"; then 2948621f50c3Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2949621f50c3Smrg fi 29503eed67faSmbalmerelse 2951621f50c3Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29523eed67faSmbalmerfi 29533eed67faSmbalmer 2954621f50c3Smrg# User supplied flags override default flags 2955621f50c3Smrgif test "x$LINT_FLAGS" != "x"; then 2956621f50c3Smrg lint_options=$LINT_FLAGS 29573eed67faSmbalmerfi 29583eed67faSmbalmer 2959621f50c3SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2960621f50c3SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 29613eed67faSmbalmer 2962621f50c3Smrg]) # XORG_WITH_LINT 29633eed67faSmbalmer 2964621f50c3Smrg# XORG_LINT_LIBRARY(LIBNAME) 2965621f50c3Smrg# -------------------------- 2966621f50c3Smrg# Minimum version: 1.1.0 2967621f50c3Smrg# 2968621f50c3Smrg# Sets up flags for building lint libraries for checking programs that call 2969621f50c3Smrg# functions in the library. 2970621f50c3Smrg# 2971621f50c3Smrg# Interface to module: 2972621f50c3Smrg# LINTLIB - Automake variable with the name of lint library file to make 2973621f50c3Smrg# MAKE_LINT_LIB - Automake conditional 2974621f50c3Smrg# 2975621f50c3Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2976621f50c3Smrg# - 'no' user instructs the module not to create a lint library (default) 29773eed67faSmbalmer 2978621f50c3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2979621f50c3SmrgAC_REQUIRE([XORG_WITH_LINT]) 2980621f50c3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2981621f50c3Smrg [Create lint library (default: disabled)])], 2982621f50c3Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 29831a9c160aSmrg 2984621f50c3Smrgif test "x$make_lint_lib" = x"yes" ; then 2985621f50c3Smrg LINTLIB=llib-l$1.ln 2986621f50c3Smrg if test "x$LINT" = "x"; then 2987621f50c3Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2988621f50c3Smrg fi 2989621f50c3Smrgelif test "x$make_lint_lib" != x"no" ; then 2990621f50c3Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2991621f50c3Smrgfi 29921a9c160aSmrg 2993621f50c3SmrgAC_SUBST(LINTLIB) 2994621f50c3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 29953eed67faSmbalmer 2996621f50c3Smrg]) # XORG_LINT_LIBRARY 29973eed67faSmbalmer 2998621f50c3Smrg# XORG_COMPILER_BRAND 2999621f50c3Smrg# ------------------- 3000621f50c3Smrg# Minimum version: 1.14.0 3001621f50c3Smrg# 3002621f50c3Smrg# Checks for various brands of compilers and sets flags as appropriate: 3003621f50c3Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 3004621f50c3Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 3005621f50c3Smrg# clang compiler - sets CLANGCC to "yes" 3006621f50c3Smrg# Intel compiler - sets INTELCC to "yes" 3007621f50c3Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 3008621f50c3Smrg# 3009621f50c3SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 3010621f50c3SmrgAC_LANG_CASE( 3011621f50c3Smrg [C], [ 3012901a7df4Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3013901a7df4Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 3014901a7df4Smrg m4_version_prereq([2.70], 3015901a7df4Smrg [AC_REQUIRE([AC_PROG_CC])], 3016901a7df4Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 3017621f50c3Smrg ], 3018621f50c3Smrg [C++], [ 3019621f50c3Smrg AC_REQUIRE([AC_PROG_CXX]) 3020621f50c3Smrg ] 3021621f50c3Smrg) 3022621f50c3SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3023621f50c3SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3024621f50c3SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3025621f50c3Smrg]) # XORG_COMPILER_BRAND 30261a9c160aSmrg 3027621f50c3Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3028621f50c3Smrg# --------------- 3029621f50c3Smrg# Minimum version: 1.16.0 3030621f50c3Smrg# 3031621f50c3Smrg# Test if the compiler works when passed the given flag as a command line argument. 3032901a7df4Smrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 3033621f50c3Smrg# next flag in the list until there are no more options. 3034621f50c3Smrg# 3035621f50c3Smrg# Note that this does not guarantee that the compiler supports the flag as some 3036621f50c3Smrg# compilers will simply ignore arguments that they do not understand, but we do 3037621f50c3Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 3038621f50c3Smrg# -Werror=unused-command-line-argument 3039621f50c3Smrg# 3040621f50c3SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 3041621f50c3Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3042621f50c3Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 30433eed67faSmbalmer 3044621f50c3SmrgAC_LANG_COMPILER_REQUIRE 30453eed67faSmbalmer 3046621f50c3SmrgAC_LANG_CASE( 3047621f50c3Smrg [C], [ 3048901a7df4Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3049901a7df4Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 3050901a7df4Smrg m4_version_prereq([2.70], 3051901a7df4Smrg [AC_REQUIRE([AC_PROG_CC])], 3052901a7df4Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 3053621f50c3Smrg define([PREFIX], [C]) 3054621f50c3Smrg define([CACHE_PREFIX], [cc]) 3055621f50c3Smrg define([COMPILER], [$CC]) 3056621f50c3Smrg ], 3057621f50c3Smrg [C++], [ 3058621f50c3Smrg define([PREFIX], [CXX]) 3059621f50c3Smrg define([CACHE_PREFIX], [cxx]) 3060621f50c3Smrg define([COMPILER], [$CXX]) 3061621f50c3Smrg ] 3062621f50c3Smrg) 30631a9c160aSmrg 3064621f50c3Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 30653eed67faSmbalmer 3066621f50c3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3067621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3068621f50c3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3069621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3070621f50c3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3071621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3072621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3073621f50c3Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3074621f50c3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3075621f50c3Smrgfi 30763eed67faSmbalmer 3077621f50c3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3078621f50c3Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3079621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3080621f50c3Smrg fi 3081621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3082621f50c3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3083621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3084621f50c3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3085621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3086621f50c3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3087621f50c3Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3088621f50c3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3089621f50c3Smrgfi 30903eed67faSmbalmer 3091621f50c3Smrgfound="no" 3092621f50c3Smrgm4_foreach([flag], m4_cdr($@), [ 3093621f50c3Smrg if test $found = "no" ; then 3094621f50c3Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3095621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3096621f50c3Smrg fi 30973eed67faSmbalmer 3098621f50c3Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3099621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3100621f50c3Smrg fi 31013eed67faSmbalmer 3102621f50c3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3103dd0822caSmrg 3104621f50c3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3105621f50c3Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3106621f50c3Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3107621f50c3Smrg AC_CACHE_VAL($cacheid, 3108621f50c3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3109621f50c3Smrg [eval $cacheid=yes], 3110621f50c3Smrg [eval $cacheid=no])]) 3111dd0822caSmrg 3112621f50c3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3113dd0822caSmrg 3114621f50c3Smrg eval supported=\$$cacheid 3115621f50c3Smrg AC_MSG_RESULT([$supported]) 3116621f50c3Smrg if test "$supported" = "yes" ; then 3117621f50c3Smrg $1="$$1 ]flag[" 3118621f50c3Smrg found="yes" 3119621f50c3Smrg fi 3120621f50c3Smrg fi 3121621f50c3Smrg]) 3122621f50c3Smrg]) # XORG_TESTSET_CFLAG 31233eed67faSmbalmer 3124621f50c3Smrg# XORG_COMPILER_FLAGS 3125621f50c3Smrg# --------------- 3126621f50c3Smrg# Minimum version: 1.16.0 3127621f50c3Smrg# 3128621f50c3Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3129621f50c3Smrg# arguments supported by the selected compiler which do NOT alter the generated 3130621f50c3Smrg# code. These arguments will cause the compiler to print various warnings 3131621f50c3Smrg# during compilation AND turn a conservative set of warnings into errors. 3132621f50c3Smrg# 3133621f50c3Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3134621f50c3Smrg# future versions of util-macros as options are added to new compilers. 3135621f50c3Smrg# 3136621f50c3SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3137621f50c3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 31383eed67faSmbalmer 3139621f50c3SmrgAC_ARG_ENABLE(selective-werror, 3140621f50c3Smrg AS_HELP_STRING([--disable-selective-werror], 3141621f50c3Smrg [Turn off selective compiler errors. (default: enabled)]), 3142621f50c3Smrg [SELECTIVE_WERROR=$enableval], 3143621f50c3Smrg [SELECTIVE_WERROR=yes]) 31443eed67faSmbalmer 3145621f50c3SmrgAC_LANG_CASE( 3146621f50c3Smrg [C], [ 3147621f50c3Smrg define([PREFIX], [C]) 3148621f50c3Smrg ], 3149621f50c3Smrg [C++], [ 3150621f50c3Smrg define([PREFIX], [CXX]) 3151621f50c3Smrg ] 3152621f50c3Smrg) 3153621f50c3Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3154621f50c3Smrgif test "x$SUNCC" = "xyes"; then 3155621f50c3Smrg [BASE_]PREFIX[FLAGS]="-v" 3156621f50c3Smrgelse 3157621f50c3Smrg [BASE_]PREFIX[FLAGS]="" 3158621f50c3Smrgfi 31593eed67faSmbalmer 3160621f50c3Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3161621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3162621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3163621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3164621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 31651a9c160aSmrg 3166621f50c3SmrgAC_LANG_CASE( 3167621f50c3Smrg [C], [ 3168621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3169621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3170621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3171621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3172621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3173621f50c3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3174621f50c3Smrg ] 3175621f50c3Smrg) 3176dd0822caSmrg 3177621f50c3Smrg# This chunk adds additional warnings that could catch undesired effects. 3178621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3179621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3180621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3181621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3182621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3183621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3184621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 31853eed67faSmbalmer 3186621f50c3Smrg# These are currently disabled because they are noisy. They will be enabled 3187621f50c3Smrg# in the future once the codebase is sufficiently modernized to silence 3188621f50c3Smrg# them. For now, I don't want them to drown out the other warnings. 3189621f50c3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3190621f50c3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3191621f50c3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31923eed67faSmbalmer 3193901a7df4Smrg# Turn some warnings into errors, so we don't accidentally get successful builds 3194621f50c3Smrg# when there are problems that should be fixed. 31953eed67faSmbalmer 3196621f50c3Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3197621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3198621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3199621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3200621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3201621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3202621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3203621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3204621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3205621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3206621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3207621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3208621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3209621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3210621f50c3Smrgelse 3211621f50c3SmrgAC_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]) 3212621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3213621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3214621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3215621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3216621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3217621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3218621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3219621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3220621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3221621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3222621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3223621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3224621f50c3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3225621f50c3Smrgfi 32263eed67faSmbalmer 3227621f50c3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3228621f50c3Smrg]) # XORG_COMPILER_FLAGS 32291a9c160aSmrg 3230621f50c3Smrg# XORG_CWARNFLAGS 3231621f50c3Smrg# --------------- 3232621f50c3Smrg# Minimum version: 1.2.0 3233621f50c3Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3234621f50c3Smrg# 3235621f50c3Smrg# Defines CWARNFLAGS to enable C compiler warnings. 3236621f50c3Smrg# 3237621f50c3Smrg# This function is deprecated because it defines -fno-strict-aliasing 3238621f50c3Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3239621f50c3Smrg# is needed, then it should be added explicitly in the module when 3240621f50c3Smrg# it is updated to use BASE_CFLAGS. 3241621f50c3Smrg# 3242621f50c3SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3243621f50c3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3244621f50c3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3245621f50c3SmrgAC_LANG_CASE( 3246621f50c3Smrg [C], [ 3247621f50c3Smrg CWARNFLAGS="$BASE_CFLAGS" 3248621f50c3Smrg if test "x$GCC" = xyes ; then 3249621f50c3Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3250621f50c3Smrg fi 3251621f50c3Smrg AC_SUBST(CWARNFLAGS) 3252621f50c3Smrg ] 3253621f50c3Smrg) 3254621f50c3Smrg]) # XORG_CWARNFLAGS 32551a9c160aSmrg 3256621f50c3Smrg# XORG_STRICT_OPTION 3257621f50c3Smrg# ----------------------- 3258621f50c3Smrg# Minimum version: 1.3.0 3259621f50c3Smrg# 3260621f50c3Smrg# Add configure option to enable strict compilation flags, such as treating 3261621f50c3Smrg# warnings as fatal errors. 3262621f50c3Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3263621f50c3Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3264621f50c3Smrg# 3265621f50c3Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3266621f50c3Smrg# when strict compilation is unconditionally desired. 3267621f50c3SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3268621f50c3SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3269621f50c3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 32701a9c160aSmrg 3271621f50c3SmrgAC_ARG_ENABLE(strict-compilation, 3272621f50c3Smrg AS_HELP_STRING([--enable-strict-compilation], 3273621f50c3Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3274621f50c3Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3275dd0822caSmrg 3276621f50c3SmrgAC_LANG_CASE( 3277621f50c3Smrg [C], [ 3278621f50c3Smrg define([PREFIX], [C]) 3279621f50c3Smrg ], 3280621f50c3Smrg [C++], [ 3281621f50c3Smrg define([PREFIX], [CXX]) 3282621f50c3Smrg ] 3283621f50c3Smrg) 3284dc407927Smrg 3285621f50c3Smrg[STRICT_]PREFIX[FLAGS]="" 3286621f50c3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3287621f50c3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 32883eed67faSmbalmer 3289621f50c3Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3290621f50c3Smrg# activate it with -Werror, so we add it here explicitly. 3291621f50c3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 32923eed67faSmbalmer 3293621f50c3Smrgif test "x$STRICT_COMPILE" = "xyes"; then 3294621f50c3Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3295621f50c3Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3296621f50c3Smrgfi 3297621f50c3SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3298621f50c3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3299621f50c3SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3300621f50c3Smrg]) # XORG_STRICT_OPTION 33013eed67faSmbalmer 3302901a7df4Smrg# XORG_DEFAULT_NOCODE_OPTIONS 3303901a7df4Smrg# --------------------------- 3304901a7df4Smrg# Minimum version: 1.20.0 3305901a7df4Smrg# 3306901a7df4Smrg# Defines default options for X.Org modules which don't compile code, 3307901a7df4Smrg# such as fonts, bitmaps, cursors, and docs. 3308901a7df4Smrg# 3309901a7df4SmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 3310901a7df4SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3311901a7df4SmrgXORG_RELEASE_VERSION 3312901a7df4SmrgXORG_CHANGELOG 3313901a7df4SmrgXORG_INSTALL 3314901a7df4SmrgXORG_MANPAGE_SECTIONS 3315901a7df4Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3316901a7df4Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3317901a7df4Smrg]) # XORG_DEFAULT_NOCODE_OPTIONS 3318901a7df4Smrg 3319621f50c3Smrg# XORG_DEFAULT_OPTIONS 3320621f50c3Smrg# -------------------- 3321621f50c3Smrg# Minimum version: 1.3.0 3322621f50c3Smrg# 3323901a7df4Smrg# Defines default options for X.Org modules which compile code. 3324621f50c3Smrg# 3325621f50c3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3326621f50c3SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3327621f50c3SmrgXORG_COMPILER_FLAGS 3328621f50c3SmrgXORG_CWARNFLAGS 3329621f50c3SmrgXORG_STRICT_OPTION 3330901a7df4SmrgXORG_DEFAULT_NOCODE_OPTIONS 3331621f50c3Smrg]) # XORG_DEFAULT_OPTIONS 33323eed67faSmbalmer 3333621f50c3Smrg# XORG_INSTALL() 3334621f50c3Smrg# ---------------- 3335621f50c3Smrg# Minimum version: 1.4.0 3336621f50c3Smrg# 3337621f50c3Smrg# Defines the variable INSTALL_CMD as the command to copy 3338621f50c3Smrg# INSTALL from $prefix/share/util-macros. 3339621f50c3Smrg# 3340621f50c3SmrgAC_DEFUN([XORG_INSTALL], [ 3341621f50c3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3342621f50c3Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3343621f50c3SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3344621f50c3Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3345621f50c3Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3346621f50c3Smrgtouch \$(top_srcdir)/INSTALL; \ 3347621f50c3Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3348621f50c3SmrgAC_SUBST([INSTALL_CMD]) 3349621f50c3Smrg]) # XORG_INSTALL 3350621f50c3Smrgdnl Copyright 2005 Red Hat, Inc 3351621f50c3Smrgdnl 3352621f50c3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3353621f50c3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 3354621f50c3Smrgdnl the above copyright notice appear in all copies and that both that 3355621f50c3Smrgdnl copyright notice and this permission notice appear in supporting 3356621f50c3Smrgdnl documentation. 3357621f50c3Smrgdnl 3358621f50c3Smrgdnl The above copyright notice and this permission notice shall be included 3359621f50c3Smrgdnl in all copies or substantial portions of the Software. 3360621f50c3Smrgdnl 3361621f50c3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3362621f50c3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3363621f50c3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3364621f50c3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3365621f50c3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3366621f50c3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3367621f50c3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3368621f50c3Smrgdnl 3369621f50c3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3370621f50c3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3371621f50c3Smrgdnl other dealings in this Software without prior written authorization 3372621f50c3Smrgdnl from the copyright holders. 3373621f50c3Smrgdnl 33743eed67faSmbalmer 3375621f50c3Smrg# XORG_RELEASE_VERSION 3376621f50c3Smrg# -------------------- 3377621f50c3Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 33783eed67faSmbalmer 3379621f50c3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3380621f50c3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3381621f50c3Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3382621f50c3Smrg [Major version of this package]) 3383621f50c3Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3384621f50c3Smrg if test "x$PVM" = "x"; then 3385621f50c3Smrg PVM="0" 3386621f50c3Smrg fi 3387621f50c3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3388621f50c3Smrg [$PVM], 3389621f50c3Smrg [Minor version of this package]) 3390621f50c3Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3391621f50c3Smrg if test "x$PVP" = "x"; then 3392621f50c3Smrg PVP="0" 3393621f50c3Smrg fi 3394621f50c3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3395621f50c3Smrg [$PVP], 3396621f50c3Smrg [Patch version of this package]) 3397621f50c3Smrg]) 33983eed67faSmbalmer 3399621f50c3Smrg# XORG_CHANGELOG() 3400621f50c3Smrg# ---------------- 3401621f50c3Smrg# Minimum version: 1.2.0 3402621f50c3Smrg# 3403621f50c3Smrg# Defines the variable CHANGELOG_CMD as the command to generate 3404621f50c3Smrg# ChangeLog from git. 3405621f50c3Smrg# 3406621f50c3Smrg# 3407621f50c3SmrgAC_DEFUN([XORG_CHANGELOG], [ 3408621f50c3SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3409621f50c3Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3410621f50c3Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3411621f50c3Smrgtouch \$(top_srcdir)/ChangeLog; \ 3412621f50c3Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3413621f50c3SmrgAC_SUBST([CHANGELOG_CMD]) 3414621f50c3Smrg]) # XORG_CHANGELOG 34153eed67faSmbalmer 3416621f50c3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3417621f50c3Smrg# 3418621f50c3Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3419621f50c3Smrg# Foundation, Inc. 3420621f50c3Smrg# Written by Gordon Matzigkeit, 1996 3421621f50c3Smrg# 3422621f50c3Smrg# This file is free software; the Free Software Foundation gives 3423621f50c3Smrg# unlimited permission to copy and/or distribute it, with or without 3424621f50c3Smrg# modifications, as long as this notice is preserved. 34253eed67faSmbalmer 3426621f50c3Smrgm4_define([_LT_COPYING], [dnl 3427621f50c3Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3428621f50c3Smrg# This is free software; see the source for copying conditions. There is NO 3429621f50c3Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 34303eed67faSmbalmer 3431621f50c3Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3432621f50c3Smrg# it under the terms of the GNU General Public License as published by 3433621f50c3Smrg# the Free Software Foundation; either version 2 of of the License, or 3434621f50c3Smrg# (at your option) any later version. 3435621f50c3Smrg# 3436621f50c3Smrg# As a special exception to the GNU General Public License, if you 3437621f50c3Smrg# distribute this file as part of a program or library that is built 3438621f50c3Smrg# using GNU Libtool, you may include this file under the same 3439621f50c3Smrg# distribution terms that you use for the rest of that program. 3440621f50c3Smrg# 3441621f50c3Smrg# GNU Libtool is distributed in the hope that it will be useful, but 3442621f50c3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3443621f50c3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3444621f50c3Smrg# GNU General Public License for more details. 3445621f50c3Smrg# 3446621f50c3Smrg# You should have received a copy of the GNU General Public License 3447621f50c3Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3448621f50c3Smrg]) 34493eed67faSmbalmer 3450621f50c3Smrg# serial 59 LT_INIT 34513eed67faSmbalmer 34523eed67faSmbalmer 3453621f50c3Smrg# LT_PREREQ(VERSION) 3454621f50c3Smrg# ------------------ 3455621f50c3Smrg# Complain and exit if this libtool version is less that VERSION. 3456621f50c3Smrgm4_defun([LT_PREREQ], 3457621f50c3Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3458621f50c3Smrg [m4_default([$3], 3459621f50c3Smrg [m4_fatal([Libtool version $1 or higher is required], 3460621f50c3Smrg 63)])], 3461621f50c3Smrg [$2])]) 34623eed67faSmbalmer 34633eed67faSmbalmer 3464621f50c3Smrg# _LT_CHECK_BUILDDIR 3465621f50c3Smrg# ------------------ 3466621f50c3Smrg# Complain if the absolute build directory name contains unusual characters 3467621f50c3Smrgm4_defun([_LT_CHECK_BUILDDIR], 3468621f50c3Smrg[case `pwd` in 3469621f50c3Smrg *\ * | *\ *) 3470621f50c3Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3471621f50c3Smrgesac 3472621f50c3Smrg]) 3473dc407927Smrg 34743eed67faSmbalmer 3475621f50c3Smrg# LT_INIT([OPTIONS]) 3476621f50c3Smrg# ------------------ 3477621f50c3SmrgAC_DEFUN([LT_INIT], 3478621f50c3Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3479621f50c3SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3480621f50c3SmrgAC_BEFORE([$0], [LT_LANG])dnl 3481621f50c3SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3482621f50c3SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3483621f50c3Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 34843eed67faSmbalmer 3485621f50c3Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3486621f50c3Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3487621f50c3Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3488621f50c3Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3489621f50c3Smrgdnl unless we require an AC_DEFUNed macro: 3490621f50c3SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3491621f50c3SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3492621f50c3SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3493621f50c3SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3494621f50c3Smrgm4_require([_LT_PROG_LTMAIN])dnl 34953eed67faSmbalmer 3496621f50c3Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 34971a9c160aSmrg 3498621f50c3Smrgdnl Parse OPTIONS 3499621f50c3Smrg_LT_SET_OPTIONS([$0], [$1]) 35003eed67faSmbalmer 3501621f50c3Smrg# This can be used to rebuild libtool when needed 3502621f50c3SmrgLIBTOOL_DEPS=$ltmain 35031a9c160aSmrg 3504621f50c3Smrg# Always use our own libtool. 3505621f50c3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3506621f50c3SmrgAC_SUBST(LIBTOOL)dnl 35071a9c160aSmrg 3508621f50c3Smrg_LT_SETUP 35091a9c160aSmrg 3510621f50c3Smrg# Only expand once: 3511621f50c3Smrgm4_define([LT_INIT]) 3512621f50c3Smrg])# LT_INIT 3513dc407927Smrg 3514621f50c3Smrg# Old names: 3515621f50c3SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3516621f50c3SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3517621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 3518621f50c3Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3519621f50c3Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3520dc407927Smrg 35213eed67faSmbalmer 3522621f50c3Smrg# _LT_PREPARE_CC_BASENAME 3523621f50c3Smrg# ----------------------- 3524621f50c3Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3525621f50c3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3526621f50c3Smrgfunc_cc_basename () 3527621f50c3Smrg{ 3528621f50c3Smrg for cc_temp in @S|@*""; do 3529621f50c3Smrg case $cc_temp in 3530621f50c3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3531621f50c3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3532621f50c3Smrg \-*) ;; 3533621f50c3Smrg *) break;; 3534621f50c3Smrg esac 3535621f50c3Smrg done 3536621f50c3Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3537621f50c3Smrg} 3538621f50c3Smrg])# _LT_PREPARE_CC_BASENAME 35393eed67faSmbalmer 35403eed67faSmbalmer 3541621f50c3Smrg# _LT_CC_BASENAME(CC) 3542621f50c3Smrg# ------------------- 3543621f50c3Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3544621f50c3Smrg# but that macro is also expanded into generated libtool script, which 3545621f50c3Smrg# arranges for $SED and $ECHO to be set by different means. 3546621f50c3Smrgm4_defun([_LT_CC_BASENAME], 3547621f50c3Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3548621f50c3SmrgAC_REQUIRE([_LT_DECL_SED])dnl 3549621f50c3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3550621f50c3Smrgfunc_cc_basename $1 3551621f50c3Smrgcc_basename=$func_cc_basename_result 3552621f50c3Smrg]) 35533eed67faSmbalmer 3554dc407927Smrg 3555621f50c3Smrg# _LT_FILEUTILS_DEFAULTS 3556621f50c3Smrg# ---------------------- 3557621f50c3Smrg# It is okay to use these file commands and assume they have been set 3558621f50c3Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3559621f50c3Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3560621f50c3Smrg[: ${CP="cp -f"} 3561621f50c3Smrg: ${MV="mv -f"} 3562621f50c3Smrg: ${RM="rm -f"} 3563621f50c3Smrg])# _LT_FILEUTILS_DEFAULTS 35643eed67faSmbalmer 35653eed67faSmbalmer 3566621f50c3Smrg# _LT_SETUP 3567621f50c3Smrg# --------- 3568621f50c3Smrgm4_defun([_LT_SETUP], 3569621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35703eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3571621f50c3SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3572621f50c3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3573dc407927Smrg 3574621f50c3Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3575621f50c3Smrgdnl 3576621f50c3Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3577621f50c3Smrg_LT_DECL([], [host], [0])dnl 3578621f50c3Smrg_LT_DECL([], [host_os], [0])dnl 3579621f50c3Smrgdnl 3580621f50c3Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3581621f50c3Smrg_LT_DECL([], [build], [0])dnl 3582621f50c3Smrg_LT_DECL([], [build_os], [0])dnl 3583621f50c3Smrgdnl 3584621f50c3SmrgAC_REQUIRE([AC_PROG_CC])dnl 3585621f50c3SmrgAC_REQUIRE([LT_PATH_LD])dnl 3586621f50c3SmrgAC_REQUIRE([LT_PATH_NM])dnl 3587621f50c3Smrgdnl 3588621f50c3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3589621f50c3Smrgtest -z "$LN_S" && LN_S="ln -s" 3590621f50c3Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3591621f50c3Smrgdnl 3592621f50c3SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3593621f50c3Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3594621f50c3Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3595621f50c3Smrgdnl 3596621f50c3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3597621f50c3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3598621f50c3Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3599621f50c3Smrgm4_require([_LT_CMD_RELOAD])dnl 3600621f50c3Smrgm4_require([_LT_DECL_FILECMD])dnl 3601621f50c3Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3602621f50c3Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3603621f50c3Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3604621f50c3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3605621f50c3Smrgm4_require([_LT_WITH_SYSROOT])dnl 3606621f50c3Smrgm4_require([_LT_CMD_TRUNCATE])dnl 3607dc407927Smrg 3608621f50c3Smrg_LT_CONFIG_LIBTOOL_INIT([ 3609621f50c3Smrg# See if we are running on zsh, and set the options that allow our 3610621f50c3Smrg# commands through without removal of \ escapes INIT. 3611621f50c3Smrgif test -n "\${ZSH_VERSION+set}"; then 3612621f50c3Smrg setopt NO_GLOB_SUBST 36133eed67faSmbalmerfi 3614621f50c3Smrg]) 3615621f50c3Smrgif test -n "${ZSH_VERSION+set}"; then 3616621f50c3Smrg setopt NO_GLOB_SUBST 36173eed67faSmbalmerfi 36183eed67faSmbalmer 3619621f50c3Smrg_LT_CHECK_OBJDIR 3620dc407927Smrg 3621621f50c3Smrgm4_require([_LT_TAG_COMPILER])dnl 3622dc407927Smrg 3623621f50c3Smrgcase $host_os in 3624621f50c3Smrgaix3*) 3625621f50c3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 3626621f50c3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3627621f50c3Smrg # vanish in a puff of smoke. 3628621f50c3Smrg if test set != "${COLLECT_NAMES+set}"; then 3629621f50c3Smrg COLLECT_NAMES= 3630621f50c3Smrg export COLLECT_NAMES 3631621f50c3Smrg fi 36323eed67faSmbalmer ;; 36333eed67faSmbalmeresac 36343eed67faSmbalmer 3635621f50c3Smrg# Global variables: 3636621f50c3Smrgofile=libtool 3637621f50c3Smrgcan_build_shared=yes 36383eed67faSmbalmer 3639621f50c3Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 3640621f50c3Smrg# ICC, which need '.lib'). 3641621f50c3Smrglibext=a 36421a9c160aSmrg 3643621f50c3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 36441a9c160aSmrg 3645621f50c3Smrgold_CC=$CC 3646621f50c3Smrgold_CFLAGS=$CFLAGS 36471a9c160aSmrg 3648621f50c3Smrg# Set sane defaults for various variables 3649621f50c3Smrgtest -z "$CC" && CC=cc 3650621f50c3Smrgtest -z "$LTCC" && LTCC=$CC 3651621f50c3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3652621f50c3Smrgtest -z "$LD" && LD=ld 3653621f50c3Smrgtest -z "$ac_objext" && ac_objext=o 36541a9c160aSmrg 3655621f50c3Smrg_LT_CC_BASENAME([$compiler]) 36563eed67faSmbalmer 3657621f50c3Smrg# Only perform the check for file, if the check method requires it 3658621f50c3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3659621f50c3Smrgcase $deplibs_check_method in 3660621f50c3Smrgfile_magic*) 3661621f50c3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3662621f50c3Smrg _LT_PATH_MAGIC 3663621f50c3Smrg fi 36643eed67faSmbalmer ;; 3665621f50c3Smrgesac 36663eed67faSmbalmer 3667621f50c3Smrg# Use C for the default configuration in the libtool script 3668621f50c3SmrgLT_SUPPORTED_TAG([CC]) 3669621f50c3Smrg_LT_LANG_C_CONFIG 3670621f50c3Smrg_LT_LANG_DEFAULT_CONFIG 3671621f50c3Smrg_LT_CONFIG_COMMANDS 3672621f50c3Smrg])# _LT_SETUP 36733eed67faSmbalmer 36743eed67faSmbalmer 3675621f50c3Smrg# _LT_PREPARE_SED_QUOTE_VARS 3676621f50c3Smrg# -------------------------- 3677621f50c3Smrg# Define a few sed substitution that help us do robust quoting. 3678621f50c3Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3679621f50c3Smrg[# Backslashify metacharacters that are still active within 3680621f50c3Smrg# double-quoted strings. 3681621f50c3Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 36823eed67faSmbalmer 3683621f50c3Smrg# Same as above, but do not quote variable references. 3684621f50c3Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 36853eed67faSmbalmer 3686621f50c3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 3687621f50c3Smrg# double_quote_subst'ed string. 3688621f50c3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3689dc407927Smrg 3690621f50c3Smrg# Sed substitution to delay expansion of an escaped single quote. 3691621f50c3Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 36923eed67faSmbalmer 3693621f50c3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3694621f50c3Smrgno_glob_subst='s/\*/\\\*/g' 3695621f50c3Smrg]) 36963eed67faSmbalmer 3697621f50c3Smrg# _LT_PROG_LTMAIN 3698621f50c3Smrg# --------------- 3699621f50c3Smrg# Note that this code is called both from 'configure', and 'config.status' 3700621f50c3Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3701621f50c3Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3702621f50c3Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3703621f50c3Smrgm4_defun([_LT_PROG_LTMAIN], 3704621f50c3Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3705621f50c3Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3706621f50c3Smrgltmain=$ac_aux_dir/ltmain.sh 3707621f50c3Smrg])# _LT_PROG_LTMAIN 3708dd0822caSmrg 37093eed67faSmbalmer 37103eed67faSmbalmer 3711621f50c3Smrg# So that we can recreate a full libtool script including additional 3712621f50c3Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3713621f50c3Smrg# in macros and then make a single call at the end using the 'libtool' 3714621f50c3Smrg# label. 37153eed67faSmbalmer 37163eed67faSmbalmer 3717621f50c3Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3718621f50c3Smrg# ---------------------------------------- 3719621f50c3Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3720621f50c3Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3721621f50c3Smrg[m4_ifval([$1], 3722621f50c3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3723621f50c3Smrg [$1 3724621f50c3Smrg])])]) 37253eed67faSmbalmer 3726621f50c3Smrg# Initialize. 3727621f50c3Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 37283eed67faSmbalmer 37293eed67faSmbalmer 3730621f50c3Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3731621f50c3Smrg# ------------------------------ 3732621f50c3Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3733621f50c3Smrgm4_define([_LT_CONFIG_LIBTOOL], 3734621f50c3Smrg[m4_ifval([$1], 3735621f50c3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3736621f50c3Smrg [$1 3737621f50c3Smrg])])]) 37383eed67faSmbalmer 3739621f50c3Smrg# Initialize. 3740621f50c3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 37413eed67faSmbalmer 37423eed67faSmbalmer 3743621f50c3Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3744621f50c3Smrg# ----------------------------------------------------- 3745621f50c3Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3746621f50c3Smrg[_LT_CONFIG_LIBTOOL([$1]) 3747621f50c3Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3748621f50c3Smrg]) 37493eed67faSmbalmer 3750dc407927Smrg 3751621f50c3Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3752621f50c3Smrg# ----------------------------- 3753621f50c3Smrg# Add leading comment marks to the start of each line, and a trailing 3754621f50c3Smrg# full-stop to the whole comment if one is not present already. 3755621f50c3Smrgm4_define([_LT_FORMAT_COMMENT], 3756621f50c3Smrg[m4_ifval([$1], [ 3757621f50c3Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3758621f50c3Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3759621f50c3Smrg)]) 37603eed67faSmbalmer 3761621f50c3Smrg 3762621f50c3Smrg 3763621f50c3Smrg 3764621f50c3Smrg 3765621f50c3Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3766621f50c3Smrg# ------------------------------------------------------------------- 3767621f50c3Smrg# CONFIGNAME is the name given to the value in the libtool script. 3768621f50c3Smrg# VARNAME is the (base) name used in the configure script. 3769621f50c3Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3770621f50c3Smrg# VARNAME. Any other value will be used directly. 3771621f50c3Smrgm4_define([_LT_DECL], 3772621f50c3Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3773621f50c3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3774621f50c3Smrg [m4_ifval([$1], [$1], [$2])]) 3775621f50c3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3776621f50c3Smrg m4_ifval([$4], 3777621f50c3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3778621f50c3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3779621f50c3Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37803eed67faSmbalmer]) 3781dd0822caSmrg 3782dd0822caSmrg 3783621f50c3Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3784621f50c3Smrg# -------------------------------------------------------- 3785621f50c3Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37863eed67faSmbalmer 37873eed67faSmbalmer 3788621f50c3Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3789621f50c3Smrg# ------------------------------------------------ 3790621f50c3Smrgm4_define([lt_decl_tag_varnames], 3791621f50c3Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3792dc407927Smrg 3793dc407927Smrg 3794621f50c3Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3795621f50c3Smrg# --------------------------------------------------------- 3796621f50c3Smrgm4_define([_lt_decl_filter], 3797621f50c3Smrg[m4_case([$#], 3798621f50c3Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3799621f50c3Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3800621f50c3Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3801621f50c3Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3802621f50c3Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3803621f50c3Smrg]) 38043eed67faSmbalmer 38053eed67faSmbalmer 3806621f50c3Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3807621f50c3Smrg# -------------------------------------------------- 3808621f50c3Smrgm4_define([lt_decl_quote_varnames], 3809621f50c3Smrg[_lt_decl_filter([value], [1], $@)]) 3810dd0822caSmrg 3811dd0822caSmrg 3812621f50c3Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3813621f50c3Smrg# --------------------------------------------------- 3814621f50c3Smrgm4_define([lt_decl_dquote_varnames], 3815621f50c3Smrg[_lt_decl_filter([value], [2], $@)]) 3816dd0822caSmrg 3817dd0822caSmrg 3818621f50c3Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3819621f50c3Smrg# --------------------------------------------------- 3820621f50c3Smrgm4_define([lt_decl_varnames_tagged], 3821621f50c3Smrg[m4_assert([$# <= 2])dnl 3822621f50c3Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3823621f50c3Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3824621f50c3Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3825621f50c3Smrgm4_define([_lt_decl_varnames_tagged], 3826621f50c3Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3827dd0822caSmrg 3828dc407927Smrg 3829621f50c3Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3830621f50c3Smrg# ------------------------------------------------ 3831621f50c3Smrgm4_define([lt_decl_all_varnames], 3832621f50c3Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3833621f50c3Smrg m4_if([$2], [], 3834621f50c3Smrg m4_quote(lt_decl_varnames), 3835621f50c3Smrg m4_quote(m4_shift($@))))[]dnl 3836621f50c3Smrg]) 3837621f50c3Smrgm4_define([_lt_decl_all_varnames], 3838621f50c3Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3839621f50c3Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3840621f50c3Smrg]) 38411a9c160aSmrg 38421a9c160aSmrg 3843621f50c3Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3844621f50c3Smrg# ------------------------------------ 3845621f50c3Smrg# Quote a variable value, and forward it to 'config.status' so that its 3846621f50c3Smrg# declaration there will have the same value as in 'configure'. VARNAME 3847621f50c3Smrg# must have a single quote delimited value for this to work. 3848621f50c3Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3849621f50c3Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 38503eed67faSmbalmer 38513eed67faSmbalmer 3852621f50c3Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3853621f50c3Smrg# ------------------------------ 3854621f50c3Smrg# We delimit libtool config variables with single quotes, so when 3855621f50c3Smrg# we write them to config.status, we have to be sure to quote all 3856621f50c3Smrg# embedded single quotes properly. In configure, this macro expands 3857621f50c3Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3858621f50c3Smrg# 3859621f50c3Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3860621f50c3Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3861621f50c3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3862621f50c3Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 38633eed67faSmbalmer 38643eed67faSmbalmer 3865621f50c3Smrg# _LT_LIBTOOL_TAGS 3866621f50c3Smrg# ---------------- 3867621f50c3Smrg# Output comment and list of tags supported by the script 3868621f50c3Smrgm4_defun([_LT_LIBTOOL_TAGS], 3869621f50c3Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3870621f50c3Smrgavailable_tags='_LT_TAGS'dnl 3871621f50c3Smrg]) 38723eed67faSmbalmer 38733eed67faSmbalmer 3874621f50c3Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3875621f50c3Smrg# ----------------------------------- 3876621f50c3Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3877621f50c3Smrg# expand to a commented shell variable setting: 3878621f50c3Smrg# 3879621f50c3Smrg# # Some comment about what VAR is for. 3880621f50c3Smrg# visible_name=$lt_internal_name 3881621f50c3Smrgm4_define([_LT_LIBTOOL_DECLARE], 3882621f50c3Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3883621f50c3Smrg [description])))[]dnl 3884621f50c3Smrgm4_pushdef([_libtool_name], 3885621f50c3Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3886621f50c3Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3887621f50c3Smrg [0], [_libtool_name=[$]$1], 3888621f50c3Smrg [1], [_libtool_name=$lt_[]$1], 3889621f50c3Smrg [2], [_libtool_name=$lt_[]$1], 3890621f50c3Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3891621f50c3Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3892621f50c3Smrg]) 38933eed67faSmbalmer 38943eed67faSmbalmer 3895621f50c3Smrg# _LT_LIBTOOL_CONFIG_VARS 3896621f50c3Smrg# ----------------------- 3897621f50c3Smrg# Produce commented declarations of non-tagged libtool config variables 3898621f50c3Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3899621f50c3Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3900621f50c3Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3901621f50c3Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3902621f50c3Smrg[m4_foreach([_lt_var], 3903621f50c3Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3904621f50c3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 39053eed67faSmbalmer 39063eed67faSmbalmer 3907621f50c3Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3908621f50c3Smrg# ------------------------- 3909621f50c3Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3910621f50c3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3911621f50c3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 39123eed67faSmbalmer 39133eed67faSmbalmer 3914621f50c3Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3915621f50c3Smrg# ------------------------------ 3916621f50c3Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 39173eed67faSmbalmer 39183eed67faSmbalmer 3919621f50c3Smrg# _LT_CONFIG_COMMANDS 3920621f50c3Smrg# ------------------- 3921621f50c3Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3922621f50c3Smrg# variables for single and double quote escaping we saved from calls 3923621f50c3Smrg# to _LT_DECL, we can put quote escaped variables declarations 3924621f50c3Smrg# into 'config.status', and then the shell code to quote escape them in 3925621f50c3Smrg# for loops in 'config.status'. Finally, any additional code accumulated 3926621f50c3Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3927621f50c3Smrgm4_defun([_LT_CONFIG_COMMANDS], 3928621f50c3Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3929621f50c3Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3930621f50c3Smrg dnl instead of duplicating it all over again into config.status, 3931621f50c3Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3932621f50c3Smrg dnl needs to know what name is stored there: 3933621f50c3Smrg [AC_CONFIG_COMMANDS([libtool], 3934621f50c3Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3935621f50c3Smrg dnl If the libtool generation code is destined for config.status, 3936621f50c3Smrg dnl expand the accumulated commands and init code now: 3937621f50c3Smrg [AC_CONFIG_COMMANDS([libtool], 3938621f50c3Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3939621f50c3Smrg])#_LT_CONFIG_COMMANDS 39401a9c160aSmrg 39413eed67faSmbalmer 3942621f50c3Smrg# Initialize. 3943621f50c3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3944621f50c3Smrg[ 39451a9c160aSmrg 3946621f50c3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3947621f50c3Smrg# if CDPATH is set. 3948621f50c3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 39493eed67faSmbalmer 3950621f50c3Smrgsed_quote_subst='$sed_quote_subst' 3951621f50c3Smrgdouble_quote_subst='$double_quote_subst' 3952621f50c3Smrgdelay_variable_subst='$delay_variable_subst' 3953621f50c3Smrg_LT_CONFIG_STATUS_DECLARATIONS 3954621f50c3SmrgLTCC='$LTCC' 3955621f50c3SmrgLTCFLAGS='$LTCFLAGS' 3956621f50c3Smrgcompiler='$compiler_DEFAULT' 39573eed67faSmbalmer 3958621f50c3Smrg# A function that is used when there is no print builtin or printf. 3959621f50c3Smrgfunc_fallback_echo () 3960621f50c3Smrg{ 3961621f50c3Smrg eval 'cat <<_LTECHO_EOF 3962621f50c3Smrg\$[]1 3963621f50c3Smrg_LTECHO_EOF' 3964621f50c3Smrg} 39653eed67faSmbalmer 3966621f50c3Smrg# Quote evaled strings. 3967621f50c3Smrgfor var in lt_decl_all_varnames([[ \ 3968621f50c3Smrg]], lt_decl_quote_varnames); do 3969621f50c3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3970621f50c3Smrg *[[\\\\\\\`\\"\\\$]]*) 3971621f50c3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3972621f50c3Smrg ;; 3973621f50c3Smrg *) 3974621f50c3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3975621f50c3Smrg ;; 3976621f50c3Smrg esac 3977621f50c3Smrgdone 39783eed67faSmbalmer 3979621f50c3Smrg# Double-quote double-evaled strings. 3980621f50c3Smrgfor var in lt_decl_all_varnames([[ \ 3981621f50c3Smrg]], lt_decl_dquote_varnames); do 3982621f50c3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3983621f50c3Smrg *[[\\\\\\\`\\"\\\$]]*) 3984621f50c3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3985621f50c3Smrg ;; 3986621f50c3Smrg *) 3987621f50c3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3988621f50c3Smrg ;; 3989621f50c3Smrg esac 3990621f50c3Smrgdone 39913eed67faSmbalmer 3992621f50c3Smrg_LT_OUTPUT_LIBTOOL_INIT 3993621f50c3Smrg]) 39943eed67faSmbalmer 3995621f50c3Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3996621f50c3Smrg# ------------------------------------ 3997621f50c3Smrg# Generate a child script FILE with all initialization necessary to 3998621f50c3Smrg# reuse the environment learned by the parent script, and make the 3999621f50c3Smrg# file executable. If COMMENT is supplied, it is inserted after the 4000621f50c3Smrg# '#!' sequence but before initialization text begins. After this 4001621f50c3Smrg# macro, additional text can be appended to FILE to form the body of 4002621f50c3Smrg# the child script. The macro ends with non-zero status if the 4003621f50c3Smrg# file could not be fully written (such as if the disk is full). 4004621f50c3Smrgm4_ifdef([AS_INIT_GENERATED], 4005621f50c3Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4006621f50c3Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 4007621f50c3Smrg[m4_require([AS_PREPARE])]dnl 4008621f50c3Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4009621f50c3Smrg[lt_write_fail=0 4010621f50c3Smrgcat >$1 <<_ASEOF || lt_write_fail=1 4011621f50c3Smrg#! $SHELL 4012621f50c3Smrg# Generated by $as_me. 4013621f50c3Smrg$2 4014621f50c3SmrgSHELL=\${CONFIG_SHELL-$SHELL} 4015621f50c3Smrgexport SHELL 4016621f50c3Smrg_ASEOF 4017621f50c3Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4018621f50c3SmrgAS_SHELL_SANITIZE 4019621f50c3Smrg_AS_PREPARE 4020621f50c3Smrgexec AS_MESSAGE_FD>&1 4021621f50c3Smrg_ASEOF 4022621f50c3Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4023621f50c3Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 40243eed67faSmbalmer 4025621f50c3Smrg# LT_OUTPUT 4026621f50c3Smrg# --------- 4027621f50c3Smrg# This macro allows early generation of the libtool script (before 4028621f50c3Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 4029621f50c3Smrg# tests. 4030621f50c3SmrgAC_DEFUN([LT_OUTPUT], 4031621f50c3Smrg[: ${CONFIG_LT=./config.lt} 4032621f50c3SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4033621f50c3Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4034621f50c3Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 40353eed67faSmbalmer 4036621f50c3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4037621f50c3Smrglt_cl_silent=false 4038621f50c3Smrgexec AS_MESSAGE_LOG_FD>>config.log 4039621f50c3Smrg{ 4040621f50c3Smrg echo 4041621f50c3Smrg AS_BOX([Running $as_me.]) 4042621f50c3Smrg} >&AS_MESSAGE_LOG_FD 4043dd0822caSmrg 4044621f50c3Smrglt_cl_help="\ 4045621f50c3Smrg'$as_me' creates a local libtool stub from the current configuration, 4046621f50c3Smrgfor use in further configure time tests before the real libtool is 4047621f50c3Smrggenerated. 40483eed67faSmbalmer 4049621f50c3SmrgUsage: $[0] [[OPTIONS]] 40503eed67faSmbalmer 4051621f50c3Smrg -h, --help print this help, then exit 4052621f50c3Smrg -V, --version print version number, then exit 4053621f50c3Smrg -q, --quiet do not print progress messages 4054621f50c3Smrg -d, --debug don't remove temporary files 40553eed67faSmbalmer 4056621f50c3SmrgReport bugs to <bug-libtool@gnu.org>." 40573eed67faSmbalmer 4058621f50c3Smrglt_cl_version="\ 4059621f50c3Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4060621f50c3Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4061621f50c3Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 40623eed67faSmbalmer 4063621f50c3SmrgCopyright (C) 2011 Free Software Foundation, Inc. 4064621f50c3SmrgThis config.lt script is free software; the Free Software Foundation 4065621f50c3Smrggives unlimited permision to copy, distribute and modify it." 40663eed67faSmbalmer 4067621f50c3Smrgwhile test 0 != $[#] 4068621f50c3Smrgdo 4069621f50c3Smrg case $[1] in 4070621f50c3Smrg --version | --v* | -V ) 4071621f50c3Smrg echo "$lt_cl_version"; exit 0 ;; 4072621f50c3Smrg --help | --h* | -h ) 4073621f50c3Smrg echo "$lt_cl_help"; exit 0 ;; 4074621f50c3Smrg --debug | --d* | -d ) 4075621f50c3Smrg debug=: ;; 4076621f50c3Smrg --quiet | --q* | --silent | --s* | -q ) 4077621f50c3Smrg lt_cl_silent=: ;; 4078621f50c3Smrg 4079621f50c3Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4080621f50c3SmrgTry '$[0] --help' for more information.]) ;; 4081621f50c3Smrg 4082621f50c3Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4083621f50c3SmrgTry '$[0] --help' for more information.]) ;; 4084621f50c3Smrg esac 4085621f50c3Smrg shift 4086dc407927Smrgdone 4087621f50c3Smrg 4088621f50c3Smrgif $lt_cl_silent; then 4089621f50c3Smrg exec AS_MESSAGE_FD>/dev/null 40903eed67faSmbalmerfi 4091621f50c3Smrg_LTEOF 40923eed67faSmbalmer 4093621f50c3Smrgcat >>"$CONFIG_LT" <<_LTEOF 4094621f50c3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4095621f50c3Smrg_LTEOF 4096621f50c3Smrg 4097621f50c3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4098621f50c3SmrgAC_MSG_NOTICE([creating $ofile]) 4099621f50c3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4100621f50c3SmrgAS_EXIT(0) 4101621f50c3Smrg_LTEOF 4102621f50c3Smrgchmod +x "$CONFIG_LT" 4103621f50c3Smrg 4104621f50c3Smrg# configure is writing to config.log, but config.lt does its own redirection, 4105621f50c3Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4106621f50c3Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4107621f50c3Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4108621f50c3Smrglt_cl_success=: 4109621f50c3Smrgtest yes = "$silent" && 4110621f50c3Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4111621f50c3Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4112621f50c3Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4113621f50c3Smrgexec AS_MESSAGE_LOG_FD>>config.log 4114621f50c3Smrg$lt_cl_success || AS_EXIT(1) 4115621f50c3Smrg])# LT_OUTPUT 4116621f50c3Smrg 4117621f50c3Smrg 4118621f50c3Smrg# _LT_CONFIG(TAG) 4119621f50c3Smrg# --------------- 4120621f50c3Smrg# If TAG is the built-in tag, create an initial libtool script with a 4121621f50c3Smrg# default configuration from the untagged config vars. Otherwise add code 4122621f50c3Smrg# to config.status for appending the configuration named by TAG from the 4123621f50c3Smrg# matching tagged config vars. 4124621f50c3Smrgm4_defun([_LT_CONFIG], 4125621f50c3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4126621f50c3Smrg_LT_CONFIG_SAVE_COMMANDS([ 4127621f50c3Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4128621f50c3Smrg m4_if(_LT_TAG, [C], [ 4129621f50c3Smrg # See if we are running on zsh, and set the options that allow our 4130621f50c3Smrg # commands through without removal of \ escapes. 4131621f50c3Smrg if test -n "${ZSH_VERSION+set}"; then 4132621f50c3Smrg setopt NO_GLOB_SUBST 4133621f50c3Smrg fi 4134621f50c3Smrg 4135621f50c3Smrg cfgfile=${ofile}T 4136621f50c3Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4137621f50c3Smrg $RM "$cfgfile" 4138621f50c3Smrg 4139621f50c3Smrg cat <<_LT_EOF >> "$cfgfile" 4140621f50c3Smrg#! $SHELL 4141621f50c3Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4142621f50c3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4143621f50c3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4144621f50c3Smrg 4145621f50c3Smrg# Provide generalized library-building support services. 4146621f50c3Smrg# Written by Gordon Matzigkeit, 1996 4147621f50c3Smrg 4148621f50c3Smrg_LT_COPYING 4149621f50c3Smrg_LT_LIBTOOL_TAGS 4150621f50c3Smrg 4151621f50c3Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4152621f50c3Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4153621f50c3Smrg 4154621f50c3Smrg# ### BEGIN LIBTOOL CONFIG 4155621f50c3Smrg_LT_LIBTOOL_CONFIG_VARS 4156621f50c3Smrg_LT_LIBTOOL_TAG_VARS 4157621f50c3Smrg# ### END LIBTOOL CONFIG 4158621f50c3Smrg 4159621f50c3Smrg_LT_EOF 4160621f50c3Smrg 4161621f50c3Smrg cat <<'_LT_EOF' >> "$cfgfile" 4162621f50c3Smrg 4163621f50c3Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4164621f50c3Smrg 4165621f50c3Smrg_LT_PREPARE_MUNGE_PATH_LIST 4166621f50c3Smrg_LT_PREPARE_CC_BASENAME 4167621f50c3Smrg 4168621f50c3Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4169621f50c3Smrg 4170621f50c3Smrg_LT_EOF 4171621f50c3Smrg 4172621f50c3Smrg case $host_os in 4173621f50c3Smrg aix3*) 4174621f50c3Smrg cat <<\_LT_EOF >> "$cfgfile" 4175621f50c3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4176621f50c3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4177621f50c3Smrg# vanish in a puff of smoke. 4178621f50c3Smrgif test set != "${COLLECT_NAMES+set}"; then 4179621f50c3Smrg COLLECT_NAMES= 4180621f50c3Smrg export COLLECT_NAMES 4181dd0822caSmrgfi 4182621f50c3Smrg_LT_EOF 4183621f50c3Smrg ;; 4184621f50c3Smrg esac 4185dd0822caSmrg 4186621f50c3Smrg _LT_PROG_LTMAIN 41873eed67faSmbalmer 4188621f50c3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4189621f50c3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4190621f50c3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4191621f50c3Smrg # is reportedly fixed, but why not run on old versions too? 4192621f50c3Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4193621f50c3Smrg || (rm -f "$cfgfile"; exit 1) 41943eed67faSmbalmer 4195621f50c3Smrg mv -f "$cfgfile" "$ofile" || 4196621f50c3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4197621f50c3Smrg chmod +x "$ofile" 4198621f50c3Smrg], 4199621f50c3Smrg[cat <<_LT_EOF >> "$ofile" 42003eed67faSmbalmer 4201621f50c3Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4202621f50c3Smrgdnl in a comment (ie after a #). 4203621f50c3Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4204621f50c3Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4205621f50c3Smrg# ### END LIBTOOL TAG CONFIG: $1 4206621f50c3Smrg_LT_EOF 4207621f50c3Smrg])dnl /m4_if 4208621f50c3Smrg], 4209621f50c3Smrg[m4_if([$1], [], [ 4210621f50c3Smrg PACKAGE='$PACKAGE' 4211621f50c3Smrg VERSION='$VERSION' 4212621f50c3Smrg RM='$RM' 4213621f50c3Smrg ofile='$ofile'], []) 4214621f50c3Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4215621f50c3Smrg])# _LT_CONFIG 42163eed67faSmbalmer 42173eed67faSmbalmer 4218621f50c3Smrg# LT_SUPPORTED_TAG(TAG) 4219621f50c3Smrg# --------------------- 4220621f50c3Smrg# Trace this macro to discover what tags are supported by the libtool 4221621f50c3Smrg# --tag option, using: 4222621f50c3Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4223621f50c3SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 42243eed67faSmbalmer 42253eed67faSmbalmer 4226621f50c3Smrg# C support is built-in for now 4227621f50c3Smrgm4_define([_LT_LANG_C_enabled], []) 4228621f50c3Smrgm4_define([_LT_TAGS], []) 42293eed67faSmbalmer 42303eed67faSmbalmer 4231621f50c3Smrg# LT_LANG(LANG) 4232621f50c3Smrg# ------------- 4233621f50c3Smrg# Enable libtool support for the given language if not already enabled. 4234621f50c3SmrgAC_DEFUN([LT_LANG], 4235621f50c3Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4236621f50c3Smrgm4_case([$1], 4237621f50c3Smrg [C], [_LT_LANG(C)], 4238621f50c3Smrg [C++], [_LT_LANG(CXX)], 4239621f50c3Smrg [Go], [_LT_LANG(GO)], 4240621f50c3Smrg [Java], [_LT_LANG(GCJ)], 4241621f50c3Smrg [Fortran 77], [_LT_LANG(F77)], 4242621f50c3Smrg [Fortran], [_LT_LANG(FC)], 4243621f50c3Smrg [Windows Resource], [_LT_LANG(RC)], 4244621f50c3Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4245621f50c3Smrg [_LT_LANG($1)], 4246621f50c3Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4247621f50c3Smrg])# LT_LANG 42483eed67faSmbalmer 42493eed67faSmbalmer 4250621f50c3Smrg# _LT_LANG(LANGNAME) 4251621f50c3Smrg# ------------------ 4252621f50c3Smrgm4_defun([_LT_LANG], 4253621f50c3Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4254621f50c3Smrg [LT_SUPPORTED_TAG([$1])dnl 4255621f50c3Smrg m4_append([_LT_TAGS], [$1 ])dnl 4256621f50c3Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4257621f50c3Smrg _LT_LANG_$1_CONFIG($1)])dnl 4258621f50c3Smrg])# _LT_LANG 42593eed67faSmbalmer 42603eed67faSmbalmer 4261621f50c3Smrgm4_ifndef([AC_PROG_GO], [ 4262621f50c3Smrg# NOTE: This macro has been submitted for inclusion into # 4263621f50c3Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4264621f50c3Smrg# a released version of Autoconf we should remove this # 4265621f50c3Smrg# macro and use it instead. # 4266621f50c3Smrgm4_defun([AC_PROG_GO], 4267621f50c3Smrg[AC_LANG_PUSH(Go)dnl 4268621f50c3SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4269621f50c3SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4270621f50c3Smrg_AC_ARG_VAR_LDFLAGS()dnl 4271621f50c3SmrgAC_CHECK_TOOL(GOC, gccgo) 4272621f50c3Smrgif test -z "$GOC"; then 4273621f50c3Smrg if test -n "$ac_tool_prefix"; then 4274621f50c3Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4275dc407927Smrg fi 4276621f50c3Smrgfi 4277621f50c3Smrgif test -z "$GOC"; then 4278621f50c3Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4279621f50c3Smrgfi 4280621f50c3Smrg])#m4_defun 4281621f50c3Smrg])#m4_ifndef 42823eed67faSmbalmer 42833eed67faSmbalmer 4284621f50c3Smrg# _LT_LANG_DEFAULT_CONFIG 4285621f50c3Smrg# ----------------------- 4286621f50c3Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4287621f50c3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4288621f50c3Smrg [LT_LANG(CXX)], 4289621f50c3Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42903eed67faSmbalmer 4291621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4292621f50c3Smrg [LT_LANG(F77)], 4293621f50c3Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42943eed67faSmbalmer 4295621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4296621f50c3Smrg [LT_LANG(FC)], 4297621f50c3Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4298dd0822caSmrg 4299621f50c3Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4300621f50c3Smrgdnl pulling things in needlessly. 4301621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4302621f50c3Smrg [LT_LANG(GCJ)], 4303621f50c3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4304621f50c3Smrg [LT_LANG(GCJ)], 4305621f50c3Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4306621f50c3Smrg [LT_LANG(GCJ)], 4307621f50c3Smrg [m4_ifdef([AC_PROG_GCJ], 4308621f50c3Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4309621f50c3Smrg m4_ifdef([A][M_PROG_GCJ], 4310621f50c3Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4311621f50c3Smrg m4_ifdef([LT_PROG_GCJ], 4312621f50c3Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 43133eed67faSmbalmer 4314621f50c3SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4315621f50c3Smrg [LT_LANG(GO)], 4316621f50c3Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4317dc407927Smrg 4318621f50c3SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4319621f50c3Smrg [LT_LANG(RC)], 4320621f50c3Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4321621f50c3Smrg])# _LT_LANG_DEFAULT_CONFIG 4322dc407927Smrg 4323621f50c3Smrg# Obsolete macros: 4324621f50c3SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4325621f50c3SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4326621f50c3SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4327621f50c3SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4328621f50c3SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4329621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 4330621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4331621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4332621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4333621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4334621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 43353eed67faSmbalmer 43363eed67faSmbalmer 4337621f50c3Smrg# _LT_TAG_COMPILER 4338621f50c3Smrg# ---------------- 4339621f50c3Smrgm4_defun([_LT_TAG_COMPILER], 4340621f50c3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 43413eed67faSmbalmer 4342621f50c3Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4343621f50c3Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4344621f50c3Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4345621f50c3Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 43463eed67faSmbalmer 4347621f50c3Smrg# If no C compiler was specified, use CC. 4348621f50c3SmrgLTCC=${LTCC-"$CC"} 43493eed67faSmbalmer 4350621f50c3Smrg# If no C compiler flags were specified, use CFLAGS. 4351621f50c3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 43523eed67faSmbalmer 4353621f50c3Smrg# Allow CC to be a program name with arguments. 4354621f50c3Smrgcompiler=$CC 4355621f50c3Smrg])# _LT_TAG_COMPILER 43563eed67faSmbalmer 4357dc407927Smrg 4358621f50c3Smrg# _LT_COMPILER_BOILERPLATE 4359621f50c3Smrg# ------------------------ 4360621f50c3Smrg# Check for compiler boilerplate output or warnings with 4361621f50c3Smrg# the simple compiler test code. 4362621f50c3Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4363621f50c3Smrg[m4_require([_LT_DECL_SED])dnl 4364621f50c3Smrgac_outfile=conftest.$ac_objext 4365621f50c3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4366621f50c3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4367621f50c3Smrg_lt_compiler_boilerplate=`cat conftest.err` 4368621f50c3Smrg$RM conftest* 4369621f50c3Smrg])# _LT_COMPILER_BOILERPLATE 4370dc407927Smrg 4371dc407927Smrg 4372621f50c3Smrg# _LT_LINKER_BOILERPLATE 4373621f50c3Smrg# ---------------------- 4374621f50c3Smrg# Check for linker boilerplate output or warnings with 4375621f50c3Smrg# the simple link test code. 4376621f50c3Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4377621f50c3Smrg[m4_require([_LT_DECL_SED])dnl 4378621f50c3Smrgac_outfile=conftest.$ac_objext 4379621f50c3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4380621f50c3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4381621f50c3Smrg_lt_linker_boilerplate=`cat conftest.err` 4382621f50c3Smrg$RM -r conftest* 4383621f50c3Smrg])# _LT_LINKER_BOILERPLATE 4384621f50c3Smrg 4385621f50c3Smrg# _LT_REQUIRED_DARWIN_CHECKS 4386621f50c3Smrg# ------------------------- 4387621f50c3Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4388dc407927Smrg case $host_os in 4389621f50c3Smrg rhapsody* | darwin*) 4390621f50c3Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4391621f50c3Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4392621f50c3Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4393621f50c3Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4394621f50c3Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4395621f50c3Smrg _LT_DECL([], [DSYMUTIL], [1], 4396621f50c3Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4397621f50c3Smrg _LT_DECL([], [NMEDIT], [1], 4398621f50c3Smrg [Tool to change global to local symbols on Mac OS X]) 4399621f50c3Smrg _LT_DECL([], [LIPO], [1], 4400621f50c3Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4401621f50c3Smrg _LT_DECL([], [OTOOL], [1], 4402621f50c3Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4403621f50c3Smrg _LT_DECL([], [OTOOL64], [1], 4404621f50c3Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 44053eed67faSmbalmer 4406621f50c3Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4407621f50c3Smrg [lt_cv_apple_cc_single_mod=no 4408621f50c3Smrg if test -z "$LT_MULTI_MODULE"; then 4409621f50c3Smrg # By default we will add the -single_module flag. You can override 4410621f50c3Smrg # by either setting the environment variable LT_MULTI_MODULE 4411621f50c3Smrg # non-empty at configure time, or by adding -multi_module to the 4412621f50c3Smrg # link flags. 4413621f50c3Smrg rm -rf libconftest.dylib* 4414621f50c3Smrg echo "int foo(void){return 1;}" > conftest.c 4415621f50c3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4416621f50c3Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4417621f50c3Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4418621f50c3Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4419621f50c3Smrg _lt_result=$? 4420621f50c3Smrg # If there is a non-empty error log, and "single_module" 4421621f50c3Smrg # appears in it, assume the flag caused a linker warning 4422621f50c3Smrg if test -s conftest.err && $GREP single_module conftest.err; then 4423621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4424621f50c3Smrg # Otherwise, if the output was created with a 0 exit code from 4425621f50c3Smrg # the compiler, it worked. 4426621f50c3Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4427621f50c3Smrg lt_cv_apple_cc_single_mod=yes 4428621f50c3Smrg else 4429621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4430621f50c3Smrg fi 4431621f50c3Smrg rm -rf libconftest.dylib* 4432621f50c3Smrg rm -f conftest.* 4433621f50c3Smrg fi]) 4434621f50c3Smrg 4435621f50c3Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4436621f50c3Smrg [lt_cv_ld_exported_symbols_list], 4437621f50c3Smrg [lt_cv_ld_exported_symbols_list=no 4438621f50c3Smrg save_LDFLAGS=$LDFLAGS 4439621f50c3Smrg echo "_main" > conftest.sym 4440621f50c3Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4441621f50c3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4442621f50c3Smrg [lt_cv_ld_exported_symbols_list=yes], 4443621f50c3Smrg [lt_cv_ld_exported_symbols_list=no]) 4444621f50c3Smrg LDFLAGS=$save_LDFLAGS 4445621f50c3Smrg ]) 4446621f50c3Smrg 4447621f50c3Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4448621f50c3Smrg [lt_cv_ld_force_load=no 4449621f50c3Smrg cat > conftest.c << _LT_EOF 4450621f50c3Smrgint forced_loaded() { return 2;} 4451621f50c3Smrg_LT_EOF 4452621f50c3Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4453621f50c3Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4454621f50c3Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4455621f50c3Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4456621f50c3Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4457621f50c3Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4458621f50c3Smrg cat > conftest.c << _LT_EOF 4459621f50c3Smrgint main() { return 0;} 4460621f50c3Smrg_LT_EOF 4461621f50c3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4462621f50c3Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4463621f50c3Smrg _lt_result=$? 4464621f50c3Smrg if test -s conftest.err && $GREP force_load conftest.err; then 4465621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4466621f50c3Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4467621f50c3Smrg lt_cv_ld_force_load=yes 4468621f50c3Smrg else 4469621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4470621f50c3Smrg fi 4471621f50c3Smrg rm -f conftest.err libconftest.a conftest conftest.c 4472621f50c3Smrg rm -rf conftest.dSYM 4473621f50c3Smrg ]) 4474621f50c3Smrg case $host_os in 4475621f50c3Smrg rhapsody* | darwin1.[[012]]) 4476621f50c3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4477621f50c3Smrg darwin1.*) 4478621f50c3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4479621f50c3Smrg darwin*) 4480621f50c3Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4481621f50c3Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4482621f50c3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4483621f50c3Smrg *) 4484621f50c3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 44851a9c160aSmrg esac 4486621f50c3Smrg ;; 4487621f50c3Smrg esac 4488621f50c3Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4489621f50c3Smrg _lt_dar_single_mod='$single_module' 4490621f50c3Smrg fi 4491621f50c3Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4492621f50c3Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4493621f50c3Smrg else 4494621f50c3Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4495621f50c3Smrg fi 4496621f50c3Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4497621f50c3Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4498621f50c3Smrg else 4499621f50c3Smrg _lt_dsymutil= 4500dc407927Smrg fi 4501dc407927Smrg ;; 4502dc407927Smrg esac 4503621f50c3Smrg]) 45043eed67faSmbalmer 45053eed67faSmbalmer 4506621f50c3Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4507621f50c3Smrg# --------------------------------- 4508621f50c3Smrg# Checks for linker and compiler features on darwin 4509621f50c3Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4510621f50c3Smrg[ 4511621f50c3Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4512621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4513621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4514621f50c3Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4515621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4516621f50c3Smrg if test yes = "$lt_cv_ld_force_load"; then 4517621f50c3Smrg _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\"`' 4518621f50c3Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4519621f50c3Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4520621f50c3Smrg else 4521621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4522621f50c3Smrg fi 4523621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4524621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4525621f50c3Smrg case $cc_basename in 4526621f50c3Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4527621f50c3Smrg *) _lt_dar_can_shared=$GCC ;; 4528621f50c3Smrg esac 4529621f50c3Smrg if test yes = "$_lt_dar_can_shared"; then 4530621f50c3Smrg output_verbose_link_cmd=func_echo_all 4531621f50c3Smrg _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" 4532621f50c3Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4533621f50c3Smrg _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" 4534621f50c3Smrg _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" 4535621f50c3Smrg m4_if([$1], [CXX], 4536621f50c3Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4537621f50c3Smrg _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" 4538621f50c3Smrg _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" 4539621f50c3Smrg fi 4540621f50c3Smrg],[]) 4541621f50c3Smrg else 4542621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4543621f50c3Smrg fi 4544621f50c3Smrg]) 45453eed67faSmbalmer 4546621f50c3Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4547621f50c3Smrg# ---------------------------------- 4548621f50c3Smrg# Links a minimal program and checks the executable 4549621f50c3Smrg# for the system default hardcoded library path. In most cases, 4550621f50c3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 4551621f50c3Smrg# the location of the communication and MPI libs are included too. 4552621f50c3Smrg# If we don't find anything, use the default library path according 4553621f50c3Smrg# to the aix ld manual. 4554621f50c3Smrg# Store the results from the different compilers for each TAGNAME. 4555621f50c3Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 4556621f50c3Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4557621f50c3Smrg[m4_require([_LT_DECL_SED])dnl 4558621f50c3Smrgif test set = "${lt_cv_aix_libpath+set}"; then 4559621f50c3Smrg aix_libpath=$lt_cv_aix_libpath 4560dd0822caSmrgelse 4561621f50c3Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4562621f50c3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4563621f50c3Smrg lt_aix_libpath_sed='[ 4564621f50c3Smrg /Import File Strings/,/^$/ { 4565621f50c3Smrg /^0/ { 4566621f50c3Smrg s/^0 *\([^ ]*\) *$/\1/ 4567621f50c3Smrg p 4568621f50c3Smrg } 4569621f50c3Smrg }]' 4570621f50c3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4571621f50c3Smrg # Check for a 64-bit object if we didn't find anything. 4572621f50c3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4573621f50c3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4574621f50c3Smrg fi],[]) 4575621f50c3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4576621f50c3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4577621f50c3Smrg fi 4578621f50c3Smrg ]) 4579621f50c3Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4580621f50c3Smrgfi 4581621f50c3Smrg])# _LT_SYS_MODULE_PATH_AIX 4582dc407927Smrg 4583dc407927Smrg 4584621f50c3Smrg# _LT_SHELL_INIT(ARG) 4585621f50c3Smrg# ------------------- 4586621f50c3Smrgm4_define([_LT_SHELL_INIT], 4587621f50c3Smrg[m4_divert_text([M4SH-INIT], [$1 4588621f50c3Smrg])])# _LT_SHELL_INIT 4589dc407927Smrg 4590dc407927Smrg 45913eed67faSmbalmer 4592621f50c3Smrg# _LT_PROG_ECHO_BACKSLASH 4593621f50c3Smrg# ----------------------- 4594621f50c3Smrg# Find how we can fake an echo command that does not interpret backslash. 4595621f50c3Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 4596621f50c3Smrg# of the generated configure script that will find a shell with a builtin 4597621f50c3Smrg# printf (that we can use as an echo command). 4598621f50c3Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4599621f50c3Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4600621f50c3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4601621f50c3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 46023eed67faSmbalmer 4603621f50c3SmrgAC_MSG_CHECKING([how to print strings]) 4604621f50c3Smrg# Test print first, because it will be a builtin if present. 4605621f50c3Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4606621f50c3Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4607621f50c3Smrg ECHO='print -r --' 4608621f50c3Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4609621f50c3Smrg ECHO='printf %s\n' 4610621f50c3Smrgelse 4611621f50c3Smrg # Use this function as a fallback that always works. 4612621f50c3Smrg func_fallback_echo () 4613621f50c3Smrg { 4614621f50c3Smrg eval 'cat <<_LTECHO_EOF 4615621f50c3Smrg$[]1 4616621f50c3Smrg_LTECHO_EOF' 4617621f50c3Smrg } 4618621f50c3Smrg ECHO='func_fallback_echo' 4619621f50c3Smrgfi 46203eed67faSmbalmer 4621621f50c3Smrg# func_echo_all arg... 4622621f50c3Smrg# Invoke $ECHO with all args, space-separated. 4623621f50c3Smrgfunc_echo_all () 4624621f50c3Smrg{ 4625621f50c3Smrg $ECHO "$*" 4626621f50c3Smrg} 46273eed67faSmbalmer 4628621f50c3Smrgcase $ECHO in 4629621f50c3Smrg printf*) AC_MSG_RESULT([printf]) ;; 4630621f50c3Smrg print*) AC_MSG_RESULT([print -r]) ;; 4631621f50c3Smrg *) AC_MSG_RESULT([cat]) ;; 4632621f50c3Smrgesac 46333eed67faSmbalmer 4634621f50c3Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 4635621f50c3Smrg[_AS_DETECT_SUGGESTED([ 4636621f50c3Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4637621f50c3Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4638621f50c3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4639621f50c3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4640621f50c3Smrg PATH=/empty FPATH=/empty; export PATH FPATH 4641621f50c3Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4642621f50c3Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 46433eed67faSmbalmer 4644621f50c3Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4645621f50c3Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4646621f50c3Smrg])# _LT_PROG_ECHO_BACKSLASH 46473eed67faSmbalmer 4648dc407927Smrg 4649621f50c3Smrg# _LT_WITH_SYSROOT 4650621f50c3Smrg# ---------------- 4651621f50c3SmrgAC_DEFUN([_LT_WITH_SYSROOT], 4652621f50c3Smrg[m4_require([_LT_DECL_SED])dnl 4653621f50c3SmrgAC_MSG_CHECKING([for sysroot]) 4654621f50c3SmrgAC_ARG_WITH([sysroot], 4655621f50c3Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4656621f50c3Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 4657621f50c3Smrg if not specified).])], 4658621f50c3Smrg[], [with_sysroot=no]) 46593eed67faSmbalmer 4660621f50c3Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 4661621f50c3Smrgdnl in case the user passed a directory name. 4662621f50c3Smrglt_sysroot= 4663621f50c3Smrgcase $with_sysroot in #( 4664621f50c3Smrg yes) 4665621f50c3Smrg if test yes = "$GCC"; then 4666621f50c3Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4667621f50c3Smrg fi 4668621f50c3Smrg ;; #( 4669621f50c3Smrg /*) 4670621f50c3Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4671621f50c3Smrg ;; #( 4672621f50c3Smrg no|'') 4673621f50c3Smrg ;; #( 4674621f50c3Smrg *) 4675621f50c3Smrg AC_MSG_RESULT([$with_sysroot]) 4676621f50c3Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4677621f50c3Smrg ;; 4678621f50c3Smrgesac 46793eed67faSmbalmer 4680621f50c3Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4681621f50c3Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4682621f50c3Smrg[dependent libraries, and where our libraries should be installed.])]) 46833eed67faSmbalmer 4684621f50c3Smrg# _LT_ENABLE_LOCK 4685621f50c3Smrg# --------------- 4686621f50c3Smrgm4_defun([_LT_ENABLE_LOCK], 4687621f50c3Smrg[AC_ARG_ENABLE([libtool-lock], 4688621f50c3Smrg [AS_HELP_STRING([--disable-libtool-lock], 4689621f50c3Smrg [avoid locking (might break parallel builds)])]) 4690621f50c3Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4691dc407927Smrg 4692621f50c3Smrg# Some flags need to be propagated to the compiler or linker for good 4693621f50c3Smrg# libtool support. 4694621f50c3Smrgcase $host in 4695621f50c3Smrgia64-*-hpux*) 4696621f50c3Smrg # Find out what ABI is being produced by ac_compile, and set mode 4697621f50c3Smrg # options accordingly. 4698621f50c3Smrg echo 'int i;' > conftest.$ac_ext 4699621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 4700621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4701621f50c3Smrg *ELF-32*) 4702621f50c3Smrg HPUX_IA64_MODE=32 4703621f50c3Smrg ;; 4704621f50c3Smrg *ELF-64*) 4705621f50c3Smrg HPUX_IA64_MODE=64 4706621f50c3Smrg ;; 4707621f50c3Smrg esac 4708621f50c3Smrg fi 4709621f50c3Smrg rm -rf conftest* 4710621f50c3Smrg ;; 4711621f50c3Smrg*-*-irix6*) 4712621f50c3Smrg # Find out what ABI is being produced by ac_compile, and set linker 4713621f50c3Smrg # options accordingly. 4714621f50c3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4715621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 4716621f50c3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 4717621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4718621f50c3Smrg *32-bit*) 4719621f50c3Smrg LD="${LD-ld} -melf32bsmip" 4720621f50c3Smrg ;; 4721621f50c3Smrg *N32*) 4722621f50c3Smrg LD="${LD-ld} -melf32bmipn32" 4723621f50c3Smrg ;; 4724621f50c3Smrg *64-bit*) 4725621f50c3Smrg LD="${LD-ld} -melf64bmip" 4726621f50c3Smrg ;; 4727621f50c3Smrg esac 4728621f50c3Smrg else 4729621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4730621f50c3Smrg *32-bit*) 4731621f50c3Smrg LD="${LD-ld} -32" 4732621f50c3Smrg ;; 4733621f50c3Smrg *N32*) 4734621f50c3Smrg LD="${LD-ld} -n32" 4735621f50c3Smrg ;; 4736621f50c3Smrg *64-bit*) 4737621f50c3Smrg LD="${LD-ld} -64" 4738621f50c3Smrg ;; 4739621f50c3Smrg esac 4740621f50c3Smrg fi 4741621f50c3Smrg fi 4742621f50c3Smrg rm -rf conftest* 4743621f50c3Smrg ;; 47443eed67faSmbalmer 4745621f50c3Smrgmips64*-*linux*) 4746621f50c3Smrg # Find out what ABI is being produced by ac_compile, and set linker 4747621f50c3Smrg # options accordingly. 4748621f50c3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4749621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 4750621f50c3Smrg emul=elf 4751621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4752621f50c3Smrg *32-bit*) 4753621f50c3Smrg emul="${emul}32" 4754621f50c3Smrg ;; 4755621f50c3Smrg *64-bit*) 4756621f50c3Smrg emul="${emul}64" 4757621f50c3Smrg ;; 4758621f50c3Smrg esac 4759621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4760621f50c3Smrg *MSB*) 4761621f50c3Smrg emul="${emul}btsmip" 4762621f50c3Smrg ;; 4763621f50c3Smrg *LSB*) 4764621f50c3Smrg emul="${emul}ltsmip" 4765621f50c3Smrg ;; 4766621f50c3Smrg esac 4767621f50c3Smrg case `$FILECMD conftest.$ac_objext` in 4768621f50c3Smrg *N32*) 4769621f50c3Smrg emul="${emul}n32" 4770621f50c3Smrg ;; 4771621f50c3Smrg esac 4772621f50c3Smrg LD="${LD-ld} -m $emul" 4773621f50c3Smrg fi 4774621f50c3Smrg rm -rf conftest* 4775621f50c3Smrg ;; 47763eed67faSmbalmer 4777621f50c3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4778621f50c3Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4779621f50c3Smrg # Find out what ABI is being produced by ac_compile, and set linker 4780621f50c3Smrg # options accordingly. Note that the listed cases only cover the 4781621f50c3Smrg # situations where additional linker options are needed (such as when 4782621f50c3Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4783621f50c3Smrg # vice versa); the common cases where no linker options are needed do 4784621f50c3Smrg # not appear in the list. 4785621f50c3Smrg echo 'int i;' > conftest.$ac_ext 4786621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 4787621f50c3Smrg case `$FILECMD conftest.o` in 4788621f50c3Smrg *32-bit*) 4789621f50c3Smrg case $host in 4790621f50c3Smrg x86_64-*kfreebsd*-gnu) 4791621f50c3Smrg LD="${LD-ld} -m elf_i386_fbsd" 4792621f50c3Smrg ;; 4793621f50c3Smrg x86_64-*linux*) 4794621f50c3Smrg case `$FILECMD conftest.o` in 4795621f50c3Smrg *x86-64*) 4796621f50c3Smrg LD="${LD-ld} -m elf32_x86_64" 4797621f50c3Smrg ;; 4798621f50c3Smrg *) 4799621f50c3Smrg LD="${LD-ld} -m elf_i386" 4800621f50c3Smrg ;; 4801621f50c3Smrg esac 4802621f50c3Smrg ;; 4803621f50c3Smrg powerpc64le-*linux*) 4804621f50c3Smrg LD="${LD-ld} -m elf32lppclinux" 4805621f50c3Smrg ;; 4806621f50c3Smrg powerpc64-*linux*) 4807621f50c3Smrg LD="${LD-ld} -m elf32ppclinux" 4808621f50c3Smrg ;; 4809621f50c3Smrg s390x-*linux*) 4810621f50c3Smrg LD="${LD-ld} -m elf_s390" 4811621f50c3Smrg ;; 4812621f50c3Smrg sparc64-*linux*) 4813621f50c3Smrg LD="${LD-ld} -m elf32_sparc" 4814621f50c3Smrg ;; 4815621f50c3Smrg esac 4816621f50c3Smrg ;; 4817621f50c3Smrg *64-bit*) 4818621f50c3Smrg case $host in 4819621f50c3Smrg x86_64-*kfreebsd*-gnu) 4820621f50c3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 4821621f50c3Smrg ;; 4822621f50c3Smrg x86_64-*linux*) 4823621f50c3Smrg LD="${LD-ld} -m elf_x86_64" 4824621f50c3Smrg ;; 4825621f50c3Smrg powerpcle-*linux*) 4826621f50c3Smrg LD="${LD-ld} -m elf64lppc" 4827621f50c3Smrg ;; 4828621f50c3Smrg powerpc-*linux*) 4829621f50c3Smrg LD="${LD-ld} -m elf64ppc" 4830621f50c3Smrg ;; 4831621f50c3Smrg s390*-*linux*|s390*-*tpf*) 4832621f50c3Smrg LD="${LD-ld} -m elf64_s390" 4833621f50c3Smrg ;; 4834621f50c3Smrg sparc*-*linux*) 4835621f50c3Smrg LD="${LD-ld} -m elf64_sparc" 4836621f50c3Smrg ;; 4837621f50c3Smrg esac 4838621f50c3Smrg ;; 4839621f50c3Smrg esac 4840621f50c3Smrg fi 4841621f50c3Smrg rm -rf conftest* 4842621f50c3Smrg ;; 4843dc407927Smrg 4844621f50c3Smrg*-*-sco3.2v5*) 4845621f50c3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4846621f50c3Smrg SAVE_CFLAGS=$CFLAGS 4847621f50c3Smrg CFLAGS="$CFLAGS -belf" 4848621f50c3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4849621f50c3Smrg [AC_LANG_PUSH(C) 4850621f50c3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4851621f50c3Smrg AC_LANG_POP]) 4852621f50c3Smrg if test yes != "$lt_cv_cc_needs_belf"; then 4853621f50c3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4854621f50c3Smrg CFLAGS=$SAVE_CFLAGS 4855621f50c3Smrg fi 4856621f50c3Smrg ;; 4857621f50c3Smrg*-*solaris*) 4858621f50c3Smrg # Find out what ABI is being produced by ac_compile, and set linker 4859621f50c3Smrg # options accordingly. 4860621f50c3Smrg echo 'int i;' > conftest.$ac_ext 4861621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 4862621f50c3Smrg case `$FILECMD conftest.o` in 4863621f50c3Smrg *64-bit*) 4864621f50c3Smrg case $lt_cv_prog_gnu_ld in 4865621f50c3Smrg yes*) 4866621f50c3Smrg case $host in 4867621f50c3Smrg i?86-*-solaris*|x86_64-*-solaris*) 4868621f50c3Smrg LD="${LD-ld} -m elf_x86_64" 48691a9c160aSmrg ;; 4870621f50c3Smrg sparc*-*-solaris*) 4871621f50c3Smrg LD="${LD-ld} -m elf64_sparc" 4872621f50c3Smrg ;; 4873621f50c3Smrg esac 4874621f50c3Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4875621f50c3Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4876621f50c3Smrg LD=${LD-ld}_sol2 4877dc407927Smrg fi 4878dc407927Smrg ;; 4879621f50c3Smrg *) 4880621f50c3Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4881621f50c3Smrg LD="${LD-ld} -64" 4882dc407927Smrg fi 4883dc407927Smrg ;; 4884621f50c3Smrg esac 4885621f50c3Smrg ;; 4886621f50c3Smrg esac 4887621f50c3Smrg fi 4888621f50c3Smrg rm -rf conftest* 4889621f50c3Smrg ;; 4890621f50c3Smrgesac 48913eed67faSmbalmer 4892621f50c3Smrgneed_locks=$enable_libtool_lock 4893621f50c3Smrg])# _LT_ENABLE_LOCK 4894dd0822caSmrg 4895dd0822caSmrg 4896621f50c3Smrg# _LT_PROG_AR 4897621f50c3Smrg# ----------- 4898621f50c3Smrgm4_defun([_LT_PROG_AR], 4899621f50c3Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4900621f50c3Smrg: ${AR=ar} 4901621f50c3Smrg_LT_DECL([], [AR], [1], [The archiver]) 49023eed67faSmbalmer 4903621f50c3Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4904621f50c3Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4905621f50c3Smrg# higher priority because thats what people were doing historically (setting 4906621f50c3Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4907621f50c3Smrg# variable obsoleted/removed. 49081a9c160aSmrg 4909621f50c3Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4910621f50c3Smrglt_ar_flags=$AR_FLAGS 4911621f50c3Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4912621f50c3Smrg 4913621f50c3Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4914621f50c3Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4915621f50c3Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4916621f50c3Smrg [Flags to create an archive]) 4917621f50c3Smrg 4918621f50c3SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4919621f50c3Smrg [lt_cv_ar_at_file=no 4920621f50c3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4921621f50c3Smrg [echo conftest.$ac_objext > conftest.lst 4922621f50c3Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4923621f50c3Smrg AC_TRY_EVAL([lt_ar_try]) 4924621f50c3Smrg if test 0 -eq "$ac_status"; then 4925621f50c3Smrg # Ensure the archiver fails upon bogus file names. 4926621f50c3Smrg rm -f conftest.$ac_objext libconftest.a 4927621f50c3Smrg AC_TRY_EVAL([lt_ar_try]) 4928621f50c3Smrg if test 0 -ne "$ac_status"; then 4929621f50c3Smrg lt_cv_ar_at_file=@ 4930621f50c3Smrg fi 4931621f50c3Smrg fi 4932621f50c3Smrg rm -f conftest.* libconftest.a 4933621f50c3Smrg ]) 4934621f50c3Smrg ]) 4935621f50c3Smrg 4936621f50c3Smrgif test no = "$lt_cv_ar_at_file"; then 4937621f50c3Smrg archiver_list_spec= 4938621f50c3Smrgelse 4939621f50c3Smrg archiver_list_spec=$lt_cv_ar_at_file 4940621f50c3Smrgfi 4941621f50c3Smrg_LT_DECL([], [archiver_list_spec], [1], 4942621f50c3Smrg [How to feed a file listing to the archiver]) 4943621f50c3Smrg])# _LT_PROG_AR 4944621f50c3Smrg 4945621f50c3Smrg 4946621f50c3Smrg# _LT_CMD_OLD_ARCHIVE 4947621f50c3Smrg# ------------------- 4948621f50c3Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4949621f50c3Smrg[_LT_PROG_AR 4950621f50c3Smrg 4951621f50c3SmrgAC_CHECK_TOOL(STRIP, strip, :) 4952621f50c3Smrgtest -z "$STRIP" && STRIP=: 4953621f50c3Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4954621f50c3Smrg 4955621f50c3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4956621f50c3Smrgtest -z "$RANLIB" && RANLIB=: 4957621f50c3Smrg_LT_DECL([], [RANLIB], [1], 4958621f50c3Smrg [Commands used to install an old-style archive]) 4959621f50c3Smrg 4960621f50c3Smrg# Determine commands to create old-style static archives. 4961621f50c3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4962621f50c3Smrgold_postinstall_cmds='chmod 644 $oldlib' 4963621f50c3Smrgold_postuninstall_cmds= 4964621f50c3Smrg 4965621f50c3Smrgif test -n "$RANLIB"; then 4966621f50c3Smrg case $host_os in 4967621f50c3Smrg bitrig* | openbsd*) 4968621f50c3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 4969621f50c3Smrg ;; 4970621f50c3Smrg *) 4971621f50c3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 4972621f50c3Smrg ;; 4973621f50c3Smrg esac 4974621f50c3Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4975621f50c3Smrgfi 4976621f50c3Smrg 4977621f50c3Smrgcase $host_os in 4978621f50c3Smrg darwin*) 4979621f50c3Smrg lock_old_archive_extraction=yes ;; 4980621f50c3Smrg *) 4981621f50c3Smrg lock_old_archive_extraction=no ;; 4982621f50c3Smrgesac 4983621f50c3Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4984621f50c3Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4985621f50c3Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4986621f50c3Smrg [Commands used to build an old-style archive]) 4987621f50c3Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 4988621f50c3Smrg [Whether to use a lock for old archive extraction]) 4989621f50c3Smrg])# _LT_CMD_OLD_ARCHIVE 4990621f50c3Smrg 4991621f50c3Smrg 4992621f50c3Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4993621f50c3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4994621f50c3Smrg# ---------------------------------------------------------------- 4995621f50c3Smrg# Check whether the given compiler option works 4996621f50c3SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4997621f50c3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4998621f50c3Smrgm4_require([_LT_DECL_SED])dnl 4999621f50c3SmrgAC_CACHE_CHECK([$1], [$2], 5000621f50c3Smrg [$2=no 5001621f50c3Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5002621f50c3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5003621f50c3Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5004621f50c3Smrg # Insert the option either (1) after the last *FLAGS variable, or 5005621f50c3Smrg # (2) before a word containing "conftest.", or (3) at the end. 5006621f50c3Smrg # Note that $ac_compile itself does not contain backslashes and begins 5007621f50c3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5008621f50c3Smrg # The option is referenced via a variable to avoid confusing sed. 5009621f50c3Smrg lt_compile=`echo "$ac_compile" | $SED \ 5010621f50c3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5011621f50c3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5012621f50c3Smrg -e 's:$: $lt_compiler_flag:'` 5013621f50c3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5014621f50c3Smrg (eval "$lt_compile" 2>conftest.err) 5015621f50c3Smrg ac_status=$? 5016621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5017621f50c3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5018621f50c3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 5019621f50c3Smrg # The compiler can only warn and ignore the option if not recognized 5020621f50c3Smrg # So say no if there are warnings other than the usual output. 5021621f50c3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5022621f50c3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5023621f50c3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5024621f50c3Smrg $2=yes 5025621f50c3Smrg fi 5026621f50c3Smrg fi 5027621f50c3Smrg $RM conftest* 5028621f50c3Smrg]) 50293eed67faSmbalmer 5030621f50c3Smrgif test yes = "[$]$2"; then 5031621f50c3Smrg m4_if([$5], , :, [$5]) 5032621f50c3Smrgelse 5033621f50c3Smrg m4_if([$6], , :, [$6]) 5034621f50c3Smrgfi 5035621f50c3Smrg])# _LT_COMPILER_OPTION 50363eed67faSmbalmer 5037621f50c3Smrg# Old name: 5038621f50c3SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5039621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 5040621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5041dc407927Smrg 50423eed67faSmbalmer 5043621f50c3Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5044621f50c3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5045621f50c3Smrg# ---------------------------------------------------- 5046621f50c3Smrg# Check whether the given linker option works 5047621f50c3SmrgAC_DEFUN([_LT_LINKER_OPTION], 5048621f50c3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5049621f50c3Smrgm4_require([_LT_DECL_SED])dnl 5050621f50c3SmrgAC_CACHE_CHECK([$1], [$2], 5051621f50c3Smrg [$2=no 5052621f50c3Smrg save_LDFLAGS=$LDFLAGS 5053621f50c3Smrg LDFLAGS="$LDFLAGS $3" 5054621f50c3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5055621f50c3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5056621f50c3Smrg # The linker can only warn and ignore the option if not recognized 5057621f50c3Smrg # So say no if there are warnings 5058621f50c3Smrg if test -s conftest.err; then 5059621f50c3Smrg # Append any errors to the config.log. 5060621f50c3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5061621f50c3Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5062621f50c3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5063621f50c3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 5064621f50c3Smrg $2=yes 5065621f50c3Smrg fi 5066621f50c3Smrg else 5067621f50c3Smrg $2=yes 5068621f50c3Smrg fi 5069621f50c3Smrg fi 5070621f50c3Smrg $RM -r conftest* 5071621f50c3Smrg LDFLAGS=$save_LDFLAGS 5072621f50c3Smrg]) 5073dd0822caSmrg 5074621f50c3Smrgif test yes = "[$]$2"; then 5075621f50c3Smrg m4_if([$4], , :, [$4]) 5076621f50c3Smrgelse 5077621f50c3Smrg m4_if([$5], , :, [$5]) 5078621f50c3Smrgfi 5079621f50c3Smrg])# _LT_LINKER_OPTION 5080dc407927Smrg 5081621f50c3Smrg# Old name: 5082621f50c3SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5083621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 5084621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50853eed67faSmbalmer 5086dc407927Smrg 5087621f50c3Smrg# LT_CMD_MAX_LEN 5088621f50c3Smrg#--------------- 5089621f50c3SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5090621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5091621f50c3Smrg# find the maximum length of command line arguments 5092621f50c3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5093621f50c3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5094621f50c3Smrg i=0 5095621f50c3Smrg teststring=ABCD 5096dc407927Smrg 5097621f50c3Smrg case $build_os in 5098621f50c3Smrg msdosdjgpp*) 5099621f50c3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5100621f50c3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5101621f50c3Smrg # during glob expansion). Even if it were fixed, the result of this 5102621f50c3Smrg # check would be larger than it should be. 5103621f50c3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5104621f50c3Smrg ;; 51053eed67faSmbalmer 5106621f50c3Smrg gnu*) 5107621f50c3Smrg # Under GNU Hurd, this test is not required because there is 5108621f50c3Smrg # no limit to the length of command line arguments. 5109621f50c3Smrg # Libtool will interpret -1 as no limit whatsoever 5110621f50c3Smrg lt_cv_sys_max_cmd_len=-1; 5111621f50c3Smrg ;; 5112dc407927Smrg 5113621f50c3Smrg cygwin* | mingw* | cegcc*) 5114621f50c3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5115621f50c3Smrg # about 5 minutes as the teststring grows exponentially. 5116621f50c3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5117621f50c3Smrg # you end up with a "frozen" computer, even though with patience 5118621f50c3Smrg # the test eventually succeeds (with a max line length of 256k). 5119621f50c3Smrg # Instead, let's just punt: use the minimum linelength reported by 5120621f50c3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5121621f50c3Smrg lt_cv_sys_max_cmd_len=8192; 5122621f50c3Smrg ;; 51233eed67faSmbalmer 5124621f50c3Smrg mint*) 5125621f50c3Smrg # On MiNT this can take a long time and run out of memory. 5126621f50c3Smrg lt_cv_sys_max_cmd_len=8192; 5127621f50c3Smrg ;; 5128dc407927Smrg 5129621f50c3Smrg amigaos*) 5130621f50c3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5131621f50c3Smrg # So we just punt and use a minimum line length of 8192. 5132621f50c3Smrg lt_cv_sys_max_cmd_len=8192; 5133621f50c3Smrg ;; 5134dc407927Smrg 5135621f50c3Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5136621f50c3Smrg # This has been around since 386BSD, at least. Likely further. 5137621f50c3Smrg if test -x /sbin/sysctl; then 5138621f50c3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5139621f50c3Smrg elif test -x /usr/sbin/sysctl; then 5140621f50c3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5141621f50c3Smrg else 5142621f50c3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5143621f50c3Smrg fi 5144621f50c3Smrg # And add a safety zone 5145621f50c3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5146621f50c3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5147621f50c3Smrg ;; 5148dc407927Smrg 5149621f50c3Smrg interix*) 5150621f50c3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5151621f50c3Smrg lt_cv_sys_max_cmd_len=196608 5152621f50c3Smrg ;; 51533eed67faSmbalmer 5154621f50c3Smrg os2*) 5155621f50c3Smrg # The test takes a long time on OS/2. 5156621f50c3Smrg lt_cv_sys_max_cmd_len=8192 5157621f50c3Smrg ;; 51583eed67faSmbalmer 5159621f50c3Smrg osf*) 5160621f50c3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5161621f50c3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5162621f50c3Smrg # nice to cause kernel panics so lets avoid the loop below. 5163621f50c3Smrg # First set a reasonable default. 5164621f50c3Smrg lt_cv_sys_max_cmd_len=16384 5165621f50c3Smrg # 5166621f50c3Smrg if test -x /sbin/sysconfig; then 5167621f50c3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5168621f50c3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5169621f50c3Smrg esac 5170621f50c3Smrg fi 5171621f50c3Smrg ;; 5172621f50c3Smrg sco3.2v5*) 5173621f50c3Smrg lt_cv_sys_max_cmd_len=102400 5174621f50c3Smrg ;; 5175621f50c3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5176621f50c3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5177621f50c3Smrg if test -n "$kargmax"; then 5178621f50c3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5179621f50c3Smrg else 5180621f50c3Smrg lt_cv_sys_max_cmd_len=32768 5181621f50c3Smrg fi 5182621f50c3Smrg ;; 5183621f50c3Smrg *) 5184621f50c3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5185621f50c3Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5186621f50c3Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5187621f50c3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5188621f50c3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5189621f50c3Smrg else 5190621f50c3Smrg # Make teststring a little bigger before we do anything with it. 5191621f50c3Smrg # a 1K string should be a reasonable start. 5192621f50c3Smrg for i in 1 2 3 4 5 6 7 8; do 5193621f50c3Smrg teststring=$teststring$teststring 5194621f50c3Smrg done 5195621f50c3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5196621f50c3Smrg # If test is not a shell built-in, we'll probably end up computing a 5197621f50c3Smrg # maximum length that is only half of the actual maximum length, but 5198621f50c3Smrg # we can't tell. 5199621f50c3Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5200621f50c3Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5201621f50c3Smrg test 17 != "$i" # 1/2 MB should be enough 5202621f50c3Smrg do 5203621f50c3Smrg i=`expr $i + 1` 5204621f50c3Smrg teststring=$teststring$teststring 5205621f50c3Smrg done 5206621f50c3Smrg # Only check the string length outside the loop. 5207621f50c3Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5208621f50c3Smrg teststring= 5209621f50c3Smrg # Add a significant safety factor because C++ compilers can tack on 5210621f50c3Smrg # massive amounts of additional arguments before passing them to the 5211621f50c3Smrg # linker. It appears as though 1/2 is a usable value. 5212621f50c3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5213621f50c3Smrg fi 5214621f50c3Smrg ;; 5215621f50c3Smrg esac 5216621f50c3Smrg]) 5217621f50c3Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5218621f50c3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5219621f50c3Smrgelse 5220621f50c3Smrg AC_MSG_RESULT(none) 5221621f50c3Smrgfi 5222621f50c3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5223621f50c3Smrg_LT_DECL([], [max_cmd_len], [0], 5224621f50c3Smrg [What is the maximum length of a command?]) 5225621f50c3Smrg])# LT_CMD_MAX_LEN 52263eed67faSmbalmer 5227621f50c3Smrg# Old name: 5228621f50c3SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5229621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 5230621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5231dc407927Smrg 5232dc407927Smrg 5233621f50c3Smrg# _LT_HEADER_DLFCN 5234621f50c3Smrg# ---------------- 5235621f50c3Smrgm4_defun([_LT_HEADER_DLFCN], 5236621f50c3Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5237621f50c3Smrg])# _LT_HEADER_DLFCN 52383eed67faSmbalmer 52393eed67faSmbalmer 5240621f50c3Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5241621f50c3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5242621f50c3Smrg# ---------------------------------------------------------------- 5243621f50c3Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5244621f50c3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5245621f50c3Smrgif test yes = "$cross_compiling"; then : 5246621f50c3Smrg [$4] 5247621f50c3Smrgelse 5248621f50c3Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5249621f50c3Smrg lt_status=$lt_dlunknown 5250621f50c3Smrg cat > conftest.$ac_ext <<_LT_EOF 5251621f50c3Smrg[#line $LINENO "configure" 5252621f50c3Smrg#include "confdefs.h" 52533eed67faSmbalmer 5254621f50c3Smrg#if HAVE_DLFCN_H 5255621f50c3Smrg#include <dlfcn.h> 5256621f50c3Smrg#endif 52573eed67faSmbalmer 5258621f50c3Smrg#include <stdio.h> 52593eed67faSmbalmer 5260621f50c3Smrg#ifdef RTLD_GLOBAL 5261621f50c3Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5262621f50c3Smrg#else 5263621f50c3Smrg# ifdef DL_GLOBAL 5264621f50c3Smrg# define LT_DLGLOBAL DL_GLOBAL 5265621f50c3Smrg# else 5266621f50c3Smrg# define LT_DLGLOBAL 0 5267621f50c3Smrg# endif 5268621f50c3Smrg#endif 52693eed67faSmbalmer 5270621f50c3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5271621f50c3Smrg find out it does not work in some platform. */ 5272621f50c3Smrg#ifndef LT_DLLAZY_OR_NOW 5273621f50c3Smrg# ifdef RTLD_LAZY 5274621f50c3Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5275621f50c3Smrg# else 5276621f50c3Smrg# ifdef DL_LAZY 5277621f50c3Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5278621f50c3Smrg# else 5279621f50c3Smrg# ifdef RTLD_NOW 5280621f50c3Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5281621f50c3Smrg# else 5282621f50c3Smrg# ifdef DL_NOW 5283621f50c3Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5284621f50c3Smrg# else 5285621f50c3Smrg# define LT_DLLAZY_OR_NOW 0 5286621f50c3Smrg# endif 5287621f50c3Smrg# endif 5288621f50c3Smrg# endif 5289621f50c3Smrg# endif 5290621f50c3Smrg#endif 52913eed67faSmbalmer 5292621f50c3Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5293621f50c3Smrg correspondingly for the symbols needed. */ 5294621f50c3Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5295621f50c3Smrgint fnord () __attribute__((visibility("default"))); 5296621f50c3Smrg#endif 5297dc407927Smrg 5298621f50c3Smrgint fnord () { return 42; } 5299621f50c3Smrgint main () 5300621f50c3Smrg{ 5301621f50c3Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5302621f50c3Smrg int status = $lt_dlunknown; 5303dc407927Smrg 5304621f50c3Smrg if (self) 5305621f50c3Smrg { 5306621f50c3Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5307621f50c3Smrg else 5308621f50c3Smrg { 5309621f50c3Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5310621f50c3Smrg else puts (dlerror ()); 5311621f50c3Smrg } 5312621f50c3Smrg /* dlclose (self); */ 5313621f50c3Smrg } 5314621f50c3Smrg else 5315621f50c3Smrg puts (dlerror ()); 5316dc407927Smrg 5317621f50c3Smrg return status; 5318621f50c3Smrg}] 5319621f50c3Smrg_LT_EOF 5320621f50c3Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5321621f50c3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5322621f50c3Smrg lt_status=$? 5323621f50c3Smrg case x$lt_status in 5324621f50c3Smrg x$lt_dlno_uscore) $1 ;; 5325621f50c3Smrg x$lt_dlneed_uscore) $2 ;; 5326621f50c3Smrg x$lt_dlunknown|x*) $3 ;; 5327621f50c3Smrg esac 5328621f50c3Smrg else : 5329621f50c3Smrg # compilation failed 5330621f50c3Smrg $3 5331621f50c3Smrg fi 5332621f50c3Smrgfi 5333621f50c3Smrgrm -fr conftest* 5334621f50c3Smrg])# _LT_TRY_DLOPEN_SELF 53353eed67faSmbalmer 53363eed67faSmbalmer 5337621f50c3Smrg# LT_SYS_DLOPEN_SELF 5338621f50c3Smrg# ------------------ 5339621f50c3SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5340621f50c3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5341621f50c3Smrgif test yes != "$enable_dlopen"; then 5342621f50c3Smrg enable_dlopen=unknown 5343621f50c3Smrg enable_dlopen_self=unknown 5344621f50c3Smrg enable_dlopen_self_static=unknown 5345621f50c3Smrgelse 5346621f50c3Smrg lt_cv_dlopen=no 5347621f50c3Smrg lt_cv_dlopen_libs= 5348dc407927Smrg 5349621f50c3Smrg case $host_os in 5350621f50c3Smrg beos*) 5351621f50c3Smrg lt_cv_dlopen=load_add_on 5352621f50c3Smrg lt_cv_dlopen_libs= 5353621f50c3Smrg lt_cv_dlopen_self=yes 5354621f50c3Smrg ;; 5355dc407927Smrg 5356621f50c3Smrg mingw* | pw32* | cegcc*) 5357621f50c3Smrg lt_cv_dlopen=LoadLibrary 5358621f50c3Smrg lt_cv_dlopen_libs= 5359621f50c3Smrg ;; 5360dc407927Smrg 5361621f50c3Smrg cygwin*) 5362621f50c3Smrg lt_cv_dlopen=dlopen 5363621f50c3Smrg lt_cv_dlopen_libs= 5364621f50c3Smrg ;; 53653eed67faSmbalmer 5366621f50c3Smrg darwin*) 5367621f50c3Smrg # if libdl is installed we need to link against it 5368621f50c3Smrg AC_CHECK_LIB([dl], [dlopen], 5369621f50c3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5370621f50c3Smrg lt_cv_dlopen=dyld 5371621f50c3Smrg lt_cv_dlopen_libs= 5372621f50c3Smrg lt_cv_dlopen_self=yes 5373621f50c3Smrg ]) 5374621f50c3Smrg ;; 53753eed67faSmbalmer 5376621f50c3Smrg tpf*) 5377621f50c3Smrg # Don't try to run any link tests for TPF. We know it's impossible 5378621f50c3Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5379621f50c3Smrg lt_cv_dlopen=dlopen 5380621f50c3Smrg lt_cv_dlopen_libs= 5381621f50c3Smrg lt_cv_dlopen_self=no 5382621f50c3Smrg ;; 53833eed67faSmbalmer 5384621f50c3Smrg *) 5385621f50c3Smrg AC_CHECK_FUNC([shl_load], 5386621f50c3Smrg [lt_cv_dlopen=shl_load], 5387621f50c3Smrg [AC_CHECK_LIB([dld], [shl_load], 5388621f50c3Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5389621f50c3Smrg [AC_CHECK_FUNC([dlopen], 5390621f50c3Smrg [lt_cv_dlopen=dlopen], 5391621f50c3Smrg [AC_CHECK_LIB([dl], [dlopen], 5392621f50c3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5393621f50c3Smrg [AC_CHECK_LIB([svld], [dlopen], 5394621f50c3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5395621f50c3Smrg [AC_CHECK_LIB([dld], [dld_link], 5396621f50c3Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5397621f50c3Smrg ]) 5398621f50c3Smrg ]) 5399621f50c3Smrg ]) 5400621f50c3Smrg ]) 5401621f50c3Smrg ]) 5402621f50c3Smrg ;; 5403621f50c3Smrg esac 5404dc407927Smrg 5405621f50c3Smrg if test no = "$lt_cv_dlopen"; then 5406621f50c3Smrg enable_dlopen=no 5407621f50c3Smrg else 5408621f50c3Smrg enable_dlopen=yes 5409621f50c3Smrg fi 54103eed67faSmbalmer 5411621f50c3Smrg case $lt_cv_dlopen in 5412621f50c3Smrg dlopen) 5413621f50c3Smrg save_CPPFLAGS=$CPPFLAGS 5414621f50c3Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 54153eed67faSmbalmer 5416621f50c3Smrg save_LDFLAGS=$LDFLAGS 5417621f50c3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 54183eed67faSmbalmer 5419621f50c3Smrg save_LIBS=$LIBS 5420621f50c3Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 5421dc407927Smrg 5422621f50c3Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 5423621f50c3Smrg lt_cv_dlopen_self, [dnl 5424621f50c3Smrg _LT_TRY_DLOPEN_SELF( 5425621f50c3Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5426621f50c3Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5427621f50c3Smrg ]) 5428dc407927Smrg 5429621f50c3Smrg if test yes = "$lt_cv_dlopen_self"; then 5430621f50c3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5431621f50c3Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5432621f50c3Smrg lt_cv_dlopen_self_static, [dnl 5433621f50c3Smrg _LT_TRY_DLOPEN_SELF( 5434621f50c3Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5435621f50c3Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5436621f50c3Smrg ]) 5437621f50c3Smrg fi 5438dc407927Smrg 5439621f50c3Smrg CPPFLAGS=$save_CPPFLAGS 5440621f50c3Smrg LDFLAGS=$save_LDFLAGS 5441621f50c3Smrg LIBS=$save_LIBS 5442621f50c3Smrg ;; 5443621f50c3Smrg esac 54443eed67faSmbalmer 5445621f50c3Smrg case $lt_cv_dlopen_self in 5446621f50c3Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5447621f50c3Smrg *) enable_dlopen_self=unknown ;; 5448621f50c3Smrg esac 54493eed67faSmbalmer 5450621f50c3Smrg case $lt_cv_dlopen_self_static in 5451621f50c3Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5452621f50c3Smrg *) enable_dlopen_self_static=unknown ;; 5453621f50c3Smrg esac 5454621f50c3Smrgfi 5455621f50c3Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5456621f50c3Smrg [Whether dlopen is supported]) 5457621f50c3Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5458621f50c3Smrg [Whether dlopen of programs is supported]) 5459621f50c3Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5460621f50c3Smrg [Whether dlopen of statically linked programs is supported]) 5461621f50c3Smrg])# LT_SYS_DLOPEN_SELF 54623eed67faSmbalmer 5463621f50c3Smrg# Old name: 5464621f50c3SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5465621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 5466621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 54673eed67faSmbalmer 54683eed67faSmbalmer 5469621f50c3Smrg# _LT_COMPILER_C_O([TAGNAME]) 5470621f50c3Smrg# --------------------------- 5471621f50c3Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 5472621f50c3Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5473621f50c3Smrgm4_defun([_LT_COMPILER_C_O], 5474621f50c3Smrg[m4_require([_LT_DECL_SED])dnl 5475621f50c3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5476621f50c3Smrgm4_require([_LT_TAG_COMPILER])dnl 5477621f50c3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5478621f50c3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5479621f50c3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5480621f50c3Smrg $RM -r conftest 2>/dev/null 5481621f50c3Smrg mkdir conftest 5482621f50c3Smrg cd conftest 5483621f50c3Smrg mkdir out 5484621f50c3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5485621f50c3Smrg 5486621f50c3Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5487621f50c3Smrg # Insert the option either (1) after the last *FLAGS variable, or 5488621f50c3Smrg # (2) before a word containing "conftest.", or (3) at the end. 5489621f50c3Smrg # Note that $ac_compile itself does not contain backslashes and begins 5490621f50c3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5491621f50c3Smrg lt_compile=`echo "$ac_compile" | $SED \ 5492621f50c3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5493621f50c3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5494621f50c3Smrg -e 's:$: $lt_compiler_flag:'` 5495621f50c3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5496621f50c3Smrg (eval "$lt_compile" 2>out/conftest.err) 5497621f50c3Smrg ac_status=$? 5498621f50c3Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5499621f50c3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5500621f50c3Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5501621f50c3Smrg then 5502621f50c3Smrg # The compiler can only warn and ignore the option if not recognized 5503621f50c3Smrg # So say no if there are warnings 5504621f50c3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5505621f50c3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5506621f50c3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5507621f50c3Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5508621f50c3Smrg fi 5509621f50c3Smrg fi 5510621f50c3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5511621f50c3Smrg $RM conftest* 5512621f50c3Smrg # SGI C++ compiler will create directory out/ii_files/ for 5513621f50c3Smrg # template instantiation 5514621f50c3Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5515621f50c3Smrg $RM out/* && rmdir out 5516621f50c3Smrg cd .. 5517621f50c3Smrg $RM -r conftest 5518621f50c3Smrg $RM conftest* 5519621f50c3Smrg]) 5520621f50c3Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5521621f50c3Smrg [Does compiler simultaneously support -c and -o options?]) 5522621f50c3Smrg])# _LT_COMPILER_C_O 55233eed67faSmbalmer 55243eed67faSmbalmer 5525621f50c3Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5526621f50c3Smrg# ---------------------------------- 5527621f50c3Smrg# Check to see if we can do hard links to lock some files if needed 5528621f50c3Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5529621f50c3Smrg[m4_require([_LT_ENABLE_LOCK])dnl 5530621f50c3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5531621f50c3Smrg_LT_COMPILER_C_O([$1]) 55323eed67faSmbalmer 5533621f50c3Smrghard_links=nottested 5534621f50c3Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5535621f50c3Smrg # do not overwrite the value of need_locks provided by the user 5536621f50c3Smrg AC_MSG_CHECKING([if we can lock with hard links]) 5537621f50c3Smrg hard_links=yes 5538621f50c3Smrg $RM conftest* 5539621f50c3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5540621f50c3Smrg touch conftest.a 5541621f50c3Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 5542621f50c3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5543621f50c3Smrg AC_MSG_RESULT([$hard_links]) 5544621f50c3Smrg if test no = "$hard_links"; then 5545621f50c3Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5546621f50c3Smrg need_locks=warn 5547621f50c3Smrg fi 5548621f50c3Smrgelse 5549621f50c3Smrg need_locks=no 5550621f50c3Smrgfi 5551621f50c3Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5552621f50c3Smrg])# _LT_COMPILER_FILE_LOCKS 5553dc407927Smrg 5554dc407927Smrg 5555621f50c3Smrg# _LT_CHECK_OBJDIR 5556621f50c3Smrg# ---------------- 5557621f50c3Smrgm4_defun([_LT_CHECK_OBJDIR], 5558621f50c3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5559621f50c3Smrg[rm -f .libs 2>/dev/null 5560621f50c3Smrgmkdir .libs 2>/dev/null 5561621f50c3Smrgif test -d .libs; then 5562621f50c3Smrg lt_cv_objdir=.libs 5563621f50c3Smrgelse 5564621f50c3Smrg # MS-DOS does not allow filenames that begin with a dot. 5565621f50c3Smrg lt_cv_objdir=_libs 5566621f50c3Smrgfi 5567621f50c3Smrgrmdir .libs 2>/dev/null]) 5568621f50c3Smrgobjdir=$lt_cv_objdir 5569621f50c3Smrg_LT_DECL([], [objdir], [0], 5570621f50c3Smrg [The name of the directory that contains temporary libtool files])dnl 5571621f50c3Smrgm4_pattern_allow([LT_OBJDIR])dnl 5572621f50c3SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5573621f50c3Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5574621f50c3Smrg])# _LT_CHECK_OBJDIR 5575dc407927Smrg 5576dc407927Smrg 5577621f50c3Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5578621f50c3Smrg# -------------------------------------- 5579621f50c3Smrg# Check hardcoding attributes. 5580621f50c3Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5581621f50c3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5582621f50c3Smrg_LT_TAGVAR(hardcode_action, $1)= 5583621f50c3Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5584621f50c3Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5585621f50c3Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 55863eed67faSmbalmer 5587621f50c3Smrg # We can hardcode non-existent directories. 5588621f50c3Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5589621f50c3Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5590621f50c3Smrg # have to relink, otherwise we might link with an installed library 5591621f50c3Smrg # when we should be linking with a yet-to-be-installed one 5592621f50c3Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5593621f50c3Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5594621f50c3Smrg # Linking always hardcodes the temporary library directory. 5595621f50c3Smrg _LT_TAGVAR(hardcode_action, $1)=relink 5596621f50c3Smrg else 5597621f50c3Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5598621f50c3Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 5599621f50c3Smrg fi 5600621f50c3Smrgelse 5601621f50c3Smrg # We cannot hardcode anything, or else we can only hardcode existing 5602621f50c3Smrg # directories. 5603621f50c3Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5604621f50c3Smrgfi 5605621f50c3SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 56063eed67faSmbalmer 5607621f50c3Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5608621f50c3Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5609621f50c3Smrg # Fast installation is not supported 5610621f50c3Smrg enable_fast_install=no 5611621f50c3Smrgelif test yes = "$shlibpath_overrides_runpath" || 5612621f50c3Smrg test no = "$enable_shared"; then 5613621f50c3Smrg # Fast installation is not necessary 5614621f50c3Smrg enable_fast_install=needless 5615621f50c3Smrgfi 5616621f50c3Smrg_LT_TAGDECL([], [hardcode_action], [0], 5617621f50c3Smrg [How to hardcode a shared library path into an executable]) 5618621f50c3Smrg])# _LT_LINKER_HARDCODE_LIBPATH 56193eed67faSmbalmer 5620dd0822caSmrg 5621621f50c3Smrg# _LT_CMD_STRIPLIB 5622621f50c3Smrg# ---------------- 5623621f50c3Smrgm4_defun([_LT_CMD_STRIPLIB], 5624621f50c3Smrg[m4_require([_LT_DECL_EGREP]) 5625621f50c3Smrgstriplib= 5626621f50c3Smrgold_striplib= 5627621f50c3SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5628621f50c3Smrgif test -z "$STRIP"; then 5629621f50c3Smrg AC_MSG_RESULT([no]) 5630621f50c3Smrgelse 5631621f50c3Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5632621f50c3Smrg old_striplib="$STRIP --strip-debug" 5633621f50c3Smrg striplib="$STRIP --strip-unneeded" 5634621f50c3Smrg AC_MSG_RESULT([yes]) 5635621f50c3Smrg else 5636621f50c3Smrg case $host_os in 5637621f50c3Smrg darwin*) 5638621f50c3Smrg # FIXME - insert some real tests, host_os isn't really good enough 5639621f50c3Smrg striplib="$STRIP -x" 5640621f50c3Smrg old_striplib="$STRIP -S" 5641621f50c3Smrg AC_MSG_RESULT([yes]) 5642621f50c3Smrg ;; 5643621f50c3Smrg freebsd*) 5644621f50c3Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5645621f50c3Smrg old_striplib="$STRIP --strip-debug" 5646621f50c3Smrg striplib="$STRIP --strip-unneeded" 5647621f50c3Smrg AC_MSG_RESULT([yes]) 5648621f50c3Smrg else 5649621f50c3Smrg AC_MSG_RESULT([no]) 5650621f50c3Smrg fi 5651621f50c3Smrg ;; 5652621f50c3Smrg *) 5653621f50c3Smrg AC_MSG_RESULT([no]) 5654621f50c3Smrg ;; 5655621f50c3Smrg esac 5656621f50c3Smrg fi 5657621f50c3Smrgfi 5658621f50c3Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5659621f50c3Smrg_LT_DECL([], [striplib], [1]) 5660621f50c3Smrg])# _LT_CMD_STRIPLIB 56611a9c160aSmrg 56623eed67faSmbalmer 5663621f50c3Smrg# _LT_PREPARE_MUNGE_PATH_LIST 5664621f50c3Smrg# --------------------------- 5665621f50c3Smrg# Make sure func_munge_path_list() is defined correctly. 5666621f50c3Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5667621f50c3Smrg[[# func_munge_path_list VARIABLE PATH 5668621f50c3Smrg# ----------------------------------- 5669621f50c3Smrg# VARIABLE is name of variable containing _space_ separated list of 5670621f50c3Smrg# directories to be munged by the contents of PATH, which is string 5671621f50c3Smrg# having a format: 5672621f50c3Smrg# "DIR[:DIR]:" 5673621f50c3Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 5674621f50c3Smrg# ":DIR[:DIR]" 5675621f50c3Smrg# string "DIR[ DIR]" will be appended to VARIABLE 5676621f50c3Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5677621f50c3Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5678621f50c3Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 5679621f50c3Smrg# "DIR[:DIR]" 5680621f50c3Smrg# VARIABLE will be replaced by "DIR[ DIR]" 5681621f50c3Smrgfunc_munge_path_list () 5682621f50c3Smrg{ 5683621f50c3Smrg case x@S|@2 in 5684621f50c3Smrg x) 5685621f50c3Smrg ;; 5686621f50c3Smrg *:) 5687621f50c3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5688621f50c3Smrg ;; 5689621f50c3Smrg x:*) 5690621f50c3Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5691621f50c3Smrg ;; 5692621f50c3Smrg *::*) 5693621f50c3Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5694621f50c3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5695621f50c3Smrg ;; 5696621f50c3Smrg *) 5697621f50c3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5698621f50c3Smrg ;; 5699621f50c3Smrg esac 570075cbef56Smrg} 5701621f50c3Smrg]])# _LT_PREPARE_PATH_LIST 57023eed67faSmbalmer 57033eed67faSmbalmer 5704621f50c3Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5705621f50c3Smrg# ----------------------------- 5706621f50c3Smrg# PORTME Fill in your ld.so characteristics 5707621f50c3Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5708621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5709621f50c3Smrgm4_require([_LT_DECL_EGREP])dnl 5710621f50c3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5711621f50c3Smrgm4_require([_LT_DECL_OBJDUMP])dnl 5712621f50c3Smrgm4_require([_LT_DECL_SED])dnl 5713621f50c3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5714621f50c3Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5715621f50c3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5716621f50c3Smrgm4_if([$1], 5717621f50c3Smrg [], [ 5718621f50c3Smrgif test yes = "$GCC"; then 5719621f50c3Smrg case $host_os in 5720621f50c3Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5721621f50c3Smrg *) lt_awk_arg='/^libraries:/' ;; 5722621f50c3Smrg esac 5723621f50c3Smrg case $host_os in 5724621f50c3Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5725621f50c3Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5726621f50c3Smrg esac 5727621f50c3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5728621f50c3Smrg case $lt_search_path_spec in 5729621f50c3Smrg *\;*) 5730621f50c3Smrg # if the path contains ";" then we assume it to be the separator 5731621f50c3Smrg # otherwise default to the standard path separator (i.e. ":") - it is 5732621f50c3Smrg # assumed that no part of a normal pathname contains ";" but that should 5733621f50c3Smrg # okay in the real world where ";" in dirpaths is itself problematic. 5734621f50c3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5735621f50c3Smrg ;; 5736621f50c3Smrg *) 5737621f50c3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5738621f50c3Smrg ;; 5739621f50c3Smrg esac 5740621f50c3Smrg # Ok, now we have the path, separated by spaces, we can step through it 5741621f50c3Smrg # and add multilib dir if necessary... 5742621f50c3Smrg lt_tmp_lt_search_path_spec= 5743621f50c3Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5744621f50c3Smrg # ...but if some path component already ends with the multilib dir we assume 5745621f50c3Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5746621f50c3Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5747621f50c3Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5748621f50c3Smrg lt_multi_os_dir= 5749621f50c3Smrg ;; 5750621f50c3Smrg esac 5751621f50c3Smrg for lt_sys_path in $lt_search_path_spec; do 5752621f50c3Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5753621f50c3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5754621f50c3Smrg elif test -n "$lt_multi_os_dir"; then 5755621f50c3Smrg test -d "$lt_sys_path" && \ 5756621f50c3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5757621f50c3Smrg fi 5758621f50c3Smrg done 5759621f50c3Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5760621f50c3SmrgBEGIN {RS = " "; FS = "/|\n";} { 5761621f50c3Smrg lt_foo = ""; 5762621f50c3Smrg lt_count = 0; 5763621f50c3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 5764621f50c3Smrg if ($lt_i != "" && $lt_i != ".") { 5765621f50c3Smrg if ($lt_i == "..") { 5766621f50c3Smrg lt_count++; 5767621f50c3Smrg } else { 5768621f50c3Smrg if (lt_count == 0) { 5769621f50c3Smrg lt_foo = "/" $lt_i lt_foo; 5770621f50c3Smrg } else { 5771621f50c3Smrg lt_count--; 5772621f50c3Smrg } 5773621f50c3Smrg } 5774621f50c3Smrg } 5775621f50c3Smrg } 5776621f50c3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5777621f50c3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5778621f50c3Smrg}'` 5779621f50c3Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 5780621f50c3Smrg # for these hosts. 5781621f50c3Smrg case $host_os in 5782621f50c3Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5783621f50c3Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5784621f50c3Smrg esac 5785621f50c3Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5786621f50c3Smrgelse 5787621f50c3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5788621f50c3Smrgfi]) 5789621f50c3Smrglibrary_names_spec= 5790621f50c3Smrglibname_spec='lib$name' 5791621f50c3Smrgsoname_spec= 5792621f50c3Smrgshrext_cmds=.so 5793621f50c3Smrgpostinstall_cmds= 5794621f50c3Smrgpostuninstall_cmds= 5795621f50c3Smrgfinish_cmds= 5796621f50c3Smrgfinish_eval= 5797621f50c3Smrgshlibpath_var= 5798621f50c3Smrgshlibpath_overrides_runpath=unknown 5799621f50c3Smrgversion_type=none 5800621f50c3Smrgdynamic_linker="$host_os ld.so" 5801621f50c3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5802621f50c3Smrgneed_lib_prefix=unknown 5803621f50c3Smrghardcode_into_libs=no 58043eed67faSmbalmer 5805621f50c3Smrg# when you set need_version to no, make sure it does not cause -set_version 5806621f50c3Smrg# flags to be left without arguments 5807621f50c3Smrgneed_version=unknown 58083eed67faSmbalmer 5809621f50c3SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5810621f50c3Smrg[User-defined run-time library search path.]) 58113eed67faSmbalmer 5812621f50c3Smrgcase $host_os in 5813621f50c3Smrgaix3*) 5814621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 5815621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5816621f50c3Smrg shlibpath_var=LIBPATH 58173eed67faSmbalmer 5818621f50c3Smrg # AIX 3 has no versioning support, so we append a major version to the name. 5819621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 5820621f50c3Smrg ;; 58213eed67faSmbalmer 5822621f50c3Smrgaix[[4-9]]*) 5823621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 5824621f50c3Smrg need_lib_prefix=no 5825621f50c3Smrg need_version=no 5826621f50c3Smrg hardcode_into_libs=yes 5827621f50c3Smrg if test ia64 = "$host_cpu"; then 5828621f50c3Smrg # AIX 5 supports IA64 5829621f50c3Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5830621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 5831621f50c3Smrg else 5832621f50c3Smrg # With GCC up to 2.95.x, collect2 would create an import file 5833621f50c3Smrg # for dependence libraries. The import file would start with 5834621f50c3Smrg # the line '#! .'. This would cause the generated library to 5835621f50c3Smrg # depend on '.', always an invalid library. This was fixed in 5836621f50c3Smrg # development snapshots of GCC prior to 3.0. 5837621f50c3Smrg case $host_os in 5838621f50c3Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5839621f50c3Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5840621f50c3Smrg echo ' yes ' 5841621f50c3Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5842621f50c3Smrg : 5843621f50c3Smrg else 5844621f50c3Smrg can_build_shared=no 5845621f50c3Smrg fi 5846621f50c3Smrg ;; 5847621f50c3Smrg esac 5848621f50c3Smrg # Using Import Files as archive members, it is possible to support 5849621f50c3Smrg # filename-based versioning of shared library archives on AIX. While 5850621f50c3Smrg # this would work for both with and without runtime linking, it will 5851621f50c3Smrg # prevent static linking of such archives. So we do filename-based 5852621f50c3Smrg # shared library versioning with .so extension only, which is used 5853621f50c3Smrg # when both runtime linking and shared linking is enabled. 5854621f50c3Smrg # Unfortunately, runtime linking may impact performance, so we do 5855621f50c3Smrg # not want this to be the default eventually. Also, we use the 5856621f50c3Smrg # versioned .so libs for executables only if there is the -brtl 5857621f50c3Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5858621f50c3Smrg # To allow for filename-based versioning support, we need to create 5859621f50c3Smrg # libNAME.so.V as an archive file, containing: 5860621f50c3Smrg # *) an Import File, referring to the versioned filename of the 5861621f50c3Smrg # archive as well as the shared archive member, telling the 5862621f50c3Smrg # bitwidth (32 or 64) of that shared object, and providing the 5863621f50c3Smrg # list of exported symbols of that shared object, eventually 5864621f50c3Smrg # decorated with the 'weak' keyword 5865621f50c3Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5866621f50c3Smrg # it being seen by the linker. 5867621f50c3Smrg # At run time we better use the real file rather than another symlink, 5868621f50c3Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 58693eed67faSmbalmer 5870621f50c3Smrg case $with_aix_soname,$aix_use_runtimelinking in 5871621f50c3Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5872621f50c3Smrg # soname into executable. Probably we can add versioning support to 5873621f50c3Smrg # collect2, so additional links can be useful in future. 5874621f50c3Smrg aix,yes) # traditional libtool 5875621f50c3Smrg dynamic_linker='AIX unversionable lib.so' 5876621f50c3Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5877621f50c3Smrg # instead of lib<name>.a to let people know that these are not 5878621f50c3Smrg # typical AIX shared libraries. 5879621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5880621f50c3Smrg ;; 5881621f50c3Smrg aix,no) # traditional AIX only 5882621f50c3Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5883621f50c3Smrg # We preserve .a as extension for shared libraries through AIX4.2 5884621f50c3Smrg # and later when we are not doing run time linking. 5885621f50c3Smrg library_names_spec='$libname$release.a $libname.a' 5886621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 5887621f50c3Smrg ;; 5888621f50c3Smrg svr4,*) # full svr4 only 5889621f50c3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5890621f50c3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5891621f50c3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5892621f50c3Smrg shlibpath_overrides_runpath=yes 5893621f50c3Smrg ;; 5894621f50c3Smrg *,yes) # both, prefer svr4 5895621f50c3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5896621f50c3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5897621f50c3Smrg # unpreferred sharedlib libNAME.a needs extra handling 5898621f50c3Smrg 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"' 5899621f50c3Smrg 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"' 5900621f50c3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5901621f50c3Smrg shlibpath_overrides_runpath=yes 5902621f50c3Smrg ;; 5903621f50c3Smrg *,no) # both, prefer aix 5904621f50c3Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5905621f50c3Smrg library_names_spec='$libname$release.a $libname.a' 5906621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 5907621f50c3Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5908621f50c3Smrg 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)' 5909621f50c3Smrg 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"' 5910621f50c3Smrg ;; 5911dc407927Smrg esac 5912621f50c3Smrg shlibpath_var=LIBPATH 5913621f50c3Smrg fi 5914621f50c3Smrg ;; 59153eed67faSmbalmer 5916621f50c3Smrgamigaos*) 5917621f50c3Smrg case $host_cpu in 5918621f50c3Smrg powerpc) 5919621f50c3Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5920621f50c3Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5921621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5922621f50c3Smrg ;; 5923621f50c3Smrg m68k) 5924621f50c3Smrg library_names_spec='$libname.ixlibrary $libname.a' 5925621f50c3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5926621f50c3Smrg 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' 5927621f50c3Smrg ;; 5928621f50c3Smrg esac 5929621f50c3Smrg ;; 59303eed67faSmbalmer 5931621f50c3Smrgbeos*) 5932621f50c3Smrg library_names_spec='$libname$shared_ext' 5933621f50c3Smrg dynamic_linker="$host_os ld.so" 5934621f50c3Smrg shlibpath_var=LIBRARY_PATH 5935621f50c3Smrg ;; 59363eed67faSmbalmer 5937621f50c3Smrgbsdi[[45]]*) 5938621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 5939621f50c3Smrg need_version=no 5940621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5941621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 5942621f50c3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5943621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 5944621f50c3Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5945621f50c3Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5946621f50c3Smrg # the default ld.so.conf also contains /usr/contrib/lib and 5947621f50c3Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5948621f50c3Smrg # libtool to hard-code these into programs 5949dc407927Smrg ;; 59503eed67faSmbalmer 5951621f50c3Smrgcygwin* | mingw* | pw32* | cegcc*) 5952621f50c3Smrg version_type=windows 5953621f50c3Smrg shrext_cmds=.dll 5954621f50c3Smrg need_version=no 5955621f50c3Smrg need_lib_prefix=no 5956dc407927Smrg 5957621f50c3Smrg case $GCC,$cc_basename in 5958621f50c3Smrg yes,*) 5959621f50c3Smrg # gcc 5960621f50c3Smrg library_names_spec='$libname.dll.a' 5961621f50c3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5962621f50c3Smrg postinstall_cmds='base_file=`basename \$file`~ 5963621f50c3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5964621f50c3Smrg dldir=$destdir/`dirname \$dlpath`~ 5965621f50c3Smrg test -d \$dldir || mkdir -p \$dldir~ 5966621f50c3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 5967621f50c3Smrg chmod a+x \$dldir/$dlname~ 5968621f50c3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5969621f50c3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5970621f50c3Smrg fi' 5971621f50c3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5972621f50c3Smrg dlpath=$dir/\$dldll~ 5973621f50c3Smrg $RM \$dlpath' 5974621f50c3Smrg shlibpath_overrides_runpath=yes 5975dc407927Smrg 5976621f50c3Smrg case $host_os in 5977621f50c3Smrg cygwin*) 5978621f50c3Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5979621f50c3Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5980621f50c3Smrgm4_if([$1], [],[ 5981621f50c3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5982621f50c3Smrg ;; 5983621f50c3Smrg mingw* | cegcc*) 5984621f50c3Smrg # MinGW DLLs use traditional 'lib' prefix 5985621f50c3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5986621f50c3Smrg ;; 5987621f50c3Smrg pw32*) 5988621f50c3Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5989621f50c3Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5990621f50c3Smrg ;; 5991621f50c3Smrg esac 5992621f50c3Smrg dynamic_linker='Win32 ld.exe' 5993621f50c3Smrg ;; 59943eed67faSmbalmer 5995621f50c3Smrg *,cl* | *,icl*) 5996621f50c3Smrg # Native MSVC or ICC 5997621f50c3Smrg libname_spec='$name' 5998621f50c3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5999621f50c3Smrg library_names_spec='$libname.dll.lib' 60003eed67faSmbalmer 6001621f50c3Smrg case $build_os in 6002621f50c3Smrg mingw*) 6003621f50c3Smrg sys_lib_search_path_spec= 6004621f50c3Smrg lt_save_ifs=$IFS 6005621f50c3Smrg IFS=';' 6006621f50c3Smrg for lt_path in $LIB 6007621f50c3Smrg do 6008621f50c3Smrg IFS=$lt_save_ifs 6009621f50c3Smrg # Let DOS variable expansion print the short 8.3 style file name. 6010621f50c3Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6011621f50c3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6012621f50c3Smrg done 6013621f50c3Smrg IFS=$lt_save_ifs 6014621f50c3Smrg # Convert to MSYS style. 6015621f50c3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6016621f50c3Smrg ;; 6017621f50c3Smrg cygwin*) 6018621f50c3Smrg # Convert to unix form, then to dos form, then back to unix form 6019621f50c3Smrg # but this time dos style (no spaces!) so that the unix form looks 6020621f50c3Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 6021621f50c3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6022621f50c3Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6023621f50c3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6024621f50c3Smrg ;; 6025621f50c3Smrg *) 6026621f50c3Smrg sys_lib_search_path_spec=$LIB 6027621f50c3Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6028621f50c3Smrg # It is most probably a Windows format PATH. 6029621f50c3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6030621f50c3Smrg else 6031621f50c3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6032621f50c3Smrg fi 6033621f50c3Smrg # FIXME: find the short name or the path components, as spaces are 6034621f50c3Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 6035621f50c3Smrg ;; 6036621f50c3Smrg esac 60373eed67faSmbalmer 6038621f50c3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6039621f50c3Smrg postinstall_cmds='base_file=`basename \$file`~ 6040621f50c3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6041621f50c3Smrg dldir=$destdir/`dirname \$dlpath`~ 6042621f50c3Smrg test -d \$dldir || mkdir -p \$dldir~ 6043621f50c3Smrg $install_prog $dir/$dlname \$dldir/$dlname' 6044621f50c3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6045621f50c3Smrg dlpath=$dir/\$dldll~ 6046621f50c3Smrg $RM \$dlpath' 6047621f50c3Smrg shlibpath_overrides_runpath=yes 6048621f50c3Smrg dynamic_linker='Win32 link.exe' 6049621f50c3Smrg ;; 6050621f50c3Smrg 6051621f50c3Smrg *) 6052621f50c3Smrg # Assume MSVC and ICC wrapper 6053621f50c3Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6054621f50c3Smrg dynamic_linker='Win32 ld.exe' 6055621f50c3Smrg ;; 6056621f50c3Smrg esac 6057621f50c3Smrg # FIXME: first we should search . and the directory the executable is in 6058621f50c3Smrg shlibpath_var=PATH 6059621f50c3Smrg ;; 6060dc407927Smrg 6061621f50c3Smrgdarwin* | rhapsody*) 6062621f50c3Smrg dynamic_linker="$host_os dyld" 6063621f50c3Smrg version_type=darwin 6064621f50c3Smrg need_lib_prefix=no 6065621f50c3Smrg need_version=no 6066621f50c3Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6067621f50c3Smrg soname_spec='$libname$release$major$shared_ext' 6068621f50c3Smrg shlibpath_overrides_runpath=yes 6069621f50c3Smrg shlibpath_var=DYLD_LIBRARY_PATH 6070621f50c3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6071621f50c3Smrgm4_if([$1], [],[ 6072621f50c3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6073621f50c3Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6074621f50c3Smrg ;; 60753eed67faSmbalmer 6076621f50c3Smrgdgux*) 6077621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6078621f50c3Smrg need_lib_prefix=no 6079621f50c3Smrg need_version=no 6080621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6081621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6082621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6083621f50c3Smrg ;; 60843eed67faSmbalmer 6085621f50c3Smrgfreebsd* | dragonfly* | midnightbsd*) 6086621f50c3Smrg # DragonFly does not have aout. When/if they implement a new 6087621f50c3Smrg # versioning mechanism, adjust this. 6088621f50c3Smrg if test -x /usr/bin/objformat; then 6089621f50c3Smrg objformat=`/usr/bin/objformat` 6090621f50c3Smrg else 6091621f50c3Smrg case $host_os in 6092621f50c3Smrg freebsd[[23]].*) objformat=aout ;; 6093621f50c3Smrg *) objformat=elf ;; 6094621f50c3Smrg esac 6095621f50c3Smrg fi 6096621f50c3Smrg version_type=freebsd-$objformat 6097621f50c3Smrg case $version_type in 6098621f50c3Smrg freebsd-elf*) 6099621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6100621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6101621f50c3Smrg need_version=no 6102621f50c3Smrg need_lib_prefix=no 6103621f50c3Smrg ;; 6104621f50c3Smrg freebsd-*) 6105621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6106621f50c3Smrg need_version=yes 6107621f50c3Smrg ;; 6108621f50c3Smrg esac 6109621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6110621f50c3Smrg case $host_os in 6111621f50c3Smrg freebsd2.*) 6112621f50c3Smrg shlibpath_overrides_runpath=yes 6113621f50c3Smrg ;; 6114621f50c3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6115621f50c3Smrg shlibpath_overrides_runpath=yes 6116621f50c3Smrg hardcode_into_libs=yes 6117621f50c3Smrg ;; 6118621f50c3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6119621f50c3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6120621f50c3Smrg shlibpath_overrides_runpath=no 6121621f50c3Smrg hardcode_into_libs=yes 6122621f50c3Smrg ;; 6123621f50c3Smrg *) # from 4.6 on, and DragonFly 6124621f50c3Smrg shlibpath_overrides_runpath=yes 6125621f50c3Smrg hardcode_into_libs=yes 6126621f50c3Smrg ;; 6127621f50c3Smrg esac 6128621f50c3Smrg ;; 61293eed67faSmbalmer 6130621f50c3Smrghaiku*) 6131621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6132621f50c3Smrg need_lib_prefix=no 6133621f50c3Smrg need_version=no 6134621f50c3Smrg dynamic_linker="$host_os runtime_loader" 6135621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6136621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6137621f50c3Smrg shlibpath_var=LIBRARY_PATH 6138621f50c3Smrg shlibpath_overrides_runpath=no 6139621f50c3Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6140621f50c3Smrg hardcode_into_libs=yes 6141621f50c3Smrg ;; 61423eed67faSmbalmer 6143621f50c3Smrghpux9* | hpux10* | hpux11*) 6144621f50c3Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6145621f50c3Smrg # link against other versions. 6146621f50c3Smrg version_type=sunos 6147621f50c3Smrg need_lib_prefix=no 6148621f50c3Smrg need_version=no 6149621f50c3Smrg case $host_cpu in 6150621f50c3Smrg ia64*) 6151621f50c3Smrg shrext_cmds='.so' 6152621f50c3Smrg hardcode_into_libs=yes 6153621f50c3Smrg dynamic_linker="$host_os dld.so" 6154621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6155621f50c3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6156621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6157621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6158621f50c3Smrg if test 32 = "$HPUX_IA64_MODE"; then 6159621f50c3Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6160621f50c3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6161621f50c3Smrg else 6162621f50c3Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6163621f50c3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6164621f50c3Smrg fi 6165621f50c3Smrg ;; 6166621f50c3Smrg hppa*64*) 6167621f50c3Smrg shrext_cmds='.sl' 6168621f50c3Smrg hardcode_into_libs=yes 6169621f50c3Smrg dynamic_linker="$host_os dld.sl" 6170621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6171621f50c3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6172621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6173621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6174621f50c3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6175621f50c3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6176621f50c3Smrg ;; 6177621f50c3Smrg *) 6178621f50c3Smrg shrext_cmds='.sl' 6179621f50c3Smrg dynamic_linker="$host_os dld.sl" 6180621f50c3Smrg shlibpath_var=SHLIB_PATH 6181621f50c3Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6182621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6183621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6184621f50c3Smrg ;; 6185621f50c3Smrg esac 6186621f50c3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6187621f50c3Smrg postinstall_cmds='chmod 555 $lib' 6188621f50c3Smrg # or fails outright, so override atomically: 6189621f50c3Smrg install_override_mode=555 6190621f50c3Smrg ;; 61913eed67faSmbalmer 6192621f50c3Smrginterix[[3-9]]*) 6193621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6194621f50c3Smrg need_lib_prefix=no 6195621f50c3Smrg need_version=no 6196621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6197621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6198621f50c3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6199621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6200621f50c3Smrg shlibpath_overrides_runpath=no 6201621f50c3Smrg hardcode_into_libs=yes 6202621f50c3Smrg ;; 62033eed67faSmbalmer 6204621f50c3Smrgirix5* | irix6* | nonstopux*) 6205621f50c3Smrg case $host_os in 6206621f50c3Smrg nonstopux*) version_type=nonstopux ;; 6207621f50c3Smrg *) 6208621f50c3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6209621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6210621f50c3Smrg else 6211621f50c3Smrg version_type=irix 6212621f50c3Smrg fi ;; 6213621f50c3Smrg esac 6214621f50c3Smrg need_lib_prefix=no 6215621f50c3Smrg need_version=no 6216621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6217621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6218621f50c3Smrg case $host_os in 6219621f50c3Smrg irix5* | nonstopux*) 6220621f50c3Smrg libsuff= shlibsuff= 6221621f50c3Smrg ;; 6222621f50c3Smrg *) 6223621f50c3Smrg case $LD in # libtool.m4 will add one of these switches to LD 6224621f50c3Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6225621f50c3Smrg libsuff= shlibsuff= libmagic=32-bit;; 6226621f50c3Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6227621f50c3Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6228621f50c3Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6229621f50c3Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6230621f50c3Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6231dc407927Smrg esac 6232621f50c3Smrg ;; 6233621f50c3Smrg esac 6234621f50c3Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6235621f50c3Smrg shlibpath_overrides_runpath=no 6236621f50c3Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6237621f50c3Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6238621f50c3Smrg hardcode_into_libs=yes 6239621f50c3Smrg ;; 6240dc407927Smrg 6241621f50c3Smrg# No shared lib support for Linux oldld, aout, or coff. 6242621f50c3Smrglinux*oldld* | linux*aout* | linux*coff*) 6243621f50c3Smrg dynamic_linker=no 6244621f50c3Smrg ;; 6245dc407927Smrg 6246621f50c3Smrglinux*android*) 6247621f50c3Smrg version_type=none # Android doesn't support versioned libraries. 6248621f50c3Smrg need_lib_prefix=no 6249621f50c3Smrg need_version=no 6250621f50c3Smrg library_names_spec='$libname$release$shared_ext' 6251621f50c3Smrg soname_spec='$libname$release$shared_ext' 6252621f50c3Smrg finish_cmds= 6253621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6254621f50c3Smrg shlibpath_overrides_runpath=yes 6255dc407927Smrg 6256621f50c3Smrg # This implies no fast_install, which is unacceptable. 6257621f50c3Smrg # Some rework will be needed to allow for fast_install 6258621f50c3Smrg # before this can be enabled. 6259621f50c3Smrg hardcode_into_libs=yes 6260dc407927Smrg 6261621f50c3Smrg dynamic_linker='Android linker' 6262621f50c3Smrg # Don't embed -rpath directories since the linker doesn't support them. 6263621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6264621f50c3Smrg ;; 6265dc407927Smrg 6266621f50c3Smrg# This must be glibc/ELF. 6267621f50c3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6268621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6269621f50c3Smrg need_lib_prefix=no 6270621f50c3Smrg need_version=no 6271621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6272621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6273621f50c3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6274621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6275621f50c3Smrg shlibpath_overrides_runpath=no 62763eed67faSmbalmer 6277621f50c3Smrg # Some binutils ld are patched to set DT_RUNPATH 6278621f50c3Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6279621f50c3Smrg [lt_cv_shlibpath_overrides_runpath=no 6280621f50c3Smrg save_LDFLAGS=$LDFLAGS 6281621f50c3Smrg save_libdir=$libdir 6282621f50c3Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6283621f50c3Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6284621f50c3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6285621f50c3Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6286621f50c3Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6287621f50c3Smrg LDFLAGS=$save_LDFLAGS 6288621f50c3Smrg libdir=$save_libdir 6289621f50c3Smrg ]) 6290621f50c3Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 62913eed67faSmbalmer 6292621f50c3Smrg # This implies no fast_install, which is unacceptable. 6293621f50c3Smrg # Some rework will be needed to allow for fast_install 6294621f50c3Smrg # before this can be enabled. 6295621f50c3Smrg hardcode_into_libs=yes 62963eed67faSmbalmer 6297621f50c3Smrg # Ideally, we could use ldconfig to report *all* directores which are 6298621f50c3Smrg # searched for libraries, however this is still not possible. Aside from not 6299621f50c3Smrg # being certain /sbin/ldconfig is available, command 6300621f50c3Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6301621f50c3Smrg # even though it is searched at run-time. Try to do the best guess by 6302621f50c3Smrg # appending ld.so.conf contents (and includes) to the search path. 6303621f50c3Smrg if test -f /etc/ld.so.conf; then 6304621f50c3Smrg 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' ' '` 6305621f50c3Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6306621f50c3Smrg fi 6307dd0822caSmrg 6308621f50c3Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6309621f50c3Smrg # powerpc, because MkLinux only supported shared libraries with the 6310621f50c3Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6311621f50c3Smrg # most powerpc-linux boxes support dynamic linking these days and 6312621f50c3Smrg # people can always --disable-shared, the test was removed, and we 6313621f50c3Smrg # assume the GNU/Linux dynamic linker is in use. 6314621f50c3Smrg dynamic_linker='GNU/Linux ld.so' 6315621f50c3Smrg ;; 6316dc407927Smrg 6317621f50c3Smrgnetbsd*) 6318621f50c3Smrg version_type=sunos 6319621f50c3Smrg need_lib_prefix=no 6320621f50c3Smrg need_version=no 6321621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6322621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6323621f50c3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6324621f50c3Smrg dynamic_linker='NetBSD (a.out) ld.so' 6325621f50c3Smrg else 6326621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6327621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6328621f50c3Smrg dynamic_linker='NetBSD ld.elf_so' 6329621f50c3Smrg fi 6330621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6331621f50c3Smrg shlibpath_overrides_runpath=yes 6332621f50c3Smrg hardcode_into_libs=yes 6333621f50c3Smrg ;; 6334dc407927Smrg 6335621f50c3Smrgnewsos6) 6336621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6337621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6338621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6339621f50c3Smrg shlibpath_overrides_runpath=yes 6340621f50c3Smrg ;; 6341dc407927Smrg 6342621f50c3Smrg*nto* | *qnx*) 6343621f50c3Smrg version_type=qnx 6344621f50c3Smrg need_lib_prefix=no 6345621f50c3Smrg need_version=no 6346621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6347621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6348621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6349621f50c3Smrg shlibpath_overrides_runpath=no 6350621f50c3Smrg hardcode_into_libs=yes 6351621f50c3Smrg dynamic_linker='ldqnx.so' 6352621f50c3Smrg ;; 6353dc407927Smrg 6354621f50c3Smrgopenbsd* | bitrig*) 6355621f50c3Smrg version_type=sunos 6356621f50c3Smrg sys_lib_dlsearch_path_spec=/usr/lib 6357621f50c3Smrg need_lib_prefix=no 6358621f50c3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6359621f50c3Smrg need_version=no 6360621f50c3Smrg else 6361621f50c3Smrg need_version=yes 6362621f50c3Smrg fi 6363621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6364621f50c3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6365621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6366621f50c3Smrg shlibpath_overrides_runpath=yes 6367621f50c3Smrg ;; 63683eed67faSmbalmer 6369621f50c3Smrgos2*) 6370621f50c3Smrg libname_spec='$name' 6371621f50c3Smrg version_type=windows 6372621f50c3Smrg shrext_cmds=.dll 6373621f50c3Smrg need_version=no 6374621f50c3Smrg need_lib_prefix=no 6375621f50c3Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6376621f50c3Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6377621f50c3Smrg v=$($ECHO $release$versuffix | tr -d .-); 6378621f50c3Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6379621f50c3Smrg $ECHO $n$v`$shared_ext' 6380621f50c3Smrg library_names_spec='${libname}_dll.$libext' 6381621f50c3Smrg dynamic_linker='OS/2 ld.exe' 6382621f50c3Smrg shlibpath_var=BEGINLIBPATH 6383621f50c3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6384621f50c3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6385621f50c3Smrg postinstall_cmds='base_file=`basename \$file`~ 6386621f50c3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6387621f50c3Smrg dldir=$destdir/`dirname \$dlpath`~ 6388621f50c3Smrg test -d \$dldir || mkdir -p \$dldir~ 6389621f50c3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6390621f50c3Smrg chmod a+x \$dldir/$dlname~ 6391621f50c3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6392621f50c3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6393621f50c3Smrg fi' 6394621f50c3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6395621f50c3Smrg dlpath=$dir/\$dldll~ 6396621f50c3Smrg $RM \$dlpath' 6397621f50c3Smrg ;; 63983eed67faSmbalmer 6399621f50c3Smrgosf3* | osf4* | osf5*) 6400621f50c3Smrg version_type=osf 6401621f50c3Smrg need_lib_prefix=no 6402621f50c3Smrg need_version=no 6403621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6404621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6405621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6406621f50c3Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6407621f50c3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6408621f50c3Smrg ;; 64093eed67faSmbalmer 6410621f50c3Smrgrdos*) 6411621f50c3Smrg dynamic_linker=no 6412621f50c3Smrg ;; 64133eed67faSmbalmer 6414621f50c3Smrgsolaris*) 6415621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6416621f50c3Smrg need_lib_prefix=no 6417621f50c3Smrg need_version=no 6418621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6419621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6420621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6421621f50c3Smrg shlibpath_overrides_runpath=yes 6422621f50c3Smrg hardcode_into_libs=yes 6423621f50c3Smrg # ldd complains unless libraries are executable 6424621f50c3Smrg postinstall_cmds='chmod +x $lib' 6425621f50c3Smrg ;; 6426dc407927Smrg 6427621f50c3Smrgsunos4*) 6428621f50c3Smrg version_type=sunos 6429621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6430621f50c3Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6431621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6432621f50c3Smrg shlibpath_overrides_runpath=yes 6433621f50c3Smrg if test yes = "$with_gnu_ld"; then 6434621f50c3Smrg need_lib_prefix=no 6435621f50c3Smrg fi 6436621f50c3Smrg need_version=yes 6437621f50c3Smrg ;; 64383eed67faSmbalmer 6439621f50c3Smrgsysv4 | sysv4.3*) 6440621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6441621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6442621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6443621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6444621f50c3Smrg case $host_vendor in 6445621f50c3Smrg sni) 6446621f50c3Smrg shlibpath_overrides_runpath=no 6447621f50c3Smrg need_lib_prefix=no 6448621f50c3Smrg runpath_var=LD_RUN_PATH 6449621f50c3Smrg ;; 6450621f50c3Smrg siemens) 6451621f50c3Smrg need_lib_prefix=no 6452621f50c3Smrg ;; 6453621f50c3Smrg motorola) 6454621f50c3Smrg need_lib_prefix=no 6455621f50c3Smrg need_version=no 6456621f50c3Smrg shlibpath_overrides_runpath=no 6457621f50c3Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6458621f50c3Smrg ;; 6459621f50c3Smrg esac 6460621f50c3Smrg ;; 6461dc407927Smrg 6462621f50c3Smrgsysv4*MP*) 6463621f50c3Smrg if test -d /usr/nec; then 6464621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6465621f50c3Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6466621f50c3Smrg soname_spec='$libname$shared_ext.$major' 6467621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6468621f50c3Smrg fi 6469621f50c3Smrg ;; 6470dc407927Smrg 6471621f50c3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6472621f50c3Smrg version_type=sco 6473621f50c3Smrg need_lib_prefix=no 6474621f50c3Smrg need_version=no 6475621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6476621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6477621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6478621f50c3Smrg shlibpath_overrides_runpath=yes 6479621f50c3Smrg hardcode_into_libs=yes 6480621f50c3Smrg if test yes = "$with_gnu_ld"; then 6481621f50c3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6482621f50c3Smrg else 6483621f50c3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 64843eed67faSmbalmer case $host_os in 6485621f50c3Smrg sco3.2v5*) 6486621f50c3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6487621f50c3Smrg ;; 64883eed67faSmbalmer esac 6489621f50c3Smrg fi 6490621f50c3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 6491621f50c3Smrg ;; 6492dc407927Smrg 6493621f50c3Smrgtpf*) 6494621f50c3Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6495621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6496621f50c3Smrg need_lib_prefix=no 6497621f50c3Smrg need_version=no 6498621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6499621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6500621f50c3Smrg shlibpath_overrides_runpath=no 6501621f50c3Smrg hardcode_into_libs=yes 6502621f50c3Smrg ;; 6503dc407927Smrg 6504621f50c3Smrguts4*) 6505621f50c3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6506621f50c3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6507621f50c3Smrg soname_spec='$libname$release$shared_ext$major' 6508621f50c3Smrg shlibpath_var=LD_LIBRARY_PATH 6509621f50c3Smrg ;; 6510dc407927Smrg 6511621f50c3Smrg*) 6512621f50c3Smrg dynamic_linker=no 6513621f50c3Smrg ;; 6514621f50c3Smrgesac 6515621f50c3SmrgAC_MSG_RESULT([$dynamic_linker]) 6516621f50c3Smrgtest no = "$dynamic_linker" && can_build_shared=no 65173eed67faSmbalmer 6518621f50c3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6519621f50c3Smrgif test yes = "$GCC"; then 6520621f50c3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6521621f50c3Smrgfi 65223eed67faSmbalmer 6523621f50c3Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6524621f50c3Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6525621f50c3Smrgfi 65263eed67faSmbalmer 6527621f50c3Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6528621f50c3Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6529621f50c3Smrgfi 65303eed67faSmbalmer 6531621f50c3Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6532621f50c3Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 65333eed67faSmbalmer 6534621f50c3Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6535621f50c3Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 65363eed67faSmbalmer 6537621f50c3Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6538621f50c3Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 65393eed67faSmbalmer 6540621f50c3Smrg_LT_DECL([], [variables_saved_for_relink], [1], 6541621f50c3Smrg [Variables whose values should be saved in libtool wrapper scripts and 6542621f50c3Smrg restored at link time]) 6543621f50c3Smrg_LT_DECL([], [need_lib_prefix], [0], 6544621f50c3Smrg [Do we need the "lib" prefix for modules?]) 6545621f50c3Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6546621f50c3Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6547621f50c3Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6548621f50c3Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6549621f50c3Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6550621f50c3Smrg [Is shlibpath searched before the hard-coded library search path?]) 6551621f50c3Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6552621f50c3Smrg_LT_DECL([], [library_names_spec], [1], 6553621f50c3Smrg [[List of archive names. First name is the real one, the rest are links. 6554621f50c3Smrg The last name is the one that the linker finds with -lNAME]]) 6555621f50c3Smrg_LT_DECL([], [soname_spec], [1], 6556621f50c3Smrg [[The coded name of the library, if different from the real name]]) 6557621f50c3Smrg_LT_DECL([], [install_override_mode], [1], 6558621f50c3Smrg [Permission mode override for installation of shared libraries]) 6559621f50c3Smrg_LT_DECL([], [postinstall_cmds], [2], 6560621f50c3Smrg [Command to use after installation of a shared archive]) 6561621f50c3Smrg_LT_DECL([], [postuninstall_cmds], [2], 6562621f50c3Smrg [Command to use after uninstallation of a shared archive]) 6563621f50c3Smrg_LT_DECL([], [finish_cmds], [2], 6564621f50c3Smrg [Commands used to finish a libtool library installation in a directory]) 6565621f50c3Smrg_LT_DECL([], [finish_eval], [1], 6566621f50c3Smrg [[As "finish_cmds", except a single script fragment to be evaled but 6567621f50c3Smrg not shown]]) 6568621f50c3Smrg_LT_DECL([], [hardcode_into_libs], [0], 6569621f50c3Smrg [Whether we should hardcode library paths into libraries]) 6570621f50c3Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6571621f50c3Smrg [Compile-time system search path for libraries]) 6572621f50c3Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6573621f50c3Smrg [Detected run-time system search path for libraries]) 6574621f50c3Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6575621f50c3Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6576621f50c3Smrg])# _LT_SYS_DYNAMIC_LINKER 65773eed67faSmbalmer 65783eed67faSmbalmer 6579621f50c3Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 6580621f50c3Smrg# -------------------------- 6581621f50c3Smrg# find a file program that can recognize shared library 6582621f50c3SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6583621f50c3Smrg[m4_require([_LT_DECL_EGREP])dnl 6584621f50c3SmrgAC_MSG_CHECKING([for $1]) 6585621f50c3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6586621f50c3Smrg[case $MAGIC_CMD in 6587621f50c3Smrg[[\\/*] | ?:[\\/]*]) 6588621f50c3Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6589621f50c3Smrg ;; 6590621f50c3Smrg*) 6591621f50c3Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 6592621f50c3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6593621f50c3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6594621f50c3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6595621f50c3Smrgdnl not every word. This closes a longstanding sh security hole. 6596621f50c3Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6597621f50c3Smrg for ac_dir in $ac_dummy; do 6598621f50c3Smrg IFS=$lt_save_ifs 6599621f50c3Smrg test -z "$ac_dir" && ac_dir=. 6600621f50c3Smrg if test -f "$ac_dir/$1"; then 6601621f50c3Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6602621f50c3Smrg if test -n "$file_magic_test_file"; then 6603621f50c3Smrg case $deplibs_check_method in 6604621f50c3Smrg "file_magic "*) 6605621f50c3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6606621f50c3Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6607621f50c3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6608621f50c3Smrg $EGREP "$file_magic_regex" > /dev/null; then 6609621f50c3Smrg : 6610621f50c3Smrg else 6611621f50c3Smrg cat <<_LT_EOF 1>&2 6612dc407927Smrg 6613621f50c3Smrg*** Warning: the command libtool uses to detect shared libraries, 6614621f50c3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6615621f50c3Smrg*** The result is that libtool may fail to recognize shared libraries 6616621f50c3Smrg*** as such. This will affect the creation of libtool libraries that 6617621f50c3Smrg*** depend on shared libraries, but programs linked with such libtool 6618621f50c3Smrg*** libraries will work regardless of this problem. Nevertheless, you 6619621f50c3Smrg*** may want to report the problem to your system manager and/or to 6620621f50c3Smrg*** bug-libtool@gnu.org 6621dc407927Smrg 6622621f50c3Smrg_LT_EOF 6623621f50c3Smrg fi ;; 6624621f50c3Smrg esac 6625621f50c3Smrg fi 6626621f50c3Smrg break 6627621f50c3Smrg fi 6628621f50c3Smrg done 6629621f50c3Smrg IFS=$lt_save_ifs 6630621f50c3Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 6631621f50c3Smrg ;; 6632621f50c3Smrgesac]) 6633621f50c3SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6634621f50c3Smrgif test -n "$MAGIC_CMD"; then 6635621f50c3Smrg AC_MSG_RESULT($MAGIC_CMD) 6636621f50c3Smrgelse 6637621f50c3Smrg AC_MSG_RESULT(no) 6638621f50c3Smrgfi 6639621f50c3Smrg_LT_DECL([], [MAGIC_CMD], [0], 6640621f50c3Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6641621f50c3Smrg])# _LT_PATH_TOOL_PREFIX 6642dc407927Smrg 6643621f50c3Smrg# Old name: 6644621f50c3SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6645621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 6646621f50c3Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6647dc407927Smrg 6648dc407927Smrg 6649621f50c3Smrg# _LT_PATH_MAGIC 6650621f50c3Smrg# -------------- 6651621f50c3Smrg# find a file program that can recognize a shared library 6652621f50c3Smrgm4_defun([_LT_PATH_MAGIC], 6653621f50c3Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6654621f50c3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6655621f50c3Smrg if test -n "$ac_tool_prefix"; then 6656621f50c3Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6657621f50c3Smrg else 6658621f50c3Smrg MAGIC_CMD=: 6659621f50c3Smrg fi 6660dc407927Smrgfi 6661621f50c3Smrg])# _LT_PATH_MAGIC 6662dc407927Smrg 66633eed67faSmbalmer 6664621f50c3Smrg# LT_PATH_LD 6665621f50c3Smrg# ---------- 6666621f50c3Smrg# find the pathname to the GNU or non-GNU linker 6667621f50c3SmrgAC_DEFUN([LT_PATH_LD], 6668621f50c3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 6669621f50c3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6670621f50c3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6671621f50c3Smrgm4_require([_LT_DECL_SED])dnl 6672621f50c3Smrgm4_require([_LT_DECL_EGREP])dnl 6673621f50c3Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 66743eed67faSmbalmer 6675621f50c3SmrgAC_ARG_WITH([gnu-ld], 6676621f50c3Smrg [AS_HELP_STRING([--with-gnu-ld], 6677621f50c3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6678621f50c3Smrg [test no = "$withval" || with_gnu_ld=yes], 6679621f50c3Smrg [with_gnu_ld=no])dnl 668075cbef56Smrg 6681621f50c3Smrgac_prog=ld 6682621f50c3Smrgif test yes = "$GCC"; then 6683621f50c3Smrg # Check if gcc -print-prog-name=ld gives a path. 6684621f50c3Smrg AC_MSG_CHECKING([for ld used by $CC]) 6685621f50c3Smrg case $host in 6686621f50c3Smrg *-*-mingw*) 6687621f50c3Smrg # gcc leaves a trailing carriage return, which upsets mingw 6688621f50c3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6689621f50c3Smrg *) 6690621f50c3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6691621f50c3Smrg esac 6692621f50c3Smrg case $ac_prog in 6693621f50c3Smrg # Accept absolute paths. 6694621f50c3Smrg [[\\/]]* | ?:[[\\/]]*) 6695621f50c3Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 6696621f50c3Smrg # Canonicalize the pathname of ld 6697621f50c3Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6698621f50c3Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6699621f50c3Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6700621f50c3Smrg done 6701621f50c3Smrg test -z "$LD" && LD=$ac_prog 6702621f50c3Smrg ;; 6703621f50c3Smrg "") 6704621f50c3Smrg # If it fails, then pretend we aren't using GCC. 6705621f50c3Smrg ac_prog=ld 6706621f50c3Smrg ;; 6707621f50c3Smrg *) 6708621f50c3Smrg # If it is relative, then search for the first ld in PATH. 6709621f50c3Smrg with_gnu_ld=unknown 6710621f50c3Smrg ;; 6711621f50c3Smrg esac 6712621f50c3Smrgelif test yes = "$with_gnu_ld"; then 6713621f50c3Smrg AC_MSG_CHECKING([for GNU ld]) 6714621f50c3Smrgelse 6715621f50c3Smrg AC_MSG_CHECKING([for non-GNU ld]) 6716621f50c3Smrgfi 6717621f50c3SmrgAC_CACHE_VAL(lt_cv_path_LD, 6718621f50c3Smrg[if test -z "$LD"; then 6719621f50c3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6720621f50c3Smrg for ac_dir in $PATH; do 6721621f50c3Smrg IFS=$lt_save_ifs 6722621f50c3Smrg test -z "$ac_dir" && ac_dir=. 6723621f50c3Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6724621f50c3Smrg lt_cv_path_LD=$ac_dir/$ac_prog 6725621f50c3Smrg # Check to see if the program is GNU ld. I'd rather use --version, 6726621f50c3Smrg # but apparently some variants of GNU ld only accept -v. 6727621f50c3Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 6728621f50c3Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6729621f50c3Smrg *GNU* | *'with BFD'*) 6730621f50c3Smrg test no != "$with_gnu_ld" && break 6731621f50c3Smrg ;; 6732621f50c3Smrg *) 6733621f50c3Smrg test yes != "$with_gnu_ld" && break 6734621f50c3Smrg ;; 6735621f50c3Smrg esac 6736621f50c3Smrg fi 6737621f50c3Smrg done 6738621f50c3Smrg IFS=$lt_save_ifs 6739621f50c3Smrgelse 6740621f50c3Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6741621f50c3Smrgfi]) 6742621f50c3SmrgLD=$lt_cv_path_LD 6743621f50c3Smrgif test -n "$LD"; then 6744621f50c3Smrg AC_MSG_RESULT($LD) 6745621f50c3Smrgelse 6746621f50c3Smrg AC_MSG_RESULT(no) 6747621f50c3Smrgfi 6748621f50c3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6749621f50c3Smrg_LT_PATH_LD_GNU 6750621f50c3SmrgAC_SUBST([LD]) 675175cbef56Smrg 6752621f50c3Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6753621f50c3Smrg])# LT_PATH_LD 675475cbef56Smrg 6755621f50c3Smrg# Old names: 6756621f50c3SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6757621f50c3SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6758621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 6759621f50c3Smrgdnl AC_DEFUN([AM_PROG_LD], []) 6760621f50c3Smrgdnl AC_DEFUN([AC_PROG_LD], []) 676175cbef56Smrg 676275cbef56Smrg 6763621f50c3Smrg# _LT_PATH_LD_GNU 6764621f50c3Smrg#- -------------- 6765621f50c3Smrgm4_defun([_LT_PATH_LD_GNU], 6766621f50c3Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6767621f50c3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6768621f50c3Smrgcase `$LD -v 2>&1 </dev/null` in 6769621f50c3Smrg*GNU* | *'with BFD'*) 6770621f50c3Smrg lt_cv_prog_gnu_ld=yes 6771621f50c3Smrg ;; 6772621f50c3Smrg*) 6773621f50c3Smrg lt_cv_prog_gnu_ld=no 6774621f50c3Smrg ;; 6775621f50c3Smrgesac]) 6776621f50c3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6777621f50c3Smrg])# _LT_PATH_LD_GNU 677875cbef56Smrg 677975cbef56Smrg 6780621f50c3Smrg# _LT_CMD_RELOAD 6781621f50c3Smrg# -------------- 6782621f50c3Smrg# find reload flag for linker 6783621f50c3Smrg# -- PORTME Some linkers may need a different reload flag. 6784621f50c3Smrgm4_defun([_LT_CMD_RELOAD], 6785621f50c3Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 6786621f50c3Smrg lt_cv_ld_reload_flag, 6787621f50c3Smrg [lt_cv_ld_reload_flag='-r']) 6788621f50c3Smrgreload_flag=$lt_cv_ld_reload_flag 6789621f50c3Smrgcase $reload_flag in 6790621f50c3Smrg"" | " "*) ;; 6791621f50c3Smrg*) reload_flag=" $reload_flag" ;; 6792621f50c3Smrgesac 6793621f50c3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6794621f50c3Smrgcase $host_os in 6795621f50c3Smrg cygwin* | mingw* | pw32* | cegcc*) 6796621f50c3Smrg if test yes != "$GCC"; then 6797621f50c3Smrg reload_cmds=false 6798621f50c3Smrg fi 6799621f50c3Smrg ;; 6800621f50c3Smrg darwin*) 6801621f50c3Smrg if test yes = "$GCC"; then 6802621f50c3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6803621f50c3Smrg else 6804621f50c3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6805621f50c3Smrg fi 6806621f50c3Smrg ;; 6807621f50c3Smrgesac 6808621f50c3Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6809621f50c3Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6810621f50c3Smrg])# _LT_CMD_RELOAD 681175cbef56Smrg 681275cbef56Smrg 6813621f50c3Smrg# _LT_PATH_DD 6814621f50c3Smrg# ----------- 6815621f50c3Smrg# find a working dd 6816621f50c3Smrgm4_defun([_LT_PATH_DD], 6817621f50c3Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6818621f50c3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6819621f50c3Smrgcat conftest.i conftest.i >conftest2.i 6820621f50c3Smrg: ${lt_DD:=$DD} 6821621f50c3SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6822621f50c3Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6823621f50c3Smrg cmp -s conftest.i conftest.out \ 6824621f50c3Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6825621f50c3Smrgfi]) 6826621f50c3Smrgrm -f conftest.i conftest2.i conftest.out]) 6827621f50c3Smrg])# _LT_PATH_DD 682875cbef56Smrg 682975cbef56Smrg 6830621f50c3Smrg# _LT_CMD_TRUNCATE 6831621f50c3Smrg# ---------------- 6832621f50c3Smrg# find command to truncate a binary pipe 6833621f50c3Smrgm4_defun([_LT_CMD_TRUNCATE], 6834621f50c3Smrg[m4_require([_LT_PATH_DD]) 6835621f50c3SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6836621f50c3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6837621f50c3Smrgcat conftest.i conftest.i >conftest2.i 6838621f50c3Smrglt_cv_truncate_bin= 6839621f50c3Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6840621f50c3Smrg cmp -s conftest.i conftest.out \ 6841621f50c3Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 684275cbef56Smrgfi 6843621f50c3Smrgrm -f conftest.i conftest2.i conftest.out 6844621f50c3Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6845621f50c3Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6846621f50c3Smrg [Command to truncate a binary pipe]) 6847621f50c3Smrg])# _LT_CMD_TRUNCATE 6848621f50c3Smrg 6849621f50c3Smrg 6850621f50c3Smrg# _LT_CHECK_MAGIC_METHOD 6851621f50c3Smrg# ---------------------- 6852621f50c3Smrg# how to check for library dependencies 6853621f50c3Smrg# -- PORTME fill in with the dynamic library characteristics 6854621f50c3Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6855621f50c3Smrg[m4_require([_LT_DECL_EGREP]) 6856621f50c3Smrgm4_require([_LT_DECL_OBJDUMP]) 6857621f50c3SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6858621f50c3Smrglt_cv_deplibs_check_method, 6859621f50c3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6860621f50c3Smrglt_cv_file_magic_test_file= 6861621f50c3Smrglt_cv_deplibs_check_method='unknown' 6862621f50c3Smrg# Need to set the preceding variable on all platforms that support 6863621f50c3Smrg# interlibrary dependencies. 6864621f50c3Smrg# 'none' -- dependencies not supported. 6865621f50c3Smrg# 'unknown' -- same as none, but documents that we really don't know. 6866621f50c3Smrg# 'pass_all' -- all dependencies passed with no checks. 6867621f50c3Smrg# 'test_compile' -- check by making test program. 6868621f50c3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 6869621f50c3Smrg# that responds to the $file_magic_cmd with a given extended regex. 6870621f50c3Smrg# If you have 'file' or equivalent on your system and you're not sure 6871621f50c3Smrg# whether 'pass_all' will *always* work, you probably want this one. 687275cbef56Smrg 6873621f50c3Smrgcase $host_os in 6874621f50c3Smrgaix[[4-9]]*) 6875621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6876621f50c3Smrg ;; 687775cbef56Smrg 6878621f50c3Smrgbeos*) 6879621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6880621f50c3Smrg ;; 688175cbef56Smrg 6882621f50c3Smrgbsdi[[45]]*) 6883621f50c3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6884621f50c3Smrg lt_cv_file_magic_cmd='$FILECMD -L' 6885621f50c3Smrg lt_cv_file_magic_test_file=/shlib/libc.so 6886621f50c3Smrg ;; 688775cbef56Smrg 6888621f50c3Smrgcygwin*) 6889621f50c3Smrg # func_win32_libid is a shell function defined in ltmain.sh 6890621f50c3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6891621f50c3Smrg lt_cv_file_magic_cmd='func_win32_libid' 6892621f50c3Smrg ;; 68933eed67faSmbalmer 6894621f50c3Smrgmingw* | pw32*) 6895621f50c3Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 6896621f50c3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6897621f50c3Smrg # unless we find 'file', for example because we are cross-compiling. 6898621f50c3Smrg if ( file / ) >/dev/null 2>&1; then 6899621f50c3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6900621f50c3Smrg lt_cv_file_magic_cmd='func_win32_libid' 6901621f50c3Smrg else 6902621f50c3Smrg # Keep this pattern in sync with the one in func_win32_libid. 6903621f50c3Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6904621f50c3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6905621f50c3Smrg fi 6906621f50c3Smrg ;; 69073eed67faSmbalmer 6908621f50c3Smrgcegcc*) 6909621f50c3Smrg # use the weaker test based on 'objdump'. See mingw*. 6910621f50c3Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6911621f50c3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6912621f50c3Smrg ;; 69133eed67faSmbalmer 6914621f50c3Smrgdarwin* | rhapsody*) 6915621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6916621f50c3Smrg ;; 69173eed67faSmbalmer 6918621f50c3Smrgfreebsd* | dragonfly* | midnightbsd*) 6919621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6920621f50c3Smrg case $host_cpu in 6921621f50c3Smrg i*86 ) 6922621f50c3Smrg # Not sure whether the presence of OpenBSD here was a mistake. 6923621f50c3Smrg # Let's accept both of them until this is cleared up. 6924621f50c3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6925621f50c3Smrg lt_cv_file_magic_cmd=$FILECMD 6926621f50c3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6927621f50c3Smrg ;; 6928621f50c3Smrg esac 6929621f50c3Smrg else 6930621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6931621f50c3Smrg fi 6932621f50c3Smrg ;; 69333eed67faSmbalmer 6934621f50c3Smrghaiku*) 6935621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6936621f50c3Smrg ;; 69373eed67faSmbalmer 6938621f50c3Smrghpux10.20* | hpux11*) 6939621f50c3Smrg lt_cv_file_magic_cmd=$FILECMD 6940621f50c3Smrg case $host_cpu in 6941621f50c3Smrg ia64*) 6942621f50c3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6943621f50c3Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6944621f50c3Smrg ;; 6945621f50c3Smrg hppa*64*) 6946621f50c3Smrg [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]'] 6947621f50c3Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6948621f50c3Smrg ;; 6949621f50c3Smrg *) 6950621f50c3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6951621f50c3Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6952621f50c3Smrg ;; 6953621f50c3Smrg esac 6954621f50c3Smrg ;; 69553eed67faSmbalmer 6956621f50c3Smrginterix[[3-9]]*) 6957621f50c3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6958621f50c3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6959621f50c3Smrg ;; 69603eed67faSmbalmer 6961621f50c3Smrgirix5* | irix6* | nonstopux*) 6962621f50c3Smrg case $LD in 6963621f50c3Smrg *-32|*"-32 ") libmagic=32-bit;; 6964621f50c3Smrg *-n32|*"-n32 ") libmagic=N32;; 6965621f50c3Smrg *-64|*"-64 ") libmagic=64-bit;; 6966621f50c3Smrg *) libmagic=never-match;; 6967621f50c3Smrg esac 6968621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6969621f50c3Smrg ;; 69703eed67faSmbalmer 6971621f50c3Smrg# This must be glibc/ELF. 6972621f50c3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6973621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6974621f50c3Smrg ;; 69753eed67faSmbalmer 6976621f50c3Smrgnetbsd*) 6977621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6978621f50c3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6979621f50c3Smrg else 6980621f50c3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6981621f50c3Smrg fi 6982621f50c3Smrg ;; 69833eed67faSmbalmer 6984621f50c3Smrgnewos6*) 6985621f50c3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6986621f50c3Smrg lt_cv_file_magic_cmd=$FILECMD 6987621f50c3Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6988621f50c3Smrg ;; 69893eed67faSmbalmer 6990621f50c3Smrg*nto* | *qnx*) 6991621f50c3Smrg lt_cv_deplibs_check_method=pass_all 6992621f50c3Smrg ;; 69933eed67faSmbalmer 6994621f50c3Smrgopenbsd* | bitrig*) 6995621f50c3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6996621f50c3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6997621f50c3Smrg else 6998621f50c3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6999621f50c3Smrg fi 7000621f50c3Smrg ;; 7001dc407927Smrg 7002621f50c3Smrgosf3* | osf4* | osf5*) 7003621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7004621f50c3Smrg ;; 700575cbef56Smrg 7006621f50c3Smrgrdos*) 7007621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7008621f50c3Smrg ;; 700975cbef56Smrg 7010621f50c3Smrgsolaris*) 7011621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7012621f50c3Smrg ;; 70133eed67faSmbalmer 7014621f50c3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7015621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7016621f50c3Smrg ;; 70173eed67faSmbalmer 7018621f50c3Smrgsysv4 | sysv4.3*) 7019621f50c3Smrg case $host_vendor in 7020621f50c3Smrg motorola) 7021621f50c3Smrg 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]]' 7022621f50c3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7023621f50c3Smrg ;; 7024621f50c3Smrg ncr) 7025621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7026621f50c3Smrg ;; 7027621f50c3Smrg sequent) 7028621f50c3Smrg lt_cv_file_magic_cmd='/bin/file' 7029621f50c3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7030621f50c3Smrg ;; 7031621f50c3Smrg sni) 7032621f50c3Smrg lt_cv_file_magic_cmd='/bin/file' 7033621f50c3Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7034621f50c3Smrg lt_cv_file_magic_test_file=/lib/libc.so 7035621f50c3Smrg ;; 7036621f50c3Smrg siemens) 7037621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7038621f50c3Smrg ;; 7039621f50c3Smrg pc) 7040621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7041621f50c3Smrg ;; 7042621f50c3Smrg esac 7043621f50c3Smrg ;; 7044dc407927Smrg 7045621f50c3Smrgtpf*) 7046621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7047621f50c3Smrg ;; 7048621f50c3Smrgos2*) 7049621f50c3Smrg lt_cv_deplibs_check_method=pass_all 7050621f50c3Smrg ;; 7051621f50c3Smrgesac 70523eed67faSmbalmer]) 70533eed67faSmbalmer 7054621f50c3Smrgfile_magic_glob= 7055621f50c3Smrgwant_nocaseglob=no 7056621f50c3Smrgif test "$build" = "$host"; then 7057621f50c3Smrg case $host_os in 7058621f50c3Smrg mingw* | pw32*) 7059621f50c3Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7060621f50c3Smrg want_nocaseglob=yes 7061621f50c3Smrg else 7062621f50c3Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7063621f50c3Smrg fi 7064621f50c3Smrg ;; 7065621f50c3Smrg esac 7066621f50c3Smrgfi 70673eed67faSmbalmer 7068621f50c3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 7069621f50c3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7070621f50c3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7071dc407927Smrg 7072621f50c3Smrg_LT_DECL([], [deplibs_check_method], [1], 7073621f50c3Smrg [Method to check whether dependent libraries are shared objects]) 7074621f50c3Smrg_LT_DECL([], [file_magic_cmd], [1], 7075621f50c3Smrg [Command to use when deplibs_check_method = "file_magic"]) 7076621f50c3Smrg_LT_DECL([], [file_magic_glob], [1], 7077621f50c3Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7078621f50c3Smrg_LT_DECL([], [want_nocaseglob], [1], 7079621f50c3Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7080621f50c3Smrg])# _LT_CHECK_MAGIC_METHOD 7081dc407927Smrg 7082dc407927Smrg 7083621f50c3Smrg# LT_PATH_NM 7084621f50c3Smrg# ---------- 7085621f50c3Smrg# find the pathname to a BSD- or MS-compatible name lister 7086621f50c3SmrgAC_DEFUN([LT_PATH_NM], 7087621f50c3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7088621f50c3SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7089621f50c3Smrg[if test -n "$NM"; then 7090621f50c3Smrg # Let the user override the test. 7091621f50c3Smrg lt_cv_path_NM=$NM 7092621f50c3Smrgelse 7093621f50c3Smrg lt_nm_to_check=${ac_tool_prefix}nm 7094621f50c3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7095621f50c3Smrg lt_nm_to_check="$lt_nm_to_check nm" 7096621f50c3Smrg fi 7097621f50c3Smrg for lt_tmp_nm in $lt_nm_to_check; do 7098621f50c3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7099621f50c3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7100621f50c3Smrg IFS=$lt_save_ifs 7101621f50c3Smrg test -z "$ac_dir" && ac_dir=. 7102621f50c3Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7103621f50c3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7104621f50c3Smrg # Check to see if the nm accepts a BSD-compat flag. 7105621f50c3Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7106621f50c3Smrg # nm: unknown option "B" ignored 7107621f50c3Smrg # Tru64's nm complains that /dev/null is an invalid object file 7108621f50c3Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7109621f50c3Smrg case $build_os in 7110621f50c3Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7111621f50c3Smrg *) lt_bad_file=/dev/null ;; 7112621f50c3Smrg esac 7113621f50c3Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7114621f50c3Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7115621f50c3Smrg lt_cv_path_NM="$tmp_nm -B" 7116621f50c3Smrg break 2 7117621f50c3Smrg ;; 7118621f50c3Smrg *) 7119621f50c3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7120621f50c3Smrg */dev/null*) 7121621f50c3Smrg lt_cv_path_NM="$tmp_nm -p" 7122621f50c3Smrg break 2 7123621f50c3Smrg ;; 7124621f50c3Smrg *) 7125621f50c3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7126621f50c3Smrg continue # so that we can try to find one that supports BSD flags 7127621f50c3Smrg ;; 7128621f50c3Smrg esac 7129621f50c3Smrg ;; 7130621f50c3Smrg esac 7131dc407927Smrg fi 7132dc407927Smrg done 7133621f50c3Smrg IFS=$lt_save_ifs 7134dc407927Smrg done 7135621f50c3Smrg : ${lt_cv_path_NM=no} 7136621f50c3Smrgfi]) 7137621f50c3Smrgif test no != "$lt_cv_path_NM"; then 7138621f50c3Smrg NM=$lt_cv_path_NM 7139621f50c3Smrgelse 7140621f50c3Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7141621f50c3Smrg if test -n "$DUMPBIN"; then : 7142621f50c3Smrg # Let the user override the test. 7143621f50c3Smrg else 7144621f50c3Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7145621f50c3Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7146621f50c3Smrg *COFF*) 7147621f50c3Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7148621f50c3Smrg ;; 7149621f50c3Smrg *) 7150621f50c3Smrg DUMPBIN=: 7151621f50c3Smrg ;; 7152621f50c3Smrg esac 7153dc407927Smrg fi 7154621f50c3Smrg AC_SUBST([DUMPBIN]) 7155621f50c3Smrg if test : != "$DUMPBIN"; then 7156621f50c3Smrg NM=$DUMPBIN 7157621f50c3Smrg fi 7158621f50c3Smrgfi 7159621f50c3Smrgtest -z "$NM" && NM=nm 7160621f50c3SmrgAC_SUBST([NM]) 7161621f50c3Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7162621f50c3Smrg 7163621f50c3SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7164621f50c3Smrg [lt_cv_nm_interface="BSD nm" 7165621f50c3Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7166621f50c3Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7167621f50c3Smrg (eval "$ac_compile" 2>conftest.err) 7168621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7169621f50c3Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7170621f50c3Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7171621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7172621f50c3Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7173621f50c3Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7174621f50c3Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7175621f50c3Smrg lt_cv_nm_interface="MS dumpbin" 7176621f50c3Smrg fi 7177621f50c3Smrg rm -f conftest*]) 7178621f50c3Smrg])# LT_PATH_NM 7179621f50c3Smrg 7180621f50c3Smrg# Old names: 7181621f50c3SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7182621f50c3SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7183621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 7184621f50c3Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7185621f50c3Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7186621f50c3Smrg 7187621f50c3Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7188621f50c3Smrg# -------------------------------- 7189621f50c3Smrg# how to determine the name of the shared library 7190621f50c3Smrg# associated with a specific link library. 7191621f50c3Smrg# -- PORTME fill in with the dynamic library characteristics 7192621f50c3Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7193621f50c3Smrg[m4_require([_LT_DECL_EGREP]) 7194621f50c3Smrgm4_require([_LT_DECL_OBJDUMP]) 7195621f50c3Smrgm4_require([_LT_DECL_DLLTOOL]) 7196621f50c3SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7197621f50c3Smrglt_cv_sharedlib_from_linklib_cmd, 7198621f50c3Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7199621f50c3Smrg 7200621f50c3Smrgcase $host_os in 7201621f50c3Smrgcygwin* | mingw* | pw32* | cegcc*) 7202621f50c3Smrg # two different shell functions defined in ltmain.sh; 7203621f50c3Smrg # decide which one to use based on capabilities of $DLLTOOL 7204621f50c3Smrg case `$DLLTOOL --help 2>&1` in 7205621f50c3Smrg *--identify-strict*) 7206621f50c3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7207621f50c3Smrg ;; 7208621f50c3Smrg *) 7209621f50c3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7210621f50c3Smrg ;; 7211621f50c3Smrg esac 7212621f50c3Smrg ;; 7213621f50c3Smrg*) 7214621f50c3Smrg # fallback: assume linklib IS sharedlib 7215621f50c3Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7216621f50c3Smrg ;; 7217621f50c3Smrgesac 7218dc407927Smrg]) 7219621f50c3Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7220621f50c3Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221621f50c3Smrg 7222621f50c3Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7223621f50c3Smrg [Command to associate shared and link libraries]) 7224621f50c3Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7225621f50c3Smrg 7226621f50c3Smrg 7227621f50c3Smrg# _LT_PATH_MANIFEST_TOOL 7228621f50c3Smrg# ---------------------- 7229621f50c3Smrg# locate the manifest tool 7230621f50c3Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7231621f50c3Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7232621f50c3Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7233621f50c3SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7234621f50c3Smrg [lt_cv_path_mainfest_tool=no 7235621f50c3Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7236621f50c3Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7237621f50c3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7238621f50c3Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7239621f50c3Smrg lt_cv_path_mainfest_tool=yes 7240621f50c3Smrg fi 7241621f50c3Smrg rm -f conftest*]) 7242621f50c3Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7243621f50c3Smrg MANIFEST_TOOL=: 7244621f50c3Smrgfi 7245621f50c3Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7246621f50c3Smrg])# _LT_PATH_MANIFEST_TOOL 7247dc407927Smrg 7248dc407927Smrg 7249621f50c3Smrg# _LT_DLL_DEF_P([FILE]) 7250621f50c3Smrg# --------------------- 7251621f50c3Smrg# True iff FILE is a Windows DLL '.def' file. 7252621f50c3Smrg# Keep in sync with func_dll_def_p in the libtool script 7253621f50c3SmrgAC_DEFUN([_LT_DLL_DEF_P], 7254621f50c3Smrg[dnl 7255621f50c3Smrg test DEF = "`$SED -n dnl 7256621f50c3Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7257621f50c3Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7258621f50c3Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7259621f50c3Smrg -e q dnl Only consider the first "real" line 7260621f50c3Smrg $1`" dnl 7261621f50c3Smrg])# _LT_DLL_DEF_P 7262dc407927Smrg 7263dc407927Smrg 7264621f50c3Smrg# LT_LIB_M 7265621f50c3Smrg# -------- 7266621f50c3Smrg# check for math library 7267621f50c3SmrgAC_DEFUN([LT_LIB_M], 7268621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7269621f50c3SmrgLIBM= 7270621f50c3Smrgcase $host in 7271621f50c3Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7272621f50c3Smrg # These system don't have libm, or don't need it 72733eed67faSmbalmer ;; 7274621f50c3Smrg*-ncr-sysv4.3*) 7275621f50c3Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7276621f50c3Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7277621f50c3Smrg ;; 7278621f50c3Smrg*) 7279621f50c3Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 72803eed67faSmbalmer ;; 7281dc407927Smrgesac 7282621f50c3SmrgAC_SUBST([LIBM]) 7283621f50c3Smrg])# LT_LIB_M 7284dc407927Smrg 7285621f50c3Smrg# Old name: 7286621f50c3SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7287621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 7288621f50c3Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7289dc407927Smrg 7290621f50c3Smrg 7291621f50c3Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7292621f50c3Smrg# ------------------------------- 7293621f50c3Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7294621f50c3Smrg[m4_require([_LT_TAG_COMPILER])dnl 7295621f50c3Smrg 7296621f50c3Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7297621f50c3Smrg 7298621f50c3Smrgif test yes = "$GCC"; then 7299621f50c3Smrg case $cc_basename in 7300621f50c3Smrg nvcc*) 7301621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7302621f50c3Smrg *) 7303621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7304621f50c3Smrg esac 7305621f50c3Smrg 7306621f50c3Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7307621f50c3Smrg lt_cv_prog_compiler_rtti_exceptions, 7308621f50c3Smrg [-fno-rtti -fno-exceptions], [], 7309621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7310621f50c3Smrgfi 7311621f50c3Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7312621f50c3Smrg [Compiler flag to turn off builtin functions]) 7313621f50c3Smrg])# _LT_COMPILER_NO_RTTI 7314621f50c3Smrg 7315621f50c3Smrg 7316621f50c3Smrg# _LT_CMD_GLOBAL_SYMBOLS 7317621f50c3Smrg# ---------------------- 7318621f50c3Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7319dd0822caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7320621f50c3SmrgAC_REQUIRE([AC_PROG_CC])dnl 7321621f50c3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7322621f50c3SmrgAC_REQUIRE([LT_PATH_NM])dnl 7323621f50c3SmrgAC_REQUIRE([LT_PATH_LD])dnl 7324621f50c3Smrgm4_require([_LT_DECL_SED])dnl 7325621f50c3Smrgm4_require([_LT_DECL_EGREP])dnl 7326621f50c3Smrgm4_require([_LT_TAG_COMPILER])dnl 7327621f50c3Smrg 7328621f50c3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7329621f50c3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7330621f50c3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7331621f50c3Smrg[ 7332621f50c3Smrg# These are sane defaults that work on at least a few old systems. 7333621f50c3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7334621f50c3Smrg 7335621f50c3Smrg# Character class describing NM global symbol codes. 7336621f50c3Smrgsymcode='[[BCDEGRST]]' 7337621f50c3Smrg 7338621f50c3Smrg# Regexp to match symbols that can be accessed directly from C. 7339621f50c3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7340621f50c3Smrg 7341621f50c3Smrg# Define system-specific variables. 7342621f50c3Smrgcase $host_os in 7343621f50c3Smrgaix*) 7344621f50c3Smrg symcode='[[BCDT]]' 7345621f50c3Smrg ;; 7346621f50c3Smrgcygwin* | mingw* | pw32* | cegcc*) 7347621f50c3Smrg symcode='[[ABCDGISTW]]' 7348621f50c3Smrg ;; 7349621f50c3Smrghpux*) 7350621f50c3Smrg if test ia64 = "$host_cpu"; then 7351621f50c3Smrg symcode='[[ABCDEGRST]]' 7352621f50c3Smrg fi 7353621f50c3Smrg ;; 7354621f50c3Smrgirix* | nonstopux*) 7355621f50c3Smrg symcode='[[BCDEGRST]]' 7356621f50c3Smrg ;; 7357621f50c3Smrgosf*) 7358621f50c3Smrg symcode='[[BCDEGQRST]]' 7359621f50c3Smrg ;; 7360621f50c3Smrgsolaris*) 7361621f50c3Smrg symcode='[[BDRT]]' 7362621f50c3Smrg ;; 7363621f50c3Smrgsco3.2v5*) 7364621f50c3Smrg symcode='[[DT]]' 7365621f50c3Smrg ;; 7366621f50c3Smrgsysv4.2uw2*) 7367621f50c3Smrg symcode='[[DT]]' 7368621f50c3Smrg ;; 7369621f50c3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7370621f50c3Smrg symcode='[[ABDT]]' 7371621f50c3Smrg ;; 7372621f50c3Smrgsysv4) 7373621f50c3Smrg symcode='[[DFNSTU]]' 7374621f50c3Smrg ;; 7375dd0822caSmrgesac 7376dd0822caSmrg 7377621f50c3Smrg# If we're using GNU nm, then use its standard symbol codes. 7378621f50c3Smrgcase `$NM -V 2>&1` in 7379621f50c3Smrg*GNU* | *'with BFD'*) 7380621f50c3Smrg symcode='[[ABCDGIRSTW]]' ;; 7381dd0822caSmrgesac 73823eed67faSmbalmer 7383621f50c3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7384621f50c3Smrg # Gets list of data symbols to import. 7385621f50c3Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7386621f50c3Smrg # Adjust the below global symbol transforms to fixup imported variables. 7387621f50c3Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7388621f50c3Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7389621f50c3Smrg lt_c_name_lib_hook="\ 7390621f50c3Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7391621f50c3Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7392621f50c3Smrgelse 7393621f50c3Smrg # Disable hooks by default. 7394621f50c3Smrg lt_cv_sys_global_symbol_to_import= 7395621f50c3Smrg lt_cdecl_hook= 7396621f50c3Smrg lt_c_name_hook= 7397621f50c3Smrg lt_c_name_lib_hook= 7398621f50c3Smrgfi 7399621f50c3Smrg 7400621f50c3Smrg# Transform an extracted symbol line into a proper C declaration. 7401621f50c3Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7402621f50c3Smrg# so use this general approach. 7403621f50c3Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7404621f50c3Smrg$lt_cdecl_hook\ 7405621f50c3Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7406621f50c3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7407621f50c3Smrg 7408621f50c3Smrg# Transform an extracted symbol line into symbol name and symbol address 7409621f50c3Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7410621f50c3Smrg$lt_c_name_hook\ 7411621f50c3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7412621f50c3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 74133eed67faSmbalmer 7414621f50c3Smrg# Transform an extracted symbol line into symbol name with lib prefix and 7415621f50c3Smrg# symbol address. 7416621f50c3Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7417621f50c3Smrg$lt_c_name_lib_hook\ 7418621f50c3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7419621f50c3Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7420621f50c3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 74213eed67faSmbalmer 7422621f50c3Smrg# Handle CRLF in mingw tool chain 7423621f50c3Smrgopt_cr= 7424621f50c3Smrgcase $build_os in 7425621f50c3Smrgmingw*) 7426621f50c3Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7427621f50c3Smrg ;; 7428621f50c3Smrgesac 74293eed67faSmbalmer 7430621f50c3Smrg# Try without a prefix underscore, then with it. 7431621f50c3Smrgfor ac_symprfx in "" "_"; do 74323eed67faSmbalmer 7433621f50c3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7434621f50c3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 74353eed67faSmbalmer 7436621f50c3Smrg # Write the raw and C identifiers. 7437621f50c3Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7438621f50c3Smrg # Fake it for dumpbin and say T for any non-static function, 7439621f50c3Smrg # D for any global variable and I for any imported variable. 7440621f50c3Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7441621f50c3Smrg # which start with @ or ?. 7442621f50c3Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7443621f50c3Smrg" {last_section=section; section=\$ 3};"\ 7444621f50c3Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7445621f50c3Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7446621f50c3Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7447621f50c3Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7448621f50c3Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7449621f50c3Smrg" \$ 0!~/External *\|/{next};"\ 7450621f50c3Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7451621f50c3Smrg" {if(hide[section]) next};"\ 7452621f50c3Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7453621f50c3Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7454621f50c3Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7455621f50c3Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7456621f50c3Smrg" ' prfx=^$ac_symprfx]" 7457621f50c3Smrg else 7458621f50c3Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7459621f50c3Smrg fi 7460621f50c3Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 74613eed67faSmbalmer 7462621f50c3Smrg # Check to see that the pipe works correctly. 7463621f50c3Smrg pipe_works=no 7464dc407927Smrg 7465621f50c3Smrg rm -f conftest* 7466621f50c3Smrg cat > conftest.$ac_ext <<_LT_EOF 7467621f50c3Smrg#ifdef __cplusplus 7468621f50c3Smrgextern "C" { 7469621f50c3Smrg#endif 7470621f50c3Smrgchar nm_test_var; 7471621f50c3Smrgvoid nm_test_func(void); 7472621f50c3Smrgvoid nm_test_func(void){} 7473621f50c3Smrg#ifdef __cplusplus 7474621f50c3Smrg} 7475621f50c3Smrg#endif 7476621f50c3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 7477621f50c3Smrg_LT_EOF 7478dc407927Smrg 7479621f50c3Smrg if AC_TRY_EVAL(ac_compile); then 7480621f50c3Smrg # Now try to grab the symbols. 7481621f50c3Smrg nlist=conftest.nm 7482621f50c3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7483621f50c3Smrg # Try sorting and uniquifying the output. 7484621f50c3Smrg if sort "$nlist" | uniq > "$nlist"T; then 7485621f50c3Smrg mv -f "$nlist"T "$nlist" 7486621f50c3Smrg else 7487621f50c3Smrg rm -f "$nlist"T 7488621f50c3Smrg fi 7489dc407927Smrg 7490621f50c3Smrg # Make sure that we snagged all the symbols we need. 7491621f50c3Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7492621f50c3Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7493621f50c3Smrg cat <<_LT_EOF > conftest.$ac_ext 7494621f50c3Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7495621f50c3Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7496621f50c3Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7497621f50c3Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7498621f50c3Smrg# define LT@&t@_DLSYM_CONST 7499621f50c3Smrg#elif defined __osf__ 7500621f50c3Smrg/* This system does not cope well with relocations in const data. */ 7501621f50c3Smrg# define LT@&t@_DLSYM_CONST 7502621f50c3Smrg#else 7503621f50c3Smrg# define LT@&t@_DLSYM_CONST const 7504621f50c3Smrg#endif 7505dc407927Smrg 7506621f50c3Smrg#ifdef __cplusplus 7507621f50c3Smrgextern "C" { 7508621f50c3Smrg#endif 7509dc407927Smrg 7510621f50c3Smrg_LT_EOF 7511621f50c3Smrg # Now generate the symbol file. 7512621f50c3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7513dc407927Smrg 7514621f50c3Smrg cat <<_LT_EOF >> conftest.$ac_ext 7515dc407927Smrg 7516621f50c3Smrg/* The mapping between symbol names and symbols. */ 7517621f50c3SmrgLT@&t@_DLSYM_CONST struct { 7518621f50c3Smrg const char *name; 7519621f50c3Smrg void *address; 7520621f50c3Smrg} 7521621f50c3Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7522621f50c3Smrg{ 7523621f50c3Smrg { "@PROGRAM@", (void *) 0 }, 7524621f50c3Smrg_LT_EOF 7525621f50c3Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7526621f50c3Smrg cat <<\_LT_EOF >> conftest.$ac_ext 7527621f50c3Smrg {0, (void *) 0} 7528621f50c3Smrg}; 7529621f50c3Smrg 7530621f50c3Smrg/* This works around a problem in FreeBSD linker */ 7531621f50c3Smrg#ifdef FREEBSD_WORKAROUND 7532621f50c3Smrgstatic const void *lt_preloaded_setup() { 7533621f50c3Smrg return lt__PROGRAM__LTX_preloaded_symbols; 7534621f50c3Smrg} 7535621f50c3Smrg#endif 7536dc407927Smrg 7537621f50c3Smrg#ifdef __cplusplus 7538621f50c3Smrg} 7539621f50c3Smrg#endif 7540621f50c3Smrg_LT_EOF 7541621f50c3Smrg # Now try linking the two files. 7542621f50c3Smrg mv conftest.$ac_objext conftstm.$ac_objext 7543621f50c3Smrg lt_globsym_save_LIBS=$LIBS 7544621f50c3Smrg lt_globsym_save_CFLAGS=$CFLAGS 7545621f50c3Smrg LIBS=conftstm.$ac_objext 7546621f50c3Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7547621f50c3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7548621f50c3Smrg pipe_works=yes 7549621f50c3Smrg fi 7550621f50c3Smrg LIBS=$lt_globsym_save_LIBS 7551621f50c3Smrg CFLAGS=$lt_globsym_save_CFLAGS 7552621f50c3Smrg else 7553621f50c3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7554621f50c3Smrg fi 7555621f50c3Smrg else 7556621f50c3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7557621f50c3Smrg fi 7558621f50c3Smrg else 7559621f50c3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7560621f50c3Smrg fi 7561621f50c3Smrg else 7562621f50c3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7563621f50c3Smrg cat conftest.$ac_ext >&5 7564621f50c3Smrg fi 7565621f50c3Smrg rm -rf conftest* conftst* 75663eed67faSmbalmer 7567621f50c3Smrg # Do not use the global_symbol_pipe unless it works. 7568621f50c3Smrg if test yes = "$pipe_works"; then 7569621f50c3Smrg break 7570621f50c3Smrg else 7571621f50c3Smrg lt_cv_sys_global_symbol_pipe= 7572621f50c3Smrg fi 7573621f50c3Smrgdone 7574621f50c3Smrg]) 7575621f50c3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7576621f50c3Smrg lt_cv_sys_global_symbol_to_cdecl= 7577621f50c3Smrgfi 7578621f50c3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7579621f50c3Smrg AC_MSG_RESULT(failed) 7580621f50c3Smrgelse 7581621f50c3Smrg AC_MSG_RESULT(ok) 7582621f50c3Smrgfi 75833eed67faSmbalmer 7584621f50c3Smrg# Response file support. 7585621f50c3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7586621f50c3Smrg nm_file_list_spec='@' 7587621f50c3Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7588621f50c3Smrg nm_file_list_spec='@' 7589621f50c3Smrgfi 75903eed67faSmbalmer 7591621f50c3Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7592621f50c3Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 7593621f50c3Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7594621f50c3Smrg [Transform the output of nm in a proper C declaration]) 7595621f50c3Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7596621f50c3Smrg [Transform the output of nm into a list of symbols to manually relocate]) 7597621f50c3Smrg_LT_DECL([global_symbol_to_c_name_address], 7598621f50c3Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7599621f50c3Smrg [Transform the output of nm in a C name address pair]) 7600621f50c3Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7601621f50c3Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7602621f50c3Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7603621f50c3Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7604621f50c3Smrg [The name lister interface]) 7605621f50c3Smrg_LT_DECL([], [nm_file_list_spec], [1], 7606621f50c3Smrg [Specify filename containing input files for $NM]) 7607621f50c3Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 76083eed67faSmbalmer 76093eed67faSmbalmer 7610621f50c3Smrg# _LT_COMPILER_PIC([TAGNAME]) 7611621f50c3Smrg# --------------------------- 7612621f50c3Smrgm4_defun([_LT_COMPILER_PIC], 7613621f50c3Smrg[m4_require([_LT_TAG_COMPILER])dnl 7614621f50c3Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7615621f50c3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7616621f50c3Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 76173eed67faSmbalmer 7618621f50c3Smrgm4_if([$1], [CXX], [ 7619621f50c3Smrg # C++ specific cases for pic, static, wl, etc. 7620621f50c3Smrg if test yes = "$GXX"; then 7621621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7622621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 76233eed67faSmbalmer 7624621f50c3Smrg case $host_os in 7625621f50c3Smrg aix*) 7626621f50c3Smrg # All AIX code is PIC. 7627621f50c3Smrg if test ia64 = "$host_cpu"; then 7628621f50c3Smrg # AIX 5 now supports IA64 processor 7629621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7630621f50c3Smrg fi 7631621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7632621f50c3Smrg ;; 76333eed67faSmbalmer 7634621f50c3Smrg amigaos*) 7635621f50c3Smrg case $host_cpu in 7636621f50c3Smrg powerpc) 7637621f50c3Smrg # see comment about AmigaOS4 .so support 7638621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7639621f50c3Smrg ;; 7640621f50c3Smrg m68k) 7641621f50c3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7642621f50c3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7643621f50c3Smrg # like '-m68040'. 7644621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7645621f50c3Smrg ;; 7646621f50c3Smrg esac 7647621f50c3Smrg ;; 76483eed67faSmbalmer 7649621f50c3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7650621f50c3Smrg # PIC is the default for these OSes. 7651621f50c3Smrg ;; 7652621f50c3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7653621f50c3Smrg # This hack is so that the source file can tell whether it is being 7654621f50c3Smrg # built for inclusion in a dll (and should export symbols for example). 7655621f50c3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7656621f50c3Smrg # (--disable-auto-import) libraries 7657621f50c3Smrg m4_if([$1], [GCJ], [], 7658621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7659621f50c3Smrg case $host_os in 7660621f50c3Smrg os2*) 7661621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7662621f50c3Smrg ;; 7663621f50c3Smrg esac 7664621f50c3Smrg ;; 7665621f50c3Smrg darwin* | rhapsody*) 7666621f50c3Smrg # PIC is the default on this platform 7667621f50c3Smrg # Common symbols not allowed in MH_DYLIB files 7668621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7669621f50c3Smrg ;; 7670621f50c3Smrg *djgpp*) 7671621f50c3Smrg # DJGPP does not support shared libraries at all 7672621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7673621f50c3Smrg ;; 7674621f50c3Smrg haiku*) 7675621f50c3Smrg # PIC is the default for Haiku. 7676621f50c3Smrg # The "-static" flag exists, but is broken. 7677621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7678621f50c3Smrg ;; 7679621f50c3Smrg interix[[3-9]]*) 7680621f50c3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7681621f50c3Smrg # Instead, we relocate shared libraries at runtime. 7682621f50c3Smrg ;; 7683621f50c3Smrg sysv4*MP*) 7684621f50c3Smrg if test -d /usr/nec; then 7685621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7686621f50c3Smrg fi 7687621f50c3Smrg ;; 7688621f50c3Smrg hpux*) 7689621f50c3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7690621f50c3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7691621f50c3Smrg # sets the default TLS model and affects inlining. 7692621f50c3Smrg case $host_cpu in 7693621f50c3Smrg hppa*64*) 7694621f50c3Smrg ;; 7695621f50c3Smrg *) 7696621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7697621f50c3Smrg ;; 7698621f50c3Smrg esac 7699621f50c3Smrg ;; 7700621f50c3Smrg *qnx* | *nto*) 7701621f50c3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7702621f50c3Smrg # it will coredump. 7703621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7704621f50c3Smrg ;; 7705621f50c3Smrg *) 7706621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7707621f50c3Smrg ;; 7708621f50c3Smrg esac 7709621f50c3Smrg else 7710621f50c3Smrg case $host_os in 7711621f50c3Smrg aix[[4-9]]*) 7712621f50c3Smrg # All AIX code is PIC. 7713621f50c3Smrg if test ia64 = "$host_cpu"; then 7714621f50c3Smrg # AIX 5 now supports IA64 processor 7715621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7716621f50c3Smrg else 7717621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7718621f50c3Smrg fi 7719621f50c3Smrg ;; 7720621f50c3Smrg chorus*) 7721621f50c3Smrg case $cc_basename in 7722621f50c3Smrg cxch68*) 7723621f50c3Smrg # Green Hills C++ Compiler 7724621f50c3Smrg # _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" 7725621f50c3Smrg ;; 7726621f50c3Smrg esac 7727621f50c3Smrg ;; 7728621f50c3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7729621f50c3Smrg # This hack is so that the source file can tell whether it is being 7730621f50c3Smrg # built for inclusion in a dll (and should export symbols for example). 7731621f50c3Smrg m4_if([$1], [GCJ], [], 7732621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7733621f50c3Smrg ;; 7734621f50c3Smrg dgux*) 7735621f50c3Smrg case $cc_basename in 7736621f50c3Smrg ec++*) 7737621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7738621f50c3Smrg ;; 7739621f50c3Smrg ghcx*) 7740621f50c3Smrg # Green Hills C++ Compiler 7741621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7742621f50c3Smrg ;; 7743621f50c3Smrg *) 7744621f50c3Smrg ;; 7745621f50c3Smrg esac 7746621f50c3Smrg ;; 7747621f50c3Smrg freebsd* | dragonfly* | midnightbsd*) 7748621f50c3Smrg # FreeBSD uses GNU C++ 7749621f50c3Smrg ;; 7750621f50c3Smrg hpux9* | hpux10* | hpux11*) 7751621f50c3Smrg case $cc_basename in 7752621f50c3Smrg CC*) 7753621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7754621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7755621f50c3Smrg if test ia64 != "$host_cpu"; then 7756621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7757621f50c3Smrg fi 7758621f50c3Smrg ;; 7759621f50c3Smrg aCC*) 7760621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7761621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7762621f50c3Smrg case $host_cpu in 7763621f50c3Smrg hppa*64*|ia64*) 7764621f50c3Smrg # +Z the default 7765621f50c3Smrg ;; 7766621f50c3Smrg *) 7767621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7768621f50c3Smrg ;; 7769621f50c3Smrg esac 7770621f50c3Smrg ;; 7771621f50c3Smrg *) 7772621f50c3Smrg ;; 7773621f50c3Smrg esac 7774621f50c3Smrg ;; 7775621f50c3Smrg interix*) 7776621f50c3Smrg # This is c89, which is MS Visual C++ (no shared libs) 7777621f50c3Smrg # Anyone wants to do a port? 7778621f50c3Smrg ;; 7779621f50c3Smrg irix5* | irix6* | nonstopux*) 7780621f50c3Smrg case $cc_basename in 7781621f50c3Smrg CC*) 7782621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7783621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7784621f50c3Smrg # CC pic flag -KPIC is the default. 7785621f50c3Smrg ;; 7786621f50c3Smrg *) 7787621f50c3Smrg ;; 7788621f50c3Smrg esac 7789621f50c3Smrg ;; 7790621f50c3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7791621f50c3Smrg case $cc_basename in 7792621f50c3Smrg KCC*) 7793621f50c3Smrg # KAI C++ Compiler 7794621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7796621f50c3Smrg ;; 7797621f50c3Smrg ecpc* ) 7798621f50c3Smrg # old Intel C++ for x86_64, which still supported -KPIC. 7799621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7800621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7801621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7802621f50c3Smrg ;; 7803621f50c3Smrg icpc* ) 7804621f50c3Smrg # Intel C++, used to be incompatible with GCC. 7805621f50c3Smrg # ICC 10 doesn't accept -KPIC any more. 7806621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7807621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7808621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7809621f50c3Smrg ;; 7810621f50c3Smrg pgCC* | pgcpp*) 7811621f50c3Smrg # Portland Group C++ compiler 7812621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7813621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7814621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7815621f50c3Smrg ;; 7816621f50c3Smrg cxx*) 7817621f50c3Smrg # Compaq C++ 7818621f50c3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7819621f50c3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7820621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7821621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7822621f50c3Smrg ;; 7823621f50c3Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7824621f50c3Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7825621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7826621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7827621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7828621f50c3Smrg ;; 7829621f50c3Smrg *) 7830621f50c3Smrg case `$CC -V 2>&1 | $SED 5q` in 7831621f50c3Smrg *Sun\ C*) 7832621f50c3Smrg # Sun C++ 5.9 7833621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7834621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7835621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7836621f50c3Smrg ;; 7837621f50c3Smrg esac 7838621f50c3Smrg ;; 7839621f50c3Smrg esac 7840621f50c3Smrg ;; 7841621f50c3Smrg lynxos*) 7842621f50c3Smrg ;; 7843621f50c3Smrg m88k*) 7844621f50c3Smrg ;; 7845621f50c3Smrg mvs*) 7846621f50c3Smrg case $cc_basename in 7847621f50c3Smrg cxx*) 7848621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7849621f50c3Smrg ;; 7850621f50c3Smrg *) 7851621f50c3Smrg ;; 7852621f50c3Smrg esac 7853621f50c3Smrg ;; 7854621f50c3Smrg netbsd*) 7855621f50c3Smrg ;; 7856621f50c3Smrg *qnx* | *nto*) 7857621f50c3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7858621f50c3Smrg # it will coredump. 7859621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7860621f50c3Smrg ;; 7861621f50c3Smrg osf3* | osf4* | osf5*) 7862621f50c3Smrg case $cc_basename in 7863621f50c3Smrg KCC*) 7864621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7865621f50c3Smrg ;; 7866621f50c3Smrg RCC*) 7867621f50c3Smrg # Rational C++ 2.4.1 7868621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7869621f50c3Smrg ;; 7870621f50c3Smrg cxx*) 7871621f50c3Smrg # Digital/Compaq C++ 7872621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7873621f50c3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7874621f50c3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7875621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7876621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7877621f50c3Smrg ;; 7878621f50c3Smrg *) 7879621f50c3Smrg ;; 7880621f50c3Smrg esac 7881621f50c3Smrg ;; 7882621f50c3Smrg psos*) 7883621f50c3Smrg ;; 7884621f50c3Smrg solaris*) 7885621f50c3Smrg case $cc_basename in 7886621f50c3Smrg CC* | sunCC*) 7887621f50c3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7888621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7889621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7890621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7891621f50c3Smrg ;; 7892621f50c3Smrg gcx*) 7893621f50c3Smrg # Green Hills C++ Compiler 7894621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7895621f50c3Smrg ;; 7896621f50c3Smrg *) 7897621f50c3Smrg ;; 7898621f50c3Smrg esac 7899621f50c3Smrg ;; 7900621f50c3Smrg sunos4*) 7901621f50c3Smrg case $cc_basename in 7902621f50c3Smrg CC*) 7903621f50c3Smrg # Sun C++ 4.x 7904621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7906621f50c3Smrg ;; 7907621f50c3Smrg lcc*) 7908621f50c3Smrg # Lucid 7909621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7910621f50c3Smrg ;; 7911621f50c3Smrg *) 7912621f50c3Smrg ;; 7913621f50c3Smrg esac 7914621f50c3Smrg ;; 7915621f50c3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7916621f50c3Smrg case $cc_basename in 7917621f50c3Smrg CC*) 7918621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7919621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7920621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7921621f50c3Smrg ;; 7922621f50c3Smrg esac 7923621f50c3Smrg ;; 7924621f50c3Smrg tandem*) 7925621f50c3Smrg case $cc_basename in 7926621f50c3Smrg NCC*) 7927621f50c3Smrg # NonStop-UX NCC 3.20 7928621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7929621f50c3Smrg ;; 7930621f50c3Smrg *) 7931621f50c3Smrg ;; 7932621f50c3Smrg esac 7933621f50c3Smrg ;; 7934621f50c3Smrg vxworks*) 7935621f50c3Smrg ;; 7936621f50c3Smrg *) 7937621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7938621f50c3Smrg ;; 7939621f50c3Smrg esac 7940621f50c3Smrg fi 7941621f50c3Smrg], 7942621f50c3Smrg[ 7943621f50c3Smrg if test yes = "$GCC"; then 7944621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7945621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 79463eed67faSmbalmer 7947621f50c3Smrg case $host_os in 7948621f50c3Smrg aix*) 7949621f50c3Smrg # All AIX code is PIC. 7950621f50c3Smrg if test ia64 = "$host_cpu"; then 7951621f50c3Smrg # AIX 5 now supports IA64 processor 7952621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7953621f50c3Smrg fi 7954621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7955621f50c3Smrg ;; 79563eed67faSmbalmer 7957621f50c3Smrg amigaos*) 7958621f50c3Smrg case $host_cpu in 7959621f50c3Smrg powerpc) 7960621f50c3Smrg # see comment about AmigaOS4 .so support 7961621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7962621f50c3Smrg ;; 7963621f50c3Smrg m68k) 7964621f50c3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7965621f50c3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7966621f50c3Smrg # like '-m68040'. 7967621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7968621f50c3Smrg ;; 7969621f50c3Smrg esac 7970621f50c3Smrg ;; 79713eed67faSmbalmer 7972621f50c3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7973621f50c3Smrg # PIC is the default for these OSes. 7974621f50c3Smrg ;; 79753eed67faSmbalmer 7976621f50c3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7977621f50c3Smrg # This hack is so that the source file can tell whether it is being 7978621f50c3Smrg # built for inclusion in a dll (and should export symbols for example). 7979621f50c3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7980621f50c3Smrg # (--disable-auto-import) libraries 7981621f50c3Smrg m4_if([$1], [GCJ], [], 7982621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7983621f50c3Smrg case $host_os in 7984621f50c3Smrg os2*) 7985621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7986621f50c3Smrg ;; 7987621f50c3Smrg esac 7988621f50c3Smrg ;; 79893eed67faSmbalmer 7990621f50c3Smrg darwin* | rhapsody*) 7991621f50c3Smrg # PIC is the default on this platform 7992621f50c3Smrg # Common symbols not allowed in MH_DYLIB files 7993621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7994621f50c3Smrg ;; 79953eed67faSmbalmer 7996621f50c3Smrg haiku*) 7997621f50c3Smrg # PIC is the default for Haiku. 7998621f50c3Smrg # The "-static" flag exists, but is broken. 7999621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8000621f50c3Smrg ;; 80013eed67faSmbalmer 8002621f50c3Smrg hpux*) 8003621f50c3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8004621f50c3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8005621f50c3Smrg # sets the default TLS model and affects inlining. 8006621f50c3Smrg case $host_cpu in 8007621f50c3Smrg hppa*64*) 8008621f50c3Smrg # +Z the default 8009621f50c3Smrg ;; 8010621f50c3Smrg *) 8011621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8012621f50c3Smrg ;; 8013621f50c3Smrg esac 8014621f50c3Smrg ;; 80153eed67faSmbalmer 8016621f50c3Smrg interix[[3-9]]*) 8017621f50c3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8018621f50c3Smrg # Instead, we relocate shared libraries at runtime. 8019621f50c3Smrg ;; 80203eed67faSmbalmer 8021621f50c3Smrg msdosdjgpp*) 8022621f50c3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8023621f50c3Smrg # on systems that don't support them. 8024621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8025dc407927Smrg enable_shared=no 80263eed67faSmbalmer ;; 80273eed67faSmbalmer 8028621f50c3Smrg *nto* | *qnx*) 8029621f50c3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8030621f50c3Smrg # it will coredump. 8031621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8032621f50c3Smrg ;; 80333eed67faSmbalmer 8034621f50c3Smrg sysv4*MP*) 8035621f50c3Smrg if test -d /usr/nec; then 8036621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8037621f50c3Smrg fi 8038621f50c3Smrg ;; 80393eed67faSmbalmer 8040621f50c3Smrg *) 8041621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8042621f50c3Smrg ;; 8043621f50c3Smrg esac 80443eed67faSmbalmer 8045621f50c3Smrg case $cc_basename in 8046621f50c3Smrg nvcc*) # Cuda Compiler Driver 2.2 8047621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8048621f50c3Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8049621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8050621f50c3Smrg fi 8051621f50c3Smrg ;; 8052621f50c3Smrg esac 8053621f50c3Smrg else 8054621f50c3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 8055621f50c3Smrg case $host_os in 8056621f50c3Smrg aix*) 8057621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8058621f50c3Smrg if test ia64 = "$host_cpu"; then 8059621f50c3Smrg # AIX 5 now supports IA64 processor 8060621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8061621f50c3Smrg else 8062621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8063621f50c3Smrg fi 8064621f50c3Smrg ;; 80653eed67faSmbalmer 8066621f50c3Smrg darwin* | rhapsody*) 8067621f50c3Smrg # PIC is the default on this platform 8068621f50c3Smrg # Common symbols not allowed in MH_DYLIB files 8069621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8070621f50c3Smrg case $cc_basename in 8071621f50c3Smrg nagfor*) 8072621f50c3Smrg # NAG Fortran compiler 8073621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8074621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8075621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8076621f50c3Smrg ;; 8077621f50c3Smrg esac 8078621f50c3Smrg ;; 80793eed67faSmbalmer 8080621f50c3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8081621f50c3Smrg # This hack is so that the source file can tell whether it is being 8082621f50c3Smrg # built for inclusion in a dll (and should export symbols for example). 8083621f50c3Smrg m4_if([$1], [GCJ], [], 8084621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8085621f50c3Smrg case $host_os in 8086621f50c3Smrg os2*) 8087621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8088621f50c3Smrg ;; 8089621f50c3Smrg esac 8090621f50c3Smrg ;; 80913eed67faSmbalmer 8092621f50c3Smrg hpux9* | hpux10* | hpux11*) 8093621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094621f50c3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8095621f50c3Smrg # not for PA HP-UX. 8096621f50c3Smrg case $host_cpu in 8097621f50c3Smrg hppa*64*|ia64*) 8098621f50c3Smrg # +Z the default 8099621f50c3Smrg ;; 8100621f50c3Smrg *) 8101621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8102621f50c3Smrg ;; 8103621f50c3Smrg esac 8104621f50c3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8105621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8106621f50c3Smrg ;; 81073eed67faSmbalmer 8108621f50c3Smrg irix5* | irix6* | nonstopux*) 8109621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8110621f50c3Smrg # PIC (with -KPIC) is the default. 8111621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8112621f50c3Smrg ;; 81133eed67faSmbalmer 8114621f50c3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8115621f50c3Smrg case $cc_basename in 8116621f50c3Smrg # old Intel for x86_64, which still supported -KPIC. 8117621f50c3Smrg ecc*) 8118621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8119621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8120621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8121621f50c3Smrg ;; 8122621f50c3Smrg # icc used to be incompatible with GCC. 8123621f50c3Smrg # ICC 10 doesn't accept -KPIC any more. 8124621f50c3Smrg icc* | ifort*) 8125621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8126621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8127621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8128621f50c3Smrg ;; 8129621f50c3Smrg # Lahey Fortran 8.1. 8130621f50c3Smrg lf95*) 8131621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8132621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8133621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8134621f50c3Smrg ;; 8135621f50c3Smrg nagfor*) 8136621f50c3Smrg # NAG Fortran compiler 8137621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8138621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8139621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8140621f50c3Smrg ;; 8141621f50c3Smrg tcc*) 8142621f50c3Smrg # Fabrice Bellard et al's Tiny C Compiler 8143621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8144621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8145621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8146621f50c3Smrg ;; 8147621f50c3Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8148621f50c3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8149621f50c3Smrg # which looks to be a dead project) 8150621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8151621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8152621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153621f50c3Smrg ;; 8154621f50c3Smrg ccc*) 8155621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8156621f50c3Smrg # All Alpha code is PIC. 8157621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8158621f50c3Smrg ;; 8159621f50c3Smrg xl* | bgxl* | bgf* | mpixl*) 8160621f50c3Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8161621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8163621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8164621f50c3Smrg ;; 8165621f50c3Smrg *) 8166621f50c3Smrg case `$CC -V 2>&1 | $SED 5q` in 8167621f50c3Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8168621f50c3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8169621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8172621f50c3Smrg ;; 8173621f50c3Smrg *Sun\ F* | *Sun*Fortran*) 8174621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8175621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8177621f50c3Smrg ;; 8178621f50c3Smrg *Sun\ C*) 8179621f50c3Smrg # Sun C 5.9 8180621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8181621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8182621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8183621f50c3Smrg ;; 8184621f50c3Smrg *Intel*\ [[CF]]*Compiler*) 8185621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8186621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8187621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8188621f50c3Smrg ;; 8189621f50c3Smrg *Portland\ Group*) 8190621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8191621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8192621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8193621f50c3Smrg ;; 8194621f50c3Smrg esac 8195621f50c3Smrg ;; 8196621f50c3Smrg esac 81973eed67faSmbalmer ;; 81983eed67faSmbalmer 8199621f50c3Smrg newsos6) 8200621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8201621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8202621f50c3Smrg ;; 82033eed67faSmbalmer 8204621f50c3Smrg *nto* | *qnx*) 8205621f50c3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8206621f50c3Smrg # it will coredump. 8207621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8208621f50c3Smrg ;; 8209dc407927Smrg 8210621f50c3Smrg osf3* | osf4* | osf5*) 8211621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8212621f50c3Smrg # All OSF/1 code is PIC. 8213621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8214621f50c3Smrg ;; 8215dc407927Smrg 8216621f50c3Smrg rdos*) 8217621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8218621f50c3Smrg ;; 8219dc407927Smrg 8220621f50c3Smrg solaris*) 8221621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8222621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8223621f50c3Smrg case $cc_basename in 8224621f50c3Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8225621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8226621f50c3Smrg *) 8227621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8228621f50c3Smrg esac 8229621f50c3Smrg ;; 8230dc407927Smrg 8231621f50c3Smrg sunos4*) 8232621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8233621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8234621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8235621f50c3Smrg ;; 8236dc407927Smrg 8237621f50c3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8238621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8239621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8240621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8241621f50c3Smrg ;; 8242dc407927Smrg 8243621f50c3Smrg sysv4*MP*) 8244621f50c3Smrg if test -d /usr/nec; then 8245621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8246621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8247621f50c3Smrg fi 8248621f50c3Smrg ;; 8249dc407927Smrg 8250621f50c3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8251621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8252621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8253621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82543eed67faSmbalmer ;; 82553eed67faSmbalmer 8256621f50c3Smrg unicos*) 8257621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8258621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8259621f50c3Smrg ;; 82603eed67faSmbalmer 8261621f50c3Smrg uts4*) 8262621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8263621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8264621f50c3Smrg ;; 82653eed67faSmbalmer 8266621f50c3Smrg *) 8267621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8268621f50c3Smrg ;; 8269621f50c3Smrg esac 8270621f50c3Smrg fi 8271dc407927Smrg]) 8272621f50c3Smrgcase $host_os in 8273621f50c3Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8274621f50c3Smrg *djgpp*) 8275621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8276621f50c3Smrg ;; 8277621f50c3Smrg *) 8278621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8279621f50c3Smrg ;; 8280621f50c3Smrgesac 82813eed67faSmbalmer 8282621f50c3SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8283621f50c3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8284621f50c3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8285621f50c3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 82863eed67faSmbalmer 8287621f50c3Smrg# 8288621f50c3Smrg# Check to make sure the PIC flag actually works. 8289621f50c3Smrg# 8290621f50c3Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8291621f50c3Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8292621f50c3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8293621f50c3Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8294621f50c3Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8295621f50c3Smrg "" | " "*) ;; 8296621f50c3Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8297621f50c3Smrg esac], 8298621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8299621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8300621f50c3Smrgfi 8301621f50c3Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8302621f50c3Smrg [Additional compiler flags for building library objects]) 8303621f50c3Smrg 8304621f50c3Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8305621f50c3Smrg [How to pass a linker flag through the compiler]) 8306621f50c3Smrg# 8307621f50c3Smrg# Check to make sure the static flag actually works. 8308621f50c3Smrg# 8309621f50c3Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8310621f50c3Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8311621f50c3Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8312621f50c3Smrg $lt_tmp_static_flag, 8313621f50c3Smrg [], 8314621f50c3Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8315621f50c3Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8316621f50c3Smrg [Compiler flag to prevent dynamic linking]) 8317621f50c3Smrg])# _LT_COMPILER_PIC 83183eed67faSmbalmer 83193eed67faSmbalmer 8320621f50c3Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 8321621f50c3Smrg# ---------------------------- 8322621f50c3Smrg# See if the linker supports building shared libraries. 8323621f50c3Smrgm4_defun([_LT_LINKER_SHLIBS], 8324621f50c3Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8325621f50c3SmrgAC_REQUIRE([LT_PATH_NM])dnl 8326621f50c3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8327621f50c3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8328621f50c3Smrgm4_require([_LT_DECL_EGREP])dnl 8329621f50c3Smrgm4_require([_LT_DECL_SED])dnl 8330621f50c3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8331621f50c3Smrgm4_require([_LT_TAG_COMPILER])dnl 8332621f50c3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8333621f50c3Smrgm4_if([$1], [CXX], [ 8334621f50c3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8335621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8336621f50c3Smrg case $host_os in 8337621f50c3Smrg aix[[4-9]]*) 8338621f50c3Smrg # If we're using GNU nm, then we don't want the "-C" option. 8339621f50c3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8340621f50c3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8341621f50c3Smrg # weak defined symbols like other global defined symbols, whereas 8342621f50c3Smrg # GNU nm marks them as "W". 8343621f50c3Smrg # While the 'weak' keyword is ignored in the Export File, we need 8344621f50c3Smrg # it in the Import File for the 'aix-soname' feature, so we have 8345621f50c3Smrg # to replace the "-B" option with "-P" for AIX nm. 8346621f50c3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8347621f50c3Smrg _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' 8348621f50c3Smrg else 8349621f50c3Smrg _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' 8350621f50c3Smrg fi 8351621f50c3Smrg ;; 8352621f50c3Smrg pw32*) 8353621f50c3Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8354621f50c3Smrg ;; 8355621f50c3Smrg cygwin* | mingw* | cegcc*) 8356621f50c3Smrg case $cc_basename in 8357621f50c3Smrg cl* | icl*) 8358621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 83591a9c160aSmrg ;; 83601a9c160aSmrg *) 8361621f50c3Smrg _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' 8362621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 83631a9c160aSmrg ;; 83641a9c160aSmrg esac 8365621f50c3Smrg ;; 8366621f50c3Smrg *) 8367621f50c3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8368621f50c3Smrg ;; 8369621f50c3Smrg esac 8370621f50c3Smrg], [ 8371621f50c3Smrg runpath_var= 8372621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8373621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8374621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)= 8375621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8376621f50c3Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8377621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8378621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8379621f50c3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8380621f50c3Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8381621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8382621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8383621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8384621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8385621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8386621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8387621f50c3Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8388621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8389621f50c3Smrg _LT_TAGVAR(module_cmds, $1)= 8390621f50c3Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8391621f50c3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8392621f50c3Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8393621f50c3Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8394621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8395621f50c3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8396621f50c3Smrg # included in the symbol list 8397621f50c3Smrg _LT_TAGVAR(include_expsyms, $1)= 8398621f50c3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8399621f50c3Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8400621f50c3Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8401621f50c3Smrg # as well as any symbol that contains 'd'. 8402621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8403621f50c3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8404621f50c3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8405621f50c3Smrg # the symbol is explicitly referenced. Since portable code cannot 8406621f50c3Smrg # rely on this symbol name, it's probably fine to never include it in 8407621f50c3Smrg # preloaded symbol tables. 8408621f50c3Smrg # Exclude shared library initialization/finalization symbols. 8409621f50c3Smrgdnl Note also adjust exclude_expsyms for C++ above. 8410621f50c3Smrg extract_expsyms_cmds= 8411621f50c3Smrg 8412621f50c3Smrg case $host_os in 8413621f50c3Smrg cygwin* | mingw* | pw32* | cegcc*) 8414621f50c3Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8415621f50c3Smrg # When not using gcc, we currently assume that we are using 8416621f50c3Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8417621f50c3Smrg if test yes != "$GCC"; then 8418621f50c3Smrg with_gnu_ld=no 84191a9c160aSmrg fi 8420621f50c3Smrg ;; 8421621f50c3Smrg interix*) 8422621f50c3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8423621f50c3Smrg with_gnu_ld=yes 8424621f50c3Smrg ;; 8425621f50c3Smrg openbsd* | bitrig*) 8426621f50c3Smrg with_gnu_ld=no 8427621f50c3Smrg ;; 8428621f50c3Smrg esac 8429621f50c3Smrg 8430621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8431621f50c3Smrg 8432621f50c3Smrg # On some targets, GNU ld is compatible enough with the native linker 8433621f50c3Smrg # that we're better off using the native interface for both. 8434621f50c3Smrg lt_use_gnu_ld_interface=no 8435621f50c3Smrg if test yes = "$with_gnu_ld"; then 8436621f50c3Smrg case $host_os in 8437621f50c3Smrg aix*) 8438621f50c3Smrg # The AIX port of GNU ld has always aspired to compatibility 8439621f50c3Smrg # with the native linker. However, as the warning in the GNU ld 8440621f50c3Smrg # block says, versions before 2.19.5* couldn't really create working 8441621f50c3Smrg # shared libraries, regardless of the interface used. 8442621f50c3Smrg case `$LD -v 2>&1` in 8443621f50c3Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8444621f50c3Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8445621f50c3Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8446621f50c3Smrg *) 8447621f50c3Smrg lt_use_gnu_ld_interface=yes 8448621f50c3Smrg ;; 8449621f50c3Smrg esac 8450621f50c3Smrg ;; 8451621f50c3Smrg *) 8452621f50c3Smrg lt_use_gnu_ld_interface=yes 8453621f50c3Smrg ;; 8454621f50c3Smrg esac 84551a9c160aSmrg fi 84561a9c160aSmrg 8457621f50c3Smrg if test yes = "$lt_use_gnu_ld_interface"; then 8458621f50c3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8459621f50c3Smrg wlarc='$wl' 8460621f50c3Smrg 8461621f50c3Smrg # Set some defaults for GNU ld with shared library support. These 8462621f50c3Smrg # are reset later if shared libraries are not supported. Putting them 8463621f50c3Smrg # here allows them to be overridden if necessary. 8464621f50c3Smrg runpath_var=LD_RUN_PATH 8465621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8466621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8467621f50c3Smrg # ancient GNU ld didn't support --whole-archive et. al. 8468621f50c3Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8469621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8470621f50c3Smrg else 8471621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8472621f50c3Smrg fi 8473621f50c3Smrg supports_anon_versioning=no 8474621f50c3Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8475621f50c3Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 8476621f50c3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8477621f50c3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8478621f50c3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8479621f50c3Smrg *\ 2.11.*) ;; # other 2.11 versions 8480621f50c3Smrg *) supports_anon_versioning=yes ;; 8481621f50c3Smrg esac 8482621f50c3Smrg 8483621f50c3Smrg # See if GNU ld supports shared libraries. 8484621f50c3Smrg case $host_os in 8485621f50c3Smrg aix[[3-9]]*) 8486621f50c3Smrg # On AIX/PPC, the GNU linker is very broken 8487621f50c3Smrg if test ia64 != "$host_cpu"; then 8488621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8489621f50c3Smrg cat <<_LT_EOF 1>&2 8490621f50c3Smrg 8491621f50c3Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8492621f50c3Smrg*** to be unable to reliably create shared libraries on AIX. 8493621f50c3Smrg*** Therefore, libtool is disabling shared libraries support. If you 8494621f50c3Smrg*** really care for shared libraries, you may want to install binutils 8495621f50c3Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8496621f50c3Smrg*** You will then need to restart the configuration process. 84971a9c160aSmrg 8498621f50c3Smrg_LT_EOF 8499621f50c3Smrg fi 8500621f50c3Smrg ;; 85011a9c160aSmrg 8502621f50c3Smrg amigaos*) 8503621f50c3Smrg case $host_cpu in 8504621f50c3Smrg powerpc) 8505621f50c3Smrg # see comment about AmigaOS4 .so support 8506621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8507621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8508621f50c3Smrg ;; 8509621f50c3Smrg m68k) 8510621f50c3Smrg _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)' 8511621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8512621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8513621f50c3Smrg ;; 8514621f50c3Smrg esac 8515621f50c3Smrg ;; 85161a9c160aSmrg 8517621f50c3Smrg beos*) 8518621f50c3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8519621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8520621f50c3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8521621f50c3Smrg # support --undefined. This deserves some investigation. FIXME 8522621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8523621f50c3Smrg else 8524621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8525621f50c3Smrg fi 852675cbef56Smrg ;; 8527dc407927Smrg 8528621f50c3Smrg cygwin* | mingw* | pw32* | cegcc*) 8529621f50c3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8530621f50c3Smrg # as there is no search path for DLLs. 8531621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8532621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8533621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8534621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8535621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8536621f50c3Smrg _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' 8537621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538dc407927Smrg 8539621f50c3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8540621f50c3Smrg _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' 8541621f50c3Smrg # If the export-symbols file already is a .def file, use it as 8542621f50c3Smrg # is; otherwise, prepend EXPORTS... 8543621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8544621f50c3Smrg cp $export_symbols $output_objdir/$soname.def; 8545621f50c3Smrg else 8546621f50c3Smrg echo EXPORTS > $output_objdir/$soname.def; 8547621f50c3Smrg cat $export_symbols >> $output_objdir/$soname.def; 8548621f50c3Smrg fi~ 8549621f50c3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8550621f50c3Smrg else 8551621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8552621f50c3Smrg fi 8553621f50c3Smrg ;; 8554dc407927Smrg 8555621f50c3Smrg haiku*) 8556621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8557621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8558621f50c3Smrg ;; 85593eed67faSmbalmer 8560621f50c3Smrg os2*) 8561621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8562621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8563621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8564621f50c3Smrg shrext_cmds=.dll 8565621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8566621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8567621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8568621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8569621f50c3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8570621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8571621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 8572621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8573621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8574621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8575621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8576621f50c3Smrg prefix_cmds="$SED"~ 8577621f50c3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8578621f50c3Smrg prefix_cmds="$prefix_cmds -e 1d"; 8579621f50c3Smrg fi~ 8580621f50c3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8581621f50c3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8582621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8583621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 8584621f50c3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8585621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8586621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8587621f50c3Smrg ;; 8588dc407927Smrg 8589621f50c3Smrg interix[[3-9]]*) 8590621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8591621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8592621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8593621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8594621f50c3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8595621f50c3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8596621f50c3Smrg # default) and relocated if they conflict, which is a slow very memory 8597621f50c3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8598621f50c3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8599621f50c3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8600621f50c3Smrg _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' 8601621f50c3Smrg _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' 8602621f50c3Smrg ;; 8603dc407927Smrg 8604621f50c3Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8605621f50c3Smrg tmp_diet=no 8606621f50c3Smrg if test linux-dietlibc = "$host_os"; then 8607621f50c3Smrg case $cc_basename in 8608621f50c3Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8609621f50c3Smrg esac 8610621f50c3Smrg fi 8611621f50c3Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8612621f50c3Smrg && test no = "$tmp_diet" 8613621f50c3Smrg then 8614621f50c3Smrg tmp_addflag=' $pic_flag' 8615621f50c3Smrg tmp_sharedflag='-shared' 8616621f50c3Smrg case $cc_basename,$host_cpu in 8617621f50c3Smrg pgcc*) # Portland Group C compiler 8618621f50c3Smrg _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' 8619621f50c3Smrg tmp_addflag=' $pic_flag' 8620621f50c3Smrg ;; 8621621f50c3Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 8622621f50c3Smrg # Portland Group f77 and f90 compilers 8623621f50c3Smrg _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' 8624621f50c3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 8625621f50c3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8626621f50c3Smrg tmp_addflag=' -i_dynamic' ;; 8627621f50c3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8628621f50c3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8629621f50c3Smrg ifc* | ifort*) # Intel Fortran compiler 8630621f50c3Smrg tmp_addflag=' -nofor_main' ;; 8631621f50c3Smrg lf95*) # Lahey Fortran 8.1 8632621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8633621f50c3Smrg tmp_sharedflag='--shared' ;; 8634621f50c3Smrg nagfor*) # NAGFOR 5.3 8635621f50c3Smrg tmp_sharedflag='-Wl,-shared' ;; 8636621f50c3Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8637621f50c3Smrg tmp_sharedflag='-qmkshrobj' 8638621f50c3Smrg tmp_addflag= ;; 8639621f50c3Smrg nvcc*) # Cuda Compiler Driver 2.2 8640621f50c3Smrg _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' 8641621f50c3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8642621f50c3Smrg ;; 8643621f50c3Smrg esac 8644621f50c3Smrg case `$CC -V 2>&1 | $SED 5q` in 8645621f50c3Smrg *Sun\ C*) # Sun C 5.9 8646621f50c3Smrg _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' 8647621f50c3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8648621f50c3Smrg tmp_sharedflag='-G' ;; 8649621f50c3Smrg *Sun\ F*) # Sun Fortran 8.3 8650621f50c3Smrg tmp_sharedflag='-G' ;; 8651621f50c3Smrg esac 8652621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653dc407927Smrg 8654621f50c3Smrg if test yes = "$supports_anon_versioning"; then 8655621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8656621f50c3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8657621f50c3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8658621f50c3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8659621f50c3Smrg fi 8660dc407927Smrg 8661621f50c3Smrg case $cc_basename in 8662621f50c3Smrg tcc*) 8663621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8664621f50c3Smrg ;; 8665621f50c3Smrg xlf* | bgf* | bgxlf* | mpixlf*) 8666621f50c3Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8667621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8668621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8669621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8670621f50c3Smrg if test yes = "$supports_anon_versioning"; then 8671621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8672621f50c3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8673621f50c3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8674621f50c3Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8675621f50c3Smrg fi 8676621f50c3Smrg ;; 8677621f50c3Smrg esac 8678621f50c3Smrg else 8679621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8680621f50c3Smrg fi 8681621f50c3Smrg ;; 8682621f50c3Smrg 8683621f50c3Smrg netbsd*) 8684621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8685621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8686621f50c3Smrg wlarc= 8687621f50c3Smrg else 8688621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689621f50c3Smrg _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' 8690621f50c3Smrg fi 8691621f50c3Smrg ;; 8692621f50c3Smrg 8693621f50c3Smrg solaris*) 8694621f50c3Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8695621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8696621f50c3Smrg cat <<_LT_EOF 1>&2 86973eed67faSmbalmer 8698621f50c3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8699621f50c3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 8700621f50c3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8701621f50c3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 8702621f50c3Smrg*** your PATH or compiler configuration so that the native linker is 8703621f50c3Smrg*** used, and then restart. 87043eed67faSmbalmer 8705621f50c3Smrg_LT_EOF 8706621f50c3Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8707621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8708621f50c3Smrg _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' 8709621f50c3Smrg else 8710621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8711621f50c3Smrg fi 8712621f50c3Smrg ;; 87133eed67faSmbalmer 8714621f50c3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8715621f50c3Smrg case `$LD -v 2>&1` in 8716621f50c3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8717621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8718621f50c3Smrg cat <<_LT_EOF 1>&2 87193eed67faSmbalmer 8720621f50c3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8721621f50c3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8722621f50c3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8723621f50c3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8724621f50c3Smrg*** your PATH or compiler configuration so that the native linker is 8725621f50c3Smrg*** used, and then restart. 8726dc407927Smrg 8727621f50c3Smrg_LT_EOF 8728621f50c3Smrg ;; 8729621f50c3Smrg *) 8730621f50c3Smrg # For security reasons, it is highly recommended that you always 8731621f50c3Smrg # use absolute paths for naming shared libraries, and exclude the 8732621f50c3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 8733621f50c3Smrg # requires that you compile everything twice, which is a pain. 8734621f50c3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8735621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8736621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8737621f50c3Smrg _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' 8738621f50c3Smrg else 8739621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8740621f50c3Smrg fi 8741621f50c3Smrg ;; 8742621f50c3Smrg esac 8743621f50c3Smrg ;; 8744dc407927Smrg 8745621f50c3Smrg sunos4*) 8746621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8747621f50c3Smrg wlarc= 8748621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8749621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8750621f50c3Smrg ;; 8751dc407927Smrg 8752621f50c3Smrg *) 8753621f50c3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8754621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8755621f50c3Smrg _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' 8756621f50c3Smrg else 8757621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8758621f50c3Smrg fi 8759621f50c3Smrg ;; 8760621f50c3Smrg esac 8761dc407927Smrg 8762621f50c3Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8763621f50c3Smrg runpath_var= 8764621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8765621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8766621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8767621f50c3Smrg fi 8768621f50c3Smrg else 8769621f50c3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 8770621f50c3Smrg case $host_os in 8771621f50c3Smrg aix3*) 8772621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8773621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8774621f50c3Smrg _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' 8775621f50c3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 8776621f50c3Smrg # are no directories specified by -L. 8777621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8778621f50c3Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8779621f50c3Smrg # Neither direct hardcoding nor static linking is supported with a 8780621f50c3Smrg # broken collect2. 8781621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8782621f50c3Smrg fi 8783621f50c3Smrg ;; 8784621f50c3Smrg 8785621f50c3Smrg aix[[4-9]]*) 8786621f50c3Smrg if test ia64 = "$host_cpu"; then 8787621f50c3Smrg # On IA64, the linker does run time linking by default, so we don't 8788621f50c3Smrg # have to do anything special. 8789621f50c3Smrg aix_use_runtimelinking=no 8790621f50c3Smrg exp_sym_flag='-Bexport' 8791621f50c3Smrg no_entry_flag= 8792621f50c3Smrg else 8793621f50c3Smrg # If we're using GNU nm, then we don't want the "-C" option. 8794621f50c3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8795621f50c3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8796621f50c3Smrg # weak defined symbols like other global defined symbols, whereas 8797621f50c3Smrg # GNU nm marks them as "W". 8798621f50c3Smrg # While the 'weak' keyword is ignored in the Export File, we need 8799621f50c3Smrg # it in the Import File for the 'aix-soname' feature, so we have 8800621f50c3Smrg # to replace the "-B" option with "-P" for AIX nm. 8801621f50c3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8802621f50c3Smrg _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' 8803621f50c3Smrg else 8804621f50c3Smrg _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' 8805621f50c3Smrg fi 8806621f50c3Smrg aix_use_runtimelinking=no 8807dc407927Smrg 8808621f50c3Smrg # Test if we are trying to use run time linking or normal 8809621f50c3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8810621f50c3Smrg # have runtime linking enabled, and use it for executables. 8811621f50c3Smrg # For shared libraries, we enable/disable runtime linking 8812621f50c3Smrg # depending on the kind of the shared library created - 8813621f50c3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 8814621f50c3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8815621f50c3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 8816621f50c3Smrg # lib.a static archive 8817621f50c3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8818621f50c3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 8819621f50c3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8820621f50c3Smrg # lib.a(lib.so.V) shared, rtl:no 8821621f50c3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8822621f50c3Smrg # lib.a static archive 8823621f50c3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8824621f50c3Smrg for ld_flag in $LDFLAGS; do 8825621f50c3Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8826621f50c3Smrg aix_use_runtimelinking=yes 8827621f50c3Smrg break 8828621f50c3Smrg fi 8829621f50c3Smrg done 8830621f50c3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8831621f50c3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8832621f50c3Smrg # so we don't have lib.a shared libs to link our executables. 8833621f50c3Smrg # We have to force runtime linking in this case. 8834621f50c3Smrg aix_use_runtimelinking=yes 8835621f50c3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8836621f50c3Smrg fi 8837621f50c3Smrg ;; 8838621f50c3Smrg esac 8839dc407927Smrg 8840621f50c3Smrg exp_sym_flag='-bexport' 8841621f50c3Smrg no_entry_flag='-bnoentry' 8842621f50c3Smrg fi 8843dc407927Smrg 8844621f50c3Smrg # When large executables or shared objects are built, AIX ld can 8845621f50c3Smrg # have problems creating the table of contents. If linking a library 8846621f50c3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8847621f50c3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8848621f50c3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8849dc407927Smrg 8850621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='' 8851621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8852621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8853621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8854621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8855621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8856621f50c3Smrg case $with_aix_soname,$aix_use_runtimelinking in 8857621f50c3Smrg aix,*) ;; # traditional, no import file 8858621f50c3Smrg svr4,* | *,yes) # use import file 8859621f50c3Smrg # The Import File defines what to hardcode. 8860621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8861621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8862621f50c3Smrg ;; 8863621f50c3Smrg esac 8864dc407927Smrg 8865621f50c3Smrg if test yes = "$GCC"; then 8866621f50c3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8867621f50c3Smrg # We only want to do this on AIX 4.2 and lower, the check 8868621f50c3Smrg # below for broken collect2 doesn't work under 4.3+ 8869621f50c3Smrg collect2name=`$CC -print-prog-name=collect2` 8870621f50c3Smrg if test -f "$collect2name" && 8871621f50c3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8872621f50c3Smrg then 8873621f50c3Smrg # We have reworked collect2 8874621f50c3Smrg : 8875621f50c3Smrg else 8876621f50c3Smrg # We have old collect2 8877621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8878621f50c3Smrg # It fails to find uninstalled libraries when the uninstalled 8879621f50c3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8880621f50c3Smrg # to unsupported forces relinking 8881621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8882621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8883621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8884621f50c3Smrg fi 8885621f50c3Smrg ;; 8886621f50c3Smrg esac 8887621f50c3Smrg shared_flag='-shared' 8888621f50c3Smrg if test yes = "$aix_use_runtimelinking"; then 8889621f50c3Smrg shared_flag="$shared_flag "'$wl-G' 8890621f50c3Smrg fi 8891621f50c3Smrg # Need to ensure runtime linking is disabled for the traditional 8892621f50c3Smrg # shared library, or the linker may eventually find shared libraries 8893621f50c3Smrg # /with/ Import File - we do not want to mix them. 8894621f50c3Smrg shared_flag_aix='-shared' 8895621f50c3Smrg shared_flag_svr4='-shared $wl-G' 8896621f50c3Smrg else 8897621f50c3Smrg # not using gcc 8898621f50c3Smrg if test ia64 = "$host_cpu"; then 8899621f50c3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8900621f50c3Smrg # chokes on -Wl,-G. The following line is correct: 8901621f50c3Smrg shared_flag='-G' 8902621f50c3Smrg else 8903621f50c3Smrg if test yes = "$aix_use_runtimelinking"; then 8904621f50c3Smrg shared_flag='$wl-G' 8905621f50c3Smrg else 8906621f50c3Smrg shared_flag='$wl-bM:SRE' 8907621f50c3Smrg fi 8908621f50c3Smrg shared_flag_aix='$wl-bM:SRE' 8909621f50c3Smrg shared_flag_svr4='$wl-G' 8910621f50c3Smrg fi 8911621f50c3Smrg fi 8912dc407927Smrg 8913621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8914621f50c3Smrg # It seems that -bexpall does not export symbols beginning with 8915621f50c3Smrg # underscore (_), so it is better to generate a list of symbols to export. 8916621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8917621f50c3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8918621f50c3Smrg # Warning - without using the other runtime loading flags (-brtl), 8919621f50c3Smrg # -berok will link without error, but may produce a broken library. 8920621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8921621f50c3Smrg # Determine the default libpath from the value encoded in an 8922621f50c3Smrg # empty executable. 8923621f50c3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8924621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8925621f50c3Smrg _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 8926621f50c3Smrg else 8927621f50c3Smrg if test ia64 = "$host_cpu"; then 8928621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8929621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8930621f50c3Smrg _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" 8931621f50c3Smrg else 8932621f50c3Smrg # Determine the default libpath from the value encoded in an 8933621f50c3Smrg # empty executable. 8934621f50c3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8935621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8936621f50c3Smrg # Warning - without using the other run time loading flags, 8937621f50c3Smrg # -berok will link without error, but may produce a broken library. 8938621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8939621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8940621f50c3Smrg if test yes = "$with_gnu_ld"; then 8941621f50c3Smrg # We only use this code for GNU lds that support --whole-archive. 8942621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8943621f50c3Smrg else 8944621f50c3Smrg # Exported symbols can be pulled into shared objects from archives 8945621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8946621f50c3Smrg fi 8947621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8948621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8949621f50c3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8950621f50c3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8951621f50c3Smrg if test svr4 != "$with_aix_soname"; then 8952621f50c3Smrg # This is similar to how AIX traditionally builds its shared libraries. 8953621f50c3Smrg _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' 8954621f50c3Smrg fi 8955621f50c3Smrg if test aix != "$with_aix_soname"; then 8956621f50c3Smrg _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' 8957621f50c3Smrg else 8958621f50c3Smrg # used by -dlpreopen to get the symbols 8959621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8960621f50c3Smrg fi 8961621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8962621f50c3Smrg fi 8963621f50c3Smrg fi 8964621f50c3Smrg ;; 8965dc407927Smrg 8966621f50c3Smrg amigaos*) 8967621f50c3Smrg case $host_cpu in 8968621f50c3Smrg powerpc) 8969621f50c3Smrg # see comment about AmigaOS4 .so support 8970621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8971621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8972621f50c3Smrg ;; 8973621f50c3Smrg m68k) 8974621f50c3Smrg _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)' 8975621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8976621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8977621f50c3Smrg ;; 8978621f50c3Smrg esac 8979621f50c3Smrg ;; 89803eed67faSmbalmer 8981621f50c3Smrg bsdi[[45]]*) 8982621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8983621f50c3Smrg ;; 89843eed67faSmbalmer 8985621f50c3Smrg cygwin* | mingw* | pw32* | cegcc*) 8986621f50c3Smrg # When not using gcc, we currently assume that we are using 8987621f50c3Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8988621f50c3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8989621f50c3Smrg # no search path for DLLs. 8990621f50c3Smrg case $cc_basename in 8991621f50c3Smrg cl* | icl*) 8992621f50c3Smrg # Native MSVC or ICC 8993621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8994621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8995621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8996621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8997621f50c3Smrg # Tell ltmain to make .lib files, not .a files. 8998621f50c3Smrg libext=lib 8999621f50c3Smrg # Tell ltmain to make .dll files, not .so files. 9000621f50c3Smrg shrext_cmds=.dll 9001621f50c3Smrg # FIXME: Setting linknames here is a bad hack. 9002621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9003621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9004621f50c3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 9005621f50c3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9006621f50c3Smrg else 9007621f50c3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9008621f50c3Smrg fi~ 9009621f50c3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9010621f50c3Smrg linknames=' 9011621f50c3Smrg # The linker will not automatically build a static lib if we build a DLL. 9012621f50c3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9013621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9014621f50c3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9015621f50c3Smrg _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' 9016621f50c3Smrg # Don't use ranlib 9017621f50c3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9018621f50c3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9019621f50c3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9020621f50c3Smrg case $lt_outputfile in 9021621f50c3Smrg *.exe|*.EXE) ;; 9022621f50c3Smrg *) 9023621f50c3Smrg lt_outputfile=$lt_outputfile.exe 9024621f50c3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 9025621f50c3Smrg ;; 9026621f50c3Smrg esac~ 9027621f50c3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9028621f50c3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9029621f50c3Smrg $RM "$lt_outputfile.manifest"; 9030621f50c3Smrg fi' 9031621f50c3Smrg ;; 9032621f50c3Smrg *) 9033621f50c3Smrg # Assume MSVC and ICC wrapper 9034621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9035621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9036621f50c3Smrg # Tell ltmain to make .lib files, not .a files. 9037621f50c3Smrg libext=lib 9038621f50c3Smrg # Tell ltmain to make .dll files, not .so files. 9039621f50c3Smrg shrext_cmds=.dll 9040621f50c3Smrg # FIXME: Setting linknames here is a bad hack. 9041621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9042621f50c3Smrg # The linker will automatically build a .lib file if we build a DLL. 9043621f50c3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9044621f50c3Smrg # FIXME: Should let the user specify the lib program. 9045621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9046621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9047621f50c3Smrg ;; 9048621f50c3Smrg esac 9049621f50c3Smrg ;; 90503eed67faSmbalmer 9051621f50c3Smrg darwin* | rhapsody*) 9052621f50c3Smrg _LT_DARWIN_LINKER_FEATURES($1) 9053621f50c3Smrg ;; 90543eed67faSmbalmer 9055621f50c3Smrg dgux*) 9056621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9057621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9058621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9059621f50c3Smrg ;; 9060dc407927Smrg 9061621f50c3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9062621f50c3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 9063621f50c3Smrg # does not break anything, and helps significantly (at the cost of a little 9064621f50c3Smrg # extra space). 9065621f50c3Smrg freebsd2.2*) 9066621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9067621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9068621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9069621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9070621f50c3Smrg ;; 9071dc407927Smrg 9072621f50c3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9073621f50c3Smrg freebsd2.*) 9074621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9075621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9076621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9077621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9078621f50c3Smrg ;; 90793eed67faSmbalmer 9080621f50c3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9081621f50c3Smrg freebsd* | dragonfly* | midnightbsd*) 9082621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9083621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9084621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9085621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9086621f50c3Smrg ;; 9087dc407927Smrg 9088621f50c3Smrg hpux9*) 9089621f50c3Smrg if test yes = "$GCC"; then 9090621f50c3Smrg _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' 9091621f50c3Smrg else 9092621f50c3Smrg _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' 9093621f50c3Smrg fi 9094621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9095621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9096621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 90973eed67faSmbalmer 9098621f50c3Smrg # hardcode_minus_L: Not really in the search PATH, 9099621f50c3Smrg # but as the default location of the library. 9100621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9101621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9102621f50c3Smrg ;; 91033eed67faSmbalmer 9104621f50c3Smrg hpux10*) 9105621f50c3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9106621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9107621f50c3Smrg else 9108621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9109621f50c3Smrg fi 9110621f50c3Smrg if test no = "$with_gnu_ld"; then 9111621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9112621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9113621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9114621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9115621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9116621f50c3Smrg # hardcode_minus_L: Not really in the search PATH, 9117621f50c3Smrg # but as the default location of the library. 9118621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9119621f50c3Smrg fi 9120621f50c3Smrg ;; 91213eed67faSmbalmer 9122621f50c3Smrg hpux11*) 9123621f50c3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9124621f50c3Smrg case $host_cpu in 9125621f50c3Smrg hppa*64*) 9126621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9127621f50c3Smrg ;; 9128621f50c3Smrg ia64*) 9129621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9130621f50c3Smrg ;; 9131621f50c3Smrg *) 9132621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9133621f50c3Smrg ;; 9134621f50c3Smrg esac 9135621f50c3Smrg else 9136621f50c3Smrg case $host_cpu in 9137621f50c3Smrg hppa*64*) 9138621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9139621f50c3Smrg ;; 9140621f50c3Smrg ia64*) 9141621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9142621f50c3Smrg ;; 9143621f50c3Smrg *) 9144621f50c3Smrg m4_if($1, [], [ 9145621f50c3Smrg # Older versions of the 11.00 compiler do not understand -b yet 9146621f50c3Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9147621f50c3Smrg _LT_LINKER_OPTION([if $CC understands -b], 9148621f50c3Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9149621f50c3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9150621f50c3Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9151621f50c3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9152621f50c3Smrg ;; 9153621f50c3Smrg esac 9154621f50c3Smrg fi 9155621f50c3Smrg if test no = "$with_gnu_ld"; then 9156621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9157621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91583eed67faSmbalmer 9159621f50c3Smrg case $host_cpu in 9160621f50c3Smrg hppa*64*|ia64*) 9161621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9162621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9163621f50c3Smrg ;; 9164621f50c3Smrg *) 9165621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9166621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9167621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91683eed67faSmbalmer 9169621f50c3Smrg # hardcode_minus_L: Not really in the search PATH, 9170621f50c3Smrg # but as the default location of the library. 9171621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9172621f50c3Smrg ;; 9173621f50c3Smrg esac 9174621f50c3Smrg fi 9175621f50c3Smrg ;; 91763eed67faSmbalmer 9177621f50c3Smrg irix5* | irix6* | nonstopux*) 9178621f50c3Smrg if test yes = "$GCC"; then 9179621f50c3Smrg _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' 9180621f50c3Smrg # Try to use the -exported_symbol ld option, if it does not 9181621f50c3Smrg # work, assume that -exports_file does not work either and 9182621f50c3Smrg # implicitly export all symbols. 9183621f50c3Smrg # This should be the same for all languages, so no per-tag cache variable. 9184621f50c3Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9185621f50c3Smrg [lt_cv_irix_exported_symbol], 9186621f50c3Smrg [save_LDFLAGS=$LDFLAGS 9187621f50c3Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9188621f50c3Smrg AC_LINK_IFELSE( 9189621f50c3Smrg [AC_LANG_SOURCE( 9190621f50c3Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9191621f50c3Smrg [C++], [[int foo (void) { return 0; }]], 9192621f50c3Smrg [Fortran 77], [[ 9193621f50c3Smrg subroutine foo 9194621f50c3Smrg end]], 9195621f50c3Smrg [Fortran], [[ 9196621f50c3Smrg subroutine foo 9197621f50c3Smrg end]])])], 9198621f50c3Smrg [lt_cv_irix_exported_symbol=yes], 9199621f50c3Smrg [lt_cv_irix_exported_symbol=no]) 9200621f50c3Smrg LDFLAGS=$save_LDFLAGS]) 9201621f50c3Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9202621f50c3Smrg _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' 9203621f50c3Smrg fi 9204621f50c3Smrg else 9205621f50c3Smrg _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' 9206621f50c3Smrg _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' 9207621f50c3Smrg fi 9208621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9209621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9210621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9211621f50c3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9212621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9213621f50c3Smrg ;; 9214dc407927Smrg 9215621f50c3Smrg linux*) 9216621f50c3Smrg case $cc_basename in 9217621f50c3Smrg tcc*) 9218621f50c3Smrg # Fabrice Bellard et al's Tiny C Compiler 9219621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9220621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9221621f50c3Smrg ;; 9222621f50c3Smrg esac 9223621f50c3Smrg ;; 9224dc407927Smrg 9225621f50c3Smrg netbsd*) 9226621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9227621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9228621f50c3Smrg else 9229621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9230621f50c3Smrg fi 9231621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9232621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9233621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9234621f50c3Smrg ;; 9235dc407927Smrg 9236621f50c3Smrg newsos6) 9237621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9238621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9239621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9240621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9241621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9242621f50c3Smrg ;; 9243dc407927Smrg 9244621f50c3Smrg *nto* | *qnx*) 9245621f50c3Smrg ;; 9246dc407927Smrg 9247621f50c3Smrg openbsd* | bitrig*) 9248621f50c3Smrg if test -f /usr/libexec/ld.so; then 9249621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9250621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9251621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9252621f50c3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9253621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9254621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9255621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9256621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9257621f50c3Smrg else 9258621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9259621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9260621f50c3Smrg fi 9261621f50c3Smrg else 9262621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9263621f50c3Smrg fi 9264621f50c3Smrg ;; 92653eed67faSmbalmer 9266621f50c3Smrg os2*) 9267621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9268621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9269621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9270621f50c3Smrg shrext_cmds=.dll 9271621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9272621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9273621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9274621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9275621f50c3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9276621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9277621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 9278621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9279621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9280621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9281621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9282621f50c3Smrg prefix_cmds="$SED"~ 9283621f50c3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9284621f50c3Smrg prefix_cmds="$prefix_cmds -e 1d"; 9285621f50c3Smrg fi~ 9286621f50c3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9287621f50c3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9288621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9289621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 9290621f50c3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9291621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9292621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9293621f50c3Smrg ;; 92941a9c160aSmrg 9295621f50c3Smrg osf3*) 9296621f50c3Smrg if test yes = "$GCC"; then 9297621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9298621f50c3Smrg _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' 9299621f50c3Smrg else 9300621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9301621f50c3Smrg _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' 9302621f50c3Smrg fi 9303621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9304621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9305621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9306621f50c3Smrg ;; 93071a9c160aSmrg 9308621f50c3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9309621f50c3Smrg if test yes = "$GCC"; then 9310621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9311621f50c3Smrg _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' 9312621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9313621f50c3Smrg else 9314621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9315621f50c3Smrg _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' 9316621f50c3Smrg _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~ 9317621f50c3Smrg $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' 9318dd0822caSmrg 9319621f50c3Smrg # Both c and cxx compiler support -rpath directly 9320621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9321621f50c3Smrg fi 9322621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9323621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9324621f50c3Smrg ;; 9325621f50c3Smrg 9326621f50c3Smrg solaris*) 9327621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9328621f50c3Smrg if test yes = "$GCC"; then 9329621f50c3Smrg wlarc='$wl' 9330621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9331621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9332621f50c3Smrg $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' 9333621f50c3Smrg else 9334621f50c3Smrg case `$CC -V 2>&1` in 9335621f50c3Smrg *"Compilers 5.0"*) 9336621f50c3Smrg wlarc='' 9337621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9338621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9339621f50c3Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9340621f50c3Smrg ;; 9341621f50c3Smrg *) 9342621f50c3Smrg wlarc='$wl' 9343621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9344621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9345621f50c3Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9346621f50c3Smrg ;; 9347621f50c3Smrg esac 9348621f50c3Smrg fi 9349621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9350621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9351621f50c3Smrg case $host_os in 9352621f50c3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9353621f50c3Smrg *) 9354621f50c3Smrg # The compiler driver will combine and reorder linker options, 9355621f50c3Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9356621f50c3Smrg # but is careful enough not to reorder. 9357621f50c3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9358621f50c3Smrg if test yes = "$GCC"; then 9359621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 93603eed67faSmbalmer else 9361621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 93623eed67faSmbalmer fi 9363621f50c3Smrg ;; 9364621f50c3Smrg esac 9365621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9366621f50c3Smrg ;; 93673eed67faSmbalmer 9368621f50c3Smrg sunos4*) 9369621f50c3Smrg if test sequent = "$host_vendor"; then 9370621f50c3Smrg # Use $CC to link under sequent, because it throws in some extra .o 9371621f50c3Smrg # files that make .init and .fini sections work. 9372621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9373621f50c3Smrg else 9374621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9375621f50c3Smrg fi 9376621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9377621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9378621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9379621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9380621f50c3Smrg ;; 93813eed67faSmbalmer 9382621f50c3Smrg sysv4) 9383621f50c3Smrg case $host_vendor in 9384621f50c3Smrg sni) 9385621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9386621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9387621f50c3Smrg ;; 9388621f50c3Smrg siemens) 9389621f50c3Smrg ## LD is ld it makes a PLAMLIB 9390621f50c3Smrg ## CC just makes a GrossModule. 9391621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9392621f50c3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9393621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9394621f50c3Smrg ;; 9395621f50c3Smrg motorola) 9396621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9397621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9398621f50c3Smrg ;; 9399621f50c3Smrg esac 9400621f50c3Smrg runpath_var='LD_RUN_PATH' 9401621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9402621f50c3Smrg ;; 94033eed67faSmbalmer 9404621f50c3Smrg sysv4.3*) 9405621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9406621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9407621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9408621f50c3Smrg ;; 94093eed67faSmbalmer 9410621f50c3Smrg sysv4*MP*) 9411621f50c3Smrg if test -d /usr/nec; then 9412621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9413621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9414621f50c3Smrg runpath_var=LD_RUN_PATH 9415621f50c3Smrg hardcode_runpath_var=yes 9416621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9417621f50c3Smrg fi 9418621f50c3Smrg ;; 94193eed67faSmbalmer 9420621f50c3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9421621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9422621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9423621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9424621f50c3Smrg runpath_var='LD_RUN_PATH' 94253eed67faSmbalmer 9426621f50c3Smrg if test yes = "$GCC"; then 9427621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9428621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9429621f50c3Smrg else 9430621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9431621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9432621f50c3Smrg fi 9433621f50c3Smrg ;; 9434621f50c3Smrg 9435621f50c3Smrg sysv5* | sco3.2v5* | sco5v6*) 9436621f50c3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 9437621f50c3Smrg # link with -lc, and that would cause any symbols used from libc to 9438621f50c3Smrg # always be unresolved, which means just about no library would 9439621f50c3Smrg # ever link correctly. If we're not using GNU ld we use -z text 9440621f50c3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9441621f50c3Smrg # as -z defs. 9442621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9443621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9444621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9445621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9446621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9447621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9448621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9449621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9450621f50c3Smrg runpath_var='LD_RUN_PATH' 94513eed67faSmbalmer 9452621f50c3Smrg if test yes = "$GCC"; then 9453621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9454621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9455621f50c3Smrg else 9456621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9457621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9458621f50c3Smrg fi 9459621f50c3Smrg ;; 94603eed67faSmbalmer 9461621f50c3Smrg uts4*) 9462621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9463621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9464621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9465621f50c3Smrg ;; 94663eed67faSmbalmer 9467621f50c3Smrg *) 9468621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9469621f50c3Smrg ;; 9470621f50c3Smrg esac 94713eed67faSmbalmer 9472621f50c3Smrg if test sni = "$host_vendor"; then 9473621f50c3Smrg case $host in 9474621f50c3Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9475621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9476621f50c3Smrg ;; 9477621f50c3Smrg esac 9478621f50c3Smrg fi 9479621f50c3Smrg fi 9480621f50c3Smrg]) 9481621f50c3SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9482621f50c3Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 94833eed67faSmbalmer 9484621f50c3Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 94853eed67faSmbalmer 9486621f50c3Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9487621f50c3Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9488621f50c3Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 9489621f50c3Smrg [The commands to extract the exported symbol list from a shared archive]) 94903eed67faSmbalmer 9491621f50c3Smrg# 9492621f50c3Smrg# Do we need to explicitly link libc? 9493621f50c3Smrg# 9494621f50c3Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9495621f50c3Smrgx|xyes) 9496621f50c3Smrg # Assume -lc should be added 9497621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94983eed67faSmbalmer 9499621f50c3Smrg if test yes,yes = "$GCC,$enable_shared"; then 9500621f50c3Smrg case $_LT_TAGVAR(archive_cmds, $1) in 9501621f50c3Smrg *'~'*) 9502621f50c3Smrg # FIXME: we may have to deal with multi-command sequences. 9503621f50c3Smrg ;; 9504621f50c3Smrg '$CC '*) 9505621f50c3Smrg # Test whether the compiler implicitly links with -lc since on some 9506621f50c3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9507621f50c3Smrg # to ld, don't add -lc before -lgcc. 9508621f50c3Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9509621f50c3Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9510621f50c3Smrg [$RM conftest* 9511621f50c3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 95123eed67faSmbalmer 9513621f50c3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9514621f50c3Smrg soname=conftest 9515621f50c3Smrg lib=conftest 9516621f50c3Smrg libobjs=conftest.$ac_objext 9517621f50c3Smrg deplibs= 9518621f50c3Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9519621f50c3Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9520621f50c3Smrg compiler_flags=-v 9521621f50c3Smrg linker_flags=-v 9522621f50c3Smrg verstring= 9523621f50c3Smrg output_objdir=. 9524621f50c3Smrg libname=conftest 9525621f50c3Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9526621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9527621f50c3Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9528621f50c3Smrg then 9529621f50c3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9530621f50c3Smrg else 9531621f50c3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9532621f50c3Smrg fi 9533621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9534621f50c3Smrg else 9535621f50c3Smrg cat conftest.err 1>&5 9536621f50c3Smrg fi 9537621f50c3Smrg $RM conftest* 9538621f50c3Smrg ]) 9539621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9540621f50c3Smrg ;; 9541621f50c3Smrg esac 9542621f50c3Smrg fi 9543621f50c3Smrg ;; 9544621f50c3Smrgesac 95453eed67faSmbalmer 9546621f50c3Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9547621f50c3Smrg [Whether or not to add -lc for building shared libraries]) 9548621f50c3Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9549621f50c3Smrg [enable_shared_with_static_runtimes], [0], 9550621f50c3Smrg [Whether or not to disallow shared libs when runtime libs are static]) 9551621f50c3Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9552621f50c3Smrg [Compiler flag to allow reflexive dlopens]) 9553621f50c3Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9554621f50c3Smrg [Compiler flag to generate shared objects directly from archives]) 9555621f50c3Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 9556621f50c3Smrg [Whether the compiler copes with passing no objects directly]) 9557621f50c3Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9558621f50c3Smrg [Create an old-style archive from a shared archive]) 9559621f50c3Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9560621f50c3Smrg [Create a temporary old-style archive to link instead of a shared archive]) 9561621f50c3Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9562621f50c3Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9563621f50c3Smrg_LT_TAGDECL([], [module_cmds], [2], 9564621f50c3Smrg [Commands used to build a loadable module if different from building 9565621f50c3Smrg a shared archive.]) 9566621f50c3Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9567621f50c3Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 9568621f50c3Smrg [Whether we are building with GNU ld or not]) 9569621f50c3Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9570621f50c3Smrg [Flag that allows shared libraries with undefined symbols to be built]) 9571621f50c3Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 9572621f50c3Smrg [Flag that enforces no undefined symbols]) 9573621f50c3Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9574621f50c3Smrg [Flag to hardcode $libdir into a binary during linking. 9575621f50c3Smrg This must work even if $libdir does not exist]) 9576621f50c3Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9577621f50c3Smrg [Whether we need a single "-rpath" flag with a separated argument]) 9578621f50c3Smrg_LT_TAGDECL([], [hardcode_direct], [0], 9579621f50c3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9580621f50c3Smrg DIR into the resulting binary]) 9581621f50c3Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9582621f50c3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9583621f50c3Smrg DIR into the resulting binary and the resulting library dependency is 9584621f50c3Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9585621f50c3Smrg library is relocated]) 9586621f50c3Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9587621f50c3Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9588621f50c3Smrg into the resulting binary]) 9589621f50c3Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9590621f50c3Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9591621f50c3Smrg into the resulting binary]) 9592621f50c3Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 9593621f50c3Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 9594621f50c3Smrg into the library and all subsequent libraries and executables linked 9595621f50c3Smrg against it]) 9596621f50c3Smrg_LT_TAGDECL([], [inherit_rpath], [0], 9597621f50c3Smrg [Set to yes if linker adds runtime paths of dependent libraries 9598621f50c3Smrg to runtime path list]) 9599621f50c3Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 9600621f50c3Smrg [Whether libtool must link a program against all its dependency libraries]) 9601621f50c3Smrg_LT_TAGDECL([], [always_export_symbols], [0], 9602621f50c3Smrg [Set to "yes" if exported symbols are required]) 9603621f50c3Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9604621f50c3Smrg [The commands to list exported symbols]) 9605621f50c3Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 9606621f50c3Smrg [Symbols that should not be listed in the preloaded symbols]) 9607621f50c3Smrg_LT_TAGDECL([], [include_expsyms], [1], 9608621f50c3Smrg [Symbols that must always be exported]) 9609621f50c3Smrg_LT_TAGDECL([], [prelink_cmds], [2], 9610621f50c3Smrg [Commands necessary for linking programs (against libraries) with templates]) 9611621f50c3Smrg_LT_TAGDECL([], [postlink_cmds], [2], 9612621f50c3Smrg [Commands necessary for finishing linking programs]) 9613621f50c3Smrg_LT_TAGDECL([], [file_list_spec], [1], 9614621f50c3Smrg [Specify filename containing input files]) 9615621f50c3Smrgdnl FIXME: Not yet implemented 9616621f50c3Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9617621f50c3Smrgdnl [Compiler flag to generate thread safe objects]) 9618621f50c3Smrg])# _LT_LINKER_SHLIBS 96193eed67faSmbalmer 962075cbef56Smrg 9621621f50c3Smrg# _LT_LANG_C_CONFIG([TAG]) 9622621f50c3Smrg# ------------------------ 9623621f50c3Smrg# Ensure that the configuration variables for a C compiler are suitably 9624621f50c3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9625621f50c3Smrg# the compiler configuration to 'libtool'. 9626621f50c3Smrgm4_defun([_LT_LANG_C_CONFIG], 9627621f50c3Smrg[m4_require([_LT_DECL_EGREP])dnl 9628621f50c3Smrglt_save_CC=$CC 9629621f50c3SmrgAC_LANG_PUSH(C) 9630dc407927Smrg 9631621f50c3Smrg# Source file extension for C test sources. 9632621f50c3Smrgac_ext=c 96331a9c160aSmrg 9634621f50c3Smrg# Object file extension for compiled C test sources. 9635621f50c3Smrgobjext=o 9636621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 96371a9c160aSmrg 9638621f50c3Smrg# Code to be used in simple compile tests 9639621f50c3Smrglt_simple_compile_test_code="int some_variable = 0;" 96401a9c160aSmrg 9641621f50c3Smrg# Code to be used in simple link tests 9642621f50c3Smrglt_simple_link_test_code='int main(){return(0);}' 96431a9c160aSmrg 9644621f50c3Smrg_LT_TAG_COMPILER 9645621f50c3Smrg# Save the default compiler, since it gets overwritten when the other 9646621f50c3Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9647621f50c3Smrgcompiler_DEFAULT=$CC 96483eed67faSmbalmer 9649621f50c3Smrg# save warnings/boilerplate of simple test code 9650621f50c3Smrg_LT_COMPILER_BOILERPLATE 9651621f50c3Smrg_LT_LINKER_BOILERPLATE 96523eed67faSmbalmer 9653621f50c3Smrgif test -n "$compiler"; then 9654621f50c3Smrg _LT_COMPILER_NO_RTTI($1) 9655621f50c3Smrg _LT_COMPILER_PIC($1) 9656621f50c3Smrg _LT_COMPILER_C_O($1) 9657621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 9658621f50c3Smrg _LT_LINKER_SHLIBS($1) 9659621f50c3Smrg _LT_SYS_DYNAMIC_LINKER($1) 9660621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9661621f50c3Smrg LT_SYS_DLOPEN_SELF 9662621f50c3Smrg _LT_CMD_STRIPLIB 96633eed67faSmbalmer 9664621f50c3Smrg # Report what library types will actually be built 9665621f50c3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9666621f50c3Smrg AC_MSG_RESULT([$can_build_shared]) 96673eed67faSmbalmer 9668621f50c3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9669621f50c3Smrg test no = "$can_build_shared" && enable_shared=no 967075cbef56Smrg 9671621f50c3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9672621f50c3Smrg # are all built from PIC. 9673621f50c3Smrg case $host_os in 9674621f50c3Smrg aix3*) 9675621f50c3Smrg test yes = "$enable_shared" && enable_static=no 9676621f50c3Smrg if test -n "$RANLIB"; then 9677621f50c3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9678621f50c3Smrg postinstall_cmds='$RANLIB $lib' 9679621f50c3Smrg fi 9680621f50c3Smrg ;; 96813eed67faSmbalmer 9682621f50c3Smrg aix[[4-9]]*) 9683621f50c3Smrg if test ia64 != "$host_cpu"; then 9684621f50c3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9685621f50c3Smrg yes,aix,yes) ;; # shared object as lib.so file only 9686621f50c3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 9687621f50c3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9688621f50c3Smrg esac 9689621f50c3Smrg fi 9690621f50c3Smrg ;; 9691621f50c3Smrg esac 9692621f50c3Smrg AC_MSG_RESULT([$enable_shared]) 96933eed67faSmbalmer 9694621f50c3Smrg AC_MSG_CHECKING([whether to build static libraries]) 9695621f50c3Smrg # Make sure either enable_shared or enable_static is yes. 9696621f50c3Smrg test yes = "$enable_shared" || enable_static=yes 9697621f50c3Smrg AC_MSG_RESULT([$enable_static]) 96983eed67faSmbalmer 9699621f50c3Smrg _LT_CONFIG($1) 9700621f50c3Smrgfi 9701621f50c3SmrgAC_LANG_POP 9702621f50c3SmrgCC=$lt_save_CC 9703621f50c3Smrg])# _LT_LANG_C_CONFIG 97043eed67faSmbalmer 97053eed67faSmbalmer 9706621f50c3Smrg# _LT_LANG_CXX_CONFIG([TAG]) 9707621f50c3Smrg# -------------------------- 9708621f50c3Smrg# Ensure that the configuration variables for a C++ compiler are suitably 9709621f50c3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9710621f50c3Smrg# the compiler configuration to 'libtool'. 9711621f50c3Smrgm4_defun([_LT_LANG_CXX_CONFIG], 9712621f50c3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9713621f50c3Smrgm4_require([_LT_DECL_EGREP])dnl 9714621f50c3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9715621f50c3Smrgif test -n "$CXX" && ( test no != "$CXX" && 9716621f50c3Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9717621f50c3Smrg (test g++ != "$CXX"))); then 9718621f50c3Smrg AC_PROG_CXXCPP 9719621f50c3Smrgelse 9720621f50c3Smrg _lt_caught_CXX_error=yes 9721621f50c3Smrgfi 97223eed67faSmbalmer 9723621f50c3SmrgAC_LANG_PUSH(C++) 9724621f50c3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9725621f50c3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9726621f50c3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9727621f50c3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9728621f50c3Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 9729621f50c3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9730621f50c3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9731621f50c3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9732621f50c3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9733621f50c3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9734621f50c3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9735621f50c3Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9736621f50c3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9737621f50c3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9738621f50c3Smrg_LT_TAGVAR(module_cmds, $1)= 9739621f50c3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9740621f50c3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9741621f50c3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9742621f50c3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9743621f50c3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9744621f50c3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9745621f50c3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9746621f50c3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 97473eed67faSmbalmer 9748621f50c3Smrg# Source file extension for C++ test sources. 9749621f50c3Smrgac_ext=cpp 97503eed67faSmbalmer 9751621f50c3Smrg# Object file extension for compiled C++ test sources. 9752621f50c3Smrgobjext=o 9753621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 97543eed67faSmbalmer 9755621f50c3Smrg# No sense in running all these tests if we already determined that 9756621f50c3Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 9757621f50c3Smrg# are currently assumed to apply to all compilers on this platform, 9758621f50c3Smrg# and will be corrupted by setting them based on a non-working compiler. 9759621f50c3Smrgif test yes != "$_lt_caught_CXX_error"; then 9760621f50c3Smrg # Code to be used in simple compile tests 9761621f50c3Smrg lt_simple_compile_test_code="int some_variable = 0;" 97623eed67faSmbalmer 9763621f50c3Smrg # Code to be used in simple link tests 9764621f50c3Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 97651a9c160aSmrg 9766621f50c3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9767621f50c3Smrg _LT_TAG_COMPILER 97683eed67faSmbalmer 9769621f50c3Smrg # save warnings/boilerplate of simple test code 9770621f50c3Smrg _LT_COMPILER_BOILERPLATE 9771621f50c3Smrg _LT_LINKER_BOILERPLATE 9772621f50c3Smrg 9773621f50c3Smrg # Allow CC to be a program name with arguments. 9774621f50c3Smrg lt_save_CC=$CC 9775621f50c3Smrg lt_save_CFLAGS=$CFLAGS 9776621f50c3Smrg lt_save_LD=$LD 9777621f50c3Smrg lt_save_GCC=$GCC 9778621f50c3Smrg GCC=$GXX 9779621f50c3Smrg lt_save_with_gnu_ld=$with_gnu_ld 9780621f50c3Smrg lt_save_path_LD=$lt_cv_path_LD 9781621f50c3Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9782621f50c3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9783621f50c3Smrg else 9784621f50c3Smrg $as_unset lt_cv_prog_gnu_ld 9785621f50c3Smrg fi 9786621f50c3Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 9787621f50c3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 9788621f50c3Smrg else 9789621f50c3Smrg $as_unset lt_cv_path_LD 9790621f50c3Smrg fi 9791621f50c3Smrg test -z "${LDCXX+set}" || LD=$LDCXX 9792621f50c3Smrg CC=${CXX-"c++"} 9793621f50c3Smrg CFLAGS=$CXXFLAGS 9794621f50c3Smrg compiler=$CC 9795621f50c3Smrg _LT_TAGVAR(compiler, $1)=$CC 9796621f50c3Smrg _LT_CC_BASENAME([$compiler]) 9797621f50c3Smrg 9798621f50c3Smrg if test -n "$compiler"; then 9799621f50c3Smrg # We don't want -fno-exception when compiling C++ code, so set the 9800621f50c3Smrg # no_builtin_flag separately 9801621f50c3Smrg if test yes = "$GXX"; then 9802621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9803621f50c3Smrg else 9804621f50c3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9805621f50c3Smrg fi 9806621f50c3Smrg 9807621f50c3Smrg if test yes = "$GXX"; then 9808621f50c3Smrg # Set up default GNU C++ configuration 9809621f50c3Smrg 9810621f50c3Smrg LT_PATH_LD 9811621f50c3Smrg 9812621f50c3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9813621f50c3Smrg # archiving commands below assume that GNU ld is being used. 9814621f50c3Smrg if test yes = "$with_gnu_ld"; then 9815621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9816621f50c3Smrg _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' 98173eed67faSmbalmer 9818621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9819621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 98203eed67faSmbalmer 9821621f50c3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9822621f50c3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9823621f50c3Smrg # investigate it a little bit more. (MM) 9824621f50c3Smrg wlarc='$wl' 9825dc407927Smrg 9826621f50c3Smrg # ancient GNU ld didn't support --whole-archive et. al. 9827621f50c3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9828621f50c3Smrg $GREP 'no-whole-archive' > /dev/null; then 9829621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9830621f50c3Smrg else 9831621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9832621f50c3Smrg fi 9833621f50c3Smrg else 9834621f50c3Smrg with_gnu_ld=no 9835621f50c3Smrg wlarc= 98363eed67faSmbalmer 9837621f50c3Smrg # A generic and very simple default shared library creation 9838621f50c3Smrg # command for GNU C++ for the case where it uses the native 9839621f50c3Smrg # linker, instead of GNU ld. If possible, this setting should 9840621f50c3Smrg # overridden to take advantage of the native linker features on 9841621f50c3Smrg # the platform it is being used on. 9842621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9843621f50c3Smrg fi 98443eed67faSmbalmer 9845621f50c3Smrg # Commands to make compiler produce verbose output that lists 9846621f50c3Smrg # what "hidden" libraries, object files and flags are used when 9847621f50c3Smrg # linking a shared library. 9848621f50c3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9849621f50c3Smrg 9850621f50c3Smrg else 9851621f50c3Smrg GXX=no 9852621f50c3Smrg with_gnu_ld=no 9853621f50c3Smrg wlarc= 9854621f50c3Smrg fi 9855621f50c3Smrg 9856621f50c3Smrg # PORTME: fill in a description of your system's C++ link characteristics 9857621f50c3Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9858621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9859621f50c3Smrg case $host_os in 9860621f50c3Smrg aix3*) 9861621f50c3Smrg # FIXME: insert proper C++ library support 9862621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 98631a9c160aSmrg ;; 9864621f50c3Smrg aix[[4-9]]*) 9865621f50c3Smrg if test ia64 = "$host_cpu"; then 9866621f50c3Smrg # On IA64, the linker does run time linking by default, so we don't 9867621f50c3Smrg # have to do anything special. 9868621f50c3Smrg aix_use_runtimelinking=no 9869621f50c3Smrg exp_sym_flag='-Bexport' 9870621f50c3Smrg no_entry_flag= 9871621f50c3Smrg else 9872621f50c3Smrg aix_use_runtimelinking=no 98733eed67faSmbalmer 9874621f50c3Smrg # Test if we are trying to use run time linking or normal 9875621f50c3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9876621f50c3Smrg # have runtime linking enabled, and use it for executables. 9877621f50c3Smrg # For shared libraries, we enable/disable runtime linking 9878621f50c3Smrg # depending on the kind of the shared library created - 9879621f50c3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9880621f50c3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9881621f50c3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9882621f50c3Smrg # lib.a static archive 9883621f50c3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9884621f50c3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9885621f50c3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9886621f50c3Smrg # lib.a(lib.so.V) shared, rtl:no 9887621f50c3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9888621f50c3Smrg # lib.a static archive 9889621f50c3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9890621f50c3Smrg for ld_flag in $LDFLAGS; do 9891621f50c3Smrg case $ld_flag in 9892621f50c3Smrg *-brtl*) 9893621f50c3Smrg aix_use_runtimelinking=yes 9894621f50c3Smrg break 9895621f50c3Smrg ;; 9896621f50c3Smrg esac 9897621f50c3Smrg done 9898621f50c3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9899621f50c3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9900621f50c3Smrg # so we don't have lib.a shared libs to link our executables. 9901621f50c3Smrg # We have to force runtime linking in this case. 9902621f50c3Smrg aix_use_runtimelinking=yes 9903621f50c3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9904621f50c3Smrg fi 9905621f50c3Smrg ;; 9906621f50c3Smrg esac 99073eed67faSmbalmer 9908621f50c3Smrg exp_sym_flag='-bexport' 9909621f50c3Smrg no_entry_flag='-bnoentry' 9910621f50c3Smrg fi 99113eed67faSmbalmer 9912621f50c3Smrg # When large executables or shared objects are built, AIX ld can 9913621f50c3Smrg # have problems creating the table of contents. If linking a library 9914621f50c3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9915621f50c3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9916621f50c3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 99173eed67faSmbalmer 9918621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='' 9919621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9920621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9921621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9922621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9923621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9924621f50c3Smrg case $with_aix_soname,$aix_use_runtimelinking in 9925621f50c3Smrg aix,*) ;; # no import file 9926621f50c3Smrg svr4,* | *,yes) # use import file 9927621f50c3Smrg # The Import File defines what to hardcode. 9928621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9929621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9930621f50c3Smrg ;; 9931621f50c3Smrg esac 9932621f50c3Smrg 9933621f50c3Smrg if test yes = "$GXX"; then 9934621f50c3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9935621f50c3Smrg # We only want to do this on AIX 4.2 and lower, the check 9936621f50c3Smrg # below for broken collect2 doesn't work under 4.3+ 9937621f50c3Smrg collect2name=`$CC -print-prog-name=collect2` 9938621f50c3Smrg if test -f "$collect2name" && 9939621f50c3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9940621f50c3Smrg then 9941621f50c3Smrg # We have reworked collect2 9942621f50c3Smrg : 9943621f50c3Smrg else 9944621f50c3Smrg # We have old collect2 9945621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9946621f50c3Smrg # It fails to find uninstalled libraries when the uninstalled 9947621f50c3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9948621f50c3Smrg # to unsupported forces relinking 9949621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9950621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9951621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9952621f50c3Smrg fi 9953621f50c3Smrg esac 9954621f50c3Smrg shared_flag='-shared' 9955621f50c3Smrg if test yes = "$aix_use_runtimelinking"; then 9956621f50c3Smrg shared_flag=$shared_flag' $wl-G' 9957621f50c3Smrg fi 9958621f50c3Smrg # Need to ensure runtime linking is disabled for the traditional 9959621f50c3Smrg # shared library, or the linker may eventually find shared libraries 9960621f50c3Smrg # /with/ Import File - we do not want to mix them. 9961621f50c3Smrg shared_flag_aix='-shared' 9962621f50c3Smrg shared_flag_svr4='-shared $wl-G' 9963621f50c3Smrg else 9964621f50c3Smrg # not using gcc 9965621f50c3Smrg if test ia64 = "$host_cpu"; then 9966621f50c3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9967621f50c3Smrg # chokes on -Wl,-G. The following line is correct: 9968621f50c3Smrg shared_flag='-G' 9969621f50c3Smrg else 9970621f50c3Smrg if test yes = "$aix_use_runtimelinking"; then 9971621f50c3Smrg shared_flag='$wl-G' 9972621f50c3Smrg else 9973621f50c3Smrg shared_flag='$wl-bM:SRE' 9974621f50c3Smrg fi 9975621f50c3Smrg shared_flag_aix='$wl-bM:SRE' 9976621f50c3Smrg shared_flag_svr4='$wl-G' 9977621f50c3Smrg fi 9978621f50c3Smrg fi 9979621f50c3Smrg 9980621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9981621f50c3Smrg # It seems that -bexpall does not export symbols beginning with 9982621f50c3Smrg # underscore (_), so it is better to generate a list of symbols to 9983621f50c3Smrg # export. 9984621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9985621f50c3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9986621f50c3Smrg # Warning - without using the other runtime loading flags (-brtl), 9987621f50c3Smrg # -berok will link without error, but may produce a broken library. 9988621f50c3Smrg # The "-G" linker flag allows undefined symbols. 9989621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9990621f50c3Smrg # Determine the default libpath from the value encoded in an empty 9991621f50c3Smrg # executable. 9992621f50c3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9993621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99943eed67faSmbalmer 9995621f50c3Smrg _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 9996621f50c3Smrg else 9997621f50c3Smrg if test ia64 = "$host_cpu"; then 9998621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9999621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10000621f50c3Smrg _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" 10001621f50c3Smrg else 10002621f50c3Smrg # Determine the default libpath from the value encoded in an 10003621f50c3Smrg # empty executable. 10004621f50c3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10005621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10006621f50c3Smrg # Warning - without using the other run time loading flags, 10007621f50c3Smrg # -berok will link without error, but may produce a broken library. 10008621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10009621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10010621f50c3Smrg if test yes = "$with_gnu_ld"; then 10011621f50c3Smrg # We only use this code for GNU lds that support --whole-archive. 10012621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10013621f50c3Smrg else 10014621f50c3Smrg # Exported symbols can be pulled into shared objects from archives 10015621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10016621f50c3Smrg fi 10017621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10018621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10019621f50c3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10020621f50c3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10021621f50c3Smrg if test svr4 != "$with_aix_soname"; then 10022621f50c3Smrg # This is similar to how AIX traditionally builds its shared 10023621f50c3Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10024621f50c3Smrg _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' 10025621f50c3Smrg fi 10026621f50c3Smrg if test aix != "$with_aix_soname"; then 10027621f50c3Smrg _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' 10028621f50c3Smrg else 10029621f50c3Smrg # used by -dlpreopen to get the symbols 10030621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10031621f50c3Smrg fi 10032621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10033621f50c3Smrg fi 10034621f50c3Smrg fi 10035621f50c3Smrg ;; 100363eed67faSmbalmer 10037621f50c3Smrg beos*) 10038621f50c3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10039621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10040621f50c3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10041621f50c3Smrg # support --undefined. This deserves some investigation. FIXME 10042621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10043621f50c3Smrg else 10044621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10045621f50c3Smrg fi 10046621f50c3Smrg ;; 100473eed67faSmbalmer 10048621f50c3Smrg chorus*) 10049621f50c3Smrg case $cc_basename in 10050621f50c3Smrg *) 10051621f50c3Smrg # FIXME: insert proper C++ library support 10052621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10053621f50c3Smrg ;; 10054621f50c3Smrg esac 10055621f50c3Smrg ;; 100563eed67faSmbalmer 10057621f50c3Smrg cygwin* | mingw* | pw32* | cegcc*) 10058621f50c3Smrg case $GXX,$cc_basename in 10059621f50c3Smrg ,cl* | no,cl* | ,icl* | no,icl*) 10060621f50c3Smrg # Native MSVC or ICC 10061621f50c3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10062621f50c3Smrg # no search path for DLLs. 10063621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10064621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10065621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10066621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10067621f50c3Smrg # Tell ltmain to make .lib files, not .a files. 10068621f50c3Smrg libext=lib 10069621f50c3Smrg # Tell ltmain to make .dll files, not .so files. 10070621f50c3Smrg shrext_cmds=.dll 10071621f50c3Smrg # FIXME: Setting linknames here is a bad hack. 10072621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10073621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10074621f50c3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10075621f50c3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10076621f50c3Smrg else 10077621f50c3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10078621f50c3Smrg fi~ 10079621f50c3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10080621f50c3Smrg linknames=' 10081621f50c3Smrg # The linker will not automatically build a static lib if we build a DLL. 10082621f50c3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10083621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10084621f50c3Smrg # Don't use ranlib 10085621f50c3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10086621f50c3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10087621f50c3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10088621f50c3Smrg case $lt_outputfile in 10089621f50c3Smrg *.exe|*.EXE) ;; 10090621f50c3Smrg *) 10091621f50c3Smrg lt_outputfile=$lt_outputfile.exe 10092621f50c3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10093621f50c3Smrg ;; 10094621f50c3Smrg esac~ 10095621f50c3Smrg func_to_tool_file "$lt_outputfile"~ 10096621f50c3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10097621f50c3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10098621f50c3Smrg $RM "$lt_outputfile.manifest"; 10099621f50c3Smrg fi' 10100621f50c3Smrg ;; 10101621f50c3Smrg *) 10102621f50c3Smrg # g++ 10103621f50c3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10104621f50c3Smrg # as there is no search path for DLLs. 10105621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10106621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10107621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10108621f50c3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10109621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 101103eed67faSmbalmer 10111621f50c3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10112621f50c3Smrg _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' 10113621f50c3Smrg # If the export-symbols file already is a .def file, use it as 10114621f50c3Smrg # is; otherwise, prepend EXPORTS... 10115621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10116621f50c3Smrg cp $export_symbols $output_objdir/$soname.def; 10117621f50c3Smrg else 10118621f50c3Smrg echo EXPORTS > $output_objdir/$soname.def; 10119621f50c3Smrg cat $export_symbols >> $output_objdir/$soname.def; 10120621f50c3Smrg fi~ 10121621f50c3Smrg $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' 10122621f50c3Smrg else 10123621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10124621f50c3Smrg fi 10125621f50c3Smrg ;; 10126621f50c3Smrg esac 10127621f50c3Smrg ;; 10128621f50c3Smrg darwin* | rhapsody*) 10129621f50c3Smrg _LT_DARWIN_LINKER_FEATURES($1) 10130621f50c3Smrg ;; 101313eed67faSmbalmer 10132621f50c3Smrg os2*) 10133621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10134621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10135621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10136621f50c3Smrg shrext_cmds=.dll 10137621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10138621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10139621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10140621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10141621f50c3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10142621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10143621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 10144621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10145621f50c3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10146621f50c3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10147621f50c3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10148621f50c3Smrg prefix_cmds="$SED"~ 10149621f50c3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10150621f50c3Smrg prefix_cmds="$prefix_cmds -e 1d"; 10151621f50c3Smrg fi~ 10152621f50c3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10153621f50c3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10154621f50c3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10155621f50c3Smrg emximp -o $lib $output_objdir/$libname.def' 10156621f50c3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10157621f50c3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10158621f50c3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10159621f50c3Smrg ;; 101603eed67faSmbalmer 10161621f50c3Smrg dgux*) 10162621f50c3Smrg case $cc_basename in 10163621f50c3Smrg ec++*) 10164621f50c3Smrg # FIXME: insert proper C++ library support 10165621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10166621f50c3Smrg ;; 10167621f50c3Smrg ghcx*) 10168621f50c3Smrg # Green Hills C++ Compiler 10169621f50c3Smrg # FIXME: insert proper C++ library support 10170621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10171621f50c3Smrg ;; 10172621f50c3Smrg *) 10173621f50c3Smrg # FIXME: insert proper C++ library support 10174621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10175621f50c3Smrg ;; 10176621f50c3Smrg esac 10177621f50c3Smrg ;; 101783eed67faSmbalmer 10179621f50c3Smrg freebsd2.*) 10180621f50c3Smrg # C++ shared libraries reported to be fairly broken before 10181621f50c3Smrg # switch to ELF 10182621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10183621f50c3Smrg ;; 101843eed67faSmbalmer 10185621f50c3Smrg freebsd-elf*) 10186621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10187621f50c3Smrg ;; 101883eed67faSmbalmer 10189621f50c3Smrg freebsd* | dragonfly* | midnightbsd*) 10190621f50c3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10191621f50c3Smrg # conventions 10192621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10193621f50c3Smrg ;; 101943eed67faSmbalmer 10195621f50c3Smrg haiku*) 10196621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10197621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10198621f50c3Smrg ;; 101993eed67faSmbalmer 10200621f50c3Smrg hpux9*) 10201621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10202621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10203621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10204621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10205621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10206621f50c3Smrg # but as the default 10207621f50c3Smrg # location of the library. 102083eed67faSmbalmer 10209621f50c3Smrg case $cc_basename in 10210621f50c3Smrg CC*) 10211621f50c3Smrg # FIXME: insert proper C++ library support 10212621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10213621f50c3Smrg ;; 10214621f50c3Smrg aCC*) 10215621f50c3Smrg _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' 10216621f50c3Smrg # Commands to make compiler produce verbose output that lists 10217621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10218621f50c3Smrg # linking a shared library. 10219621f50c3Smrg # 10220621f50c3Smrg # There doesn't appear to be a way to prevent this compiler from 10221621f50c3Smrg # explicitly linking system object files so we need to strip them 10222621f50c3Smrg # from the output so that they don't get included in the library 10223621f50c3Smrg # dependencies. 10224621f50c3Smrg 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"' 10225621f50c3Smrg ;; 10226621f50c3Smrg *) 10227621f50c3Smrg if test yes = "$GXX"; then 10228621f50c3Smrg _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' 10229621f50c3Smrg else 10230621f50c3Smrg # FIXME: insert proper C++ library support 10231621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10232621f50c3Smrg fi 10233621f50c3Smrg ;; 10234621f50c3Smrg esac 10235621f50c3Smrg ;; 102363eed67faSmbalmer 10237621f50c3Smrg hpux10*|hpux11*) 10238621f50c3Smrg if test no = "$with_gnu_ld"; then 10239621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10240621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 102413eed67faSmbalmer 10242621f50c3Smrg case $host_cpu in 10243621f50c3Smrg hppa*64*|ia64*) 10244621f50c3Smrg ;; 10245621f50c3Smrg *) 10246621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10247621f50c3Smrg ;; 10248621f50c3Smrg esac 10249621f50c3Smrg fi 10250621f50c3Smrg case $host_cpu in 10251621f50c3Smrg hppa*64*|ia64*) 10252621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10253621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10254621f50c3Smrg ;; 10255621f50c3Smrg *) 10256621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10257621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10258621f50c3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10259621f50c3Smrg # but as the default 10260621f50c3Smrg # location of the library. 10261621f50c3Smrg ;; 10262621f50c3Smrg esac 102633eed67faSmbalmer 10264621f50c3Smrg case $cc_basename in 10265621f50c3Smrg CC*) 10266621f50c3Smrg # FIXME: insert proper C++ library support 10267621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10268621f50c3Smrg ;; 10269621f50c3Smrg aCC*) 10270621f50c3Smrg case $host_cpu in 10271621f50c3Smrg hppa*64*) 10272621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10273621f50c3Smrg ;; 10274621f50c3Smrg ia64*) 10275621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10276621f50c3Smrg ;; 10277621f50c3Smrg *) 10278621f50c3Smrg _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' 10279621f50c3Smrg ;; 10280621f50c3Smrg esac 10281621f50c3Smrg # Commands to make compiler produce verbose output that lists 10282621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10283621f50c3Smrg # linking a shared library. 10284621f50c3Smrg # 10285621f50c3Smrg # There doesn't appear to be a way to prevent this compiler from 10286621f50c3Smrg # explicitly linking system object files so we need to strip them 10287621f50c3Smrg # from the output so that they don't get included in the library 10288621f50c3Smrg # dependencies. 10289621f50c3Smrg 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"' 10290621f50c3Smrg ;; 10291621f50c3Smrg *) 10292621f50c3Smrg if test yes = "$GXX"; then 10293621f50c3Smrg if test no = "$with_gnu_ld"; then 10294621f50c3Smrg case $host_cpu in 10295621f50c3Smrg hppa*64*) 10296621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10297621f50c3Smrg ;; 10298621f50c3Smrg ia64*) 10299621f50c3Smrg _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' 10300621f50c3Smrg ;; 10301621f50c3Smrg *) 10302621f50c3Smrg _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' 10303621f50c3Smrg ;; 10304621f50c3Smrg esac 10305621f50c3Smrg fi 10306621f50c3Smrg else 10307621f50c3Smrg # FIXME: insert proper C++ library support 10308621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10309621f50c3Smrg fi 10310621f50c3Smrg ;; 10311621f50c3Smrg esac 10312621f50c3Smrg ;; 103133eed67faSmbalmer 10314621f50c3Smrg interix[[3-9]]*) 10315621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10316621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10317621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10318621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10319621f50c3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10320621f50c3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10321621f50c3Smrg # default) and relocated if they conflict, which is a slow very memory 10322621f50c3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10323621f50c3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10324621f50c3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10325621f50c3Smrg _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' 10326621f50c3Smrg _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' 10327621f50c3Smrg ;; 10328621f50c3Smrg irix5* | irix6*) 10329621f50c3Smrg case $cc_basename in 10330621f50c3Smrg CC*) 10331621f50c3Smrg # SGI C++ 10332621f50c3Smrg _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' 103333eed67faSmbalmer 10334621f50c3Smrg # Archives containing C++ object files must be created using 10335621f50c3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10336621f50c3Smrg # necessary to make sure instantiated templates are included 10337621f50c3Smrg # in the archive. 10338621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10339621f50c3Smrg ;; 10340621f50c3Smrg *) 10341621f50c3Smrg if test yes = "$GXX"; then 10342621f50c3Smrg if test no = "$with_gnu_ld"; then 10343621f50c3Smrg _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' 10344621f50c3Smrg else 10345621f50c3Smrg _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' 10346621f50c3Smrg fi 10347621f50c3Smrg fi 10348621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10349621f50c3Smrg ;; 10350621f50c3Smrg esac 10351621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10352621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10353621f50c3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10354621f50c3Smrg ;; 10355dc407927Smrg 10356621f50c3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10357621f50c3Smrg case $cc_basename in 10358621f50c3Smrg KCC*) 10359621f50c3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 103603eed67faSmbalmer 10361621f50c3Smrg # KCC will only create a shared library if the output file 10362621f50c3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10363621f50c3Smrg # to its proper name (with version) after linking. 10364621f50c3Smrg _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' 10365621f50c3Smrg _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' 10366621f50c3Smrg # Commands to make compiler produce verbose output that lists 10367621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10368621f50c3Smrg # linking a shared library. 10369621f50c3Smrg # 10370621f50c3Smrg # There doesn't appear to be a way to prevent this compiler from 10371621f50c3Smrg # explicitly linking system object files so we need to strip them 10372621f50c3Smrg # from the output so that they don't get included in the library 10373621f50c3Smrg # dependencies. 10374621f50c3Smrg 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"' 103753eed67faSmbalmer 10376621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10377621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10378621f50c3Smrg 10379621f50c3Smrg # Archives containing C++ object files must be created using 10380621f50c3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10381621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10382621f50c3Smrg ;; 10383621f50c3Smrg icpc* | ecpc* ) 10384621f50c3Smrg # Intel C++ 10385621f50c3Smrg with_gnu_ld=yes 10386621f50c3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10387621f50c3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10388621f50c3Smrg # earlier do not add the objects themselves. 10389621f50c3Smrg case `$CC -V 2>&1` in 10390621f50c3Smrg *"Version 7."*) 10391621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10392621f50c3Smrg _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' 10393621f50c3Smrg ;; 10394621f50c3Smrg *) # Version 8.0 or newer 10395621f50c3Smrg tmp_idyn= 10396621f50c3Smrg case $host_cpu in 10397621f50c3Smrg ia64*) tmp_idyn=' -i_dynamic';; 10398621f50c3Smrg esac 10399621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10400621f50c3Smrg _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' 10401621f50c3Smrg ;; 10402621f50c3Smrg esac 10403621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10404621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10405621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10406621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10407621f50c3Smrg ;; 10408621f50c3Smrg pgCC* | pgcpp*) 10409621f50c3Smrg # Portland Group C++ compiler 10410621f50c3Smrg case `$CC -V` in 10411621f50c3Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10412621f50c3Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10413621f50c3Smrg rm -rf $tpldir~ 10414621f50c3Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10415621f50c3Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10416621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10417621f50c3Smrg rm -rf $tpldir~ 10418621f50c3Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10419621f50c3Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10420621f50c3Smrg $RANLIB $oldlib' 10421621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10422621f50c3Smrg rm -rf $tpldir~ 10423621f50c3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10424621f50c3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10425621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10426621f50c3Smrg rm -rf $tpldir~ 10427621f50c3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10428621f50c3Smrg $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' 10429621f50c3Smrg ;; 10430621f50c3Smrg *) # Version 6 and above use weak symbols 10431621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10432621f50c3Smrg _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' 10433621f50c3Smrg ;; 10434621f50c3Smrg esac 104353eed67faSmbalmer 10436621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10437621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10438621f50c3Smrg _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' 10439621f50c3Smrg ;; 10440621f50c3Smrg cxx*) 10441621f50c3Smrg # Compaq C++ 10442621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10443621f50c3Smrg _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' 1044475cbef56Smrg 10445621f50c3Smrg runpath_var=LD_RUN_PATH 10446621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10447621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 104483eed67faSmbalmer 10449621f50c3Smrg # Commands to make compiler produce verbose output that lists 10450621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10451621f50c3Smrg # linking a shared library. 10452621f50c3Smrg # 10453621f50c3Smrg # There doesn't appear to be a way to prevent this compiler from 10454621f50c3Smrg # explicitly linking system object files so we need to strip them 10455621f50c3Smrg # from the output so that they don't get included in the library 10456621f50c3Smrg # dependencies. 10457621f50c3Smrg 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' 10458621f50c3Smrg ;; 10459621f50c3Smrg xl* | mpixl* | bgxl*) 10460621f50c3Smrg # IBM XL 8.0 on PPC, with GNU ld 10461621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10462621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10463621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10464621f50c3Smrg if test yes = "$supports_anon_versioning"; then 10465621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10466621f50c3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10467621f50c3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10468621f50c3Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10469621f50c3Smrg fi 10470621f50c3Smrg ;; 10471621f50c3Smrg *) 10472621f50c3Smrg case `$CC -V 2>&1 | $SED 5q` in 10473621f50c3Smrg *Sun\ C*) 10474621f50c3Smrg # Sun C++ 5.9 10475621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10476621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10477621f50c3Smrg _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' 10478621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10479621f50c3Smrg _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' 10480621f50c3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 104813eed67faSmbalmer 10482621f50c3Smrg # Not sure whether something based on 10483621f50c3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10484621f50c3Smrg # would be better. 10485621f50c3Smrg output_verbose_link_cmd='func_echo_all' 104863eed67faSmbalmer 10487621f50c3Smrg # Archives containing C++ object files must be created using 10488621f50c3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10489621f50c3Smrg # necessary to make sure instantiated templates are included 10490621f50c3Smrg # in the archive. 10491621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10492621f50c3Smrg ;; 10493621f50c3Smrg esac 10494621f50c3Smrg ;; 10495621f50c3Smrg esac 10496621f50c3Smrg ;; 104973eed67faSmbalmer 10498621f50c3Smrg lynxos*) 10499621f50c3Smrg # FIXME: insert proper C++ library support 10500621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10501621f50c3Smrg ;; 105023eed67faSmbalmer 10503621f50c3Smrg m88k*) 10504621f50c3Smrg # FIXME: insert proper C++ library support 10505621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10506621f50c3Smrg ;; 105073eed67faSmbalmer 10508621f50c3Smrg mvs*) 10509621f50c3Smrg case $cc_basename in 10510621f50c3Smrg cxx*) 10511621f50c3Smrg # FIXME: insert proper C++ library support 10512621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10513621f50c3Smrg ;; 10514621f50c3Smrg *) 10515621f50c3Smrg # FIXME: insert proper C++ library support 10516621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10517621f50c3Smrg ;; 10518621f50c3Smrg esac 10519621f50c3Smrg ;; 105203eed67faSmbalmer 10521621f50c3Smrg netbsd*) 10522621f50c3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10523621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10524621f50c3Smrg wlarc= 10525621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10526621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10527621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10528621f50c3Smrg fi 10529621f50c3Smrg # Workaround some broken pre-1.5 toolchains 10530621f50c3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10531621f50c3Smrg ;; 105323eed67faSmbalmer 10533621f50c3Smrg *nto* | *qnx*) 10534621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10535621f50c3Smrg ;; 105363eed67faSmbalmer 10537621f50c3Smrg openbsd* | bitrig*) 10538621f50c3Smrg if test -f /usr/libexec/ld.so; then 10539621f50c3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10540621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10541621f50c3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10542621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10543621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10544621f50c3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10545621f50c3Smrg _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' 10546621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10547621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10548621f50c3Smrg fi 10549621f50c3Smrg output_verbose_link_cmd=func_echo_all 10550621f50c3Smrg else 10551621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10552621f50c3Smrg fi 10553621f50c3Smrg ;; 105543eed67faSmbalmer 10555621f50c3Smrg osf3* | osf4* | osf5*) 10556621f50c3Smrg case $cc_basename in 10557621f50c3Smrg KCC*) 10558621f50c3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 105593eed67faSmbalmer 10560621f50c3Smrg # KCC will only create a shared library if the output file 10561621f50c3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10562621f50c3Smrg # to its proper name (with version) after linking. 10563621f50c3Smrg _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' 105643eed67faSmbalmer 10565621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10566621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105673eed67faSmbalmer 10568621f50c3Smrg # Archives containing C++ object files must be created using 10569621f50c3Smrg # the KAI C++ compiler. 10570621f50c3Smrg case $host in 10571621f50c3Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10572621f50c3Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10573621f50c3Smrg esac 10574621f50c3Smrg ;; 10575621f50c3Smrg RCC*) 10576621f50c3Smrg # Rational C++ 2.4.1 10577621f50c3Smrg # FIXME: insert proper C++ library support 10578621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10579621f50c3Smrg ;; 10580621f50c3Smrg cxx*) 10581621f50c3Smrg case $host in 10582621f50c3Smrg osf3*) 10583621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10584621f50c3Smrg _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' 10585621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10586621f50c3Smrg ;; 10587621f50c3Smrg *) 10588621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10589621f50c3Smrg _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' 10590621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10591621f50c3Smrg echo "-hidden">> $lib.exp~ 10592621f50c3Smrg $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~ 10593621f50c3Smrg $RM $lib.exp' 10594621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10595621f50c3Smrg ;; 10596621f50c3Smrg esac 105973eed67faSmbalmer 10598621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105993eed67faSmbalmer 10600621f50c3Smrg # Commands to make compiler produce verbose output that lists 10601621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10602621f50c3Smrg # linking a shared library. 10603621f50c3Smrg # 10604621f50c3Smrg # There doesn't appear to be a way to prevent this compiler from 10605621f50c3Smrg # explicitly linking system object files so we need to strip them 10606621f50c3Smrg # from the output so that they don't get included in the library 10607621f50c3Smrg # dependencies. 10608621f50c3Smrg 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"' 10609621f50c3Smrg ;; 10610621f50c3Smrg *) 10611621f50c3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10612621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10613621f50c3Smrg case $host in 10614621f50c3Smrg osf3*) 10615621f50c3Smrg _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' 10616621f50c3Smrg ;; 10617621f50c3Smrg *) 10618621f50c3Smrg _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' 10619621f50c3Smrg ;; 10620621f50c3Smrg esac 10621dc407927Smrg 10622621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10623621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10624dc407927Smrg 10625621f50c3Smrg # Commands to make compiler produce verbose output that lists 10626621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10627621f50c3Smrg # linking a shared library. 10628621f50c3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 106293eed67faSmbalmer 10630621f50c3Smrg else 10631621f50c3Smrg # FIXME: insert proper C++ library support 10632621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10633621f50c3Smrg fi 10634621f50c3Smrg ;; 10635621f50c3Smrg esac 10636621f50c3Smrg ;; 10637621f50c3Smrg 10638621f50c3Smrg psos*) 10639621f50c3Smrg # FIXME: insert proper C++ library support 10640621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10641621f50c3Smrg ;; 10642621f50c3Smrg 10643621f50c3Smrg sunos4*) 10644621f50c3Smrg case $cc_basename in 10645621f50c3Smrg CC*) 10646621f50c3Smrg # Sun C++ 4.x 10647621f50c3Smrg # FIXME: insert proper C++ library support 10648621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10649621f50c3Smrg ;; 10650621f50c3Smrg lcc*) 10651621f50c3Smrg # Lucid 10652621f50c3Smrg # FIXME: insert proper C++ library support 10653621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10654621f50c3Smrg ;; 10655621f50c3Smrg *) 10656621f50c3Smrg # FIXME: insert proper C++ library support 10657621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10658621f50c3Smrg ;; 10659621f50c3Smrg esac 10660621f50c3Smrg ;; 1066175cbef56Smrg 10662621f50c3Smrg solaris*) 10663621f50c3Smrg case $cc_basename in 10664621f50c3Smrg CC* | sunCC*) 10665621f50c3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 10666621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10667621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10668621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10669621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10670621f50c3Smrg $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' 106713eed67faSmbalmer 10672621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10673621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10674621f50c3Smrg case $host_os in 10675621f50c3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10676621f50c3Smrg *) 10677621f50c3Smrg # The compiler driver will combine and reorder linker options, 10678621f50c3Smrg # but understands '-z linker_flag'. 10679621f50c3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10680621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10681621f50c3Smrg ;; 10682621f50c3Smrg esac 10683621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 106843eed67faSmbalmer 10685621f50c3Smrg output_verbose_link_cmd='func_echo_all' 106863eed67faSmbalmer 10687621f50c3Smrg # Archives containing C++ object files must be created using 10688621f50c3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10689621f50c3Smrg # necessary to make sure instantiated templates are included 10690621f50c3Smrg # in the archive. 10691621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10692621f50c3Smrg ;; 10693621f50c3Smrg gcx*) 10694621f50c3Smrg # Green Hills C++ Compiler 10695621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106963eed67faSmbalmer 10697621f50c3Smrg # The C++ compiler must be used to create the archive. 10698621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10699621f50c3Smrg ;; 10700621f50c3Smrg *) 10701621f50c3Smrg # GNU C++ compiler with Solaris linker 10702621f50c3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10703621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10704621f50c3Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10705621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10706621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10707621f50c3Smrg $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' 107083eed67faSmbalmer 10709621f50c3Smrg # Commands to make compiler produce verbose output that lists 10710621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10711621f50c3Smrg # linking a shared library. 10712621f50c3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10713621f50c3Smrg else 10714621f50c3Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10715621f50c3Smrg # platform. 10716621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10717621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10718621f50c3Smrg $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' 107193eed67faSmbalmer 10720621f50c3Smrg # Commands to make compiler produce verbose output that lists 10721621f50c3Smrg # what "hidden" libraries, object files and flags are used when 10722621f50c3Smrg # linking a shared library. 10723621f50c3Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10724621f50c3Smrg fi 10725621f50c3Smrg 10726621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10727621f50c3Smrg case $host_os in 10728621f50c3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10729621f50c3Smrg *) 10730621f50c3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10731621f50c3Smrg ;; 10732621f50c3Smrg esac 10733621f50c3Smrg fi 10734621f50c3Smrg ;; 10735621f50c3Smrg esac 10736621f50c3Smrg ;; 107373eed67faSmbalmer 10738621f50c3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10739621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10740621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10741621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10742621f50c3Smrg runpath_var='LD_RUN_PATH' 107433eed67faSmbalmer 10744621f50c3Smrg case $cc_basename in 10745621f50c3Smrg CC*) 10746621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10747621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10748621f50c3Smrg ;; 10749621f50c3Smrg *) 10750621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10751621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10752621f50c3Smrg ;; 10753621f50c3Smrg esac 10754621f50c3Smrg ;; 107553eed67faSmbalmer 10756621f50c3Smrg sysv5* | sco3.2v5* | sco5v6*) 10757621f50c3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10758621f50c3Smrg # link with -lc, and that would cause any symbols used from libc to 10759621f50c3Smrg # always be unresolved, which means just about no library would 10760621f50c3Smrg # ever link correctly. If we're not using GNU ld we use -z text 10761621f50c3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10762621f50c3Smrg # as -z defs. 10763621f50c3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10764621f50c3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10765621f50c3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10766621f50c3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10767621f50c3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10768621f50c3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10769621f50c3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10770621f50c3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10771621f50c3Smrg runpath_var='LD_RUN_PATH' 107723eed67faSmbalmer 10773621f50c3Smrg case $cc_basename in 10774621f50c3Smrg CC*) 10775621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10776621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10777621f50c3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10778621f50c3Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10779621f50c3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10780621f50c3Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 10781621f50c3Smrg ;; 10782621f50c3Smrg *) 10783621f50c3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784621f50c3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10785621f50c3Smrg ;; 10786621f50c3Smrg esac 10787621f50c3Smrg ;; 10788dc407927Smrg 10789621f50c3Smrg tandem*) 10790621f50c3Smrg case $cc_basename in 10791621f50c3Smrg NCC*) 10792621f50c3Smrg # NonStop-UX NCC 3.20 10793621f50c3Smrg # FIXME: insert proper C++ library support 10794621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10795621f50c3Smrg ;; 10796621f50c3Smrg *) 10797621f50c3Smrg # FIXME: insert proper C++ library support 10798621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10799621f50c3Smrg ;; 10800621f50c3Smrg esac 10801621f50c3Smrg ;; 10802dc407927Smrg 10803621f50c3Smrg vxworks*) 10804621f50c3Smrg # FIXME: insert proper C++ library support 10805621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10806621f50c3Smrg ;; 10807dc407927Smrg 10808621f50c3Smrg *) 10809621f50c3Smrg # FIXME: insert proper C++ library support 10810621f50c3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10811621f50c3Smrg ;; 10812621f50c3Smrg esac 108133eed67faSmbalmer 10814621f50c3Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10815621f50c3Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 108163eed67faSmbalmer 10817621f50c3Smrg _LT_TAGVAR(GCC, $1)=$GXX 10818621f50c3Smrg _LT_TAGVAR(LD, $1)=$LD 108193eed67faSmbalmer 10820621f50c3Smrg ## CAVEAT EMPTOR: 10821621f50c3Smrg ## There is no encapsulation within the following macros, do not change 10822621f50c3Smrg ## the running order or otherwise move them around unless you know exactly 10823621f50c3Smrg ## what you are doing... 10824621f50c3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 10825621f50c3Smrg _LT_COMPILER_PIC($1) 10826621f50c3Smrg _LT_COMPILER_C_O($1) 10827621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 10828621f50c3Smrg _LT_LINKER_SHLIBS($1) 10829621f50c3Smrg _LT_SYS_DYNAMIC_LINKER($1) 10830621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 108313eed67faSmbalmer 10832621f50c3Smrg _LT_CONFIG($1) 10833621f50c3Smrg fi # test -n "$compiler" 108341a9c160aSmrg 10835621f50c3Smrg CC=$lt_save_CC 10836621f50c3Smrg CFLAGS=$lt_save_CFLAGS 10837621f50c3Smrg LDCXX=$LD 10838621f50c3Smrg LD=$lt_save_LD 10839621f50c3Smrg GCC=$lt_save_GCC 10840621f50c3Smrg with_gnu_ld=$lt_save_with_gnu_ld 10841621f50c3Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 10842621f50c3Smrg lt_cv_path_LD=$lt_save_path_LD 10843621f50c3Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10844621f50c3Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10845621f50c3Smrgfi # test yes != "$_lt_caught_CXX_error" 10846dc407927Smrg 10847621f50c3SmrgAC_LANG_POP 10848621f50c3Smrg])# _LT_LANG_CXX_CONFIG 10849dd0822caSmrg 1085075cbef56Smrg 10851621f50c3Smrg# _LT_FUNC_STRIPNAME_CNF 10852621f50c3Smrg# ---------------------- 10853621f50c3Smrg# func_stripname_cnf prefix suffix name 10854621f50c3Smrg# strip PREFIX and SUFFIX off of NAME. 10855621f50c3Smrg# PREFIX and SUFFIX must not contain globbing or regex special 10856621f50c3Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10857621f50c3Smrg# dot (in which case that matches only a dot). 10858dc407927Smrg# 10859621f50c3Smrg# This function is identical to the (non-XSI) version of func_stripname, 10860621f50c3Smrg# except this one can be used by m4 code that may be executed by configure, 10861621f50c3Smrg# rather than the libtool script. 10862621f50c3Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10863621f50c3SmrgAC_REQUIRE([_LT_DECL_SED]) 10864621f50c3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10865621f50c3Smrgfunc_stripname_cnf () 10866621f50c3Smrg{ 10867621f50c3Smrg case @S|@2 in 10868621f50c3Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10869621f50c3Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10870621f50c3Smrg esac 10871621f50c3Smrg} # func_stripname_cnf 10872621f50c3Smrg])# _LT_FUNC_STRIPNAME_CNF 10873621f50c3Smrg 10874621f50c3Smrg 10875621f50c3Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10876621f50c3Smrg# --------------------------------- 10877621f50c3Smrg# Figure out "hidden" library dependencies from verbose 10878621f50c3Smrg# compiler output when linking a shared library. 10879621f50c3Smrg# Parse the compiler output and extract the necessary 10880621f50c3Smrg# objects, libraries and library flags. 10881621f50c3Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10882621f50c3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10883621f50c3SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10884621f50c3Smrg# Dependencies to place before and after the object being linked: 10885621f50c3Smrg_LT_TAGVAR(predep_objects, $1)= 10886621f50c3Smrg_LT_TAGVAR(postdep_objects, $1)= 10887621f50c3Smrg_LT_TAGVAR(predeps, $1)= 10888621f50c3Smrg_LT_TAGVAR(postdeps, $1)= 10889621f50c3Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10890621f50c3Smrg 10891621f50c3Smrgdnl we can't use the lt_simple_compile_test_code here, 10892621f50c3Smrgdnl because it contains code intended for an executable, 10893621f50c3Smrgdnl not a library. It's possible we should let each 10894621f50c3Smrgdnl tag define a new lt_????_link_test_code variable, 10895621f50c3Smrgdnl but it's only used here... 10896621f50c3Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10897621f50c3Smrgint a; 10898621f50c3Smrgvoid foo (void) { a = 0; } 10899621f50c3Smrg_LT_EOF 10900621f50c3Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10901621f50c3Smrgclass Foo 10902621f50c3Smrg{ 10903621f50c3Smrgpublic: 10904621f50c3Smrg Foo (void) { a = 0; } 10905621f50c3Smrgprivate: 10906621f50c3Smrg int a; 10907621f50c3Smrg}; 10908621f50c3Smrg_LT_EOF 10909621f50c3Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10910621f50c3Smrg subroutine foo 10911621f50c3Smrg implicit none 10912621f50c3Smrg integer*4 a 10913621f50c3Smrg a=0 10914621f50c3Smrg return 10915621f50c3Smrg end 10916621f50c3Smrg_LT_EOF 10917621f50c3Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10918621f50c3Smrg subroutine foo 10919621f50c3Smrg implicit none 10920621f50c3Smrg integer a 10921621f50c3Smrg a=0 10922621f50c3Smrg return 10923621f50c3Smrg end 10924621f50c3Smrg_LT_EOF 10925621f50c3Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10926621f50c3Smrgpublic class foo { 10927621f50c3Smrg private int a; 10928621f50c3Smrg public void bar (void) { 10929621f50c3Smrg a = 0; 10930621f50c3Smrg } 10931621f50c3Smrg}; 10932621f50c3Smrg_LT_EOF 10933621f50c3Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10934621f50c3Smrgpackage foo 10935621f50c3Smrgfunc foo() { 10936621f50c3Smrg} 10937621f50c3Smrg_LT_EOF 10938621f50c3Smrg]) 10939dc407927Smrg 10940621f50c3Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 10941621f50c3Smrgcase "$CC $CFLAGS " in #( 10942621f50c3Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10943621f50c3Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10944621f50c3Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10945621f50c3Smrgesac 10946dc407927Smrg 10947621f50c3Smrgdnl Parse the compiler output and extract the necessary 10948621f50c3Smrgdnl objects, libraries and library flags. 10949621f50c3Smrgif AC_TRY_EVAL(ac_compile); then 10950621f50c3Smrg # Parse the compiler output and extract the necessary 10951621f50c3Smrg # objects, libraries and library flags. 10952dc407927Smrg 10953621f50c3Smrg # Sentinel used to keep track of whether or not we are before 10954621f50c3Smrg # the conftest object file. 10955621f50c3Smrg pre_test_object_deps_done=no 10956dd0822caSmrg 10957621f50c3Smrg for p in `eval "$output_verbose_link_cmd"`; do 10958621f50c3Smrg case $prev$p in 10959dd0822caSmrg 10960621f50c3Smrg -L* | -R* | -l*) 10961621f50c3Smrg # Some compilers place space between "-{L,R}" and the path. 10962621f50c3Smrg # Remove the space. 10963621f50c3Smrg if test x-L = "$p" || 10964621f50c3Smrg test x-R = "$p"; then 10965621f50c3Smrg prev=$p 10966621f50c3Smrg continue 10967621f50c3Smrg fi 10968dd0822caSmrg 10969621f50c3Smrg # Expand the sysroot to ease extracting the directories later. 10970621f50c3Smrg if test -z "$prev"; then 10971621f50c3Smrg case $p in 10972621f50c3Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10973621f50c3Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10974621f50c3Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10975621f50c3Smrg esac 10976621f50c3Smrg fi 10977621f50c3Smrg case $p in 10978621f50c3Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10979621f50c3Smrg esac 10980621f50c3Smrg if test no = "$pre_test_object_deps_done"; then 10981621f50c3Smrg case $prev in 10982621f50c3Smrg -L | -R) 10983621f50c3Smrg # Internal compiler library paths should come after those 10984621f50c3Smrg # provided the user. The postdeps already come after the 10985621f50c3Smrg # user supplied libs so there is no need to process them. 10986621f50c3Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10987621f50c3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10988621f50c3Smrg else 10989621f50c3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10990621f50c3Smrg fi 10991621f50c3Smrg ;; 10992621f50c3Smrg # The "-l" case would never come before the object being 10993621f50c3Smrg # linked, so don't bother handling this case. 10994621f50c3Smrg esac 10995621f50c3Smrg else 10996621f50c3Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10997621f50c3Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 10998621f50c3Smrg else 10999621f50c3Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11000621f50c3Smrg fi 11001621f50c3Smrg fi 11002621f50c3Smrg prev= 11003621f50c3Smrg ;; 11004dc407927Smrg 11005621f50c3Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 11006621f50c3Smrg *.$objext) 11007621f50c3Smrg # This assumes that the test object file only shows up 11008621f50c3Smrg # once in the compiler output. 11009621f50c3Smrg if test "$p" = "conftest.$objext"; then 11010621f50c3Smrg pre_test_object_deps_done=yes 11011621f50c3Smrg continue 11012621f50c3Smrg fi 1101375cbef56Smrg 11014621f50c3Smrg if test no = "$pre_test_object_deps_done"; then 11015621f50c3Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11016621f50c3Smrg _LT_TAGVAR(predep_objects, $1)=$p 11017621f50c3Smrg else 11018621f50c3Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11019621f50c3Smrg fi 11020621f50c3Smrg else 11021621f50c3Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11022621f50c3Smrg _LT_TAGVAR(postdep_objects, $1)=$p 11023621f50c3Smrg else 11024621f50c3Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11025621f50c3Smrg fi 11026621f50c3Smrg fi 11027621f50c3Smrg ;; 11028621f50c3Smrg 11029621f50c3Smrg *) ;; # Ignore the rest. 11030621f50c3Smrg 11031621f50c3Smrg esac 11032621f50c3Smrg done 11033621f50c3Smrg 11034621f50c3Smrg # Clean up. 11035621f50c3Smrg rm -f a.out a.exe 110361a9c160aSmrgelse 11037621f50c3Smrg echo "libtool.m4: error: problem compiling $1 test program" 110381a9c160aSmrgfi 11039dc407927Smrg 11040621f50c3Smrg$RM -f confest.$objext 11041621f50c3SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 1104275cbef56Smrg 11043621f50c3Smrg# PORTME: override above test on systems where it is broken 11044621f50c3Smrgm4_if([$1], [CXX], 11045621f50c3Smrg[case $host_os in 11046621f50c3Smrginterix[[3-9]]*) 11047621f50c3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11048621f50c3Smrg # hack all around it, let's just trust "g++" to DTRT. 11049621f50c3Smrg _LT_TAGVAR(predep_objects,$1)= 11050621f50c3Smrg _LT_TAGVAR(postdep_objects,$1)= 11051621f50c3Smrg _LT_TAGVAR(postdeps,$1)= 11052621f50c3Smrg ;; 11053621f50c3Smrgesac 11054621f50c3Smrg]) 110551a9c160aSmrg 11056621f50c3Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 11057621f50c3Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 110581a9c160aSmrgesac 11059621f50c3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11060621f50c3Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11061621f50c3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11062621f50c3Smrgfi 11063621f50c3Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11064621f50c3Smrg [The directories searched by this compiler when creating a shared library]) 11065621f50c3Smrg_LT_TAGDECL([], [predep_objects], [1], 11066621f50c3Smrg [Dependencies to place before and after the objects being linked to 11067621f50c3Smrg create a shared library]) 11068621f50c3Smrg_LT_TAGDECL([], [postdep_objects], [1]) 11069621f50c3Smrg_LT_TAGDECL([], [predeps], [1]) 11070621f50c3Smrg_LT_TAGDECL([], [postdeps], [1]) 11071621f50c3Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11072621f50c3Smrg [The library search path used internally by the compiler when linking 11073621f50c3Smrg a shared library]) 11074621f50c3Smrg])# _LT_SYS_HIDDEN_LIBDEPS 110751a9c160aSmrg 11076621f50c3Smrg 11077621f50c3Smrg# _LT_LANG_F77_CONFIG([TAG]) 11078621f50c3Smrg# -------------------------- 11079621f50c3Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11080621f50c3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11081621f50c3Smrg# to write the compiler configuration to 'libtool'. 11082621f50c3Smrgm4_defun([_LT_LANG_F77_CONFIG], 11083621f50c3Smrg[AC_LANG_PUSH(Fortran 77) 11084621f50c3Smrgif test -z "$F77" || test no = "$F77"; then 11085621f50c3Smrg _lt_disable_F77=yes 110861a9c160aSmrgfi 110871a9c160aSmrg 11088621f50c3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11089621f50c3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11090621f50c3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11091621f50c3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11092621f50c3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11093621f50c3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11094621f50c3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11095621f50c3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11096621f50c3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11097621f50c3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11098621f50c3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11099621f50c3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11100621f50c3Smrg_LT_TAGVAR(module_cmds, $1)= 11101621f50c3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11102621f50c3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11103621f50c3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11104621f50c3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11105621f50c3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11106621f50c3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11107621f50c3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11108621f50c3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 111091a9c160aSmrg 11110621f50c3Smrg# Source file extension for f77 test sources. 11111621f50c3Smrgac_ext=f 111121a9c160aSmrg 11113621f50c3Smrg# Object file extension for compiled f77 test sources. 11114621f50c3Smrgobjext=o 11115621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 111161a9c160aSmrg 11117621f50c3Smrg# No sense in running all these tests if we already determined that 11118621f50c3Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11119621f50c3Smrg# are currently assumed to apply to all compilers on this platform, 11120621f50c3Smrg# and will be corrupted by setting them based on a non-working compiler. 11121621f50c3Smrgif test yes != "$_lt_disable_F77"; then 11122621f50c3Smrg # Code to be used in simple compile tests 11123621f50c3Smrg lt_simple_compile_test_code="\ 11124621f50c3Smrg subroutine t 11125621f50c3Smrg return 11126621f50c3Smrg end 11127621f50c3Smrg" 11128621f50c3Smrg 11129621f50c3Smrg # Code to be used in simple link tests 11130621f50c3Smrg lt_simple_link_test_code="\ 11131621f50c3Smrg program t 11132621f50c3Smrg end 11133621f50c3Smrg" 11134621f50c3Smrg 11135621f50c3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11136621f50c3Smrg _LT_TAG_COMPILER 11137621f50c3Smrg 11138621f50c3Smrg # save warnings/boilerplate of simple test code 11139621f50c3Smrg _LT_COMPILER_BOILERPLATE 11140621f50c3Smrg _LT_LINKER_BOILERPLATE 11141621f50c3Smrg 11142621f50c3Smrg # Allow CC to be a program name with arguments. 11143621f50c3Smrg lt_save_CC=$CC 11144621f50c3Smrg lt_save_GCC=$GCC 11145621f50c3Smrg lt_save_CFLAGS=$CFLAGS 11146621f50c3Smrg CC=${F77-"f77"} 11147621f50c3Smrg CFLAGS=$FFLAGS 11148621f50c3Smrg compiler=$CC 11149621f50c3Smrg _LT_TAGVAR(compiler, $1)=$CC 11150621f50c3Smrg _LT_CC_BASENAME([$compiler]) 11151621f50c3Smrg GCC=$G77 11152621f50c3Smrg if test -n "$compiler"; then 11153621f50c3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11154621f50c3Smrg AC_MSG_RESULT([$can_build_shared]) 11155621f50c3Smrg 11156621f50c3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11157621f50c3Smrg test no = "$can_build_shared" && enable_shared=no 11158621f50c3Smrg 11159621f50c3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11160621f50c3Smrg # are all built from PIC. 11161621f50c3Smrg case $host_os in 11162621f50c3Smrg aix3*) 11163621f50c3Smrg test yes = "$enable_shared" && enable_static=no 11164621f50c3Smrg if test -n "$RANLIB"; then 11165621f50c3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11166621f50c3Smrg postinstall_cmds='$RANLIB $lib' 11167621f50c3Smrg fi 11168621f50c3Smrg ;; 11169621f50c3Smrg aix[[4-9]]*) 11170621f50c3Smrg if test ia64 != "$host_cpu"; then 11171621f50c3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11172621f50c3Smrg yes,aix,yes) ;; # shared object as lib.so file only 11173621f50c3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11174621f50c3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11175621f50c3Smrg esac 11176621f50c3Smrg fi 11177621f50c3Smrg ;; 11178621f50c3Smrg esac 11179621f50c3Smrg AC_MSG_RESULT([$enable_shared]) 11180621f50c3Smrg 11181621f50c3Smrg AC_MSG_CHECKING([whether to build static libraries]) 11182621f50c3Smrg # Make sure either enable_shared or enable_static is yes. 11183621f50c3Smrg test yes = "$enable_shared" || enable_static=yes 11184621f50c3Smrg AC_MSG_RESULT([$enable_static]) 11185621f50c3Smrg 11186621f50c3Smrg _LT_TAGVAR(GCC, $1)=$G77 11187621f50c3Smrg _LT_TAGVAR(LD, $1)=$LD 11188621f50c3Smrg 11189621f50c3Smrg ## CAVEAT EMPTOR: 11190621f50c3Smrg ## There is no encapsulation within the following macros, do not change 11191621f50c3Smrg ## the running order or otherwise move them around unless you know exactly 11192621f50c3Smrg ## what you are doing... 11193621f50c3Smrg _LT_COMPILER_PIC($1) 11194621f50c3Smrg _LT_COMPILER_C_O($1) 11195621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 11196621f50c3Smrg _LT_LINKER_SHLIBS($1) 11197621f50c3Smrg _LT_SYS_DYNAMIC_LINKER($1) 11198621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11199621f50c3Smrg 11200621f50c3Smrg _LT_CONFIG($1) 11201621f50c3Smrg fi # test -n "$compiler" 11202621f50c3Smrg 11203621f50c3Smrg GCC=$lt_save_GCC 11204621f50c3Smrg CC=$lt_save_CC 11205621f50c3Smrg CFLAGS=$lt_save_CFLAGS 11206621f50c3Smrgfi # test yes != "$_lt_disable_F77" 11207621f50c3Smrg 11208621f50c3SmrgAC_LANG_POP 11209621f50c3Smrg])# _LT_LANG_F77_CONFIG 11210621f50c3Smrg 11211621f50c3Smrg 11212621f50c3Smrg# _LT_LANG_FC_CONFIG([TAG]) 11213621f50c3Smrg# ------------------------- 11214621f50c3Smrg# Ensure that the configuration variables for a Fortran compiler are 11215621f50c3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11216621f50c3Smrg# to write the compiler configuration to 'libtool'. 11217621f50c3Smrgm4_defun([_LT_LANG_FC_CONFIG], 11218621f50c3Smrg[AC_LANG_PUSH(Fortran) 11219621f50c3Smrg 11220621f50c3Smrgif test -z "$FC" || test no = "$FC"; then 11221621f50c3Smrg _lt_disable_FC=yes 112221a9c160aSmrgfi 112231a9c160aSmrg 11224621f50c3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11225621f50c3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11226621f50c3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11227621f50c3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11228621f50c3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11229621f50c3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11230621f50c3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11231621f50c3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11232621f50c3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11233621f50c3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11234621f50c3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11235621f50c3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11236621f50c3Smrg_LT_TAGVAR(module_cmds, $1)= 11237621f50c3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11238621f50c3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11239621f50c3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11240621f50c3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11241621f50c3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11242621f50c3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11243621f50c3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11244621f50c3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 112451a9c160aSmrg 11246621f50c3Smrg# Source file extension for fc test sources. 11247621f50c3Smrgac_ext=${ac_fc_srcext-f} 11248dd0822caSmrg 11249621f50c3Smrg# Object file extension for compiled fc test sources. 11250621f50c3Smrgobjext=o 11251621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 112521a9c160aSmrg 11253621f50c3Smrg# No sense in running all these tests if we already determined that 11254621f50c3Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11255621f50c3Smrg# are currently assumed to apply to all compilers on this platform, 11256621f50c3Smrg# and will be corrupted by setting them based on a non-working compiler. 11257621f50c3Smrgif test yes != "$_lt_disable_FC"; then 11258621f50c3Smrg # Code to be used in simple compile tests 11259621f50c3Smrg lt_simple_compile_test_code="\ 11260621f50c3Smrg subroutine t 11261621f50c3Smrg return 11262621f50c3Smrg end 11263621f50c3Smrg" 112641a9c160aSmrg 11265621f50c3Smrg # Code to be used in simple link tests 11266621f50c3Smrg lt_simple_link_test_code="\ 11267621f50c3Smrg program t 11268621f50c3Smrg end 11269621f50c3Smrg" 11270dd0822caSmrg 11271621f50c3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11272621f50c3Smrg _LT_TAG_COMPILER 11273dd0822caSmrg 11274621f50c3Smrg # save warnings/boilerplate of simple test code 11275621f50c3Smrg _LT_COMPILER_BOILERPLATE 11276621f50c3Smrg _LT_LINKER_BOILERPLATE 112771a9c160aSmrg 11278621f50c3Smrg # Allow CC to be a program name with arguments. 11279621f50c3Smrg lt_save_CC=$CC 11280621f50c3Smrg lt_save_GCC=$GCC 11281621f50c3Smrg lt_save_CFLAGS=$CFLAGS 11282621f50c3Smrg CC=${FC-"f95"} 11283621f50c3Smrg CFLAGS=$FCFLAGS 11284621f50c3Smrg compiler=$CC 11285621f50c3Smrg GCC=$ac_cv_fc_compiler_gnu 112861a9c160aSmrg 11287621f50c3Smrg _LT_TAGVAR(compiler, $1)=$CC 11288621f50c3Smrg _LT_CC_BASENAME([$compiler]) 112891a9c160aSmrg 11290621f50c3Smrg if test -n "$compiler"; then 11291621f50c3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11292621f50c3Smrg AC_MSG_RESULT([$can_build_shared]) 112931a9c160aSmrg 11294621f50c3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11295621f50c3Smrg test no = "$can_build_shared" && enable_shared=no 11296dd0822caSmrg 11297621f50c3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11298621f50c3Smrg # are all built from PIC. 11299621f50c3Smrg case $host_os in 11300621f50c3Smrg aix3*) 11301621f50c3Smrg test yes = "$enable_shared" && enable_static=no 11302621f50c3Smrg if test -n "$RANLIB"; then 11303621f50c3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11304621f50c3Smrg postinstall_cmds='$RANLIB $lib' 11305621f50c3Smrg fi 11306621f50c3Smrg ;; 11307621f50c3Smrg aix[[4-9]]*) 11308621f50c3Smrg if test ia64 != "$host_cpu"; then 11309621f50c3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11310621f50c3Smrg yes,aix,yes) ;; # shared object as lib.so file only 11311621f50c3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11312621f50c3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11313621f50c3Smrg esac 11314621f50c3Smrg fi 11315621f50c3Smrg ;; 11316621f50c3Smrg esac 11317621f50c3Smrg AC_MSG_RESULT([$enable_shared]) 113181a9c160aSmrg 11319621f50c3Smrg AC_MSG_CHECKING([whether to build static libraries]) 11320621f50c3Smrg # Make sure either enable_shared or enable_static is yes. 11321621f50c3Smrg test yes = "$enable_shared" || enable_static=yes 11322621f50c3Smrg AC_MSG_RESULT([$enable_static]) 113231a9c160aSmrg 11324621f50c3Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11325621f50c3Smrg _LT_TAGVAR(LD, $1)=$LD 113261a9c160aSmrg 11327621f50c3Smrg ## CAVEAT EMPTOR: 11328621f50c3Smrg ## There is no encapsulation within the following macros, do not change 11329621f50c3Smrg ## the running order or otherwise move them around unless you know exactly 11330621f50c3Smrg ## what you are doing... 11331621f50c3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11332621f50c3Smrg _LT_COMPILER_PIC($1) 11333621f50c3Smrg _LT_COMPILER_C_O($1) 11334621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 11335621f50c3Smrg _LT_LINKER_SHLIBS($1) 11336621f50c3Smrg _LT_SYS_DYNAMIC_LINKER($1) 11337621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 113381a9c160aSmrg 11339621f50c3Smrg _LT_CONFIG($1) 11340621f50c3Smrg fi # test -n "$compiler" 113411a9c160aSmrg 11342621f50c3Smrg GCC=$lt_save_GCC 11343621f50c3Smrg CC=$lt_save_CC 11344621f50c3Smrg CFLAGS=$lt_save_CFLAGS 11345621f50c3Smrgfi # test yes != "$_lt_disable_FC" 113461a9c160aSmrg 11347621f50c3SmrgAC_LANG_POP 11348621f50c3Smrg])# _LT_LANG_FC_CONFIG 113491a9c160aSmrg 113501a9c160aSmrg 11351621f50c3Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11352621f50c3Smrg# -------------------------- 11353621f50c3Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11354621f50c3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11355621f50c3Smrg# to write the compiler configuration to 'libtool'. 11356621f50c3Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11357621f50c3Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11358621f50c3SmrgAC_LANG_SAVE 113591a9c160aSmrg 11360621f50c3Smrg# Source file extension for Java test sources. 11361621f50c3Smrgac_ext=java 113621a9c160aSmrg 11363621f50c3Smrg# Object file extension for compiled Java test sources. 11364621f50c3Smrgobjext=o 11365621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 113661a9c160aSmrg 11367621f50c3Smrg# Code to be used in simple compile tests 11368621f50c3Smrglt_simple_compile_test_code="class foo {}" 113691a9c160aSmrg 11370621f50c3Smrg# Code to be used in simple link tests 11371621f50c3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 113721a9c160aSmrg 11373621f50c3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11374621f50c3Smrg_LT_TAG_COMPILER 113751a9c160aSmrg 11376621f50c3Smrg# save warnings/boilerplate of simple test code 11377621f50c3Smrg_LT_COMPILER_BOILERPLATE 11378621f50c3Smrg_LT_LINKER_BOILERPLATE 113791a9c160aSmrg 11380621f50c3Smrg# Allow CC to be a program name with arguments. 11381621f50c3Smrglt_save_CC=$CC 11382621f50c3Smrglt_save_CFLAGS=$CFLAGS 11383621f50c3Smrglt_save_GCC=$GCC 11384621f50c3SmrgGCC=yes 11385621f50c3SmrgCC=${GCJ-"gcj"} 11386621f50c3SmrgCFLAGS=$GCJFLAGS 11387621f50c3Smrgcompiler=$CC 11388621f50c3Smrg_LT_TAGVAR(compiler, $1)=$CC 11389621f50c3Smrg_LT_TAGVAR(LD, $1)=$LD 11390621f50c3Smrg_LT_CC_BASENAME([$compiler]) 113911a9c160aSmrg 11392621f50c3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11393621f50c3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113941a9c160aSmrg 11395621f50c3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11396621f50c3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11397621f50c3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113981a9c160aSmrg 11399621f50c3Smrgif test -n "$compiler"; then 11400621f50c3Smrg _LT_COMPILER_NO_RTTI($1) 11401621f50c3Smrg _LT_COMPILER_PIC($1) 11402621f50c3Smrg _LT_COMPILER_C_O($1) 11403621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 11404621f50c3Smrg _LT_LINKER_SHLIBS($1) 11405621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 114061a9c160aSmrg 11407621f50c3Smrg _LT_CONFIG($1) 11408621f50c3Smrgfi 114091a9c160aSmrg 11410621f50c3SmrgAC_LANG_RESTORE 114111a9c160aSmrg 11412621f50c3SmrgGCC=$lt_save_GCC 11413621f50c3SmrgCC=$lt_save_CC 11414621f50c3SmrgCFLAGS=$lt_save_CFLAGS 11415621f50c3Smrg])# _LT_LANG_GCJ_CONFIG 114161a9c160aSmrg 114171a9c160aSmrg 11418621f50c3Smrg# _LT_LANG_GO_CONFIG([TAG]) 11419621f50c3Smrg# -------------------------- 11420621f50c3Smrg# Ensure that the configuration variables for the GNU Go compiler 11421621f50c3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11422621f50c3Smrg# to write the compiler configuration to 'libtool'. 11423621f50c3Smrgm4_defun([_LT_LANG_GO_CONFIG], 11424621f50c3Smrg[AC_REQUIRE([LT_PROG_GO])dnl 11425621f50c3SmrgAC_LANG_SAVE 114261a9c160aSmrg 11427621f50c3Smrg# Source file extension for Go test sources. 11428621f50c3Smrgac_ext=go 114291a9c160aSmrg 11430621f50c3Smrg# Object file extension for compiled Go test sources. 11431621f50c3Smrgobjext=o 11432621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 114331a9c160aSmrg 11434621f50c3Smrg# Code to be used in simple compile tests 11435621f50c3Smrglt_simple_compile_test_code="package main; func main() { }" 114361a9c160aSmrg 11437621f50c3Smrg# Code to be used in simple link tests 11438621f50c3Smrglt_simple_link_test_code='package main; func main() { }' 114391a9c160aSmrg 11440621f50c3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11441621f50c3Smrg_LT_TAG_COMPILER 114421a9c160aSmrg 11443621f50c3Smrg# save warnings/boilerplate of simple test code 11444621f50c3Smrg_LT_COMPILER_BOILERPLATE 11445621f50c3Smrg_LT_LINKER_BOILERPLATE 114461a9c160aSmrg 11447621f50c3Smrg# Allow CC to be a program name with arguments. 11448621f50c3Smrglt_save_CC=$CC 11449621f50c3Smrglt_save_CFLAGS=$CFLAGS 11450621f50c3Smrglt_save_GCC=$GCC 11451621f50c3SmrgGCC=yes 11452621f50c3SmrgCC=${GOC-"gccgo"} 11453621f50c3SmrgCFLAGS=$GOFLAGS 11454621f50c3Smrgcompiler=$CC 11455621f50c3Smrg_LT_TAGVAR(compiler, $1)=$CC 11456621f50c3Smrg_LT_TAGVAR(LD, $1)=$LD 11457621f50c3Smrg_LT_CC_BASENAME([$compiler]) 114581a9c160aSmrg 11459621f50c3Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 11460621f50c3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11461621f50c3Smrg 11462621f50c3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11463621f50c3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11464621f50c3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11465621f50c3Smrg 11466621f50c3Smrgif test -n "$compiler"; then 11467621f50c3Smrg _LT_COMPILER_NO_RTTI($1) 11468621f50c3Smrg _LT_COMPILER_PIC($1) 11469621f50c3Smrg _LT_COMPILER_C_O($1) 11470621f50c3Smrg _LT_COMPILER_FILE_LOCKS($1) 11471621f50c3Smrg _LT_LINKER_SHLIBS($1) 11472621f50c3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11473621f50c3Smrg 11474621f50c3Smrg _LT_CONFIG($1) 114751a9c160aSmrgfi 114761a9c160aSmrg 11477621f50c3SmrgAC_LANG_RESTORE 114781a9c160aSmrg 11479621f50c3SmrgGCC=$lt_save_GCC 11480621f50c3SmrgCC=$lt_save_CC 11481621f50c3SmrgCFLAGS=$lt_save_CFLAGS 11482621f50c3Smrg])# _LT_LANG_GO_CONFIG 114831a9c160aSmrg 114841a9c160aSmrg 11485621f50c3Smrg# _LT_LANG_RC_CONFIG([TAG]) 11486621f50c3Smrg# ------------------------- 11487621f50c3Smrg# Ensure that the configuration variables for the Windows resource compiler 11488621f50c3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11489621f50c3Smrg# to write the compiler configuration to 'libtool'. 11490621f50c3Smrgm4_defun([_LT_LANG_RC_CONFIG], 11491621f50c3Smrg[AC_REQUIRE([LT_PROG_RC])dnl 11492621f50c3SmrgAC_LANG_SAVE 114931a9c160aSmrg 11494621f50c3Smrg# Source file extension for RC test sources. 11495621f50c3Smrgac_ext=rc 114961a9c160aSmrg 11497621f50c3Smrg# Object file extension for compiled RC test sources. 11498621f50c3Smrgobjext=o 11499621f50c3Smrg_LT_TAGVAR(objext, $1)=$objext 115001a9c160aSmrg 11501621f50c3Smrg# Code to be used in simple compile tests 11502621f50c3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 115031a9c160aSmrg 11504621f50c3Smrg# Code to be used in simple link tests 11505621f50c3Smrglt_simple_link_test_code=$lt_simple_compile_test_code 115061a9c160aSmrg 11507621f50c3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11508621f50c3Smrg_LT_TAG_COMPILER 115091a9c160aSmrg 11510621f50c3Smrg# save warnings/boilerplate of simple test code 11511621f50c3Smrg_LT_COMPILER_BOILERPLATE 11512621f50c3Smrg_LT_LINKER_BOILERPLATE 11513621f50c3Smrg 11514621f50c3Smrg# Allow CC to be a program name with arguments. 11515621f50c3Smrglt_save_CC=$CC 11516621f50c3Smrglt_save_CFLAGS=$CFLAGS 11517621f50c3Smrglt_save_GCC=$GCC 11518621f50c3SmrgGCC= 11519621f50c3SmrgCC=${RC-"windres"} 11520621f50c3SmrgCFLAGS= 11521621f50c3Smrgcompiler=$CC 11522621f50c3Smrg_LT_TAGVAR(compiler, $1)=$CC 11523621f50c3Smrg_LT_CC_BASENAME([$compiler]) 11524621f50c3Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 115251a9c160aSmrg 11526621f50c3Smrgif test -n "$compiler"; then 11527621f50c3Smrg : 11528621f50c3Smrg _LT_CONFIG($1) 11529621f50c3Smrgfi 115301a9c160aSmrg 11531621f50c3SmrgGCC=$lt_save_GCC 11532621f50c3SmrgAC_LANG_RESTORE 11533621f50c3SmrgCC=$lt_save_CC 11534621f50c3SmrgCFLAGS=$lt_save_CFLAGS 11535621f50c3Smrg])# _LT_LANG_RC_CONFIG 11536dd0822caSmrg 11537dd0822caSmrg 11538621f50c3Smrg# LT_PROG_GCJ 11539621f50c3Smrg# ----------- 11540621f50c3SmrgAC_DEFUN([LT_PROG_GCJ], 11541621f50c3Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11542621f50c3Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11543621f50c3Smrg [AC_CHECK_TOOL(GCJ, gcj,) 11544621f50c3Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11545621f50c3Smrg AC_SUBST(GCJFLAGS)])])[]dnl 11546621f50c3Smrg]) 11547dd0822caSmrg 11548621f50c3Smrg# Old name: 11549621f50c3SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11550621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 11551621f50c3Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 115521a9c160aSmrg 115531a9c160aSmrg 11554621f50c3Smrg# LT_PROG_GO 11555621f50c3Smrg# ---------- 11556621f50c3SmrgAC_DEFUN([LT_PROG_GO], 11557621f50c3Smrg[AC_CHECK_TOOL(GOC, gccgo,) 11558621f50c3Smrg]) 115591a9c160aSmrg 115601a9c160aSmrg 11561621f50c3Smrg# LT_PROG_RC 11562621f50c3Smrg# ---------- 11563621f50c3SmrgAC_DEFUN([LT_PROG_RC], 11564621f50c3Smrg[AC_CHECK_TOOL(RC, windres,) 11565621f50c3Smrg]) 115661a9c160aSmrg 11567621f50c3Smrg# Old name: 11568621f50c3SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11569621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 11570621f50c3Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 115711a9c160aSmrg 115721a9c160aSmrg 11573621f50c3Smrg# _LT_DECL_EGREP 11574621f50c3Smrg# -------------- 11575621f50c3Smrg# If we don't have a new enough Autoconf to choose the best grep 11576621f50c3Smrg# available, choose the one first in the user's PATH. 11577621f50c3Smrgm4_defun([_LT_DECL_EGREP], 11578621f50c3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11579621f50c3SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11580621f50c3Smrgtest -z "$GREP" && GREP=grep 11581621f50c3Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11582621f50c3Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11583621f50c3Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11584621f50c3Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11585621f50c3SmrgAC_SUBST([GREP]) 11586621f50c3Smrg]) 115871a9c160aSmrg 115881a9c160aSmrg 11589621f50c3Smrg# _LT_DECL_OBJDUMP 11590621f50c3Smrg# -------------- 11591621f50c3Smrg# If we don't have a new enough Autoconf to choose the best objdump 11592621f50c3Smrg# available, choose the one first in the user's PATH. 11593621f50c3Smrgm4_defun([_LT_DECL_OBJDUMP], 11594621f50c3Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11595621f50c3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11596621f50c3Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11597621f50c3SmrgAC_SUBST([OBJDUMP]) 11598621f50c3Smrg]) 115991a9c160aSmrg 11600621f50c3Smrg# _LT_DECL_DLLTOOL 11601621f50c3Smrg# ---------------- 11602621f50c3Smrg# Ensure DLLTOOL variable is set. 11603621f50c3Smrgm4_defun([_LT_DECL_DLLTOOL], 11604621f50c3Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11605621f50c3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11606621f50c3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11607621f50c3SmrgAC_SUBST([DLLTOOL]) 11608621f50c3Smrg]) 116091a9c160aSmrg 11610621f50c3Smrg# _LT_DECL_FILECMD 11611621f50c3Smrg# ---------------- 11612621f50c3Smrg# Check for a file(cmd) program that can be used to detect file type and magic 11613621f50c3Smrgm4_defun([_LT_DECL_FILECMD], 11614621f50c3Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11615621f50c3Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11616621f50c3Smrg])# _LD_DECL_FILECMD 116171a9c160aSmrg 11618621f50c3Smrg# _LT_DECL_SED 11619621f50c3Smrg# ------------ 11620621f50c3Smrg# Check for a fully-functional sed program, that truncates 11621621f50c3Smrg# as few characters as possible. Prefer GNU sed if found. 11622621f50c3Smrgm4_defun([_LT_DECL_SED], 11623621f50c3Smrg[AC_PROG_SED 11624621f50c3Smrgtest -z "$SED" && SED=sed 11625621f50c3SmrgXsed="$SED -e 1s/^X//" 11626621f50c3Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11627621f50c3Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11628621f50c3Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11629621f50c3Smrg])# _LT_DECL_SED 116301a9c160aSmrg 11631621f50c3Smrgm4_ifndef([AC_PROG_SED], [ 11632621f50c3Smrg# NOTE: This macro has been submitted for inclusion into # 11633621f50c3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11634621f50c3Smrg# a released version of Autoconf we should remove this # 11635621f50c3Smrg# macro and use it instead. # 116361a9c160aSmrg 11637621f50c3Smrgm4_defun([AC_PROG_SED], 11638621f50c3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11639621f50c3SmrgAC_CACHE_VAL(lt_cv_path_SED, 11640621f50c3Smrg[# Loop through the user's path and test for sed and gsed. 11641621f50c3Smrg# Then use that list of sed's as ones to test for truncation. 11642621f50c3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11643621f50c3Smrgfor as_dir in $PATH 11644621f50c3Smrgdo 11645621f50c3Smrg IFS=$as_save_IFS 11646621f50c3Smrg test -z "$as_dir" && as_dir=. 11647621f50c3Smrg for lt_ac_prog in sed gsed; do 11648621f50c3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 11649621f50c3Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11650621f50c3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 116511a9c160aSmrg fi 11652621f50c3Smrg done 11653621f50c3Smrg done 11654621f50c3Smrgdone 11655621f50c3SmrgIFS=$as_save_IFS 11656621f50c3Smrglt_ac_max=0 11657621f50c3Smrglt_ac_count=0 11658621f50c3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11659621f50c3Smrg# along with /bin/sed that truncates output. 11660621f50c3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11661621f50c3Smrg test ! -f "$lt_ac_sed" && continue 11662621f50c3Smrg cat /dev/null > conftest.in 11663621f50c3Smrg lt_ac_count=0 11664621f50c3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11665621f50c3Smrg # Check for GNU sed and select it if it is found. 11666621f50c3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11667621f50c3Smrg lt_cv_path_SED=$lt_ac_sed 11668621f50c3Smrg break 11669621f50c3Smrg fi 11670621f50c3Smrg while true; do 11671621f50c3Smrg cat conftest.in conftest.in >conftest.tmp 11672621f50c3Smrg mv conftest.tmp conftest.in 11673621f50c3Smrg cp conftest.in conftest.nl 11674621f50c3Smrg echo >>conftest.nl 11675621f50c3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11676621f50c3Smrg cmp -s conftest.out conftest.nl || break 11677621f50c3Smrg # 10000 chars as input seems more than enough 11678621f50c3Smrg test 10 -lt "$lt_ac_count" && break 11679621f50c3Smrg lt_ac_count=`expr $lt_ac_count + 1` 11680621f50c3Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11681621f50c3Smrg lt_ac_max=$lt_ac_count 11682621f50c3Smrg lt_cv_path_SED=$lt_ac_sed 116831a9c160aSmrg fi 116841a9c160aSmrg done 11685621f50c3Smrgdone 11686621f50c3Smrg]) 11687621f50c3SmrgSED=$lt_cv_path_SED 11688621f50c3SmrgAC_SUBST([SED]) 11689621f50c3SmrgAC_MSG_RESULT([$SED]) 11690621f50c3Smrg])#AC_PROG_SED 11691621f50c3Smrg])#m4_ifndef 116921a9c160aSmrg 11693621f50c3Smrg# Old name: 11694621f50c3SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11695621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 11696621f50c3Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11697621f50c3Smrg 11698621f50c3Smrg 11699621f50c3Smrg# _LT_CHECK_SHELL_FEATURES 11700621f50c3Smrg# ------------------------ 11701621f50c3Smrg# Find out whether the shell is Bourne or XSI compatible, 11702621f50c3Smrg# or has some other useful features. 11703621f50c3Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11704621f50c3Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11705621f50c3Smrg lt_unset=unset 11706dd0822caSmrgelse 11707621f50c3Smrg lt_unset=false 11708dd0822caSmrgfi 11709621f50c3Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11710621f50c3Smrg 11711621f50c3Smrg# test EBCDIC or ASCII 11712621f50c3Smrgcase `echo X|tr X '\101'` in 11713621f50c3Smrg A) # ASCII based system 11714621f50c3Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11715621f50c3Smrg lt_SP2NL='tr \040 \012' 11716621f50c3Smrg lt_NL2SP='tr \015\012 \040\040' 11717621f50c3Smrg ;; 11718621f50c3Smrg *) # EBCDIC based system 11719621f50c3Smrg lt_SP2NL='tr \100 \n' 11720621f50c3Smrg lt_NL2SP='tr \r\n \100\100' 11721621f50c3Smrg ;; 11722621f50c3Smrgesac 11723621f50c3Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11724621f50c3Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11725621f50c3Smrg])# _LT_CHECK_SHELL_FEATURES 11726621f50c3Smrg 11727621f50c3Smrg 11728621f50c3Smrg# _LT_PATH_CONVERSION_FUNCTIONS 11729621f50c3Smrg# ----------------------------- 11730621f50c3Smrg# Determine what file name conversion functions should be used by 11731621f50c3Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11732621f50c3Smrg# for certain cross-compile configurations and native mingw. 11733621f50c3Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11734621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11735621f50c3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11736621f50c3SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11737621f50c3SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11738621f50c3Smrg[case $host in 11739621f50c3Smrg *-*-mingw* ) 11740621f50c3Smrg case $build in 11741621f50c3Smrg *-*-mingw* ) # actually msys 11742621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11743621f50c3Smrg ;; 11744621f50c3Smrg *-*-cygwin* ) 11745621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11746621f50c3Smrg ;; 11747621f50c3Smrg * ) # otherwise, assume *nix 11748621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11749621f50c3Smrg ;; 11750621f50c3Smrg esac 11751621f50c3Smrg ;; 11752621f50c3Smrg *-*-cygwin* ) 11753621f50c3Smrg case $build in 11754621f50c3Smrg *-*-mingw* ) # actually msys 11755621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11756621f50c3Smrg ;; 11757621f50c3Smrg *-*-cygwin* ) 11758621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11759621f50c3Smrg ;; 11760621f50c3Smrg * ) # otherwise, assume *nix 11761621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11762621f50c3Smrg ;; 11763621f50c3Smrg esac 11764621f50c3Smrg ;; 11765621f50c3Smrg * ) # unhandled hosts (and "normal" native builds) 11766621f50c3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11767621f50c3Smrg ;; 11768621f50c3Smrgesac 117691a9c160aSmrg]) 11770621f50c3Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11771621f50c3SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11772621f50c3Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11773621f50c3Smrg [0], [convert $build file names to $host format])dnl 11774621f50c3Smrg 11775621f50c3SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11776621f50c3SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11777621f50c3Smrg[#assume ordinary cross tools, or native build. 11778621f50c3Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 11779621f50c3Smrgcase $host in 11780621f50c3Smrg *-*-mingw* ) 11781621f50c3Smrg case $build in 11782621f50c3Smrg *-*-mingw* ) # actually msys 11783621f50c3Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11784621f50c3Smrg ;; 11785621f50c3Smrg esac 11786621f50c3Smrg ;; 11787621f50c3Smrgesac 117881a9c160aSmrg]) 11789621f50c3Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11790621f50c3SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11791621f50c3Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11792621f50c3Smrg [0], [convert $build files to toolchain format])dnl 11793621f50c3Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 11794dd0822caSmrg 11795621f50c3Smrg# Helper functions for option handling. -*- Autoconf -*- 11796621f50c3Smrg# 11797621f50c3Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11798621f50c3Smrg# Software Foundation, Inc. 11799621f50c3Smrg# Written by Gary V. Vaughan, 2004 11800621f50c3Smrg# 11801621f50c3Smrg# This file is free software; the Free Software Foundation gives 11802621f50c3Smrg# unlimited permission to copy and/or distribute it, with or without 11803621f50c3Smrg# modifications, as long as this notice is preserved. 1180475cbef56Smrg 11805621f50c3Smrg# serial 8 ltoptions.m4 1180675cbef56Smrg 11807621f50c3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11808621f50c3SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 1180975cbef56Smrg 11810621f50c3Smrg 11811621f50c3Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11812621f50c3Smrg# ------------------------------------------ 11813621f50c3Smrgm4_define([_LT_MANGLE_OPTION], 11814621f50c3Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11815621f50c3Smrg 11816621f50c3Smrg 11817621f50c3Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11818621f50c3Smrg# --------------------------------------- 11819621f50c3Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11820621f50c3Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11821621f50c3Smrg# saved as a flag. 11822621f50c3Smrgm4_define([_LT_SET_OPTION], 11823621f50c3Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11824621f50c3Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11825621f50c3Smrg _LT_MANGLE_DEFUN([$1], [$2]), 11826621f50c3Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 118271a9c160aSmrg]) 1182875cbef56Smrg 1182975cbef56Smrg 11830621f50c3Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11831621f50c3Smrg# ------------------------------------------------------------ 11832621f50c3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11833621f50c3Smrgm4_define([_LT_IF_OPTION], 11834621f50c3Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 118353eed67faSmbalmer 118363eed67faSmbalmer 11837621f50c3Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11838621f50c3Smrg# ------------------------------------------------------- 11839621f50c3Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11840621f50c3Smrg# are set. 11841621f50c3Smrgm4_define([_LT_UNLESS_OPTIONS], 11842621f50c3Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11843621f50c3Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11844621f50c3Smrg [m4_define([$0_found])])])[]dnl 11845621f50c3Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11846621f50c3Smrg])[]dnl 11847621f50c3Smrg]) 118483eed67faSmbalmer 118491a9c160aSmrg 11850621f50c3Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11851621f50c3Smrg# ---------------------------------------- 11852621f50c3Smrg# OPTION-LIST is a space-separated list of Libtool options associated 11853621f50c3Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11854621f50c3Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11855621f50c3Smrg# the unknown option and exit. 11856621f50c3Smrgm4_defun([_LT_SET_OPTIONS], 11857621f50c3Smrg[# Set options 11858621f50c3Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11859621f50c3Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 118601a9c160aSmrg 11861621f50c3Smrgm4_if([$1],[LT_INIT],[ 11862621f50c3Smrg dnl 11863621f50c3Smrg dnl Simply set some default values (i.e off) if boolean options were not 11864621f50c3Smrg dnl specified: 11865621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11866621f50c3Smrg ]) 11867621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11868621f50c3Smrg ]) 11869621f50c3Smrg dnl 11870621f50c3Smrg dnl If no reference was made to various pairs of opposing options, then 11871621f50c3Smrg dnl we run the default mode handler for the pair. For example, if neither 11872621f50c3Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11873621f50c3Smrg dnl archives by default: 11874621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11875621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11876621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11877621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11878621f50c3Smrg [_LT_ENABLE_FAST_INSTALL]) 11879621f50c3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11880621f50c3Smrg [_LT_WITH_AIX_SONAME([aix])]) 11881621f50c3Smrg ]) 11882621f50c3Smrg])# _LT_SET_OPTIONS 118833eed67faSmbalmer 11884dc407927Smrg 11885dc407927Smrg 11886621f50c3Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11887621f50c3Smrg# ----------------------------------------- 11888621f50c3Smrgm4_define([_LT_MANGLE_DEFUN], 11889621f50c3Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11890dc407927Smrg 118913eed67faSmbalmer 11892621f50c3Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11893621f50c3Smrg# ----------------------------------------------- 11894621f50c3Smrgm4_define([LT_OPTION_DEFINE], 11895621f50c3Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11896621f50c3Smrg])# LT_OPTION_DEFINE 118973eed67faSmbalmer 118983eed67faSmbalmer 11899621f50c3Smrg# dlopen 11900621f50c3Smrg# ------ 11901621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 119021a9c160aSmrg]) 119033eed67faSmbalmer 11904621f50c3SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11905621f50c3Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11906621f50c3SmrgAC_DIAGNOSE([obsolete], 11907621f50c3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11908621f50c3Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 11909621f50c3Smrg]) 119101a9c160aSmrg 11911621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 11912621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 119131a9c160aSmrg 11914dc407927Smrg 11915621f50c3Smrg# win32-dll 11916621f50c3Smrg# --------- 11917621f50c3Smrg# Declare package support for building win32 dll's. 11918621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11919621f50c3Smrg[enable_win32_dll=yes 119201a9c160aSmrg 11921621f50c3Smrgcase $host in 11922621f50c3Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11923621f50c3Smrg AC_CHECK_TOOL(AS, as, false) 11924621f50c3Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11925621f50c3Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11926621f50c3Smrg ;; 11927621f50c3Smrgesac 119281a9c160aSmrg 11929621f50c3Smrgtest -z "$AS" && AS=as 11930621f50c3Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 119311a9c160aSmrg 11932621f50c3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11933621f50c3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11934621f50c3Smrg 11935621f50c3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11936621f50c3Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11937621f50c3Smrg])# win32-dll 11938621f50c3Smrg 11939621f50c3SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11940621f50c3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11941621f50c3Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11942621f50c3SmrgAC_DIAGNOSE([obsolete], 11943621f50c3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944621f50c3Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 119451a9c160aSmrg]) 11946dc407927Smrg 11947621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 11948621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 119493eed67faSmbalmer 119503eed67faSmbalmer 11951621f50c3Smrg# _LT_ENABLE_SHARED([DEFAULT]) 11952621f50c3Smrg# ---------------------------- 11953621f50c3Smrg# implement the --enable-shared flag, and supports the 'shared' and 11954621f50c3Smrg# 'disable-shared' LT_INIT options. 11955621f50c3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11956621f50c3Smrgm4_define([_LT_ENABLE_SHARED], 11957621f50c3Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11958621f50c3SmrgAC_ARG_ENABLE([shared], 11959621f50c3Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11960621f50c3Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11961621f50c3Smrg [p=${PACKAGE-default} 11962621f50c3Smrg case $enableval in 11963621f50c3Smrg yes) enable_shared=yes ;; 11964621f50c3Smrg no) enable_shared=no ;; 11965621f50c3Smrg *) 11966621f50c3Smrg enable_shared=no 11967621f50c3Smrg # Look at the argument we got. We use all the common list separators. 11968621f50c3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11969621f50c3Smrg for pkg in $enableval; do 11970621f50c3Smrg IFS=$lt_save_ifs 11971621f50c3Smrg if test "X$pkg" = "X$p"; then 11972621f50c3Smrg enable_shared=yes 11973621f50c3Smrg fi 11974621f50c3Smrg done 11975621f50c3Smrg IFS=$lt_save_ifs 11976621f50c3Smrg ;; 11977621f50c3Smrg esac], 11978621f50c3Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11979dd0822caSmrg 11980621f50c3Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11981621f50c3Smrg [Whether or not to build shared libraries]) 11982621f50c3Smrg])# _LT_ENABLE_SHARED 119831a9c160aSmrg 11984621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11985621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 119861a9c160aSmrg 11987621f50c3Smrg# Old names: 11988621f50c3SmrgAC_DEFUN([AC_ENABLE_SHARED], 11989621f50c3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11990621f50c3Smrg]) 1199175cbef56Smrg 11992621f50c3SmrgAC_DEFUN([AC_DISABLE_SHARED], 11993621f50c3Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11994621f50c3Smrg]) 1199575cbef56Smrg 11996621f50c3SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11997621f50c3SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 1199875cbef56Smrg 11999621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 12000621f50c3Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 12001621f50c3Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 1200275cbef56Smrg 1200375cbef56Smrg 1200475cbef56Smrg 12005621f50c3Smrg# _LT_ENABLE_STATIC([DEFAULT]) 12006621f50c3Smrg# ---------------------------- 12007621f50c3Smrg# implement the --enable-static flag, and support the 'static' and 12008621f50c3Smrg# 'disable-static' LT_INIT options. 12009621f50c3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12010621f50c3Smrgm4_define([_LT_ENABLE_STATIC], 12011621f50c3Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12012621f50c3SmrgAC_ARG_ENABLE([static], 12013621f50c3Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12014621f50c3Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12015621f50c3Smrg [p=${PACKAGE-default} 12016621f50c3Smrg case $enableval in 12017621f50c3Smrg yes) enable_static=yes ;; 12018621f50c3Smrg no) enable_static=no ;; 12019621f50c3Smrg *) 12020621f50c3Smrg enable_static=no 12021621f50c3Smrg # Look at the argument we got. We use all the common list separators. 12022621f50c3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12023621f50c3Smrg for pkg in $enableval; do 12024621f50c3Smrg IFS=$lt_save_ifs 12025621f50c3Smrg if test "X$pkg" = "X$p"; then 12026621f50c3Smrg enable_static=yes 12027621f50c3Smrg fi 12028621f50c3Smrg done 12029621f50c3Smrg IFS=$lt_save_ifs 12030621f50c3Smrg ;; 12031621f50c3Smrg esac], 12032621f50c3Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 1203375cbef56Smrg 12034621f50c3Smrg _LT_DECL([build_old_libs], [enable_static], [0], 12035621f50c3Smrg [Whether or not to build static libraries]) 12036621f50c3Smrg])# _LT_ENABLE_STATIC 12037621f50c3Smrg 12038621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12039621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12040621f50c3Smrg 12041621f50c3Smrg# Old names: 12042621f50c3SmrgAC_DEFUN([AC_ENABLE_STATIC], 12043621f50c3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12044621f50c3Smrg]) 12045621f50c3Smrg 12046621f50c3SmrgAC_DEFUN([AC_DISABLE_STATIC], 12047621f50c3Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 12048621f50c3Smrg]) 12049621f50c3Smrg 12050621f50c3SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12051621f50c3SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12052621f50c3Smrg 12053621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 12054621f50c3Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 12055621f50c3Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 1205675cbef56Smrg 1205775cbef56Smrg 1205875cbef56Smrg 12059621f50c3Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12060621f50c3Smrg# ---------------------------------- 12061621f50c3Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 12062621f50c3Smrg# and 'disable-fast-install' LT_INIT options. 12063621f50c3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12064621f50c3Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 12065621f50c3Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12066621f50c3SmrgAC_ARG_ENABLE([fast-install], 12067621f50c3Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12068621f50c3Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12069621f50c3Smrg [p=${PACKAGE-default} 12070621f50c3Smrg case $enableval in 12071621f50c3Smrg yes) enable_fast_install=yes ;; 12072621f50c3Smrg no) enable_fast_install=no ;; 12073621f50c3Smrg *) 12074621f50c3Smrg enable_fast_install=no 12075621f50c3Smrg # Look at the argument we got. We use all the common list separators. 12076621f50c3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12077621f50c3Smrg for pkg in $enableval; do 12078621f50c3Smrg IFS=$lt_save_ifs 12079621f50c3Smrg if test "X$pkg" = "X$p"; then 12080621f50c3Smrg enable_fast_install=yes 12081621f50c3Smrg fi 12082621f50c3Smrg done 12083621f50c3Smrg IFS=$lt_save_ifs 12084621f50c3Smrg ;; 12085621f50c3Smrg esac], 12086621f50c3Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1208775cbef56Smrg 12088621f50c3Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 12089621f50c3Smrg [Whether or not to optimize for fast installation])dnl 12090621f50c3Smrg])# _LT_ENABLE_FAST_INSTALL 1209175cbef56Smrg 12092621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12093621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 1209475cbef56Smrg 12095621f50c3Smrg# Old names: 12096621f50c3SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12097621f50c3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12098621f50c3SmrgAC_DIAGNOSE([obsolete], 12099621f50c3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12100621f50c3Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 12101621f50c3Smrg]) 1210275cbef56Smrg 12103621f50c3SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12104621f50c3Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 121051a9c160aSmrgAC_DIAGNOSE([obsolete], 12106621f50c3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12107621f50c3Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12108621f50c3Smrg]) 1210975cbef56Smrg 12110621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 12111621f50c3Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12112621f50c3Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 1211375cbef56Smrg 1211475cbef56Smrg 12115621f50c3Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12116621f50c3Smrg# ---------------------------------- 12117621f50c3Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12118621f50c3Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12119621f50c3Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12120621f50c3Smrgm4_define([_LT_WITH_AIX_SONAME], 12121621f50c3Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12122621f50c3Smrgshared_archive_member_spec= 12123621f50c3Smrgcase $host,$enable_shared in 12124621f50c3Smrgpower*-*-aix[[5-9]]*,yes) 12125621f50c3Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12126621f50c3Smrg AC_ARG_WITH([aix-soname], 12127621f50c3Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12128621f50c3Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12129621f50c3Smrg [case $withval in 12130621f50c3Smrg aix|svr4|both) 12131621f50c3Smrg ;; 12132621f50c3Smrg *) 12133621f50c3Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12134621f50c3Smrg ;; 12135621f50c3Smrg esac 12136621f50c3Smrg lt_cv_with_aix_soname=$with_aix_soname], 12137621f50c3Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12138621f50c3Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12139621f50c3Smrg with_aix_soname=$lt_cv_with_aix_soname]) 12140621f50c3Smrg AC_MSG_RESULT([$with_aix_soname]) 12141621f50c3Smrg if test aix != "$with_aix_soname"; then 12142621f50c3Smrg # For the AIX way of multilib, we name the shared archive member 12143621f50c3Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12144621f50c3Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12145621f50c3Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12146621f50c3Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12147621f50c3Smrg if test 64 = "${OBJECT_MODE-32}"; then 12148621f50c3Smrg shared_archive_member_spec=shr_64 12149621f50c3Smrg else 12150621f50c3Smrg shared_archive_member_spec=shr 12151621f50c3Smrg fi 12152621f50c3Smrg fi 12153621f50c3Smrg ;; 12154621f50c3Smrg*) 12155621f50c3Smrg with_aix_soname=aix 12156621f50c3Smrg ;; 12157621f50c3Smrgesac 1215875cbef56Smrg 12159621f50c3Smrg_LT_DECL([], [shared_archive_member_spec], [0], 12160621f50c3Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12161621f50c3Smrg])# _LT_WITH_AIX_SONAME 1216275cbef56Smrg 12163621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12164621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12165621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12166621f50c3Smrg 12167621f50c3Smrg 12168621f50c3Smrg# _LT_WITH_PIC([MODE]) 121691a9c160aSmrg# -------------------- 12170621f50c3Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12171621f50c3Smrg# LT_INIT options. 12172621f50c3Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12173621f50c3Smrgm4_define([_LT_WITH_PIC], 12174621f50c3Smrg[AC_ARG_WITH([pic], 12175621f50c3Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12176621f50c3Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12177621f50c3Smrg [lt_p=${PACKAGE-default} 12178621f50c3Smrg case $withval in 12179621f50c3Smrg yes|no) pic_mode=$withval ;; 12180621f50c3Smrg *) 12181621f50c3Smrg pic_mode=default 12182621f50c3Smrg # Look at the argument we got. We use all the common list separators. 12183621f50c3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12184621f50c3Smrg for lt_pkg in $withval; do 12185621f50c3Smrg IFS=$lt_save_ifs 12186621f50c3Smrg if test "X$lt_pkg" = "X$lt_p"; then 12187621f50c3Smrg pic_mode=yes 12188621f50c3Smrg fi 12189621f50c3Smrg done 12190621f50c3Smrg IFS=$lt_save_ifs 12191621f50c3Smrg ;; 12192621f50c3Smrg esac], 12193621f50c3Smrg [pic_mode=m4_default([$1], [default])]) 1219475cbef56Smrg 12195621f50c3Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12196621f50c3Smrg])# _LT_WITH_PIC 1219775cbef56Smrg 12198621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12199621f50c3SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 1220075cbef56Smrg 12201621f50c3Smrg# Old name: 12202621f50c3SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12203621f50c3Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12204621f50c3SmrgAC_DIAGNOSE([obsolete], 12205621f50c3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12206621f50c3Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 12207621f50c3Smrg]) 122083eed67faSmbalmer 12209621f50c3Smrgdnl aclocal-1.4 backwards compatibility: 12210621f50c3Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 122111a9c160aSmrg 122121a9c160aSmrg 12213621f50c3Smrgm4_define([_LTDL_MODE], []) 12214621f50c3SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12215621f50c3Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12216621f50c3SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12217621f50c3Smrg [m4_define([_LTDL_MODE], [recursive])]) 12218621f50c3SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12219621f50c3Smrg [m4_define([_LTDL_MODE], [subproject])]) 12220621f50c3Smrg 12221621f50c3Smrgm4_define([_LTDL_TYPE], []) 12222621f50c3SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12223621f50c3Smrg [m4_define([_LTDL_TYPE], [installable])]) 12224621f50c3SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12225621f50c3Smrg [m4_define([_LTDL_TYPE], [convenience])]) 12226621f50c3Smrg 12227621f50c3Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12228dd0822caSmrg# 12229621f50c3Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12230621f50c3Smrg# Foundation, Inc. 12231621f50c3Smrg# Written by Gary V. Vaughan, 2004 12232621f50c3Smrg# 12233621f50c3Smrg# This file is free software; the Free Software Foundation gives 12234621f50c3Smrg# unlimited permission to copy and/or distribute it, with or without 12235621f50c3Smrg# modifications, as long as this notice is preserved. 12236dc407927Smrg 12237621f50c3Smrg# serial 6 ltsugar.m4 1223875cbef56Smrg 12239621f50c3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12240621f50c3SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 122411a9c160aSmrg 122421a9c160aSmrg 12243621f50c3Smrg# lt_join(SEP, ARG1, [ARG2...]) 12244621f50c3Smrg# ----------------------------- 12245621f50c3Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12246621f50c3Smrg# associated separator. 12247621f50c3Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12248621f50c3Smrg# versions in m4sugar had bugs. 12249621f50c3Smrgm4_define([lt_join], 12250621f50c3Smrg[m4_if([$#], [1], [], 12251621f50c3Smrg [$#], [2], [[$2]], 12252621f50c3Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12253621f50c3Smrgm4_define([_lt_join], 12254621f50c3Smrg[m4_if([$#$2], [2], [], 12255621f50c3Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 1225675cbef56Smrg 122571a9c160aSmrg 12258621f50c3Smrg# lt_car(LIST) 12259621f50c3Smrg# lt_cdr(LIST) 12260621f50c3Smrg# ------------ 12261621f50c3Smrg# Manipulate m4 lists. 12262621f50c3Smrg# These macros are necessary as long as will still need to support 12263621f50c3Smrg# Autoconf-2.59, which quotes differently. 12264621f50c3Smrgm4_define([lt_car], [[$1]]) 12265621f50c3Smrgm4_define([lt_cdr], 12266621f50c3Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12267621f50c3Smrg [$#], 1, [], 12268621f50c3Smrg [m4_dquote(m4_shift($@))])]) 12269621f50c3Smrgm4_define([lt_unquote], $1) 12270621f50c3Smrg 1227175cbef56Smrg 12272621f50c3Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12273621f50c3Smrg# ------------------------------------------ 12274621f50c3Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12275621f50c3Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12276621f50c3Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12277621f50c3Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12278621f50c3Smrg# than defined and empty). 122791a9c160aSmrg# 12280621f50c3Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12281621f50c3Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12282621f50c3Smrgm4_define([lt_append], 12283621f50c3Smrg[m4_define([$1], 12284621f50c3Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 1228575cbef56Smrg 122863eed67faSmbalmer 12287dc407927Smrg 12288621f50c3Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12289621f50c3Smrg# ---------------------------------------------------------- 12290621f50c3Smrg# Produce a SEP delimited list of all paired combinations of elements of 12291621f50c3Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12292621f50c3Smrg# has the form PREFIXmINFIXSUFFIXn. 12293621f50c3Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12294621f50c3Smrgm4_define([lt_combine], 12295621f50c3Smrg[m4_if(m4_eval([$# > 3]), [1], 12296621f50c3Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12297621f50c3Smrg[[m4_foreach([_Lt_prefix], [$2], 12298621f50c3Smrg [m4_foreach([_Lt_suffix], 12299621f50c3Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12300621f50c3Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12301621f50c3Smrg 12302621f50c3Smrg 12303621f50c3Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12304621f50c3Smrg# ----------------------------------------------------------------------- 12305621f50c3Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12306621f50c3Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12307621f50c3Smrgm4_define([lt_if_append_uniq], 12308621f50c3Smrg[m4_ifdef([$1], 12309621f50c3Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12310621f50c3Smrg [lt_append([$1], [$2], [$3])$4], 12311621f50c3Smrg [$5])], 12312621f50c3Smrg [lt_append([$1], [$2], [$3])$4])]) 12313621f50c3Smrg 12314621f50c3Smrg 12315621f50c3Smrg# lt_dict_add(DICT, KEY, VALUE) 12316621f50c3Smrg# ----------------------------- 12317621f50c3Smrgm4_define([lt_dict_add], 12318621f50c3Smrg[m4_define([$1($2)], [$3])]) 123191a9c160aSmrg 123201a9c160aSmrg 12321621f50c3Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12322621f50c3Smrg# -------------------------------------------- 12323621f50c3Smrgm4_define([lt_dict_add_subkey], 12324621f50c3Smrg[m4_define([$1($2:$3)], [$4])]) 123251a9c160aSmrg 123261a9c160aSmrg 12327621f50c3Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12328621f50c3Smrg# ---------------------------------- 12329621f50c3Smrgm4_define([lt_dict_fetch], 12330621f50c3Smrg[m4_ifval([$3], 12331621f50c3Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12332621f50c3Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 123331a9c160aSmrg 123343eed67faSmbalmer 12335621f50c3Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12336621f50c3Smrg# ----------------------------------------------------------------- 12337621f50c3Smrgm4_define([lt_if_dict_fetch], 12338621f50c3Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12339621f50c3Smrg [$5], 12340621f50c3Smrg [$6])]) 12341dc407927Smrg 12342dc407927Smrg 12343621f50c3Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12344621f50c3Smrg# -------------------------------------------------------------- 12345621f50c3Smrgm4_define([lt_dict_filter], 12346621f50c3Smrg[m4_if([$5], [], [], 12347621f50c3Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12348621f50c3Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12349621f50c3Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12350621f50c3Smrg]) 123511a9c160aSmrg 12352621f50c3Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12353621f50c3Smrg# 12354621f50c3Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12355621f50c3Smrg# Inc. 12356621f50c3Smrg# Written by Scott James Remnant, 2004 12357621f50c3Smrg# 12358621f50c3Smrg# This file is free software; the Free Software Foundation gives 12359621f50c3Smrg# unlimited permission to copy and/or distribute it, with or without 12360621f50c3Smrg# modifications, as long as this notice is preserved. 12361dc407927Smrg 12362621f50c3Smrg# @configure_input@ 123631a9c160aSmrg 12364621f50c3Smrg# serial 4245 ltversion.m4 12365621f50c3Smrg# This file is part of GNU Libtool 123661a9c160aSmrg 12367621f50c3Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12368621f50c3Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 123691a9c160aSmrg 12370621f50c3SmrgAC_DEFUN([LTVERSION_VERSION], 12371621f50c3Smrg[macro_version='2.4.7' 12372621f50c3Smrgmacro_revision='2.4.7' 12373621f50c3Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12374621f50c3Smrg_LT_DECL(, macro_revision, 0) 12375621f50c3Smrg]) 123761a9c160aSmrg 12377621f50c3Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12378621f50c3Smrg# 12379621f50c3Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12380621f50c3Smrg# Software Foundation, Inc. 12381621f50c3Smrg# Written by Scott James Remnant, 2004. 12382621f50c3Smrg# 12383621f50c3Smrg# This file is free software; the Free Software Foundation gives 12384621f50c3Smrg# unlimited permission to copy and/or distribute it, with or without 12385621f50c3Smrg# modifications, as long as this notice is preserved. 123861a9c160aSmrg 12387621f50c3Smrg# serial 5 lt~obsolete.m4 123881a9c160aSmrg 12389621f50c3Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 12390621f50c3Smrg# 12391621f50c3Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12392621f50c3Smrg# which have later been changed to m4_define as they aren't part of the 12393621f50c3Smrg# exported API, or moved to Autoconf or Automake where they belong. 12394621f50c3Smrg# 12395621f50c3Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12396621f50c3Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12397621f50c3Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 12398621f50c3Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12399621f50c3Smrg# and doesn't know about Autoconf macros at all.) 12400621f50c3Smrg# 12401621f50c3Smrg# So we provide this file, which has a silly filename so it's always 12402621f50c3Smrg# included after everything else. This provides aclocal with the 12403621f50c3Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12404621f50c3Smrg# because those macros already exist, or will be overwritten later. 12405621f50c3Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12406621f50c3Smrg# 12407621f50c3Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12408621f50c3Smrg# Yes, that means every name once taken will need to remain here until 12409621f50c3Smrg# we give up compatibility with versions before 1.7, at which point 12410621f50c3Smrg# we need to keep only those names which we still refer to. 124111a9c160aSmrg 12412621f50c3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12413621f50c3SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 124141a9c160aSmrg 12415621f50c3Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12416621f50c3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12417621f50c3Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12418621f50c3Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12419621f50c3Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12420621f50c3Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12421621f50c3Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12422621f50c3Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12423621f50c3Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12424621f50c3Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12425621f50c3Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12426621f50c3Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12427621f50c3Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12428621f50c3Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12429621f50c3Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12430621f50c3Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12431621f50c3Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12432621f50c3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12433621f50c3Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12434621f50c3Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12435621f50c3Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12436621f50c3Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12437621f50c3Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12438621f50c3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12439621f50c3Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12440621f50c3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12441621f50c3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12442621f50c3Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12443621f50c3Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12444621f50c3Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12445621f50c3Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12446621f50c3Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12447621f50c3Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12448621f50c3Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12449621f50c3Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12450621f50c3Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12451621f50c3Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12452621f50c3Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12453621f50c3Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12454621f50c3Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12455621f50c3Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12456621f50c3Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12457621f50c3Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12458621f50c3Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12459621f50c3Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12460621f50c3Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12461621f50c3Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12462621f50c3Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12463621f50c3Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12464621f50c3Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12465621f50c3Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12466621f50c3Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12467621f50c3Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12468621f50c3Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12469621f50c3Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12470621f50c3Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12471621f50c3Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12472621f50c3Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12473621f50c3Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12474621f50c3Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12475621f50c3Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12476dc407927Smrg 12477