aclocal.m4 revision e4f6584c
1e4f6584cSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 209885543Smrg 309885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b698ba48Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 509885543Smrg# This file is free software; the Free Software Foundation 609885543Smrg# gives unlimited permission to copy and/or distribute it, 709885543Smrg# with or without modifications, as long as this notice is preserved. 809885543Smrg 909885543Smrg# This program is distributed in the hope that it will be useful, 1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1209885543Smrg# PARTICULAR PURPOSE. 1309885543Smrg 147104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION], 157104f784Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16e4f6584cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17e4f6584cSmrg[m4_warning([this file was generated for autoconf 2.65. 187104f784SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 197104f784SmrgIf you have problems, you may need to regenerate the build system entirely. 207104f784SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 217104f784Smrg 22e4f6584cSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23e4f6584cSmrg# 24e4f6584cSmrg# This file is free software; the Free Software Foundation 25e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 26e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 272ec8c4b4Smrg 28e4f6584cSmrg# AM_AUTOMAKE_VERSION(VERSION) 29e4f6584cSmrg# ---------------------------- 30e4f6584cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31e4f6584cSmrg# generated from the m4 files accompanying Automake X.Y. 32e4f6584cSmrg# (This private macro should not be called outside this file.) 33e4f6584cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34e4f6584cSmrg[am__api_version='1.11' 35e4f6584cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36e4f6584cSmrgdnl require some minimum version. Point them to the right macro. 37e4f6584cSmrgm4_if([$1], [1.11.1], [], 38e4f6584cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39e4f6584cSmrg]) 402ec8c4b4Smrg 41e4f6584cSmrg# _AM_AUTOCONF_VERSION(VERSION) 42e4f6584cSmrg# ----------------------------- 43e4f6584cSmrg# aclocal traces this macro to find the Autoconf version. 44e4f6584cSmrg# This is a private macro too. Using m4_define simplifies 45e4f6584cSmrg# the logic in aclocal, which can simply ignore this definition. 46e4f6584cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 4709885543Smrg 48e4f6584cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49e4f6584cSmrg# ------------------------------- 50e4f6584cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51e4f6584cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52e4f6584cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53e4f6584cSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 54e4f6584cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 55e4f6584cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56e4f6584cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5709885543Smrg 58e4f6584cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5909885543Smrg 60e4f6584cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61e4f6584cSmrg# 62e4f6584cSmrg# This file is free software; the Free Software Foundation 63e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 64e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 652ec8c4b4Smrg 66e4f6584cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67e4f6584cSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68e4f6584cSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69e4f6584cSmrg# 70e4f6584cSmrg# Of course, Automake must honor this variable whenever it calls a 71e4f6584cSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72e4f6584cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73e4f6584cSmrg# depending on how configure is run. This is pretty annoying, since 74e4f6584cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75e4f6584cSmrg# source directory, any form will work fine, but in subdirectories a 76e4f6584cSmrg# relative path needs to be adjusted first. 77e4f6584cSmrg# 78e4f6584cSmrg# $ac_aux_dir/missing 79e4f6584cSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80e4f6584cSmrg# $top_srcdir/$ac_aux_dir/missing 81e4f6584cSmrg# fails if $ac_aux_dir is absolute, 82e4f6584cSmrg# fails when called from a subdirectory in a VPATH build with 83e4f6584cSmrg# a relative $ac_aux_dir 84e4f6584cSmrg# 85e4f6584cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86e4f6584cSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87e4f6584cSmrg# harmless because $srcdir is `.', but things will broke when you 88e4f6584cSmrg# start a VPATH build or use an absolute $srcdir. 89e4f6584cSmrg# 90e4f6584cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91e4f6584cSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92e4f6584cSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93e4f6584cSmrg# and then we would define $MISSING as 94e4f6584cSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95e4f6584cSmrg# This will work as long as MISSING is not called from configure, because 96e4f6584cSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97e4f6584cSmrg# However there are other variables, like CC, which are often used in 98e4f6584cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99e4f6584cSmrg# 100e4f6584cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101e4f6584cSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102e4f6584cSmrg# configured tree to be moved without reconfiguration. 1032ec8c4b4Smrg 104e4f6584cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105e4f6584cSmrg[dnl Rely on autoconf to set up CDPATH properly. 106e4f6584cSmrgAC_PREREQ([2.50])dnl 107e4f6584cSmrg# expand $ac_aux_dir to an absolute path 108e4f6584cSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109e4f6584cSmrg]) 110b698ba48Smrg 111e4f6584cSmrg# AM_CONDITIONAL -*- Autoconf -*- 1122ec8c4b4Smrg 113e4f6584cSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114e4f6584cSmrg# Free Software Foundation, Inc. 115e4f6584cSmrg# 116e4f6584cSmrg# This file is free software; the Free Software Foundation 117e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 118e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 11909885543Smrg 120e4f6584cSmrg# serial 9 12109885543Smrg 122e4f6584cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123e4f6584cSmrg# ------------------------------------- 124e4f6584cSmrg# Define a conditional. 125e4f6584cSmrgAC_DEFUN([AM_CONDITIONAL], 126e4f6584cSmrg[AC_PREREQ(2.52)dnl 127e4f6584cSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128e4f6584cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129e4f6584cSmrgAC_SUBST([$1_TRUE])dnl 130e4f6584cSmrgAC_SUBST([$1_FALSE])dnl 131e4f6584cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132e4f6584cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133e4f6584cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134e4f6584cSmrgif $2; then 135e4f6584cSmrg $1_TRUE= 136e4f6584cSmrg $1_FALSE='#' 137e4f6584cSmrgelse 138e4f6584cSmrg $1_TRUE='#' 139e4f6584cSmrg $1_FALSE= 140e4f6584cSmrgfi 141e4f6584cSmrgAC_CONFIG_COMMANDS_PRE( 142e4f6584cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143e4f6584cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 144e4f6584cSmrgUsually this means the macro was only invoked conditionally.]]) 145e4f6584cSmrgfi])]) 14609885543Smrg 147e4f6584cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148e4f6584cSmrg# Free Software Foundation, Inc. 149e4f6584cSmrg# 150e4f6584cSmrg# This file is free software; the Free Software Foundation 151e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 152e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 15309885543Smrg 154e4f6584cSmrg# serial 10 15509885543Smrg 156e4f6584cSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157e4f6584cSmrg# written in clear, in which case automake, when reading aclocal.m4, 158e4f6584cSmrg# will think it sees a *use*, and therefore will trigger all it's 159e4f6584cSmrg# C support machinery. Also note that it means that autoscan, seeing 160e4f6584cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 16109885543Smrg 162b698ba48Smrg 163e4f6584cSmrg# _AM_DEPENDENCIES(NAME) 164e4f6584cSmrg# ---------------------- 165e4f6584cSmrg# See how the compiler implements dependency checking. 166e4f6584cSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167e4f6584cSmrg# We try a few techniques and use that to set a single cache variable. 168e4f6584cSmrg# 169e4f6584cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170e4f6584cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171e4f6584cSmrg# dependency, and given that the user is not expected to run this macro, 172e4f6584cSmrg# just rely on AC_PROG_CC. 173e4f6584cSmrgAC_DEFUN([_AM_DEPENDENCIES], 174e4f6584cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175e4f6584cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176e4f6584cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177e4f6584cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 17809885543Smrg 179e4f6584cSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180e4f6584cSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181e4f6584cSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182e4f6584cSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183e4f6584cSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184e4f6584cSmrg [depcc="$$1" am_compiler_list=]) 18509885543Smrg 186e4f6584cSmrgAC_CACHE_CHECK([dependency style of $depcc], 187e4f6584cSmrg [am_cv_$1_dependencies_compiler_type], 188e4f6584cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189e4f6584cSmrg # We make a subdir and do the tests there. Otherwise we can end up 190e4f6584cSmrg # making bogus files that we don't know about and never remove. For 191e4f6584cSmrg # instance it was reported that on HP-UX the gcc test will end up 192e4f6584cSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193e4f6584cSmrg # in D'. 194e4f6584cSmrg mkdir conftest.dir 195e4f6584cSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196e4f6584cSmrg # using a relative directory. 197e4f6584cSmrg cp "$am_depcomp" conftest.dir 198e4f6584cSmrg cd conftest.dir 199e4f6584cSmrg # We will build objects and dependencies in a subdirectory because 200e4f6584cSmrg # it helps to detect inapplicable dependency modes. For instance 201e4f6584cSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202e4f6584cSmrg # side effect of compilation, but ICC will put the dependencies in 203e4f6584cSmrg # the current directory while Tru64 will put them in the object 204e4f6584cSmrg # directory. 205e4f6584cSmrg mkdir sub 206b698ba48Smrg 207e4f6584cSmrg am_cv_$1_dependencies_compiler_type=none 208e4f6584cSmrg if test "$am_compiler_list" = ""; then 209e4f6584cSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210e4f6584cSmrg fi 211e4f6584cSmrg am__universal=false 212e4f6584cSmrg m4_case([$1], [CC], 213e4f6584cSmrg [case " $depcc " in #( 214e4f6584cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215e4f6584cSmrg esac], 216e4f6584cSmrg [CXX], 217e4f6584cSmrg [case " $depcc " in #( 218e4f6584cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219e4f6584cSmrg esac]) 22009885543Smrg 221e4f6584cSmrg for depmode in $am_compiler_list; do 222e4f6584cSmrg # Setup a source with many dependencies, because some compilers 223e4f6584cSmrg # like to wrap large dependency lists on column 80 (with \), and 224e4f6584cSmrg # we should not choose a depcomp mode which is confused by this. 225e4f6584cSmrg # 226e4f6584cSmrg # We need to recreate these files for each test, as the compiler may 227e4f6584cSmrg # overwrite some of them when testing with obscure command lines. 228e4f6584cSmrg # This happens at least with the AIX C compiler. 229e4f6584cSmrg : > sub/conftest.c 230e4f6584cSmrg for i in 1 2 3 4 5 6; do 231e4f6584cSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232e4f6584cSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233e4f6584cSmrg # Solaris 8's {/usr,}/bin/sh. 234e4f6584cSmrg touch sub/conftst$i.h 235e4f6584cSmrg done 236e4f6584cSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 23709885543Smrg 238e4f6584cSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239e4f6584cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 240e4f6584cSmrg # handle `-M -o', and we need to detect this. Also, some Intel 241e4f6584cSmrg # versions had trouble with output in subdirs 242e4f6584cSmrg am__obj=sub/conftest.${OBJEXT-o} 243e4f6584cSmrg am__minus_obj="-o $am__obj" 244e4f6584cSmrg case $depmode in 245e4f6584cSmrg gcc) 246e4f6584cSmrg # This depmode causes a compiler race in universal mode. 247e4f6584cSmrg test "$am__universal" = false || continue 248e4f6584cSmrg ;; 249e4f6584cSmrg nosideeffect) 250e4f6584cSmrg # after this tag, mechanisms are not by side-effect, so they'll 251e4f6584cSmrg # only be used when explicitly requested 252e4f6584cSmrg if test "x$enable_dependency_tracking" = xyes; then 253e4f6584cSmrg continue 254e4f6584cSmrg else 255e4f6584cSmrg break 256e4f6584cSmrg fi 257e4f6584cSmrg ;; 258e4f6584cSmrg msvisualcpp | msvcmsys) 259e4f6584cSmrg # This compiler won't grok `-c -o', but also, the minuso test has 260e4f6584cSmrg # not run yet. These depmodes are late enough in the game, and 261e4f6584cSmrg # so weak that their functioning should not be impacted. 262e4f6584cSmrg am__obj=conftest.${OBJEXT-o} 263e4f6584cSmrg am__minus_obj= 264e4f6584cSmrg ;; 265e4f6584cSmrg none) break ;; 266e4f6584cSmrg esac 267e4f6584cSmrg if depmode=$depmode \ 268e4f6584cSmrg source=sub/conftest.c object=$am__obj \ 269e4f6584cSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270e4f6584cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271e4f6584cSmrg >/dev/null 2>conftest.err && 272e4f6584cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273e4f6584cSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274e4f6584cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275e4f6584cSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276e4f6584cSmrg # icc doesn't choke on unknown options, it will just issue warnings 277e4f6584cSmrg # or remarks (even with -Werror). So we grep stderr for any message 278e4f6584cSmrg # that says an option was ignored or not supported. 279e4f6584cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280e4f6584cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 281e4f6584cSmrg # The diagnosis changed in icc 8.0: 282e4f6584cSmrg # icc: Command line remark: option '-MP' not supported 283e4f6584cSmrg if (grep 'ignoring option' conftest.err || 284e4f6584cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285e4f6584cSmrg am_cv_$1_dependencies_compiler_type=$depmode 286e4f6584cSmrg break 287e4f6584cSmrg fi 288e4f6584cSmrg fi 289e4f6584cSmrg done 290b698ba48Smrg 291e4f6584cSmrg cd .. 292e4f6584cSmrg rm -rf conftest.dir 293e4f6584cSmrgelse 294e4f6584cSmrg am_cv_$1_dependencies_compiler_type=none 295b698ba48Smrgfi 296e4f6584cSmrg]) 297e4f6584cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298e4f6584cSmrgAM_CONDITIONAL([am__fastdep$1], [ 299e4f6584cSmrg test "x$enable_dependency_tracking" != xno \ 300e4f6584cSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301e4f6584cSmrg]) 302b698ba48Smrg 30309885543Smrg 304e4f6584cSmrg# AM_SET_DEPDIR 305e4f6584cSmrg# ------------- 306e4f6584cSmrg# Choose a directory name for dependency files. 307e4f6584cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308e4f6584cSmrgAC_DEFUN([AM_SET_DEPDIR], 309e4f6584cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310e4f6584cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311e4f6584cSmrg]) 3127104f784Smrg 3132ec8c4b4Smrg 314e4f6584cSmrg# AM_DEP_TRACK 315e4f6584cSmrg# ------------ 316e4f6584cSmrgAC_DEFUN([AM_DEP_TRACK], 317e4f6584cSmrg[AC_ARG_ENABLE(dependency-tracking, 318e4f6584cSmrg[ --disable-dependency-tracking speeds up one-time build 319e4f6584cSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320e4f6584cSmrgif test "x$enable_dependency_tracking" != xno; then 321e4f6584cSmrg am_depcomp="$ac_aux_dir/depcomp" 322e4f6584cSmrg AMDEPBACKSLASH='\' 323e4f6584cSmrgfi 324e4f6584cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325e4f6584cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 326e4f6584cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327e4f6584cSmrg]) 3282ec8c4b4Smrg 329e4f6584cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3302ec8c4b4Smrg 331e4f6584cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332e4f6584cSmrg# Free Software Foundation, Inc. 333e4f6584cSmrg# 334e4f6584cSmrg# This file is free software; the Free Software Foundation 335e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 336e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 3372ec8c4b4Smrg 338e4f6584cSmrg#serial 5 33909885543Smrg 340e4f6584cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341e4f6584cSmrg# ------------------------------ 342e4f6584cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343e4f6584cSmrg[{ 344e4f6584cSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345e4f6584cSmrg # are listed without --file. Let's play safe and only enable the eval 346e4f6584cSmrg # if we detect the quoting. 347e4f6584cSmrg case $CONFIG_FILES in 348e4f6584cSmrg *\'*) eval set x "$CONFIG_FILES" ;; 349e4f6584cSmrg *) set x $CONFIG_FILES ;; 350e4f6584cSmrg esac 351e4f6584cSmrg shift 352e4f6584cSmrg for mf 353e4f6584cSmrg do 354e4f6584cSmrg # Strip MF so we end up with the name of the file. 355e4f6584cSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356e4f6584cSmrg # Check whether this is an Automake generated Makefile or not. 357e4f6584cSmrg # We used to match only the files named `Makefile.in', but 358e4f6584cSmrg # some people rename them; so instead we look at the file content. 359e4f6584cSmrg # Grep'ing the first line is not enough: some people post-process 360e4f6584cSmrg # each Makefile.in and add a new line on top of each file to say so. 361e4f6584cSmrg # Grep'ing the whole file is not good either: AIX grep has a line 362e4f6584cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 363e4f6584cSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364e4f6584cSmrg dirpart=`AS_DIRNAME("$mf")` 365e4f6584cSmrg else 366e4f6584cSmrg continue 367e4f6584cSmrg fi 368e4f6584cSmrg # Extract the definition of DEPDIR, am__include, and am__quote 369e4f6584cSmrg # from the Makefile without running `make'. 370e4f6584cSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371e4f6584cSmrg test -z "$DEPDIR" && continue 372e4f6584cSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373e4f6584cSmrg test -z "am__include" && continue 374e4f6584cSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375e4f6584cSmrg # When using ansi2knr, U may be empty or an underscore; expand it 376e4f6584cSmrg U=`sed -n 's/^U = //p' < "$mf"` 377e4f6584cSmrg # Find all dependency output files, they are included files with 378e4f6584cSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379e4f6584cSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 380e4f6584cSmrg # expansion. 381e4f6584cSmrg for file in `sed -n " 382e4f6584cSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383e4f6584cSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384e4f6584cSmrg # Make sure the directory exists. 385e4f6584cSmrg test -f "$dirpart/$file" && continue 386e4f6584cSmrg fdir=`AS_DIRNAME(["$file"])` 387e4f6584cSmrg AS_MKDIR_P([$dirpart/$fdir]) 388e4f6584cSmrg # echo "creating $dirpart/$file" 389e4f6584cSmrg echo '# dummy' > "$dirpart/$file" 390e4f6584cSmrg done 391e4f6584cSmrg done 392e4f6584cSmrg} 393e4f6584cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 39409885543Smrg 39509885543Smrg 396e4f6584cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397e4f6584cSmrg# ----------------------------- 398e4f6584cSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399e4f6584cSmrg# 400e4f6584cSmrg# This code is only required when automatic dependency tracking 401e4f6584cSmrg# is enabled. FIXME. This creates each `.P' file that we will 402e4f6584cSmrg# need in order to bootstrap the dependency handling code. 403e4f6584cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404e4f6584cSmrg[AC_CONFIG_COMMANDS([depfiles], 405e4f6584cSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406e4f6584cSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407e4f6584cSmrg]) 408b698ba48Smrg 409e4f6584cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410e4f6584cSmrg# Free Software Foundation, Inc. 411e4f6584cSmrg# 412e4f6584cSmrg# This file is free software; the Free Software Foundation 413e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 414e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 415b698ba48Smrg 416e4f6584cSmrg# serial 8 41709885543Smrg 418e4f6584cSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419e4f6584cSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 42009885543Smrg 421e4f6584cSmrg# Do all the work for Automake. -*- Autoconf -*- 42209885543Smrg 423e4f6584cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424e4f6584cSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425e4f6584cSmrg# 426e4f6584cSmrg# This file is free software; the Free Software Foundation 427e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 428e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 42909885543Smrg 430e4f6584cSmrg# serial 16 43109885543Smrg 432e4f6584cSmrg# This macro actually does too much. Some checks are only needed if 433e4f6584cSmrg# your package does certain things. But this isn't really a big deal. 4347104f784Smrg 435e4f6584cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436e4f6584cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 437e4f6584cSmrg# ----------------------------------------------- 438e4f6584cSmrg# The call with PACKAGE and VERSION arguments is the old style 439e4f6584cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440e4f6584cSmrg# and VERSION should now be passed to AC_INIT and removed from 441e4f6584cSmrg# the call to AM_INIT_AUTOMAKE. 442e4f6584cSmrg# We support both call styles for the transition. After 443e4f6584cSmrg# the next Automake release, Autoconf can make the AC_INIT 444e4f6584cSmrg# arguments mandatory, and then we can depend on a new Autoconf 445e4f6584cSmrg# release and drop the old call support. 446e4f6584cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447e4f6584cSmrg[AC_PREREQ([2.62])dnl 448e4f6584cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449e4f6584cSmrgdnl the ones we care about. 450e4f6584cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451e4f6584cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452e4f6584cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 453e4f6584cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 454e4f6584cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455e4f6584cSmrg # is not polluted with repeated "-I." 456e4f6584cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457e4f6584cSmrg # test to see if srcdir already configured 458e4f6584cSmrg if test -f $srcdir/config.status; then 459e4f6584cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460e4f6584cSmrg fi 461e4f6584cSmrgfi 46209885543Smrg 463e4f6584cSmrg# test whether we have cygpath 464e4f6584cSmrgif test -z "$CYGPATH_W"; then 465e4f6584cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 466e4f6584cSmrg CYGPATH_W='cygpath -w' 467e4f6584cSmrg else 468e4f6584cSmrg CYGPATH_W=echo 469e4f6584cSmrg fi 470e4f6584cSmrgfi 471e4f6584cSmrgAC_SUBST([CYGPATH_W]) 47209885543Smrg 473e4f6584cSmrg# Define the identity of the package. 474e4f6584cSmrgdnl Distinguish between old-style and new-style calls. 475e4f6584cSmrgm4_ifval([$2], 476e4f6584cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477e4f6584cSmrg AC_SUBST([PACKAGE], [$1])dnl 478e4f6584cSmrg AC_SUBST([VERSION], [$2])], 479e4f6584cSmrg[_AM_SET_OPTIONS([$1])dnl 480e4f6584cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481e4f6584cSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482e4f6584cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483e4f6584cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484e4f6584cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 48509885543Smrg 486e4f6584cSmrg_AM_IF_OPTION([no-define],, 487e4f6584cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488e4f6584cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 48909885543Smrg 490e4f6584cSmrg# Some tools Automake needs. 491e4f6584cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492e4f6584cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493e4f6584cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494e4f6584cSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495e4f6584cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496e4f6584cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497e4f6584cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498e4f6584cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499e4f6584cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500e4f6584cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501e4f6584cSmrg# We need awk for the "check" target. The system "awk" is bad on 502e4f6584cSmrg# some platforms. 503e4f6584cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 504e4f6584cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505e4f6584cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506e4f6584cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507e4f6584cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508e4f6584cSmrg [_AM_PROG_TAR([v7])])]) 509e4f6584cSmrg_AM_IF_OPTION([no-dependencies],, 510e4f6584cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511e4f6584cSmrg [_AM_DEPENDENCIES(CC)], 512e4f6584cSmrg [define([AC_PROG_CC], 513e4f6584cSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514e4f6584cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515e4f6584cSmrg [_AM_DEPENDENCIES(CXX)], 516e4f6584cSmrg [define([AC_PROG_CXX], 517e4f6584cSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518e4f6584cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519e4f6584cSmrg [_AM_DEPENDENCIES(OBJC)], 520e4f6584cSmrg [define([AC_PROG_OBJC], 521e4f6584cSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522e4f6584cSmrg]) 523e4f6584cSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524e4f6584cSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525e4f6584cSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526e4f6584cSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527e4f6584cSmrgAC_CONFIG_COMMANDS_PRE(dnl 528e4f6584cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529e4f6584cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530e4f6584cSmrg]) 53109885543Smrg 532e4f6584cSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533e4f6584cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534e4f6584cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 535e4f6584cSmrgm4_define([_AC_COMPILER_EXEEXT], 536e4f6584cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 53709885543Smrg 53809885543Smrg 539e4f6584cSmrg# When config.status generates a header, we must update the stamp-h file. 540e4f6584cSmrg# This file resides in the same directory as the config header 541e4f6584cSmrg# that is generated. The stamp files are numbered to have different names. 54209885543Smrg 543e4f6584cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544e4f6584cSmrg# loop where config.status creates the headers, so we can generate 545e4f6584cSmrg# our stamp files there. 546e4f6584cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547e4f6584cSmrg[# Compute $1's index in $config_headers. 548e4f6584cSmrg_am_arg=$1 549e4f6584cSmrg_am_stamp_count=1 550e4f6584cSmrgfor _am_header in $config_headers :; do 551e4f6584cSmrg case $_am_header in 552e4f6584cSmrg $_am_arg | $_am_arg:* ) 553e4f6584cSmrg break ;; 554e4f6584cSmrg * ) 555e4f6584cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556e4f6584cSmrg esac 557e4f6584cSmrgdone 558e4f6584cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 55909885543Smrg 560e4f6584cSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561e4f6584cSmrg# 562e4f6584cSmrg# This file is free software; the Free Software Foundation 563e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 564e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 56509885543Smrg 566e4f6584cSmrg# AM_PROG_INSTALL_SH 567e4f6584cSmrg# ------------------ 568e4f6584cSmrg# Define $install_sh. 569e4f6584cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570e4f6584cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571e4f6584cSmrgif test x"${install_sh}" != xset; then 572e4f6584cSmrg case $am_aux_dir in 573e4f6584cSmrg *\ * | *\ *) 574e4f6584cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575e4f6584cSmrg *) 576e4f6584cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577e4f6584cSmrg esac 578b698ba48Smrgfi 579e4f6584cSmrgAC_SUBST(install_sh)]) 58009885543Smrg 581e4f6584cSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582e4f6584cSmrg# 583e4f6584cSmrg# This file is free software; the Free Software Foundation 584e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 585e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 58609885543Smrg 587e4f6584cSmrg# serial 2 58809885543Smrg 589e4f6584cSmrg# Check whether the underlying file-system supports filenames 590e4f6584cSmrg# with a leading dot. For instance MS-DOS doesn't. 591e4f6584cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 592e4f6584cSmrg[rm -rf .tst 2>/dev/null 593e4f6584cSmrgmkdir .tst 2>/dev/null 594e4f6584cSmrgif test -d .tst; then 595e4f6584cSmrg am__leading_dot=. 596e4f6584cSmrgelse 597e4f6584cSmrg am__leading_dot=_ 598e4f6584cSmrgfi 599e4f6584cSmrgrmdir .tst 2>/dev/null 600e4f6584cSmrgAC_SUBST([am__leading_dot])]) 60109885543Smrg 602e4f6584cSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603e4f6584cSmrg# From Jim Meyering 60409885543Smrg 605e4f6584cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606e4f6584cSmrg# Free Software Foundation, Inc. 607e4f6584cSmrg# 608e4f6584cSmrg# This file is free software; the Free Software Foundation 609e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 610e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 61109885543Smrg 612e4f6584cSmrg# serial 5 61309885543Smrg 614e4f6584cSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615e4f6584cSmrg# ---------------------------------- 616e4f6584cSmrg# Control maintainer-specific portions of Makefiles. 617e4f6584cSmrg# Default is to disable them, unless `enable' is passed literally. 618e4f6584cSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 619e4f6584cSmrg# can override the default with the --enable/--disable switch. 620e4f6584cSmrgAC_DEFUN([AM_MAINTAINER_MODE], 621e4f6584cSmrg[m4_case(m4_default([$1], [disable]), 622e4f6584cSmrg [enable], [m4_define([am_maintainer_other], [disable])], 623e4f6584cSmrg [disable], [m4_define([am_maintainer_other], [enable])], 624e4f6584cSmrg [m4_define([am_maintainer_other], [enable]) 625e4f6584cSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626e4f6584cSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627e4f6584cSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628e4f6584cSmrg AC_ARG_ENABLE([maintainer-mode], 629e4f6584cSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630e4f6584cSmrg (and sometimes confusing) to the casual installer], 631e4f6584cSmrg [USE_MAINTAINER_MODE=$enableval], 632e4f6584cSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633e4f6584cSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634e4f6584cSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635e4f6584cSmrg MAINT=$MAINTAINER_MODE_TRUE 636e4f6584cSmrg AC_SUBST([MAINT])dnl 637e4f6584cSmrg] 638e4f6584cSmrg) 63909885543Smrg 640e4f6584cSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 64109885543Smrg 642e4f6584cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64309885543Smrg 644e4f6584cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645e4f6584cSmrg# 646e4f6584cSmrg# This file is free software; the Free Software Foundation 647e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 648e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 64909885543Smrg 650e4f6584cSmrg# serial 4 651b698ba48Smrg 652e4f6584cSmrg# AM_MAKE_INCLUDE() 653e4f6584cSmrg# ----------------- 654e4f6584cSmrg# Check to see how make treats includes. 655e4f6584cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 656e4f6584cSmrg[am_make=${MAKE-make} 657e4f6584cSmrgcat > confinc << 'END' 658e4f6584cSmrgam__doit: 659e4f6584cSmrg @echo this is the am__doit target 660e4f6584cSmrg.PHONY: am__doit 661e4f6584cSmrgEND 662e4f6584cSmrg# If we don't find an include directive, just comment out the code. 663e4f6584cSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664e4f6584cSmrgam__include="#" 665e4f6584cSmrgam__quote= 666e4f6584cSmrg_am_result=none 667e4f6584cSmrg# First try GNU make style include. 668e4f6584cSmrgecho "include confinc" > confmf 669e4f6584cSmrg# Ignore all kinds of additional output from `make'. 670e4f6584cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671e4f6584cSmrg*the\ am__doit\ target*) 672e4f6584cSmrg am__include=include 673e4f6584cSmrg am__quote= 674e4f6584cSmrg _am_result=GNU 675b698ba48Smrg ;; 67609885543Smrgesac 677e4f6584cSmrg# Now try BSD make style include. 678e4f6584cSmrgif test "$am__include" = "#"; then 679e4f6584cSmrg echo '.include "confinc"' > confmf 680e4f6584cSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 681e4f6584cSmrg *the\ am__doit\ target*) 682e4f6584cSmrg am__include=.include 683e4f6584cSmrg am__quote="\"" 684e4f6584cSmrg _am_result=BSD 685e4f6584cSmrg ;; 686e4f6584cSmrg esac 687e4f6584cSmrgfi 688e4f6584cSmrgAC_SUBST([am__include]) 689e4f6584cSmrgAC_SUBST([am__quote]) 690e4f6584cSmrgAC_MSG_RESULT([$_am_result]) 691e4f6584cSmrgrm -f confinc confmf 692e4f6584cSmrg]) 69309885543Smrg 694e4f6584cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695e4f6584cSmrg 696e4f6584cSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 697e4f6584cSmrg# Free Software Foundation, Inc. 698e4f6584cSmrg# 699e4f6584cSmrg# This file is free software; the Free Software Foundation 700e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 701e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 7022ec8c4b4Smrg 703e4f6584cSmrg# serial 6 70409885543Smrg 705e4f6584cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 706e4f6584cSmrg# ------------------------------ 707e4f6584cSmrgAC_DEFUN([AM_MISSING_PROG], 708e4f6584cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 709e4f6584cSmrg$1=${$1-"${am_missing_run}$2"} 710e4f6584cSmrgAC_SUBST($1)]) 71109885543Smrg 71209885543Smrg 713e4f6584cSmrg# AM_MISSING_HAS_RUN 714e4f6584cSmrg# ------------------ 715e4f6584cSmrg# Define MISSING if not defined so far and test if it supports --run. 716e4f6584cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 717e4f6584cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718e4f6584cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719e4f6584cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720e4f6584cSmrgif test x"${MISSING+set}" != xset; then 721e4f6584cSmrg case $am_aux_dir in 722e4f6584cSmrg *\ * | *\ *) 723e4f6584cSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724e4f6584cSmrg *) 725e4f6584cSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726e4f6584cSmrg esac 727e4f6584cSmrgfi 728e4f6584cSmrg# Use eval to expand $SHELL 729e4f6584cSmrgif eval "$MISSING --run true"; then 730e4f6584cSmrg am_missing_run="$MISSING --run " 73109885543Smrgelse 732e4f6584cSmrg am_missing_run= 733e4f6584cSmrg AC_MSG_WARN([`missing' script is too old or missing]) 73409885543Smrgfi 735e4f6584cSmrg]) 73609885543Smrg 737e4f6584cSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738e4f6584cSmrg# 739e4f6584cSmrg# This file is free software; the Free Software Foundation 740e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 741e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 7422ec8c4b4Smrg 743e4f6584cSmrg# AM_PROG_MKDIR_P 744e4f6584cSmrg# --------------- 745e4f6584cSmrg# Check for `mkdir -p'. 746e4f6584cSmrgAC_DEFUN([AM_PROG_MKDIR_P], 747e4f6584cSmrg[AC_PREREQ([2.60])dnl 748e4f6584cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 749e4f6584cSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 750e4f6584cSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 751e4f6584cSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 752e4f6584cSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 753e4f6584cSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 754e4f6584cSmrgdnl adjustment using top_builddir (which is defined more often than 755e4f6584cSmrgdnl MKDIR_P). 756e4f6584cSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 757e4f6584cSmrgcase $mkdir_p in 758e4f6584cSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 759e4f6584cSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760e4f6584cSmrgesac 76109885543Smrg]) 76209885543Smrg 763e4f6584cSmrg# Helper functions for option handling. -*- Autoconf -*- 76409885543Smrg 765e4f6584cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766e4f6584cSmrg# 767e4f6584cSmrg# This file is free software; the Free Software Foundation 768e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 769e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 77009885543Smrg 771e4f6584cSmrg# serial 4 77209885543Smrg 773e4f6584cSmrg# _AM_MANGLE_OPTION(NAME) 774e4f6584cSmrg# ----------------------- 775e4f6584cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 776e4f6584cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 77709885543Smrg 778e4f6584cSmrg# _AM_SET_OPTION(NAME) 779e4f6584cSmrg# ------------------------------ 780e4f6584cSmrg# Set option NAME. Presently that only means defining a flag for this option. 781e4f6584cSmrgAC_DEFUN([_AM_SET_OPTION], 782e4f6584cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 78309885543Smrg 784e4f6584cSmrg# _AM_SET_OPTIONS(OPTIONS) 785e4f6584cSmrg# ---------------------------------- 786e4f6584cSmrg# OPTIONS is a space-separated list of Automake options. 787e4f6584cSmrgAC_DEFUN([_AM_SET_OPTIONS], 788e4f6584cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 78909885543Smrg 790e4f6584cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 791e4f6584cSmrg# ------------------------------------------- 792e4f6584cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 793e4f6584cSmrgAC_DEFUN([_AM_IF_OPTION], 794e4f6584cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 79509885543Smrg 796e4f6584cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 79709885543Smrg 798e4f6584cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 799e4f6584cSmrg# Free Software Foundation, Inc. 800e4f6584cSmrg# 801e4f6584cSmrg# This file is free software; the Free Software Foundation 802e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 803e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 80409885543Smrg 805e4f6584cSmrg# serial 5 80609885543Smrg 807e4f6584cSmrg# AM_SANITY_CHECK 808e4f6584cSmrg# --------------- 809e4f6584cSmrgAC_DEFUN([AM_SANITY_CHECK], 810e4f6584cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 811e4f6584cSmrg# Just in case 812e4f6584cSmrgsleep 1 813e4f6584cSmrgecho timestamp > conftest.file 814e4f6584cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 815e4f6584cSmrg# name. Accept space and tab only in the latter. 816e4f6584cSmrgam_lf=' 817e4f6584cSmrg' 818e4f6584cSmrgcase `pwd` in 819e4f6584cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 820e4f6584cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 821e4f6584cSmrgesac 822e4f6584cSmrgcase $srcdir in 823e4f6584cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824e4f6584cSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825e4f6584cSmrgesac 82609885543Smrg 827e4f6584cSmrg# Do `set' in a subshell so we don't clobber the current shell's 828e4f6584cSmrg# arguments. Must try -L first in case configure is actually a 829e4f6584cSmrg# symlink; some systems play weird games with the mod time of symlinks 830e4f6584cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 831e4f6584cSmrg# directory). 832e4f6584cSmrgif ( 833e4f6584cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 834e4f6584cSmrg if test "$[*]" = "X"; then 835e4f6584cSmrg # -L didn't work. 836e4f6584cSmrg set X `ls -t "$srcdir/configure" conftest.file` 837e4f6584cSmrg fi 838e4f6584cSmrg rm -f conftest.file 839e4f6584cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 840e4f6584cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 84109885543Smrg 842e4f6584cSmrg # If neither matched, then we have a broken ls. This can happen 843e4f6584cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 844e4f6584cSmrg # broken ls alias from the environment. This has actually 845e4f6584cSmrg # happened. Such a system could not be considered "sane". 846e4f6584cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 847e4f6584cSmrgalias in your environment]) 848e4f6584cSmrg fi 84909885543Smrg 850e4f6584cSmrg test "$[2]" = conftest.file 851e4f6584cSmrg ) 852e4f6584cSmrgthen 853e4f6584cSmrg # Ok. 854e4f6584cSmrg : 85509885543Smrgelse 856e4f6584cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 857e4f6584cSmrgCheck your system clock]) 858e4f6584cSmrgfi 859e4f6584cSmrgAC_MSG_RESULT(yes)]) 86009885543Smrg 861e4f6584cSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862e4f6584cSmrg# 863e4f6584cSmrg# This file is free software; the Free Software Foundation 864e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 865e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 86609885543Smrg 867e4f6584cSmrg# serial 1 86809885543Smrg 869e4f6584cSmrg# AM_SILENT_RULES([DEFAULT]) 870e4f6584cSmrg# -------------------------- 871e4f6584cSmrg# Enable less verbose build rules; with the default set to DEFAULT 872e4f6584cSmrg# (`yes' being less verbose, `no' or empty being verbose). 873e4f6584cSmrgAC_DEFUN([AM_SILENT_RULES], 874e4f6584cSmrg[AC_ARG_ENABLE([silent-rules], 875e4f6584cSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 876e4f6584cSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 877e4f6584cSmrgcase $enable_silent_rules in 878e4f6584cSmrgyes) AM_DEFAULT_VERBOSITY=0;; 879e4f6584cSmrgno) AM_DEFAULT_VERBOSITY=1;; 880e4f6584cSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881e4f6584cSmrgesac 882e4f6584cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883e4f6584cSmrgAM_BACKSLASH='\' 884e4f6584cSmrgAC_SUBST([AM_BACKSLASH])dnl 885e4f6584cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886e4f6584cSmrg]) 88709885543Smrg 888e4f6584cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889e4f6584cSmrg# 890e4f6584cSmrg# This file is free software; the Free Software Foundation 891e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 892e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 89309885543Smrg 894e4f6584cSmrg# AM_PROG_INSTALL_STRIP 895e4f6584cSmrg# --------------------- 896e4f6584cSmrg# One issue with vendor `install' (even GNU) is that you can't 897e4f6584cSmrg# specify the program used to strip binaries. This is especially 898e4f6584cSmrg# annoying in cross-compiling environments, where the build's strip 899e4f6584cSmrg# is unlikely to handle the host's binaries. 900e4f6584cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 901e4f6584cSmrg# always use install-sh in `make install-strip', and initialize 902e4f6584cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 903e4f6584cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 904e4f6584cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 905e4f6584cSmrg# Installed binaries are usually stripped using `strip' when the user 906e4f6584cSmrg# run `make install-strip'. However `strip' might not be the right 907e4f6584cSmrg# tool to use in cross-compilation environments, therefore Automake 908e4f6584cSmrg# will honor the `STRIP' environment variable to overrule this program. 909e4f6584cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 910e4f6584cSmrgif test "$cross_compiling" != no; then 911e4f6584cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 91209885543Smrgfi 913e4f6584cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 914e4f6584cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 91509885543Smrg 916e4f6584cSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917e4f6584cSmrg# 918e4f6584cSmrg# This file is free software; the Free Software Foundation 919e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 920e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 92109885543Smrg 922e4f6584cSmrg# serial 2 92309885543Smrg 924e4f6584cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 925e4f6584cSmrg# --------------------------- 926e4f6584cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 927e4f6584cSmrg# This macro is traced by Automake. 928e4f6584cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 92909885543Smrg 930e4f6584cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 931e4f6584cSmrg# --------------------------- 932e4f6584cSmrg# Public sister of _AM_SUBST_NOTMAKE. 933e4f6584cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 93409885543Smrg 935e4f6584cSmrg# Check how to create a tarball. -*- Autoconf -*- 93609885543Smrg 937e4f6584cSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 938e4f6584cSmrg# 939e4f6584cSmrg# This file is free software; the Free Software Foundation 940e4f6584cSmrg# gives unlimited permission to copy and/or distribute it, 941e4f6584cSmrg# with or without modifications, as long as this notice is preserved. 94209885543Smrg 943e4f6584cSmrg# serial 2 944e4f6584cSmrg 945e4f6584cSmrg# _AM_PROG_TAR(FORMAT) 946e4f6584cSmrg# -------------------- 947e4f6584cSmrg# Check how to create a tarball in format FORMAT. 948e4f6584cSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 949e4f6584cSmrg# 950e4f6584cSmrg# Substitute a variable $(am__tar) that is a command 951e4f6584cSmrg# writing to stdout a FORMAT-tarball containing the directory 952e4f6584cSmrg# $tardir. 953e4f6584cSmrg# tardir=directory && $(am__tar) > result.tar 954e4f6584cSmrg# 955e4f6584cSmrg# Substitute a variable $(am__untar) that extract such 956e4f6584cSmrg# a tarball read from stdin. 957e4f6584cSmrg# $(am__untar) < result.tar 958e4f6584cSmrgAC_DEFUN([_AM_PROG_TAR], 959e4f6584cSmrg[# Always define AMTAR for backward compatibility. 960e4f6584cSmrgAM_MISSING_PROG([AMTAR], [tar]) 961e4f6584cSmrgm4_if([$1], [v7], 962e4f6584cSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 963e4f6584cSmrg [m4_case([$1], [ustar],, [pax],, 964e4f6584cSmrg [m4_fatal([Unknown tar format])]) 965e4f6584cSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 966e4f6584cSmrg# Loop over all known methods to create a tar archive until one works. 967e4f6584cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 968e4f6584cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 969e4f6584cSmrg# Do not fold the above two line into one, because Tru64 sh and 970e4f6584cSmrg# Solaris sh will not grok spaces in the rhs of `-'. 971e4f6584cSmrgfor _am_tool in $_am_tools 972e4f6584cSmrgdo 973e4f6584cSmrg case $_am_tool in 974e4f6584cSmrg gnutar) 975e4f6584cSmrg for _am_tar in tar gnutar gtar; 976e4f6584cSmrg do 977e4f6584cSmrg AM_RUN_LOG([$_am_tar --version]) && break 978e4f6584cSmrg done 979e4f6584cSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 980e4f6584cSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 981e4f6584cSmrg am__untar="$_am_tar -xf -" 982e4f6584cSmrg ;; 983e4f6584cSmrg plaintar) 984e4f6584cSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 985e4f6584cSmrg # ustar tarball either. 986e4f6584cSmrg (tar --version) >/dev/null 2>&1 && continue 987e4f6584cSmrg am__tar='tar chf - "$$tardir"' 988e4f6584cSmrg am__tar_='tar chf - "$tardir"' 989e4f6584cSmrg am__untar='tar xf -' 990e4f6584cSmrg ;; 991e4f6584cSmrg pax) 992e4f6584cSmrg am__tar='pax -L -x $1 -w "$$tardir"' 993e4f6584cSmrg am__tar_='pax -L -x $1 -w "$tardir"' 994e4f6584cSmrg am__untar='pax -r' 995e4f6584cSmrg ;; 996e4f6584cSmrg cpio) 997e4f6584cSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 998e4f6584cSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 999e4f6584cSmrg am__untar='cpio -i -H $1 -d' 1000e4f6584cSmrg ;; 1001e4f6584cSmrg none) 1002e4f6584cSmrg am__tar=false 1003e4f6584cSmrg am__tar_=false 1004e4f6584cSmrg am__untar=false 100509885543Smrg ;; 100609885543Smrg esac 100709885543Smrg 1008e4f6584cSmrg # If the value was cached, stop now. We just wanted to have am__tar 1009e4f6584cSmrg # and am__untar set. 1010e4f6584cSmrg test -n "${am_cv_prog_tar_$1}" && break 1011e4f6584cSmrg 1012e4f6584cSmrg # tar/untar a dummy directory, and stop if the command works 1013e4f6584cSmrg rm -rf conftest.dir 1014e4f6584cSmrg mkdir conftest.dir 1015e4f6584cSmrg echo GrepMe > conftest.dir/file 1016e4f6584cSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1017e4f6584cSmrg rm -rf conftest.dir 1018e4f6584cSmrg if test -s conftest.tar; then 1019e4f6584cSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1020e4f6584cSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102109885543Smrg fi 1022e4f6584cSmrgdone 1023e4f6584cSmrgrm -rf conftest.dir 102409885543Smrg 1025e4f6584cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1026e4f6584cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1027e4f6584cSmrgAC_SUBST([am__tar]) 1028e4f6584cSmrgAC_SUBST([am__untar]) 1029e4f6584cSmrg]) # _AM_PROG_TAR 103009885543Smrg 1031e4f6584cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032e4f6584cSmrgdnl 1033e4f6584cSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034e4f6584cSmrgdnl 1035e4f6584cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036e4f6584cSmrgdnl copy of this software and associated documentation files (the "Software"), 1037e4f6584cSmrgdnl to deal in the Software without restriction, including without limitation 1038e4f6584cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039e4f6584cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040e4f6584cSmrgdnl Software is furnished to do so, subject to the following conditions: 1041e4f6584cSmrgdnl 1042e4f6584cSmrgdnl The above copyright notice and this permission notice (including the next 1043e4f6584cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1044e4f6584cSmrgdnl Software. 1045e4f6584cSmrgdnl 1046e4f6584cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047e4f6584cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048e4f6584cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049e4f6584cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050e4f6584cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051e4f6584cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052e4f6584cSmrgdnl DEALINGS IN THE SOFTWARE. 105309885543Smrg 1054e4f6584cSmrg# XORG_MACROS_VERSION(required-version) 1055e4f6584cSmrg# ------------------------------------- 1056e4f6584cSmrg# Minimum version: 1.1.0 1057e4f6584cSmrg# 1058e4f6584cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1059e4f6584cSmrg# your configure.ac with the minimum required version, such as: 1060e4f6584cSmrg# XORG_MACROS_VERSION(1.1) 1061e4f6584cSmrg# 1062e4f6584cSmrg# To ensure that this macro is defined, also add: 1063e4f6584cSmrg# m4_ifndef([XORG_MACROS_VERSION], 1064e4f6584cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1065e4f6584cSmrg# 1066e4f6584cSmrg# 1067e4f6584cSmrg# See the "minimum version" comment for each macro you use to see what 1068e4f6584cSmrg# version you require. 1069e4f6584cSmrgm4_defun([XORG_MACROS_VERSION],[ 1070e4f6584cSmrgm4_define([vers_have], [1.7.0]) 1071e4f6584cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1072e4f6584cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1073e4f6584cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1074e4f6584cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1075e4f6584cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1076e4f6584cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1077e4f6584cSmrgm4_undefine([vers_have]) 1078e4f6584cSmrgm4_undefine([maj_have]) 1079e4f6584cSmrgm4_undefine([maj_needed]) 1080e4f6584cSmrg]) # XORG_MACROS_VERSION 108109885543Smrg 1082e4f6584cSmrg# XORG_PROG_RAWCPP() 1083e4f6584cSmrg# ------------------ 1084e4f6584cSmrg# Minimum version: 1.0.0 1085e4f6584cSmrg# 1086e4f6584cSmrg# Find cpp program and necessary flags for use in pre-processing text files 1087e4f6584cSmrg# such as man pages and config files 1088e4f6584cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1089e4f6584cSmrgAC_REQUIRE([AC_PROG_CPP]) 1090e4f6584cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091e4f6584cSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 109209885543Smrg 1093e4f6584cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094e4f6584cSmrg# which is not the best choice for supporting other OS'es, but covers most 1095e4f6584cSmrg# of the ones we need for now. 1096e4f6584cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097e4f6584cSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098e4f6584cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099e4f6584cSmrg AC_MSG_RESULT([no]) 1100e4f6584cSmrgelse 1101e4f6584cSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102e4f6584cSmrg RAWCPPFLAGS=-undef 1103e4f6584cSmrg AC_MSG_RESULT([yes]) 1104e4f6584cSmrg # under Cygwin unix is still defined even with -undef 1105e4f6584cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1106e4f6584cSmrg RAWCPPFLAGS="-undef -ansi" 1107e4f6584cSmrg AC_MSG_RESULT([yes, with -ansi]) 1108e4f6584cSmrg else 1109e4f6584cSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110e4f6584cSmrg fi 1111e4f6584cSmrgfi 1112e4f6584cSmrgrm -f conftest.$ac_ext 111309885543Smrg 1114e4f6584cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115e4f6584cSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116e4f6584cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117e4f6584cSmrg AC_MSG_RESULT([no]) 1118e4f6584cSmrgelse 1119e4f6584cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120e4f6584cSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121e4f6584cSmrg AC_MSG_RESULT([yes]) 1122e4f6584cSmrg else 1123e4f6584cSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124e4f6584cSmrg fi 1125e4f6584cSmrgfi 1126e4f6584cSmrgrm -f conftest.$ac_ext 1127e4f6584cSmrgAC_SUBST(RAWCPPFLAGS) 1128e4f6584cSmrg]) # XORG_PROG_RAWCPP 112909885543Smrg 1130e4f6584cSmrg# XORG_MANPAGE_SECTIONS() 1131e4f6584cSmrg# ----------------------- 1132e4f6584cSmrg# Minimum version: 1.0.0 1133e4f6584cSmrg# 1134e4f6584cSmrg# Determine which sections man pages go in for the different man page types 1135e4f6584cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136e4f6584cSmrg# Not sure if there's any better way than just hardcoding by OS name. 1137e4f6584cSmrg# Override default settings by setting environment variables 113809885543Smrg 1139e4f6584cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1140e4f6584cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 114109885543Smrg 1142e4f6584cSmrgif test x$APP_MAN_SUFFIX = x ; then 1143e4f6584cSmrg APP_MAN_SUFFIX=1 1144e4f6584cSmrgfi 1145e4f6584cSmrgif test x$APP_MAN_DIR = x ; then 1146e4f6584cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1147e4f6584cSmrgfi 11482ec8c4b4Smrg 1149e4f6584cSmrgif test x$LIB_MAN_SUFFIX = x ; then 1150e4f6584cSmrg LIB_MAN_SUFFIX=3 1151e4f6584cSmrgfi 1152e4f6584cSmrgif test x$LIB_MAN_DIR = x ; then 1153e4f6584cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1154e4f6584cSmrgfi 115509885543Smrg 1156e4f6584cSmrgif test x$FILE_MAN_SUFFIX = x ; then 1157e4f6584cSmrg case $host_os in 1158e4f6584cSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1159e4f6584cSmrg *) FILE_MAN_SUFFIX=5 ;; 1160e4f6584cSmrg esac 1161e4f6584cSmrgfi 1162e4f6584cSmrgif test x$FILE_MAN_DIR = x ; then 1163e4f6584cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1164e4f6584cSmrgfi 116509885543Smrg 1166e4f6584cSmrgif test x$MISC_MAN_SUFFIX = x ; then 1167e4f6584cSmrg case $host_os in 1168e4f6584cSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1169e4f6584cSmrg *) MISC_MAN_SUFFIX=7 ;; 1170e4f6584cSmrg esac 1171e4f6584cSmrgfi 1172e4f6584cSmrgif test x$MISC_MAN_DIR = x ; then 1173e4f6584cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1174e4f6584cSmrgfi 117509885543Smrg 1176e4f6584cSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1177e4f6584cSmrg case $host_os in 1178e4f6584cSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1179e4f6584cSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1180e4f6584cSmrg esac 1181e4f6584cSmrgfi 1182e4f6584cSmrgif test x$DRIVER_MAN_DIR = x ; then 1183e4f6584cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1184e4f6584cSmrgfi 118509885543Smrg 1186e4f6584cSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1187e4f6584cSmrg case $host_os in 1188e4f6584cSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1189e4f6584cSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1190e4f6584cSmrg esac 1191e4f6584cSmrgfi 1192e4f6584cSmrgif test x$ADMIN_MAN_DIR = x ; then 1193e4f6584cSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 119409885543Smrgfi 119509885543Smrg 119609885543Smrg 1197e4f6584cSmrgAC_SUBST([APP_MAN_SUFFIX]) 1198e4f6584cSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1199e4f6584cSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1200e4f6584cSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1201e4f6584cSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1202e4f6584cSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1203e4f6584cSmrgAC_SUBST([APP_MAN_DIR]) 1204e4f6584cSmrgAC_SUBST([LIB_MAN_DIR]) 1205e4f6584cSmrgAC_SUBST([FILE_MAN_DIR]) 1206e4f6584cSmrgAC_SUBST([MISC_MAN_DIR]) 1207e4f6584cSmrgAC_SUBST([DRIVER_MAN_DIR]) 1208e4f6584cSmrgAC_SUBST([ADMIN_MAN_DIR]) 1209e4f6584cSmrg]) # XORG_MANPAGE_SECTIONS 1210e4f6584cSmrg 1211e4f6584cSmrg# XORG_CHECK_SGML_DOCTOOLS 1212e4f6584cSmrg# ------------------------ 1213e4f6584cSmrg# Minimum version: 1.7.0 1214e4f6584cSmrg# 1215e4f6584cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1216e4f6584cSmrg# provided by xorg-sgml-doctools, if installed. 1217e4f6584cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1218e4f6584cSmrgAC_MSG_CHECKING([for X.Org SGML entities]) 1219e4f6584cSmrgXORG_SGML_PATH= 1220e4f6584cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools], 1221e4f6584cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1222e4f6584cSmrg [if test x"$cross_compiling" != x"yes" ; then 1223e4f6584cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1224e4f6584cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1225e4f6584cSmrg fi]) 1226e4f6584cSmrg 1227e4f6584cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1228e4f6584cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 122909885543Smrgelse 1230e4f6584cSmrg AC_MSG_RESULT([no]) 123109885543Smrgfi 123209885543Smrg 1233e4f6584cSmrgAC_SUBST(XORG_SGML_PATH) 1234e4f6584cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 123509885543Smrg 1236e4f6584cSmrg# XORG_CHECK_LINUXDOC 1237e4f6584cSmrg# ------------------- 1238e4f6584cSmrg# Minimum version: 1.0.0 1239e4f6584cSmrg# 1240e4f6584cSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1241e4f6584cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1242e4f6584cSmrg# Whether or not the necessary tools and files are found can be checked 1243e4f6584cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1244e4f6584cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1245e4f6584cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 124609885543Smrg 1247e4f6584cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1248e4f6584cSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1249e4f6584cSmrg 1250e4f6584cSmrgAC_MSG_CHECKING([whether to build documentation]) 1251e4f6584cSmrg 1252e4f6584cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1253e4f6584cSmrg BUILDDOC=yes 125409885543Smrgelse 1255e4f6584cSmrg BUILDDOC=no 125609885543Smrgfi 125709885543Smrg 1258e4f6584cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 125909885543Smrg 1260e4f6584cSmrgAC_MSG_RESULT([$BUILDDOC]) 126109885543Smrg 1262e4f6584cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1263e4f6584cSmrg 1264e4f6584cSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1265e4f6584cSmrg BUILDPDFDOC=yes 126609885543Smrgelse 1267e4f6584cSmrg BUILDPDFDOC=no 126809885543Smrgfi 126909885543Smrg 1270e4f6584cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 127109885543Smrg 1272e4f6584cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 127309885543Smrg 1274e4f6584cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1275e4f6584cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1276e4f6584cSmrgMAKE_PDF="$PS2PDF" 1277e4f6584cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 127809885543Smrg 1279e4f6584cSmrgAC_SUBST(MAKE_TEXT) 1280e4f6584cSmrgAC_SUBST(MAKE_PS) 1281e4f6584cSmrgAC_SUBST(MAKE_PDF) 1282e4f6584cSmrgAC_SUBST(MAKE_HTML) 1283e4f6584cSmrg]) # XORG_CHECK_LINUXDOC 128409885543Smrg 1285e4f6584cSmrg# XORG_CHECK_DOCBOOK 1286e4f6584cSmrg# ------------------- 1287e4f6584cSmrg# Minimum version: 1.0.0 1288e4f6584cSmrg# 1289e4f6584cSmrg# Checks for the ability to build output formats from SGML DocBook source. 1290e4f6584cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1291e4f6584cSmrg# indicates whether the necessary tools and files are found and, if set, 1292e4f6584cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1293e4f6584cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1294e4f6584cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 129509885543Smrg 1296e4f6584cSmrgBUILDTXTDOC=no 1297e4f6584cSmrgBUILDPDFDOC=no 1298e4f6584cSmrgBUILDPSDOC=no 1299e4f6584cSmrgBUILDHTMLDOC=no 130009885543Smrg 1301e4f6584cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1302e4f6584cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1303e4f6584cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1304e4f6584cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 130509885543Smrg 1306e4f6584cSmrgAC_MSG_CHECKING([whether to build text documentation]) 1307e4f6584cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1308e4f6584cSmrg test x$BUILD_TXTDOC != xno; then 1309e4f6584cSmrg BUILDTXTDOC=yes 1310e4f6584cSmrgfi 1311e4f6584cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1312e4f6584cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 131309885543Smrg 1314e4f6584cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1315e4f6584cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1316e4f6584cSmrg test x$BUILD_PDFDOC != xno; then 1317e4f6584cSmrg BUILDPDFDOC=yes 1318e4f6584cSmrgfi 1319e4f6584cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1320e4f6584cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 132109885543Smrg 1322e4f6584cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1323e4f6584cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1324e4f6584cSmrg test x$BUILD_PSDOC != xno; then 1325e4f6584cSmrg BUILDPSDOC=yes 1326e4f6584cSmrgfi 1327e4f6584cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1328e4f6584cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 132909885543Smrg 1330e4f6584cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1331e4f6584cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1332e4f6584cSmrg test x$BUILD_HTMLDOC != xno; then 1333e4f6584cSmrg BUILDHTMLDOC=yes 1334e4f6584cSmrgfi 1335e4f6584cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1336e4f6584cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 133709885543Smrg 1338e4f6584cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1339e4f6584cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1340e4f6584cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1341e4f6584cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 134209885543Smrg 1343e4f6584cSmrgAC_SUBST(MAKE_TEXT) 1344e4f6584cSmrgAC_SUBST(MAKE_PS) 1345e4f6584cSmrgAC_SUBST(MAKE_PDF) 1346e4f6584cSmrgAC_SUBST(MAKE_HTML) 1347e4f6584cSmrg]) # XORG_CHECK_DOCBOOK 134809885543Smrg 1349e4f6584cSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 1350e4f6584cSmrg# ---------------- 1351e4f6584cSmrg# Minimum version: 1.5.0 1352e4f6584cSmrg# 1353e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1354e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1355e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1356e4f6584cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1357e4f6584cSmrg# as whether or not to use the xmlto package. 1358e4f6584cSmrg# 1359e4f6584cSmrg# Interface to module: 1360e4f6584cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1361e4f6584cSmrg# XMLTO: returns the path of the xmlto program found 1362e4f6584cSmrg# returns the path set by the user in the environment 1363e4f6584cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1364e4f6584cSmrg# 'no' user instructs the module not to use xmlto 1365e4f6584cSmrg# 1366e4f6584cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1367e4f6584cSmrg# 1368e4f6584cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1369e4f6584cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1370e4f6584cSmrgAC_ARG_WITH(xmlto, 1371e4f6584cSmrg AS_HELP_STRING([--with-xmlto], 1372e4f6584cSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1373e4f6584cSmrg [use_xmlto=$withval], [use_xmlto=auto]) 1374e4f6584cSmrg 1375e4f6584cSmrgif test "x$use_xmlto" = x"auto"; then 1376e4f6584cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1377e4f6584cSmrg if test "x$XMLTO" = "x"; then 1378e4f6584cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1379e4f6584cSmrg have_xmlto=no 1380e4f6584cSmrg else 1381e4f6584cSmrg have_xmlto=yes 1382e4f6584cSmrg fi 1383e4f6584cSmrgelif test "x$use_xmlto" = x"yes" ; then 1384e4f6584cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1385e4f6584cSmrg if test "x$XMLTO" = "x"; then 1386e4f6584cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1387e4f6584cSmrg fi 1388e4f6584cSmrg have_xmlto=yes 1389e4f6584cSmrgelif test "x$use_xmlto" = x"no" ; then 1390e4f6584cSmrg if test "x$XMLTO" != "x"; then 1391e4f6584cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1392e4f6584cSmrg fi 1393e4f6584cSmrg have_xmlto=no 1394e4f6584cSmrgelse 1395e4f6584cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1396e4f6584cSmrgfi 1397e4f6584cSmrgm4_ifval([$1], 1398e4f6584cSmrg[if test "$have_xmlto" = yes; then 1399e4f6584cSmrg # scrape the xmlto version 1400e4f6584cSmrg AC_MSG_CHECKING([the xmlto version]) 1401e4f6584cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1402e4f6584cSmrg AC_MSG_RESULT([$xmlto_version]) 1403e4f6584cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1404e4f6584cSmrg [if test "x$use_xmlto" = xauto; then 1405e4f6584cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1406e4f6584cSmrg have_xmlto=no 1407e4f6584cSmrg else 1408e4f6584cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1409e4f6584cSmrg fi]) 1410e4f6584cSmrgfi]) 1411e4f6584cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1412e4f6584cSmrg]) # XORG_WITH_XMLTO 141309885543Smrg 1414e4f6584cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1415e4f6584cSmrg# ---------------- 1416e4f6584cSmrg# Minimum version: 1.5.0 1417e4f6584cSmrg# 1418e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1419e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1420e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1421e4f6584cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1422e4f6584cSmrg# as whether or not to use the asciidoc package. 1423e4f6584cSmrg# 1424e4f6584cSmrg# Interface to module: 1425e4f6584cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1426e4f6584cSmrg# ASCIIDOC: returns the path of the asciidoc program found 1427e4f6584cSmrg# returns the path set by the user in the environment 1428e4f6584cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1429e4f6584cSmrg# 'no' user instructs the module not to use asciidoc 1430e4f6584cSmrg# 1431e4f6584cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1432e4f6584cSmrg# 1433e4f6584cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1434e4f6584cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1435e4f6584cSmrgAC_ARG_WITH(asciidoc, 1436e4f6584cSmrg AS_HELP_STRING([--with-asciidoc], 1437e4f6584cSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1438e4f6584cSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1439e4f6584cSmrg 1440e4f6584cSmrgif test "x$use_asciidoc" = x"auto"; then 1441e4f6584cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1442e4f6584cSmrg if test "x$ASCIIDOC" = "x"; then 1443e4f6584cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1444e4f6584cSmrg have_asciidoc=no 1445e4f6584cSmrg else 1446e4f6584cSmrg have_asciidoc=yes 1447e4f6584cSmrg fi 1448e4f6584cSmrgelif test "x$use_asciidoc" = x"yes" ; then 1449e4f6584cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1450e4f6584cSmrg if test "x$ASCIIDOC" = "x"; then 1451e4f6584cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1452e4f6584cSmrg fi 1453e4f6584cSmrg have_asciidoc=yes 1454e4f6584cSmrgelif test "x$use_asciidoc" = x"no" ; then 1455e4f6584cSmrg if test "x$ASCIIDOC" != "x"; then 1456e4f6584cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1457e4f6584cSmrg fi 1458e4f6584cSmrg have_asciidoc=no 1459e4f6584cSmrgelse 1460e4f6584cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1461e4f6584cSmrgfi 1462e4f6584cSmrgm4_ifval([$1], 1463e4f6584cSmrg[if test "$have_asciidoc" = yes; then 1464e4f6584cSmrg # scrape the asciidoc version 1465e4f6584cSmrg AC_MSG_CHECKING([the asciidoc version]) 1466e4f6584cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1467e4f6584cSmrg AC_MSG_RESULT([$asciidoc_version]) 1468e4f6584cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1469e4f6584cSmrg [if test "x$use_asciidoc" = xauto; then 1470e4f6584cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1471e4f6584cSmrg have_asciidoc=no 1472e4f6584cSmrg else 1473e4f6584cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1474e4f6584cSmrg fi]) 1475e4f6584cSmrgfi]) 1476e4f6584cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1477e4f6584cSmrg]) # XORG_WITH_ASCIIDOC 147809885543Smrg 1479e4f6584cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1480e4f6584cSmrg# -------------------------------- 1481e4f6584cSmrg# Minimum version: 1.5.0 1482e4f6584cSmrg# 1483e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1484e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1485e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1486e4f6584cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1487e4f6584cSmrg# as whether or not to use the doxygen package. 1488e4f6584cSmrg# 1489e4f6584cSmrg# Interface to module: 1490e4f6584cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1491e4f6584cSmrg# DOXYGEN: returns the path of the doxygen program found 1492e4f6584cSmrg# returns the path set by the user in the environment 1493e4f6584cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1494e4f6584cSmrg# 'no' user instructs the module not to use doxygen 1495e4f6584cSmrg# 1496e4f6584cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1497e4f6584cSmrg# 1498e4f6584cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1499e4f6584cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1500e4f6584cSmrgAC_ARG_WITH(doxygen, 1501e4f6584cSmrg AS_HELP_STRING([--with-doxygen], 1502e4f6584cSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1503e4f6584cSmrg [use_doxygen=$withval], [use_doxygen=auto]) 1504e4f6584cSmrg 1505e4f6584cSmrgif test "x$use_doxygen" = x"auto"; then 1506e4f6584cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1507e4f6584cSmrg if test "x$DOXYGEN" = "x"; then 1508e4f6584cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1509e4f6584cSmrg have_doxygen=no 1510e4f6584cSmrg else 1511e4f6584cSmrg have_doxygen=yes 1512e4f6584cSmrg fi 1513e4f6584cSmrgelif test "x$use_doxygen" = x"yes" ; then 1514e4f6584cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1515e4f6584cSmrg if test "x$DOXYGEN" = "x"; then 1516e4f6584cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1517e4f6584cSmrg fi 1518e4f6584cSmrg have_doxygen=yes 1519e4f6584cSmrgelif test "x$use_doxygen" = x"no" ; then 1520e4f6584cSmrg if test "x$DOXYGEN" != "x"; then 1521e4f6584cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1522e4f6584cSmrg fi 1523e4f6584cSmrg have_doxygen=no 1524e4f6584cSmrgelse 1525e4f6584cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1526e4f6584cSmrgfi 1527e4f6584cSmrgm4_ifval([$1], 1528e4f6584cSmrg[if test "$have_doxygen" = yes; then 1529e4f6584cSmrg # scrape the doxygen version 1530e4f6584cSmrg AC_MSG_CHECKING([the doxygen version]) 1531e4f6584cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1532e4f6584cSmrg AC_MSG_RESULT([$doxygen_version]) 1533e4f6584cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1534e4f6584cSmrg [if test "x$use_doxygen" = xauto; then 1535e4f6584cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1536e4f6584cSmrg have_doxygen=no 1537e4f6584cSmrg else 1538e4f6584cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1539e4f6584cSmrg fi]) 1540e4f6584cSmrgfi]) 1541e4f6584cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1542e4f6584cSmrg]) # XORG_WITH_DOXYGEN 154309885543Smrg 1544e4f6584cSmrg# XORG_WITH_GROFF 1545e4f6584cSmrg# ---------------- 1546e4f6584cSmrg# Minimum version: 1.6.0 1547e4f6584cSmrg# 1548e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1549e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1550e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1551e4f6584cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1552e4f6584cSmrg# as whether or not to use the groff package. 1553e4f6584cSmrg# 1554e4f6584cSmrg# Interface to module: 1555e4f6584cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1556e4f6584cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1557e4f6584cSmrg# HAVE_GROFF_MS: the -ms macros package 1558e4f6584cSmrg# GROFF: returns the path of the groff program found 1559e4f6584cSmrg# returns the path set by the user in the environment 1560e4f6584cSmrg# --with-groff: 'yes' user instructs the module to use groff 1561e4f6584cSmrg# 'no' user instructs the module not to use groff 1562e4f6584cSmrg# 1563e4f6584cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1564e4f6584cSmrg# 1565e4f6584cSmrg# OS and distros often splits groff in a basic and full package, the former 1566e4f6584cSmrg# having the groff program and the later having devices, fonts and macros 1567e4f6584cSmrg# Checking for the groff executable is not enough. 1568e4f6584cSmrg# 1569e4f6584cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1570e4f6584cSmrg# unset HAVE_GROFF or GROFF env variables. 1571e4f6584cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1572e4f6584cSmrg# 1573e4f6584cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1574e4f6584cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1575e4f6584cSmrgAC_ARG_WITH(groff, 1576e4f6584cSmrg AS_HELP_STRING([--with-groff], 1577e4f6584cSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 1578e4f6584cSmrg [use_groff=$withval], [use_groff=auto]) 1579e4f6584cSmrg 1580e4f6584cSmrgif test "x$use_groff" = x"auto"; then 1581e4f6584cSmrg AC_PATH_PROG([GROFF], [groff]) 1582e4f6584cSmrg if test "x$GROFF" = "x"; then 1583e4f6584cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1584e4f6584cSmrg have_groff=no 1585e4f6584cSmrg else 1586e4f6584cSmrg have_groff=yes 1587e4f6584cSmrg fi 1588e4f6584cSmrgelif test "x$use_groff" = x"yes" ; then 1589e4f6584cSmrg AC_PATH_PROG([GROFF], [groff]) 1590e4f6584cSmrg if test "x$GROFF" = "x"; then 1591e4f6584cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1592e4f6584cSmrg fi 1593e4f6584cSmrg have_groff=yes 1594e4f6584cSmrgelif test "x$use_groff" = x"no" ; then 1595e4f6584cSmrg if test "x$GROFF" != "x"; then 1596e4f6584cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1597e4f6584cSmrg fi 1598e4f6584cSmrg have_groff=no 1599e4f6584cSmrgelse 1600e4f6584cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1601e4f6584cSmrgfi 1602e4f6584cSmrg# We have groff, test for the presence of the macro packages 1603e4f6584cSmrgif test "x$have_groff" = x"yes"; then 1604e4f6584cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1605e4f6584cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1606e4f6584cSmrg groff_ms_works=yes 160709885543Smrg else 1608e4f6584cSmrg groff_ms_works=no 160909885543Smrg fi 1610e4f6584cSmrg AC_MSG_RESULT([$groff_ms_works]) 1611e4f6584cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1612e4f6584cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1613e4f6584cSmrg groff_mm_works=yes 1614e4f6584cSmrg else 1615e4f6584cSmrg groff_mm_works=no 1616e4f6584cSmrg fi 1617e4f6584cSmrg AC_MSG_RESULT([$groff_mm_works]) 1618e4f6584cSmrgfi 1619e4f6584cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1620e4f6584cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1621e4f6584cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1622e4f6584cSmrg]) # XORG_WITH_GROFF 162309885543Smrg 1624e4f6584cSmrg# XORG_WITH_FOP 1625e4f6584cSmrg# ---------------- 1626e4f6584cSmrg# Minimum version: 1.6.0 1627e4f6584cSmrg# 1628e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1629e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1630e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1631e4f6584cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1632e4f6584cSmrg# as whether or not to use the fop package. 1633e4f6584cSmrg# 1634e4f6584cSmrg# Interface to module: 1635e4f6584cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1636e4f6584cSmrg# FOP: returns the path of the fop program found 1637e4f6584cSmrg# returns the path set by the user in the environment 1638e4f6584cSmrg# --with-fop: 'yes' user instructs the module to use fop 1639e4f6584cSmrg# 'no' user instructs the module not to use fop 1640e4f6584cSmrg# 1641e4f6584cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1642e4f6584cSmrg# 1643e4f6584cSmrgAC_DEFUN([XORG_WITH_FOP],[ 1644e4f6584cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1645e4f6584cSmrgAC_ARG_WITH(fop, 1646e4f6584cSmrg AS_HELP_STRING([--with-fop], 1647e4f6584cSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 1648e4f6584cSmrg [use_fop=$withval], [use_fop=auto]) 1649e4f6584cSmrg 1650e4f6584cSmrgif test "x$use_fop" = x"auto"; then 1651e4f6584cSmrg AC_PATH_PROG([FOP], [fop]) 1652e4f6584cSmrg if test "x$FOP" = "x"; then 1653e4f6584cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1654e4f6584cSmrg have_fop=no 1655e4f6584cSmrg else 1656e4f6584cSmrg have_fop=yes 1657e4f6584cSmrg fi 1658e4f6584cSmrgelif test "x$use_fop" = x"yes" ; then 1659e4f6584cSmrg AC_PATH_PROG([FOP], [fop]) 1660e4f6584cSmrg if test "x$FOP" = "x"; then 1661e4f6584cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1662e4f6584cSmrg fi 1663e4f6584cSmrg have_fop=yes 1664e4f6584cSmrgelif test "x$use_fop" = x"no" ; then 1665e4f6584cSmrg if test "x$FOP" != "x"; then 1666e4f6584cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1667e4f6584cSmrg fi 1668e4f6584cSmrg have_fop=no 1669e4f6584cSmrgelse 1670e4f6584cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1671e4f6584cSmrgfi 1672e4f6584cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1673e4f6584cSmrg]) # XORG_WITH_FOP 167409885543Smrg 1675e4f6584cSmrg# XORG_WITH_PS2PDF 1676e4f6584cSmrg# ---------------- 1677e4f6584cSmrg# Minimum version: 1.6.0 1678e4f6584cSmrg# 1679e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1680e4f6584cSmrg# not at the appropriate level. This macro enables a module to test for the 1681e4f6584cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1682e4f6584cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1683e4f6584cSmrg# as whether or not to use the ps2pdf package. 1684e4f6584cSmrg# 1685e4f6584cSmrg# Interface to module: 1686e4f6584cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1687e4f6584cSmrg# PS2PDF: returns the path of the ps2pdf program found 1688e4f6584cSmrg# returns the path set by the user in the environment 1689e4f6584cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1690e4f6584cSmrg# 'no' user instructs the module not to use ps2pdf 1691e4f6584cSmrg# 1692e4f6584cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1693e4f6584cSmrg# 1694e4f6584cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1695e4f6584cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1696e4f6584cSmrgAC_ARG_WITH(ps2pdf, 1697e4f6584cSmrg AS_HELP_STRING([--with-ps2pdf], 1698e4f6584cSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1699e4f6584cSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1700e4f6584cSmrg 1701e4f6584cSmrgif test "x$use_ps2pdf" = x"auto"; then 1702e4f6584cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1703e4f6584cSmrg if test "x$PS2PDF" = "x"; then 1704e4f6584cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1705e4f6584cSmrg have_ps2pdf=no 1706e4f6584cSmrg else 1707e4f6584cSmrg have_ps2pdf=yes 1708e4f6584cSmrg fi 1709e4f6584cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1710e4f6584cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1711e4f6584cSmrg if test "x$PS2PDF" = "x"; then 1712e4f6584cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1713e4f6584cSmrg fi 1714e4f6584cSmrg have_ps2pdf=yes 1715e4f6584cSmrgelif test "x$use_ps2pdf" = x"no" ; then 1716e4f6584cSmrg if test "x$PS2PDF" != "x"; then 1717e4f6584cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1718e4f6584cSmrg fi 1719e4f6584cSmrg have_ps2pdf=no 1720e4f6584cSmrgelse 1721e4f6584cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1722e4f6584cSmrgfi 1723e4f6584cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1724e4f6584cSmrg]) # XORG_WITH_PS2PDF 172509885543Smrg 1726e4f6584cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1727e4f6584cSmrg# ---------------- 1728e4f6584cSmrg# Minimum version: 1.6.0 1729e4f6584cSmrg# 1730e4f6584cSmrg# Documentation tools are not always available on all platforms and sometimes 1731e4f6584cSmrg# not at the appropriate level. This macro enables a builder to skip all 1732e4f6584cSmrg# documentation targets except traditional man pages. 1733e4f6584cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1734e4f6584cSmrg# maximum flexibilty in controlling documentation building. 1735e4f6584cSmrg# Refer to: 1736e4f6584cSmrg# XORG_WITH_XMLTO --with-xmlto 1737e4f6584cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1738e4f6584cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1739e4f6584cSmrg# XORG_WITH_FOP --with-fop 1740e4f6584cSmrg# XORG_WITH_GROFF --with-groff 1741e4f6584cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1742e4f6584cSmrg# 1743e4f6584cSmrg# Interface to module: 1744e4f6584cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1745e4f6584cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1746e4f6584cSmrg# 'no' user instructs the module not to generate docs 1747e4f6584cSmrg# parm1: specify the default value, yes or no. 1748e4f6584cSmrg# 1749e4f6584cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1750e4f6584cSmrgdefault=$1 1751e4f6584cSmrgif test "x$default" = x ; then 1752e4f6584cSmrg default="yes" 1753e4f6584cSmrgfi 1754e4f6584cSmrgAC_ARG_ENABLE(docs, 1755e4f6584cSmrg AS_HELP_STRING([--enable-docs], 1756e4f6584cSmrg [Enable building the documentation (default: yes)]), 1757e4f6584cSmrg [build_docs=$enableval], [build_docs=$default]) 1758e4f6584cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1759e4f6584cSmrgAC_MSG_CHECKING([whether to build documentation]) 1760e4f6584cSmrgAC_MSG_RESULT([$build_docs]) 1761e4f6584cSmrg]) # XORG_ENABLE_DOCS 1762e4f6584cSmrg 1763e4f6584cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1764e4f6584cSmrg# ---------------- 1765e4f6584cSmrg# Minimum version: 1.6.0 1766e4f6584cSmrg# 1767e4f6584cSmrg# This macro enables a builder to skip all developer documentation. 1768e4f6584cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1769e4f6584cSmrg# maximum flexibilty in controlling documentation building. 1770e4f6584cSmrg# Refer to: 1771e4f6584cSmrg# XORG_WITH_XMLTO --with-xmlto 1772e4f6584cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1773e4f6584cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1774e4f6584cSmrg# XORG_WITH_FOP --with-fop 1775e4f6584cSmrg# XORG_WITH_GROFF --with-groff 1776e4f6584cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1777e4f6584cSmrg# 1778e4f6584cSmrg# Interface to module: 1779e4f6584cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1780e4f6584cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1781e4f6584cSmrg# 'no' user instructs the module not to generate developer docs 1782e4f6584cSmrg# parm1: specify the default value, yes or no. 1783e4f6584cSmrg# 1784e4f6584cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1785e4f6584cSmrgdevel_default=$1 1786e4f6584cSmrgif test "x$devel_default" = x ; then 1787e4f6584cSmrg devel_default="yes" 1788e4f6584cSmrgfi 1789e4f6584cSmrgAC_ARG_ENABLE(devel-docs, 1790e4f6584cSmrg AS_HELP_STRING([--enable-devel-docs], 1791e4f6584cSmrg [Enable building the developer documentation (default: yes)]), 1792e4f6584cSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1793e4f6584cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1794e4f6584cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1795e4f6584cSmrgAC_MSG_RESULT([$build_devel_docs]) 1796e4f6584cSmrg]) # XORG_ENABLE_DEVEL_DOCS 1797e4f6584cSmrg 1798e4f6584cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1799e4f6584cSmrg# ---------------- 1800e4f6584cSmrg# Minimum version: 1.6.0 1801e4f6584cSmrg# 1802e4f6584cSmrg# This macro enables a builder to skip all functional specification targets. 1803e4f6584cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1804e4f6584cSmrg# maximum flexibilty in controlling documentation building. 1805e4f6584cSmrg# Refer to: 1806e4f6584cSmrg# XORG_WITH_XMLTO --with-xmlto 1807e4f6584cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1808e4f6584cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1809e4f6584cSmrg# XORG_WITH_FOP --with-fop 1810e4f6584cSmrg# XORG_WITH_GROFF --with-groff 1811e4f6584cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1812e4f6584cSmrg# 1813e4f6584cSmrg# Interface to module: 1814e4f6584cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1815e4f6584cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1816e4f6584cSmrg# 'no' user instructs the module not to generate specs 1817e4f6584cSmrg# parm1: specify the default value, yes or no. 1818e4f6584cSmrg# 1819e4f6584cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1820e4f6584cSmrgspec_default=$1 1821e4f6584cSmrgif test "x$spec_default" = x ; then 1822e4f6584cSmrg spec_default="yes" 1823e4f6584cSmrgfi 1824e4f6584cSmrgAC_ARG_ENABLE(specs, 1825e4f6584cSmrg AS_HELP_STRING([--enable-specs], 1826e4f6584cSmrg [Enable building the specs (default: yes)]), 1827e4f6584cSmrg [build_specs=$enableval], [build_specs=$spec_default]) 1828e4f6584cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1829e4f6584cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1830e4f6584cSmrgAC_MSG_RESULT([$build_specs]) 1831e4f6584cSmrg]) # XORG_ENABLE_SPECS 183209885543Smrg 1833e4f6584cSmrg# XORG_CHECK_MALLOC_ZERO 1834e4f6584cSmrg# ---------------------- 1835e4f6584cSmrg# Minimum version: 1.0.0 1836e4f6584cSmrg# 1837e4f6584cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1838e4f6584cSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1839e4f6584cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1840e4f6584cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1841e4f6584cSmrgAC_ARG_ENABLE(malloc0returnsnull, 1842e4f6584cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1843e4f6584cSmrg [malloc(0) returns NULL (default: auto)]), 1844e4f6584cSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1845e4f6584cSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 18462ec8c4b4Smrg 1847e4f6584cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1848e4f6584cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1849e4f6584cSmrg AC_RUN_IFELSE([ 1850e4f6584cSmrgchar *malloc(); 1851e4f6584cSmrgchar *realloc(); 1852e4f6584cSmrgchar *calloc(); 1853e4f6584cSmrgmain() { 1854e4f6584cSmrg char *m0, *r0, *c0, *p; 1855e4f6584cSmrg m0 = malloc(0); 1856e4f6584cSmrg p = malloc(10); 1857e4f6584cSmrg r0 = realloc(p,0); 1858e4f6584cSmrg c0 = calloc(0); 1859e4f6584cSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1860e4f6584cSmrg}], 1861e4f6584cSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1862e4f6584cSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1863e4f6584cSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1864e4f6584cSmrgfi 1865e4f6584cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 186609885543Smrg 1867e4f6584cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1868e4f6584cSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1869e4f6584cSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1870e4f6584cSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1871e4f6584cSmrgelse 1872e4f6584cSmrg MALLOC_ZERO_CFLAGS="" 1873e4f6584cSmrg XMALLOC_ZERO_CFLAGS="" 1874e4f6584cSmrg XTMALLOC_ZERO_CFLAGS="" 1875e4f6584cSmrgfi 187609885543Smrg 1877e4f6584cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1878e4f6584cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1879e4f6584cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1880e4f6584cSmrg]) # XORG_CHECK_MALLOC_ZERO 188109885543Smrg 1882e4f6584cSmrg# XORG_WITH_LINT() 1883e4f6584cSmrg# ---------------- 1884e4f6584cSmrg# Minimum version: 1.1.0 1885e4f6584cSmrg# 1886e4f6584cSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1887e4f6584cSmrg# is specified. (Use --with-lint=sparse for sparse.) 1888e4f6584cSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1889e4f6584cSmrg# Sets $LINT_FLAGS to flags to pass to source checker 1890e4f6584cSmrg# Sets LINT automake conditional if enabled (default: disabled) 1891e4f6584cSmrg# 1892e4f6584cSmrgAC_DEFUN([XORG_WITH_LINT],[ 189309885543Smrg 1894e4f6584cSmrg# Allow checking code with lint, sparse, etc. 1895e4f6584cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1896e4f6584cSmrg [Use a lint-style source code checker (default: disabled)])], 1897e4f6584cSmrg [use_lint=$withval], [use_lint=no]) 1898e4f6584cSmrgif test "x$use_lint" = "xyes" ; then 1899e4f6584cSmrg LINT="lint" 1900e4f6584cSmrgelse 1901e4f6584cSmrg LINT="$use_lint" 1902e4f6584cSmrgfi 1903e4f6584cSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1904e4f6584cSmrg case $LINT in 1905e4f6584cSmrg lint|*/lint) 1906e4f6584cSmrg case $host_os in 1907e4f6584cSmrg solaris*) 1908e4f6584cSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1909e4f6584cSmrg ;; 1910e4f6584cSmrg esac 1911e4f6584cSmrg ;; 1912e4f6584cSmrg esac 1913e4f6584cSmrgfi 191409885543Smrg 1915e4f6584cSmrgAC_SUBST(LINT) 1916e4f6584cSmrgAC_SUBST(LINT_FLAGS) 1917e4f6584cSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 191809885543Smrg 1919e4f6584cSmrg]) # XORG_WITH_LINT 192009885543Smrg 1921e4f6584cSmrg# XORG_LINT_LIBRARY(LIBNAME) 1922e4f6584cSmrg# -------------------------- 1923e4f6584cSmrg# Minimum version: 1.1.0 1924e4f6584cSmrg# 1925e4f6584cSmrg# Sets up flags for building lint libraries for checking programs that call 1926e4f6584cSmrg# functions in the library. 1927e4f6584cSmrg# Disabled by default, enable with --enable-lint-library 1928e4f6584cSmrg# Sets: 1929e4f6584cSmrg# @LINTLIB@ - name of lint library file to make 1930e4f6584cSmrg# MAKE_LINT_LIB - automake conditional 1931e4f6584cSmrg# 193209885543Smrg 1933e4f6584cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1934e4f6584cSmrgAC_REQUIRE([XORG_WITH_LINT]) 1935e4f6584cSmrg# Build lint "library" for more indepth checks of programs calling this library 1936e4f6584cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1937e4f6584cSmrg [Create lint library (default: disabled)])], 1938e4f6584cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1939e4f6584cSmrgif test "x$make_lint_lib" != "xno" ; then 1940e4f6584cSmrg if test "x$LINT" = "xno" ; then 1941e4f6584cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1942e4f6584cSmrg fi 1943e4f6584cSmrg if test "x$make_lint_lib" = "xyes" ; then 1944e4f6584cSmrg LINTLIB=llib-l$1.ln 1945e4f6584cSmrg else 1946e4f6584cSmrg LINTLIB=$make_lint_lib 1947e4f6584cSmrg fi 1948e4f6584cSmrgfi 1949e4f6584cSmrgAC_SUBST(LINTLIB) 1950e4f6584cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 19517104f784Smrg 1952e4f6584cSmrg]) # XORG_LINT_LIBRARY 195309885543Smrg 1954e4f6584cSmrg# XORG_CWARNFLAGS 1955e4f6584cSmrg# --------------- 1956e4f6584cSmrg# Minimum version: 1.2.0 1957e4f6584cSmrg# 1958e4f6584cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 1959e4f6584cSmrg# 1960e4f6584cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1961e4f6584cSmrgAC_REQUIRE([AC_PROG_CC]) 1962e4f6584cSmrgif test "x$GCC" = xyes ; then 1963e4f6584cSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1964e4f6584cSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1965e4f6584cSmrg-Wbad-function-cast -Wformat=2" 1966e4f6584cSmrg case `$CC -dumpversion` in 1967e4f6584cSmrg 3.4.* | 4.*) 1968e4f6584cSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1969e4f6584cSmrg ;; 1970e4f6584cSmrg esac 1971e4f6584cSmrgelse 1972e4f6584cSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1973e4f6584cSmrg if test "x$SUNCC" = "xyes"; then 1974e4f6584cSmrg CWARNFLAGS="-v" 1975e4f6584cSmrg fi 1976e4f6584cSmrgfi 1977e4f6584cSmrgAC_SUBST(CWARNFLAGS) 1978e4f6584cSmrg]) # XORG_CWARNFLAGS 197909885543Smrg 1980e4f6584cSmrg# XORG_STRICT_OPTION 1981e4f6584cSmrg# ----------------------- 1982e4f6584cSmrg# Minimum version: 1.3.0 1983e4f6584cSmrg# 1984e4f6584cSmrg# Add configure option to enable strict compilation 1985e4f6584cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1986e4f6584cSmrgAC_REQUIRE([AC_PROG_CC]) 1987e4f6584cSmrgAC_REQUIRE([AC_PROG_CC_C99]) 1988e4f6584cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1989e4f6584cSmrg 1990e4f6584cSmrgAC_ARG_ENABLE(strict-compilation, 1991e4f6584cSmrg AS_HELP_STRING([--enable-strict-compilation], 1992e4f6584cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1993e4f6584cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1994e4f6584cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 1995e4f6584cSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1996e4f6584cSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1997e4f6584cSmrg if test "x$GCC" = xyes ; then 1998e4f6584cSmrg STRICT_CFLAGS="-pedantic -Werror" 1999e4f6584cSmrg elif test "x$SUNCC" = "xyes"; then 2000e4f6584cSmrg STRICT_CFLAGS="-errwarn" 2001e4f6584cSmrg elif test "x$INTELCC" = "xyes"; then 2002e4f6584cSmrg STRICT_CFLAGS="-Werror" 2003e4f6584cSmrg fi 2004e4f6584cSmrgfi 2005e4f6584cSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2006e4f6584cSmrgAC_SUBST([CWARNFLAGS]) 2007e4f6584cSmrg]) # XORG_STRICT_OPTION 200809885543Smrg 2009e4f6584cSmrg# XORG_DEFAULT_OPTIONS 2010e4f6584cSmrg# -------------------- 2011e4f6584cSmrg# Minimum version: 1.3.0 2012e4f6584cSmrg# 2013e4f6584cSmrg# Defines default options for X.Org modules. 2014e4f6584cSmrg# 2015e4f6584cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2016e4f6584cSmrgXORG_CWARNFLAGS 2017e4f6584cSmrgXORG_STRICT_OPTION 2018e4f6584cSmrgXORG_RELEASE_VERSION 2019e4f6584cSmrgXORG_CHANGELOG 2020e4f6584cSmrgXORG_INSTALL 2021e4f6584cSmrgXORG_MANPAGE_SECTIONS 2022e4f6584cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2023e4f6584cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2024e4f6584cSmrg]) # XORG_DEFAULT_OPTIONS 2025e4f6584cSmrg 2026e4f6584cSmrg# XORG_INSTALL() 2027b698ba48Smrg# ---------------- 2028e4f6584cSmrg# Minimum version: 1.4.0 2029e4f6584cSmrg# 2030e4f6584cSmrg# Defines the variable INSTALL_CMD as the command to copy 2031e4f6584cSmrg# INSTALL from $prefix/share/util-macros. 2032e4f6584cSmrg# 2033e4f6584cSmrgAC_DEFUN([XORG_INSTALL], [ 2034e4f6584cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2035e4f6584cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2036e4f6584cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2037e4f6584cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2038e4f6584cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2039e4f6584cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2040e4f6584cSmrgAC_SUBST([INSTALL_CMD]) 2041e4f6584cSmrg]) # XORG_INSTALL 2042e4f6584cSmrgdnl Copyright 2005 Red Hat, Inc 2043e4f6584cSmrgdnl 2044e4f6584cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2045e4f6584cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2046e4f6584cSmrgdnl the above copyright notice appear in all copies and that both that 2047e4f6584cSmrgdnl copyright notice and this permission notice appear in supporting 2048e4f6584cSmrgdnl documentation. 2049e4f6584cSmrgdnl 2050e4f6584cSmrgdnl The above copyright notice and this permission notice shall be included 2051e4f6584cSmrgdnl in all copies or substantial portions of the Software. 2052e4f6584cSmrgdnl 2053e4f6584cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2054e4f6584cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2055e4f6584cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2056e4f6584cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2057e4f6584cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2058e4f6584cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2059e4f6584cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2060e4f6584cSmrgdnl 2061e4f6584cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2062e4f6584cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2063e4f6584cSmrgdnl other dealings in this Software without prior written authorization 2064e4f6584cSmrgdnl from the copyright holders. 2065e4f6584cSmrgdnl 2066b698ba48Smrg 2067e4f6584cSmrg# XORG_RELEASE_VERSION 2068e4f6584cSmrg# -------------------- 2069e4f6584cSmrg# Adds --with/without-release-string and changes the PACKAGE and 2070e4f6584cSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 2071e4f6584cSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 2072e4f6584cSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2073e4f6584cSmrg 2074e4f6584cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2075e4f6584cSmrg AC_ARG_WITH(release-version, 2076e4f6584cSmrg AS_HELP_STRING([--with-release-version=STRING], 2077e4f6584cSmrg [Use release version string in package name]), 2078e4f6584cSmrg [RELEASE_VERSION="$withval"], 2079e4f6584cSmrg [RELEASE_VERSION=""]) 2080e4f6584cSmrg if test "x$RELEASE_VERSION" != "x"; then 2081e4f6584cSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 2082e4f6584cSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 2083e4f6584cSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 2084e4f6584cSmrg fi 2085e4f6584cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2086e4f6584cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2087e4f6584cSmrg [Major version of this package]) 2088e4f6584cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2089e4f6584cSmrg if test "x$PVM" = "x"; then 2090e4f6584cSmrg PVM="0" 2091e4f6584cSmrg fi 2092e4f6584cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2093e4f6584cSmrg [$PVM], 2094e4f6584cSmrg [Minor version of this package]) 2095e4f6584cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2096e4f6584cSmrg if test "x$PVP" = "x"; then 2097e4f6584cSmrg PVP="0" 2098e4f6584cSmrg fi 2099e4f6584cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2100e4f6584cSmrg [$PVP], 2101e4f6584cSmrg [Patch version of this package]) 2102e4f6584cSmrg]) 2103b698ba48Smrg 2104e4f6584cSmrg# XORG_CHANGELOG() 2105e4f6584cSmrg# ---------------- 2106e4f6584cSmrg# Minimum version: 1.2.0 2107e4f6584cSmrg# 2108e4f6584cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 2109e4f6584cSmrg# ChangeLog from git. 2110e4f6584cSmrg# 2111e4f6584cSmrg# 2112e4f6584cSmrgAC_DEFUN([XORG_CHANGELOG], [ 2113e4f6584cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2114e4f6584cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2115e4f6584cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2116e4f6584cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2117e4f6584cSmrgAC_SUBST([CHANGELOG_CMD]) 2118e4f6584cSmrg]) # XORG_CHANGELOG 2119b698ba48Smrg 2120e4f6584cSmrgdnl Copyright 2005 Red Hat, Inc 2121e4f6584cSmrgdnl 2122e4f6584cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2123e4f6584cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2124e4f6584cSmrgdnl the above copyright notice appear in all copies and that both that 2125e4f6584cSmrgdnl copyright notice and this permission notice appear in supporting 2126e4f6584cSmrgdnl documentation. 2127e4f6584cSmrgdnl 2128e4f6584cSmrgdnl The above copyright notice and this permission notice shall be included 2129e4f6584cSmrgdnl in all copies or substantial portions of the Software. 2130e4f6584cSmrgdnl 2131e4f6584cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2132e4f6584cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2133e4f6584cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2134e4f6584cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2135e4f6584cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2136e4f6584cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2137e4f6584cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2138e4f6584cSmrgdnl 2139e4f6584cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2140e4f6584cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2141e4f6584cSmrgdnl other dealings in this Software without prior written authorization 2142e4f6584cSmrgdnl from the copyright holders. 2143e4f6584cSmrgdnl 2144b698ba48Smrg 2145e4f6584cSmrg# XORG_DRIVER_CHECK_EXT() 2146e4f6584cSmrg# -------------------------- 2147e4f6584cSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 2148e4f6584cSmrg# is defined, then add $1 to $REQUIRED_MODULES. 2149b698ba48Smrg 2150e4f6584cSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 2151e4f6584cSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2152e4f6584cSmrg SAVE_CFLAGS="$CFLAGS" 2153e4f6584cSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 2154e4f6584cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 2155e4f6584cSmrg#include "xorg-server.h" 2156e4f6584cSmrg#if !defined $1 2157e4f6584cSmrg#error $1 not defined 2158e4f6584cSmrg#endif 2159e4f6584cSmrg ]])], 2160e4f6584cSmrg [_EXT_CHECK=yes], 2161e4f6584cSmrg [_EXT_CHECK=no]) 2162e4f6584cSmrg CFLAGS="$SAVE_CFLAGS" 2163e4f6584cSmrg AC_MSG_CHECKING([if $1 is defined]) 2164e4f6584cSmrg AC_MSG_RESULT([$_EXT_CHECK]) 2165e4f6584cSmrg if test "$_EXT_CHECK" != no; then 2166e4f6584cSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 2167b698ba48Smrg fi 2168e4f6584cSmrg]) 2169b698ba48Smrg 2170e4f6584cSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2171e4f6584cSmrg# 2172e4f6584cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2173e4f6584cSmrg# 2174e4f6584cSmrg# This program is free software; you can redistribute it and/or modify 2175e4f6584cSmrg# it under the terms of the GNU General Public License as published by 2176e4f6584cSmrg# the Free Software Foundation; either version 2 of the License, or 2177e4f6584cSmrg# (at your option) any later version. 2178e4f6584cSmrg# 2179e4f6584cSmrg# This program is distributed in the hope that it will be useful, but 2180e4f6584cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2181e4f6584cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2182e4f6584cSmrg# General Public License for more details. 2183e4f6584cSmrg# 2184e4f6584cSmrg# You should have received a copy of the GNU General Public License 2185e4f6584cSmrg# along with this program; if not, write to the Free Software 2186e4f6584cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2187e4f6584cSmrg# 2188e4f6584cSmrg# As a special exception to the GNU General Public License, if you 2189e4f6584cSmrg# distribute this file as part of a program that contains a 2190e4f6584cSmrg# configuration script generated by Autoconf, you may include it under 2191e4f6584cSmrg# the same distribution terms that you use for the rest of that program. 2192b698ba48Smrg 2193e4f6584cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2194e4f6584cSmrg# ---------------------------------- 2195e4f6584cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2196e4f6584cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2197e4f6584cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2198e4f6584cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2199e4f6584cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2200e4f6584cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2201e4f6584cSmrgfi 2202e4f6584cSmrgif test -n "$PKG_CONFIG"; then 2203e4f6584cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 2204e4f6584cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2205e4f6584cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2206e4f6584cSmrg AC_MSG_RESULT([yes]) 2207b698ba48Smrg else 2208e4f6584cSmrg AC_MSG_RESULT([no]) 2209e4f6584cSmrg PKG_CONFIG="" 2210b698ba48Smrg fi 2211e4f6584cSmrg 2212e4f6584cSmrgfi[]dnl 2213e4f6584cSmrg])# PKG_PROG_PKG_CONFIG 2214b698ba48Smrg 2215e4f6584cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2216e4f6584cSmrg# 2217e4f6584cSmrg# Check to see whether a particular set of modules exists. Similar 2218e4f6584cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2219e4f6584cSmrg# 2220e4f6584cSmrg# 2221e4f6584cSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2222e4f6584cSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 2223e4f6584cSmrg# PKG_CHECK_EXISTS manually 2224e4f6584cSmrg# -------------------------------------------------------------- 2225e4f6584cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 2226e4f6584cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2227e4f6584cSmrgif test -n "$PKG_CONFIG" && \ 2228e4f6584cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2229e4f6584cSmrg m4_ifval([$2], [$2], [:]) 2230e4f6584cSmrgm4_ifvaln([$3], [else 2231e4f6584cSmrg $3])dnl 2232e4f6584cSmrgfi]) 2233b698ba48Smrg 2234b698ba48Smrg 2235e4f6584cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2236e4f6584cSmrg# --------------------------------------------- 2237e4f6584cSmrgm4_define([_PKG_CONFIG], 2238e4f6584cSmrg[if test -n "$$1"; then 2239e4f6584cSmrg pkg_cv_[]$1="$$1" 2240e4f6584cSmrg elif test -n "$PKG_CONFIG"; then 2241e4f6584cSmrg PKG_CHECK_EXISTS([$3], 2242e4f6584cSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2243e4f6584cSmrg [pkg_failed=yes]) 2244e4f6584cSmrg else 2245e4f6584cSmrg pkg_failed=untried 2246e4f6584cSmrgfi[]dnl 2247e4f6584cSmrg])# _PKG_CONFIG 224809885543Smrg 2249e4f6584cSmrg# _PKG_SHORT_ERRORS_SUPPORTED 2250e4f6584cSmrg# ----------------------------- 2251e4f6584cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2252e4f6584cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2253e4f6584cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2254e4f6584cSmrg _pkg_short_errors_supported=yes 2255e4f6584cSmrgelse 2256e4f6584cSmrg _pkg_short_errors_supported=no 2257e4f6584cSmrgfi[]dnl 2258e4f6584cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 225909885543Smrg 226009885543Smrg 2261e4f6584cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2262e4f6584cSmrg# [ACTION-IF-NOT-FOUND]) 2263e4f6584cSmrg# 2264e4f6584cSmrg# 2265e4f6584cSmrg# Note that if there is a possibility the first call to 2266e4f6584cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2267e4f6584cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2268e4f6584cSmrg# 2269e4f6584cSmrg# 2270e4f6584cSmrg# -------------------------------------------------------------- 2271e4f6584cSmrgAC_DEFUN([PKG_CHECK_MODULES], 2272e4f6584cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2273e4f6584cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2274e4f6584cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 227509885543Smrg 2276e4f6584cSmrgpkg_failed=no 2277e4f6584cSmrgAC_MSG_CHECKING([for $1]) 227809885543Smrg 2279e4f6584cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2280e4f6584cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 228109885543Smrg 2282e4f6584cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2283e4f6584cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 2284e4f6584cSmrgSee the pkg-config man page for more details.]) 228509885543Smrg 2286e4f6584cSmrgif test $pkg_failed = yes; then 2287e4f6584cSmrg _PKG_SHORT_ERRORS_SUPPORTED 2288e4f6584cSmrg if test $_pkg_short_errors_supported = yes; then 2289e4f6584cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2290e4f6584cSmrg else 2291e4f6584cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2292e4f6584cSmrg fi 2293e4f6584cSmrg # Put the nasty error message in config.log where it belongs 2294e4f6584cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 229509885543Smrg 2296e4f6584cSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 2297e4f6584cSmrg[Package requirements ($2) were not met: 229809885543Smrg 2299e4f6584cSmrg$$1_PKG_ERRORS 230009885543Smrg 2301e4f6584cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2302e4f6584cSmrginstalled software in a non-standard prefix. 230309885543Smrg 2304e4f6584cSmrg_PKG_TEXT 2305e4f6584cSmrg])], 2306e4f6584cSmrg [AC_MSG_RESULT([no]) 2307e4f6584cSmrg $4]) 2308e4f6584cSmrgelif test $pkg_failed = untried; then 2309e4f6584cSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2310e4f6584cSmrg[The pkg-config script could not be found or is too old. Make sure it 2311e4f6584cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 2312e4f6584cSmrgpath to pkg-config. 231309885543Smrg 2314e4f6584cSmrg_PKG_TEXT 231509885543Smrg 2316e4f6584cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2317e4f6584cSmrg [$4]) 2318e4f6584cSmrgelse 2319e4f6584cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2320e4f6584cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2321e4f6584cSmrg AC_MSG_RESULT([yes]) 2322e4f6584cSmrg ifelse([$3], , :, [$3]) 2323e4f6584cSmrgfi[]dnl 2324e4f6584cSmrg])# PKG_CHECK_MODULES 232509885543Smrg 2326e4f6584cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2327e4f6584cSmrg# 2328e4f6584cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2329e4f6584cSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2330e4f6584cSmrg# Written by Gordon Matzigkeit, 1996 2331e4f6584cSmrg# 2332e4f6584cSmrg# This file is free software; the Free Software Foundation gives 2333e4f6584cSmrg# unlimited permission to copy and/or distribute it, with or without 2334e4f6584cSmrg# modifications, as long as this notice is preserved. 2335e4f6584cSmrg 2336e4f6584cSmrgm4_define([_LT_COPYING], [dnl 2337e4f6584cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2338e4f6584cSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2339e4f6584cSmrg# Written by Gordon Matzigkeit, 1996 2340e4f6584cSmrg# 2341e4f6584cSmrg# This file is part of GNU Libtool. 2342e4f6584cSmrg# 2343e4f6584cSmrg# GNU Libtool is free software; you can redistribute it and/or 2344e4f6584cSmrg# modify it under the terms of the GNU General Public License as 2345e4f6584cSmrg# published by the Free Software Foundation; either version 2 of 2346e4f6584cSmrg# the License, or (at your option) any later version. 2347e4f6584cSmrg# 2348e4f6584cSmrg# As a special exception to the GNU General Public License, 2349e4f6584cSmrg# if you distribute this file as part of a program or library that 2350e4f6584cSmrg# is built using GNU Libtool, you may include this file under the 2351e4f6584cSmrg# same distribution terms that you use for the rest of that program. 2352e4f6584cSmrg# 2353e4f6584cSmrg# GNU Libtool is distributed in the hope that it will be useful, 2354e4f6584cSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2355e4f6584cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2356e4f6584cSmrg# GNU General Public License for more details. 2357e4f6584cSmrg# 2358e4f6584cSmrg# You should have received a copy of the GNU General Public License 2359e4f6584cSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 2360e4f6584cSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2361e4f6584cSmrg# obtained by writing to the Free Software Foundation, Inc., 2362e4f6584cSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2363e4f6584cSmrg]) 236409885543Smrg 2365e4f6584cSmrg# serial 56 LT_INIT 23667104f784Smrg 236709885543Smrg 2368e4f6584cSmrg# LT_PREREQ(VERSION) 2369e4f6584cSmrg# ------------------ 2370e4f6584cSmrg# Complain and exit if this libtool version is less that VERSION. 2371e4f6584cSmrgm4_defun([LT_PREREQ], 2372e4f6584cSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2373e4f6584cSmrg [m4_default([$3], 2374e4f6584cSmrg [m4_fatal([Libtool version $1 or higher is required], 2375e4f6584cSmrg 63)])], 2376e4f6584cSmrg [$2])]) 237709885543Smrg 2378e4f6584cSmrg 2379e4f6584cSmrg# _LT_CHECK_BUILDDIR 2380e4f6584cSmrg# ------------------ 2381e4f6584cSmrg# Complain if the absolute build directory name contains unusual characters 2382e4f6584cSmrgm4_defun([_LT_CHECK_BUILDDIR], 2383e4f6584cSmrg[case `pwd` in 2384e4f6584cSmrg *\ * | *\ *) 2385e4f6584cSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 238609885543Smrgesac 238709885543Smrg]) 238809885543Smrg 238909885543Smrg 2390e4f6584cSmrg# LT_INIT([OPTIONS]) 2391e4f6584cSmrg# ------------------ 2392e4f6584cSmrgAC_DEFUN([LT_INIT], 2393e4f6584cSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2394e4f6584cSmrgAC_BEFORE([$0], [LT_LANG])dnl 2395e4f6584cSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2396e4f6584cSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2397e4f6584cSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 2398e4f6584cSmrg 2399e4f6584cSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2400e4f6584cSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2401e4f6584cSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2402e4f6584cSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2403e4f6584cSmrgdnl unless we require an AC_DEFUNed macro: 2404e4f6584cSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2405e4f6584cSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2406e4f6584cSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2407e4f6584cSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2408e4f6584cSmrgm4_require([_LT_PROG_LTMAIN])dnl 2409e4f6584cSmrg 2410e4f6584cSmrgdnl Parse OPTIONS 2411e4f6584cSmrg_LT_SET_OPTIONS([$0], [$1]) 2412e4f6584cSmrg 2413e4f6584cSmrg# This can be used to rebuild libtool when needed 2414e4f6584cSmrgLIBTOOL_DEPS="$ltmain" 2415e4f6584cSmrg 2416e4f6584cSmrg# Always use our own libtool. 2417e4f6584cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2418e4f6584cSmrgAC_SUBST(LIBTOOL)dnl 241909885543Smrg 2420e4f6584cSmrg_LT_SETUP 24212ec8c4b4Smrg 2422e4f6584cSmrg# Only expand once: 2423e4f6584cSmrgm4_define([LT_INIT]) 2424e4f6584cSmrg])# LT_INIT 242509885543Smrg 2426e4f6584cSmrg# Old names: 2427e4f6584cSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2428e4f6584cSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2429e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 2430e4f6584cSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2431e4f6584cSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 243209885543Smrg 2433e4f6584cSmrg 2434e4f6584cSmrg# _LT_CC_BASENAME(CC) 2435e4f6584cSmrg# ------------------- 2436e4f6584cSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2437e4f6584cSmrgm4_defun([_LT_CC_BASENAME], 2438e4f6584cSmrg[for cc_temp in $1""; do 2439e4f6584cSmrg case $cc_temp in 2440e4f6584cSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2441e4f6584cSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2442e4f6584cSmrg \-*) ;; 2443e4f6584cSmrg *) break;; 2444b698ba48Smrg esac 2445e4f6584cSmrgdone 2446e4f6584cSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2447e4f6584cSmrg]) 244809885543Smrg 244909885543Smrg 2450e4f6584cSmrg# _LT_FILEUTILS_DEFAULTS 2451e4f6584cSmrg# ---------------------- 2452e4f6584cSmrg# It is okay to use these file commands and assume they have been set 2453e4f6584cSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2454e4f6584cSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2455e4f6584cSmrg[: ${CP="cp -f"} 2456e4f6584cSmrg: ${MV="mv -f"} 2457e4f6584cSmrg: ${RM="rm -f"} 2458e4f6584cSmrg])# _LT_FILEUTILS_DEFAULTS 2459e4f6584cSmrg 2460e4f6584cSmrg 2461e4f6584cSmrg# _LT_SETUP 2462e4f6584cSmrg# --------- 2463e4f6584cSmrgm4_defun([_LT_SETUP], 2464e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2465e4f6584cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2466e4f6584cSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2467e4f6584cSmrg_LT_DECL([], [host], [0])dnl 2468e4f6584cSmrg_LT_DECL([], [host_os], [0])dnl 2469e4f6584cSmrgdnl 2470e4f6584cSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2471e4f6584cSmrg_LT_DECL([], [build], [0])dnl 2472e4f6584cSmrg_LT_DECL([], [build_os], [0])dnl 2473e4f6584cSmrgdnl 2474e4f6584cSmrgAC_REQUIRE([AC_PROG_CC])dnl 2475e4f6584cSmrgAC_REQUIRE([LT_PATH_LD])dnl 2476e4f6584cSmrgAC_REQUIRE([LT_PATH_NM])dnl 2477e4f6584cSmrgdnl 2478e4f6584cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2479e4f6584cSmrgtest -z "$LN_S" && LN_S="ln -s" 2480e4f6584cSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2481e4f6584cSmrgdnl 2482e4f6584cSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2483e4f6584cSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2484e4f6584cSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2485e4f6584cSmrgdnl 2486e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2487e4f6584cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2488e4f6584cSmrgm4_require([_LT_CMD_RELOAD])dnl 2489e4f6584cSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2490e4f6584cSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2491e4f6584cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2492e4f6584cSmrg 2493e4f6584cSmrg_LT_CONFIG_LIBTOOL_INIT([ 2494e4f6584cSmrg# See if we are running on zsh, and set the options which allow our 2495e4f6584cSmrg# commands through without removal of \ escapes INIT. 2496e4f6584cSmrgif test -n "\${ZSH_VERSION+set}" ; then 2497e4f6584cSmrg setopt NO_GLOB_SUBST 2498e4f6584cSmrgfi 2499e4f6584cSmrg]) 2500e4f6584cSmrgif test -n "${ZSH_VERSION+set}" ; then 2501e4f6584cSmrg setopt NO_GLOB_SUBST 2502e4f6584cSmrgfi 2503e4f6584cSmrg 2504e4f6584cSmrg_LT_CHECK_OBJDIR 2505e4f6584cSmrg 2506e4f6584cSmrgm4_require([_LT_TAG_COMPILER])dnl 2507e4f6584cSmrg_LT_PROG_ECHO_BACKSLASH 2508e4f6584cSmrg 2509e4f6584cSmrgcase $host_os in 2510e4f6584cSmrgaix3*) 2511e4f6584cSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2512e4f6584cSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2513e4f6584cSmrg # vanish in a puff of smoke. 2514e4f6584cSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2515e4f6584cSmrg COLLECT_NAMES= 2516e4f6584cSmrg export COLLECT_NAMES 2517b698ba48Smrg fi 2518e4f6584cSmrg ;; 2519e4f6584cSmrgesac 2520e4f6584cSmrg 2521e4f6584cSmrg# Sed substitution that helps us do robust quoting. It backslashifies 2522e4f6584cSmrg# metacharacters that are still active within double-quoted strings. 2523e4f6584cSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 252409885543Smrg 2525e4f6584cSmrg# Same as above, but do not quote variable references. 2526e4f6584cSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 252709885543Smrg 2528e4f6584cSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2529e4f6584cSmrg# double_quote_subst'ed string. 2530e4f6584cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 253109885543Smrg 2532e4f6584cSmrg# Sed substitution to delay expansion of an escaped single quote. 2533e4f6584cSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 253409885543Smrg 2535e4f6584cSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2536e4f6584cSmrgno_glob_subst='s/\*/\\\*/g' 253709885543Smrg 2538e4f6584cSmrg# Global variables: 2539e4f6584cSmrgofile=libtool 2540e4f6584cSmrgcan_build_shared=yes 254109885543Smrg 2542e4f6584cSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2543e4f6584cSmrg# which needs '.lib'). 2544e4f6584cSmrglibext=a 2545e4f6584cSmrg 2546e4f6584cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 254709885543Smrg 2548e4f6584cSmrgold_CC="$CC" 2549e4f6584cSmrgold_CFLAGS="$CFLAGS" 255009885543Smrg 2551e4f6584cSmrg# Set sane defaults for various variables 2552e4f6584cSmrgtest -z "$CC" && CC=cc 2553e4f6584cSmrgtest -z "$LTCC" && LTCC=$CC 2554e4f6584cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2555e4f6584cSmrgtest -z "$LD" && LD=ld 2556e4f6584cSmrgtest -z "$ac_objext" && ac_objext=o 255709885543Smrg 2558e4f6584cSmrg_LT_CC_BASENAME([$compiler]) 255909885543Smrg 2560e4f6584cSmrg# Only perform the check for file, if the check method requires it 2561e4f6584cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2562e4f6584cSmrgcase $deplibs_check_method in 2563e4f6584cSmrgfile_magic*) 2564e4f6584cSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2565e4f6584cSmrg _LT_PATH_MAGIC 2566e4f6584cSmrg fi 2567e4f6584cSmrg ;; 2568e4f6584cSmrgesac 2569e4f6584cSmrg 2570e4f6584cSmrg# Use C for the default configuration in the libtool script 2571e4f6584cSmrgLT_SUPPORTED_TAG([CC]) 2572e4f6584cSmrg_LT_LANG_C_CONFIG 2573e4f6584cSmrg_LT_LANG_DEFAULT_CONFIG 2574e4f6584cSmrg_LT_CONFIG_COMMANDS 2575e4f6584cSmrg])# _LT_SETUP 257609885543Smrg 257709885543Smrg 2578e4f6584cSmrg# _LT_PROG_LTMAIN 2579b698ba48Smrg# --------------- 2580e4f6584cSmrg# Note that this code is called both from `configure', and `config.status' 2581e4f6584cSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2582e4f6584cSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2583e4f6584cSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2584e4f6584cSmrgm4_defun([_LT_PROG_LTMAIN], 2585e4f6584cSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2586e4f6584cSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2587e4f6584cSmrgltmain="$ac_aux_dir/ltmain.sh" 2588e4f6584cSmrg])# _LT_PROG_LTMAIN 258909885543Smrg 259009885543Smrg 259109885543Smrg 2592e4f6584cSmrg# So that we can recreate a full libtool script including additional 2593e4f6584cSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2594e4f6584cSmrg# in macros and then make a single call at the end using the `libtool' 2595e4f6584cSmrg# label. 2596b698ba48Smrg 2597b698ba48Smrg 2598e4f6584cSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2599e4f6584cSmrg# ---------------------------------------- 2600e4f6584cSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2601e4f6584cSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2602e4f6584cSmrg[m4_ifval([$1], 2603e4f6584cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2604e4f6584cSmrg [$1 2605e4f6584cSmrg])])]) 2606b698ba48Smrg 2607e4f6584cSmrg# Initialize. 2608e4f6584cSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2609b698ba48Smrg 2610b698ba48Smrg 2611e4f6584cSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2612e4f6584cSmrg# ------------------------------ 2613e4f6584cSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2614e4f6584cSmrgm4_define([_LT_CONFIG_LIBTOOL], 2615e4f6584cSmrg[m4_ifval([$1], 2616e4f6584cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2617e4f6584cSmrg [$1 2618e4f6584cSmrg])])]) 2619e4f6584cSmrg 2620e4f6584cSmrg# Initialize. 2621e4f6584cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2622e4f6584cSmrg 2623e4f6584cSmrg 2624e4f6584cSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2625e4f6584cSmrg# ----------------------------------------------------- 2626e4f6584cSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2627e4f6584cSmrg[_LT_CONFIG_LIBTOOL([$1]) 2628e4f6584cSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2629e4f6584cSmrg]) 2630b698ba48Smrg 263109885543Smrg 2632e4f6584cSmrg# _LT_FORMAT_COMMENT([COMMENT]) 2633e4f6584cSmrg# ----------------------------- 2634e4f6584cSmrg# Add leading comment marks to the start of each line, and a trailing 2635e4f6584cSmrg# full-stop to the whole comment if one is not present already. 2636e4f6584cSmrgm4_define([_LT_FORMAT_COMMENT], 2637e4f6584cSmrg[m4_ifval([$1], [ 2638e4f6584cSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2639e4f6584cSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2640e4f6584cSmrg)]) 2641e4f6584cSmrg 2642e4f6584cSmrg 2643e4f6584cSmrg 2644e4f6584cSmrg 2645e4f6584cSmrg 2646e4f6584cSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2647e4f6584cSmrg# ------------------------------------------------------------------- 2648e4f6584cSmrg# CONFIGNAME is the name given to the value in the libtool script. 2649e4f6584cSmrg# VARNAME is the (base) name used in the configure script. 2650e4f6584cSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2651e4f6584cSmrg# VARNAME. Any other value will be used directly. 2652e4f6584cSmrgm4_define([_LT_DECL], 2653e4f6584cSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2654e4f6584cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2655e4f6584cSmrg [m4_ifval([$1], [$1], [$2])]) 2656e4f6584cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2657e4f6584cSmrg m4_ifval([$4], 2658e4f6584cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2659e4f6584cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 2660e4f6584cSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 2661e4f6584cSmrg]) 266209885543Smrg 266309885543Smrg 2664e4f6584cSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2665e4f6584cSmrg# -------------------------------------------------------- 2666e4f6584cSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 266709885543Smrg 266809885543Smrg 2669e4f6584cSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2670e4f6584cSmrg# ------------------------------------------------ 2671e4f6584cSmrgm4_define([lt_decl_tag_varnames], 2672e4f6584cSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 267309885543Smrg 267409885543Smrg 2675e4f6584cSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2676e4f6584cSmrg# --------------------------------------------------------- 2677e4f6584cSmrgm4_define([_lt_decl_filter], 2678e4f6584cSmrg[m4_case([$#], 2679e4f6584cSmrg [0], [m4_fatal([$0: too few arguments: $#])], 2680e4f6584cSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2681e4f6584cSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2682e4f6584cSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2683e4f6584cSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2684e4f6584cSmrg]) 268509885543Smrg 268609885543Smrg 2687e4f6584cSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2688e4f6584cSmrg# -------------------------------------------------- 2689e4f6584cSmrgm4_define([lt_decl_quote_varnames], 2690e4f6584cSmrg[_lt_decl_filter([value], [1], $@)]) 2691b698ba48Smrg 2692b698ba48Smrg 2693e4f6584cSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2694e4f6584cSmrg# --------------------------------------------------- 2695e4f6584cSmrgm4_define([lt_decl_dquote_varnames], 2696e4f6584cSmrg[_lt_decl_filter([value], [2], $@)]) 2697b698ba48Smrg 2698b698ba48Smrg 2699e4f6584cSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2700e4f6584cSmrg# --------------------------------------------------- 2701e4f6584cSmrgm4_define([lt_decl_varnames_tagged], 2702e4f6584cSmrg[m4_assert([$# <= 2])dnl 2703e4f6584cSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 2704e4f6584cSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2705e4f6584cSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2706e4f6584cSmrgm4_define([_lt_decl_varnames_tagged], 2707e4f6584cSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2708b698ba48Smrg 2709b698ba48Smrg 2710e4f6584cSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2711e4f6584cSmrg# ------------------------------------------------ 2712e4f6584cSmrgm4_define([lt_decl_all_varnames], 2713e4f6584cSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2714e4f6584cSmrg m4_if([$2], [], 2715e4f6584cSmrg m4_quote(lt_decl_varnames), 2716e4f6584cSmrg m4_quote(m4_shift($@))))[]dnl 2717e4f6584cSmrg]) 2718e4f6584cSmrgm4_define([_lt_decl_all_varnames], 2719e4f6584cSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 2720e4f6584cSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2721e4f6584cSmrg]) 2722b698ba48Smrg 2723b698ba48Smrg 2724e4f6584cSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2725e4f6584cSmrg# ------------------------------------ 2726e4f6584cSmrg# Quote a variable value, and forward it to `config.status' so that its 2727e4f6584cSmrg# declaration there will have the same value as in `configure'. VARNAME 2728e4f6584cSmrg# must have a single quote delimited value for this to work. 2729e4f6584cSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2730e4f6584cSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 2731b698ba48Smrg 2732b698ba48Smrg 2733e4f6584cSmrg# _LT_CONFIG_STATUS_DECLARATIONS 2734e4f6584cSmrg# ------------------------------ 2735e4f6584cSmrg# We delimit libtool config variables with single quotes, so when 2736e4f6584cSmrg# we write them to config.status, we have to be sure to quote all 2737e4f6584cSmrg# embedded single quotes properly. In configure, this macro expands 2738e4f6584cSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2739e4f6584cSmrg# 2740e4f6584cSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 2741e4f6584cSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2742e4f6584cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2743e4f6584cSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2744b698ba48Smrg 2745b698ba48Smrg 2746e4f6584cSmrg# _LT_LIBTOOL_TAGS 2747e4f6584cSmrg# ---------------- 2748e4f6584cSmrg# Output comment and list of tags supported by the script 2749e4f6584cSmrgm4_defun([_LT_LIBTOOL_TAGS], 2750e4f6584cSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2751e4f6584cSmrgavailable_tags="_LT_TAGS"dnl 2752e4f6584cSmrg]) 275309885543Smrg 2754b698ba48Smrg 2755e4f6584cSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2756e4f6584cSmrg# ----------------------------------- 2757e4f6584cSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2758e4f6584cSmrg# expand to a commented shell variable setting: 2759e4f6584cSmrg# 2760e4f6584cSmrg# # Some comment about what VAR is for. 2761e4f6584cSmrg# visible_name=$lt_internal_name 2762e4f6584cSmrgm4_define([_LT_LIBTOOL_DECLARE], 2763e4f6584cSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2764e4f6584cSmrg [description])))[]dnl 2765e4f6584cSmrgm4_pushdef([_libtool_name], 2766e4f6584cSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2767e4f6584cSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2768e4f6584cSmrg [0], [_libtool_name=[$]$1], 2769e4f6584cSmrg [1], [_libtool_name=$lt_[]$1], 2770e4f6584cSmrg [2], [_libtool_name=$lt_[]$1], 2771e4f6584cSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2772e4f6584cSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2773e4f6584cSmrg]) 277409885543Smrg 277509885543Smrg 2776e4f6584cSmrg# _LT_LIBTOOL_CONFIG_VARS 2777e4f6584cSmrg# ----------------------- 2778e4f6584cSmrg# Produce commented declarations of non-tagged libtool config variables 2779e4f6584cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2780e4f6584cSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2781e4f6584cSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2782e4f6584cSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2783e4f6584cSmrg[m4_foreach([_lt_var], 2784e4f6584cSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2785e4f6584cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 278609885543Smrg 278709885543Smrg 2788e4f6584cSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 2789e4f6584cSmrg# ------------------------- 2790e4f6584cSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 2791e4f6584cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2792e4f6584cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 279309885543Smrg 2794b698ba48Smrg 2795e4f6584cSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2796e4f6584cSmrg# ------------------------------ 2797e4f6584cSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2798b698ba48Smrg 2799b698ba48Smrg 2800e4f6584cSmrg# _LT_CONFIG_COMMANDS 2801e4f6584cSmrg# ------------------- 2802e4f6584cSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2803e4f6584cSmrg# variables for single and double quote escaping we saved from calls 2804e4f6584cSmrg# to _LT_DECL, we can put quote escaped variables declarations 2805e4f6584cSmrg# into `config.status', and then the shell code to quote escape them in 2806e4f6584cSmrg# for loops in `config.status'. Finally, any additional code accumulated 2807e4f6584cSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2808e4f6584cSmrgm4_defun([_LT_CONFIG_COMMANDS], 2809e4f6584cSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 2810e4f6584cSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 2811e4f6584cSmrg dnl instead of duplicating it all over again into config.status, 2812e4f6584cSmrg dnl then we will have config.status run $CONFIG_LT later, so it 2813e4f6584cSmrg dnl needs to know what name is stored there: 2814e4f6584cSmrg [AC_CONFIG_COMMANDS([libtool], 2815e4f6584cSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 2816e4f6584cSmrg dnl If the libtool generation code is destined for config.status, 2817e4f6584cSmrg dnl expand the accumulated commands and init code now: 2818e4f6584cSmrg [AC_CONFIG_COMMANDS([libtool], 2819e4f6584cSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 2820e4f6584cSmrg])#_LT_CONFIG_COMMANDS 2821e4f6584cSmrg 2822e4f6584cSmrg 2823e4f6584cSmrg# Initialize. 2824e4f6584cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 2825e4f6584cSmrg[ 2826b698ba48Smrg 2827e4f6584cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 2828e4f6584cSmrg# if CDPATH is set. 2829e4f6584cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2830b698ba48Smrg 2831e4f6584cSmrgsed_quote_subst='$sed_quote_subst' 2832e4f6584cSmrgdouble_quote_subst='$double_quote_subst' 2833e4f6584cSmrgdelay_variable_subst='$delay_variable_subst' 2834e4f6584cSmrg_LT_CONFIG_STATUS_DECLARATIONS 2835e4f6584cSmrgLTCC='$LTCC' 2836e4f6584cSmrgLTCFLAGS='$LTCFLAGS' 2837e4f6584cSmrgcompiler='$compiler_DEFAULT' 2838e4f6584cSmrg 2839e4f6584cSmrg# Quote evaled strings. 2840e4f6584cSmrgfor var in lt_decl_all_varnames([[ \ 2841e4f6584cSmrg]], lt_decl_quote_varnames); do 2842e4f6584cSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2843e4f6584cSmrg *[[\\\\\\\`\\"\\\$]]*) 2844e4f6584cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 2845b698ba48Smrg ;; 2846b698ba48Smrg *) 2847e4f6584cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 28482ec8c4b4Smrg ;; 2849b698ba48Smrg esac 2850e4f6584cSmrgdone 285109885543Smrg 2852e4f6584cSmrg# Double-quote double-evaled strings. 2853e4f6584cSmrgfor var in lt_decl_all_varnames([[ \ 2854e4f6584cSmrg]], lt_decl_dquote_varnames); do 2855e4f6584cSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2856e4f6584cSmrg *[[\\\\\\\`\\"\\\$]]*) 2857e4f6584cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 2858b698ba48Smrg ;; 2859b698ba48Smrg *) 2860e4f6584cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 28612ec8c4b4Smrg ;; 2862b698ba48Smrg esac 2863e4f6584cSmrgdone 286409885543Smrg 2865e4f6584cSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 2866e4f6584cSmrgcase \$lt_ECHO in 2867e4f6584cSmrg*'\\\[$]0 --fallback-echo"')dnl " 2868e4f6584cSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 2869e4f6584cSmrg ;; 2870e4f6584cSmrgesac 2871b698ba48Smrg 2872e4f6584cSmrg_LT_OUTPUT_LIBTOOL_INIT 2873e4f6584cSmrg]) 2874e4f6584cSmrg 2875e4f6584cSmrg 2876e4f6584cSmrg# LT_OUTPUT 2877e4f6584cSmrg# --------- 2878e4f6584cSmrg# This macro allows early generation of the libtool script (before 2879e4f6584cSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 2880e4f6584cSmrg# tests. 2881e4f6584cSmrgAC_DEFUN([LT_OUTPUT], 2882e4f6584cSmrg[: ${CONFIG_LT=./config.lt} 2883e4f6584cSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 2884e4f6584cSmrgcat >"$CONFIG_LT" <<_LTEOF 2885e4f6584cSmrg#! $SHELL 2886e4f6584cSmrg# Generated by $as_me. 2887e4f6584cSmrg# Run this file to recreate a libtool stub with the current configuration. 2888e4f6584cSmrg 2889e4f6584cSmrglt_cl_silent=false 2890e4f6584cSmrgSHELL=\${CONFIG_SHELL-$SHELL} 2891e4f6584cSmrg_LTEOF 2892e4f6584cSmrg 2893e4f6584cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 2894e4f6584cSmrgAS_SHELL_SANITIZE 2895e4f6584cSmrg_AS_PREPARE 2896e4f6584cSmrg 2897e4f6584cSmrgexec AS_MESSAGE_FD>&1 2898e4f6584cSmrgexec AS_MESSAGE_LOG_FD>>config.log 2899e4f6584cSmrg{ 2900e4f6584cSmrg echo 2901e4f6584cSmrg AS_BOX([Running $as_me.]) 2902e4f6584cSmrg} >&AS_MESSAGE_LOG_FD 2903e4f6584cSmrg 2904e4f6584cSmrglt_cl_help="\ 2905e4f6584cSmrg\`$as_me' creates a local libtool stub from the current configuration, 2906e4f6584cSmrgfor use in further configure time tests before the real libtool is 2907e4f6584cSmrggenerated. 2908e4f6584cSmrg 2909e4f6584cSmrgUsage: $[0] [[OPTIONS]] 2910e4f6584cSmrg 2911e4f6584cSmrg -h, --help print this help, then exit 2912e4f6584cSmrg -V, --version print version number, then exit 2913e4f6584cSmrg -q, --quiet do not print progress messages 2914e4f6584cSmrg -d, --debug don't remove temporary files 2915e4f6584cSmrg 2916e4f6584cSmrgReport bugs to <bug-libtool@gnu.org>." 2917e4f6584cSmrg 2918e4f6584cSmrglt_cl_version="\ 2919e4f6584cSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 2920e4f6584cSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 2921e4f6584cSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 2922e4f6584cSmrg 2923e4f6584cSmrgCopyright (C) 2008 Free Software Foundation, Inc. 2924e4f6584cSmrgThis config.lt script is free software; the Free Software Foundation 2925e4f6584cSmrggives unlimited permision to copy, distribute and modify it." 2926e4f6584cSmrg 2927e4f6584cSmrgwhile test $[#] != 0 2928e4f6584cSmrgdo 2929e4f6584cSmrg case $[1] in 2930e4f6584cSmrg --version | --v* | -V ) 2931e4f6584cSmrg echo "$lt_cl_version"; exit 0 ;; 2932e4f6584cSmrg --help | --h* | -h ) 2933e4f6584cSmrg echo "$lt_cl_help"; exit 0 ;; 2934e4f6584cSmrg --debug | --d* | -d ) 2935e4f6584cSmrg debug=: ;; 2936e4f6584cSmrg --quiet | --q* | --silent | --s* | -q ) 2937e4f6584cSmrg lt_cl_silent=: ;; 2938e4f6584cSmrg 2939e4f6584cSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 2940e4f6584cSmrgTry \`$[0] --help' for more information.]) ;; 2941e4f6584cSmrg 2942e4f6584cSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 2943e4f6584cSmrgTry \`$[0] --help' for more information.]) ;; 2944e4f6584cSmrg esac 2945e4f6584cSmrg shift 2946e4f6584cSmrgdone 2947e4f6584cSmrg 2948e4f6584cSmrgif $lt_cl_silent; then 2949e4f6584cSmrg exec AS_MESSAGE_FD>/dev/null 2950e4f6584cSmrgfi 2951e4f6584cSmrg_LTEOF 2952e4f6584cSmrg 2953e4f6584cSmrgcat >>"$CONFIG_LT" <<_LTEOF 2954e4f6584cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 2955e4f6584cSmrg_LTEOF 2956e4f6584cSmrg 2957e4f6584cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 2958e4f6584cSmrgAC_MSG_NOTICE([creating $ofile]) 2959e4f6584cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 2960e4f6584cSmrgAS_EXIT(0) 2961e4f6584cSmrg_LTEOF 2962e4f6584cSmrgchmod +x "$CONFIG_LT" 2963e4f6584cSmrg 2964e4f6584cSmrg# configure is writing to config.log, but config.lt does its own redirection, 2965e4f6584cSmrg# appending to config.log, which fails on DOS, as config.log is still kept 2966e4f6584cSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 2967e4f6584cSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 2968e4f6584cSmrgif test "$no_create" != yes; then 2969e4f6584cSmrg lt_cl_success=: 2970e4f6584cSmrg test "$silent" = yes && 2971e4f6584cSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 2972e4f6584cSmrg exec AS_MESSAGE_LOG_FD>/dev/null 2973e4f6584cSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 2974e4f6584cSmrg exec AS_MESSAGE_LOG_FD>>config.log 2975e4f6584cSmrg $lt_cl_success || AS_EXIT(1) 2976e4f6584cSmrgfi 2977e4f6584cSmrg])# LT_OUTPUT 2978e4f6584cSmrg 2979e4f6584cSmrg 2980e4f6584cSmrg# _LT_CONFIG(TAG) 2981e4f6584cSmrg# --------------- 2982e4f6584cSmrg# If TAG is the built-in tag, create an initial libtool script with a 2983e4f6584cSmrg# default configuration from the untagged config vars. Otherwise add code 2984e4f6584cSmrg# to config.status for appending the configuration named by TAG from the 2985e4f6584cSmrg# matching tagged config vars. 2986e4f6584cSmrgm4_defun([_LT_CONFIG], 2987e4f6584cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2988e4f6584cSmrg_LT_CONFIG_SAVE_COMMANDS([ 2989e4f6584cSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 2990e4f6584cSmrg m4_if(_LT_TAG, [C], [ 2991e4f6584cSmrg # See if we are running on zsh, and set the options which allow our 2992e4f6584cSmrg # commands through without removal of \ escapes. 2993e4f6584cSmrg if test -n "${ZSH_VERSION+set}" ; then 2994e4f6584cSmrg setopt NO_GLOB_SUBST 2995b698ba48Smrg fi 2996e4f6584cSmrg 2997e4f6584cSmrg cfgfile="${ofile}T" 2998e4f6584cSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 2999e4f6584cSmrg $RM "$cfgfile" 3000e4f6584cSmrg 3001e4f6584cSmrg cat <<_LT_EOF >> "$cfgfile" 3002e4f6584cSmrg#! $SHELL 3003e4f6584cSmrg 3004e4f6584cSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3005e4f6584cSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3006e4f6584cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3007e4f6584cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3008e4f6584cSmrg# 3009e4f6584cSmrg_LT_COPYING 3010e4f6584cSmrg_LT_LIBTOOL_TAGS 3011e4f6584cSmrg 3012e4f6584cSmrg# ### BEGIN LIBTOOL CONFIG 3013e4f6584cSmrg_LT_LIBTOOL_CONFIG_VARS 3014e4f6584cSmrg_LT_LIBTOOL_TAG_VARS 3015e4f6584cSmrg# ### END LIBTOOL CONFIG 3016e4f6584cSmrg 3017e4f6584cSmrg_LT_EOF 3018e4f6584cSmrg 3019e4f6584cSmrg case $host_os in 3020e4f6584cSmrg aix3*) 3021e4f6584cSmrg cat <<\_LT_EOF >> "$cfgfile" 3022e4f6584cSmrg# AIX sometimes has problems with the GCC collect2 program. For some 3023e4f6584cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3024e4f6584cSmrg# vanish in a puff of smoke. 3025e4f6584cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 3026e4f6584cSmrg COLLECT_NAMES= 3027e4f6584cSmrg export COLLECT_NAMES 3028e4f6584cSmrgfi 3029e4f6584cSmrg_LT_EOF 3030b698ba48Smrg ;; 3031e4f6584cSmrg esac 3032b698ba48Smrg 3033e4f6584cSmrg _LT_PROG_LTMAIN 3034b698ba48Smrg 3035e4f6584cSmrg # We use sed instead of cat because bash on DJGPP gets confused if 3036e4f6584cSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3037e4f6584cSmrg # text mode, it properly converts lines to CR/LF. This bash problem 3038e4f6584cSmrg # is reportedly fixed, but why not run on old versions too? 3039e4f6584cSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3040e4f6584cSmrg || (rm -f "$cfgfile"; exit 1) 3041b698ba48Smrg 3042e4f6584cSmrg _LT_PROG_XSI_SHELLFNS 3043b698ba48Smrg 3044e4f6584cSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3045e4f6584cSmrg || (rm -f "$cfgfile"; exit 1) 3046b698ba48Smrg 3047e4f6584cSmrg mv -f "$cfgfile" "$ofile" || 3048e4f6584cSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3049e4f6584cSmrg chmod +x "$ofile" 3050e4f6584cSmrg], 3051e4f6584cSmrg[cat <<_LT_EOF >> "$ofile" 3052b698ba48Smrg 3053e4f6584cSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3054e4f6584cSmrgdnl in a comment (ie after a #). 3055e4f6584cSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3056e4f6584cSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3057e4f6584cSmrg# ### END LIBTOOL TAG CONFIG: $1 3058e4f6584cSmrg_LT_EOF 3059e4f6584cSmrg])dnl /m4_if 3060e4f6584cSmrg], 3061e4f6584cSmrg[m4_if([$1], [], [ 3062e4f6584cSmrg PACKAGE='$PACKAGE' 3063e4f6584cSmrg VERSION='$VERSION' 3064e4f6584cSmrg TIMESTAMP='$TIMESTAMP' 3065e4f6584cSmrg RM='$RM' 3066e4f6584cSmrg ofile='$ofile'], []) 3067e4f6584cSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3068e4f6584cSmrg])# _LT_CONFIG 3069e4f6584cSmrg 3070e4f6584cSmrg 3071e4f6584cSmrg# LT_SUPPORTED_TAG(TAG) 3072e4f6584cSmrg# --------------------- 3073e4f6584cSmrg# Trace this macro to discover what tags are supported by the libtool 3074e4f6584cSmrg# --tag option, using: 3075e4f6584cSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3076e4f6584cSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3077e4f6584cSmrg 3078e4f6584cSmrg 3079e4f6584cSmrg# C support is built-in for now 3080e4f6584cSmrgm4_define([_LT_LANG_C_enabled], []) 3081e4f6584cSmrgm4_define([_LT_TAGS], []) 3082e4f6584cSmrg 3083e4f6584cSmrg 3084e4f6584cSmrg# LT_LANG(LANG) 3085e4f6584cSmrg# ------------- 3086e4f6584cSmrg# Enable libtool support for the given language if not already enabled. 3087e4f6584cSmrgAC_DEFUN([LT_LANG], 3088e4f6584cSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3089e4f6584cSmrgm4_case([$1], 3090e4f6584cSmrg [C], [_LT_LANG(C)], 3091e4f6584cSmrg [C++], [_LT_LANG(CXX)], 3092e4f6584cSmrg [Java], [_LT_LANG(GCJ)], 3093e4f6584cSmrg [Fortran 77], [_LT_LANG(F77)], 3094e4f6584cSmrg [Fortran], [_LT_LANG(FC)], 3095e4f6584cSmrg [Windows Resource], [_LT_LANG(RC)], 3096e4f6584cSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3097e4f6584cSmrg [_LT_LANG($1)], 3098e4f6584cSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3099e4f6584cSmrg])# LT_LANG 3100e4f6584cSmrg 3101e4f6584cSmrg 3102e4f6584cSmrg# _LT_LANG(LANGNAME) 3103e4f6584cSmrg# ------------------ 3104e4f6584cSmrgm4_defun([_LT_LANG], 3105e4f6584cSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3106e4f6584cSmrg [LT_SUPPORTED_TAG([$1])dnl 3107e4f6584cSmrg m4_append([_LT_TAGS], [$1 ])dnl 3108e4f6584cSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3109e4f6584cSmrg _LT_LANG_$1_CONFIG($1)])dnl 3110e4f6584cSmrg])# _LT_LANG 3111e4f6584cSmrg 3112e4f6584cSmrg 3113e4f6584cSmrg# _LT_LANG_DEFAULT_CONFIG 3114e4f6584cSmrg# ----------------------- 3115e4f6584cSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3116e4f6584cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3117e4f6584cSmrg [LT_LANG(CXX)], 3118e4f6584cSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3119e4f6584cSmrg 3120e4f6584cSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3121e4f6584cSmrg [LT_LANG(F77)], 3122e4f6584cSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3123e4f6584cSmrg 3124e4f6584cSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3125e4f6584cSmrg [LT_LANG(FC)], 3126e4f6584cSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3127e4f6584cSmrg 3128e4f6584cSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3129e4f6584cSmrgdnl pulling things in needlessly. 3130e4f6584cSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3131e4f6584cSmrg [LT_LANG(GCJ)], 3132e4f6584cSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3133e4f6584cSmrg [LT_LANG(GCJ)], 3134e4f6584cSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3135e4f6584cSmrg [LT_LANG(GCJ)], 3136e4f6584cSmrg [m4_ifdef([AC_PROG_GCJ], 3137e4f6584cSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3138e4f6584cSmrg m4_ifdef([A][M_PROG_GCJ], 3139e4f6584cSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3140e4f6584cSmrg m4_ifdef([LT_PROG_GCJ], 3141e4f6584cSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3142e4f6584cSmrg 3143e4f6584cSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3144e4f6584cSmrg [LT_LANG(RC)], 3145e4f6584cSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3146e4f6584cSmrg])# _LT_LANG_DEFAULT_CONFIG 3147e4f6584cSmrg 3148e4f6584cSmrg# Obsolete macros: 3149e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3150e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3151e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3152e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3153e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 3154e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3155e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3156e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3157e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3158e4f6584cSmrg 3159e4f6584cSmrg 3160e4f6584cSmrg# _LT_TAG_COMPILER 3161e4f6584cSmrg# ---------------- 3162e4f6584cSmrgm4_defun([_LT_TAG_COMPILER], 3163e4f6584cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3164e4f6584cSmrg 3165e4f6584cSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3166e4f6584cSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3167e4f6584cSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3168e4f6584cSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3169e4f6584cSmrg 3170e4f6584cSmrg# If no C compiler was specified, use CC. 3171e4f6584cSmrgLTCC=${LTCC-"$CC"} 3172e4f6584cSmrg 3173e4f6584cSmrg# If no C compiler flags were specified, use CFLAGS. 3174e4f6584cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3175e4f6584cSmrg 3176e4f6584cSmrg# Allow CC to be a program name with arguments. 3177e4f6584cSmrgcompiler=$CC 3178e4f6584cSmrg])# _LT_TAG_COMPILER 3179e4f6584cSmrg 3180e4f6584cSmrg 3181e4f6584cSmrg# _LT_COMPILER_BOILERPLATE 3182e4f6584cSmrg# ------------------------ 3183e4f6584cSmrg# Check for compiler boilerplate output or warnings with 3184e4f6584cSmrg# the simple compiler test code. 3185e4f6584cSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 3186e4f6584cSmrg[m4_require([_LT_DECL_SED])dnl 3187e4f6584cSmrgac_outfile=conftest.$ac_objext 3188e4f6584cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3189e4f6584cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3190e4f6584cSmrg_lt_compiler_boilerplate=`cat conftest.err` 3191e4f6584cSmrg$RM conftest* 3192e4f6584cSmrg])# _LT_COMPILER_BOILERPLATE 3193b698ba48Smrg 3194b698ba48Smrg 3195e4f6584cSmrg# _LT_LINKER_BOILERPLATE 3196e4f6584cSmrg# ---------------------- 3197e4f6584cSmrg# Check for linker boilerplate output or warnings with 3198e4f6584cSmrg# the simple link test code. 3199e4f6584cSmrgm4_defun([_LT_LINKER_BOILERPLATE], 3200e4f6584cSmrg[m4_require([_LT_DECL_SED])dnl 3201e4f6584cSmrgac_outfile=conftest.$ac_objext 3202e4f6584cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3203e4f6584cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3204e4f6584cSmrg_lt_linker_boilerplate=`cat conftest.err` 3205e4f6584cSmrg$RM -r conftest* 3206e4f6584cSmrg])# _LT_LINKER_BOILERPLATE 3207b698ba48Smrg 3208e4f6584cSmrg# _LT_REQUIRED_DARWIN_CHECKS 3209e4f6584cSmrg# ------------------------- 3210e4f6584cSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3211e4f6584cSmrg case $host_os in 3212e4f6584cSmrg rhapsody* | darwin*) 3213e4f6584cSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3214e4f6584cSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3215e4f6584cSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3216e4f6584cSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3217e4f6584cSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3218e4f6584cSmrg _LT_DECL([], [DSYMUTIL], [1], 3219e4f6584cSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3220e4f6584cSmrg _LT_DECL([], [NMEDIT], [1], 3221e4f6584cSmrg [Tool to change global to local symbols on Mac OS X]) 3222e4f6584cSmrg _LT_DECL([], [LIPO], [1], 3223e4f6584cSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 3224e4f6584cSmrg _LT_DECL([], [OTOOL], [1], 3225e4f6584cSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3226e4f6584cSmrg _LT_DECL([], [OTOOL64], [1], 3227e4f6584cSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3228b698ba48Smrg 3229e4f6584cSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3230e4f6584cSmrg [lt_cv_apple_cc_single_mod=no 3231e4f6584cSmrg if test -z "${LT_MULTI_MODULE}"; then 3232e4f6584cSmrg # By default we will add the -single_module flag. You can override 3233e4f6584cSmrg # by either setting the environment variable LT_MULTI_MODULE 3234e4f6584cSmrg # non-empty at configure time, or by adding -multi_module to the 3235e4f6584cSmrg # link flags. 3236e4f6584cSmrg rm -rf libconftest.dylib* 3237e4f6584cSmrg echo "int foo(void){return 1;}" > conftest.c 3238e4f6584cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3239e4f6584cSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3240e4f6584cSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3241e4f6584cSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3242e4f6584cSmrg _lt_result=$? 3243e4f6584cSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3244e4f6584cSmrg lt_cv_apple_cc_single_mod=yes 3245b698ba48Smrg else 3246e4f6584cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3247b698ba48Smrg fi 3248e4f6584cSmrg rm -rf libconftest.dylib* 3249e4f6584cSmrg rm -f conftest.* 3250e4f6584cSmrg fi]) 3251e4f6584cSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3252e4f6584cSmrg [lt_cv_ld_exported_symbols_list], 3253e4f6584cSmrg [lt_cv_ld_exported_symbols_list=no 3254e4f6584cSmrg save_LDFLAGS=$LDFLAGS 3255e4f6584cSmrg echo "_main" > conftest.sym 3256e4f6584cSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3257e4f6584cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3258e4f6584cSmrg [lt_cv_ld_exported_symbols_list=yes], 3259e4f6584cSmrg [lt_cv_ld_exported_symbols_list=no]) 3260e4f6584cSmrg LDFLAGS="$save_LDFLAGS" 3261e4f6584cSmrg ]) 3262e4f6584cSmrg case $host_os in 3263e4f6584cSmrg rhapsody* | darwin1.[[012]]) 3264e4f6584cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3265e4f6584cSmrg darwin1.*) 3266e4f6584cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3267e4f6584cSmrg darwin*) # darwin 5.x on 3268e4f6584cSmrg # if running on 10.5 or later, the deployment target defaults 3269e4f6584cSmrg # to the OS version, if on x86, and 10.4, the deployment 3270e4f6584cSmrg # target defaults to 10.4. Don't you love it? 3271e4f6584cSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3272e4f6584cSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3273e4f6584cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3274e4f6584cSmrg 10.[[012]]*) 3275e4f6584cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3276e4f6584cSmrg 10.*) 3277e4f6584cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3278e4f6584cSmrg esac 3279b698ba48Smrg ;; 3280e4f6584cSmrg esac 3281e4f6584cSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3282e4f6584cSmrg _lt_dar_single_mod='$single_module' 3283e4f6584cSmrg fi 3284e4f6584cSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3285e4f6584cSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3286e4f6584cSmrg else 3287e4f6584cSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3288e4f6584cSmrg fi 3289e4f6584cSmrg if test "$DSYMUTIL" != ":"; then 3290e4f6584cSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3291e4f6584cSmrg else 3292e4f6584cSmrg _lt_dsymutil= 3293e4f6584cSmrg fi 3294b698ba48Smrg ;; 3295e4f6584cSmrg esac 3296e4f6584cSmrg]) 3297b698ba48Smrg 329809885543Smrg 3299e4f6584cSmrg# _LT_DARWIN_LINKER_FEATURES 3300e4f6584cSmrg# -------------------------- 3301e4f6584cSmrg# Checks for linker and compiler features on darwin 3302e4f6584cSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3303e4f6584cSmrg[ 3304e4f6584cSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3305e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3306e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 3307e4f6584cSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3308e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3309e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3310e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3311e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3312e4f6584cSmrg case $cc_basename in 3313e4f6584cSmrg ifort*) _lt_dar_can_shared=yes ;; 3314e4f6584cSmrg *) _lt_dar_can_shared=$GCC ;; 3315e4f6584cSmrg esac 3316e4f6584cSmrg if test "$_lt_dar_can_shared" = "yes"; then 3317e4f6584cSmrg output_verbose_link_cmd=echo 3318e4f6584cSmrg _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}" 3319e4f6584cSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3320e4f6584cSmrg _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}" 3321e4f6584cSmrg _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}" 3322e4f6584cSmrg m4_if([$1], [CXX], 3323e4f6584cSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3324e4f6584cSmrg _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}" 3325e4f6584cSmrg _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}" 3326e4f6584cSmrg fi 3327e4f6584cSmrg],[]) 3328e4f6584cSmrg else 3329e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 3330e4f6584cSmrg fi 3331e4f6584cSmrg]) 333209885543Smrg 3333e4f6584cSmrg# _LT_SYS_MODULE_PATH_AIX 3334e4f6584cSmrg# ----------------------- 3335e4f6584cSmrg# Links a minimal program and checks the executable 3336e4f6584cSmrg# for the system default hardcoded library path. In most cases, 3337e4f6584cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 3338e4f6584cSmrg# the location of the communication and MPI libs are included too. 3339e4f6584cSmrg# If we don't find anything, use the default library path according 3340e4f6584cSmrg# to the aix ld manual. 3341e4f6584cSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3342e4f6584cSmrg[m4_require([_LT_DECL_SED])dnl 3343e4f6584cSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3344e4f6584cSmrglt_aix_libpath_sed=' 3345e4f6584cSmrg /Import File Strings/,/^$/ { 3346e4f6584cSmrg /^0/ { 3347e4f6584cSmrg s/^0 *\(.*\)$/\1/ 3348e4f6584cSmrg p 3349e4f6584cSmrg } 3350e4f6584cSmrg }' 3351e4f6584cSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3352e4f6584cSmrg# Check for a 64-bit object if we didn't find anything. 3353e4f6584cSmrgif test -z "$aix_libpath"; then 3354e4f6584cSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3355e4f6584cSmrgfi],[]) 3356e4f6584cSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3357e4f6584cSmrg])# _LT_SYS_MODULE_PATH_AIX 335809885543Smrg 335909885543Smrg 3360e4f6584cSmrg# _LT_SHELL_INIT(ARG) 3361e4f6584cSmrg# ------------------- 3362e4f6584cSmrgm4_define([_LT_SHELL_INIT], 3363e4f6584cSmrg[ifdef([AC_DIVERSION_NOTICE], 3364e4f6584cSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 3365e4f6584cSmrg [AC_DIVERT_PUSH(NOTICE)]) 3366e4f6584cSmrg$1 3367e4f6584cSmrgAC_DIVERT_POP 3368e4f6584cSmrg])# _LT_SHELL_INIT 33697104f784Smrg 337009885543Smrg 3371e4f6584cSmrg# _LT_PROG_ECHO_BACKSLASH 3372e4f6584cSmrg# ----------------------- 3373e4f6584cSmrg# Add some code to the start of the generated configure script which 3374e4f6584cSmrg# will find an echo command which doesn't interpret backslashes. 3375e4f6584cSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3376e4f6584cSmrg[_LT_SHELL_INIT([ 3377e4f6584cSmrg# Check that we are running under the correct shell. 3378e4f6584cSmrgSHELL=${CONFIG_SHELL-/bin/sh} 33797104f784Smrg 3380e4f6584cSmrgcase X$lt_ECHO in 3381e4f6584cSmrgX*--fallback-echo) 3382e4f6584cSmrg # Remove one level of quotation (which was required for Make). 3383e4f6584cSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 3384e4f6584cSmrg ;; 3385e4f6584cSmrgesac 33867104f784Smrg 3387e4f6584cSmrgECHO=${lt_ECHO-echo} 3388e4f6584cSmrgif test "X[$]1" = X--no-reexec; then 3389e4f6584cSmrg # Discard the --no-reexec flag, and continue. 3390e4f6584cSmrg shift 3391e4f6584cSmrgelif test "X[$]1" = X--fallback-echo; then 3392e4f6584cSmrg # Avoid inline document here, it may be left over 3393e4f6584cSmrg : 3394e4f6584cSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 3395e4f6584cSmrg # Yippee, $ECHO works! 3396e4f6584cSmrg : 3397e4f6584cSmrgelse 3398e4f6584cSmrg # Restart under the correct shell. 3399e4f6584cSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 3400e4f6584cSmrgfi 340109885543Smrg 3402e4f6584cSmrgif test "X[$]1" = X--fallback-echo; then 3403e4f6584cSmrg # used as fallback echo 3404e4f6584cSmrg shift 3405e4f6584cSmrg cat <<_LT_EOF 3406e4f6584cSmrg[$]* 3407e4f6584cSmrg_LT_EOF 3408e4f6584cSmrg exit 0 3409e4f6584cSmrgfi 341009885543Smrg 3411e4f6584cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3412e4f6584cSmrg# if CDPATH is set. 3413e4f6584cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 341409885543Smrg 3415e4f6584cSmrgif test -z "$lt_ECHO"; then 3416e4f6584cSmrg if test "X${echo_test_string+set}" != Xset; then 3417e4f6584cSmrg # find a string as large as possible, as long as the shell can cope with it 3418e4f6584cSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 3419e4f6584cSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 3420e4f6584cSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 3421e4f6584cSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 3422e4f6584cSmrg then 3423e4f6584cSmrg break 3424e4f6584cSmrg fi 3425e4f6584cSmrg done 3426e4f6584cSmrg fi 342709885543Smrg 3428e4f6584cSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3429e4f6584cSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3430e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3431e4f6584cSmrg : 3432e4f6584cSmrg else 3433e4f6584cSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 3434e4f6584cSmrg # backslashes. This makes it impossible to quote backslashes using 3435e4f6584cSmrg # echo "$something" | sed 's/\\/\\\\/g' 3436e4f6584cSmrg # 3437e4f6584cSmrg # So, first we look for a working echo in the user's PATH. 343809885543Smrg 3439e4f6584cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3440e4f6584cSmrg for dir in $PATH /usr/ucb; do 3441e4f6584cSmrg IFS="$lt_save_ifs" 3442e4f6584cSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 3443e4f6584cSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 3444e4f6584cSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 3445e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3446e4f6584cSmrg ECHO="$dir/echo" 3447e4f6584cSmrg break 3448e4f6584cSmrg fi 3449e4f6584cSmrg done 3450e4f6584cSmrg IFS="$lt_save_ifs" 345109885543Smrg 3452e4f6584cSmrg if test "X$ECHO" = Xecho; then 3453e4f6584cSmrg # We didn't find a better echo, so look for alternatives. 3454e4f6584cSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 3455e4f6584cSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 3456e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3457e4f6584cSmrg # This shell has a builtin print -r that does the trick. 3458e4f6584cSmrg ECHO='print -r' 3459e4f6584cSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 3460e4f6584cSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 3461e4f6584cSmrg # If we have ksh, try running configure again with it. 3462e4f6584cSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 3463e4f6584cSmrg export ORIGINAL_CONFIG_SHELL 3464e4f6584cSmrg CONFIG_SHELL=/bin/ksh 3465e4f6584cSmrg export CONFIG_SHELL 3466e4f6584cSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 3467e4f6584cSmrg else 3468e4f6584cSmrg # Try using printf. 3469e4f6584cSmrg ECHO='printf %s\n' 3470e4f6584cSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3471e4f6584cSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3472e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3473e4f6584cSmrg # Cool, printf works 3474e4f6584cSmrg : 3475e4f6584cSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3476e4f6584cSmrg test "X$echo_testing_string" = 'X\t' && 3477e4f6584cSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3478e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3479e4f6584cSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 3480e4f6584cSmrg export CONFIG_SHELL 3481e4f6584cSmrg SHELL="$CONFIG_SHELL" 3482e4f6584cSmrg export SHELL 3483e4f6584cSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3484e4f6584cSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3485e4f6584cSmrg test "X$echo_testing_string" = 'X\t' && 3486e4f6584cSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3487e4f6584cSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 3488e4f6584cSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3489e4f6584cSmrg else 3490e4f6584cSmrg # maybe with a smaller string... 3491e4f6584cSmrg prev=: 3492b698ba48Smrg 3493e4f6584cSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 3494e4f6584cSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 3495e4f6584cSmrg then 3496e4f6584cSmrg break 3497e4f6584cSmrg fi 3498e4f6584cSmrg prev="$cmd" 3499e4f6584cSmrg done 350009885543Smrg 3501e4f6584cSmrg if test "$prev" != 'sed 50q "[$]0"'; then 3502e4f6584cSmrg echo_test_string=`eval $prev` 3503e4f6584cSmrg export echo_test_string 3504e4f6584cSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 3505e4f6584cSmrg else 3506e4f6584cSmrg # Oops. We lost completely, so just stick with echo. 3507e4f6584cSmrg ECHO=echo 3508e4f6584cSmrg fi 3509e4f6584cSmrg fi 3510e4f6584cSmrg fi 3511e4f6584cSmrg fi 3512e4f6584cSmrg fi 3513e4f6584cSmrgfi 351409885543Smrg 3515e4f6584cSmrg# Copy echo and quote the copy suitably for passing to libtool from 3516e4f6584cSmrg# the Makefile, instead of quoting the original, which is used later. 3517e4f6584cSmrglt_ECHO=$ECHO 3518e4f6584cSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 3519e4f6584cSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 35202ec8c4b4Smrgfi 352109885543Smrg 3522e4f6584cSmrgAC_SUBST(lt_ECHO) 3523e4f6584cSmrg]) 3524e4f6584cSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3525e4f6584cSmrg_LT_DECL([], [ECHO], [1], 3526e4f6584cSmrg [An echo program that does not interpret backslashes]) 3527e4f6584cSmrg])# _LT_PROG_ECHO_BACKSLASH 352809885543Smrg 352909885543Smrg 3530e4f6584cSmrg# _LT_ENABLE_LOCK 3531e4f6584cSmrg# --------------- 3532e4f6584cSmrgm4_defun([_LT_ENABLE_LOCK], 3533e4f6584cSmrg[AC_ARG_ENABLE([libtool-lock], 3534e4f6584cSmrg [AS_HELP_STRING([--disable-libtool-lock], 3535e4f6584cSmrg [avoid locking (might break parallel builds)])]) 3536e4f6584cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3537e4f6584cSmrg 3538e4f6584cSmrg# Some flags need to be propagated to the compiler or linker for good 3539e4f6584cSmrg# libtool support. 3540e4f6584cSmrgcase $host in 3541e4f6584cSmrgia64-*-hpux*) 3542e4f6584cSmrg # Find out which ABI we are using. 3543e4f6584cSmrg echo 'int i;' > conftest.$ac_ext 3544e4f6584cSmrg if AC_TRY_EVAL(ac_compile); then 3545e4f6584cSmrg case `/usr/bin/file conftest.$ac_objext` in 3546e4f6584cSmrg *ELF-32*) 3547e4f6584cSmrg HPUX_IA64_MODE="32" 3548e4f6584cSmrg ;; 3549e4f6584cSmrg *ELF-64*) 3550e4f6584cSmrg HPUX_IA64_MODE="64" 3551e4f6584cSmrg ;; 3552e4f6584cSmrg esac 3553e4f6584cSmrg fi 3554e4f6584cSmrg rm -rf conftest* 3555e4f6584cSmrg ;; 3556e4f6584cSmrg*-*-irix6*) 3557e4f6584cSmrg # Find out which ABI we are using. 3558e4f6584cSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 3559e4f6584cSmrg if AC_TRY_EVAL(ac_compile); then 3560e4f6584cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 3561e4f6584cSmrg case `/usr/bin/file conftest.$ac_objext` in 3562e4f6584cSmrg *32-bit*) 3563e4f6584cSmrg LD="${LD-ld} -melf32bsmip" 3564e4f6584cSmrg ;; 3565e4f6584cSmrg *N32*) 3566e4f6584cSmrg LD="${LD-ld} -melf32bmipn32" 3567e4f6584cSmrg ;; 3568e4f6584cSmrg *64-bit*) 3569e4f6584cSmrg LD="${LD-ld} -melf64bmip" 3570e4f6584cSmrg ;; 3571e4f6584cSmrg esac 3572e4f6584cSmrg else 3573e4f6584cSmrg case `/usr/bin/file conftest.$ac_objext` in 3574e4f6584cSmrg *32-bit*) 3575e4f6584cSmrg LD="${LD-ld} -32" 3576e4f6584cSmrg ;; 3577e4f6584cSmrg *N32*) 3578e4f6584cSmrg LD="${LD-ld} -n32" 3579e4f6584cSmrg ;; 3580e4f6584cSmrg *64-bit*) 3581e4f6584cSmrg LD="${LD-ld} -64" 3582e4f6584cSmrg ;; 3583e4f6584cSmrg esac 3584e4f6584cSmrg fi 3585e4f6584cSmrg fi 3586e4f6584cSmrg rm -rf conftest* 3587b698ba48Smrg ;; 3588b698ba48Smrg 3589e4f6584cSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3590e4f6584cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3591e4f6584cSmrg # Find out which ABI we are using. 3592e4f6584cSmrg echo 'int i;' > conftest.$ac_ext 3593e4f6584cSmrg if AC_TRY_EVAL(ac_compile); then 3594e4f6584cSmrg case `/usr/bin/file conftest.o` in 3595e4f6584cSmrg *32-bit*) 3596e4f6584cSmrg case $host in 3597e4f6584cSmrg x86_64-*kfreebsd*-gnu) 3598e4f6584cSmrg LD="${LD-ld} -m elf_i386_fbsd" 3599e4f6584cSmrg ;; 3600e4f6584cSmrg x86_64-*linux*) 3601e4f6584cSmrg LD="${LD-ld} -m elf_i386" 3602e4f6584cSmrg ;; 3603e4f6584cSmrg ppc64-*linux*|powerpc64-*linux*) 3604e4f6584cSmrg LD="${LD-ld} -m elf32ppclinux" 3605e4f6584cSmrg ;; 3606e4f6584cSmrg s390x-*linux*) 3607e4f6584cSmrg LD="${LD-ld} -m elf_s390" 3608e4f6584cSmrg ;; 3609e4f6584cSmrg sparc64-*linux*) 3610e4f6584cSmrg LD="${LD-ld} -m elf32_sparc" 3611e4f6584cSmrg ;; 3612e4f6584cSmrg esac 3613e4f6584cSmrg ;; 3614e4f6584cSmrg *64-bit*) 3615e4f6584cSmrg case $host in 3616e4f6584cSmrg x86_64-*kfreebsd*-gnu) 3617e4f6584cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 3618e4f6584cSmrg ;; 3619e4f6584cSmrg x86_64-*linux*) 3620e4f6584cSmrg LD="${LD-ld} -m elf_x86_64" 3621e4f6584cSmrg ;; 3622e4f6584cSmrg ppc*-*linux*|powerpc*-*linux*) 3623e4f6584cSmrg LD="${LD-ld} -m elf64ppc" 3624e4f6584cSmrg ;; 3625e4f6584cSmrg s390*-*linux*|s390*-*tpf*) 3626e4f6584cSmrg LD="${LD-ld} -m elf64_s390" 3627e4f6584cSmrg ;; 3628e4f6584cSmrg sparc*-*linux*) 3629e4f6584cSmrg LD="${LD-ld} -m elf64_sparc" 3630e4f6584cSmrg ;; 3631e4f6584cSmrg esac 3632e4f6584cSmrg ;; 3633b698ba48Smrg esac 3634e4f6584cSmrg fi 3635e4f6584cSmrg rm -rf conftest* 3636b698ba48Smrg ;; 363709885543Smrg 3638e4f6584cSmrg*-*-sco3.2v5*) 3639e4f6584cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3640e4f6584cSmrg SAVE_CFLAGS="$CFLAGS" 3641e4f6584cSmrg CFLAGS="$CFLAGS -belf" 3642e4f6584cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3643e4f6584cSmrg [AC_LANG_PUSH(C) 3644e4f6584cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3645e4f6584cSmrg AC_LANG_POP]) 3646e4f6584cSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3647e4f6584cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3648e4f6584cSmrg CFLAGS="$SAVE_CFLAGS" 3649e4f6584cSmrg fi 3650e4f6584cSmrg ;; 3651e4f6584cSmrgsparc*-*solaris*) 3652e4f6584cSmrg # Find out which ABI we are using. 3653e4f6584cSmrg echo 'int i;' > conftest.$ac_ext 3654e4f6584cSmrg if AC_TRY_EVAL(ac_compile); then 3655e4f6584cSmrg case `/usr/bin/file conftest.o` in 3656e4f6584cSmrg *64-bit*) 3657e4f6584cSmrg case $lt_cv_prog_gnu_ld in 3658e4f6584cSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 3659e4f6584cSmrg *) 3660e4f6584cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3661e4f6584cSmrg LD="${LD-ld} -64" 3662e4f6584cSmrg fi 3663e4f6584cSmrg ;; 3664e4f6584cSmrg esac 3665b698ba48Smrg ;; 3666b698ba48Smrg esac 3667e4f6584cSmrg fi 3668e4f6584cSmrg rm -rf conftest* 3669b698ba48Smrg ;; 3670b698ba48Smrgesac 367109885543Smrg 3672e4f6584cSmrgneed_locks="$enable_libtool_lock" 3673e4f6584cSmrg])# _LT_ENABLE_LOCK 367409885543Smrg 367509885543Smrg 3676e4f6584cSmrg# _LT_CMD_OLD_ARCHIVE 3677e4f6584cSmrg# ------------------- 3678e4f6584cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3679e4f6584cSmrg[AC_CHECK_TOOL(AR, ar, false) 3680e4f6584cSmrgtest -z "$AR" && AR=ar 3681e4f6584cSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3682e4f6584cSmrg_LT_DECL([], [AR], [1], [The archiver]) 3683e4f6584cSmrg_LT_DECL([], [AR_FLAGS], [1]) 368409885543Smrg 3685e4f6584cSmrgAC_CHECK_TOOL(STRIP, strip, :) 3686e4f6584cSmrgtest -z "$STRIP" && STRIP=: 3687e4f6584cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 368809885543Smrg 3689e4f6584cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3690e4f6584cSmrgtest -z "$RANLIB" && RANLIB=: 3691e4f6584cSmrg_LT_DECL([], [RANLIB], [1], 3692e4f6584cSmrg [Commands used to install an old-style archive]) 369309885543Smrg 3694e4f6584cSmrg# Determine commands to create old-style static archives. 3695e4f6584cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3696e4f6584cSmrgold_postinstall_cmds='chmod 644 $oldlib' 3697e4f6584cSmrgold_postuninstall_cmds= 369809885543Smrg 3699e4f6584cSmrgif test -n "$RANLIB"; then 3700e4f6584cSmrg case $host_os in 3701e4f6584cSmrg openbsd*) 3702e4f6584cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3703e4f6584cSmrg ;; 3704e4f6584cSmrg *) 3705e4f6584cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3706e4f6584cSmrg ;; 3707e4f6584cSmrg esac 3708e4f6584cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3709e4f6584cSmrgfi 3710e4f6584cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 3711e4f6584cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3712e4f6584cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 3713e4f6584cSmrg [Commands used to build an old-style archive]) 3714e4f6584cSmrg])# _LT_CMD_OLD_ARCHIVE 371509885543Smrg 371609885543Smrg 3717e4f6584cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3718e4f6584cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3719e4f6584cSmrg# ---------------------------------------------------------------- 3720e4f6584cSmrg# Check whether the given compiler option works 3721e4f6584cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 3722e4f6584cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3723e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 3724e4f6584cSmrgAC_CACHE_CHECK([$1], [$2], 3725e4f6584cSmrg [$2=no 3726e4f6584cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3727e4f6584cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3728e4f6584cSmrg lt_compiler_flag="$3" 3729e4f6584cSmrg # Insert the option either (1) after the last *FLAGS variable, or 3730e4f6584cSmrg # (2) before a word containing "conftest.", or (3) at the end. 3731e4f6584cSmrg # Note that $ac_compile itself does not contain backslashes and begins 3732e4f6584cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3733e4f6584cSmrg # The option is referenced via a variable to avoid confusing sed. 3734e4f6584cSmrg lt_compile=`echo "$ac_compile" | $SED \ 3735e4f6584cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3736e4f6584cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3737e4f6584cSmrg -e 's:$: $lt_compiler_flag:'` 3738e4f6584cSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3739e4f6584cSmrg (eval "$lt_compile" 2>conftest.err) 3740e4f6584cSmrg ac_status=$? 3741e4f6584cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3742e4f6584cSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3743e4f6584cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 3744e4f6584cSmrg # The compiler can only warn and ignore the option if not recognized 3745e4f6584cSmrg # So say no if there are warnings other than the usual output. 3746e4f6584cSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 3747e4f6584cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3748e4f6584cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3749e4f6584cSmrg $2=yes 3750e4f6584cSmrg fi 3751e4f6584cSmrg fi 3752e4f6584cSmrg $RM conftest* 3753e4f6584cSmrg]) 375409885543Smrg 3755e4f6584cSmrgif test x"[$]$2" = xyes; then 3756e4f6584cSmrg m4_if([$5], , :, [$5]) 3757e4f6584cSmrgelse 3758e4f6584cSmrg m4_if([$6], , :, [$6]) 3759e4f6584cSmrgfi 3760e4f6584cSmrg])# _LT_COMPILER_OPTION 376109885543Smrg 3762e4f6584cSmrg# Old name: 3763e4f6584cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3764e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 3765e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 376609885543Smrg 376709885543Smrg 3768e4f6584cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3769e4f6584cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3770e4f6584cSmrg# ---------------------------------------------------- 3771e4f6584cSmrg# Check whether the given linker option works 3772e4f6584cSmrgAC_DEFUN([_LT_LINKER_OPTION], 3773e4f6584cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3774e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 3775e4f6584cSmrgAC_CACHE_CHECK([$1], [$2], 3776e4f6584cSmrg [$2=no 3777e4f6584cSmrg save_LDFLAGS="$LDFLAGS" 3778e4f6584cSmrg LDFLAGS="$LDFLAGS $3" 3779e4f6584cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 3780e4f6584cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3781e4f6584cSmrg # The linker can only warn and ignore the option if not recognized 3782e4f6584cSmrg # So say no if there are warnings 3783e4f6584cSmrg if test -s conftest.err; then 3784e4f6584cSmrg # Append any errors to the config.log. 3785e4f6584cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3786e4f6584cSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 3787e4f6584cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3788e4f6584cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 3789e4f6584cSmrg $2=yes 3790e4f6584cSmrg fi 3791e4f6584cSmrg else 3792e4f6584cSmrg $2=yes 3793e4f6584cSmrg fi 3794e4f6584cSmrg fi 3795e4f6584cSmrg $RM -r conftest* 3796e4f6584cSmrg LDFLAGS="$save_LDFLAGS" 3797e4f6584cSmrg]) 379809885543Smrg 3799e4f6584cSmrgif test x"[$]$2" = xyes; then 3800e4f6584cSmrg m4_if([$4], , :, [$4]) 3801e4f6584cSmrgelse 3802e4f6584cSmrg m4_if([$5], , :, [$5]) 3803e4f6584cSmrgfi 3804e4f6584cSmrg])# _LT_LINKER_OPTION 380509885543Smrg 3806e4f6584cSmrg# Old name: 3807e4f6584cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3808e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 3809e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 381009885543Smrg 381109885543Smrg 3812e4f6584cSmrg# LT_CMD_MAX_LEN 3813e4f6584cSmrg#--------------- 3814e4f6584cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 3815e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3816e4f6584cSmrg# find the maximum length of command line arguments 3817e4f6584cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 3818e4f6584cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3819e4f6584cSmrg i=0 3820e4f6584cSmrg teststring="ABCD" 382109885543Smrg 3822e4f6584cSmrg case $build_os in 3823e4f6584cSmrg msdosdjgpp*) 3824e4f6584cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 3825e4f6584cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 3826e4f6584cSmrg # during glob expansion). Even if it were fixed, the result of this 3827e4f6584cSmrg # check would be larger than it should be. 3828e4f6584cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 3829e4f6584cSmrg ;; 383009885543Smrg 3831e4f6584cSmrg gnu*) 3832e4f6584cSmrg # Under GNU Hurd, this test is not required because there is 3833e4f6584cSmrg # no limit to the length of command line arguments. 3834e4f6584cSmrg # Libtool will interpret -1 as no limit whatsoever 3835e4f6584cSmrg lt_cv_sys_max_cmd_len=-1; 3836e4f6584cSmrg ;; 383709885543Smrg 3838e4f6584cSmrg cygwin* | mingw* | cegcc*) 3839e4f6584cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 3840e4f6584cSmrg # about 5 minutes as the teststring grows exponentially. 3841e4f6584cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 3842e4f6584cSmrg # you end up with a "frozen" computer, even though with patience 3843e4f6584cSmrg # the test eventually succeeds (with a max line length of 256k). 3844e4f6584cSmrg # Instead, let's just punt: use the minimum linelength reported by 3845e4f6584cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 3846e4f6584cSmrg lt_cv_sys_max_cmd_len=8192; 3847e4f6584cSmrg ;; 38482ec8c4b4Smrg 3849e4f6584cSmrg amigaos*) 3850e4f6584cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 3851e4f6584cSmrg # So we just punt and use a minimum line length of 8192. 3852e4f6584cSmrg lt_cv_sys_max_cmd_len=8192; 3853e4f6584cSmrg ;; 385409885543Smrg 3855e4f6584cSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 3856e4f6584cSmrg # This has been around since 386BSD, at least. Likely further. 3857e4f6584cSmrg if test -x /sbin/sysctl; then 3858e4f6584cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 3859e4f6584cSmrg elif test -x /usr/sbin/sysctl; then 3860e4f6584cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 3861e4f6584cSmrg else 3862e4f6584cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 3863e4f6584cSmrg fi 3864e4f6584cSmrg # And add a safety zone 3865e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3866e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3867e4f6584cSmrg ;; 386809885543Smrg 3869e4f6584cSmrg interix*) 3870e4f6584cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 3871e4f6584cSmrg lt_cv_sys_max_cmd_len=196608 3872e4f6584cSmrg ;; 387309885543Smrg 3874e4f6584cSmrg osf*) 3875e4f6584cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 3876e4f6584cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 3877e4f6584cSmrg # nice to cause kernel panics so lets avoid the loop below. 3878e4f6584cSmrg # First set a reasonable default. 3879e4f6584cSmrg lt_cv_sys_max_cmd_len=16384 3880e4f6584cSmrg # 3881e4f6584cSmrg if test -x /sbin/sysconfig; then 3882e4f6584cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 3883e4f6584cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 3884e4f6584cSmrg esac 3885e4f6584cSmrg fi 3886e4f6584cSmrg ;; 3887e4f6584cSmrg sco3.2v5*) 3888e4f6584cSmrg lt_cv_sys_max_cmd_len=102400 3889e4f6584cSmrg ;; 3890e4f6584cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 3891e4f6584cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 3892e4f6584cSmrg if test -n "$kargmax"; then 3893e4f6584cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 3894e4f6584cSmrg else 3895e4f6584cSmrg lt_cv_sys_max_cmd_len=32768 3896e4f6584cSmrg fi 3897e4f6584cSmrg ;; 3898e4f6584cSmrg *) 3899e4f6584cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 3900e4f6584cSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 3901e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3902e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3903e4f6584cSmrg else 3904e4f6584cSmrg # Make teststring a little bigger before we do anything with it. 3905e4f6584cSmrg # a 1K string should be a reasonable start. 3906e4f6584cSmrg for i in 1 2 3 4 5 6 7 8 ; do 3907e4f6584cSmrg teststring=$teststring$teststring 3908e4f6584cSmrg done 3909e4f6584cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 3910e4f6584cSmrg # If test is not a shell built-in, we'll probably end up computing a 3911e4f6584cSmrg # maximum length that is only half of the actual maximum length, but 3912e4f6584cSmrg # we can't tell. 3913e4f6584cSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 3914e4f6584cSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 3915e4f6584cSmrg test $i != 17 # 1/2 MB should be enough 3916e4f6584cSmrg do 3917e4f6584cSmrg i=`expr $i + 1` 3918e4f6584cSmrg teststring=$teststring$teststring 3919e4f6584cSmrg done 3920e4f6584cSmrg # Only check the string length outside the loop. 3921e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 3922e4f6584cSmrg teststring= 3923e4f6584cSmrg # Add a significant safety factor because C++ compilers can tack on 3924e4f6584cSmrg # massive amounts of additional arguments before passing them to the 3925e4f6584cSmrg # linker. It appears as though 1/2 is a usable value. 3926e4f6584cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 3927e4f6584cSmrg fi 3928e4f6584cSmrg ;; 3929e4f6584cSmrg esac 3930e4f6584cSmrg]) 3931e4f6584cSmrgif test -n $lt_cv_sys_max_cmd_len ; then 3932e4f6584cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 3933e4f6584cSmrgelse 3934e4f6584cSmrg AC_MSG_RESULT(none) 3935e4f6584cSmrgfi 3936e4f6584cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 3937e4f6584cSmrg_LT_DECL([], [max_cmd_len], [0], 3938e4f6584cSmrg [What is the maximum length of a command?]) 3939e4f6584cSmrg])# LT_CMD_MAX_LEN 394009885543Smrg 3941e4f6584cSmrg# Old name: 3942e4f6584cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 3943e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 3944e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 394509885543Smrg 394609885543Smrg 3947e4f6584cSmrg# _LT_HEADER_DLFCN 3948e4f6584cSmrg# ---------------- 3949e4f6584cSmrgm4_defun([_LT_HEADER_DLFCN], 3950e4f6584cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 3951e4f6584cSmrg])# _LT_HEADER_DLFCN 395209885543Smrg 395309885543Smrg 3954e4f6584cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 3955e4f6584cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 3956e4f6584cSmrg# ---------------------------------------------------------------- 3957e4f6584cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 3958e4f6584cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 3959e4f6584cSmrgif test "$cross_compiling" = yes; then : 3960e4f6584cSmrg [$4] 3961e4f6584cSmrgelse 3962e4f6584cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 3963e4f6584cSmrg lt_status=$lt_dlunknown 3964e4f6584cSmrg cat > conftest.$ac_ext <<_LT_EOF 3965e4f6584cSmrg[#line __oline__ "configure" 3966e4f6584cSmrg#include "confdefs.h" 396709885543Smrg 3968e4f6584cSmrg#if HAVE_DLFCN_H 3969e4f6584cSmrg#include <dlfcn.h> 3970e4f6584cSmrg#endif 397109885543Smrg 3972e4f6584cSmrg#include <stdio.h> 397309885543Smrg 3974e4f6584cSmrg#ifdef RTLD_GLOBAL 3975e4f6584cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 3976e4f6584cSmrg#else 3977e4f6584cSmrg# ifdef DL_GLOBAL 3978e4f6584cSmrg# define LT_DLGLOBAL DL_GLOBAL 3979e4f6584cSmrg# else 3980e4f6584cSmrg# define LT_DLGLOBAL 0 3981e4f6584cSmrg# endif 3982e4f6584cSmrg#endif 398309885543Smrg 3984e4f6584cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 3985e4f6584cSmrg find out it does not work in some platform. */ 3986e4f6584cSmrg#ifndef LT_DLLAZY_OR_NOW 3987e4f6584cSmrg# ifdef RTLD_LAZY 3988e4f6584cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 3989e4f6584cSmrg# else 3990e4f6584cSmrg# ifdef DL_LAZY 3991e4f6584cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 3992e4f6584cSmrg# else 3993e4f6584cSmrg# ifdef RTLD_NOW 3994e4f6584cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 3995e4f6584cSmrg# else 3996e4f6584cSmrg# ifdef DL_NOW 3997e4f6584cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 3998e4f6584cSmrg# else 3999e4f6584cSmrg# define LT_DLLAZY_OR_NOW 0 4000e4f6584cSmrg# endif 4001e4f6584cSmrg# endif 4002e4f6584cSmrg# endif 4003e4f6584cSmrg# endif 4004e4f6584cSmrg#endif 400509885543Smrg 4006e4f6584cSmrgvoid fnord() { int i=42;} 4007e4f6584cSmrgint main () 4008e4f6584cSmrg{ 4009e4f6584cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4010e4f6584cSmrg int status = $lt_dlunknown; 401109885543Smrg 4012e4f6584cSmrg if (self) 4013e4f6584cSmrg { 4014e4f6584cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4015e4f6584cSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4016e4f6584cSmrg /* dlclose (self); */ 4017e4f6584cSmrg } 4018e4f6584cSmrg else 4019e4f6584cSmrg puts (dlerror ()); 402009885543Smrg 4021e4f6584cSmrg return status; 4022e4f6584cSmrg}] 4023e4f6584cSmrg_LT_EOF 4024e4f6584cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4025e4f6584cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4026e4f6584cSmrg lt_status=$? 4027e4f6584cSmrg case x$lt_status in 4028e4f6584cSmrg x$lt_dlno_uscore) $1 ;; 4029e4f6584cSmrg x$lt_dlneed_uscore) $2 ;; 4030e4f6584cSmrg x$lt_dlunknown|x*) $3 ;; 4031e4f6584cSmrg esac 4032e4f6584cSmrg else : 4033e4f6584cSmrg # compilation failed 4034e4f6584cSmrg $3 4035e4f6584cSmrg fi 4036e4f6584cSmrgfi 4037e4f6584cSmrgrm -fr conftest* 4038e4f6584cSmrg])# _LT_TRY_DLOPEN_SELF 403909885543Smrg 404009885543Smrg 4041e4f6584cSmrg# LT_SYS_DLOPEN_SELF 4042e4f6584cSmrg# ------------------ 4043e4f6584cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4044e4f6584cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 4045e4f6584cSmrgif test "x$enable_dlopen" != xyes; then 4046e4f6584cSmrg enable_dlopen=unknown 4047e4f6584cSmrg enable_dlopen_self=unknown 4048e4f6584cSmrg enable_dlopen_self_static=unknown 4049e4f6584cSmrgelse 4050e4f6584cSmrg lt_cv_dlopen=no 4051e4f6584cSmrg lt_cv_dlopen_libs= 405209885543Smrg 4053e4f6584cSmrg case $host_os in 4054e4f6584cSmrg beos*) 4055e4f6584cSmrg lt_cv_dlopen="load_add_on" 4056e4f6584cSmrg lt_cv_dlopen_libs= 4057e4f6584cSmrg lt_cv_dlopen_self=yes 4058e4f6584cSmrg ;; 405909885543Smrg 4060e4f6584cSmrg mingw* | pw32* | cegcc*) 4061e4f6584cSmrg lt_cv_dlopen="LoadLibrary" 4062e4f6584cSmrg lt_cv_dlopen_libs= 4063e4f6584cSmrg ;; 406409885543Smrg 4065e4f6584cSmrg cygwin*) 4066e4f6584cSmrg lt_cv_dlopen="dlopen" 4067e4f6584cSmrg lt_cv_dlopen_libs= 4068e4f6584cSmrg ;; 406909885543Smrg 4070e4f6584cSmrg darwin*) 4071e4f6584cSmrg # if libdl is installed we need to link against it 4072e4f6584cSmrg AC_CHECK_LIB([dl], [dlopen], 4073e4f6584cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4074e4f6584cSmrg lt_cv_dlopen="dyld" 4075e4f6584cSmrg lt_cv_dlopen_libs= 4076e4f6584cSmrg lt_cv_dlopen_self=yes 4077e4f6584cSmrg ]) 4078e4f6584cSmrg ;; 407909885543Smrg 4080e4f6584cSmrg *) 4081e4f6584cSmrg AC_CHECK_FUNC([shl_load], 4082e4f6584cSmrg [lt_cv_dlopen="shl_load"], 4083e4f6584cSmrg [AC_CHECK_LIB([dld], [shl_load], 4084e4f6584cSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4085e4f6584cSmrg [AC_CHECK_FUNC([dlopen], 4086e4f6584cSmrg [lt_cv_dlopen="dlopen"], 4087e4f6584cSmrg [AC_CHECK_LIB([dl], [dlopen], 4088e4f6584cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4089e4f6584cSmrg [AC_CHECK_LIB([svld], [dlopen], 4090e4f6584cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4091e4f6584cSmrg [AC_CHECK_LIB([dld], [dld_link], 4092e4f6584cSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4093e4f6584cSmrg ]) 4094e4f6584cSmrg ]) 4095e4f6584cSmrg ]) 4096e4f6584cSmrg ]) 4097e4f6584cSmrg ]) 4098e4f6584cSmrg ;; 4099e4f6584cSmrg esac 410009885543Smrg 4101e4f6584cSmrg if test "x$lt_cv_dlopen" != xno; then 4102e4f6584cSmrg enable_dlopen=yes 4103e4f6584cSmrg else 4104e4f6584cSmrg enable_dlopen=no 4105b698ba48Smrg fi 410609885543Smrg 4107e4f6584cSmrg case $lt_cv_dlopen in 4108e4f6584cSmrg dlopen) 4109e4f6584cSmrg save_CPPFLAGS="$CPPFLAGS" 4110e4f6584cSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 411109885543Smrg 4112e4f6584cSmrg save_LDFLAGS="$LDFLAGS" 4113e4f6584cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 411409885543Smrg 4115e4f6584cSmrg save_LIBS="$LIBS" 4116e4f6584cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 411709885543Smrg 4118e4f6584cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 4119e4f6584cSmrg lt_cv_dlopen_self, [dnl 4120e4f6584cSmrg _LT_TRY_DLOPEN_SELF( 4121e4f6584cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4122e4f6584cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4123e4f6584cSmrg ]) 412409885543Smrg 4125e4f6584cSmrg if test "x$lt_cv_dlopen_self" = xyes; then 4126e4f6584cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4127e4f6584cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4128e4f6584cSmrg lt_cv_dlopen_self_static, [dnl 4129e4f6584cSmrg _LT_TRY_DLOPEN_SELF( 4130e4f6584cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4131e4f6584cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4132e4f6584cSmrg ]) 4133e4f6584cSmrg fi 413409885543Smrg 4135e4f6584cSmrg CPPFLAGS="$save_CPPFLAGS" 4136e4f6584cSmrg LDFLAGS="$save_LDFLAGS" 4137e4f6584cSmrg LIBS="$save_LIBS" 4138e4f6584cSmrg ;; 4139e4f6584cSmrg esac 414009885543Smrg 4141e4f6584cSmrg case $lt_cv_dlopen_self in 4142e4f6584cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4143e4f6584cSmrg *) enable_dlopen_self=unknown ;; 4144e4f6584cSmrg esac 4145e4f6584cSmrg 4146e4f6584cSmrg case $lt_cv_dlopen_self_static in 4147e4f6584cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4148e4f6584cSmrg *) enable_dlopen_self_static=unknown ;; 4149e4f6584cSmrg esac 4150e4f6584cSmrgfi 4151e4f6584cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4152e4f6584cSmrg [Whether dlopen is supported]) 4153e4f6584cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4154e4f6584cSmrg [Whether dlopen of programs is supported]) 4155e4f6584cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4156e4f6584cSmrg [Whether dlopen of statically linked programs is supported]) 4157e4f6584cSmrg])# LT_SYS_DLOPEN_SELF 415809885543Smrg 4159e4f6584cSmrg# Old name: 4160e4f6584cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4161e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 4162e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 416309885543Smrg 416409885543Smrg 4165e4f6584cSmrg# _LT_COMPILER_C_O([TAGNAME]) 4166e4f6584cSmrg# --------------------------- 4167e4f6584cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 4168e4f6584cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4169e4f6584cSmrgm4_defun([_LT_COMPILER_C_O], 4170e4f6584cSmrg[m4_require([_LT_DECL_SED])dnl 4171e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4172e4f6584cSmrgm4_require([_LT_TAG_COMPILER])dnl 4173e4f6584cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4174e4f6584cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4175e4f6584cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4176e4f6584cSmrg $RM -r conftest 2>/dev/null 4177e4f6584cSmrg mkdir conftest 4178e4f6584cSmrg cd conftest 4179e4f6584cSmrg mkdir out 4180e4f6584cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 418109885543Smrg 4182e4f6584cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 4183e4f6584cSmrg # Insert the option either (1) after the last *FLAGS variable, or 4184e4f6584cSmrg # (2) before a word containing "conftest.", or (3) at the end. 4185e4f6584cSmrg # Note that $ac_compile itself does not contain backslashes and begins 4186e4f6584cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4187e4f6584cSmrg lt_compile=`echo "$ac_compile" | $SED \ 4188e4f6584cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4189e4f6584cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4190e4f6584cSmrg -e 's:$: $lt_compiler_flag:'` 4191e4f6584cSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4192e4f6584cSmrg (eval "$lt_compile" 2>out/conftest.err) 4193e4f6584cSmrg ac_status=$? 4194e4f6584cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4195e4f6584cSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4196e4f6584cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 4197e4f6584cSmrg then 4198e4f6584cSmrg # The compiler can only warn and ignore the option if not recognized 4199e4f6584cSmrg # So say no if there are warnings 4200e4f6584cSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 4201e4f6584cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4202e4f6584cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4203e4f6584cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4204e4f6584cSmrg fi 4205e4f6584cSmrg fi 4206e4f6584cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4207e4f6584cSmrg $RM conftest* 4208e4f6584cSmrg # SGI C++ compiler will create directory out/ii_files/ for 4209e4f6584cSmrg # template instantiation 4210e4f6584cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4211e4f6584cSmrg $RM out/* && rmdir out 4212e4f6584cSmrg cd .. 4213e4f6584cSmrg $RM -r conftest 4214e4f6584cSmrg $RM conftest* 4215e4f6584cSmrg]) 4216e4f6584cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4217e4f6584cSmrg [Does compiler simultaneously support -c and -o options?]) 4218e4f6584cSmrg])# _LT_COMPILER_C_O 421909885543Smrg 422009885543Smrg 4221e4f6584cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4222e4f6584cSmrg# ---------------------------------- 4223e4f6584cSmrg# Check to see if we can do hard links to lock some files if needed 4224e4f6584cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4225e4f6584cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 4226e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4227e4f6584cSmrg_LT_COMPILER_C_O([$1]) 422809885543Smrg 4229e4f6584cSmrghard_links="nottested" 4230e4f6584cSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4231e4f6584cSmrg # do not overwrite the value of need_locks provided by the user 4232e4f6584cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 4233e4f6584cSmrg hard_links=yes 4234e4f6584cSmrg $RM conftest* 4235e4f6584cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4236e4f6584cSmrg touch conftest.a 4237e4f6584cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 4238e4f6584cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4239e4f6584cSmrg AC_MSG_RESULT([$hard_links]) 4240e4f6584cSmrg if test "$hard_links" = no; then 4241e4f6584cSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4242e4f6584cSmrg need_locks=warn 4243e4f6584cSmrg fi 4244e4f6584cSmrgelse 4245e4f6584cSmrg need_locks=no 4246e4f6584cSmrgfi 4247e4f6584cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4248e4f6584cSmrg])# _LT_COMPILER_FILE_LOCKS 424909885543Smrg 425009885543Smrg 4251e4f6584cSmrg# _LT_CHECK_OBJDIR 4252e4f6584cSmrg# ---------------- 4253e4f6584cSmrgm4_defun([_LT_CHECK_OBJDIR], 4254e4f6584cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4255e4f6584cSmrg[rm -f .libs 2>/dev/null 4256e4f6584cSmrgmkdir .libs 2>/dev/null 4257e4f6584cSmrgif test -d .libs; then 4258e4f6584cSmrg lt_cv_objdir=.libs 4259e4f6584cSmrgelse 4260e4f6584cSmrg # MS-DOS does not allow filenames that begin with a dot. 4261e4f6584cSmrg lt_cv_objdir=_libs 4262e4f6584cSmrgfi 4263e4f6584cSmrgrmdir .libs 2>/dev/null]) 4264e4f6584cSmrgobjdir=$lt_cv_objdir 4265e4f6584cSmrg_LT_DECL([], [objdir], [0], 4266e4f6584cSmrg [The name of the directory that contains temporary libtool files])dnl 4267e4f6584cSmrgm4_pattern_allow([LT_OBJDIR])dnl 4268e4f6584cSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4269e4f6584cSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4270e4f6584cSmrg])# _LT_CHECK_OBJDIR 427109885543Smrg 427209885543Smrg 4273e4f6584cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4274e4f6584cSmrg# -------------------------------------- 4275e4f6584cSmrg# Check hardcoding attributes. 4276e4f6584cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4277e4f6584cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4278e4f6584cSmrg_LT_TAGVAR(hardcode_action, $1)= 4279e4f6584cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4280e4f6584cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4281e4f6584cSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 428209885543Smrg 4283e4f6584cSmrg # We can hardcode non-existent directories. 4284e4f6584cSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4285e4f6584cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 4286e4f6584cSmrg # have to relink, otherwise we might link with an installed library 4287e4f6584cSmrg # when we should be linking with a yet-to-be-installed one 4288e4f6584cSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4289e4f6584cSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4290e4f6584cSmrg # Linking always hardcodes the temporary library directory. 4291e4f6584cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 4292e4f6584cSmrg else 4293e4f6584cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4294e4f6584cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 4295e4f6584cSmrg fi 4296e4f6584cSmrgelse 4297e4f6584cSmrg # We cannot hardcode anything, or else we can only hardcode existing 4298e4f6584cSmrg # directories. 4299e4f6584cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 4300e4f6584cSmrgfi 4301e4f6584cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 430209885543Smrg 4303e4f6584cSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4304e4f6584cSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4305e4f6584cSmrg # Fast installation is not supported 4306e4f6584cSmrg enable_fast_install=no 4307e4f6584cSmrgelif test "$shlibpath_overrides_runpath" = yes || 4308e4f6584cSmrg test "$enable_shared" = no; then 4309e4f6584cSmrg # Fast installation is not necessary 4310e4f6584cSmrg enable_fast_install=needless 4311e4f6584cSmrgfi 4312e4f6584cSmrg_LT_TAGDECL([], [hardcode_action], [0], 4313e4f6584cSmrg [How to hardcode a shared library path into an executable]) 4314e4f6584cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 431509885543Smrg 431609885543Smrg 4317e4f6584cSmrg# _LT_CMD_STRIPLIB 4318e4f6584cSmrg# ---------------- 4319e4f6584cSmrgm4_defun([_LT_CMD_STRIPLIB], 4320e4f6584cSmrg[m4_require([_LT_DECL_EGREP]) 4321e4f6584cSmrgstriplib= 4322e4f6584cSmrgold_striplib= 4323e4f6584cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4324e4f6584cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4325e4f6584cSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4326e4f6584cSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4327e4f6584cSmrg AC_MSG_RESULT([yes]) 4328e4f6584cSmrgelse 4329e4f6584cSmrg# FIXME - insert some real tests, host_os isn't really good enough 4330e4f6584cSmrg case $host_os in 4331e4f6584cSmrg darwin*) 4332e4f6584cSmrg if test -n "$STRIP" ; then 4333e4f6584cSmrg striplib="$STRIP -x" 4334e4f6584cSmrg old_striplib="$STRIP -S" 4335e4f6584cSmrg AC_MSG_RESULT([yes]) 4336e4f6584cSmrg else 4337e4f6584cSmrg AC_MSG_RESULT([no]) 4338e4f6584cSmrg fi 4339e4f6584cSmrg ;; 4340e4f6584cSmrg *) 4341e4f6584cSmrg AC_MSG_RESULT([no]) 4342e4f6584cSmrg ;; 4343e4f6584cSmrg esac 4344e4f6584cSmrgfi 4345e4f6584cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4346e4f6584cSmrg_LT_DECL([], [striplib], [1]) 4347e4f6584cSmrg])# _LT_CMD_STRIPLIB 434809885543Smrg 434909885543Smrg 4350e4f6584cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 4351e4f6584cSmrg# ----------------------------- 4352e4f6584cSmrg# PORTME Fill in your ld.so characteristics 4353e4f6584cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4354e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4355e4f6584cSmrgm4_require([_LT_DECL_EGREP])dnl 4356e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4357e4f6584cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 4358e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 4359e4f6584cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4360e4f6584cSmrgm4_if([$1], 4361e4f6584cSmrg [], [ 4362e4f6584cSmrgif test "$GCC" = yes; then 4363e4f6584cSmrg case $host_os in 4364e4f6584cSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4365e4f6584cSmrg *) lt_awk_arg="/^libraries:/" ;; 4366e4f6584cSmrg esac 4367e4f6584cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4368e4f6584cSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 4369e4f6584cSmrg # if the path contains ";" then we assume it to be the separator 4370e4f6584cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 4371e4f6584cSmrg # assumed that no part of a normal pathname contains ";" but that should 4372e4f6584cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 4373e4f6584cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 4374e4f6584cSmrg else 4375e4f6584cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4376e4f6584cSmrg fi 4377e4f6584cSmrg # Ok, now we have the path, separated by spaces, we can step through it 4378e4f6584cSmrg # and add multilib dir if necessary. 4379e4f6584cSmrg lt_tmp_lt_search_path_spec= 4380e4f6584cSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4381e4f6584cSmrg for lt_sys_path in $lt_search_path_spec; do 4382e4f6584cSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4383e4f6584cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4384e4f6584cSmrg else 4385e4f6584cSmrg test -d "$lt_sys_path" && \ 4386e4f6584cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4387e4f6584cSmrg fi 4388e4f6584cSmrg done 4389e4f6584cSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 4390e4f6584cSmrgBEGIN {RS=" "; FS="/|\n";} { 4391e4f6584cSmrg lt_foo=""; 4392e4f6584cSmrg lt_count=0; 4393e4f6584cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 4394e4f6584cSmrg if ($lt_i != "" && $lt_i != ".") { 4395e4f6584cSmrg if ($lt_i == "..") { 4396e4f6584cSmrg lt_count++; 4397e4f6584cSmrg } else { 4398e4f6584cSmrg if (lt_count == 0) { 4399e4f6584cSmrg lt_foo="/" $lt_i lt_foo; 4400e4f6584cSmrg } else { 4401e4f6584cSmrg lt_count--; 4402e4f6584cSmrg } 4403e4f6584cSmrg } 4404e4f6584cSmrg } 4405e4f6584cSmrg } 4406e4f6584cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4407e4f6584cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4408e4f6584cSmrg}'` 4409e4f6584cSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 4410e4f6584cSmrgelse 4411e4f6584cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4412e4f6584cSmrgfi]) 4413e4f6584cSmrglibrary_names_spec= 4414e4f6584cSmrglibname_spec='lib$name' 4415e4f6584cSmrgsoname_spec= 4416e4f6584cSmrgshrext_cmds=".so" 4417e4f6584cSmrgpostinstall_cmds= 4418e4f6584cSmrgpostuninstall_cmds= 4419e4f6584cSmrgfinish_cmds= 4420e4f6584cSmrgfinish_eval= 4421e4f6584cSmrgshlibpath_var= 4422e4f6584cSmrgshlibpath_overrides_runpath=unknown 4423e4f6584cSmrgversion_type=none 4424e4f6584cSmrgdynamic_linker="$host_os ld.so" 4425e4f6584cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 4426e4f6584cSmrgneed_lib_prefix=unknown 4427e4f6584cSmrghardcode_into_libs=no 442809885543Smrg 4429e4f6584cSmrg# when you set need_version to no, make sure it does not cause -set_version 4430e4f6584cSmrg# flags to be left without arguments 4431e4f6584cSmrgneed_version=unknown 443209885543Smrg 4433e4f6584cSmrgcase $host_os in 4434e4f6584cSmrgaix3*) 4435e4f6584cSmrg version_type=linux 4436e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4437e4f6584cSmrg shlibpath_var=LIBPATH 443809885543Smrg 4439e4f6584cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 4440e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4441e4f6584cSmrg ;; 444209885543Smrg 4443e4f6584cSmrgaix[[4-9]]*) 4444e4f6584cSmrg version_type=linux 4445e4f6584cSmrg need_lib_prefix=no 4446e4f6584cSmrg need_version=no 4447e4f6584cSmrg hardcode_into_libs=yes 4448e4f6584cSmrg if test "$host_cpu" = ia64; then 4449e4f6584cSmrg # AIX 5 supports IA64 4450e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4451e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4452e4f6584cSmrg else 4453e4f6584cSmrg # With GCC up to 2.95.x, collect2 would create an import file 4454e4f6584cSmrg # for dependence libraries. The import file would start with 4455e4f6584cSmrg # the line `#! .'. This would cause the generated library to 4456e4f6584cSmrg # depend on `.', always an invalid library. This was fixed in 4457e4f6584cSmrg # development snapshots of GCC prior to 3.0. 4458e4f6584cSmrg case $host_os in 4459e4f6584cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 4460e4f6584cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4461e4f6584cSmrg echo ' yes ' 4462e4f6584cSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4463e4f6584cSmrg : 4464e4f6584cSmrg else 4465e4f6584cSmrg can_build_shared=no 4466e4f6584cSmrg fi 4467e4f6584cSmrg ;; 4468e4f6584cSmrg esac 4469e4f6584cSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4470e4f6584cSmrg # soname into executable. Probably we can add versioning support to 4471e4f6584cSmrg # collect2, so additional links can be useful in future. 4472e4f6584cSmrg if test "$aix_use_runtimelinking" = yes; then 4473e4f6584cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4474e4f6584cSmrg # instead of lib<name>.a to let people know that these are not 4475e4f6584cSmrg # typical AIX shared libraries. 4476e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4477e4f6584cSmrg else 4478e4f6584cSmrg # We preserve .a as extension for shared libraries through AIX4.2 4479e4f6584cSmrg # and later when we are not doing run time linking. 4480e4f6584cSmrg library_names_spec='${libname}${release}.a $libname.a' 4481e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4482e4f6584cSmrg fi 4483e4f6584cSmrg shlibpath_var=LIBPATH 4484e4f6584cSmrg fi 4485e4f6584cSmrg ;; 448609885543Smrg 4487e4f6584cSmrgamigaos*) 4488e4f6584cSmrg case $host_cpu in 4489e4f6584cSmrg powerpc) 4490e4f6584cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4491e4f6584cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4492e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4493e4f6584cSmrg ;; 4494e4f6584cSmrg m68k) 4495e4f6584cSmrg library_names_spec='$libname.ixlibrary $libname.a' 4496e4f6584cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4497e4f6584cSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 4498e4f6584cSmrg ;; 4499e4f6584cSmrg esac 4500e4f6584cSmrg ;; 450109885543Smrg 4502e4f6584cSmrgbeos*) 4503e4f6584cSmrg library_names_spec='${libname}${shared_ext}' 4504e4f6584cSmrg dynamic_linker="$host_os ld.so" 4505e4f6584cSmrg shlibpath_var=LIBRARY_PATH 4506e4f6584cSmrg ;; 450709885543Smrg 4508e4f6584cSmrgbsdi[[45]]*) 4509e4f6584cSmrg version_type=linux 4510e4f6584cSmrg need_version=no 4511e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4512e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4513e4f6584cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4514e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4515e4f6584cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4516e4f6584cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4517e4f6584cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 4518e4f6584cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4519e4f6584cSmrg # libtool to hard-code these into programs 4520e4f6584cSmrg ;; 452109885543Smrg 4522e4f6584cSmrgcygwin* | mingw* | pw32* | cegcc*) 4523e4f6584cSmrg version_type=windows 4524e4f6584cSmrg shrext_cmds=".dll" 4525e4f6584cSmrg need_version=no 4526e4f6584cSmrg need_lib_prefix=no 452709885543Smrg 4528e4f6584cSmrg case $GCC,$host_os in 4529e4f6584cSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 4530e4f6584cSmrg library_names_spec='$libname.dll.a' 4531e4f6584cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 4532e4f6584cSmrg postinstall_cmds='base_file=`basename \${file}`~ 4533e4f6584cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4534e4f6584cSmrg dldir=$destdir/`dirname \$dlpath`~ 4535e4f6584cSmrg test -d \$dldir || mkdir -p \$dldir~ 4536e4f6584cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 4537e4f6584cSmrg chmod a+x \$dldir/$dlname~ 4538e4f6584cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4539e4f6584cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4540e4f6584cSmrg fi' 4541e4f6584cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4542e4f6584cSmrg dlpath=$dir/\$dldll~ 4543e4f6584cSmrg $RM \$dlpath' 4544e4f6584cSmrg shlibpath_overrides_runpath=yes 454509885543Smrg 4546e4f6584cSmrg case $host_os in 4547e4f6584cSmrg cygwin*) 4548e4f6584cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4549e4f6584cSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4550e4f6584cSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 4551e4f6584cSmrg ;; 4552e4f6584cSmrg mingw* | cegcc*) 4553e4f6584cSmrg # MinGW DLLs use traditional 'lib' prefix 4554e4f6584cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4555e4f6584cSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4556e4f6584cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 4557e4f6584cSmrg # It is most probably a Windows format PATH printed by 4558e4f6584cSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 4559e4f6584cSmrg # path with ; separators, and with drive letters. We can handle the 4560e4f6584cSmrg # drive letters (cygwin fileutils understands them), so leave them, 4561e4f6584cSmrg # especially as we might pass files found there to a mingw objdump, 4562e4f6584cSmrg # which wouldn't understand a cygwinified path. Ahh. 4563e4f6584cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 4564e4f6584cSmrg else 4565e4f6584cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4566e4f6584cSmrg fi 4567e4f6584cSmrg ;; 4568e4f6584cSmrg pw32*) 4569e4f6584cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 4570e4f6584cSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4571e4f6584cSmrg ;; 4572e4f6584cSmrg esac 4573e4f6584cSmrg ;; 457409885543Smrg 4575e4f6584cSmrg *) 4576e4f6584cSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 4577e4f6584cSmrg ;; 4578e4f6584cSmrg esac 4579e4f6584cSmrg dynamic_linker='Win32 ld.exe' 4580e4f6584cSmrg # FIXME: first we should search . and the directory the executable is in 4581e4f6584cSmrg shlibpath_var=PATH 4582e4f6584cSmrg ;; 458309885543Smrg 4584e4f6584cSmrgdarwin* | rhapsody*) 4585e4f6584cSmrg dynamic_linker="$host_os dyld" 4586e4f6584cSmrg version_type=darwin 4587e4f6584cSmrg need_lib_prefix=no 4588e4f6584cSmrg need_version=no 4589e4f6584cSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 4590e4f6584cSmrg soname_spec='${libname}${release}${major}$shared_ext' 4591e4f6584cSmrg shlibpath_overrides_runpath=yes 4592e4f6584cSmrg shlibpath_var=DYLD_LIBRARY_PATH 4593e4f6584cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4594e4f6584cSmrgm4_if([$1], [],[ 4595e4f6584cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4596e4f6584cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4597e4f6584cSmrg ;; 459809885543Smrg 4599e4f6584cSmrgdgux*) 4600e4f6584cSmrg version_type=linux 4601e4f6584cSmrg need_lib_prefix=no 4602e4f6584cSmrg need_version=no 4603e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 4604e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4605e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4606e4f6584cSmrg ;; 460709885543Smrg 4608e4f6584cSmrgfreebsd1*) 4609e4f6584cSmrg dynamic_linker=no 4610e4f6584cSmrg ;; 461109885543Smrg 4612e4f6584cSmrgfreebsd* | dragonfly*) 4613e4f6584cSmrg # DragonFly does not have aout. When/if they implement a new 4614e4f6584cSmrg # versioning mechanism, adjust this. 4615e4f6584cSmrg if test -x /usr/bin/objformat; then 4616e4f6584cSmrg objformat=`/usr/bin/objformat` 4617e4f6584cSmrg else 4618e4f6584cSmrg case $host_os in 4619e4f6584cSmrg freebsd[[123]]*) objformat=aout ;; 4620e4f6584cSmrg *) objformat=elf ;; 4621e4f6584cSmrg esac 4622e4f6584cSmrg fi 4623e4f6584cSmrg version_type=freebsd-$objformat 4624e4f6584cSmrg case $version_type in 4625e4f6584cSmrg freebsd-elf*) 4626e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4627e4f6584cSmrg need_version=no 4628e4f6584cSmrg need_lib_prefix=no 4629e4f6584cSmrg ;; 4630e4f6584cSmrg freebsd-*) 4631e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 4632e4f6584cSmrg need_version=yes 4633e4f6584cSmrg ;; 4634e4f6584cSmrg esac 4635e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4636e4f6584cSmrg case $host_os in 4637e4f6584cSmrg freebsd2*) 4638e4f6584cSmrg shlibpath_overrides_runpath=yes 4639e4f6584cSmrg ;; 4640e4f6584cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4641e4f6584cSmrg shlibpath_overrides_runpath=yes 4642e4f6584cSmrg hardcode_into_libs=yes 4643e4f6584cSmrg ;; 4644e4f6584cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4645e4f6584cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4646e4f6584cSmrg shlibpath_overrides_runpath=no 4647e4f6584cSmrg hardcode_into_libs=yes 4648e4f6584cSmrg ;; 4649e4f6584cSmrg *) # from 4.6 on, and DragonFly 4650e4f6584cSmrg shlibpath_overrides_runpath=yes 4651e4f6584cSmrg hardcode_into_libs=yes 4652e4f6584cSmrg ;; 4653e4f6584cSmrg esac 4654e4f6584cSmrg ;; 465509885543Smrg 4656e4f6584cSmrggnu*) 4657e4f6584cSmrg version_type=linux 4658e4f6584cSmrg need_lib_prefix=no 4659e4f6584cSmrg need_version=no 4660e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4661e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4662e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4663e4f6584cSmrg hardcode_into_libs=yes 4664e4f6584cSmrg ;; 466509885543Smrg 4666e4f6584cSmrghpux9* | hpux10* | hpux11*) 4667e4f6584cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 4668e4f6584cSmrg # link against other versions. 4669e4f6584cSmrg version_type=sunos 4670e4f6584cSmrg need_lib_prefix=no 4671e4f6584cSmrg need_version=no 4672e4f6584cSmrg case $host_cpu in 4673e4f6584cSmrg ia64*) 4674e4f6584cSmrg shrext_cmds='.so' 4675e4f6584cSmrg hardcode_into_libs=yes 4676e4f6584cSmrg dynamic_linker="$host_os dld.so" 4677e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4678e4f6584cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4679e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4680e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4681e4f6584cSmrg if test "X$HPUX_IA64_MODE" = X32; then 4682e4f6584cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 4683e4f6584cSmrg else 4684e4f6584cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 4685e4f6584cSmrg fi 4686e4f6584cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4687e4f6584cSmrg ;; 4688e4f6584cSmrg hppa*64*) 4689e4f6584cSmrg shrext_cmds='.sl' 4690e4f6584cSmrg hardcode_into_libs=yes 4691e4f6584cSmrg dynamic_linker="$host_os dld.sl" 4692e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4693e4f6584cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4694e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4695e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4696e4f6584cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4697e4f6584cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4698e4f6584cSmrg ;; 4699e4f6584cSmrg *) 4700e4f6584cSmrg shrext_cmds='.sl' 4701e4f6584cSmrg dynamic_linker="$host_os dld.sl" 4702e4f6584cSmrg shlibpath_var=SHLIB_PATH 4703e4f6584cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 4704e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4705e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4706e4f6584cSmrg ;; 4707e4f6584cSmrg esac 4708e4f6584cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 4709e4f6584cSmrg postinstall_cmds='chmod 555 $lib' 4710e4f6584cSmrg ;; 471109885543Smrg 4712e4f6584cSmrginterix[[3-9]]*) 4713e4f6584cSmrg version_type=linux 4714e4f6584cSmrg need_lib_prefix=no 4715e4f6584cSmrg need_version=no 4716e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4717e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4718e4f6584cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 4719e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4720e4f6584cSmrg shlibpath_overrides_runpath=no 4721e4f6584cSmrg hardcode_into_libs=yes 4722e4f6584cSmrg ;; 47237104f784Smrg 4724e4f6584cSmrgirix5* | irix6* | nonstopux*) 4725e4f6584cSmrg case $host_os in 4726e4f6584cSmrg nonstopux*) version_type=nonstopux ;; 4727e4f6584cSmrg *) 4728e4f6584cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 4729e4f6584cSmrg version_type=linux 4730e4f6584cSmrg else 4731e4f6584cSmrg version_type=irix 4732e4f6584cSmrg fi ;; 4733e4f6584cSmrg esac 4734e4f6584cSmrg need_lib_prefix=no 4735e4f6584cSmrg need_version=no 4736e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4737e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 4738e4f6584cSmrg case $host_os in 4739e4f6584cSmrg irix5* | nonstopux*) 4740e4f6584cSmrg libsuff= shlibsuff= 4741e4f6584cSmrg ;; 4742e4f6584cSmrg *) 4743e4f6584cSmrg case $LD in # libtool.m4 will add one of these switches to LD 4744e4f6584cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 4745e4f6584cSmrg libsuff= shlibsuff= libmagic=32-bit;; 4746e4f6584cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 4747e4f6584cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 4748e4f6584cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 4749e4f6584cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 4750e4f6584cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 4751e4f6584cSmrg esac 4752e4f6584cSmrg ;; 4753e4f6584cSmrg esac 4754e4f6584cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 4755e4f6584cSmrg shlibpath_overrides_runpath=no 4756e4f6584cSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 4757e4f6584cSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 4758e4f6584cSmrg hardcode_into_libs=yes 4759e4f6584cSmrg ;; 476009885543Smrg 4761e4f6584cSmrg# No shared lib support for Linux oldld, aout, or coff. 4762e4f6584cSmrglinux*oldld* | linux*aout* | linux*coff*) 4763e4f6584cSmrg dynamic_linker=no 4764e4f6584cSmrg ;; 476509885543Smrg 4766e4f6584cSmrg# This must be Linux ELF. 4767e4f6584cSmrglinux* | k*bsd*-gnu) 4768e4f6584cSmrg version_type=linux 4769e4f6584cSmrg need_lib_prefix=no 4770e4f6584cSmrg need_version=no 4771e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4772e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4773e4f6584cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 4774e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4775e4f6584cSmrg shlibpath_overrides_runpath=no 4776e4f6584cSmrg # Some binutils ld are patched to set DT_RUNPATH 4777e4f6584cSmrg save_LDFLAGS=$LDFLAGS 4778e4f6584cSmrg save_libdir=$libdir 4779e4f6584cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4780e4f6584cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4781e4f6584cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4782e4f6584cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4783e4f6584cSmrg [shlibpath_overrides_runpath=yes])]) 4784e4f6584cSmrg LDFLAGS=$save_LDFLAGS 4785e4f6584cSmrg libdir=$save_libdir 478609885543Smrg 4787e4f6584cSmrg # This implies no fast_install, which is unacceptable. 4788e4f6584cSmrg # Some rework will be needed to allow for fast_install 4789e4f6584cSmrg # before this can be enabled. 4790e4f6584cSmrg hardcode_into_libs=yes 479109885543Smrg 4792e4f6584cSmrg # Append ld.so.conf contents to the search path 4793e4f6584cSmrg if test -f /etc/ld.so.conf; then 4794e4f6584cSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 4795e4f6584cSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 4796e4f6584cSmrg fi 479709885543Smrg 4798e4f6584cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 4799e4f6584cSmrg # powerpc, because MkLinux only supported shared libraries with the 4800e4f6584cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 4801e4f6584cSmrg # most powerpc-linux boxes support dynamic linking these days and 4802e4f6584cSmrg # people can always --disable-shared, the test was removed, and we 4803e4f6584cSmrg # assume the GNU/Linux dynamic linker is in use. 4804e4f6584cSmrg dynamic_linker='GNU/Linux ld.so' 4805e4f6584cSmrg ;; 480609885543Smrg 4807e4f6584cSmrgnetbsd*) 4808e4f6584cSmrg version_type=sunos 4809e4f6584cSmrg need_lib_prefix=no 4810e4f6584cSmrg need_version=no 4811e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4812e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4813e4f6584cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4814e4f6584cSmrg dynamic_linker='NetBSD (a.out) ld.so' 4815e4f6584cSmrg else 4816e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4817e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4818e4f6584cSmrg dynamic_linker='NetBSD ld.elf_so' 4819e4f6584cSmrg fi 4820e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4821e4f6584cSmrg shlibpath_overrides_runpath=yes 4822e4f6584cSmrg hardcode_into_libs=yes 4823e4f6584cSmrg ;; 482409885543Smrg 4825e4f6584cSmrgnewsos6) 4826e4f6584cSmrg version_type=linux 4827e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4828e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4829e4f6584cSmrg shlibpath_overrides_runpath=yes 4830e4f6584cSmrg ;; 483109885543Smrg 4832e4f6584cSmrg*nto* | *qnx*) 4833e4f6584cSmrg version_type=qnx 4834e4f6584cSmrg need_lib_prefix=no 4835e4f6584cSmrg need_version=no 4836e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4837e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4838e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4839e4f6584cSmrg shlibpath_overrides_runpath=no 4840e4f6584cSmrg hardcode_into_libs=yes 4841e4f6584cSmrg dynamic_linker='ldqnx.so' 4842e4f6584cSmrg ;; 484309885543Smrg 4844e4f6584cSmrgopenbsd*) 4845e4f6584cSmrg version_type=sunos 4846e4f6584cSmrg sys_lib_dlsearch_path_spec="/usr/lib" 4847e4f6584cSmrg need_lib_prefix=no 4848e4f6584cSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 4849e4f6584cSmrg case $host_os in 4850e4f6584cSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 4851e4f6584cSmrg *) need_version=no ;; 4852e4f6584cSmrg esac 4853e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4854e4f6584cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4855e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4856e4f6584cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4857e4f6584cSmrg case $host_os in 4858e4f6584cSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 4859e4f6584cSmrg shlibpath_overrides_runpath=no 4860e4f6584cSmrg ;; 4861e4f6584cSmrg *) 4862e4f6584cSmrg shlibpath_overrides_runpath=yes 4863e4f6584cSmrg ;; 4864e4f6584cSmrg esac 4865e4f6584cSmrg else 4866e4f6584cSmrg shlibpath_overrides_runpath=yes 4867e4f6584cSmrg fi 4868e4f6584cSmrg ;; 486909885543Smrg 4870e4f6584cSmrgos2*) 4871e4f6584cSmrg libname_spec='$name' 4872e4f6584cSmrg shrext_cmds=".dll" 4873e4f6584cSmrg need_lib_prefix=no 4874e4f6584cSmrg library_names_spec='$libname${shared_ext} $libname.a' 4875e4f6584cSmrg dynamic_linker='OS/2 ld.exe' 4876e4f6584cSmrg shlibpath_var=LIBPATH 4877e4f6584cSmrg ;; 487809885543Smrg 4879e4f6584cSmrgosf3* | osf4* | osf5*) 4880e4f6584cSmrg version_type=osf 4881e4f6584cSmrg need_lib_prefix=no 4882e4f6584cSmrg need_version=no 4883e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4884e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4885e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4886e4f6584cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 4887e4f6584cSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 4888e4f6584cSmrg ;; 488909885543Smrg 4890e4f6584cSmrgrdos*) 4891e4f6584cSmrg dynamic_linker=no 4892e4f6584cSmrg ;; 489309885543Smrg 4894e4f6584cSmrgsolaris*) 4895e4f6584cSmrg version_type=linux 4896e4f6584cSmrg need_lib_prefix=no 4897e4f6584cSmrg need_version=no 4898e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4899e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4900e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4901e4f6584cSmrg shlibpath_overrides_runpath=yes 4902e4f6584cSmrg hardcode_into_libs=yes 4903e4f6584cSmrg # ldd complains unless libraries are executable 4904e4f6584cSmrg postinstall_cmds='chmod +x $lib' 4905e4f6584cSmrg ;; 490609885543Smrg 4907e4f6584cSmrgsunos4*) 4908e4f6584cSmrg version_type=sunos 4909e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4910e4f6584cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 4911e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4912e4f6584cSmrg shlibpath_overrides_runpath=yes 4913e4f6584cSmrg if test "$with_gnu_ld" = yes; then 4914e4f6584cSmrg need_lib_prefix=no 4915e4f6584cSmrg fi 4916e4f6584cSmrg need_version=yes 4917e4f6584cSmrg ;; 491809885543Smrg 4919e4f6584cSmrgsysv4 | sysv4.3*) 4920e4f6584cSmrg version_type=linux 4921e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4922e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4923e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4924e4f6584cSmrg case $host_vendor in 4925e4f6584cSmrg sni) 4926e4f6584cSmrg shlibpath_overrides_runpath=no 4927e4f6584cSmrg need_lib_prefix=no 4928e4f6584cSmrg runpath_var=LD_RUN_PATH 4929e4f6584cSmrg ;; 4930e4f6584cSmrg siemens) 4931e4f6584cSmrg need_lib_prefix=no 4932e4f6584cSmrg ;; 4933e4f6584cSmrg motorola) 4934e4f6584cSmrg need_lib_prefix=no 4935e4f6584cSmrg need_version=no 4936e4f6584cSmrg shlibpath_overrides_runpath=no 4937e4f6584cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 4938e4f6584cSmrg ;; 4939e4f6584cSmrg esac 4940e4f6584cSmrg ;; 494109885543Smrg 4942e4f6584cSmrgsysv4*MP*) 4943e4f6584cSmrg if test -d /usr/nec ;then 4944e4f6584cSmrg version_type=linux 4945e4f6584cSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 4946e4f6584cSmrg soname_spec='$libname${shared_ext}.$major' 4947e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4948e4f6584cSmrg fi 4949e4f6584cSmrg ;; 495009885543Smrg 4951e4f6584cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4952e4f6584cSmrg version_type=freebsd-elf 4953e4f6584cSmrg need_lib_prefix=no 4954e4f6584cSmrg need_version=no 4955e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4956e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4957e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4958e4f6584cSmrg shlibpath_overrides_runpath=yes 4959e4f6584cSmrg hardcode_into_libs=yes 4960e4f6584cSmrg if test "$with_gnu_ld" = yes; then 4961e4f6584cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 4962e4f6584cSmrg else 4963e4f6584cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 4964e4f6584cSmrg case $host_os in 4965e4f6584cSmrg sco3.2v5*) 4966e4f6584cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 4967e4f6584cSmrg ;; 4968e4f6584cSmrg esac 4969e4f6584cSmrg fi 4970e4f6584cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 4971e4f6584cSmrg ;; 497209885543Smrg 4973e4f6584cSmrgtpf*) 4974e4f6584cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4975e4f6584cSmrg version_type=linux 4976e4f6584cSmrg need_lib_prefix=no 4977e4f6584cSmrg need_version=no 4978e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4979e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4980e4f6584cSmrg shlibpath_overrides_runpath=no 4981e4f6584cSmrg hardcode_into_libs=yes 4982e4f6584cSmrg ;; 498309885543Smrg 4984e4f6584cSmrguts4*) 4985e4f6584cSmrg version_type=linux 4986e4f6584cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4987e4f6584cSmrg soname_spec='${libname}${release}${shared_ext}$major' 4988e4f6584cSmrg shlibpath_var=LD_LIBRARY_PATH 4989e4f6584cSmrg ;; 499009885543Smrg 4991e4f6584cSmrg*) 4992e4f6584cSmrg dynamic_linker=no 4993e4f6584cSmrg ;; 4994e4f6584cSmrgesac 4995e4f6584cSmrgAC_MSG_RESULT([$dynamic_linker]) 4996e4f6584cSmrgtest "$dynamic_linker" = no && can_build_shared=no 499709885543Smrg 4998e4f6584cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4999e4f6584cSmrgif test "$GCC" = yes; then 5000e4f6584cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5001e4f6584cSmrgfi 500209885543Smrg 5003e4f6584cSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5004e4f6584cSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5005e4f6584cSmrgfi 5006e4f6584cSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5007e4f6584cSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5008e4f6584cSmrgfi 500909885543Smrg 5010e4f6584cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 5011e4f6584cSmrg [Variables whose values should be saved in libtool wrapper scripts and 5012e4f6584cSmrg restored at link time]) 5013e4f6584cSmrg_LT_DECL([], [need_lib_prefix], [0], 5014e4f6584cSmrg [Do we need the "lib" prefix for modules?]) 5015e4f6584cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5016e4f6584cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5017e4f6584cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5018e4f6584cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5019e4f6584cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5020e4f6584cSmrg [Is shlibpath searched before the hard-coded library search path?]) 5021e4f6584cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5022e4f6584cSmrg_LT_DECL([], [library_names_spec], [1], 5023e4f6584cSmrg [[List of archive names. First name is the real one, the rest are links. 5024e4f6584cSmrg The last name is the one that the linker finds with -lNAME]]) 5025e4f6584cSmrg_LT_DECL([], [soname_spec], [1], 5026e4f6584cSmrg [[The coded name of the library, if different from the real name]]) 5027e4f6584cSmrg_LT_DECL([], [postinstall_cmds], [2], 5028e4f6584cSmrg [Command to use after installation of a shared archive]) 5029e4f6584cSmrg_LT_DECL([], [postuninstall_cmds], [2], 5030e4f6584cSmrg [Command to use after uninstallation of a shared archive]) 5031e4f6584cSmrg_LT_DECL([], [finish_cmds], [2], 5032e4f6584cSmrg [Commands used to finish a libtool library installation in a directory]) 5033e4f6584cSmrg_LT_DECL([], [finish_eval], [1], 5034e4f6584cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 5035e4f6584cSmrg not shown]]) 5036e4f6584cSmrg_LT_DECL([], [hardcode_into_libs], [0], 5037e4f6584cSmrg [Whether we should hardcode library paths into libraries]) 5038e4f6584cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5039e4f6584cSmrg [Compile-time system search path for libraries]) 5040e4f6584cSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5041e4f6584cSmrg [Run-time system search path for libraries]) 5042e4f6584cSmrg])# _LT_SYS_DYNAMIC_LINKER 5043e4f6584cSmrg 5044e4f6584cSmrg 5045e4f6584cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 5046e4f6584cSmrg# -------------------------- 5047e4f6584cSmrg# find a file program which can recognize shared library 5048e4f6584cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5049e4f6584cSmrg[m4_require([_LT_DECL_EGREP])dnl 5050e4f6584cSmrgAC_MSG_CHECKING([for $1]) 5051e4f6584cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5052e4f6584cSmrg[case $MAGIC_CMD in 5053e4f6584cSmrg[[\\/*] | ?:[\\/]*]) 5054e4f6584cSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5055e4f6584cSmrg ;; 5056e4f6584cSmrg*) 5057e4f6584cSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5058e4f6584cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5059e4f6584cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5060e4f6584cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5061e4f6584cSmrgdnl not every word. This closes a longstanding sh security hole. 5062e4f6584cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5063e4f6584cSmrg for ac_dir in $ac_dummy; do 5064e4f6584cSmrg IFS="$lt_save_ifs" 5065e4f6584cSmrg test -z "$ac_dir" && ac_dir=. 5066e4f6584cSmrg if test -f $ac_dir/$1; then 5067e4f6584cSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5068e4f6584cSmrg if test -n "$file_magic_test_file"; then 5069e4f6584cSmrg case $deplibs_check_method in 5070e4f6584cSmrg "file_magic "*) 5071e4f6584cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5072e4f6584cSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5073e4f6584cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5074e4f6584cSmrg $EGREP "$file_magic_regex" > /dev/null; then 5075e4f6584cSmrg : 5076e4f6584cSmrg else 5077e4f6584cSmrg cat <<_LT_EOF 1>&2 507809885543Smrg 5079e4f6584cSmrg*** Warning: the command libtool uses to detect shared libraries, 5080e4f6584cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 5081e4f6584cSmrg*** The result is that libtool may fail to recognize shared libraries 5082e4f6584cSmrg*** as such. This will affect the creation of libtool libraries that 5083e4f6584cSmrg*** depend on shared libraries, but programs linked with such libtool 5084e4f6584cSmrg*** libraries will work regardless of this problem. Nevertheless, you 5085e4f6584cSmrg*** may want to report the problem to your system manager and/or to 5086e4f6584cSmrg*** bug-libtool@gnu.org 508709885543Smrg 5088e4f6584cSmrg_LT_EOF 5089e4f6584cSmrg fi ;; 5090e4f6584cSmrg esac 5091e4f6584cSmrg fi 5092e4f6584cSmrg break 5093e4f6584cSmrg fi 5094e4f6584cSmrg done 5095e4f6584cSmrg IFS="$lt_save_ifs" 5096e4f6584cSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 5097e4f6584cSmrg ;; 5098e4f6584cSmrgesac]) 5099e4f6584cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5100e4f6584cSmrgif test -n "$MAGIC_CMD"; then 5101e4f6584cSmrg AC_MSG_RESULT($MAGIC_CMD) 5102e4f6584cSmrgelse 5103e4f6584cSmrg AC_MSG_RESULT(no) 5104e4f6584cSmrgfi 5105e4f6584cSmrg_LT_DECL([], [MAGIC_CMD], [0], 5106e4f6584cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5107e4f6584cSmrg])# _LT_PATH_TOOL_PREFIX 510809885543Smrg 5109e4f6584cSmrg# Old name: 5110e4f6584cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5111e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 5112e4f6584cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 511309885543Smrg 511409885543Smrg 5115e4f6584cSmrg# _LT_PATH_MAGIC 5116e4f6584cSmrg# -------------- 5117e4f6584cSmrg# find a file program which can recognize a shared library 5118e4f6584cSmrgm4_defun([_LT_PATH_MAGIC], 5119e4f6584cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5120e4f6584cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 5121e4f6584cSmrg if test -n "$ac_tool_prefix"; then 5122e4f6584cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5123e4f6584cSmrg else 5124e4f6584cSmrg MAGIC_CMD=: 5125e4f6584cSmrg fi 5126e4f6584cSmrgfi 5127e4f6584cSmrg])# _LT_PATH_MAGIC 512809885543Smrg 512909885543Smrg 5130e4f6584cSmrg# LT_PATH_LD 5131e4f6584cSmrg# ---------- 5132e4f6584cSmrg# find the pathname to the GNU or non-GNU linker 5133e4f6584cSmrgAC_DEFUN([LT_PATH_LD], 5134e4f6584cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 5135e4f6584cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 5136e4f6584cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5137e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 5138e4f6584cSmrgm4_require([_LT_DECL_EGREP])dnl 513909885543Smrg 5140e4f6584cSmrgAC_ARG_WITH([gnu-ld], 5141e4f6584cSmrg [AS_HELP_STRING([--with-gnu-ld], 5142e4f6584cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5143e4f6584cSmrg [test "$withval" = no || with_gnu_ld=yes], 5144e4f6584cSmrg [with_gnu_ld=no])dnl 514509885543Smrg 5146e4f6584cSmrgac_prog=ld 5147e4f6584cSmrgif test "$GCC" = yes; then 5148e4f6584cSmrg # Check if gcc -print-prog-name=ld gives a path. 5149e4f6584cSmrg AC_MSG_CHECKING([for ld used by $CC]) 5150e4f6584cSmrg case $host in 5151e4f6584cSmrg *-*-mingw*) 5152e4f6584cSmrg # gcc leaves a trailing carriage return which upsets mingw 5153e4f6584cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5154e4f6584cSmrg *) 5155e4f6584cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5156e4f6584cSmrg esac 5157e4f6584cSmrg case $ac_prog in 5158e4f6584cSmrg # Accept absolute paths. 5159e4f6584cSmrg [[\\/]]* | ?:[[\\/]]*) 5160e4f6584cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 5161e4f6584cSmrg # Canonicalize the pathname of ld 5162e4f6584cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5163e4f6584cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5164e4f6584cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5165e4f6584cSmrg done 5166e4f6584cSmrg test -z "$LD" && LD="$ac_prog" 5167e4f6584cSmrg ;; 5168e4f6584cSmrg "") 5169e4f6584cSmrg # If it fails, then pretend we aren't using GCC. 5170e4f6584cSmrg ac_prog=ld 5171e4f6584cSmrg ;; 5172e4f6584cSmrg *) 5173e4f6584cSmrg # If it is relative, then search for the first ld in PATH. 5174e4f6584cSmrg with_gnu_ld=unknown 5175e4f6584cSmrg ;; 5176e4f6584cSmrg esac 5177e4f6584cSmrgelif test "$with_gnu_ld" = yes; then 5178e4f6584cSmrg AC_MSG_CHECKING([for GNU ld]) 5179e4f6584cSmrgelse 5180e4f6584cSmrg AC_MSG_CHECKING([for non-GNU ld]) 5181e4f6584cSmrgfi 5182e4f6584cSmrgAC_CACHE_VAL(lt_cv_path_LD, 5183e4f6584cSmrg[if test -z "$LD"; then 5184e4f6584cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5185e4f6584cSmrg for ac_dir in $PATH; do 5186e4f6584cSmrg IFS="$lt_save_ifs" 5187e4f6584cSmrg test -z "$ac_dir" && ac_dir=. 5188e4f6584cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5189e4f6584cSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 5190e4f6584cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 5191e4f6584cSmrg # but apparently some variants of GNU ld only accept -v. 5192e4f6584cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 5193e4f6584cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5194e4f6584cSmrg *GNU* | *'with BFD'*) 5195e4f6584cSmrg test "$with_gnu_ld" != no && break 5196e4f6584cSmrg ;; 5197e4f6584cSmrg *) 5198e4f6584cSmrg test "$with_gnu_ld" != yes && break 5199e4f6584cSmrg ;; 5200e4f6584cSmrg esac 5201e4f6584cSmrg fi 5202e4f6584cSmrg done 5203e4f6584cSmrg IFS="$lt_save_ifs" 5204e4f6584cSmrgelse 5205e4f6584cSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 5206e4f6584cSmrgfi]) 5207e4f6584cSmrgLD="$lt_cv_path_LD" 5208e4f6584cSmrgif test -n "$LD"; then 5209e4f6584cSmrg AC_MSG_RESULT($LD) 5210e4f6584cSmrgelse 5211e4f6584cSmrg AC_MSG_RESULT(no) 5212e4f6584cSmrgfi 5213e4f6584cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5214e4f6584cSmrg_LT_PATH_LD_GNU 5215e4f6584cSmrgAC_SUBST([LD]) 521609885543Smrg 5217e4f6584cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5218e4f6584cSmrg])# LT_PATH_LD 521909885543Smrg 5220e4f6584cSmrg# Old names: 5221e4f6584cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5222e4f6584cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5223e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 5224e4f6584cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 5225e4f6584cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 522609885543Smrg 522709885543Smrg 5228e4f6584cSmrg# _LT_PATH_LD_GNU 5229e4f6584cSmrg#- -------------- 5230e4f6584cSmrgm4_defun([_LT_PATH_LD_GNU], 5231e4f6584cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5232e4f6584cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5233e4f6584cSmrgcase `$LD -v 2>&1 </dev/null` in 5234e4f6584cSmrg*GNU* | *'with BFD'*) 5235e4f6584cSmrg lt_cv_prog_gnu_ld=yes 5236e4f6584cSmrg ;; 5237e4f6584cSmrg*) 5238e4f6584cSmrg lt_cv_prog_gnu_ld=no 5239e4f6584cSmrg ;; 5240e4f6584cSmrgesac]) 5241e4f6584cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5242e4f6584cSmrg])# _LT_PATH_LD_GNU 524309885543Smrg 524409885543Smrg 5245e4f6584cSmrg# _LT_CMD_RELOAD 5246e4f6584cSmrg# -------------- 5247e4f6584cSmrg# find reload flag for linker 5248e4f6584cSmrg# -- PORTME Some linkers may need a different reload flag. 5249e4f6584cSmrgm4_defun([_LT_CMD_RELOAD], 5250e4f6584cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 5251e4f6584cSmrg lt_cv_ld_reload_flag, 5252e4f6584cSmrg [lt_cv_ld_reload_flag='-r']) 5253e4f6584cSmrgreload_flag=$lt_cv_ld_reload_flag 5254e4f6584cSmrgcase $reload_flag in 5255e4f6584cSmrg"" | " "*) ;; 5256e4f6584cSmrg*) reload_flag=" $reload_flag" ;; 5257e4f6584cSmrgesac 5258e4f6584cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 5259e4f6584cSmrgcase $host_os in 5260e4f6584cSmrg darwin*) 5261e4f6584cSmrg if test "$GCC" = yes; then 5262e4f6584cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5263e4f6584cSmrg else 5264e4f6584cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5265e4f6584cSmrg fi 5266e4f6584cSmrg ;; 5267e4f6584cSmrgesac 5268e4f6584cSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5269e4f6584cSmrg_LT_DECL([], [reload_cmds], [2])dnl 5270e4f6584cSmrg])# _LT_CMD_RELOAD 527109885543Smrg 527209885543Smrg 5273e4f6584cSmrg# _LT_CHECK_MAGIC_METHOD 5274e4f6584cSmrg# ---------------------- 5275e4f6584cSmrg# how to check for library dependencies 5276e4f6584cSmrg# -- PORTME fill in with the dynamic library characteristics 5277e4f6584cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5278e4f6584cSmrg[m4_require([_LT_DECL_EGREP]) 5279e4f6584cSmrgm4_require([_LT_DECL_OBJDUMP]) 5280e4f6584cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 5281e4f6584cSmrglt_cv_deplibs_check_method, 5282e4f6584cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 5283e4f6584cSmrglt_cv_file_magic_test_file= 5284e4f6584cSmrglt_cv_deplibs_check_method='unknown' 5285e4f6584cSmrg# Need to set the preceding variable on all platforms that support 5286e4f6584cSmrg# interlibrary dependencies. 5287e4f6584cSmrg# 'none' -- dependencies not supported. 5288e4f6584cSmrg# `unknown' -- same as none, but documents that we really don't know. 5289e4f6584cSmrg# 'pass_all' -- all dependencies passed with no checks. 5290e4f6584cSmrg# 'test_compile' -- check by making test program. 5291e4f6584cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 5292e4f6584cSmrg# which responds to the $file_magic_cmd with a given extended regex. 5293e4f6584cSmrg# If you have `file' or equivalent on your system and you're not sure 5294e4f6584cSmrg# whether `pass_all' will *always* work, you probably want this one. 529509885543Smrg 5296e4f6584cSmrgcase $host_os in 5297e4f6584cSmrgaix[[4-9]]*) 5298e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5299e4f6584cSmrg ;; 530009885543Smrg 5301e4f6584cSmrgbeos*) 5302e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5303e4f6584cSmrg ;; 530409885543Smrg 5305e4f6584cSmrgbsdi[[45]]*) 5306e4f6584cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5307e4f6584cSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 5308e4f6584cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 5309e4f6584cSmrg ;; 531009885543Smrg 5311e4f6584cSmrgcygwin*) 5312e4f6584cSmrg # func_win32_libid is a shell function defined in ltmain.sh 5313e4f6584cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5314e4f6584cSmrg lt_cv_file_magic_cmd='func_win32_libid' 5315e4f6584cSmrg ;; 531609885543Smrg 5317e4f6584cSmrgmingw* | pw32*) 5318e4f6584cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 5319e4f6584cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 5320e4f6584cSmrg # unless we find 'file', for example because we are cross-compiling. 5321e4f6584cSmrg if ( file / ) >/dev/null 2>&1; then 5322e4f6584cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5323e4f6584cSmrg lt_cv_file_magic_cmd='func_win32_libid' 5324e4f6584cSmrg else 5325e4f6584cSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 5326e4f6584cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5327e4f6584cSmrg fi 5328e4f6584cSmrg ;; 532909885543Smrg 5330e4f6584cSmrgcegcc) 5331e4f6584cSmrg # use the weaker test based on 'objdump'. See mingw*. 5332e4f6584cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5333e4f6584cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5334e4f6584cSmrg ;; 533509885543Smrg 5336e4f6584cSmrgdarwin* | rhapsody*) 5337e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5338e4f6584cSmrg ;; 533909885543Smrg 5340e4f6584cSmrgfreebsd* | dragonfly*) 5341e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5342e4f6584cSmrg case $host_cpu in 5343e4f6584cSmrg i*86 ) 5344e4f6584cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 5345e4f6584cSmrg # Let's accept both of them until this is cleared up. 5346e4f6584cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5347e4f6584cSmrg lt_cv_file_magic_cmd=/usr/bin/file 5348e4f6584cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5349e4f6584cSmrg ;; 5350e4f6584cSmrg esac 5351e4f6584cSmrg else 5352e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5353e4f6584cSmrg fi 5354e4f6584cSmrg ;; 535509885543Smrg 5356e4f6584cSmrggnu*) 5357e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5358e4f6584cSmrg ;; 535909885543Smrg 5360e4f6584cSmrghpux10.20* | hpux11*) 5361e4f6584cSmrg lt_cv_file_magic_cmd=/usr/bin/file 5362e4f6584cSmrg case $host_cpu in 5363e4f6584cSmrg ia64*) 5364e4f6584cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5365e4f6584cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5366e4f6584cSmrg ;; 5367e4f6584cSmrg hppa*64*) 5368e4f6584cSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 5369e4f6584cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5370e4f6584cSmrg ;; 5371e4f6584cSmrg *) 5372e4f6584cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 5373e4f6584cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 5374e4f6584cSmrg ;; 5375e4f6584cSmrg esac 5376e4f6584cSmrg ;; 537709885543Smrg 5378e4f6584cSmrginterix[[3-9]]*) 5379e4f6584cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5380e4f6584cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5381e4f6584cSmrg ;; 538209885543Smrg 5383e4f6584cSmrgirix5* | irix6* | nonstopux*) 5384e4f6584cSmrg case $LD in 5385e4f6584cSmrg *-32|*"-32 ") libmagic=32-bit;; 5386e4f6584cSmrg *-n32|*"-n32 ") libmagic=N32;; 5387e4f6584cSmrg *-64|*"-64 ") libmagic=64-bit;; 5388e4f6584cSmrg *) libmagic=never-match;; 5389e4f6584cSmrg esac 5390e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5391e4f6584cSmrg ;; 539209885543Smrg 5393e4f6584cSmrg# This must be Linux ELF. 5394e4f6584cSmrglinux* | k*bsd*-gnu) 5395e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5396e4f6584cSmrg ;; 539709885543Smrg 5398e4f6584cSmrgnetbsd*) 5399e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5400e4f6584cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5401e4f6584cSmrg else 5402e4f6584cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5403e4f6584cSmrg fi 5404e4f6584cSmrg ;; 540509885543Smrg 5406e4f6584cSmrgnewos6*) 5407e4f6584cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5408e4f6584cSmrg lt_cv_file_magic_cmd=/usr/bin/file 5409e4f6584cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 5410e4f6584cSmrg ;; 541109885543Smrg 5412e4f6584cSmrg*nto* | *qnx*) 5413e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5414e4f6584cSmrg ;; 541509885543Smrg 5416e4f6584cSmrgopenbsd*) 5417e4f6584cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5418e4f6584cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5419e4f6584cSmrg else 5420e4f6584cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5421e4f6584cSmrg fi 5422e4f6584cSmrg ;; 54232ec8c4b4Smrg 5424e4f6584cSmrgosf3* | osf4* | osf5*) 5425e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5426e4f6584cSmrg ;; 54272ec8c4b4Smrg 5428e4f6584cSmrgrdos*) 5429e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5430e4f6584cSmrg ;; 54312ec8c4b4Smrg 5432e4f6584cSmrgsolaris*) 5433e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5434e4f6584cSmrg ;; 54352ec8c4b4Smrg 5436e4f6584cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5437e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5438e4f6584cSmrg ;; 54392ec8c4b4Smrg 5440e4f6584cSmrgsysv4 | sysv4.3*) 5441e4f6584cSmrg case $host_vendor in 5442e4f6584cSmrg motorola) 5443e4f6584cSmrg 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]]' 5444e4f6584cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5445e4f6584cSmrg ;; 5446e4f6584cSmrg ncr) 5447e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5448e4f6584cSmrg ;; 5449e4f6584cSmrg sequent) 5450e4f6584cSmrg lt_cv_file_magic_cmd='/bin/file' 5451e4f6584cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5452e4f6584cSmrg ;; 5453e4f6584cSmrg sni) 5454e4f6584cSmrg lt_cv_file_magic_cmd='/bin/file' 5455e4f6584cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5456e4f6584cSmrg lt_cv_file_magic_test_file=/lib/libc.so 5457e4f6584cSmrg ;; 5458e4f6584cSmrg siemens) 5459e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5460e4f6584cSmrg ;; 5461e4f6584cSmrg pc) 5462e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5463b698ba48Smrg ;; 5464b698ba48Smrg esac 5465e4f6584cSmrg ;; 54662ec8c4b4Smrg 5467e4f6584cSmrgtpf*) 5468e4f6584cSmrg lt_cv_deplibs_check_method=pass_all 5469e4f6584cSmrg ;; 5470e4f6584cSmrgesac 5471b698ba48Smrg]) 5472e4f6584cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 5473e4f6584cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 5474e4f6584cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5475e4f6584cSmrg 5476e4f6584cSmrg_LT_DECL([], [deplibs_check_method], [1], 5477e4f6584cSmrg [Method to check whether dependent libraries are shared objects]) 5478e4f6584cSmrg_LT_DECL([], [file_magic_cmd], [1], 5479e4f6584cSmrg [Command to use when deplibs_check_method == "file_magic"]) 5480e4f6584cSmrg])# _LT_CHECK_MAGIC_METHOD 5481e4f6584cSmrg 5482e4f6584cSmrg 5483e4f6584cSmrg# LT_PATH_NM 5484e4f6584cSmrg# ---------- 5485e4f6584cSmrg# find the pathname to a BSD- or MS-compatible name lister 5486e4f6584cSmrgAC_DEFUN([LT_PATH_NM], 5487e4f6584cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 5488e4f6584cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5489e4f6584cSmrg[if test -n "$NM"; then 5490e4f6584cSmrg # Let the user override the test. 5491e4f6584cSmrg lt_cv_path_NM="$NM" 5492e4f6584cSmrgelse 5493e4f6584cSmrg lt_nm_to_check="${ac_tool_prefix}nm" 5494e4f6584cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5495e4f6584cSmrg lt_nm_to_check="$lt_nm_to_check nm" 5496e4f6584cSmrg fi 5497e4f6584cSmrg for lt_tmp_nm in $lt_nm_to_check; do 5498e4f6584cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5499e4f6584cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5500e4f6584cSmrg IFS="$lt_save_ifs" 5501e4f6584cSmrg test -z "$ac_dir" && ac_dir=. 5502e4f6584cSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 5503e4f6584cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 5504e4f6584cSmrg # Check to see if the nm accepts a BSD-compat flag. 5505e4f6584cSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 5506e4f6584cSmrg # nm: unknown option "B" ignored 5507e4f6584cSmrg # Tru64's nm complains that /dev/null is an invalid object file 5508e4f6584cSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 5509e4f6584cSmrg */dev/null* | *'Invalid file or object type'*) 5510e4f6584cSmrg lt_cv_path_NM="$tmp_nm -B" 5511e4f6584cSmrg break 5512e4f6584cSmrg ;; 5513e4f6584cSmrg *) 5514e4f6584cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5515e4f6584cSmrg */dev/null*) 5516e4f6584cSmrg lt_cv_path_NM="$tmp_nm -p" 5517e4f6584cSmrg break 5518e4f6584cSmrg ;; 5519e4f6584cSmrg *) 5520e4f6584cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5521e4f6584cSmrg continue # so that we can try to find one that supports BSD flags 5522e4f6584cSmrg ;; 5523e4f6584cSmrg esac 5524e4f6584cSmrg ;; 5525e4f6584cSmrg esac 5526e4f6584cSmrg fi 5527e4f6584cSmrg done 5528e4f6584cSmrg IFS="$lt_save_ifs" 5529e4f6584cSmrg done 5530e4f6584cSmrg : ${lt_cv_path_NM=no} 5531e4f6584cSmrgfi]) 5532e4f6584cSmrgif test "$lt_cv_path_NM" != "no"; then 5533e4f6584cSmrg NM="$lt_cv_path_NM" 553409885543Smrgelse 5535e4f6584cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 5536e4f6584cSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 5537e4f6584cSmrg AC_SUBST([DUMPBIN]) 5538e4f6584cSmrg if test "$DUMPBIN" != ":"; then 5539e4f6584cSmrg NM="$DUMPBIN" 5540b698ba48Smrg fi 554109885543Smrgfi 5542e4f6584cSmrgtest -z "$NM" && NM=nm 5543e4f6584cSmrgAC_SUBST([NM]) 5544e4f6584cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5545e4f6584cSmrg 5546e4f6584cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5547e4f6584cSmrg [lt_cv_nm_interface="BSD nm" 5548e4f6584cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 5549e4f6584cSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5550e4f6584cSmrg (eval "$ac_compile" 2>conftest.err) 5551e4f6584cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5552e4f6584cSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5553e4f6584cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5554e4f6584cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5555e4f6584cSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 5556e4f6584cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 5557e4f6584cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5558e4f6584cSmrg lt_cv_nm_interface="MS dumpbin" 5559e4f6584cSmrg fi 5560e4f6584cSmrg rm -f conftest*]) 5561e4f6584cSmrg])# LT_PATH_NM 556209885543Smrg 5563e4f6584cSmrg# Old names: 5564e4f6584cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5565e4f6584cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5566e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 5567e4f6584cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 5568e4f6584cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 556909885543Smrg 55702ec8c4b4Smrg 5571e4f6584cSmrg# LT_LIB_M 5572e4f6584cSmrg# -------- 5573e4f6584cSmrg# check for math library 5574e4f6584cSmrgAC_DEFUN([LT_LIB_M], 5575e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5576e4f6584cSmrgLIBM= 5577e4f6584cSmrgcase $host in 5578e4f6584cSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 5579e4f6584cSmrg # These system don't have libm, or don't need it 5580e4f6584cSmrg ;; 5581e4f6584cSmrg*-ncr-sysv4.3*) 5582e4f6584cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 5583e4f6584cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 5584e4f6584cSmrg ;; 5585e4f6584cSmrg*) 5586e4f6584cSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 5587e4f6584cSmrg ;; 5588e4f6584cSmrgesac 5589e4f6584cSmrgAC_SUBST([LIBM]) 5590e4f6584cSmrg])# LT_LIB_M 5591e4f6584cSmrg 5592e4f6584cSmrg# Old name: 5593e4f6584cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5594e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 5595e4f6584cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 5596e4f6584cSmrg 5597e4f6584cSmrg 5598e4f6584cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5599e4f6584cSmrg# ------------------------------- 5600e4f6584cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 5601e4f6584cSmrg[m4_require([_LT_TAG_COMPILER])dnl 5602e4f6584cSmrg 5603e4f6584cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 56042ec8c4b4Smrg 5605b698ba48Smrgif test "$GCC" = yes; then 5606e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 56072ec8c4b4Smrg 5608e4f6584cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5609b698ba48Smrg lt_cv_prog_compiler_rtti_exceptions, 5610b698ba48Smrg [-fno-rtti -fno-exceptions], [], 5611e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 56122ec8c4b4Smrgfi 5613e4f6584cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5614e4f6584cSmrg [Compiler flag to turn off builtin functions]) 5615e4f6584cSmrg])# _LT_COMPILER_NO_RTTI 56162ec8c4b4Smrg 56172ec8c4b4Smrg 5618e4f6584cSmrg# _LT_CMD_GLOBAL_SYMBOLS 5619e4f6584cSmrg# ---------------------- 5620e4f6584cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5621e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5622e4f6584cSmrgAC_REQUIRE([AC_PROG_CC])dnl 5623e4f6584cSmrgAC_REQUIRE([LT_PATH_NM])dnl 5624e4f6584cSmrgAC_REQUIRE([LT_PATH_LD])dnl 5625e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 5626e4f6584cSmrgm4_require([_LT_DECL_EGREP])dnl 5627e4f6584cSmrgm4_require([_LT_TAG_COMPILER])dnl 5628e4f6584cSmrg 5629b698ba48Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5630b698ba48SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5631b698ba48SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5632b698ba48Smrg[ 5633b698ba48Smrg# These are sane defaults that work on at least a few old systems. 5634b698ba48Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 56352ec8c4b4Smrg 5636b698ba48Smrg# Character class describing NM global symbol codes. 5637b698ba48Smrgsymcode='[[BCDEGRST]]' 56382ec8c4b4Smrg 5639b698ba48Smrg# Regexp to match symbols that can be accessed directly from C. 5640b698ba48Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 56412ec8c4b4Smrg 5642b698ba48Smrg# Define system-specific variables. 5643b698ba48Smrgcase $host_os in 5644b698ba48Smrgaix*) 5645b698ba48Smrg symcode='[[BCDT]]' 5646b698ba48Smrg ;; 5647e4f6584cSmrgcygwin* | mingw* | pw32* | cegcc*) 5648b698ba48Smrg symcode='[[ABCDGISTW]]' 5649b698ba48Smrg ;; 5650e4f6584cSmrghpux*) 5651b698ba48Smrg if test "$host_cpu" = ia64; then 5652b698ba48Smrg symcode='[[ABCDEGRST]]' 5653b698ba48Smrg fi 5654b698ba48Smrg ;; 5655b698ba48Smrgirix* | nonstopux*) 5656b698ba48Smrg symcode='[[BCDEGRST]]' 5657b698ba48Smrg ;; 5658b698ba48Smrgosf*) 5659b698ba48Smrg symcode='[[BCDEGQRST]]' 5660b698ba48Smrg ;; 5661b698ba48Smrgsolaris*) 5662b698ba48Smrg symcode='[[BDRT]]' 5663b698ba48Smrg ;; 5664b698ba48Smrgsco3.2v5*) 5665b698ba48Smrg symcode='[[DT]]' 5666b698ba48Smrg ;; 5667b698ba48Smrgsysv4.2uw2*) 5668b698ba48Smrg symcode='[[DT]]' 5669b698ba48Smrg ;; 5670b698ba48Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5671b698ba48Smrg symcode='[[ABDT]]' 5672b698ba48Smrg ;; 5673b698ba48Smrgsysv4) 5674b698ba48Smrg symcode='[[DFNSTU]]' 5675b698ba48Smrg ;; 5676b698ba48Smrgesac 56772ec8c4b4Smrg 5678e4f6584cSmrg# If we're using GNU nm, then use its standard symbol codes. 5679e4f6584cSmrgcase `$NM -V 2>&1` in 5680e4f6584cSmrg*GNU* | *'with BFD'*) 5681e4f6584cSmrg symcode='[[ABCDGIRSTW]]' ;; 5682e4f6584cSmrgesac 5683e4f6584cSmrg 5684e4f6584cSmrg# Transform an extracted symbol line into a proper C declaration. 5685e4f6584cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 5686e4f6584cSmrg# so use this general approach. 5687e4f6584cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5688e4f6584cSmrg 5689e4f6584cSmrg# Transform an extracted symbol line into symbol name and symbol address 5690e4f6584cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5691e4f6584cSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 5692e4f6584cSmrg 5693b698ba48Smrg# Handle CRLF in mingw tool chain 5694b698ba48Smrgopt_cr= 5695b698ba48Smrgcase $build_os in 5696b698ba48Smrgmingw*) 5697e4f6584cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5698b698ba48Smrg ;; 5699b698ba48Smrgesac 57002ec8c4b4Smrg 5701e4f6584cSmrg# Try without a prefix underscore, then with it. 5702b698ba48Smrgfor ac_symprfx in "" "_"; do 57032ec8c4b4Smrg 5704b698ba48Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5705b698ba48Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 57062ec8c4b4Smrg 5707b698ba48Smrg # Write the raw and C identifiers. 5708e4f6584cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5709e4f6584cSmrg # Fake it for dumpbin and say T for any non-static function 5710e4f6584cSmrg # and D for any global variable. 5711e4f6584cSmrg # Also find C++ and __fastcall symbols from MSVC++, 5712e4f6584cSmrg # which start with @ or ?. 5713e4f6584cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5714e4f6584cSmrg" {last_section=section; section=\$ 3};"\ 5715e4f6584cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5716e4f6584cSmrg" \$ 0!~/External *\|/{next};"\ 5717e4f6584cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5718e4f6584cSmrg" {if(hide[section]) next};"\ 5719e4f6584cSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5720e4f6584cSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5721e4f6584cSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5722e4f6584cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5723e4f6584cSmrg" ' prfx=^$ac_symprfx]" 5724e4f6584cSmrg else 5725e4f6584cSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5726e4f6584cSmrg fi 57272ec8c4b4Smrg 5728b698ba48Smrg # Check to see that the pipe works correctly. 5729b698ba48Smrg pipe_works=no 57302ec8c4b4Smrg 5731b698ba48Smrg rm -f conftest* 5732e4f6584cSmrg cat > conftest.$ac_ext <<_LT_EOF 5733b698ba48Smrg#ifdef __cplusplus 5734b698ba48Smrgextern "C" { 5735b698ba48Smrg#endif 5736b698ba48Smrgchar nm_test_var; 5737e4f6584cSmrgvoid nm_test_func(void); 5738e4f6584cSmrgvoid nm_test_func(void){} 5739b698ba48Smrg#ifdef __cplusplus 5740b698ba48Smrg} 5741b698ba48Smrg#endif 5742b698ba48Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 5743e4f6584cSmrg_LT_EOF 574409885543Smrg 5745b698ba48Smrg if AC_TRY_EVAL(ac_compile); then 5746b698ba48Smrg # Now try to grab the symbols. 5747b698ba48Smrg nlist=conftest.nm 5748b698ba48Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 5749b698ba48Smrg # Try sorting and uniquifying the output. 5750b698ba48Smrg if sort "$nlist" | uniq > "$nlist"T; then 5751b698ba48Smrg mv -f "$nlist"T "$nlist" 5752b698ba48Smrg else 5753b698ba48Smrg rm -f "$nlist"T 5754b698ba48Smrg fi 57552ec8c4b4Smrg 5756b698ba48Smrg # Make sure that we snagged all the symbols we need. 5757e4f6584cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5758e4f6584cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5759e4f6584cSmrg cat <<_LT_EOF > conftest.$ac_ext 5760b698ba48Smrg#ifdef __cplusplus 5761b698ba48Smrgextern "C" { 5762b698ba48Smrg#endif 57632ec8c4b4Smrg 5764e4f6584cSmrg_LT_EOF 5765b698ba48Smrg # Now generate the symbol file. 5766e4f6584cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 57672ec8c4b4Smrg 5768e4f6584cSmrg cat <<_LT_EOF >> conftest.$ac_ext 57692ec8c4b4Smrg 5770e4f6584cSmrg/* The mapping between symbol names and symbols. */ 5771b698ba48Smrgconst struct { 5772b698ba48Smrg const char *name; 5773e4f6584cSmrg void *address; 5774b698ba48Smrg} 5775e4f6584cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5776b698ba48Smrg{ 5777e4f6584cSmrg { "@PROGRAM@", (void *) 0 }, 5778e4f6584cSmrg_LT_EOF 5779e4f6584cSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 5780e4f6584cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 5781e4f6584cSmrg {0, (void *) 0} 5782b698ba48Smrg}; 57832ec8c4b4Smrg 5784e4f6584cSmrg/* This works around a problem in FreeBSD linker */ 5785e4f6584cSmrg#ifdef FREEBSD_WORKAROUND 5786e4f6584cSmrgstatic const void *lt_preloaded_setup() { 5787e4f6584cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 5788e4f6584cSmrg} 5789e4f6584cSmrg#endif 5790e4f6584cSmrg 5791b698ba48Smrg#ifdef __cplusplus 5792b698ba48Smrg} 5793b698ba48Smrg#endif 5794e4f6584cSmrg_LT_EOF 5795b698ba48Smrg # Now try linking the two files. 5796b698ba48Smrg mv conftest.$ac_objext conftstm.$ac_objext 5797b698ba48Smrg lt_save_LIBS="$LIBS" 5798b698ba48Smrg lt_save_CFLAGS="$CFLAGS" 5799b698ba48Smrg LIBS="conftstm.$ac_objext" 5800e4f6584cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5801b698ba48Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5802b698ba48Smrg pipe_works=yes 5803b698ba48Smrg fi 5804b698ba48Smrg LIBS="$lt_save_LIBS" 5805b698ba48Smrg CFLAGS="$lt_save_CFLAGS" 5806b698ba48Smrg else 5807b698ba48Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 58082ec8c4b4Smrg fi 5809b698ba48Smrg else 5810b698ba48Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5811b698ba48Smrg fi 5812b698ba48Smrg else 5813b698ba48Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5814b698ba48Smrg fi 5815b698ba48Smrg else 5816b698ba48Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5817b698ba48Smrg cat conftest.$ac_ext >&5 5818b698ba48Smrg fi 5819b698ba48Smrg rm -rf conftest* conftst* 582009885543Smrg 5821b698ba48Smrg # Do not use the global_symbol_pipe unless it works. 5822b698ba48Smrg if test "$pipe_works" = yes; then 5823b698ba48Smrg break 5824b698ba48Smrg else 5825b698ba48Smrg lt_cv_sys_global_symbol_pipe= 5826b698ba48Smrg fi 5827b698ba48Smrgdone 5828b698ba48Smrg]) 5829b698ba48Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 5830b698ba48Smrg lt_cv_sys_global_symbol_to_cdecl= 5831b698ba48Smrgfi 5832b698ba48Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5833b698ba48Smrg AC_MSG_RESULT(failed) 5834b698ba48Smrgelse 5835b698ba48Smrg AC_MSG_RESULT(ok) 5836b698ba48Smrgfi 583709885543Smrg 5838e4f6584cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5839e4f6584cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 5840e4f6584cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5841e4f6584cSmrg [Transform the output of nm in a proper C declaration]) 5842e4f6584cSmrg_LT_DECL([global_symbol_to_c_name_address], 5843e4f6584cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 5844e4f6584cSmrg [Transform the output of nm in a C name address pair]) 5845e4f6584cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5846e4f6584cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5847e4f6584cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5848e4f6584cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 584909885543Smrg 5850e4f6584cSmrg 5851e4f6584cSmrg# _LT_COMPILER_PIC([TAGNAME]) 5852e4f6584cSmrg# --------------------------- 5853e4f6584cSmrgm4_defun([_LT_COMPILER_PIC], 5854e4f6584cSmrg[m4_require([_LT_TAG_COMPILER])dnl 5855e4f6584cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5856e4f6584cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5857e4f6584cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 585809885543Smrg 5859b698ba48SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5860e4f6584cSmrgm4_if([$1], [CXX], [ 5861b698ba48Smrg # C++ specific cases for pic, static, wl, etc. 5862b698ba48Smrg if test "$GXX" = yes; then 5863e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5864e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 586509885543Smrg 5866b698ba48Smrg case $host_os in 5867b698ba48Smrg aix*) 5868b698ba48Smrg # All AIX code is PIC. 5869b698ba48Smrg if test "$host_cpu" = ia64; then 5870b698ba48Smrg # AIX 5 now supports IA64 processor 5871e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5872b698ba48Smrg fi 5873b698ba48Smrg ;; 5874e4f6584cSmrg 5875b698ba48Smrg amigaos*) 5876e4f6584cSmrg case $host_cpu in 5877e4f6584cSmrg powerpc) 5878e4f6584cSmrg # see comment about AmigaOS4 .so support 5879e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5880e4f6584cSmrg ;; 5881e4f6584cSmrg m68k) 5882e4f6584cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5883e4f6584cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5884e4f6584cSmrg # like `-m68040'. 5885e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5886e4f6584cSmrg ;; 5887e4f6584cSmrg esac 5888b698ba48Smrg ;; 5889e4f6584cSmrg 5890b698ba48Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5891b698ba48Smrg # PIC is the default for these OSes. 5892b698ba48Smrg ;; 5893e4f6584cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5894b698ba48Smrg # This hack is so that the source file can tell whether it is being 5895b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 5896b698ba48Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5897b698ba48Smrg # (--disable-auto-import) libraries 5898b698ba48Smrg m4_if([$1], [GCJ], [], 5899e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5900b698ba48Smrg ;; 5901b698ba48Smrg darwin* | rhapsody*) 5902b698ba48Smrg # PIC is the default on this platform 5903b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 5904e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5905b698ba48Smrg ;; 5906b698ba48Smrg *djgpp*) 5907b698ba48Smrg # DJGPP does not support shared libraries at all 5908e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5909b698ba48Smrg ;; 5910b698ba48Smrg interix[[3-9]]*) 5911b698ba48Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5912b698ba48Smrg # Instead, we relocate shared libraries at runtime. 5913b698ba48Smrg ;; 5914b698ba48Smrg sysv4*MP*) 5915b698ba48Smrg if test -d /usr/nec; then 5916e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5917b698ba48Smrg fi 5918b698ba48Smrg ;; 5919b698ba48Smrg hpux*) 5920e4f6584cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5921e4f6584cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5922e4f6584cSmrg # sets the default TLS model and affects inlining. 5923b698ba48Smrg case $host_cpu in 5924e4f6584cSmrg hppa*64*) 5925b698ba48Smrg ;; 5926b698ba48Smrg *) 5927e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5928b698ba48Smrg ;; 5929b698ba48Smrg esac 5930b698ba48Smrg ;; 5931e4f6584cSmrg *qnx* | *nto*) 5932e4f6584cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5933e4f6584cSmrg # it will coredump. 5934e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5935e4f6584cSmrg ;; 5936b698ba48Smrg *) 5937e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5938b698ba48Smrg ;; 5939b698ba48Smrg esac 5940b698ba48Smrg else 5941b698ba48Smrg case $host_os in 5942b698ba48Smrg aix[[4-9]]*) 5943b698ba48Smrg # All AIX code is PIC. 5944b698ba48Smrg if test "$host_cpu" = ia64; then 5945b698ba48Smrg # AIX 5 now supports IA64 processor 5946e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5947b698ba48Smrg else 5948e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5949b698ba48Smrg fi 5950b698ba48Smrg ;; 5951b698ba48Smrg chorus*) 5952b698ba48Smrg case $cc_basename in 5953b698ba48Smrg cxch68*) 5954b698ba48Smrg # Green Hills C++ Compiler 5955e4f6584cSmrg # _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" 5956b698ba48Smrg ;; 5957b698ba48Smrg esac 5958b698ba48Smrg ;; 5959b698ba48Smrg dgux*) 5960b698ba48Smrg case $cc_basename in 5961b698ba48Smrg ec++*) 5962e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5963b698ba48Smrg ;; 5964b698ba48Smrg ghcx*) 5965b698ba48Smrg # Green Hills C++ Compiler 5966e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5967b698ba48Smrg ;; 5968b698ba48Smrg *) 5969b698ba48Smrg ;; 5970b698ba48Smrg esac 5971b698ba48Smrg ;; 5972b698ba48Smrg freebsd* | dragonfly*) 5973b698ba48Smrg # FreeBSD uses GNU C++ 5974b698ba48Smrg ;; 5975b698ba48Smrg hpux9* | hpux10* | hpux11*) 5976b698ba48Smrg case $cc_basename in 5977b698ba48Smrg CC*) 5978e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5979e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5980b698ba48Smrg if test "$host_cpu" != ia64; then 5981e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5982b698ba48Smrg fi 5983b698ba48Smrg ;; 5984b698ba48Smrg aCC*) 5985e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5986e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5987b698ba48Smrg case $host_cpu in 5988b698ba48Smrg hppa*64*|ia64*) 5989b698ba48Smrg # +Z the default 5990b698ba48Smrg ;; 5991b698ba48Smrg *) 5992e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5993b698ba48Smrg ;; 5994b698ba48Smrg esac 5995b698ba48Smrg ;; 5996b698ba48Smrg *) 5997b698ba48Smrg ;; 5998b698ba48Smrg esac 5999b698ba48Smrg ;; 6000b698ba48Smrg interix*) 6001b698ba48Smrg # This is c89, which is MS Visual C++ (no shared libs) 6002b698ba48Smrg # Anyone wants to do a port? 6003b698ba48Smrg ;; 6004b698ba48Smrg irix5* | irix6* | nonstopux*) 6005b698ba48Smrg case $cc_basename in 6006b698ba48Smrg CC*) 6007e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6008e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6009b698ba48Smrg # CC pic flag -KPIC is the default. 6010b698ba48Smrg ;; 6011b698ba48Smrg *) 6012b698ba48Smrg ;; 6013b698ba48Smrg esac 6014b698ba48Smrg ;; 6015b698ba48Smrg linux* | k*bsd*-gnu) 6016b698ba48Smrg case $cc_basename in 6017b698ba48Smrg KCC*) 6018b698ba48Smrg # KAI C++ Compiler 6019e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6020e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6021b698ba48Smrg ;; 6022e4f6584cSmrg ecpc* ) 6023e4f6584cSmrg # old Intel C++ for x86_64 which still supported -KPIC. 6024e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6025e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6026e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6027e4f6584cSmrg ;; 6028e4f6584cSmrg icpc* ) 6029e4f6584cSmrg # Intel C++, used to be incompatible with GCC. 6030e4f6584cSmrg # ICC 10 doesn't accept -KPIC any more. 6031e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6032e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6033e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6034b698ba48Smrg ;; 6035b698ba48Smrg pgCC* | pgcpp*) 6036e4f6584cSmrg # Portland Group C++ compiler 6037e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6038e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6039e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6040b698ba48Smrg ;; 6041b698ba48Smrg cxx*) 6042b698ba48Smrg # Compaq C++ 6043b698ba48Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6044b698ba48Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6045e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6046e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6047e4f6584cSmrg ;; 6048e4f6584cSmrg xlc* | xlC*) 6049e4f6584cSmrg # IBM XL 8.0 on PPC 6050e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6051e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6052e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6053b698ba48Smrg ;; 6054b698ba48Smrg *) 6055b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 6056b698ba48Smrg *Sun\ C*) 6057b698ba48Smrg # Sun C++ 5.9 6058e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6059e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6060e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6061b698ba48Smrg ;; 6062b698ba48Smrg esac 6063b698ba48Smrg ;; 6064b698ba48Smrg esac 6065b698ba48Smrg ;; 6066b698ba48Smrg lynxos*) 6067b698ba48Smrg ;; 6068b698ba48Smrg m88k*) 6069b698ba48Smrg ;; 6070b698ba48Smrg mvs*) 6071b698ba48Smrg case $cc_basename in 6072b698ba48Smrg cxx*) 6073e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6074b698ba48Smrg ;; 6075b698ba48Smrg *) 6076b698ba48Smrg ;; 6077b698ba48Smrg esac 6078b698ba48Smrg ;; 6079b698ba48Smrg netbsd*) 6080b698ba48Smrg ;; 6081e4f6584cSmrg *qnx* | *nto*) 6082e4f6584cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6083e4f6584cSmrg # it will coredump. 6084e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6085e4f6584cSmrg ;; 6086b698ba48Smrg osf3* | osf4* | osf5*) 6087b698ba48Smrg case $cc_basename in 6088b698ba48Smrg KCC*) 6089e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6090b698ba48Smrg ;; 6091b698ba48Smrg RCC*) 6092b698ba48Smrg # Rational C++ 2.4.1 6093e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6094b698ba48Smrg ;; 6095b698ba48Smrg cxx*) 6096b698ba48Smrg # Digital/Compaq C++ 6097e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6098b698ba48Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6099b698ba48Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6100e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6101e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6102b698ba48Smrg ;; 6103b698ba48Smrg *) 6104b698ba48Smrg ;; 6105b698ba48Smrg esac 6106b698ba48Smrg ;; 6107b698ba48Smrg psos*) 6108b698ba48Smrg ;; 6109b698ba48Smrg solaris*) 6110b698ba48Smrg case $cc_basename in 6111b698ba48Smrg CC*) 6112b698ba48Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6113e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6114e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6115e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6116b698ba48Smrg ;; 6117b698ba48Smrg gcx*) 6118b698ba48Smrg # Green Hills C++ Compiler 6119e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6120b698ba48Smrg ;; 6121b698ba48Smrg *) 6122b698ba48Smrg ;; 6123b698ba48Smrg esac 6124b698ba48Smrg ;; 6125b698ba48Smrg sunos4*) 6126b698ba48Smrg case $cc_basename in 6127b698ba48Smrg CC*) 6128b698ba48Smrg # Sun C++ 4.x 6129e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6130e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6131b698ba48Smrg ;; 6132b698ba48Smrg lcc*) 6133b698ba48Smrg # Lucid 6134e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6135b698ba48Smrg ;; 6136b698ba48Smrg *) 6137b698ba48Smrg ;; 6138b698ba48Smrg esac 6139b698ba48Smrg ;; 6140e4f6584cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6141e4f6584cSmrg case $cc_basename in 6142e4f6584cSmrg CC*) 6143e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6144e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6145e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6146e4f6584cSmrg ;; 6147e4f6584cSmrg esac 6148e4f6584cSmrg ;; 6149b698ba48Smrg tandem*) 6150b698ba48Smrg case $cc_basename in 6151b698ba48Smrg NCC*) 6152b698ba48Smrg # NonStop-UX NCC 3.20 6153e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6154b698ba48Smrg ;; 6155b698ba48Smrg *) 6156b698ba48Smrg ;; 6157b698ba48Smrg esac 6158b698ba48Smrg ;; 6159b698ba48Smrg vxworks*) 6160b698ba48Smrg ;; 6161b698ba48Smrg *) 6162e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6163b698ba48Smrg ;; 6164b698ba48Smrg esac 6165b698ba48Smrg fi 6166b698ba48Smrg], 6167b698ba48Smrg[ 6168b698ba48Smrg if test "$GCC" = yes; then 6169e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6170e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 61712ec8c4b4Smrg 6172b698ba48Smrg case $host_os in 6173b698ba48Smrg aix*) 6174b698ba48Smrg # All AIX code is PIC. 6175b698ba48Smrg if test "$host_cpu" = ia64; then 6176b698ba48Smrg # AIX 5 now supports IA64 processor 6177e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6178b698ba48Smrg fi 6179b698ba48Smrg ;; 61802ec8c4b4Smrg 6181b698ba48Smrg amigaos*) 6182e4f6584cSmrg case $host_cpu in 6183e4f6584cSmrg powerpc) 6184e4f6584cSmrg # see comment about AmigaOS4 .so support 6185e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6186e4f6584cSmrg ;; 6187e4f6584cSmrg m68k) 6188e4f6584cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6189e4f6584cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6190e4f6584cSmrg # like `-m68040'. 6191e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6192e4f6584cSmrg ;; 6193e4f6584cSmrg esac 6194b698ba48Smrg ;; 61952ec8c4b4Smrg 6196b698ba48Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6197b698ba48Smrg # PIC is the default for these OSes. 6198b698ba48Smrg ;; 61992ec8c4b4Smrg 6200e4f6584cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6201b698ba48Smrg # This hack is so that the source file can tell whether it is being 6202b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 6203b698ba48Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6204b698ba48Smrg # (--disable-auto-import) libraries 6205b698ba48Smrg m4_if([$1], [GCJ], [], 6206e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6207b698ba48Smrg ;; 62082ec8c4b4Smrg 6209b698ba48Smrg darwin* | rhapsody*) 6210b698ba48Smrg # PIC is the default on this platform 6211b698ba48Smrg # Common symbols not allowed in MH_DYLIB files 6212e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6213e4f6584cSmrg ;; 6214e4f6584cSmrg 6215e4f6584cSmrg hpux*) 6216e4f6584cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6217e4f6584cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6218e4f6584cSmrg # sets the default TLS model and affects inlining. 6219e4f6584cSmrg case $host_cpu in 6220e4f6584cSmrg hppa*64*) 6221e4f6584cSmrg # +Z the default 6222e4f6584cSmrg ;; 6223e4f6584cSmrg *) 6224e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6225e4f6584cSmrg ;; 6226e4f6584cSmrg esac 6227b698ba48Smrg ;; 62282ec8c4b4Smrg 6229b698ba48Smrg interix[[3-9]]*) 6230b698ba48Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6231b698ba48Smrg # Instead, we relocate shared libraries at runtime. 6232b698ba48Smrg ;; 62332ec8c4b4Smrg 6234b698ba48Smrg msdosdjgpp*) 6235b698ba48Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6236b698ba48Smrg # on systems that don't support them. 6237e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6238b698ba48Smrg enable_shared=no 6239b698ba48Smrg ;; 62402ec8c4b4Smrg 6241e4f6584cSmrg *nto* | *qnx*) 6242e4f6584cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6243e4f6584cSmrg # it will coredump. 6244e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6245e4f6584cSmrg ;; 6246e4f6584cSmrg 6247b698ba48Smrg sysv4*MP*) 6248b698ba48Smrg if test -d /usr/nec; then 6249e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6250b698ba48Smrg fi 6251b698ba48Smrg ;; 62522ec8c4b4Smrg 6253b698ba48Smrg *) 6254e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6255b698ba48Smrg ;; 6256b698ba48Smrg esac 6257b698ba48Smrg else 6258b698ba48Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6259b698ba48Smrg case $host_os in 6260b698ba48Smrg aix*) 6261e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6262b698ba48Smrg if test "$host_cpu" = ia64; then 6263b698ba48Smrg # AIX 5 now supports IA64 processor 6264e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6265b698ba48Smrg else 6266e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6267b698ba48Smrg fi 6268b698ba48Smrg ;; 62692ec8c4b4Smrg 6270e4f6584cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6271b698ba48Smrg # This hack is so that the source file can tell whether it is being 6272b698ba48Smrg # built for inclusion in a dll (and should export symbols for example). 6273b698ba48Smrg m4_if([$1], [GCJ], [], 6274e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6275b698ba48Smrg ;; 62762ec8c4b4Smrg 6277b698ba48Smrg hpux9* | hpux10* | hpux11*) 6278e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6279b698ba48Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6280b698ba48Smrg # not for PA HP-UX. 6281b698ba48Smrg case $host_cpu in 6282b698ba48Smrg hppa*64*|ia64*) 6283b698ba48Smrg # +Z the default 6284b698ba48Smrg ;; 6285b698ba48Smrg *) 6286e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6287b698ba48Smrg ;; 6288b698ba48Smrg esac 6289b698ba48Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6290e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6291b698ba48Smrg ;; 62922ec8c4b4Smrg 6293b698ba48Smrg irix5* | irix6* | nonstopux*) 6294e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6295b698ba48Smrg # PIC (with -KPIC) is the default. 6296e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6297b698ba48Smrg ;; 62982ec8c4b4Smrg 6299b698ba48Smrg linux* | k*bsd*-gnu) 6300b698ba48Smrg case $cc_basename in 6301e4f6584cSmrg # old Intel for x86_64 which still supported -KPIC. 6302e4f6584cSmrg ecc*) 6303e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6304e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6305e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6306b698ba48Smrg ;; 6307e4f6584cSmrg # icc used to be incompatible with GCC. 6308e4f6584cSmrg # ICC 10 doesn't accept -KPIC any more. 6309e4f6584cSmrg icc* | ifort*) 6310e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6311e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6312e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6313e4f6584cSmrg ;; 6314e4f6584cSmrg # Lahey Fortran 8.1. 6315e4f6584cSmrg lf95*) 6316e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6317e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6318e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6319e4f6584cSmrg ;; 6320b698ba48Smrg pgcc* | pgf77* | pgf90* | pgf95*) 6321b698ba48Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6322b698ba48Smrg # which looks to be a dead project) 6323e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6324e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6325e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6326b698ba48Smrg ;; 6327b698ba48Smrg ccc*) 6328e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6329b698ba48Smrg # All Alpha code is PIC. 6330e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6331b698ba48Smrg ;; 6332e4f6584cSmrg xl*) 6333e4f6584cSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 6334e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6335e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6336e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6337e4f6584cSmrg ;; 6338b698ba48Smrg *) 6339e4f6584cSmrg case `$CC -V 2>&1 | sed 5q` in 6340b698ba48Smrg *Sun\ C*) 6341b698ba48Smrg # Sun C 5.9 6342e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6343e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6344e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6345b698ba48Smrg ;; 6346b698ba48Smrg *Sun\ F*) 6347b698ba48Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6348e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6349e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6350e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6351b698ba48Smrg ;; 6352b698ba48Smrg esac 6353b698ba48Smrg ;; 6354b698ba48Smrg esac 6355b698ba48Smrg ;; 63562ec8c4b4Smrg 6357e4f6584cSmrg newsos6) 6358e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6359e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6360e4f6584cSmrg ;; 6361e4f6584cSmrg 6362e4f6584cSmrg *nto* | *qnx*) 6363e4f6584cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6364e4f6584cSmrg # it will coredump. 6365e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6366e4f6584cSmrg ;; 6367e4f6584cSmrg 6368b698ba48Smrg osf3* | osf4* | osf5*) 6369e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6370b698ba48Smrg # All OSF/1 code is PIC. 6371e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6372b698ba48Smrg ;; 63732ec8c4b4Smrg 6374b698ba48Smrg rdos*) 6375e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6376b698ba48Smrg ;; 63772ec8c4b4Smrg 6378b698ba48Smrg solaris*) 6379e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6380e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6381b698ba48Smrg case $cc_basename in 6382b698ba48Smrg f77* | f90* | f95*) 6383e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6384b698ba48Smrg *) 6385e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6386b698ba48Smrg esac 6387b698ba48Smrg ;; 63882ec8c4b4Smrg 6389b698ba48Smrg sunos4*) 6390e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6391e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6392e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6393b698ba48Smrg ;; 63942ec8c4b4Smrg 6395b698ba48Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 6396e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6397e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6398e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6399b698ba48Smrg ;; 64002ec8c4b4Smrg 6401b698ba48Smrg sysv4*MP*) 6402b698ba48Smrg if test -d /usr/nec ;then 6403e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6404e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6405b698ba48Smrg fi 6406b698ba48Smrg ;; 64072ec8c4b4Smrg 6408b698ba48Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6409e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6410e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6411e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6412b698ba48Smrg ;; 64132ec8c4b4Smrg 6414b698ba48Smrg unicos*) 6415e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6416e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6417b698ba48Smrg ;; 64182ec8c4b4Smrg 6419b698ba48Smrg uts4*) 6420e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6421e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6422b698ba48Smrg ;; 64232ec8c4b4Smrg 6424b698ba48Smrg *) 6425e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6426b698ba48Smrg ;; 6427b698ba48Smrg esac 64282ec8c4b4Smrg fi 64292ec8c4b4Smrg]) 6430b698ba48Smrgcase $host_os in 6431b698ba48Smrg # For platforms which do not support PIC, -DPIC is meaningless: 6432b698ba48Smrg *djgpp*) 6433e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6434b698ba48Smrg ;; 6435b698ba48Smrg *) 6436e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6437b698ba48Smrg ;; 64382ec8c4b4Smrgesac 6439e4f6584cSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6440e4f6584cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6441e4f6584cSmrg [How to pass a linker flag through the compiler]) 6442e4f6584cSmrg 6443e4f6584cSmrg# 6444e4f6584cSmrg# Check to make sure the PIC flag actually works. 6445e4f6584cSmrg# 6446e4f6584cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6447e4f6584cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6448e4f6584cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6449e4f6584cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6450e4f6584cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6451e4f6584cSmrg "" | " "*) ;; 6452e4f6584cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6453e4f6584cSmrg esac], 6454e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6455e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6456e4f6584cSmrgfi 6457e4f6584cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6458e4f6584cSmrg [Additional compiler flags for building library objects]) 645909885543Smrg 6460b698ba48Smrg# 6461b698ba48Smrg# Check to make sure the static flag actually works. 6462b698ba48Smrg# 6463e4f6584cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6464e4f6584cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6465e4f6584cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6466b698ba48Smrg $lt_tmp_static_flag, 6467b698ba48Smrg [], 6468e4f6584cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6469e4f6584cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6470e4f6584cSmrg [Compiler flag to prevent dynamic linking]) 6471e4f6584cSmrg])# _LT_COMPILER_PIC 647209885543Smrg 647309885543Smrg 6474e4f6584cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 6475e4f6584cSmrg# ---------------------------- 6476b698ba48Smrg# See if the linker supports building shared libraries. 6477e4f6584cSmrgm4_defun([_LT_LINKER_SHLIBS], 6478e4f6584cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 6479e4f6584cSmrgAC_REQUIRE([LT_PATH_NM])dnl 6480e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6481e4f6584cSmrgm4_require([_LT_DECL_EGREP])dnl 6482e4f6584cSmrgm4_require([_LT_DECL_SED])dnl 6483e4f6584cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6484e4f6584cSmrgm4_require([_LT_TAG_COMPILER])dnl 6485b698ba48SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6486e4f6584cSmrgm4_if([$1], [CXX], [ 6487e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6488b698ba48Smrg case $host_os in 6489b698ba48Smrg aix[[4-9]]*) 6490b698ba48Smrg # If we're using GNU nm, then we don't want the "-C" option. 6491b698ba48Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6492e4f6584cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6493e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6494b698ba48Smrg else 6495e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6496b698ba48Smrg fi 6497b698ba48Smrg ;; 6498b698ba48Smrg pw32*) 6499e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6500b698ba48Smrg ;; 6501e4f6584cSmrg cygwin* | mingw* | cegcc*) 6502e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 6503b698ba48Smrg ;; 6504b698ba48Smrg *) 6505e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6506b698ba48Smrg ;; 65072ec8c4b4Smrg esac 6508e4f6584cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6509e4f6584cSmrg], [ 6510b698ba48Smrg runpath_var= 6511e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6512e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6513e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)= 6514e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6515e4f6584cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 6516e4f6584cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6517e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6518e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6519e4f6584cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 6520e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6521e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6522e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6523e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6524e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6525e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6526e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6527e4f6584cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 6528e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6529e4f6584cSmrg _LT_TAGVAR(module_cmds, $1)= 6530e4f6584cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 6531e4f6584cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6532e4f6584cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6533e4f6584cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6534e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6535b698ba48Smrg # include_expsyms should be a list of space-separated symbols to be *always* 6536b698ba48Smrg # included in the symbol list 6537e4f6584cSmrg _LT_TAGVAR(include_expsyms, $1)= 6538b698ba48Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 6539b698ba48Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6540b698ba48Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6541b698ba48Smrg # as well as any symbol that contains `d'. 6542e4f6584cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6543b698ba48Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6544b698ba48Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 6545b698ba48Smrg # the symbol is explicitly referenced. Since portable code cannot 6546b698ba48Smrg # rely on this symbol name, it's probably fine to never include it in 6547b698ba48Smrg # preloaded symbol tables. 6548b698ba48Smrg # Exclude shared library initialization/finalization symbols. 6549b698ba48Smrgdnl Note also adjust exclude_expsyms for C++ above. 6550b698ba48Smrg extract_expsyms_cmds= 6551e4f6584cSmrg 6552b698ba48Smrg case $host_os in 6553e4f6584cSmrg cygwin* | mingw* | pw32* | cegcc*) 6554b698ba48Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6555b698ba48Smrg # When not using gcc, we currently assume that we are using 6556b698ba48Smrg # Microsoft Visual C++. 6557b698ba48Smrg if test "$GCC" != yes; then 6558b698ba48Smrg with_gnu_ld=no 6559b698ba48Smrg fi 6560b698ba48Smrg ;; 6561b698ba48Smrg interix*) 6562b698ba48Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6563b698ba48Smrg with_gnu_ld=yes 6564b698ba48Smrg ;; 6565b698ba48Smrg openbsd*) 6566b698ba48Smrg with_gnu_ld=no 656709885543Smrg ;; 656809885543Smrg esac 656909885543Smrg 6570e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6571b698ba48Smrg if test "$with_gnu_ld" = yes; then 6572b698ba48Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6573b698ba48Smrg wlarc='${wl}' 657409885543Smrg 6575b698ba48Smrg # Set some defaults for GNU ld with shared library support. These 6576b698ba48Smrg # are reset later if shared libraries are not supported. Putting them 6577b698ba48Smrg # here allows them to be overridden if necessary. 6578b698ba48Smrg runpath_var=LD_RUN_PATH 6579e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6580e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6581b698ba48Smrg # ancient GNU ld didn't support --whole-archive et. al. 6582e4f6584cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6583e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6584e4f6584cSmrg else 6585e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6586b698ba48Smrg fi 6587b698ba48Smrg supports_anon_versioning=no 6588e4f6584cSmrg case `$LD -v 2>&1` in 6589b698ba48Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6590b698ba48Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6591b698ba48Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6592b698ba48Smrg *\ 2.11.*) ;; # other 2.11 versions 6593b698ba48Smrg *) supports_anon_versioning=yes ;; 6594b698ba48Smrg esac 659509885543Smrg 6596b698ba48Smrg # See if GNU ld supports shared libraries. 6597b698ba48Smrg case $host_os in 6598b698ba48Smrg aix[[3-9]]*) 6599b698ba48Smrg # On AIX/PPC, the GNU linker is very broken 6600b698ba48Smrg if test "$host_cpu" != ia64; then 6601e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6602e4f6584cSmrg cat <<_LT_EOF 1>&2 660309885543Smrg 6604b698ba48Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6605b698ba48Smrg*** to be unable to reliably create shared libraries on AIX. 6606b698ba48Smrg*** Therefore, libtool is disabling shared libraries support. If you 6607b698ba48Smrg*** really care for shared libraries, you may want to modify your PATH 6608b698ba48Smrg*** so that a non-GNU linker is found, and then restart. 660909885543Smrg 6610e4f6584cSmrg_LT_EOF 6611b698ba48Smrg fi 6612b698ba48Smrg ;; 661309885543Smrg 6614b698ba48Smrg amigaos*) 6615e4f6584cSmrg case $host_cpu in 6616e4f6584cSmrg powerpc) 6617e4f6584cSmrg # see comment about AmigaOS4 .so support 6618e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6619e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6620e4f6584cSmrg ;; 6621e4f6584cSmrg m68k) 6622e4f6584cSmrg _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)' 6623e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6624e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6625e4f6584cSmrg ;; 6626e4f6584cSmrg esac 6627b698ba48Smrg ;; 662809885543Smrg 6629b698ba48Smrg beos*) 6630e4f6584cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6631e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6632b698ba48Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6633b698ba48Smrg # support --undefined. This deserves some investigation. FIXME 6634e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6635b698ba48Smrg else 6636e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6637b698ba48Smrg fi 6638b698ba48Smrg ;; 663909885543Smrg 6640e4f6584cSmrg cygwin* | mingw* | pw32* | cegcc*) 6641e4f6584cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6642b698ba48Smrg # as there is no search path for DLLs. 6643e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6644e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6645e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6646e4f6584cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6647e4f6584cSmrg _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' 6648e4f6584cSmrg 6649e4f6584cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6650e4f6584cSmrg _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' 6651b698ba48Smrg # If the export-symbols file already is a .def file (1st line 6652b698ba48Smrg # is EXPORTS), use it as is; otherwise, prepend... 6653e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6654b698ba48Smrg cp $export_symbols $output_objdir/$soname.def; 6655b698ba48Smrg else 6656b698ba48Smrg echo EXPORTS > $output_objdir/$soname.def; 6657b698ba48Smrg cat $export_symbols >> $output_objdir/$soname.def; 6658b698ba48Smrg fi~ 6659b698ba48Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6660b698ba48Smrg else 6661e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6662b698ba48Smrg fi 6663b698ba48Smrg ;; 666409885543Smrg 6665b698ba48Smrg interix[[3-9]]*) 6666e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6667e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6668e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6669e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6670b698ba48Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6671b698ba48Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6672b698ba48Smrg # default) and relocated if they conflict, which is a slow very memory 6673b698ba48Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6674b698ba48Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6675b698ba48Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6676e4f6584cSmrg _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' 6677e4f6584cSmrg _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' 6678b698ba48Smrg ;; 66792ec8c4b4Smrg 6680e4f6584cSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 6681e4f6584cSmrg tmp_diet=no 6682e4f6584cSmrg if test "$host_os" = linux-dietlibc; then 6683e4f6584cSmrg case $cc_basename in 6684e4f6584cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6685e4f6584cSmrg esac 6686e4f6584cSmrg fi 6687e4f6584cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6688e4f6584cSmrg && test "$tmp_diet" = no 6689e4f6584cSmrg then 6690b698ba48Smrg tmp_addflag= 6691e4f6584cSmrg tmp_sharedflag='-shared' 6692b698ba48Smrg case $cc_basename,$host_cpu in 6693e4f6584cSmrg pgcc*) # Portland Group C compiler 6694e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6695b698ba48Smrg tmp_addflag=' $pic_flag' 6696b698ba48Smrg ;; 6697b698ba48Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6698e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6699b698ba48Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 6700e4f6584cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6701b698ba48Smrg tmp_addflag=' -i_dynamic' ;; 6702b698ba48Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6703b698ba48Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6704b698ba48Smrg ifc* | ifort*) # Intel Fortran compiler 6705b698ba48Smrg tmp_addflag=' -nofor_main' ;; 6706e4f6584cSmrg lf95*) # Lahey Fortran 8.1 6707e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6708e4f6584cSmrg tmp_sharedflag='--shared' ;; 6709e4f6584cSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6710e4f6584cSmrg tmp_sharedflag='-qmkshrobj' 6711e4f6584cSmrg tmp_addflag= ;; 6712b698ba48Smrg esac 6713b698ba48Smrg case `$CC -V 2>&1 | sed 5q` in 6714b698ba48Smrg *Sun\ C*) # Sun C 5.9 6715e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6716e4f6584cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6717b698ba48Smrg tmp_sharedflag='-G' ;; 6718b698ba48Smrg *Sun\ F*) # Sun Fortran 8.3 6719b698ba48Smrg tmp_sharedflag='-G' ;; 6720b698ba48Smrg esac 6721e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 67222ec8c4b4Smrg 6723e4f6584cSmrg if test "x$supports_anon_versioning" = xyes; then 6724e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6725e4f6584cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6726e4f6584cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6727e4f6584cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6728e4f6584cSmrg fi 6729e4f6584cSmrg 6730e4f6584cSmrg case $cc_basename in 6731e4f6584cSmrg xlf*) 6732e4f6584cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6733e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6734e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6735e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6736e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 6737e4f6584cSmrg if test "x$supports_anon_versioning" = xyes; then 6738e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6739e4f6584cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6740e4f6584cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6741e4f6584cSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6742e4f6584cSmrg fi 6743e4f6584cSmrg ;; 6744e4f6584cSmrg esac 6745b698ba48Smrg else 6746e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6747b698ba48Smrg fi 6748b698ba48Smrg ;; 67492ec8c4b4Smrg 6750b698ba48Smrg netbsd*) 6751e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6752e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6753b698ba48Smrg wlarc= 6754b698ba48Smrg else 6755e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6756e4f6584cSmrg _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' 6757b698ba48Smrg fi 6758b698ba48Smrg ;; 67592ec8c4b4Smrg 6760b698ba48Smrg solaris*) 6761e4f6584cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6762e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6763e4f6584cSmrg cat <<_LT_EOF 1>&2 676409885543Smrg 6765b698ba48Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6766b698ba48Smrg*** create shared libraries on Solaris systems. Therefore, libtool 6767b698ba48Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6768b698ba48Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 6769b698ba48Smrg*** your PATH or compiler configuration so that the native linker is 6770b698ba48Smrg*** used, and then restart. 677109885543Smrg 6772e4f6584cSmrg_LT_EOF 6773e4f6584cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6774e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6775e4f6584cSmrg _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' 6776b698ba48Smrg else 6777e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6778b698ba48Smrg fi 6779b698ba48Smrg ;; 678009885543Smrg 6781b698ba48Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6782b698ba48Smrg case `$LD -v 2>&1` in 6783b698ba48Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6784e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6785b698ba48Smrg cat <<_LT_EOF 1>&2 678609885543Smrg 6787b698ba48Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6788b698ba48Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6789b698ba48Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6790b698ba48Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6791b698ba48Smrg*** your PATH or compiler configuration so that the native linker is 6792b698ba48Smrg*** used, and then restart. 679309885543Smrg 6794b698ba48Smrg_LT_EOF 6795b698ba48Smrg ;; 6796b698ba48Smrg *) 6797e4f6584cSmrg # For security reasons, it is highly recommended that you always 6798e4f6584cSmrg # use absolute paths for naming shared libraries, and exclude the 6799e4f6584cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 6800e4f6584cSmrg # requires that you compile everything twice, which is a pain. 6801e4f6584cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6802e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6803e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6804e4f6584cSmrg _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' 6805b698ba48Smrg else 6806e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6807b698ba48Smrg fi 6808b698ba48Smrg ;; 6809b698ba48Smrg esac 6810b698ba48Smrg ;; 681109885543Smrg 6812b698ba48Smrg sunos4*) 6813e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6814b698ba48Smrg wlarc= 6815e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6816e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6817b698ba48Smrg ;; 681809885543Smrg 6819b698ba48Smrg *) 6820e4f6584cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6821e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6822e4f6584cSmrg _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' 6823b698ba48Smrg else 6824e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6825b698ba48Smrg fi 6826b698ba48Smrg ;; 6827b698ba48Smrg esac 682809885543Smrg 6829e4f6584cSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6830b698ba48Smrg runpath_var= 6831e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6832e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6833e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6834b698ba48Smrg fi 6835b698ba48Smrg else 6836b698ba48Smrg # PORTME fill in a description of your system's linker (not GNU ld) 6837b698ba48Smrg case $host_os in 6838b698ba48Smrg aix3*) 6839e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6840e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6841e4f6584cSmrg _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' 6842b698ba48Smrg # Note: this linker hardcodes the directories in LIBPATH if there 6843b698ba48Smrg # are no directories specified by -L. 6844e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6845b698ba48Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6846b698ba48Smrg # Neither direct hardcoding nor static linking is supported with a 6847b698ba48Smrg # broken collect2. 6848e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6849b698ba48Smrg fi 6850b698ba48Smrg ;; 685109885543Smrg 6852b698ba48Smrg aix[[4-9]]*) 6853b698ba48Smrg if test "$host_cpu" = ia64; then 6854b698ba48Smrg # On IA64, the linker does run time linking by default, so we don't 6855b698ba48Smrg # have to do anything special. 6856b698ba48Smrg aix_use_runtimelinking=no 6857b698ba48Smrg exp_sym_flag='-Bexport' 6858b698ba48Smrg no_entry_flag="" 6859b698ba48Smrg else 6860b698ba48Smrg # If we're using GNU nm, then we don't want the "-C" option. 6861b698ba48Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6862e4f6584cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6863e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6864b698ba48Smrg else 6865e4f6584cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6866b698ba48Smrg fi 6867b698ba48Smrg aix_use_runtimelinking=no 686809885543Smrg 6869b698ba48Smrg # Test if we are trying to use run time linking or normal 6870b698ba48Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6871b698ba48Smrg # need to do runtime linking. 6872b698ba48Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6873b698ba48Smrg for ld_flag in $LDFLAGS; do 6874e4f6584cSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6875e4f6584cSmrg aix_use_runtimelinking=yes 6876e4f6584cSmrg break 6877e4f6584cSmrg fi 6878b698ba48Smrg done 6879b698ba48Smrg ;; 6880b698ba48Smrg esac 688109885543Smrg 6882b698ba48Smrg exp_sym_flag='-bexport' 6883b698ba48Smrg no_entry_flag='-bnoentry' 6884b698ba48Smrg fi 688509885543Smrg 6886b698ba48Smrg # When large executables or shared objects are built, AIX ld can 6887b698ba48Smrg # have problems creating the table of contents. If linking a library 6888b698ba48Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6889b698ba48Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6890b698ba48Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 689109885543Smrg 6892e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='' 6893e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6894e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6895e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6896e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6897e4f6584cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 689809885543Smrg 6899b698ba48Smrg if test "$GCC" = yes; then 6900b698ba48Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6901b698ba48Smrg # We only want to do this on AIX 4.2 and lower, the check 6902b698ba48Smrg # below for broken collect2 doesn't work under 4.3+ 6903b698ba48Smrg collect2name=`${CC} -print-prog-name=collect2` 6904e4f6584cSmrg if test -f "$collect2name" && 6905e4f6584cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6906b698ba48Smrg then 6907e4f6584cSmrg # We have reworked collect2 6908e4f6584cSmrg : 6909b698ba48Smrg else 6910e4f6584cSmrg # We have old collect2 6911e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6912e4f6584cSmrg # It fails to find uninstalled libraries when the uninstalled 6913e4f6584cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6914e4f6584cSmrg # to unsupported forces relinking 6915e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6916e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6917e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6918b698ba48Smrg fi 6919b698ba48Smrg ;; 6920b698ba48Smrg esac 6921b698ba48Smrg shared_flag='-shared' 6922b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 6923b698ba48Smrg shared_flag="$shared_flag "'${wl}-G' 6924b698ba48Smrg fi 6925b698ba48Smrg else 6926b698ba48Smrg # not using gcc 6927b698ba48Smrg if test "$host_cpu" = ia64; then 6928e4f6584cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6929e4f6584cSmrg # chokes on -Wl,-G. The following line is correct: 6930b698ba48Smrg shared_flag='-G' 6931b698ba48Smrg else 6932b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 6933b698ba48Smrg shared_flag='${wl}-G' 6934b698ba48Smrg else 6935b698ba48Smrg shared_flag='${wl}-bM:SRE' 6936b698ba48Smrg fi 6937b698ba48Smrg fi 6938b698ba48Smrg fi 693909885543Smrg 6940e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6941b698ba48Smrg # It seems that -bexpall does not export symbols beginning with 6942b698ba48Smrg # underscore (_), so it is better to generate a list of symbols to export. 6943e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6944b698ba48Smrg if test "$aix_use_runtimelinking" = yes; then 6945b698ba48Smrg # Warning - without using the other runtime loading flags (-brtl), 6946b698ba48Smrg # -berok will link without error, but may produce a broken library. 6947e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6948e4f6584cSmrg # Determine the default libpath from the value encoded in an 6949e4f6584cSmrg # empty executable. 6950e4f6584cSmrg _LT_SYS_MODULE_PATH_AIX 6951e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6952e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6953e4f6584cSmrg else 6954b698ba48Smrg if test "$host_cpu" = ia64; then 6955e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6956e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6957e4f6584cSmrg _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" 6958b698ba48Smrg else 6959e4f6584cSmrg # Determine the default libpath from the value encoded in an 6960e4f6584cSmrg # empty executable. 6961e4f6584cSmrg _LT_SYS_MODULE_PATH_AIX 6962e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6963b698ba48Smrg # Warning - without using the other run time loading flags, 6964b698ba48Smrg # -berok will link without error, but may produce a broken library. 6965e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6966e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6967b698ba48Smrg # Exported symbols can be pulled into shared objects from archives 6968e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6969e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6970b698ba48Smrg # This is similar to how AIX traditionally builds its shared libraries. 6971e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6972b698ba48Smrg fi 6973b698ba48Smrg fi 6974b698ba48Smrg ;; 697509885543Smrg 6976b698ba48Smrg amigaos*) 6977e4f6584cSmrg case $host_cpu in 6978e4f6584cSmrg powerpc) 6979e4f6584cSmrg # see comment about AmigaOS4 .so support 6980e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6981e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6982e4f6584cSmrg ;; 6983e4f6584cSmrg m68k) 6984e4f6584cSmrg _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)' 6985e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6986e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6987e4f6584cSmrg ;; 6988e4f6584cSmrg esac 6989b698ba48Smrg ;; 699009885543Smrg 6991b698ba48Smrg bsdi[[45]]*) 6992e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6993b698ba48Smrg ;; 699409885543Smrg 6995e4f6584cSmrg cygwin* | mingw* | pw32* | cegcc*) 6996b698ba48Smrg # When not using gcc, we currently assume that we are using 6997b698ba48Smrg # Microsoft Visual C++. 6998b698ba48Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6999b698ba48Smrg # no search path for DLLs. 7000e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7001e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7002b698ba48Smrg # Tell ltmain to make .lib files, not .a files. 7003b698ba48Smrg libext=lib 7004b698ba48Smrg # Tell ltmain to make .dll files, not .so files. 7005b698ba48Smrg shrext_cmds=".dll" 7006b698ba48Smrg # FIXME: Setting linknames here is a bad hack. 7007e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7008b698ba48Smrg # The linker will automatically build a .lib file if we build a DLL. 7009e4f6584cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7010b698ba48Smrg # FIXME: Should let the user specify the lib program. 7011e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7012e4f6584cSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7013e4f6584cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7014b698ba48Smrg ;; 701509885543Smrg 7016b698ba48Smrg darwin* | rhapsody*) 7017e4f6584cSmrg _LT_DARWIN_LINKER_FEATURES($1) 7018b698ba48Smrg ;; 701909885543Smrg 7020b698ba48Smrg dgux*) 7021e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7022e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7023e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7024b698ba48Smrg ;; 702509885543Smrg 7026b698ba48Smrg freebsd1*) 7027e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7028b698ba48Smrg ;; 702909885543Smrg 7030b698ba48Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7031b698ba48Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7032b698ba48Smrg # does not break anything, and helps significantly (at the cost of a little 7033b698ba48Smrg # extra space). 7034b698ba48Smrg freebsd2.2*) 7035e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7036e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7037e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7038e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7039b698ba48Smrg ;; 704009885543Smrg 7041b698ba48Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7042b698ba48Smrg freebsd2*) 7043e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7044e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7045e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7046e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 704709885543Smrg ;; 704809885543Smrg 7049b698ba48Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7050b698ba48Smrg freebsd* | dragonfly*) 7051e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7052e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7053e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7054e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7055b698ba48Smrg ;; 705609885543Smrg 7057b698ba48Smrg hpux9*) 7058b698ba48Smrg if test "$GCC" = yes; then 7059e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7060b698ba48Smrg else 7061e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7062b698ba48Smrg fi 7063e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7064e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7065e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 706609885543Smrg 7067b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 7068b698ba48Smrg # but as the default location of the library. 7069e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7070e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7071b698ba48Smrg ;; 707209885543Smrg 7073b698ba48Smrg hpux10*) 7074b698ba48Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7075e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7076b698ba48Smrg else 7077e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7078b698ba48Smrg fi 7079b698ba48Smrg if test "$with_gnu_ld" = no; then 7080e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7081e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7082e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7083e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7084e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7085e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7086b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 7087b698ba48Smrg # but as the default location of the library. 7088e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7089b698ba48Smrg fi 7090b698ba48Smrg ;; 709109885543Smrg 7092b698ba48Smrg hpux11*) 7093b698ba48Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7094b698ba48Smrg case $host_cpu in 7095b698ba48Smrg hppa*64*) 7096e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7097b698ba48Smrg ;; 7098b698ba48Smrg ia64*) 7099e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7100b698ba48Smrg ;; 7101b698ba48Smrg *) 7102e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7103b698ba48Smrg ;; 7104b698ba48Smrg esac 7105b698ba48Smrg else 7106b698ba48Smrg case $host_cpu in 7107b698ba48Smrg hppa*64*) 7108e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7109b698ba48Smrg ;; 7110b698ba48Smrg ia64*) 7111e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7112b698ba48Smrg ;; 7113b698ba48Smrg *) 7114e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7115b698ba48Smrg ;; 7116b698ba48Smrg esac 7117b698ba48Smrg fi 7118b698ba48Smrg if test "$with_gnu_ld" = no; then 7119e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7120e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 712109885543Smrg 7122b698ba48Smrg case $host_cpu in 7123b698ba48Smrg hppa*64*|ia64*) 7124e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7125e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7126b698ba48Smrg ;; 7127b698ba48Smrg *) 7128e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7129e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7130e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 71312ec8c4b4Smrg 7132b698ba48Smrg # hardcode_minus_L: Not really in the search PATH, 7133b698ba48Smrg # but as the default location of the library. 7134e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7135b698ba48Smrg ;; 7136b698ba48Smrg esac 7137b698ba48Smrg fi 713809885543Smrg ;; 713909885543Smrg 7140b698ba48Smrg irix5* | irix6* | nonstopux*) 7141b698ba48Smrg if test "$GCC" = yes; then 7142e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7143e4f6584cSmrg # Try to use the -exported_symbol ld option, if it does not 7144e4f6584cSmrg # work, assume that -exports_file does not work either and 7145e4f6584cSmrg # implicitly export all symbols. 7146e4f6584cSmrg save_LDFLAGS="$LDFLAGS" 7147e4f6584cSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7148e4f6584cSmrg AC_LINK_IFELSE(int foo(void) {}, 7149e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 7150e4f6584cSmrg ) 7151e4f6584cSmrg LDFLAGS="$save_LDFLAGS" 7152b698ba48Smrg else 7153e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7154e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 7155b698ba48Smrg fi 7156e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7157e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7158e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7159e4f6584cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 7160e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7161b698ba48Smrg ;; 716209885543Smrg 7163b698ba48Smrg netbsd*) 7164e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7165e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7166b698ba48Smrg else 7167e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7168b698ba48Smrg fi 7169e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7170e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7171e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7172b698ba48Smrg ;; 717309885543Smrg 7174b698ba48Smrg newsos6) 7175e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7176e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7177e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7178e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7179e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7180e4f6584cSmrg ;; 7181e4f6584cSmrg 7182e4f6584cSmrg *nto* | *qnx*) 7183b698ba48Smrg ;; 718409885543Smrg 7185b698ba48Smrg openbsd*) 7186b698ba48Smrg if test -f /usr/libexec/ld.so; then 7187e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7188e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7189e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7190e4f6584cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7191e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7192e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7193e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7194e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7195b698ba48Smrg else 7196b698ba48Smrg case $host_os in 7197b698ba48Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7198e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7199e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7200b698ba48Smrg ;; 7201b698ba48Smrg *) 7202e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7203e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7204b698ba48Smrg ;; 7205b698ba48Smrg esac 7206e4f6584cSmrg fi 7207b698ba48Smrg else 7208e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7209b698ba48Smrg fi 7210b698ba48Smrg ;; 721109885543Smrg 7212b698ba48Smrg os2*) 7213e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7214e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7215e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7216e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 7217e4f6584cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7218b698ba48Smrg ;; 721909885543Smrg 7220b698ba48Smrg osf3*) 7221b698ba48Smrg if test "$GCC" = yes; then 7222e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7223e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7224b698ba48Smrg else 7225e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7226e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7227b698ba48Smrg fi 7228e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7229e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7230e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7231b698ba48Smrg ;; 723209885543Smrg 7233b698ba48Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7234b698ba48Smrg if test "$GCC" = yes; then 7235e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7236e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7237e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7238b698ba48Smrg else 7239e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7240e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7241e4f6584cSmrg _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~ 7242e4f6584cSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 724309885543Smrg 7244b698ba48Smrg # Both c and cxx compiler support -rpath directly 7245e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7246b698ba48Smrg fi 7247e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7248e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7249b698ba48Smrg ;; 725009885543Smrg 7251b698ba48Smrg solaris*) 7252e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7253b698ba48Smrg if test "$GCC" = yes; then 7254b698ba48Smrg wlarc='${wl}' 7255e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7256e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7257e4f6584cSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7258b698ba48Smrg else 7259e4f6584cSmrg case `$CC -V 2>&1` in 7260e4f6584cSmrg *"Compilers 5.0"*) 7261e4f6584cSmrg wlarc='' 7262e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7263e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7264e4f6584cSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7265e4f6584cSmrg ;; 7266e4f6584cSmrg *) 7267e4f6584cSmrg wlarc='${wl}' 7268e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7269e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7270e4f6584cSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7271e4f6584cSmrg ;; 7272e4f6584cSmrg esac 7273b698ba48Smrg fi 7274e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7275e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7276b698ba48Smrg case $host_os in 7277b698ba48Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7278b698ba48Smrg *) 7279b698ba48Smrg # The compiler driver will combine and reorder linker options, 7280b698ba48Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7281b698ba48Smrg # but is careful enough not to reorder. 7282e4f6584cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7283b698ba48Smrg if test "$GCC" = yes; then 7284e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7285b698ba48Smrg else 7286e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72877104f784Smrg fi 7288b698ba48Smrg ;; 7289b698ba48Smrg esac 7290e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 729109885543Smrg ;; 729209885543Smrg 7293b698ba48Smrg sunos4*) 7294b698ba48Smrg if test "x$host_vendor" = xsequent; then 7295b698ba48Smrg # Use $CC to link under sequent, because it throws in some extra .o 7296b698ba48Smrg # files that make .init and .fini sections work. 7297e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7298b698ba48Smrg else 7299e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7300b698ba48Smrg fi 7301e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7302e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7303e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7304e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7305b698ba48Smrg ;; 730609885543Smrg 7307b698ba48Smrg sysv4) 7308b698ba48Smrg case $host_vendor in 7309b698ba48Smrg sni) 7310e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7311e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7312b698ba48Smrg ;; 7313b698ba48Smrg siemens) 7314b698ba48Smrg ## LD is ld it makes a PLAMLIB 7315b698ba48Smrg ## CC just makes a GrossModule. 7316e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7317e4f6584cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7318e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7319b698ba48Smrg ;; 7320b698ba48Smrg motorola) 7321e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7322e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7323b698ba48Smrg ;; 7324b698ba48Smrg esac 7325b698ba48Smrg runpath_var='LD_RUN_PATH' 7326e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7327b698ba48Smrg ;; 732809885543Smrg 7329b698ba48Smrg sysv4.3*) 7330e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7331e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7332e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7333b698ba48Smrg ;; 733409885543Smrg 7335b698ba48Smrg sysv4*MP*) 7336b698ba48Smrg if test -d /usr/nec; then 7337e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7338e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339b698ba48Smrg runpath_var=LD_RUN_PATH 7340b698ba48Smrg hardcode_runpath_var=yes 7341e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7342b698ba48Smrg fi 7343b698ba48Smrg ;; 734409885543Smrg 7345b698ba48Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7346e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7347e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7348e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7349b698ba48Smrg runpath_var='LD_RUN_PATH' 735009885543Smrg 7351b698ba48Smrg if test "$GCC" = yes; then 7352e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7353e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7354b698ba48Smrg else 7355e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7356e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7357b698ba48Smrg fi 7358b698ba48Smrg ;; 735909885543Smrg 7360b698ba48Smrg sysv5* | sco3.2v5* | sco5v6*) 7361b698ba48Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7362b698ba48Smrg # link with -lc, and that would cause any symbols used from libc to 7363b698ba48Smrg # always be unresolved, which means just about no library would 7364b698ba48Smrg # ever link correctly. If we're not using GNU ld we use -z text 7365b698ba48Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7366b698ba48Smrg # as -z defs. 7367e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7368e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7369e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7370e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7371e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7372e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7373e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7374e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7375b698ba48Smrg runpath_var='LD_RUN_PATH' 737609885543Smrg 7377b698ba48Smrg if test "$GCC" = yes; then 7378e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7379e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7380b698ba48Smrg else 7381e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7383b698ba48Smrg fi 7384b698ba48Smrg ;; 738509885543Smrg 7386b698ba48Smrg uts4*) 7387e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7388e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7389e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7390b698ba48Smrg ;; 73912ec8c4b4Smrg 7392b698ba48Smrg *) 7393e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7394b698ba48Smrg ;; 7395b698ba48Smrg esac 7396e4f6584cSmrg 7397e4f6584cSmrg if test x$host_vendor = xsni; then 7398e4f6584cSmrg case $host in 7399e4f6584cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7400e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7401e4f6584cSmrg ;; 7402e4f6584cSmrg esac 7403e4f6584cSmrg fi 7404b698ba48Smrg fi 740509885543Smrg]) 7406e4f6584cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7407e4f6584cSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7408e4f6584cSmrg 7409e4f6584cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7410e4f6584cSmrg 7411e4f6584cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7412e4f6584cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7413e4f6584cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 7414e4f6584cSmrg [The commands to extract the exported symbol list from a shared archive]) 741509885543Smrg 7416b698ba48Smrg# 7417b698ba48Smrg# Do we need to explicitly link libc? 7418b698ba48Smrg# 7419e4f6584cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7420b698ba48Smrgx|xyes) 7421b698ba48Smrg # Assume -lc should be added 7422e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 742309885543Smrg 7424b698ba48Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7425e4f6584cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 7426b698ba48Smrg *'~'*) 7427b698ba48Smrg # FIXME: we may have to deal with multi-command sequences. 7428b698ba48Smrg ;; 7429b698ba48Smrg '$CC '*) 7430b698ba48Smrg # Test whether the compiler implicitly links with -lc since on some 7431b698ba48Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7432b698ba48Smrg # to ld, don't add -lc before -lgcc. 7433b698ba48Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7434e4f6584cSmrg $RM conftest* 7435b698ba48Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 743609885543Smrg 7437b698ba48Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7438b698ba48Smrg soname=conftest 7439b698ba48Smrg lib=conftest 7440b698ba48Smrg libobjs=conftest.$ac_objext 7441b698ba48Smrg deplibs= 7442e4f6584cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7443e4f6584cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7444b698ba48Smrg compiler_flags=-v 7445b698ba48Smrg linker_flags=-v 7446b698ba48Smrg verstring= 7447b698ba48Smrg output_objdir=. 7448b698ba48Smrg libname=conftest 7449e4f6584cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7450e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 7451e4f6584cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7452b698ba48Smrg then 7453e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7454b698ba48Smrg else 7455e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7456b698ba48Smrg fi 7457e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7458b698ba48Smrg else 7459b698ba48Smrg cat conftest.err 1>&5 7460b698ba48Smrg fi 7461e4f6584cSmrg $RM conftest* 7462e4f6584cSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 7463b698ba48Smrg ;; 7464b698ba48Smrg esac 7465b698ba48Smrg fi 7466b698ba48Smrg ;; 7467b698ba48Smrgesac 746809885543Smrg 7469e4f6584cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7470e4f6584cSmrg [Whether or not to add -lc for building shared libraries]) 7471e4f6584cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7472e4f6584cSmrg [enable_shared_with_static_runtimes], [0], 7473e4f6584cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 7474e4f6584cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7475e4f6584cSmrg [Compiler flag to allow reflexive dlopens]) 7476e4f6584cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7477e4f6584cSmrg [Compiler flag to generate shared objects directly from archives]) 7478e4f6584cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 7479e4f6584cSmrg [Whether the compiler copes with passing no objects directly]) 7480e4f6584cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7481e4f6584cSmrg [Create an old-style archive from a shared archive]) 7482e4f6584cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7483e4f6584cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 7484e4f6584cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7485e4f6584cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7486e4f6584cSmrg_LT_TAGDECL([], [module_cmds], [2], 7487e4f6584cSmrg [Commands used to build a loadable module if different from building 7488e4f6584cSmrg a shared archive.]) 7489e4f6584cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7490e4f6584cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 7491e4f6584cSmrg [Whether we are building with GNU ld or not]) 7492e4f6584cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7493e4f6584cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 7494e4f6584cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 7495e4f6584cSmrg [Flag that enforces no undefined symbols]) 7496e4f6584cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7497e4f6584cSmrg [Flag to hardcode $libdir into a binary during linking. 7498e4f6584cSmrg This must work even if $libdir does not exist]) 7499e4f6584cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7500e4f6584cSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7501e4f6584cSmrg during linking. This must work even if $libdir does not exist]]) 7502e4f6584cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7503e4f6584cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 7504e4f6584cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 7505e4f6584cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7506e4f6584cSmrg DIR into the resulting binary]) 7507e4f6584cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7508e4f6584cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7509e4f6584cSmrg DIR into the resulting binary and the resulting library dependency is 7510e4f6584cSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7511e4f6584cSmrg library is relocated]) 7512e4f6584cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7513e4f6584cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7514e4f6584cSmrg into the resulting binary]) 7515e4f6584cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7516e4f6584cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7517e4f6584cSmrg into the resulting binary]) 7518e4f6584cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 7519e4f6584cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 7520e4f6584cSmrg into the library and all subsequent libraries and executables linked 7521e4f6584cSmrg against it]) 7522e4f6584cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 7523e4f6584cSmrg [Set to yes if linker adds runtime paths of dependent libraries 7524e4f6584cSmrg to runtime path list]) 7525e4f6584cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 7526e4f6584cSmrg [Whether libtool must link a program against all its dependency libraries]) 7527e4f6584cSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7528e4f6584cSmrg [Fix the shell variable $srcfile for the compiler]) 7529e4f6584cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 7530e4f6584cSmrg [Set to "yes" if exported symbols are required]) 7531e4f6584cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7532e4f6584cSmrg [The commands to list exported symbols]) 7533e4f6584cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 7534e4f6584cSmrg [Symbols that should not be listed in the preloaded symbols]) 7535e4f6584cSmrg_LT_TAGDECL([], [include_expsyms], [1], 7536e4f6584cSmrg [Symbols that must always be exported]) 7537e4f6584cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 7538e4f6584cSmrg [Commands necessary for linking programs (against libraries) with templates]) 7539e4f6584cSmrg_LT_TAGDECL([], [file_list_spec], [1], 7540e4f6584cSmrg [Specify filename containing input files]) 7541e4f6584cSmrgdnl FIXME: Not yet implemented 7542e4f6584cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7543e4f6584cSmrgdnl [Compiler flag to generate thread safe objects]) 7544e4f6584cSmrg])# _LT_LINKER_SHLIBS 7545e4f6584cSmrg 7546e4f6584cSmrg 7547e4f6584cSmrg# _LT_LANG_C_CONFIG([TAG]) 7548e4f6584cSmrg# ------------------------ 7549e4f6584cSmrg# Ensure that the configuration variables for a C compiler are suitably 7550e4f6584cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 7551e4f6584cSmrg# the compiler configuration to `libtool'. 7552e4f6584cSmrgm4_defun([_LT_LANG_C_CONFIG], 7553e4f6584cSmrg[m4_require([_LT_DECL_EGREP])dnl 7554e4f6584cSmrglt_save_CC="$CC" 7555e4f6584cSmrgAC_LANG_PUSH(C) 755609885543Smrg 7557e4f6584cSmrg# Source file extension for C test sources. 7558e4f6584cSmrgac_ext=c 755909885543Smrg 7560e4f6584cSmrg# Object file extension for compiled C test sources. 7561e4f6584cSmrgobjext=o 7562e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 756309885543Smrg 7564e4f6584cSmrg# Code to be used in simple compile tests 7565e4f6584cSmrglt_simple_compile_test_code="int some_variable = 0;" 756609885543Smrg 7567e4f6584cSmrg# Code to be used in simple link tests 7568e4f6584cSmrglt_simple_link_test_code='int main(){return(0);}' 756909885543Smrg 7570e4f6584cSmrg_LT_TAG_COMPILER 7571e4f6584cSmrg# Save the default compiler, since it gets overwritten when the other 7572e4f6584cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7573e4f6584cSmrgcompiler_DEFAULT=$CC 757409885543Smrg 7575e4f6584cSmrg# save warnings/boilerplate of simple test code 7576e4f6584cSmrg_LT_COMPILER_BOILERPLATE 7577e4f6584cSmrg_LT_LINKER_BOILERPLATE 757809885543Smrg 7579e4f6584cSmrgif test -n "$compiler"; then 7580e4f6584cSmrg _LT_COMPILER_NO_RTTI($1) 7581e4f6584cSmrg _LT_COMPILER_PIC($1) 7582e4f6584cSmrg _LT_COMPILER_C_O($1) 7583e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 7584e4f6584cSmrg _LT_LINKER_SHLIBS($1) 7585e4f6584cSmrg _LT_SYS_DYNAMIC_LINKER($1) 7586e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7587e4f6584cSmrg LT_SYS_DLOPEN_SELF 7588e4f6584cSmrg _LT_CMD_STRIPLIB 7589e4f6584cSmrg 7590e4f6584cSmrg # Report which library types will actually be built 7591e4f6584cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7592e4f6584cSmrg AC_MSG_RESULT([$can_build_shared]) 7593e4f6584cSmrg 7594e4f6584cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7595e4f6584cSmrg test "$can_build_shared" = "no" && enable_shared=no 7596e4f6584cSmrg 7597e4f6584cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7598e4f6584cSmrg # are all built from PIC. 7599e4f6584cSmrg case $host_os in 7600e4f6584cSmrg aix3*) 7601e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 7602e4f6584cSmrg if test -n "$RANLIB"; then 7603e4f6584cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7604e4f6584cSmrg postinstall_cmds='$RANLIB $lib' 7605e4f6584cSmrg fi 7606e4f6584cSmrg ;; 76072ec8c4b4Smrg 7608e4f6584cSmrg aix[[4-9]]*) 7609e4f6584cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7610e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 7611e4f6584cSmrg fi 7612e4f6584cSmrg ;; 7613e4f6584cSmrg esac 7614e4f6584cSmrg AC_MSG_RESULT([$enable_shared]) 7615e4f6584cSmrg 7616e4f6584cSmrg AC_MSG_CHECKING([whether to build static libraries]) 7617e4f6584cSmrg # Make sure either enable_shared or enable_static is yes. 7618e4f6584cSmrg test "$enable_shared" = yes || enable_static=yes 7619e4f6584cSmrg AC_MSG_RESULT([$enable_static]) 762009885543Smrg 7621e4f6584cSmrg _LT_CONFIG($1) 7622e4f6584cSmrgfi 7623e4f6584cSmrgAC_LANG_POP 7624e4f6584cSmrgCC="$lt_save_CC" 7625e4f6584cSmrg])# _LT_LANG_C_CONFIG 76267104f784Smrg 76277104f784Smrg 7628e4f6584cSmrg# _LT_PROG_CXX 7629e4f6584cSmrg# ------------ 7630e4f6584cSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 7631e4f6584cSmrg# compiler, we have our own version here. 7632e4f6584cSmrgm4_defun([_LT_PROG_CXX], 7633e4f6584cSmrg[ 7634e4f6584cSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 7635e4f6584cSmrgAC_PROG_CXX 7636e4f6584cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7637e4f6584cSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7638e4f6584cSmrg (test "X$CXX" != "Xg++"))) ; then 7639e4f6584cSmrg AC_PROG_CXXCPP 7640b698ba48Smrgelse 7641e4f6584cSmrg _lt_caught_CXX_error=yes 7642b698ba48Smrgfi 7643e4f6584cSmrgpopdef([AC_MSG_ERROR]) 7644e4f6584cSmrg])# _LT_PROG_CXX 76457104f784Smrg 7646e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 7647e4f6584cSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 76487104f784Smrg 7649e4f6584cSmrg 7650e4f6584cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 7651e4f6584cSmrg# -------------------------- 7652e4f6584cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 7653e4f6584cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 7654e4f6584cSmrg# the compiler configuration to `libtool'. 7655e4f6584cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 7656e4f6584cSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 7657e4f6584cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 7658e4f6584cSmrgm4_require([_LT_DECL_EGREP])dnl 7659e4f6584cSmrg 7660e4f6584cSmrgAC_LANG_PUSH(C++) 7661e4f6584cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7662e4f6584cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7663e4f6584cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7664e4f6584cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7665e4f6584cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 7666e4f6584cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7667e4f6584cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7668e4f6584cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7669e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7670e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7671e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7672e4f6584cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7673e4f6584cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7674e4f6584cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7675e4f6584cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7676e4f6584cSmrg_LT_TAGVAR(module_cmds, $1)= 7677e4f6584cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7678e4f6584cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7679e4f6584cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7680e4f6584cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7681e4f6584cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7682e4f6584cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7683e4f6584cSmrg 7684e4f6584cSmrg# Source file extension for C++ test sources. 7685e4f6584cSmrgac_ext=cpp 7686e4f6584cSmrg 7687e4f6584cSmrg# Object file extension for compiled C++ test sources. 7688e4f6584cSmrgobjext=o 7689e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 7690e4f6584cSmrg 7691e4f6584cSmrg# No sense in running all these tests if we already determined that 7692e4f6584cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 7693e4f6584cSmrg# are currently assumed to apply to all compilers on this platform, 7694e4f6584cSmrg# and will be corrupted by setting them based on a non-working compiler. 7695e4f6584cSmrgif test "$_lt_caught_CXX_error" != yes; then 7696e4f6584cSmrg # Code to be used in simple compile tests 7697e4f6584cSmrg lt_simple_compile_test_code="int some_variable = 0;" 7698e4f6584cSmrg 7699e4f6584cSmrg # Code to be used in simple link tests 7700e4f6584cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7701e4f6584cSmrg 7702e4f6584cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7703e4f6584cSmrg _LT_TAG_COMPILER 7704e4f6584cSmrg 7705e4f6584cSmrg # save warnings/boilerplate of simple test code 7706e4f6584cSmrg _LT_COMPILER_BOILERPLATE 7707e4f6584cSmrg _LT_LINKER_BOILERPLATE 7708e4f6584cSmrg 7709e4f6584cSmrg # Allow CC to be a program name with arguments. 7710e4f6584cSmrg lt_save_CC=$CC 7711e4f6584cSmrg lt_save_LD=$LD 7712e4f6584cSmrg lt_save_GCC=$GCC 7713e4f6584cSmrg GCC=$GXX 7714e4f6584cSmrg lt_save_with_gnu_ld=$with_gnu_ld 7715e4f6584cSmrg lt_save_path_LD=$lt_cv_path_LD 7716e4f6584cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7717e4f6584cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7718e4f6584cSmrg else 7719e4f6584cSmrg $as_unset lt_cv_prog_gnu_ld 7720b698ba48Smrg fi 7721e4f6584cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 7722e4f6584cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 7723e4f6584cSmrg else 7724e4f6584cSmrg $as_unset lt_cv_path_LD 7725e4f6584cSmrg fi 7726e4f6584cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 7727e4f6584cSmrg CC=${CXX-"c++"} 7728e4f6584cSmrg compiler=$CC 7729e4f6584cSmrg _LT_TAGVAR(compiler, $1)=$CC 7730e4f6584cSmrg _LT_CC_BASENAME([$compiler]) 7731e4f6584cSmrg 7732e4f6584cSmrg if test -n "$compiler"; then 7733e4f6584cSmrg # We don't want -fno-exception when compiling C++ code, so set the 7734e4f6584cSmrg # no_builtin_flag separately 7735e4f6584cSmrg if test "$GXX" = yes; then 7736e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7737e4f6584cSmrg else 7738e4f6584cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7739b698ba48Smrg fi 77402ec8c4b4Smrg 7741e4f6584cSmrg if test "$GXX" = yes; then 7742e4f6584cSmrg # Set up default GNU C++ configuration 774309885543Smrg 7744e4f6584cSmrg LT_PATH_LD 774509885543Smrg 7746e4f6584cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7747e4f6584cSmrg # archiving commands below assume that GNU ld is being used. 7748e4f6584cSmrg if test "$with_gnu_ld" = yes; then 7749e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7750e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 775109885543Smrg 7752e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7753e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 775409885543Smrg 7755e4f6584cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 7756e4f6584cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7757e4f6584cSmrg # investigate it a little bit more. (MM) 7758e4f6584cSmrg wlarc='${wl}' 775909885543Smrg 7760e4f6584cSmrg # ancient GNU ld didn't support --whole-archive et. al. 7761e4f6584cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7762e4f6584cSmrg $GREP 'no-whole-archive' > /dev/null; then 7763e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7764e4f6584cSmrg else 7765e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7766e4f6584cSmrg fi 7767e4f6584cSmrg else 7768e4f6584cSmrg with_gnu_ld=no 7769e4f6584cSmrg wlarc= 7770e4f6584cSmrg 7771e4f6584cSmrg # A generic and very simple default shared library creation 7772e4f6584cSmrg # command for GNU C++ for the case where it uses the native 7773e4f6584cSmrg # linker, instead of GNU ld. If possible, this setting should 7774e4f6584cSmrg # overridden to take advantage of the native linker features on 7775e4f6584cSmrg # the platform it is being used on. 7776e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7777e4f6584cSmrg fi 7778e4f6584cSmrg 7779e4f6584cSmrg # Commands to make compiler produce verbose output that lists 7780e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 7781e4f6584cSmrg # linking a shared library. 7782e4f6584cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 7783e4f6584cSmrg 7784e4f6584cSmrg else 7785e4f6584cSmrg GXX=no 7786e4f6584cSmrg with_gnu_ld=no 7787e4f6584cSmrg wlarc= 7788e4f6584cSmrg fi 7789e4f6584cSmrg 7790e4f6584cSmrg # PORTME: fill in a description of your system's C++ link characteristics 7791e4f6584cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7792e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7793e4f6584cSmrg case $host_os in 7794e4f6584cSmrg aix3*) 7795e4f6584cSmrg # FIXME: insert proper C++ library support 7796e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7797e4f6584cSmrg ;; 7798e4f6584cSmrg aix[[4-9]]*) 7799e4f6584cSmrg if test "$host_cpu" = ia64; then 7800e4f6584cSmrg # On IA64, the linker does run time linking by default, so we don't 7801e4f6584cSmrg # have to do anything special. 7802e4f6584cSmrg aix_use_runtimelinking=no 7803e4f6584cSmrg exp_sym_flag='-Bexport' 7804e4f6584cSmrg no_entry_flag="" 7805e4f6584cSmrg else 7806e4f6584cSmrg aix_use_runtimelinking=no 7807e4f6584cSmrg 7808e4f6584cSmrg # Test if we are trying to use run time linking or normal 7809e4f6584cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7810e4f6584cSmrg # need to do runtime linking. 7811e4f6584cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7812e4f6584cSmrg for ld_flag in $LDFLAGS; do 7813e4f6584cSmrg case $ld_flag in 7814e4f6584cSmrg *-brtl*) 7815e4f6584cSmrg aix_use_runtimelinking=yes 7816e4f6584cSmrg break 7817e4f6584cSmrg ;; 7818e4f6584cSmrg esac 7819e4f6584cSmrg done 7820e4f6584cSmrg ;; 7821e4f6584cSmrg esac 7822e4f6584cSmrg 7823e4f6584cSmrg exp_sym_flag='-bexport' 7824e4f6584cSmrg no_entry_flag='-bnoentry' 7825e4f6584cSmrg fi 7826e4f6584cSmrg 7827e4f6584cSmrg # When large executables or shared objects are built, AIX ld can 7828e4f6584cSmrg # have problems creating the table of contents. If linking a library 7829e4f6584cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7830e4f6584cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7831e4f6584cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7832e4f6584cSmrg 7833e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='' 7834e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7835e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7836e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7837e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7838e4f6584cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7839e4f6584cSmrg 7840e4f6584cSmrg if test "$GXX" = yes; then 7841e4f6584cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7842e4f6584cSmrg # We only want to do this on AIX 4.2 and lower, the check 7843e4f6584cSmrg # below for broken collect2 doesn't work under 4.3+ 7844e4f6584cSmrg collect2name=`${CC} -print-prog-name=collect2` 7845e4f6584cSmrg if test -f "$collect2name" && 7846e4f6584cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7847e4f6584cSmrg then 7848e4f6584cSmrg # We have reworked collect2 7849e4f6584cSmrg : 7850e4f6584cSmrg else 7851e4f6584cSmrg # We have old collect2 7852e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7853e4f6584cSmrg # It fails to find uninstalled libraries when the uninstalled 7854e4f6584cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7855e4f6584cSmrg # to unsupported forces relinking 7856e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7857e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7858e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7859e4f6584cSmrg fi 7860e4f6584cSmrg esac 7861e4f6584cSmrg shared_flag='-shared' 7862e4f6584cSmrg if test "$aix_use_runtimelinking" = yes; then 7863e4f6584cSmrg shared_flag="$shared_flag "'${wl}-G' 7864e4f6584cSmrg fi 7865e4f6584cSmrg else 7866e4f6584cSmrg # not using gcc 7867e4f6584cSmrg if test "$host_cpu" = ia64; then 7868e4f6584cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7869e4f6584cSmrg # chokes on -Wl,-G. The following line is correct: 7870e4f6584cSmrg shared_flag='-G' 7871e4f6584cSmrg else 7872e4f6584cSmrg if test "$aix_use_runtimelinking" = yes; then 7873e4f6584cSmrg shared_flag='${wl}-G' 7874e4f6584cSmrg else 7875e4f6584cSmrg shared_flag='${wl}-bM:SRE' 7876e4f6584cSmrg fi 7877e4f6584cSmrg fi 7878e4f6584cSmrg fi 7879e4f6584cSmrg 7880e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7881e4f6584cSmrg # It seems that -bexpall does not export symbols beginning with 7882e4f6584cSmrg # underscore (_), so it is better to generate a list of symbols to 7883e4f6584cSmrg # export. 7884e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7885e4f6584cSmrg if test "$aix_use_runtimelinking" = yes; then 7886e4f6584cSmrg # Warning - without using the other runtime loading flags (-brtl), 7887e4f6584cSmrg # -berok will link without error, but may produce a broken library. 7888e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7889e4f6584cSmrg # Determine the default libpath from the value encoded in an empty 7890e4f6584cSmrg # executable. 7891e4f6584cSmrg _LT_SYS_MODULE_PATH_AIX 7892e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7893e4f6584cSmrg 7894e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7895e4f6584cSmrg else 7896e4f6584cSmrg if test "$host_cpu" = ia64; then 7897e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7898e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7899e4f6584cSmrg _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" 7900e4f6584cSmrg else 7901e4f6584cSmrg # Determine the default libpath from the value encoded in an 7902e4f6584cSmrg # empty executable. 7903e4f6584cSmrg _LT_SYS_MODULE_PATH_AIX 7904e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7905e4f6584cSmrg # Warning - without using the other run time loading flags, 7906e4f6584cSmrg # -berok will link without error, but may produce a broken library. 7907e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7908e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7909e4f6584cSmrg # Exported symbols can be pulled into shared objects from archives 7910e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7911e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7912e4f6584cSmrg # This is similar to how AIX traditionally builds its shared 7913e4f6584cSmrg # libraries. 7914e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 7915e4f6584cSmrg fi 7916e4f6584cSmrg fi 7917e4f6584cSmrg ;; 7918e4f6584cSmrg 7919e4f6584cSmrg beos*) 7920e4f6584cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7921e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7922e4f6584cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7923e4f6584cSmrg # support --undefined. This deserves some investigation. FIXME 7924e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7925e4f6584cSmrg else 7926e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7927e4f6584cSmrg fi 7928e4f6584cSmrg ;; 7929e4f6584cSmrg 7930e4f6584cSmrg chorus*) 7931e4f6584cSmrg case $cc_basename in 7932e4f6584cSmrg *) 7933e4f6584cSmrg # FIXME: insert proper C++ library support 7934e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7935e4f6584cSmrg ;; 7936e4f6584cSmrg esac 7937e4f6584cSmrg ;; 7938e4f6584cSmrg 7939e4f6584cSmrg cygwin* | mingw* | pw32* | cegcc*) 7940e4f6584cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7941e4f6584cSmrg # as there is no search path for DLLs. 7942e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7943e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7944e4f6584cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 7945e4f6584cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7946e4f6584cSmrg 7947e4f6584cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7948e4f6584cSmrg _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' 7949e4f6584cSmrg # If the export-symbols file already is a .def file (1st line 7950e4f6584cSmrg # is EXPORTS), use it as is; otherwise, prepend... 7951e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7952e4f6584cSmrg cp $export_symbols $output_objdir/$soname.def; 7953e4f6584cSmrg else 7954e4f6584cSmrg echo EXPORTS > $output_objdir/$soname.def; 7955e4f6584cSmrg cat $export_symbols >> $output_objdir/$soname.def; 7956e4f6584cSmrg fi~ 7957e4f6584cSmrg $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' 7958e4f6584cSmrg else 7959e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7960e4f6584cSmrg fi 7961e4f6584cSmrg ;; 7962e4f6584cSmrg darwin* | rhapsody*) 7963e4f6584cSmrg _LT_DARWIN_LINKER_FEATURES($1) 7964e4f6584cSmrg ;; 796509885543Smrg 7966e4f6584cSmrg dgux*) 7967e4f6584cSmrg case $cc_basename in 7968e4f6584cSmrg ec++*) 7969e4f6584cSmrg # FIXME: insert proper C++ library support 7970e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7971e4f6584cSmrg ;; 7972e4f6584cSmrg ghcx*) 7973e4f6584cSmrg # Green Hills C++ Compiler 7974e4f6584cSmrg # FIXME: insert proper C++ library support 7975e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7976e4f6584cSmrg ;; 7977e4f6584cSmrg *) 7978e4f6584cSmrg # FIXME: insert proper C++ library support 7979e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7980e4f6584cSmrg ;; 7981e4f6584cSmrg esac 7982e4f6584cSmrg ;; 798309885543Smrg 7984e4f6584cSmrg freebsd[[12]]*) 7985e4f6584cSmrg # C++ shared libraries reported to be fairly broken before 7986e4f6584cSmrg # switch to ELF 7987e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7988e4f6584cSmrg ;; 798909885543Smrg 7990e4f6584cSmrg freebsd-elf*) 7991e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7992e4f6584cSmrg ;; 799309885543Smrg 7994e4f6584cSmrg freebsd* | dragonfly*) 7995e4f6584cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7996e4f6584cSmrg # conventions 7997e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7998e4f6584cSmrg ;; 799909885543Smrg 8000e4f6584cSmrg gnu*) 8001e4f6584cSmrg ;; 800209885543Smrg 8003e4f6584cSmrg hpux9*) 8004e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8005e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8006e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8007e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8008e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8009e4f6584cSmrg # but as the default 8010e4f6584cSmrg # location of the library. 8011e4f6584cSmrg 8012e4f6584cSmrg case $cc_basename in 8013e4f6584cSmrg CC*) 8014e4f6584cSmrg # FIXME: insert proper C++ library support 8015e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8016e4f6584cSmrg ;; 8017e4f6584cSmrg aCC*) 8018e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8019e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8020e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8021e4f6584cSmrg # linking a shared library. 8022e4f6584cSmrg # 8023e4f6584cSmrg # There doesn't appear to be a way to prevent this compiler from 8024e4f6584cSmrg # explicitly linking system object files so we need to strip them 8025e4f6584cSmrg # from the output so that they don't get included in the library 8026e4f6584cSmrg # dependencies. 8027e4f6584cSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8028e4f6584cSmrg ;; 8029e4f6584cSmrg *) 8030e4f6584cSmrg if test "$GXX" = yes; then 8031e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8032e4f6584cSmrg else 8033e4f6584cSmrg # FIXME: insert proper C++ library support 8034e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8035e4f6584cSmrg fi 8036e4f6584cSmrg ;; 8037e4f6584cSmrg esac 8038e4f6584cSmrg ;; 8039e4f6584cSmrg 8040e4f6584cSmrg hpux10*|hpux11*) 8041e4f6584cSmrg if test $with_gnu_ld = no; then 8042e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8043e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8044e4f6584cSmrg 8045e4f6584cSmrg case $host_cpu in 8046e4f6584cSmrg hppa*64*|ia64*) 8047e4f6584cSmrg ;; 8048e4f6584cSmrg *) 8049e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8050e4f6584cSmrg ;; 8051e4f6584cSmrg esac 805209885543Smrg fi 8053e4f6584cSmrg case $host_cpu in 8054e4f6584cSmrg hppa*64*|ia64*) 8055e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8056e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8057e4f6584cSmrg ;; 8058e4f6584cSmrg *) 8059e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8060e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8061e4f6584cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8062e4f6584cSmrg # but as the default 8063e4f6584cSmrg # location of the library. 8064e4f6584cSmrg ;; 8065e4f6584cSmrg esac 8066e4f6584cSmrg 8067e4f6584cSmrg case $cc_basename in 8068e4f6584cSmrg CC*) 8069e4f6584cSmrg # FIXME: insert proper C++ library support 8070e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8071e4f6584cSmrg ;; 8072e4f6584cSmrg aCC*) 8073e4f6584cSmrg case $host_cpu in 8074e4f6584cSmrg hppa*64*) 8075e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8076e4f6584cSmrg ;; 8077e4f6584cSmrg ia64*) 8078e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8079e4f6584cSmrg ;; 8080e4f6584cSmrg *) 8081e4f6584cSmrg _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' 8082e4f6584cSmrg ;; 8083e4f6584cSmrg esac 8084e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8085e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8086e4f6584cSmrg # linking a shared library. 8087e4f6584cSmrg # 8088e4f6584cSmrg # There doesn't appear to be a way to prevent this compiler from 8089e4f6584cSmrg # explicitly linking system object files so we need to strip them 8090e4f6584cSmrg # from the output so that they don't get included in the library 8091e4f6584cSmrg # dependencies. 8092e4f6584cSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8093e4f6584cSmrg ;; 8094e4f6584cSmrg *) 8095e4f6584cSmrg if test "$GXX" = yes; then 8096e4f6584cSmrg if test $with_gnu_ld = no; then 8097e4f6584cSmrg case $host_cpu in 8098e4f6584cSmrg hppa*64*) 8099e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8100e4f6584cSmrg ;; 8101e4f6584cSmrg ia64*) 8102e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8103e4f6584cSmrg ;; 8104e4f6584cSmrg *) 8105e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8106e4f6584cSmrg ;; 8107e4f6584cSmrg esac 8108e4f6584cSmrg fi 8109e4f6584cSmrg else 8110e4f6584cSmrg # FIXME: insert proper C++ library support 8111e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8112e4f6584cSmrg fi 8113e4f6584cSmrg ;; 8114e4f6584cSmrg esac 8115e4f6584cSmrg ;; 811609885543Smrg 8117e4f6584cSmrg interix[[3-9]]*) 8118e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8119e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8120e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8121e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8122e4f6584cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8123e4f6584cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8124e4f6584cSmrg # default) and relocated if they conflict, which is a slow very memory 8125e4f6584cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8126e4f6584cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8127e4f6584cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8128e4f6584cSmrg _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' 8129e4f6584cSmrg _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' 8130e4f6584cSmrg ;; 8131e4f6584cSmrg irix5* | irix6*) 8132e4f6584cSmrg case $cc_basename in 8133e4f6584cSmrg CC*) 8134e4f6584cSmrg # SGI C++ 8135e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8136e4f6584cSmrg 8137e4f6584cSmrg # Archives containing C++ object files must be created using 8138e4f6584cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8139e4f6584cSmrg # necessary to make sure instantiated templates are included 8140e4f6584cSmrg # in the archive. 8141e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8142e4f6584cSmrg ;; 8143e4f6584cSmrg *) 8144e4f6584cSmrg if test "$GXX" = yes; then 8145e4f6584cSmrg if test "$with_gnu_ld" = no; then 8146e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8147e4f6584cSmrg else 8148e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 8149e4f6584cSmrg fi 8150e4f6584cSmrg fi 8151e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8152e4f6584cSmrg ;; 8153e4f6584cSmrg esac 8154e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8155e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8156e4f6584cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 8157e4f6584cSmrg ;; 815809885543Smrg 8159e4f6584cSmrg linux* | k*bsd*-gnu) 8160e4f6584cSmrg case $cc_basename in 8161e4f6584cSmrg KCC*) 8162e4f6584cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8163e4f6584cSmrg 8164e4f6584cSmrg # KCC will only create a shared library if the output file 8165e4f6584cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8166e4f6584cSmrg # to its proper name (with version) after linking. 8167e4f6584cSmrg _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' 8168e4f6584cSmrg _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' 8169e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8170e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8171e4f6584cSmrg # linking a shared library. 8172e4f6584cSmrg # 8173e4f6584cSmrg # There doesn't appear to be a way to prevent this compiler from 8174e4f6584cSmrg # explicitly linking system object files so we need to strip them 8175e4f6584cSmrg # from the output so that they don't get included in the library 8176e4f6584cSmrg # dependencies. 8177e4f6584cSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8178e4f6584cSmrg 8179e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8180e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8181e4f6584cSmrg 8182e4f6584cSmrg # Archives containing C++ object files must be created using 8183e4f6584cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8184e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8185e4f6584cSmrg ;; 8186e4f6584cSmrg icpc* | ecpc* ) 8187e4f6584cSmrg # Intel C++ 8188e4f6584cSmrg with_gnu_ld=yes 8189e4f6584cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 8190e4f6584cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8191e4f6584cSmrg # earlier do not add the objects themselves. 8192e4f6584cSmrg case `$CC -V 2>&1` in 8193e4f6584cSmrg *"Version 7."*) 8194e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8195e4f6584cSmrg _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' 8196e4f6584cSmrg ;; 8197e4f6584cSmrg *) # Version 8.0 or newer 8198e4f6584cSmrg tmp_idyn= 8199e4f6584cSmrg case $host_cpu in 8200e4f6584cSmrg ia64*) tmp_idyn=' -i_dynamic';; 8201e4f6584cSmrg esac 8202e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8203e4f6584cSmrg _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' 8204e4f6584cSmrg ;; 8205e4f6584cSmrg esac 8206e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8207e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8208e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8209e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8210e4f6584cSmrg ;; 8211e4f6584cSmrg pgCC* | pgcpp*) 8212e4f6584cSmrg # Portland Group C++ compiler 8213e4f6584cSmrg case `$CC -V` in 8214e4f6584cSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 8215e4f6584cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8216e4f6584cSmrg rm -rf $tpldir~ 8217e4f6584cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8218e4f6584cSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 8219e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8220e4f6584cSmrg rm -rf $tpldir~ 8221e4f6584cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8222e4f6584cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 8223e4f6584cSmrg $RANLIB $oldlib' 8224e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8225e4f6584cSmrg rm -rf $tpldir~ 8226e4f6584cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8227e4f6584cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8228e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8229e4f6584cSmrg rm -rf $tpldir~ 8230e4f6584cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8231e4f6584cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 8232e4f6584cSmrg ;; 8233e4f6584cSmrg *) # Version 6 will use weak symbols 8234e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8235e4f6584cSmrg _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' 8236e4f6584cSmrg ;; 8237e4f6584cSmrg esac 823809885543Smrg 8239e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8240e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8241e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8242e4f6584cSmrg ;; 8243e4f6584cSmrg cxx*) 8244e4f6584cSmrg # Compaq C++ 8245e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8246e4f6584cSmrg _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' 824709885543Smrg 8248e4f6584cSmrg runpath_var=LD_RUN_PATH 8249e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8250e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 825109885543Smrg 8252e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8253e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8254e4f6584cSmrg # linking a shared library. 8255e4f6584cSmrg # 8256e4f6584cSmrg # There doesn't appear to be a way to prevent this compiler from 8257e4f6584cSmrg # explicitly linking system object files so we need to strip them 8258e4f6584cSmrg # from the output so that they don't get included in the library 8259e4f6584cSmrg # dependencies. 8260e4f6584cSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8261e4f6584cSmrg ;; 8262e4f6584cSmrg xl*) 8263e4f6584cSmrg # IBM XL 8.0 on PPC, with GNU ld 8264e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8265e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8266e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8267e4f6584cSmrg if test "x$supports_anon_versioning" = xyes; then 8268e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8269e4f6584cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8270e4f6584cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8271e4f6584cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8272e4f6584cSmrg fi 8273e4f6584cSmrg ;; 8274e4f6584cSmrg *) 8275e4f6584cSmrg case `$CC -V 2>&1 | sed 5q` in 8276e4f6584cSmrg *Sun\ C*) 8277e4f6584cSmrg # Sun C++ 5.9 8278e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8279e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8280e4f6584cSmrg _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' 8281e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8282e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8283e4f6584cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8284e4f6584cSmrg 8285e4f6584cSmrg # Not sure whether something based on 8286e4f6584cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8287e4f6584cSmrg # would be better. 8288e4f6584cSmrg output_verbose_link_cmd='echo' 8289e4f6584cSmrg 8290e4f6584cSmrg # Archives containing C++ object files must be created using 8291e4f6584cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8292e4f6584cSmrg # necessary to make sure instantiated templates are included 8293e4f6584cSmrg # in the archive. 8294e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8295e4f6584cSmrg ;; 8296e4f6584cSmrg esac 8297e4f6584cSmrg ;; 8298e4f6584cSmrg esac 8299e4f6584cSmrg ;; 830009885543Smrg 8301e4f6584cSmrg lynxos*) 8302e4f6584cSmrg # FIXME: insert proper C++ library support 8303e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8304e4f6584cSmrg ;; 830509885543Smrg 8306e4f6584cSmrg m88k*) 8307e4f6584cSmrg # FIXME: insert proper C++ library support 8308e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8309e4f6584cSmrg ;; 831009885543Smrg 8311e4f6584cSmrg mvs*) 8312e4f6584cSmrg case $cc_basename in 8313e4f6584cSmrg cxx*) 8314e4f6584cSmrg # FIXME: insert proper C++ library support 8315e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8316e4f6584cSmrg ;; 8317e4f6584cSmrg *) 8318e4f6584cSmrg # FIXME: insert proper C++ library support 8319e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8320e4f6584cSmrg ;; 8321e4f6584cSmrg esac 8322e4f6584cSmrg ;; 8323e4f6584cSmrg 8324e4f6584cSmrg netbsd*) 8325e4f6584cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8326e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8327e4f6584cSmrg wlarc= 8328e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8329e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8330e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 833109885543Smrg fi 8332e4f6584cSmrg # Workaround some broken pre-1.5 toolchains 8333e4f6584cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8334e4f6584cSmrg ;; 833509885543Smrg 8336e4f6584cSmrg *nto* | *qnx*) 8337e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8338e4f6584cSmrg ;; 833909885543Smrg 8340e4f6584cSmrg openbsd2*) 8341e4f6584cSmrg # C++ shared libraries are fairly broken 8342e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8343e4f6584cSmrg ;; 834409885543Smrg 8345e4f6584cSmrg openbsd*) 8346e4f6584cSmrg if test -f /usr/libexec/ld.so; then 8347e4f6584cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8348e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8349e4f6584cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8350e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8351e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8352e4f6584cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8353e4f6584cSmrg _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' 8354e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8355e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8356e4f6584cSmrg fi 8357e4f6584cSmrg output_verbose_link_cmd=echo 835809885543Smrg else 8359e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 836009885543Smrg fi 8361e4f6584cSmrg ;; 836209885543Smrg 8363e4f6584cSmrg osf3* | osf4* | osf5*) 8364e4f6584cSmrg case $cc_basename in 8365e4f6584cSmrg KCC*) 8366e4f6584cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8367e4f6584cSmrg 8368e4f6584cSmrg # KCC will only create a shared library if the output file 8369e4f6584cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8370e4f6584cSmrg # to its proper name (with version) after linking. 8371e4f6584cSmrg _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' 8372e4f6584cSmrg 8373e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8374e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8375e4f6584cSmrg 8376e4f6584cSmrg # Archives containing C++ object files must be created using 8377e4f6584cSmrg # the KAI C++ compiler. 8378e4f6584cSmrg case $host in 8379e4f6584cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8380e4f6584cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8381e4f6584cSmrg esac 8382e4f6584cSmrg ;; 8383e4f6584cSmrg RCC*) 8384e4f6584cSmrg # Rational C++ 2.4.1 8385e4f6584cSmrg # FIXME: insert proper C++ library support 8386e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8387e4f6584cSmrg ;; 8388e4f6584cSmrg cxx*) 8389e4f6584cSmrg case $host in 8390e4f6584cSmrg osf3*) 8391e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8392e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8393e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8394e4f6584cSmrg ;; 8395e4f6584cSmrg *) 8396e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8397e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8398e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8399e4f6584cSmrg echo "-hidden">> $lib.exp~ 8400e4f6584cSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 8401e4f6584cSmrg $RM $lib.exp' 8402e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8403e4f6584cSmrg ;; 8404e4f6584cSmrg esac 8405e4f6584cSmrg 8406e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8407e4f6584cSmrg 8408e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8409e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8410e4f6584cSmrg # linking a shared library. 8411e4f6584cSmrg # 8412e4f6584cSmrg # There doesn't appear to be a way to prevent this compiler from 8413e4f6584cSmrg # explicitly linking system object files so we need to strip them 8414e4f6584cSmrg # from the output so that they don't get included in the library 8415e4f6584cSmrg # dependencies. 8416e4f6584cSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8417e4f6584cSmrg ;; 8418e4f6584cSmrg *) 8419e4f6584cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8420e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8421e4f6584cSmrg case $host in 8422e4f6584cSmrg osf3*) 8423e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8424e4f6584cSmrg ;; 8425e4f6584cSmrg *) 8426e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8427e4f6584cSmrg ;; 8428e4f6584cSmrg esac 8429e4f6584cSmrg 8430e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8431e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8432e4f6584cSmrg 8433e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8434e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8435e4f6584cSmrg # linking a shared library. 8436e4f6584cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8437e4f6584cSmrg 8438e4f6584cSmrg else 8439e4f6584cSmrg # FIXME: insert proper C++ library support 8440e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8441e4f6584cSmrg fi 8442e4f6584cSmrg ;; 8443e4f6584cSmrg esac 8444e4f6584cSmrg ;; 8445e4f6584cSmrg 8446e4f6584cSmrg psos*) 8447e4f6584cSmrg # FIXME: insert proper C++ library support 8448e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8449e4f6584cSmrg ;; 8450e4f6584cSmrg 8451e4f6584cSmrg sunos4*) 8452e4f6584cSmrg case $cc_basename in 8453e4f6584cSmrg CC*) 8454e4f6584cSmrg # Sun C++ 4.x 8455e4f6584cSmrg # FIXME: insert proper C++ library support 8456e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8457e4f6584cSmrg ;; 8458e4f6584cSmrg lcc*) 8459e4f6584cSmrg # Lucid 8460e4f6584cSmrg # FIXME: insert proper C++ library support 8461e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8462e4f6584cSmrg ;; 8463e4f6584cSmrg *) 8464e4f6584cSmrg # FIXME: insert proper C++ library support 8465e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8466e4f6584cSmrg ;; 8467e4f6584cSmrg esac 8468e4f6584cSmrg ;; 8469e4f6584cSmrg 8470e4f6584cSmrg solaris*) 8471e4f6584cSmrg case $cc_basename in 8472e4f6584cSmrg CC*) 8473e4f6584cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 8474e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8475e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8476e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8477e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8478e4f6584cSmrg $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' 8479e4f6584cSmrg 8480e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8481e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8482e4f6584cSmrg case $host_os in 8483e4f6584cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8484e4f6584cSmrg *) 8485e4f6584cSmrg # The compiler driver will combine and reorder linker options, 8486e4f6584cSmrg # but understands `-z linker_flag'. 8487e4f6584cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8488e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8489e4f6584cSmrg ;; 8490e4f6584cSmrg esac 8491e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8492e4f6584cSmrg 8493e4f6584cSmrg output_verbose_link_cmd='echo' 8494e4f6584cSmrg 8495e4f6584cSmrg # Archives containing C++ object files must be created using 8496e4f6584cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8497e4f6584cSmrg # necessary to make sure instantiated templates are included 8498e4f6584cSmrg # in the archive. 8499e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8500e4f6584cSmrg ;; 8501e4f6584cSmrg gcx*) 8502e4f6584cSmrg # Green Hills C++ Compiler 8503e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8504e4f6584cSmrg 8505e4f6584cSmrg # The C++ compiler must be used to create the archive. 8506e4f6584cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8507e4f6584cSmrg ;; 8508e4f6584cSmrg *) 8509e4f6584cSmrg # GNU C++ compiler with Solaris linker 8510e4f6584cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8511e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8512e4f6584cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8513e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8514e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8515e4f6584cSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8516e4f6584cSmrg 8517e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8518e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8519e4f6584cSmrg # linking a shared library. 8520e4f6584cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8521e4f6584cSmrg else 8522e4f6584cSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8523e4f6584cSmrg # platform. 8524e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8525e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8526e4f6584cSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8527e4f6584cSmrg 8528e4f6584cSmrg # Commands to make compiler produce verbose output that lists 8529e4f6584cSmrg # what "hidden" libraries, object files and flags are used when 8530e4f6584cSmrg # linking a shared library. 8531e4f6584cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8532e4f6584cSmrg fi 8533e4f6584cSmrg 8534e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8535e4f6584cSmrg case $host_os in 8536e4f6584cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8537e4f6584cSmrg *) 8538e4f6584cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8539e4f6584cSmrg ;; 8540e4f6584cSmrg esac 8541e4f6584cSmrg fi 8542e4f6584cSmrg ;; 8543e4f6584cSmrg esac 8544e4f6584cSmrg ;; 8545e4f6584cSmrg 8546e4f6584cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8547e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8548e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8549e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8550e4f6584cSmrg runpath_var='LD_RUN_PATH' 8551e4f6584cSmrg 8552e4f6584cSmrg case $cc_basename in 8553e4f6584cSmrg CC*) 8554e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8555e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8556e4f6584cSmrg ;; 8557e4f6584cSmrg *) 8558e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8559e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8560e4f6584cSmrg ;; 8561e4f6584cSmrg esac 8562e4f6584cSmrg ;; 856309885543Smrg 8564e4f6584cSmrg sysv5* | sco3.2v5* | sco5v6*) 8565e4f6584cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 8566e4f6584cSmrg # link with -lc, and that would cause any symbols used from libc to 8567e4f6584cSmrg # always be unresolved, which means just about no library would 8568e4f6584cSmrg # ever link correctly. If we're not using GNU ld we use -z text 8569e4f6584cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 8570e4f6584cSmrg # as -z defs. 8571e4f6584cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8572e4f6584cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8573e4f6584cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8574e4f6584cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8575e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8576e4f6584cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8577e4f6584cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8578e4f6584cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8579e4f6584cSmrg runpath_var='LD_RUN_PATH' 858009885543Smrg 8581e4f6584cSmrg case $cc_basename in 8582e4f6584cSmrg CC*) 8583e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8584e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8585e4f6584cSmrg ;; 8586e4f6584cSmrg *) 8587e4f6584cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8588e4f6584cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8589e4f6584cSmrg ;; 8590e4f6584cSmrg esac 8591e4f6584cSmrg ;; 859209885543Smrg 8593e4f6584cSmrg tandem*) 8594e4f6584cSmrg case $cc_basename in 8595e4f6584cSmrg NCC*) 8596e4f6584cSmrg # NonStop-UX NCC 3.20 8597e4f6584cSmrg # FIXME: insert proper C++ library support 8598e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8599e4f6584cSmrg ;; 8600e4f6584cSmrg *) 8601e4f6584cSmrg # FIXME: insert proper C++ library support 8602e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8603e4f6584cSmrg ;; 8604e4f6584cSmrg esac 8605e4f6584cSmrg ;; 860609885543Smrg 8607e4f6584cSmrg vxworks*) 8608e4f6584cSmrg # FIXME: insert proper C++ library support 8609e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8610e4f6584cSmrg ;; 861109885543Smrg 8612e4f6584cSmrg *) 8613e4f6584cSmrg # FIXME: insert proper C++ library support 8614e4f6584cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8615e4f6584cSmrg ;; 861609885543Smrg esac 861709885543Smrg 8618e4f6584cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8619e4f6584cSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8620e4f6584cSmrg 8621e4f6584cSmrg _LT_TAGVAR(GCC, $1)="$GXX" 8622e4f6584cSmrg _LT_TAGVAR(LD, $1)="$LD" 8623e4f6584cSmrg 8624e4f6584cSmrg ## CAVEAT EMPTOR: 8625e4f6584cSmrg ## There is no encapsulation within the following macros, do not change 8626e4f6584cSmrg ## the running order or otherwise move them around unless you know exactly 8627e4f6584cSmrg ## what you are doing... 8628e4f6584cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 8629e4f6584cSmrg _LT_COMPILER_PIC($1) 8630e4f6584cSmrg _LT_COMPILER_C_O($1) 8631e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 8632e4f6584cSmrg _LT_LINKER_SHLIBS($1) 8633e4f6584cSmrg _LT_SYS_DYNAMIC_LINKER($1) 8634e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8635e4f6584cSmrg 8636e4f6584cSmrg _LT_CONFIG($1) 8637e4f6584cSmrg fi # test -n "$compiler" 8638e4f6584cSmrg 8639e4f6584cSmrg CC=$lt_save_CC 8640e4f6584cSmrg LDCXX=$LD 8641e4f6584cSmrg LD=$lt_save_LD 8642e4f6584cSmrg GCC=$lt_save_GCC 8643e4f6584cSmrg with_gnu_ld=$lt_save_with_gnu_ld 8644e4f6584cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 8645e4f6584cSmrg lt_cv_path_LD=$lt_save_path_LD 8646e4f6584cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8647e4f6584cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8648e4f6584cSmrgfi # test "$_lt_caught_CXX_error" != yes 864909885543Smrg 8650e4f6584cSmrgAC_LANG_POP 8651e4f6584cSmrg])# _LT_LANG_CXX_CONFIG 865209885543Smrg 865309885543Smrg 8654e4f6584cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8655e4f6584cSmrg# --------------------------------- 8656e4f6584cSmrg# Figure out "hidden" library dependencies from verbose 8657e4f6584cSmrg# compiler output when linking a shared library. 8658e4f6584cSmrg# Parse the compiler output and extract the necessary 8659e4f6584cSmrg# objects, libraries and library flags. 8660e4f6584cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8661e4f6584cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8662e4f6584cSmrg# Dependencies to place before and after the object being linked: 8663e4f6584cSmrg_LT_TAGVAR(predep_objects, $1)= 8664e4f6584cSmrg_LT_TAGVAR(postdep_objects, $1)= 8665e4f6584cSmrg_LT_TAGVAR(predeps, $1)= 8666e4f6584cSmrg_LT_TAGVAR(postdeps, $1)= 8667e4f6584cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 866809885543Smrg 8669e4f6584cSmrgdnl we can't use the lt_simple_compile_test_code here, 8670e4f6584cSmrgdnl because it contains code intended for an executable, 8671e4f6584cSmrgdnl not a library. It's possible we should let each 8672e4f6584cSmrgdnl tag define a new lt_????_link_test_code variable, 8673e4f6584cSmrgdnl but it's only used here... 8674e4f6584cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8675e4f6584cSmrgint a; 8676e4f6584cSmrgvoid foo (void) { a = 0; } 8677e4f6584cSmrg_LT_EOF 8678e4f6584cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8679e4f6584cSmrgclass Foo 8680e4f6584cSmrg{ 8681e4f6584cSmrgpublic: 8682e4f6584cSmrg Foo (void) { a = 0; } 8683e4f6584cSmrgprivate: 8684e4f6584cSmrg int a; 8685e4f6584cSmrg}; 8686e4f6584cSmrg_LT_EOF 8687e4f6584cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8688e4f6584cSmrg subroutine foo 8689e4f6584cSmrg implicit none 8690e4f6584cSmrg integer*4 a 8691e4f6584cSmrg a=0 8692e4f6584cSmrg return 8693e4f6584cSmrg end 8694e4f6584cSmrg_LT_EOF 8695e4f6584cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8696e4f6584cSmrg subroutine foo 8697e4f6584cSmrg implicit none 8698e4f6584cSmrg integer a 8699e4f6584cSmrg a=0 8700e4f6584cSmrg return 8701e4f6584cSmrg end 8702e4f6584cSmrg_LT_EOF 8703e4f6584cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8704e4f6584cSmrgpublic class foo { 8705e4f6584cSmrg private int a; 8706e4f6584cSmrg public void bar (void) { 8707e4f6584cSmrg a = 0; 8708e4f6584cSmrg } 8709e4f6584cSmrg}; 8710e4f6584cSmrg_LT_EOF 8711e4f6584cSmrg]) 8712e4f6584cSmrgdnl Parse the compiler output and extract the necessary 8713e4f6584cSmrgdnl objects, libraries and library flags. 8714e4f6584cSmrgif AC_TRY_EVAL(ac_compile); then 8715e4f6584cSmrg # Parse the compiler output and extract the necessary 8716e4f6584cSmrg # objects, libraries and library flags. 871709885543Smrg 8718e4f6584cSmrg # Sentinel used to keep track of whether or not we are before 8719e4f6584cSmrg # the conftest object file. 8720e4f6584cSmrg pre_test_object_deps_done=no 872109885543Smrg 8722e4f6584cSmrg for p in `eval "$output_verbose_link_cmd"`; do 8723e4f6584cSmrg case $p in 872409885543Smrg 8725e4f6584cSmrg -L* | -R* | -l*) 8726e4f6584cSmrg # Some compilers place space between "-{L,R}" and the path. 8727e4f6584cSmrg # Remove the space. 8728e4f6584cSmrg if test $p = "-L" || 8729e4f6584cSmrg test $p = "-R"; then 8730e4f6584cSmrg prev=$p 8731e4f6584cSmrg continue 8732e4f6584cSmrg else 8733e4f6584cSmrg prev= 8734e4f6584cSmrg fi 873509885543Smrg 8736e4f6584cSmrg if test "$pre_test_object_deps_done" = no; then 8737e4f6584cSmrg case $p in 8738e4f6584cSmrg -L* | -R*) 8739e4f6584cSmrg # Internal compiler library paths should come after those 8740e4f6584cSmrg # provided the user. The postdeps already come after the 8741e4f6584cSmrg # user supplied libs so there is no need to process them. 8742e4f6584cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8743e4f6584cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8744e4f6584cSmrg else 8745e4f6584cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8746e4f6584cSmrg fi 8747e4f6584cSmrg ;; 8748e4f6584cSmrg # The "-l" case would never come before the object being 8749e4f6584cSmrg # linked, so don't bother handling this case. 8750e4f6584cSmrg esac 8751e4f6584cSmrg else 8752e4f6584cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8753e4f6584cSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8754e4f6584cSmrg else 8755e4f6584cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8756e4f6584cSmrg fi 8757e4f6584cSmrg fi 8758e4f6584cSmrg ;; 875909885543Smrg 8760e4f6584cSmrg *.$objext) 8761e4f6584cSmrg # This assumes that the test object file only shows up 8762e4f6584cSmrg # once in the compiler output. 8763e4f6584cSmrg if test "$p" = "conftest.$objext"; then 8764e4f6584cSmrg pre_test_object_deps_done=yes 8765e4f6584cSmrg continue 8766e4f6584cSmrg fi 876709885543Smrg 8768e4f6584cSmrg if test "$pre_test_object_deps_done" = no; then 8769e4f6584cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8770e4f6584cSmrg _LT_TAGVAR(predep_objects, $1)="$p" 8771e4f6584cSmrg else 8772e4f6584cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8773e4f6584cSmrg fi 8774e4f6584cSmrg else 8775e4f6584cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8776e4f6584cSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 8777e4f6584cSmrg else 8778e4f6584cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8779e4f6584cSmrg fi 8780e4f6584cSmrg fi 8781e4f6584cSmrg ;; 878209885543Smrg 8783e4f6584cSmrg *) ;; # Ignore the rest. 878409885543Smrg 8785e4f6584cSmrg esac 8786e4f6584cSmrg done 8787e4f6584cSmrg 8788e4f6584cSmrg # Clean up. 8789e4f6584cSmrg rm -f a.out a.exe 879009885543Smrgelse 8791e4f6584cSmrg echo "libtool.m4: error: problem compiling $1 test program" 879209885543Smrgfi 879309885543Smrg 8794e4f6584cSmrg$RM -f confest.$objext 879509885543Smrg 8796e4f6584cSmrg# PORTME: override above test on systems where it is broken 8797e4f6584cSmrgm4_if([$1], [CXX], 8798e4f6584cSmrg[case $host_os in 8799e4f6584cSmrginterix[[3-9]]*) 8800e4f6584cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8801e4f6584cSmrg # hack all around it, let's just trust "g++" to DTRT. 8802e4f6584cSmrg _LT_TAGVAR(predep_objects,$1)= 8803e4f6584cSmrg _LT_TAGVAR(postdep_objects,$1)= 8804e4f6584cSmrg _LT_TAGVAR(postdeps,$1)= 8805e4f6584cSmrg ;; 880609885543Smrg 8807e4f6584cSmrglinux*) 8808e4f6584cSmrg case `$CC -V 2>&1 | sed 5q` in 8809e4f6584cSmrg *Sun\ C*) 8810e4f6584cSmrg # Sun C++ 5.9 881109885543Smrg 8812e4f6584cSmrg # The more standards-conforming stlport4 library is 8813e4f6584cSmrg # incompatible with the Cstd library. Avoid specifying 8814e4f6584cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8815e4f6584cSmrg # -library=stlport4 depends on it. 8816e4f6584cSmrg case " $CXX $CXXFLAGS " in 8817e4f6584cSmrg *" -library=stlport4 "*) 8818e4f6584cSmrg solaris_use_stlport4=yes 8819e4f6584cSmrg ;; 8820e4f6584cSmrg esac 882109885543Smrg 8822e4f6584cSmrg if test "$solaris_use_stlport4" != yes; then 8823e4f6584cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8824e4f6584cSmrg fi 8825e4f6584cSmrg ;; 8826e4f6584cSmrg esac 8827e4f6584cSmrg ;; 882809885543Smrg 8829e4f6584cSmrgsolaris*) 8830e4f6584cSmrg case $cc_basename in 8831e4f6584cSmrg CC*) 8832e4f6584cSmrg # The more standards-conforming stlport4 library is 8833e4f6584cSmrg # incompatible with the Cstd library. Avoid specifying 8834e4f6584cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8835e4f6584cSmrg # -library=stlport4 depends on it. 8836e4f6584cSmrg case " $CXX $CXXFLAGS " in 8837e4f6584cSmrg *" -library=stlport4 "*) 8838e4f6584cSmrg solaris_use_stlport4=yes 8839e4f6584cSmrg ;; 8840e4f6584cSmrg esac 884109885543Smrg 8842e4f6584cSmrg # Adding this requires a known-good setup of shared libraries for 8843e4f6584cSmrg # Sun compiler versions before 5.6, else PIC objects from an old 8844e4f6584cSmrg # archive will be linked into the output, leading to subtle bugs. 8845e4f6584cSmrg if test "$solaris_use_stlport4" != yes; then 8846e4f6584cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8847e4f6584cSmrg fi 8848e4f6584cSmrg ;; 8849e4f6584cSmrg esac 8850e4f6584cSmrg ;; 8851e4f6584cSmrgesac 8852e4f6584cSmrg]) 885309885543Smrg 8854e4f6584cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 8855e4f6584cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8856e4f6584cSmrgesac 8857e4f6584cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8858e4f6584cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8859e4f6584cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 886009885543Smrgfi 8861e4f6584cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8862e4f6584cSmrg [The directories searched by this compiler when creating a shared library]) 8863e4f6584cSmrg_LT_TAGDECL([], [predep_objects], [1], 8864e4f6584cSmrg [Dependencies to place before and after the objects being linked to 8865e4f6584cSmrg create a shared library]) 8866e4f6584cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 8867e4f6584cSmrg_LT_TAGDECL([], [predeps], [1]) 8868e4f6584cSmrg_LT_TAGDECL([], [postdeps], [1]) 8869e4f6584cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8870e4f6584cSmrg [The library search path used internally by the compiler when linking 8871e4f6584cSmrg a shared library]) 8872e4f6584cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8873e4f6584cSmrg 8874e4f6584cSmrg 8875e4f6584cSmrg# _LT_PROG_F77 8876e4f6584cSmrg# ------------ 8877e4f6584cSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 8878e4f6584cSmrg# if there is no fortran compiler, we have our own version here. 8879e4f6584cSmrgm4_defun([_LT_PROG_F77], 8880e4f6584cSmrg[ 8881e4f6584cSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 8882e4f6584cSmrgAC_PROG_F77 8883e4f6584cSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 8884e4f6584cSmrg _lt_disable_F77=yes 888509885543Smrgfi 8886e4f6584cSmrgpopdef([AC_MSG_ERROR]) 8887e4f6584cSmrg])# _LT_PROG_F77 888809885543Smrg 8889e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 8890e4f6584cSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 889109885543Smrg 889209885543Smrg 8893e4f6584cSmrg# _LT_LANG_F77_CONFIG([TAG]) 8894e4f6584cSmrg# -------------------------- 8895e4f6584cSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 8896e4f6584cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8897e4f6584cSmrg# to write the compiler configuration to `libtool'. 8898e4f6584cSmrgm4_defun([_LT_LANG_F77_CONFIG], 8899e4f6584cSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 8900e4f6584cSmrgAC_LANG_PUSH(Fortran 77) 890109885543Smrg 8902e4f6584cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8903e4f6584cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8904e4f6584cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8905e4f6584cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8906e4f6584cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8907e4f6584cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8908e4f6584cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8909e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8910e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8911e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8912e4f6584cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8913e4f6584cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8914e4f6584cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8915e4f6584cSmrg_LT_TAGVAR(module_cmds, $1)= 8916e4f6584cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8917e4f6584cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8918e4f6584cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8919e4f6584cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8920e4f6584cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8921e4f6584cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 892209885543Smrg 8923e4f6584cSmrg# Source file extension for f77 test sources. 8924e4f6584cSmrgac_ext=f 892509885543Smrg 8926e4f6584cSmrg# Object file extension for compiled f77 test sources. 8927e4f6584cSmrgobjext=o 8928e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 8929e4f6584cSmrg 8930e4f6584cSmrg# No sense in running all these tests if we already determined that 8931e4f6584cSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 8932e4f6584cSmrg# are currently assumed to apply to all compilers on this platform, 8933e4f6584cSmrg# and will be corrupted by setting them based on a non-working compiler. 8934e4f6584cSmrgif test "$_lt_disable_F77" != yes; then 8935e4f6584cSmrg # Code to be used in simple compile tests 8936e4f6584cSmrg lt_simple_compile_test_code="\ 8937e4f6584cSmrg subroutine t 8938e4f6584cSmrg return 8939e4f6584cSmrg end 8940e4f6584cSmrg" 894109885543Smrg 8942e4f6584cSmrg # Code to be used in simple link tests 8943e4f6584cSmrg lt_simple_link_test_code="\ 8944e4f6584cSmrg program t 8945e4f6584cSmrg end 8946e4f6584cSmrg" 894709885543Smrg 8948e4f6584cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8949e4f6584cSmrg _LT_TAG_COMPILER 895009885543Smrg 8951e4f6584cSmrg # save warnings/boilerplate of simple test code 8952e4f6584cSmrg _LT_COMPILER_BOILERPLATE 8953e4f6584cSmrg _LT_LINKER_BOILERPLATE 895409885543Smrg 8955e4f6584cSmrg # Allow CC to be a program name with arguments. 8956e4f6584cSmrg lt_save_CC="$CC" 8957e4f6584cSmrg lt_save_GCC=$GCC 8958e4f6584cSmrg CC=${F77-"f77"} 8959e4f6584cSmrg compiler=$CC 8960e4f6584cSmrg _LT_TAGVAR(compiler, $1)=$CC 8961e4f6584cSmrg _LT_CC_BASENAME([$compiler]) 8962e4f6584cSmrg GCC=$G77 8963e4f6584cSmrg if test -n "$compiler"; then 8964e4f6584cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8965e4f6584cSmrg AC_MSG_RESULT([$can_build_shared]) 896609885543Smrg 8967e4f6584cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 8968e4f6584cSmrg test "$can_build_shared" = "no" && enable_shared=no 896909885543Smrg 8970e4f6584cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 8971e4f6584cSmrg # are all built from PIC. 8972e4f6584cSmrg case $host_os in 8973e4f6584cSmrg aix3*) 8974e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 8975e4f6584cSmrg if test -n "$RANLIB"; then 8976e4f6584cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8977e4f6584cSmrg postinstall_cmds='$RANLIB $lib' 8978e4f6584cSmrg fi 8979e4f6584cSmrg ;; 8980e4f6584cSmrg aix[[4-9]]*) 8981e4f6584cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8982e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 898309885543Smrg fi 8984e4f6584cSmrg ;; 89857104f784Smrg esac 8986e4f6584cSmrg AC_MSG_RESULT([$enable_shared]) 8987e4f6584cSmrg 8988e4f6584cSmrg AC_MSG_CHECKING([whether to build static libraries]) 8989e4f6584cSmrg # Make sure either enable_shared or enable_static is yes. 8990e4f6584cSmrg test "$enable_shared" = yes || enable_static=yes 8991e4f6584cSmrg AC_MSG_RESULT([$enable_static]) 8992e4f6584cSmrg 8993e4f6584cSmrg _LT_TAGVAR(GCC, $1)="$G77" 8994e4f6584cSmrg _LT_TAGVAR(LD, $1)="$LD" 8995e4f6584cSmrg 8996e4f6584cSmrg ## CAVEAT EMPTOR: 8997e4f6584cSmrg ## There is no encapsulation within the following macros, do not change 8998e4f6584cSmrg ## the running order or otherwise move them around unless you know exactly 8999e4f6584cSmrg ## what you are doing... 9000e4f6584cSmrg _LT_COMPILER_PIC($1) 9001e4f6584cSmrg _LT_COMPILER_C_O($1) 9002e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 9003e4f6584cSmrg _LT_LINKER_SHLIBS($1) 9004e4f6584cSmrg _LT_SYS_DYNAMIC_LINKER($1) 9005e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9006e4f6584cSmrg 9007e4f6584cSmrg _LT_CONFIG($1) 9008e4f6584cSmrg fi # test -n "$compiler" 9009e4f6584cSmrg 9010e4f6584cSmrg GCC=$lt_save_GCC 9011e4f6584cSmrg CC="$lt_save_CC" 9012e4f6584cSmrgfi # test "$_lt_disable_F77" != yes 901309885543Smrg 9014e4f6584cSmrgAC_LANG_POP 9015e4f6584cSmrg])# _LT_LANG_F77_CONFIG 9016e4f6584cSmrg 9017e4f6584cSmrg 9018e4f6584cSmrg# _LT_PROG_FC 9019e4f6584cSmrg# ----------- 9020e4f6584cSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 9021e4f6584cSmrg# if there is no fortran compiler, we have our own version here. 9022e4f6584cSmrgm4_defun([_LT_PROG_FC], 9023e4f6584cSmrg[ 9024e4f6584cSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 9025e4f6584cSmrgAC_PROG_FC 9026e4f6584cSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 9027e4f6584cSmrg _lt_disable_FC=yes 9028e4f6584cSmrgfi 9029e4f6584cSmrgpopdef([AC_MSG_ERROR]) 9030e4f6584cSmrg])# _LT_PROG_FC 9031e4f6584cSmrg 9032e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9033e4f6584cSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 9034e4f6584cSmrg 9035e4f6584cSmrg 9036e4f6584cSmrg# _LT_LANG_FC_CONFIG([TAG]) 9037e4f6584cSmrg# ------------------------- 9038e4f6584cSmrg# Ensure that the configuration variables for a Fortran compiler are 9039e4f6584cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9040e4f6584cSmrg# to write the compiler configuration to `libtool'. 9041e4f6584cSmrgm4_defun([_LT_LANG_FC_CONFIG], 9042e4f6584cSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 9043e4f6584cSmrgAC_LANG_PUSH(Fortran) 9044e4f6584cSmrg 9045e4f6584cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9046e4f6584cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9047e4f6584cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9048e4f6584cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9049e4f6584cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9050e4f6584cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9051e4f6584cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9052e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9053e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9054e4f6584cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9055e4f6584cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9056e4f6584cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9057e4f6584cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9058e4f6584cSmrg_LT_TAGVAR(module_cmds, $1)= 9059e4f6584cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9060e4f6584cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9061e4f6584cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9062e4f6584cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9063e4f6584cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9064e4f6584cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9065e4f6584cSmrg 9066e4f6584cSmrg# Source file extension for fc test sources. 9067e4f6584cSmrgac_ext=${ac_fc_srcext-f} 9068e4f6584cSmrg 9069e4f6584cSmrg# Object file extension for compiled fc test sources. 9070e4f6584cSmrgobjext=o 9071e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 9072e4f6584cSmrg 9073e4f6584cSmrg# No sense in running all these tests if we already determined that 9074e4f6584cSmrg# the FC compiler isn't working. Some variables (like enable_shared) 9075e4f6584cSmrg# are currently assumed to apply to all compilers on this platform, 9076e4f6584cSmrg# and will be corrupted by setting them based on a non-working compiler. 9077e4f6584cSmrgif test "$_lt_disable_FC" != yes; then 9078e4f6584cSmrg # Code to be used in simple compile tests 9079e4f6584cSmrg lt_simple_compile_test_code="\ 9080e4f6584cSmrg subroutine t 9081e4f6584cSmrg return 9082e4f6584cSmrg end 9083e4f6584cSmrg" 9084e4f6584cSmrg 9085e4f6584cSmrg # Code to be used in simple link tests 9086e4f6584cSmrg lt_simple_link_test_code="\ 9087e4f6584cSmrg program t 9088e4f6584cSmrg end 9089e4f6584cSmrg" 9090e4f6584cSmrg 9091e4f6584cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9092e4f6584cSmrg _LT_TAG_COMPILER 9093e4f6584cSmrg 9094e4f6584cSmrg # save warnings/boilerplate of simple test code 9095e4f6584cSmrg _LT_COMPILER_BOILERPLATE 9096e4f6584cSmrg _LT_LINKER_BOILERPLATE 9097e4f6584cSmrg 9098e4f6584cSmrg # Allow CC to be a program name with arguments. 9099e4f6584cSmrg lt_save_CC="$CC" 9100e4f6584cSmrg lt_save_GCC=$GCC 9101e4f6584cSmrg CC=${FC-"f95"} 9102e4f6584cSmrg compiler=$CC 9103e4f6584cSmrg GCC=$ac_cv_fc_compiler_gnu 9104e4f6584cSmrg 9105e4f6584cSmrg _LT_TAGVAR(compiler, $1)=$CC 9106e4f6584cSmrg _LT_CC_BASENAME([$compiler]) 9107e4f6584cSmrg 9108e4f6584cSmrg if test -n "$compiler"; then 9109e4f6584cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9110e4f6584cSmrg AC_MSG_RESULT([$can_build_shared]) 9111e4f6584cSmrg 9112e4f6584cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9113e4f6584cSmrg test "$can_build_shared" = "no" && enable_shared=no 9114e4f6584cSmrg 9115e4f6584cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9116e4f6584cSmrg # are all built from PIC. 9117e4f6584cSmrg case $host_os in 9118e4f6584cSmrg aix3*) 9119e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 9120e4f6584cSmrg if test -n "$RANLIB"; then 9121e4f6584cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9122e4f6584cSmrg postinstall_cmds='$RANLIB $lib' 9123e4f6584cSmrg fi 9124e4f6584cSmrg ;; 9125e4f6584cSmrg aix[[4-9]]*) 9126e4f6584cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9127e4f6584cSmrg test "$enable_shared" = yes && enable_static=no 912809885543Smrg fi 9129e4f6584cSmrg ;; 9130e4f6584cSmrg esac 9131e4f6584cSmrg AC_MSG_RESULT([$enable_shared]) 9132e4f6584cSmrg 9133e4f6584cSmrg AC_MSG_CHECKING([whether to build static libraries]) 9134e4f6584cSmrg # Make sure either enable_shared or enable_static is yes. 9135e4f6584cSmrg test "$enable_shared" = yes || enable_static=yes 9136e4f6584cSmrg AC_MSG_RESULT([$enable_static]) 9137e4f6584cSmrg 9138e4f6584cSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9139e4f6584cSmrg _LT_TAGVAR(LD, $1)="$LD" 9140e4f6584cSmrg 9141e4f6584cSmrg ## CAVEAT EMPTOR: 9142e4f6584cSmrg ## There is no encapsulation within the following macros, do not change 9143e4f6584cSmrg ## the running order or otherwise move them around unless you know exactly 9144e4f6584cSmrg ## what you are doing... 9145e4f6584cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 9146e4f6584cSmrg _LT_COMPILER_PIC($1) 9147e4f6584cSmrg _LT_COMPILER_C_O($1) 9148e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 9149e4f6584cSmrg _LT_LINKER_SHLIBS($1) 9150e4f6584cSmrg _LT_SYS_DYNAMIC_LINKER($1) 9151e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9152e4f6584cSmrg 9153e4f6584cSmrg _LT_CONFIG($1) 9154e4f6584cSmrg fi # test -n "$compiler" 9155e4f6584cSmrg 9156e4f6584cSmrg GCC=$lt_save_GCC 9157e4f6584cSmrg CC="$lt_save_CC" 9158e4f6584cSmrgfi # test "$_lt_disable_FC" != yes 915909885543Smrg 9160e4f6584cSmrgAC_LANG_POP 9161e4f6584cSmrg])# _LT_LANG_FC_CONFIG 91627104f784Smrg 916309885543Smrg 9164e4f6584cSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 9165e4f6584cSmrg# -------------------------- 9166e4f6584cSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9167e4f6584cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9168e4f6584cSmrg# to write the compiler configuration to `libtool'. 9169e4f6584cSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 9170e4f6584cSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9171e4f6584cSmrgAC_LANG_SAVE 91727104f784Smrg 9173e4f6584cSmrg# Source file extension for Java test sources. 9174e4f6584cSmrgac_ext=java 917509885543Smrg 9176e4f6584cSmrg# Object file extension for compiled Java test sources. 9177e4f6584cSmrgobjext=o 9178e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 917909885543Smrg 9180e4f6584cSmrg# Code to be used in simple compile tests 9181e4f6584cSmrglt_simple_compile_test_code="class foo {}" 918209885543Smrg 9183e4f6584cSmrg# Code to be used in simple link tests 9184e4f6584cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 918509885543Smrg 9186e4f6584cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9187e4f6584cSmrg_LT_TAG_COMPILER 918809885543Smrg 9189e4f6584cSmrg# save warnings/boilerplate of simple test code 9190e4f6584cSmrg_LT_COMPILER_BOILERPLATE 9191e4f6584cSmrg_LT_LINKER_BOILERPLATE 919209885543Smrg 9193e4f6584cSmrg# Allow CC to be a program name with arguments. 9194e4f6584cSmrglt_save_CC="$CC" 9195e4f6584cSmrglt_save_GCC=$GCC 9196e4f6584cSmrgGCC=yes 9197e4f6584cSmrgCC=${GCJ-"gcj"} 9198e4f6584cSmrgcompiler=$CC 9199e4f6584cSmrg_LT_TAGVAR(compiler, $1)=$CC 9200e4f6584cSmrg_LT_TAGVAR(LD, $1)="$LD" 9201e4f6584cSmrg_LT_CC_BASENAME([$compiler]) 920209885543Smrg 9203e4f6584cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9204e4f6584cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 920509885543Smrg 9206e4f6584cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 920709885543Smrg 9208e4f6584cSmrgif test -n "$compiler"; then 9209e4f6584cSmrg _LT_COMPILER_NO_RTTI($1) 9210e4f6584cSmrg _LT_COMPILER_PIC($1) 9211e4f6584cSmrg _LT_COMPILER_C_O($1) 9212e4f6584cSmrg _LT_COMPILER_FILE_LOCKS($1) 9213e4f6584cSmrg _LT_LINKER_SHLIBS($1) 9214e4f6584cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9215e4f6584cSmrg 9216e4f6584cSmrg _LT_CONFIG($1) 921709885543Smrgfi 921809885543Smrg 9219e4f6584cSmrgAC_LANG_RESTORE 922009885543Smrg 9221e4f6584cSmrgGCC=$lt_save_GCC 9222e4f6584cSmrgCC="$lt_save_CC" 9223e4f6584cSmrg])# _LT_LANG_GCJ_CONFIG 922409885543Smrg 922509885543Smrg 9226e4f6584cSmrg# _LT_LANG_RC_CONFIG([TAG]) 9227e4f6584cSmrg# ------------------------- 9228e4f6584cSmrg# Ensure that the configuration variables for the Windows resource compiler 9229e4f6584cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9230e4f6584cSmrg# to write the compiler configuration to `libtool'. 9231e4f6584cSmrgm4_defun([_LT_LANG_RC_CONFIG], 9232e4f6584cSmrg[AC_REQUIRE([LT_PROG_RC])dnl 9233e4f6584cSmrgAC_LANG_SAVE 923409885543Smrg 9235e4f6584cSmrg# Source file extension for RC test sources. 9236e4f6584cSmrgac_ext=rc 923709885543Smrg 9238e4f6584cSmrg# Object file extension for compiled RC test sources. 9239e4f6584cSmrgobjext=o 9240e4f6584cSmrg_LT_TAGVAR(objext, $1)=$objext 924109885543Smrg 9242e4f6584cSmrg# Code to be used in simple compile tests 9243e4f6584cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 924409885543Smrg 9245e4f6584cSmrg# Code to be used in simple link tests 9246e4f6584cSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 9247b698ba48Smrg 9248e4f6584cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9249e4f6584cSmrg_LT_TAG_COMPILER 925009885543Smrg 9251e4f6584cSmrg# save warnings/boilerplate of simple test code 9252e4f6584cSmrg_LT_COMPILER_BOILERPLATE 9253e4f6584cSmrg_LT_LINKER_BOILERPLATE 925409885543Smrg 9255e4f6584cSmrg# Allow CC to be a program name with arguments. 9256e4f6584cSmrglt_save_CC="$CC" 9257e4f6584cSmrglt_save_GCC=$GCC 9258e4f6584cSmrgGCC= 9259e4f6584cSmrgCC=${RC-"windres"} 9260e4f6584cSmrgcompiler=$CC 9261e4f6584cSmrg_LT_TAGVAR(compiler, $1)=$CC 9262e4f6584cSmrg_LT_CC_BASENAME([$compiler]) 9263e4f6584cSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9264e4f6584cSmrg 9265e4f6584cSmrgif test -n "$compiler"; then 9266e4f6584cSmrg : 9267e4f6584cSmrg _LT_CONFIG($1) 926809885543Smrgfi 9269e4f6584cSmrg 9270e4f6584cSmrgGCC=$lt_save_GCC 9271e4f6584cSmrgAC_LANG_RESTORE 9272e4f6584cSmrgCC="$lt_save_CC" 9273e4f6584cSmrg])# _LT_LANG_RC_CONFIG 9274e4f6584cSmrg 9275e4f6584cSmrg 9276e4f6584cSmrg# LT_PROG_GCJ 9277e4f6584cSmrg# ----------- 9278e4f6584cSmrgAC_DEFUN([LT_PROG_GCJ], 9279e4f6584cSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9280e4f6584cSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9281e4f6584cSmrg [AC_CHECK_TOOL(GCJ, gcj,) 9282e4f6584cSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9283e4f6584cSmrg AC_SUBST(GCJFLAGS)])])[]dnl 928409885543Smrg]) 9285e4f6584cSmrg 9286e4f6584cSmrg# Old name: 9287e4f6584cSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9288e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9289e4f6584cSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9290e4f6584cSmrg 9291e4f6584cSmrg 9292e4f6584cSmrg# LT_PROG_RC 9293e4f6584cSmrg# ---------- 9294e4f6584cSmrgAC_DEFUN([LT_PROG_RC], 9295e4f6584cSmrg[AC_CHECK_TOOL(RC, windres,) 929609885543Smrg]) 929709885543Smrg 9298e4f6584cSmrg# Old name: 9299e4f6584cSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9300e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9301e4f6584cSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 930209885543Smrg 9303e4f6584cSmrg 9304e4f6584cSmrg# _LT_DECL_EGREP 9305e4f6584cSmrg# -------------- 9306e4f6584cSmrg# If we don't have a new enough Autoconf to choose the best grep 9307e4f6584cSmrg# available, choose the one first in the user's PATH. 9308e4f6584cSmrgm4_defun([_LT_DECL_EGREP], 9309e4f6584cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9310e4f6584cSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9311e4f6584cSmrgtest -z "$GREP" && GREP=grep 9312e4f6584cSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9313e4f6584cSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9314e4f6584cSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9315e4f6584cSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9316e4f6584cSmrgAC_SUBST([GREP]) 931709885543Smrg]) 931809885543Smrg 931909885543Smrg 9320e4f6584cSmrg# _LT_DECL_OBJDUMP 9321e4f6584cSmrg# -------------- 9322e4f6584cSmrg# If we don't have a new enough Autoconf to choose the best objdump 9323e4f6584cSmrg# available, choose the one first in the user's PATH. 9324e4f6584cSmrgm4_defun([_LT_DECL_OBJDUMP], 9325e4f6584cSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9326e4f6584cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9327e4f6584cSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9328e4f6584cSmrgAC_SUBST([OBJDUMP]) 932909885543Smrg]) 933009885543Smrg 933109885543Smrg 9332e4f6584cSmrg# _LT_DECL_SED 9333e4f6584cSmrg# ------------ 9334e4f6584cSmrg# Check for a fully-functional sed program, that truncates 9335e4f6584cSmrg# as few characters as possible. Prefer GNU sed if found. 9336e4f6584cSmrgm4_defun([_LT_DECL_SED], 9337e4f6584cSmrg[AC_PROG_SED 9338e4f6584cSmrgtest -z "$SED" && SED=sed 9339e4f6584cSmrgXsed="$SED -e 1s/^X//" 9340e4f6584cSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9341e4f6584cSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9342e4f6584cSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9343e4f6584cSmrg])# _LT_DECL_SED 934409885543Smrg 9345e4f6584cSmrgm4_ifndef([AC_PROG_SED], [ 9346e4f6584cSmrg# NOTE: This macro has been submitted for inclusion into # 9347e4f6584cSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9348e4f6584cSmrg# a released version of Autoconf we should remove this # 9349e4f6584cSmrg# macro and use it instead. # 935009885543Smrg 9351e4f6584cSmrgm4_defun([AC_PROG_SED], 9352e4f6584cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9353e4f6584cSmrgAC_CACHE_VAL(lt_cv_path_SED, 9354e4f6584cSmrg[# Loop through the user's path and test for sed and gsed. 9355e4f6584cSmrg# Then use that list of sed's as ones to test for truncation. 9356e4f6584cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9357e4f6584cSmrgfor as_dir in $PATH 9358e4f6584cSmrgdo 9359e4f6584cSmrg IFS=$as_save_IFS 9360e4f6584cSmrg test -z "$as_dir" && as_dir=. 9361e4f6584cSmrg for lt_ac_prog in sed gsed; do 9362e4f6584cSmrg for ac_exec_ext in '' $ac_executable_extensions; do 9363e4f6584cSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9364e4f6584cSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9365e4f6584cSmrg fi 9366b698ba48Smrg done 936709885543Smrg done 9368e4f6584cSmrgdone 9369e4f6584cSmrgIFS=$as_save_IFS 9370e4f6584cSmrglt_ac_max=0 9371e4f6584cSmrglt_ac_count=0 9372e4f6584cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9373e4f6584cSmrg# along with /bin/sed that truncates output. 9374e4f6584cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9375e4f6584cSmrg test ! -f $lt_ac_sed && continue 9376e4f6584cSmrg cat /dev/null > conftest.in 9377e4f6584cSmrg lt_ac_count=0 9378e4f6584cSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9379e4f6584cSmrg # Check for GNU sed and select it if it is found. 9380e4f6584cSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9381e4f6584cSmrg lt_cv_path_SED=$lt_ac_sed 9382e4f6584cSmrg break 9383e4f6584cSmrg fi 9384e4f6584cSmrg while true; do 9385e4f6584cSmrg cat conftest.in conftest.in >conftest.tmp 9386e4f6584cSmrg mv conftest.tmp conftest.in 9387e4f6584cSmrg cp conftest.in conftest.nl 9388e4f6584cSmrg echo >>conftest.nl 9389e4f6584cSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9390e4f6584cSmrg cmp -s conftest.out conftest.nl || break 9391e4f6584cSmrg # 10000 chars as input seems more than enough 9392e4f6584cSmrg test $lt_ac_count -gt 10 && break 9393e4f6584cSmrg lt_ac_count=`expr $lt_ac_count + 1` 9394e4f6584cSmrg if test $lt_ac_count -gt $lt_ac_max; then 9395e4f6584cSmrg lt_ac_max=$lt_ac_count 9396e4f6584cSmrg lt_cv_path_SED=$lt_ac_sed 9397e4f6584cSmrg fi 9398e4f6584cSmrg done 9399e4f6584cSmrgdone 9400e4f6584cSmrg]) 9401e4f6584cSmrgSED=$lt_cv_path_SED 9402e4f6584cSmrgAC_SUBST([SED]) 9403e4f6584cSmrgAC_MSG_RESULT([$SED]) 9404e4f6584cSmrg])#AC_PROG_SED 9405e4f6584cSmrg])#m4_ifndef 9406e4f6584cSmrg 9407e4f6584cSmrg# Old name: 9408e4f6584cSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9409e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9410e4f6584cSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9411e4f6584cSmrg 9412e4f6584cSmrg 9413e4f6584cSmrg# _LT_CHECK_SHELL_FEATURES 9414e4f6584cSmrg# ------------------------ 9415e4f6584cSmrg# Find out whether the shell is Bourne or XSI compatible, 9416e4f6584cSmrg# or has some other useful features. 9417e4f6584cSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9418e4f6584cSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9419e4f6584cSmrg# Try some XSI features 9420e4f6584cSmrgxsi_shell=no 9421e4f6584cSmrg( _lt_dummy="a/b/c" 9422e4f6584cSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9423e4f6584cSmrg = c,a/b,, \ 9424e4f6584cSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9425e4f6584cSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9426e4f6584cSmrg && xsi_shell=yes 9427e4f6584cSmrgAC_MSG_RESULT([$xsi_shell]) 9428e4f6584cSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9429e4f6584cSmrg 9430e4f6584cSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9431e4f6584cSmrglt_shell_append=no 9432e4f6584cSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9433e4f6584cSmrg >/dev/null 2>&1 \ 9434e4f6584cSmrg && lt_shell_append=yes 9435e4f6584cSmrgAC_MSG_RESULT([$lt_shell_append]) 9436e4f6584cSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9437e4f6584cSmrg 9438e4f6584cSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9439e4f6584cSmrg lt_unset=unset 9440e4f6584cSmrgelse 9441e4f6584cSmrg lt_unset=false 9442e4f6584cSmrgfi 9443e4f6584cSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9444e4f6584cSmrg 9445e4f6584cSmrg# test EBCDIC or ASCII 9446e4f6584cSmrgcase `echo X|tr X '\101'` in 9447e4f6584cSmrg A) # ASCII based system 9448e4f6584cSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9449e4f6584cSmrg lt_SP2NL='tr \040 \012' 9450e4f6584cSmrg lt_NL2SP='tr \015\012 \040\040' 9451e4f6584cSmrg ;; 9452e4f6584cSmrg *) # EBCDIC based system 9453e4f6584cSmrg lt_SP2NL='tr \100 \n' 9454e4f6584cSmrg lt_NL2SP='tr \r\n \100\100' 9455e4f6584cSmrg ;; 9456e4f6584cSmrgesac 9457e4f6584cSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9458e4f6584cSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9459e4f6584cSmrg])# _LT_CHECK_SHELL_FEATURES 9460e4f6584cSmrg 9461e4f6584cSmrg 9462e4f6584cSmrg# _LT_PROG_XSI_SHELLFNS 9463e4f6584cSmrg# --------------------- 9464e4f6584cSmrg# Bourne and XSI compatible variants of some useful shell functions. 9465e4f6584cSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9466e4f6584cSmrg[case $xsi_shell in 9467e4f6584cSmrg yes) 9468e4f6584cSmrg cat << \_LT_EOF >> "$cfgfile" 9469e4f6584cSmrg 9470e4f6584cSmrg# func_dirname file append nondir_replacement 9471e4f6584cSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9472e4f6584cSmrg# otherwise set result to NONDIR_REPLACEMENT. 9473e4f6584cSmrgfunc_dirname () 9474e4f6584cSmrg{ 9475e4f6584cSmrg case ${1} in 9476e4f6584cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 9477e4f6584cSmrg * ) func_dirname_result="${3}" ;; 9478e4f6584cSmrg esac 9479b698ba48Smrg} 948009885543Smrg 9481e4f6584cSmrg# func_basename file 9482e4f6584cSmrgfunc_basename () 9483e4f6584cSmrg{ 9484e4f6584cSmrg func_basename_result="${1##*/}" 9485e4f6584cSmrg} 948609885543Smrg 9487e4f6584cSmrg# func_dirname_and_basename file append nondir_replacement 9488e4f6584cSmrg# perform func_basename and func_dirname in a single function 9489e4f6584cSmrg# call: 9490e4f6584cSmrg# dirname: Compute the dirname of FILE. If nonempty, 9491e4f6584cSmrg# add APPEND to the result, otherwise set result 9492e4f6584cSmrg# to NONDIR_REPLACEMENT. 9493e4f6584cSmrg# value returned in "$func_dirname_result" 9494e4f6584cSmrg# basename: Compute filename of FILE. 9495e4f6584cSmrg# value retuned in "$func_basename_result" 9496e4f6584cSmrg# Implementation must be kept synchronized with func_dirname 9497e4f6584cSmrg# and func_basename. For efficiency, we do not delegate to 9498e4f6584cSmrg# those functions but instead duplicate the functionality here. 9499e4f6584cSmrgfunc_dirname_and_basename () 9500e4f6584cSmrg{ 9501e4f6584cSmrg case ${1} in 9502e4f6584cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 9503e4f6584cSmrg * ) func_dirname_result="${3}" ;; 9504e4f6584cSmrg esac 9505e4f6584cSmrg func_basename_result="${1##*/}" 9506e4f6584cSmrg} 950709885543Smrg 9508e4f6584cSmrg# func_stripname prefix suffix name 9509e4f6584cSmrg# strip PREFIX and SUFFIX off of NAME. 9510e4f6584cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 9511e4f6584cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9512e4f6584cSmrg# dot (in which case that matches only a dot). 9513e4f6584cSmrgfunc_stripname () 9514e4f6584cSmrg{ 9515e4f6584cSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9516e4f6584cSmrg # positional parameters, so assign one to ordinary parameter first. 9517e4f6584cSmrg func_stripname_result=${3} 9518e4f6584cSmrg func_stripname_result=${func_stripname_result#"${1}"} 9519e4f6584cSmrg func_stripname_result=${func_stripname_result%"${2}"} 9520e4f6584cSmrg} 952109885543Smrg 9522e4f6584cSmrg# func_opt_split 9523e4f6584cSmrgfunc_opt_split () 9524e4f6584cSmrg{ 9525e4f6584cSmrg func_opt_split_opt=${1%%=*} 9526e4f6584cSmrg func_opt_split_arg=${1#*=} 9527e4f6584cSmrg} 952809885543Smrg 9529e4f6584cSmrg# func_lo2o object 9530e4f6584cSmrgfunc_lo2o () 9531e4f6584cSmrg{ 9532e4f6584cSmrg case ${1} in 9533e4f6584cSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9534e4f6584cSmrg *) func_lo2o_result=${1} ;; 9535e4f6584cSmrg esac 9536e4f6584cSmrg} 953709885543Smrg 9538e4f6584cSmrg# func_xform libobj-or-source 9539e4f6584cSmrgfunc_xform () 9540e4f6584cSmrg{ 9541e4f6584cSmrg func_xform_result=${1%.*}.lo 9542e4f6584cSmrg} 954309885543Smrg 9544e4f6584cSmrg# func_arith arithmetic-term... 9545e4f6584cSmrgfunc_arith () 9546e4f6584cSmrg{ 9547e4f6584cSmrg func_arith_result=$(( $[*] )) 9548e4f6584cSmrg} 954909885543Smrg 9550e4f6584cSmrg# func_len string 9551e4f6584cSmrg# STRING may not start with a hyphen. 9552e4f6584cSmrgfunc_len () 9553e4f6584cSmrg{ 9554e4f6584cSmrg func_len_result=${#1} 9555e4f6584cSmrg} 955609885543Smrg 9557e4f6584cSmrg_LT_EOF 9558e4f6584cSmrg ;; 9559e4f6584cSmrg *) # Bourne compatible functions. 9560e4f6584cSmrg cat << \_LT_EOF >> "$cfgfile" 956109885543Smrg 9562e4f6584cSmrg# func_dirname file append nondir_replacement 9563e4f6584cSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9564e4f6584cSmrg# otherwise set result to NONDIR_REPLACEMENT. 9565e4f6584cSmrgfunc_dirname () 9566e4f6584cSmrg{ 9567e4f6584cSmrg # Extract subdirectory from the argument. 9568e4f6584cSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 9569e4f6584cSmrg if test "X$func_dirname_result" = "X${1}"; then 9570e4f6584cSmrg func_dirname_result="${3}" 957109885543Smrg else 9572e4f6584cSmrg func_dirname_result="$func_dirname_result${2}" 957309885543Smrg fi 9574e4f6584cSmrg} 957509885543Smrg 9576e4f6584cSmrg# func_basename file 9577e4f6584cSmrgfunc_basename () 9578e4f6584cSmrg{ 9579e4f6584cSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 9580e4f6584cSmrg} 958109885543Smrg 9582e4f6584cSmrgdnl func_dirname_and_basename 9583e4f6584cSmrgdnl A portable version of this function is already defined in general.m4sh 9584e4f6584cSmrgdnl so there is no need for it here. 9585e4f6584cSmrg 9586e4f6584cSmrg# func_stripname prefix suffix name 9587e4f6584cSmrg# strip PREFIX and SUFFIX off of NAME. 9588e4f6584cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 9589e4f6584cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9590e4f6584cSmrg# dot (in which case that matches only a dot). 9591e4f6584cSmrg# func_strip_suffix prefix name 9592e4f6584cSmrgfunc_stripname () 9593e4f6584cSmrg{ 9594e4f6584cSmrg case ${2} in 9595e4f6584cSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 9596e4f6584cSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 9597e4f6584cSmrg *) func_stripname_result=`$ECHO "X${3}" \ 9598e4f6584cSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 9599e4f6584cSmrg esac 9600e4f6584cSmrg} 960109885543Smrg 9602e4f6584cSmrg# sed scripts: 9603e4f6584cSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9604e4f6584cSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 960509885543Smrg 9606e4f6584cSmrg# func_opt_split 9607e4f6584cSmrgfunc_opt_split () 9608e4f6584cSmrg{ 9609e4f6584cSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 9610e4f6584cSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 9611e4f6584cSmrg} 9612b698ba48Smrg 9613e4f6584cSmrg# func_lo2o object 9614e4f6584cSmrgfunc_lo2o () 9615e4f6584cSmrg{ 9616e4f6584cSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 9617e4f6584cSmrg} 961809885543Smrg 9619e4f6584cSmrg# func_xform libobj-or-source 9620e4f6584cSmrgfunc_xform () 9621e4f6584cSmrg{ 9622e4f6584cSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 9623e4f6584cSmrg} 962409885543Smrg 9625e4f6584cSmrg# func_arith arithmetic-term... 9626e4f6584cSmrgfunc_arith () 9627e4f6584cSmrg{ 9628e4f6584cSmrg func_arith_result=`expr "$[@]"` 9629e4f6584cSmrg} 963009885543Smrg 9631e4f6584cSmrg# func_len string 9632e4f6584cSmrg# STRING may not start with a hyphen. 9633e4f6584cSmrgfunc_len () 9634e4f6584cSmrg{ 9635e4f6584cSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9636e4f6584cSmrg} 963709885543Smrg 9638e4f6584cSmrg_LT_EOF 9639e4f6584cSmrgesac 9640e4f6584cSmrg 9641e4f6584cSmrgcase $lt_shell_append in 9642e4f6584cSmrg yes) 9643e4f6584cSmrg cat << \_LT_EOF >> "$cfgfile" 9644e4f6584cSmrg 9645e4f6584cSmrg# func_append var value 9646e4f6584cSmrg# Append VALUE to the end of shell variable VAR. 9647e4f6584cSmrgfunc_append () 9648e4f6584cSmrg{ 9649e4f6584cSmrg eval "$[1]+=\$[2]" 9650e4f6584cSmrg} 9651e4f6584cSmrg_LT_EOF 9652e4f6584cSmrg ;; 9653b698ba48Smrg *) 9654e4f6584cSmrg cat << \_LT_EOF >> "$cfgfile" 9655e4f6584cSmrg 9656e4f6584cSmrg# func_append var value 9657e4f6584cSmrg# Append VALUE to the end of shell variable VAR. 9658e4f6584cSmrgfunc_append () 9659e4f6584cSmrg{ 9660e4f6584cSmrg eval "$[1]=\$$[1]\$[2]" 9661e4f6584cSmrg} 9662e4f6584cSmrg 9663e4f6584cSmrg_LT_EOF 9664e4f6584cSmrg ;; 9665b698ba48Smrg esac 9666e4f6584cSmrg]) 966709885543Smrg 9668e4f6584cSmrg# Helper functions for option handling. -*- Autoconf -*- 966909885543Smrg# 9670e4f6584cSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9671e4f6584cSmrg# Written by Gary V. Vaughan, 2004 9672e4f6584cSmrg# 9673e4f6584cSmrg# This file is free software; the Free Software Foundation gives 9674e4f6584cSmrg# unlimited permission to copy and/or distribute it, with or without 9675e4f6584cSmrg# modifications, as long as this notice is preserved. 967609885543Smrg 9677e4f6584cSmrg# serial 6 ltoptions.m4 967809885543Smrg 9679e4f6584cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9680e4f6584cSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9681e4f6584cSmrg 9682e4f6584cSmrg 9683e4f6584cSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9684e4f6584cSmrg# ------------------------------------------ 9685e4f6584cSmrgm4_define([_LT_MANGLE_OPTION], 9686e4f6584cSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9687e4f6584cSmrg 9688e4f6584cSmrg 9689e4f6584cSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9690e4f6584cSmrg# --------------------------------------- 9691e4f6584cSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9692e4f6584cSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9693e4f6584cSmrg# saved as a flag. 9694e4f6584cSmrgm4_define([_LT_SET_OPTION], 9695e4f6584cSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9696e4f6584cSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9697e4f6584cSmrg _LT_MANGLE_DEFUN([$1], [$2]), 9698e4f6584cSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9699e4f6584cSmrg]) 9700e4f6584cSmrg 9701e4f6584cSmrg 9702e4f6584cSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9703e4f6584cSmrg# ------------------------------------------------------------ 9704e4f6584cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9705e4f6584cSmrgm4_define([_LT_IF_OPTION], 9706e4f6584cSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9707e4f6584cSmrg 9708e4f6584cSmrg 9709e4f6584cSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9710e4f6584cSmrg# ------------------------------------------------------- 9711e4f6584cSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9712e4f6584cSmrg# are set. 9713e4f6584cSmrgm4_define([_LT_UNLESS_OPTIONS], 9714e4f6584cSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9715e4f6584cSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9716e4f6584cSmrg [m4_define([$0_found])])])[]dnl 9717e4f6584cSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9718e4f6584cSmrg])[]dnl 9719e4f6584cSmrg]) 9720e4f6584cSmrg 9721e4f6584cSmrg 9722e4f6584cSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9723e4f6584cSmrg# ---------------------------------------- 9724e4f6584cSmrg# OPTION-LIST is a space-separated list of Libtool options associated 9725e4f6584cSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9726e4f6584cSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9727e4f6584cSmrg# the unknown option and exit. 9728e4f6584cSmrgm4_defun([_LT_SET_OPTIONS], 9729e4f6584cSmrg[# Set options 9730e4f6584cSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9731e4f6584cSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 9732e4f6584cSmrg 9733e4f6584cSmrgm4_if([$1],[LT_INIT],[ 9734e4f6584cSmrg dnl 9735e4f6584cSmrg dnl Simply set some default values (i.e off) if boolean options were not 9736e4f6584cSmrg dnl specified: 9737e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9738e4f6584cSmrg ]) 9739e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9740e4f6584cSmrg ]) 9741e4f6584cSmrg dnl 9742e4f6584cSmrg dnl If no reference was made to various pairs of opposing options, then 9743e4f6584cSmrg dnl we run the default mode handler for the pair. For example, if neither 9744e4f6584cSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9745e4f6584cSmrg dnl archives by default: 9746e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9747e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9748e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9749e4f6584cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9750e4f6584cSmrg [_LT_ENABLE_FAST_INSTALL]) 9751e4f6584cSmrg ]) 9752e4f6584cSmrg])# _LT_SET_OPTIONS 9753e4f6584cSmrg 9754e4f6584cSmrg 9755e4f6584cSmrg 9756e4f6584cSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9757e4f6584cSmrg# ----------------------------------------- 9758e4f6584cSmrgm4_define([_LT_MANGLE_DEFUN], 9759e4f6584cSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 976009885543Smrg 976109885543Smrg 9762e4f6584cSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9763e4f6584cSmrg# ----------------------------------------------- 9764e4f6584cSmrgm4_define([LT_OPTION_DEFINE], 9765e4f6584cSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9766e4f6584cSmrg])# LT_OPTION_DEFINE 976709885543Smrg 976809885543Smrg 9769e4f6584cSmrg# dlopen 9770e4f6584cSmrg# ------ 9771e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9772e4f6584cSmrg]) 977309885543Smrg 9774e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9775e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9776e4f6584cSmrgAC_DIAGNOSE([obsolete], 9777e4f6584cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9778e4f6584cSmrgput the `dlopen' option into LT_INIT's first parameter.]) 9779e4f6584cSmrg]) 978009885543Smrg 9781e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9782e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 978309885543Smrg 978409885543Smrg 9785e4f6584cSmrg# win32-dll 9786e4f6584cSmrg# --------- 9787e4f6584cSmrg# Declare package support for building win32 dll's. 9788e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9789e4f6584cSmrg[enable_win32_dll=yes 979009885543Smrg 9791e4f6584cSmrgcase $host in 9792e4f6584cSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 9793e4f6584cSmrg AC_CHECK_TOOL(AS, as, false) 9794e4f6584cSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9795e4f6584cSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9796b698ba48Smrg ;; 9797b698ba48Smrgesac 9798e4f6584cSmrg 9799e4f6584cSmrgtest -z "$AS" && AS=as 9800e4f6584cSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 9801e4f6584cSmrg 9802e4f6584cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9803e4f6584cSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 9804e4f6584cSmrg 9805e4f6584cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9806e4f6584cSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 9807e4f6584cSmrg])# win32-dll 9808e4f6584cSmrg 9809e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9810e4f6584cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9811e4f6584cSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9812e4f6584cSmrgAC_DIAGNOSE([obsolete], 9813e4f6584cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9814e4f6584cSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 981509885543Smrg]) 981609885543Smrg 9817e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9818e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 981909885543Smrg 982009885543Smrg 9821e4f6584cSmrg# _LT_ENABLE_SHARED([DEFAULT]) 9822e4f6584cSmrg# ---------------------------- 9823e4f6584cSmrg# implement the --enable-shared flag, and supports the `shared' and 9824e4f6584cSmrg# `disable-shared' LT_INIT options. 9825e4f6584cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9826e4f6584cSmrgm4_define([_LT_ENABLE_SHARED], 9827e4f6584cSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9828e4f6584cSmrgAC_ARG_ENABLE([shared], 9829e4f6584cSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9830e4f6584cSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9831e4f6584cSmrg [p=${PACKAGE-default} 9832e4f6584cSmrg case $enableval in 9833e4f6584cSmrg yes) enable_shared=yes ;; 9834e4f6584cSmrg no) enable_shared=no ;; 9835e4f6584cSmrg *) 9836e4f6584cSmrg enable_shared=no 9837e4f6584cSmrg # Look at the argument we got. We use all the common list separators. 9838e4f6584cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9839e4f6584cSmrg for pkg in $enableval; do 9840e4f6584cSmrg IFS="$lt_save_ifs" 9841e4f6584cSmrg if test "X$pkg" = "X$p"; then 9842e4f6584cSmrg enable_shared=yes 9843e4f6584cSmrg fi 9844e4f6584cSmrg done 9845e4f6584cSmrg IFS="$lt_save_ifs" 9846e4f6584cSmrg ;; 9847e4f6584cSmrg esac], 9848e4f6584cSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 984909885543Smrg 9850e4f6584cSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9851e4f6584cSmrg [Whether or not to build shared libraries]) 9852e4f6584cSmrg])# _LT_ENABLE_SHARED 985309885543Smrg 9854e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9855e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 985609885543Smrg 9857e4f6584cSmrg# Old names: 9858e4f6584cSmrgAC_DEFUN([AC_ENABLE_SHARED], 9859e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 986009885543Smrg]) 986109885543Smrg 9862e4f6584cSmrgAC_DEFUN([AC_DISABLE_SHARED], 9863e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9864e4f6584cSmrg]) 986509885543Smrg 9866e4f6584cSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9867e4f6584cSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9868e4f6584cSmrg 9869e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9870e4f6584cSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9871e4f6584cSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9872e4f6584cSmrg 9873e4f6584cSmrg 9874e4f6584cSmrg 9875e4f6584cSmrg# _LT_ENABLE_STATIC([DEFAULT]) 9876e4f6584cSmrg# ---------------------------- 9877e4f6584cSmrg# implement the --enable-static flag, and support the `static' and 9878e4f6584cSmrg# `disable-static' LT_INIT options. 9879e4f6584cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9880e4f6584cSmrgm4_define([_LT_ENABLE_STATIC], 9881e4f6584cSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9882e4f6584cSmrgAC_ARG_ENABLE([static], 9883e4f6584cSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9884e4f6584cSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9885e4f6584cSmrg [p=${PACKAGE-default} 9886e4f6584cSmrg case $enableval in 9887e4f6584cSmrg yes) enable_static=yes ;; 9888e4f6584cSmrg no) enable_static=no ;; 9889e4f6584cSmrg *) 9890e4f6584cSmrg enable_static=no 9891e4f6584cSmrg # Look at the argument we got. We use all the common list separators. 9892e4f6584cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9893e4f6584cSmrg for pkg in $enableval; do 9894e4f6584cSmrg IFS="$lt_save_ifs" 9895e4f6584cSmrg if test "X$pkg" = "X$p"; then 9896e4f6584cSmrg enable_static=yes 9897e4f6584cSmrg fi 9898e4f6584cSmrg done 9899e4f6584cSmrg IFS="$lt_save_ifs" 9900e4f6584cSmrg ;; 9901e4f6584cSmrg esac], 9902e4f6584cSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9903e4f6584cSmrg 9904e4f6584cSmrg _LT_DECL([build_old_libs], [enable_static], [0], 9905e4f6584cSmrg [Whether or not to build static libraries]) 9906e4f6584cSmrg])# _LT_ENABLE_STATIC 9907e4f6584cSmrg 9908e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9909e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9910e4f6584cSmrg 9911e4f6584cSmrg# Old names: 9912e4f6584cSmrgAC_DEFUN([AC_ENABLE_STATIC], 9913e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 99147104f784Smrg]) 991509885543Smrg 9916e4f6584cSmrgAC_DEFUN([AC_DISABLE_STATIC], 9917e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9918e4f6584cSmrg]) 991909885543Smrg 9920e4f6584cSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9921e4f6584cSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 992209885543Smrg 9923e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9924e4f6584cSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9925e4f6584cSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 992609885543Smrg 992709885543Smrg 992809885543Smrg 9929e4f6584cSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 993009885543Smrg# ---------------------------------- 9931e4f6584cSmrg# implement the --enable-fast-install flag, and support the `fast-install' 9932e4f6584cSmrg# and `disable-fast-install' LT_INIT options. 9933e4f6584cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9934e4f6584cSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 9935e4f6584cSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9936e4f6584cSmrgAC_ARG_ENABLE([fast-install], 9937e4f6584cSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9938e4f6584cSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9939e4f6584cSmrg [p=${PACKAGE-default} 9940e4f6584cSmrg case $enableval in 9941e4f6584cSmrg yes) enable_fast_install=yes ;; 9942e4f6584cSmrg no) enable_fast_install=no ;; 9943e4f6584cSmrg *) 9944e4f6584cSmrg enable_fast_install=no 9945e4f6584cSmrg # Look at the argument we got. We use all the common list separators. 9946e4f6584cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9947e4f6584cSmrg for pkg in $enableval; do 9948e4f6584cSmrg IFS="$lt_save_ifs" 9949e4f6584cSmrg if test "X$pkg" = "X$p"; then 9950e4f6584cSmrg enable_fast_install=yes 9951e4f6584cSmrg fi 9952e4f6584cSmrg done 9953e4f6584cSmrg IFS="$lt_save_ifs" 9954e4f6584cSmrg ;; 9955e4f6584cSmrg esac], 9956e4f6584cSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9957e4f6584cSmrg 9958e4f6584cSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 9959e4f6584cSmrg [Whether or not to optimize for fast installation])dnl 9960e4f6584cSmrg])# _LT_ENABLE_FAST_INSTALL 9961e4f6584cSmrg 9962e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9963e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9964e4f6584cSmrg 9965e4f6584cSmrg# Old names: 9966e4f6584cSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9967e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9968e4f6584cSmrgAC_DIAGNOSE([obsolete], 9969e4f6584cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9970e4f6584cSmrgthe `fast-install' option into LT_INIT's first parameter.]) 9971e4f6584cSmrg]) 9972e4f6584cSmrg 9973e4f6584cSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9974e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9975e4f6584cSmrgAC_DIAGNOSE([obsolete], 9976e4f6584cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9977e4f6584cSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 9978e4f6584cSmrg]) 9979e4f6584cSmrg 9980e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 9981e4f6584cSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9982e4f6584cSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9983e4f6584cSmrg 9984e4f6584cSmrg 9985e4f6584cSmrg# _LT_WITH_PIC([MODE]) 9986e4f6584cSmrg# -------------------- 9987e4f6584cSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9988e4f6584cSmrg# LT_INIT options. 9989e4f6584cSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9990e4f6584cSmrgm4_define([_LT_WITH_PIC], 9991e4f6584cSmrg[AC_ARG_WITH([pic], 9992e4f6584cSmrg [AS_HELP_STRING([--with-pic], 9993e4f6584cSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9994e4f6584cSmrg [pic_mode="$withval"], 9995e4f6584cSmrg [pic_mode=default]) 999609885543Smrg 9997e4f6584cSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 999809885543Smrg 9999e4f6584cSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10000e4f6584cSmrg])# _LT_WITH_PIC 1000109885543Smrg 10002e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10003e4f6584cSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 1000409885543Smrg 10005e4f6584cSmrg# Old name: 10006e4f6584cSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 10007e4f6584cSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10008e4f6584cSmrgAC_DIAGNOSE([obsolete], 10009e4f6584cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10010e4f6584cSmrgput the `pic-only' option into LT_INIT's first parameter.]) 10011e4f6584cSmrg]) 1001209885543Smrg 10013e4f6584cSmrgdnl aclocal-1.4 backwards compatibility: 10014e4f6584cSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10015b698ba48Smrg 1001609885543Smrg 10017e4f6584cSmrgm4_define([_LTDL_MODE], []) 10018e4f6584cSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10019e4f6584cSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10020e4f6584cSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10021e4f6584cSmrg [m4_define([_LTDL_MODE], [recursive])]) 10022e4f6584cSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10023e4f6584cSmrg [m4_define([_LTDL_MODE], [subproject])]) 1002409885543Smrg 10025e4f6584cSmrgm4_define([_LTDL_TYPE], []) 10026e4f6584cSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10027e4f6584cSmrg [m4_define([_LTDL_TYPE], [installable])]) 10028e4f6584cSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10029e4f6584cSmrg [m4_define([_LTDL_TYPE], [convenience])]) 1003009885543Smrg 10031e4f6584cSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1003209885543Smrg# 10033e4f6584cSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10034e4f6584cSmrg# Written by Gary V. Vaughan, 2004 10035e4f6584cSmrg# 10036e4f6584cSmrg# This file is free software; the Free Software Foundation gives 10037e4f6584cSmrg# unlimited permission to copy and/or distribute it, with or without 10038e4f6584cSmrg# modifications, as long as this notice is preserved. 1003909885543Smrg 10040e4f6584cSmrg# serial 6 ltsugar.m4 1004109885543Smrg 10042e4f6584cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 10043e4f6584cSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10044e4f6584cSmrg 10045e4f6584cSmrg 10046e4f6584cSmrg# lt_join(SEP, ARG1, [ARG2...]) 10047e4f6584cSmrg# ----------------------------- 10048e4f6584cSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10049e4f6584cSmrg# associated separator. 10050e4f6584cSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10051e4f6584cSmrg# versions in m4sugar had bugs. 10052e4f6584cSmrgm4_define([lt_join], 10053e4f6584cSmrg[m4_if([$#], [1], [], 10054e4f6584cSmrg [$#], [2], [[$2]], 10055e4f6584cSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10056e4f6584cSmrgm4_define([_lt_join], 10057e4f6584cSmrg[m4_if([$#$2], [2], [], 10058e4f6584cSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10059e4f6584cSmrg 10060e4f6584cSmrg 10061e4f6584cSmrg# lt_car(LIST) 10062e4f6584cSmrg# lt_cdr(LIST) 10063e4f6584cSmrg# ------------ 10064e4f6584cSmrg# Manipulate m4 lists. 10065e4f6584cSmrg# These macros are necessary as long as will still need to support 10066e4f6584cSmrg# Autoconf-2.59 which quotes differently. 10067e4f6584cSmrgm4_define([lt_car], [[$1]]) 10068e4f6584cSmrgm4_define([lt_cdr], 10069e4f6584cSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10070e4f6584cSmrg [$#], 1, [], 10071e4f6584cSmrg [m4_dquote(m4_shift($@))])]) 10072e4f6584cSmrgm4_define([lt_unquote], $1) 10073e4f6584cSmrg 10074e4f6584cSmrg 10075e4f6584cSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10076e4f6584cSmrg# ------------------------------------------ 10077e4f6584cSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10078e4f6584cSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10079e4f6584cSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10080e4f6584cSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10081e4f6584cSmrg# than defined and empty). 100827104f784Smrg# 10083e4f6584cSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10084e4f6584cSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10085e4f6584cSmrgm4_define([lt_append], 10086e4f6584cSmrg[m4_define([$1], 10087e4f6584cSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10088e4f6584cSmrg 10089e4f6584cSmrg 10090e4f6584cSmrg 10091e4f6584cSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10092e4f6584cSmrg# ---------------------------------------------------------- 10093e4f6584cSmrg# Produce a SEP delimited list of all paired combinations of elements of 10094e4f6584cSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10095e4f6584cSmrg# has the form PREFIXmINFIXSUFFIXn. 10096e4f6584cSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10097e4f6584cSmrgm4_define([lt_combine], 10098e4f6584cSmrg[m4_if(m4_eval([$# > 3]), [1], 10099e4f6584cSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10100e4f6584cSmrg[[m4_foreach([_Lt_prefix], [$2], 10101e4f6584cSmrg [m4_foreach([_Lt_suffix], 10102e4f6584cSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10103e4f6584cSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10104e4f6584cSmrg 10105e4f6584cSmrg 10106e4f6584cSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10107e4f6584cSmrg# ----------------------------------------------------------------------- 10108e4f6584cSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10109e4f6584cSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10110e4f6584cSmrgm4_define([lt_if_append_uniq], 10111e4f6584cSmrg[m4_ifdef([$1], 10112e4f6584cSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10113e4f6584cSmrg [lt_append([$1], [$2], [$3])$4], 10114e4f6584cSmrg [$5])], 10115e4f6584cSmrg [lt_append([$1], [$2], [$3])$4])]) 10116e4f6584cSmrg 10117e4f6584cSmrg 10118e4f6584cSmrg# lt_dict_add(DICT, KEY, VALUE) 10119e4f6584cSmrg# ----------------------------- 10120e4f6584cSmrgm4_define([lt_dict_add], 10121e4f6584cSmrg[m4_define([$1($2)], [$3])]) 101227104f784Smrg 10123b698ba48Smrg 10124e4f6584cSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10125e4f6584cSmrg# -------------------------------------------- 10126e4f6584cSmrgm4_define([lt_dict_add_subkey], 10127e4f6584cSmrg[m4_define([$1($2:$3)], [$4])]) 101287104f784Smrg 10129b698ba48Smrg 10130e4f6584cSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10131e4f6584cSmrg# ---------------------------------- 10132e4f6584cSmrgm4_define([lt_dict_fetch], 10133e4f6584cSmrg[m4_ifval([$3], 10134e4f6584cSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10135e4f6584cSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 1013609885543Smrg 1013709885543Smrg 10138e4f6584cSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10139e4f6584cSmrg# ----------------------------------------------------------------- 10140e4f6584cSmrgm4_define([lt_if_dict_fetch], 10141e4f6584cSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10142e4f6584cSmrg [$5], 10143e4f6584cSmrg [$6])]) 1014409885543Smrg 10145e4f6584cSmrg 10146e4f6584cSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10147e4f6584cSmrg# -------------------------------------------------------------- 10148e4f6584cSmrgm4_define([lt_dict_filter], 10149e4f6584cSmrg[m4_if([$5], [], [], 10150e4f6584cSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10151e4f6584cSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10152e4f6584cSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10153e4f6584cSmrg]) 10154e4f6584cSmrg 10155e4f6584cSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 1015609885543Smrg# 10157e4f6584cSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 10158e4f6584cSmrg# Written by Scott James Remnant, 2004 1015909885543Smrg# 10160e4f6584cSmrg# This file is free software; the Free Software Foundation gives 10161e4f6584cSmrg# unlimited permission to copy and/or distribute it, with or without 10162e4f6584cSmrg# modifications, as long as this notice is preserved. 1016309885543Smrg 10164e4f6584cSmrg# Generated from ltversion.in. 1016509885543Smrg 10166e4f6584cSmrg# serial 3012 ltversion.m4 10167e4f6584cSmrg# This file is part of GNU Libtool 1016809885543Smrg 10169e4f6584cSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 10170e4f6584cSmrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 1017109885543Smrg 10172e4f6584cSmrgAC_DEFUN([LTVERSION_VERSION], 10173e4f6584cSmrg[macro_version='2.2.6' 10174e4f6584cSmrgmacro_revision='1.3012' 10175e4f6584cSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10176e4f6584cSmrg_LT_DECL(, macro_revision, 0) 10177e4f6584cSmrg]) 10178b698ba48Smrg 10179e4f6584cSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10180e4f6584cSmrg# 10181e4f6584cSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 10182e4f6584cSmrg# Written by Scott James Remnant, 2004. 10183e4f6584cSmrg# 10184e4f6584cSmrg# This file is free software; the Free Software Foundation gives 10185e4f6584cSmrg# unlimited permission to copy and/or distribute it, with or without 10186e4f6584cSmrg# modifications, as long as this notice is preserved. 10187b698ba48Smrg 10188e4f6584cSmrg# serial 4 lt~obsolete.m4 10189e4f6584cSmrg 10190e4f6584cSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 10191e4f6584cSmrg# 10192e4f6584cSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10193e4f6584cSmrg# which have later been changed to m4_define as they aren't part of the 10194e4f6584cSmrg# exported API, or moved to Autoconf or Automake where they belong. 10195e4f6584cSmrg# 10196e4f6584cSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10197e4f6584cSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10198e4f6584cSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 10199e4f6584cSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10200e4f6584cSmrg# and doesn't know about Autoconf macros at all.) 10201e4f6584cSmrg# 10202e4f6584cSmrg# So we provide this file, which has a silly filename so it's always 10203e4f6584cSmrg# included after everything else. This provides aclocal with the 10204e4f6584cSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10205e4f6584cSmrg# because those macros already exist, or will be overwritten later. 10206e4f6584cSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10207e4f6584cSmrg# 10208e4f6584cSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10209e4f6584cSmrg# Yes, that means every name once taken will need to remain here until 10210e4f6584cSmrg# we give up compatibility with versions before 1.7, at which point 10211e4f6584cSmrg# we need to keep only those names which we still refer to. 10212e4f6584cSmrg 10213e4f6584cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 10214e4f6584cSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10215e4f6584cSmrg 10216e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10217e4f6584cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10218e4f6584cSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10219e4f6584cSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10220e4f6584cSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10221e4f6584cSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10222e4f6584cSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10223e4f6584cSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10224e4f6584cSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10225e4f6584cSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10226e4f6584cSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10227e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10228e4f6584cSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10229e4f6584cSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10230e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10231e4f6584cSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10232e4f6584cSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10233e4f6584cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10234e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10235e4f6584cSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10236e4f6584cSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10237e4f6584cSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10238e4f6584cSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10239e4f6584cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10240e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10241e4f6584cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10242e4f6584cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10243e4f6584cSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10244e4f6584cSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10245e4f6584cSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10246e4f6584cSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10247e4f6584cSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10248e4f6584cSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10249e4f6584cSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10250e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10251e4f6584cSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10252e4f6584cSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10253e4f6584cSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10254e4f6584cSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10255e4f6584cSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10256e4f6584cSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10257e4f6584cSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10258e4f6584cSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 10259e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10260e4f6584cSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10261e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10262e4f6584cSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10263e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10264e4f6584cSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10265e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10266e4f6584cSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10267e4f6584cSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10268e4f6584cSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10269e4f6584cSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10270e4f6584cSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10271b698ba48Smrg 10272