aclocal.m4 revision caade7cc
1caade7ccSmrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2caade7ccSmrg 3caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4caade7ccSmrg# 2005, 2006 Free Software Foundation, Inc. 5caade7ccSmrg# This file is free software; the Free Software Foundation 6caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 7caade7ccSmrg# with or without modifications, as long as this notice is preserved. 8caade7ccSmrg 9caade7ccSmrg# This program is distributed in the hope that it will be useful, 10caade7ccSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11caade7ccSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12caade7ccSmrg# PARTICULAR PURPOSE. 13caade7ccSmrg 14caade7ccSmrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15caade7ccSmrg[m4_fatal([this file was generated for autoconf 2.61. 16caade7ccSmrgYou have another version of autoconf. If you want to use that, 17caade7ccSmrgyou should regenerate the build system entirely.], [63])]) 18caade7ccSmrg 19caade7ccSmrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 20caade7ccSmrg# 21caade7ccSmrg# This file is free software; the Free Software Foundation 22caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 23caade7ccSmrg# with or without modifications, as long as this notice is preserved. 24caade7ccSmrg 25caade7ccSmrg# AM_AUTOMAKE_VERSION(VERSION) 26caade7ccSmrg# ---------------------------- 27caade7ccSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 28caade7ccSmrg# generated from the m4 files accompanying Automake X.Y. 29caade7ccSmrg# (This private macro should not be called outside this file.) 30caade7ccSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 31caade7ccSmrg[am__api_version='1.10' 32caade7ccSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 33caade7ccSmrgdnl require some minimum version. Point them to the right macro. 34caade7ccSmrgm4_if([$1], [1.10], [], 35caade7ccSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 36caade7ccSmrg]) 37caade7ccSmrg 38caade7ccSmrg# _AM_AUTOCONF_VERSION(VERSION) 39caade7ccSmrg# ----------------------------- 40caade7ccSmrg# aclocal traces this macro to find the Autoconf version. 41caade7ccSmrg# This is a private macro too. Using m4_define simplifies 42caade7ccSmrg# the logic in aclocal, which can simply ignore this definition. 43caade7ccSmrgm4_define([_AM_AUTOCONF_VERSION], []) 44caade7ccSmrg 45caade7ccSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 46caade7ccSmrg# ------------------------------- 47caade7ccSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 48caade7ccSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 49caade7ccSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 50caade7ccSmrg[AM_AUTOMAKE_VERSION([1.10])dnl 51caade7ccSmrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 52caade7ccSmrg 53caade7ccSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 54caade7ccSmrg 55caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 56caade7ccSmrg# 57caade7ccSmrg# This file is free software; the Free Software Foundation 58caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 59caade7ccSmrg# with or without modifications, as long as this notice is preserved. 60caade7ccSmrg 61caade7ccSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 62caade7ccSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 63caade7ccSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 64caade7ccSmrg# 65caade7ccSmrg# Of course, Automake must honor this variable whenever it calls a 66caade7ccSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 67caade7ccSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 68caade7ccSmrg# depending on how configure is run. This is pretty annoying, since 69caade7ccSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 70caade7ccSmrg# source directory, any form will work fine, but in subdirectories a 71caade7ccSmrg# relative path needs to be adjusted first. 72caade7ccSmrg# 73caade7ccSmrg# $ac_aux_dir/missing 74caade7ccSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 75caade7ccSmrg# $top_srcdir/$ac_aux_dir/missing 76caade7ccSmrg# fails if $ac_aux_dir is absolute, 77caade7ccSmrg# fails when called from a subdirectory in a VPATH build with 78caade7ccSmrg# a relative $ac_aux_dir 79caade7ccSmrg# 80caade7ccSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 81caade7ccSmrg# are both prefixed by $srcdir. In an in-source build this is usually 82caade7ccSmrg# harmless because $srcdir is `.', but things will broke when you 83caade7ccSmrg# start a VPATH build or use an absolute $srcdir. 84caade7ccSmrg# 85caade7ccSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 86caade7ccSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 87caade7ccSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 88caade7ccSmrg# and then we would define $MISSING as 89caade7ccSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 90caade7ccSmrg# This will work as long as MISSING is not called from configure, because 91caade7ccSmrg# unfortunately $(top_srcdir) has no meaning in configure. 92caade7ccSmrg# However there are other variables, like CC, which are often used in 93caade7ccSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 94caade7ccSmrg# 95caade7ccSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 96caade7ccSmrg# absolute PATH. The drawback is that using absolute paths prevent a 97caade7ccSmrg# configured tree to be moved without reconfiguration. 98caade7ccSmrg 99caade7ccSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 100caade7ccSmrg[dnl Rely on autoconf to set up CDPATH properly. 101caade7ccSmrgAC_PREREQ([2.50])dnl 102caade7ccSmrg# expand $ac_aux_dir to an absolute path 103caade7ccSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 104caade7ccSmrg]) 105caade7ccSmrg 106caade7ccSmrg# AM_CONDITIONAL -*- Autoconf -*- 107caade7ccSmrg 108caade7ccSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 109caade7ccSmrg# Free Software Foundation, Inc. 110caade7ccSmrg# 111caade7ccSmrg# This file is free software; the Free Software Foundation 112caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 113caade7ccSmrg# with or without modifications, as long as this notice is preserved. 114caade7ccSmrg 115caade7ccSmrg# serial 8 116caade7ccSmrg 117caade7ccSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 118caade7ccSmrg# ------------------------------------- 119caade7ccSmrg# Define a conditional. 120caade7ccSmrgAC_DEFUN([AM_CONDITIONAL], 121caade7ccSmrg[AC_PREREQ(2.52)dnl 122caade7ccSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 123caade7ccSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 124caade7ccSmrgAC_SUBST([$1_TRUE])dnl 125caade7ccSmrgAC_SUBST([$1_FALSE])dnl 126caade7ccSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 127caade7ccSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 128caade7ccSmrgif $2; then 129caade7ccSmrg $1_TRUE= 130caade7ccSmrg $1_FALSE='#' 131caade7ccSmrgelse 132caade7ccSmrg $1_TRUE='#' 133caade7ccSmrg $1_FALSE= 134caade7ccSmrgfi 135caade7ccSmrgAC_CONFIG_COMMANDS_PRE( 136caade7ccSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 137caade7ccSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 138caade7ccSmrgUsually this means the macro was only invoked conditionally.]]) 139caade7ccSmrgfi])]) 140caade7ccSmrg 141caade7ccSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 142caade7ccSmrg# Free Software Foundation, Inc. 143caade7ccSmrg# 144caade7ccSmrg# This file is free software; the Free Software Foundation 145caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 146caade7ccSmrg# with or without modifications, as long as this notice is preserved. 147caade7ccSmrg 148caade7ccSmrg# serial 9 149caade7ccSmrg 150caade7ccSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 151caade7ccSmrg# written in clear, in which case automake, when reading aclocal.m4, 152caade7ccSmrg# will think it sees a *use*, and therefore will trigger all it's 153caade7ccSmrg# C support machinery. Also note that it means that autoscan, seeing 154caade7ccSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 155caade7ccSmrg 156caade7ccSmrg 157caade7ccSmrg# _AM_DEPENDENCIES(NAME) 158caade7ccSmrg# ---------------------- 159caade7ccSmrg# See how the compiler implements dependency checking. 160caade7ccSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 161caade7ccSmrg# We try a few techniques and use that to set a single cache variable. 162caade7ccSmrg# 163caade7ccSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 164caade7ccSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 165caade7ccSmrg# dependency, and given that the user is not expected to run this macro, 166caade7ccSmrg# just rely on AC_PROG_CC. 167caade7ccSmrgAC_DEFUN([_AM_DEPENDENCIES], 168caade7ccSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 169caade7ccSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 170caade7ccSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 171caade7ccSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 172caade7ccSmrg 173caade7ccSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 174caade7ccSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 175caade7ccSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 176caade7ccSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 177caade7ccSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 178caade7ccSmrg [depcc="$$1" am_compiler_list=]) 179caade7ccSmrg 180caade7ccSmrgAC_CACHE_CHECK([dependency style of $depcc], 181caade7ccSmrg [am_cv_$1_dependencies_compiler_type], 182caade7ccSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 183caade7ccSmrg # We make a subdir and do the tests there. Otherwise we can end up 184caade7ccSmrg # making bogus files that we don't know about and never remove. For 185caade7ccSmrg # instance it was reported that on HP-UX the gcc test will end up 186caade7ccSmrg # making a dummy file named `D' -- because `-MD' means `put the output 187caade7ccSmrg # in D'. 188caade7ccSmrg mkdir conftest.dir 189caade7ccSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 190caade7ccSmrg # using a relative directory. 191caade7ccSmrg cp "$am_depcomp" conftest.dir 192caade7ccSmrg cd conftest.dir 193caade7ccSmrg # We will build objects and dependencies in a subdirectory because 194caade7ccSmrg # it helps to detect inapplicable dependency modes. For instance 195caade7ccSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 196caade7ccSmrg # side effect of compilation, but ICC will put the dependencies in 197caade7ccSmrg # the current directory while Tru64 will put them in the object 198caade7ccSmrg # directory. 199caade7ccSmrg mkdir sub 200caade7ccSmrg 201caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 202caade7ccSmrg if test "$am_compiler_list" = ""; then 203caade7ccSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 204caade7ccSmrg fi 205caade7ccSmrg for depmode in $am_compiler_list; do 206caade7ccSmrg # Setup a source with many dependencies, because some compilers 207caade7ccSmrg # like to wrap large dependency lists on column 80 (with \), and 208caade7ccSmrg # we should not choose a depcomp mode which is confused by this. 209caade7ccSmrg # 210caade7ccSmrg # We need to recreate these files for each test, as the compiler may 211caade7ccSmrg # overwrite some of them when testing with obscure command lines. 212caade7ccSmrg # This happens at least with the AIX C compiler. 213caade7ccSmrg : > sub/conftest.c 214caade7ccSmrg for i in 1 2 3 4 5 6; do 215caade7ccSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 216caade7ccSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 217caade7ccSmrg # Solaris 8's {/usr,}/bin/sh. 218caade7ccSmrg touch sub/conftst$i.h 219caade7ccSmrg done 220caade7ccSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 221caade7ccSmrg 222caade7ccSmrg case $depmode in 223caade7ccSmrg nosideeffect) 224caade7ccSmrg # after this tag, mechanisms are not by side-effect, so they'll 225caade7ccSmrg # only be used when explicitly requested 226caade7ccSmrg if test "x$enable_dependency_tracking" = xyes; then 227caade7ccSmrg continue 228caade7ccSmrg else 229caade7ccSmrg break 230caade7ccSmrg fi 231caade7ccSmrg ;; 232caade7ccSmrg none) break ;; 233caade7ccSmrg esac 234caade7ccSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 235caade7ccSmrg # mode. It turns out that the SunPro C++ compiler does not properly 236caade7ccSmrg # handle `-M -o', and we need to detect this. 237caade7ccSmrg if depmode=$depmode \ 238caade7ccSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 239caade7ccSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 240caade7ccSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 241caade7ccSmrg >/dev/null 2>conftest.err && 242caade7ccSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 243caade7ccSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 244caade7ccSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 245caade7ccSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 246caade7ccSmrg # icc doesn't choke on unknown options, it will just issue warnings 247caade7ccSmrg # or remarks (even with -Werror). So we grep stderr for any message 248caade7ccSmrg # that says an option was ignored or not supported. 249caade7ccSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 250caade7ccSmrg # icc: Command line warning: ignoring option '-M'; no argument required 251caade7ccSmrg # The diagnosis changed in icc 8.0: 252caade7ccSmrg # icc: Command line remark: option '-MP' not supported 253caade7ccSmrg if (grep 'ignoring option' conftest.err || 254caade7ccSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 255caade7ccSmrg am_cv_$1_dependencies_compiler_type=$depmode 256caade7ccSmrg break 257caade7ccSmrg fi 258caade7ccSmrg fi 259caade7ccSmrg done 260caade7ccSmrg 261caade7ccSmrg cd .. 262caade7ccSmrg rm -rf conftest.dir 263caade7ccSmrgelse 264caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 265caade7ccSmrgfi 266caade7ccSmrg]) 267caade7ccSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 268caade7ccSmrgAM_CONDITIONAL([am__fastdep$1], [ 269caade7ccSmrg test "x$enable_dependency_tracking" != xno \ 270caade7ccSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 271caade7ccSmrg]) 272caade7ccSmrg 273caade7ccSmrg 274caade7ccSmrg# AM_SET_DEPDIR 275caade7ccSmrg# ------------- 276caade7ccSmrg# Choose a directory name for dependency files. 277caade7ccSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 278caade7ccSmrgAC_DEFUN([AM_SET_DEPDIR], 279caade7ccSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 280caade7ccSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 281caade7ccSmrg]) 282caade7ccSmrg 283caade7ccSmrg 284caade7ccSmrg# AM_DEP_TRACK 285caade7ccSmrg# ------------ 286caade7ccSmrgAC_DEFUN([AM_DEP_TRACK], 287caade7ccSmrg[AC_ARG_ENABLE(dependency-tracking, 288caade7ccSmrg[ --disable-dependency-tracking speeds up one-time build 289caade7ccSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 290caade7ccSmrgif test "x$enable_dependency_tracking" != xno; then 291caade7ccSmrg am_depcomp="$ac_aux_dir/depcomp" 292caade7ccSmrg AMDEPBACKSLASH='\' 293caade7ccSmrgfi 294caade7ccSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 295caade7ccSmrgAC_SUBST([AMDEPBACKSLASH])dnl 296caade7ccSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 297caade7ccSmrg]) 298caade7ccSmrg 299caade7ccSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 300caade7ccSmrg 301caade7ccSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 302caade7ccSmrg# Free Software Foundation, Inc. 303caade7ccSmrg# 304caade7ccSmrg# This file is free software; the Free Software Foundation 305caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 306caade7ccSmrg# with or without modifications, as long as this notice is preserved. 307caade7ccSmrg 308caade7ccSmrg#serial 3 309caade7ccSmrg 310caade7ccSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 311caade7ccSmrg# ------------------------------ 312caade7ccSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 313caade7ccSmrg[for mf in $CONFIG_FILES; do 314caade7ccSmrg # Strip MF so we end up with the name of the file. 315caade7ccSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 316caade7ccSmrg # Check whether this is an Automake generated Makefile or not. 317caade7ccSmrg # We used to match only the files named `Makefile.in', but 318caade7ccSmrg # some people rename them; so instead we look at the file content. 319caade7ccSmrg # Grep'ing the first line is not enough: some people post-process 320caade7ccSmrg # each Makefile.in and add a new line on top of each file to say so. 321caade7ccSmrg # Grep'ing the whole file is not good either: AIX grep has a line 322caade7ccSmrg # limit of 2048, but all sed's we know have understand at least 4000. 323caade7ccSmrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 324caade7ccSmrg dirpart=`AS_DIRNAME("$mf")` 325caade7ccSmrg else 326caade7ccSmrg continue 327caade7ccSmrg fi 328caade7ccSmrg # Extract the definition of DEPDIR, am__include, and am__quote 329caade7ccSmrg # from the Makefile without running `make'. 330caade7ccSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 331caade7ccSmrg test -z "$DEPDIR" && continue 332caade7ccSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 333caade7ccSmrg test -z "am__include" && continue 334caade7ccSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 335caade7ccSmrg # When using ansi2knr, U may be empty or an underscore; expand it 336caade7ccSmrg U=`sed -n 's/^U = //p' < "$mf"` 337caade7ccSmrg # Find all dependency output files, they are included files with 338caade7ccSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 339caade7ccSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 340caade7ccSmrg # expansion. 341caade7ccSmrg for file in `sed -n " 342caade7ccSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 343caade7ccSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 344caade7ccSmrg # Make sure the directory exists. 345caade7ccSmrg test -f "$dirpart/$file" && continue 346caade7ccSmrg fdir=`AS_DIRNAME(["$file"])` 347caade7ccSmrg AS_MKDIR_P([$dirpart/$fdir]) 348caade7ccSmrg # echo "creating $dirpart/$file" 349caade7ccSmrg echo '# dummy' > "$dirpart/$file" 350caade7ccSmrg done 351caade7ccSmrgdone 352caade7ccSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 353caade7ccSmrg 354caade7ccSmrg 355caade7ccSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 356caade7ccSmrg# ----------------------------- 357caade7ccSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 358caade7ccSmrg# 359caade7ccSmrg# This code is only required when automatic dependency tracking 360caade7ccSmrg# is enabled. FIXME. This creates each `.P' file that we will 361caade7ccSmrg# need in order to bootstrap the dependency handling code. 362caade7ccSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 363caade7ccSmrg[AC_CONFIG_COMMANDS([depfiles], 364caade7ccSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 365caade7ccSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 366caade7ccSmrg]) 367caade7ccSmrg 368caade7ccSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 369caade7ccSmrg# Free Software Foundation, Inc. 370caade7ccSmrg# 371caade7ccSmrg# This file is free software; the Free Software Foundation 372caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 373caade7ccSmrg# with or without modifications, as long as this notice is preserved. 374caade7ccSmrg 375caade7ccSmrg# serial 8 376caade7ccSmrg 377caade7ccSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 378caade7ccSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 379caade7ccSmrg 380caade7ccSmrg# Do all the work for Automake. -*- Autoconf -*- 381caade7ccSmrg 382caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 383caade7ccSmrg# 2005, 2006 Free Software Foundation, Inc. 384caade7ccSmrg# 385caade7ccSmrg# This file is free software; the Free Software Foundation 386caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 387caade7ccSmrg# with or without modifications, as long as this notice is preserved. 388caade7ccSmrg 389caade7ccSmrg# serial 12 390caade7ccSmrg 391caade7ccSmrg# This macro actually does too much. Some checks are only needed if 392caade7ccSmrg# your package does certain things. But this isn't really a big deal. 393caade7ccSmrg 394caade7ccSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 395caade7ccSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 396caade7ccSmrg# ----------------------------------------------- 397caade7ccSmrg# The call with PACKAGE and VERSION arguments is the old style 398caade7ccSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 399caade7ccSmrg# and VERSION should now be passed to AC_INIT and removed from 400caade7ccSmrg# the call to AM_INIT_AUTOMAKE. 401caade7ccSmrg# We support both call styles for the transition. After 402caade7ccSmrg# the next Automake release, Autoconf can make the AC_INIT 403caade7ccSmrg# arguments mandatory, and then we can depend on a new Autoconf 404caade7ccSmrg# release and drop the old call support. 405caade7ccSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 406caade7ccSmrg[AC_PREREQ([2.60])dnl 407caade7ccSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 408caade7ccSmrgdnl the ones we care about. 409caade7ccSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 410caade7ccSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 411caade7ccSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 412caade7ccSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 413caade7ccSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 414caade7ccSmrg # is not polluted with repeated "-I." 415caade7ccSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 416caade7ccSmrg # test to see if srcdir already configured 417caade7ccSmrg if test -f $srcdir/config.status; then 418caade7ccSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 419caade7ccSmrg fi 420caade7ccSmrgfi 421caade7ccSmrg 422caade7ccSmrg# test whether we have cygpath 423caade7ccSmrgif test -z "$CYGPATH_W"; then 424caade7ccSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 425caade7ccSmrg CYGPATH_W='cygpath -w' 426caade7ccSmrg else 427caade7ccSmrg CYGPATH_W=echo 428caade7ccSmrg fi 429caade7ccSmrgfi 430caade7ccSmrgAC_SUBST([CYGPATH_W]) 431caade7ccSmrg 432caade7ccSmrg# Define the identity of the package. 433caade7ccSmrgdnl Distinguish between old-style and new-style calls. 434caade7ccSmrgm4_ifval([$2], 435caade7ccSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 436caade7ccSmrg AC_SUBST([PACKAGE], [$1])dnl 437caade7ccSmrg AC_SUBST([VERSION], [$2])], 438caade7ccSmrg[_AM_SET_OPTIONS([$1])dnl 439caade7ccSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 440caade7ccSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 441caade7ccSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 442caade7ccSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 443caade7ccSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 444caade7ccSmrg 445caade7ccSmrg_AM_IF_OPTION([no-define],, 446caade7ccSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 447caade7ccSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 448caade7ccSmrg 449caade7ccSmrg# Some tools Automake needs. 450caade7ccSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 451caade7ccSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 452caade7ccSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 453caade7ccSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 454caade7ccSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 455caade7ccSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 456caade7ccSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 457caade7ccSmrgAM_PROG_INSTALL_SH 458caade7ccSmrgAM_PROG_INSTALL_STRIP 459caade7ccSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 460caade7ccSmrg# We need awk for the "check" target. The system "awk" is bad on 461caade7ccSmrg# some platforms. 462caade7ccSmrgAC_REQUIRE([AC_PROG_AWK])dnl 463caade7ccSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 464caade7ccSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 465caade7ccSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 466caade7ccSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 467caade7ccSmrg [_AM_PROG_TAR([v7])])]) 468caade7ccSmrg_AM_IF_OPTION([no-dependencies],, 469caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 470caade7ccSmrg [_AM_DEPENDENCIES(CC)], 471caade7ccSmrg [define([AC_PROG_CC], 472caade7ccSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 473caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 474caade7ccSmrg [_AM_DEPENDENCIES(CXX)], 475caade7ccSmrg [define([AC_PROG_CXX], 476caade7ccSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 477caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 478caade7ccSmrg [_AM_DEPENDENCIES(OBJC)], 479caade7ccSmrg [define([AC_PROG_OBJC], 480caade7ccSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 481caade7ccSmrg]) 482caade7ccSmrg]) 483caade7ccSmrg 484caade7ccSmrg 485caade7ccSmrg# When config.status generates a header, we must update the stamp-h file. 486caade7ccSmrg# This file resides in the same directory as the config header 487caade7ccSmrg# that is generated. The stamp files are numbered to have different names. 488caade7ccSmrg 489caade7ccSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 490caade7ccSmrg# loop where config.status creates the headers, so we can generate 491caade7ccSmrg# our stamp files there. 492caade7ccSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 493caade7ccSmrg[# Compute $1's index in $config_headers. 494caade7ccSmrg_am_stamp_count=1 495caade7ccSmrgfor _am_header in $config_headers :; do 496caade7ccSmrg case $_am_header in 497caade7ccSmrg $1 | $1:* ) 498caade7ccSmrg break ;; 499caade7ccSmrg * ) 500caade7ccSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 501caade7ccSmrg esac 502caade7ccSmrgdone 503caade7ccSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 504caade7ccSmrg 505caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 506caade7ccSmrg# 507caade7ccSmrg# This file is free software; the Free Software Foundation 508caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 509caade7ccSmrg# with or without modifications, as long as this notice is preserved. 510caade7ccSmrg 511caade7ccSmrg# AM_PROG_INSTALL_SH 512caade7ccSmrg# ------------------ 513caade7ccSmrg# Define $install_sh. 514caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 515caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 516caade7ccSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 517caade7ccSmrgAC_SUBST(install_sh)]) 518caade7ccSmrg 519caade7ccSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 520caade7ccSmrg# 521caade7ccSmrg# This file is free software; the Free Software Foundation 522caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 523caade7ccSmrg# with or without modifications, as long as this notice is preserved. 524caade7ccSmrg 525caade7ccSmrg# serial 2 526caade7ccSmrg 527caade7ccSmrg# Check whether the underlying file-system supports filenames 528caade7ccSmrg# with a leading dot. For instance MS-DOS doesn't. 529caade7ccSmrgAC_DEFUN([AM_SET_LEADING_DOT], 530caade7ccSmrg[rm -rf .tst 2>/dev/null 531caade7ccSmrgmkdir .tst 2>/dev/null 532caade7ccSmrgif test -d .tst; then 533caade7ccSmrg am__leading_dot=. 534caade7ccSmrgelse 535caade7ccSmrg am__leading_dot=_ 536caade7ccSmrgfi 537caade7ccSmrgrmdir .tst 2>/dev/null 538caade7ccSmrgAC_SUBST([am__leading_dot])]) 539caade7ccSmrg 540caade7ccSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 541caade7ccSmrg# From Jim Meyering 542caade7ccSmrg 543caade7ccSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 544caade7ccSmrg# Free Software Foundation, Inc. 545caade7ccSmrg# 546caade7ccSmrg# This file is free software; the Free Software Foundation 547caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 548caade7ccSmrg# with or without modifications, as long as this notice is preserved. 549caade7ccSmrg 550caade7ccSmrg# serial 4 551caade7ccSmrg 552caade7ccSmrgAC_DEFUN([AM_MAINTAINER_MODE], 553caade7ccSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 554caade7ccSmrg dnl maintainer-mode is disabled by default 555caade7ccSmrg AC_ARG_ENABLE(maintainer-mode, 556caade7ccSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 557caade7ccSmrg (and sometimes confusing) to the casual installer], 558caade7ccSmrg USE_MAINTAINER_MODE=$enableval, 559caade7ccSmrg USE_MAINTAINER_MODE=no) 560caade7ccSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 561caade7ccSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 562caade7ccSmrg MAINT=$MAINTAINER_MODE_TRUE 563caade7ccSmrg AC_SUBST(MAINT)dnl 564caade7ccSmrg] 565caade7ccSmrg) 566caade7ccSmrg 567caade7ccSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 568caade7ccSmrg 569caade7ccSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 570caade7ccSmrg 571caade7ccSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 572caade7ccSmrg# 573caade7ccSmrg# This file is free software; the Free Software Foundation 574caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 575caade7ccSmrg# with or without modifications, as long as this notice is preserved. 576caade7ccSmrg 577caade7ccSmrg# serial 3 578caade7ccSmrg 579caade7ccSmrg# AM_MAKE_INCLUDE() 580caade7ccSmrg# ----------------- 581caade7ccSmrg# Check to see how make treats includes. 582caade7ccSmrgAC_DEFUN([AM_MAKE_INCLUDE], 583caade7ccSmrg[am_make=${MAKE-make} 584caade7ccSmrgcat > confinc << 'END' 585caade7ccSmrgam__doit: 586caade7ccSmrg @echo done 587caade7ccSmrg.PHONY: am__doit 588caade7ccSmrgEND 589caade7ccSmrg# If we don't find an include directive, just comment out the code. 590caade7ccSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 591caade7ccSmrgam__include="#" 592caade7ccSmrgam__quote= 593caade7ccSmrg_am_result=none 594caade7ccSmrg# First try GNU make style include. 595caade7ccSmrgecho "include confinc" > confmf 596caade7ccSmrg# We grep out `Entering directory' and `Leaving directory' 597caade7ccSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 598caade7ccSmrg# In particular we don't look at `^make:' because GNU make might 599caade7ccSmrg# be invoked under some other name (usually "gmake"), in which 600caade7ccSmrg# case it prints its new name instead of `make'. 601caade7ccSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 602caade7ccSmrg am__include=include 603caade7ccSmrg am__quote= 604caade7ccSmrg _am_result=GNU 605caade7ccSmrgfi 606caade7ccSmrg# Now try BSD make style include. 607caade7ccSmrgif test "$am__include" = "#"; then 608caade7ccSmrg echo '.include "confinc"' > confmf 609caade7ccSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 610caade7ccSmrg am__include=.include 611caade7ccSmrg am__quote="\"" 612caade7ccSmrg _am_result=BSD 613caade7ccSmrg fi 614caade7ccSmrgfi 615caade7ccSmrgAC_SUBST([am__include]) 616caade7ccSmrgAC_SUBST([am__quote]) 617caade7ccSmrgAC_MSG_RESULT([$_am_result]) 618caade7ccSmrgrm -f confinc confmf 619caade7ccSmrg]) 620caade7ccSmrg 621caade7ccSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 622caade7ccSmrg 623caade7ccSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 624caade7ccSmrg# Free Software Foundation, Inc. 625caade7ccSmrg# 626caade7ccSmrg# This file is free software; the Free Software Foundation 627caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 628caade7ccSmrg# with or without modifications, as long as this notice is preserved. 629caade7ccSmrg 630caade7ccSmrg# serial 5 631caade7ccSmrg 632caade7ccSmrg# AM_MISSING_PROG(NAME, PROGRAM) 633caade7ccSmrg# ------------------------------ 634caade7ccSmrgAC_DEFUN([AM_MISSING_PROG], 635caade7ccSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 636caade7ccSmrg$1=${$1-"${am_missing_run}$2"} 637caade7ccSmrgAC_SUBST($1)]) 638caade7ccSmrg 639caade7ccSmrg 640caade7ccSmrg# AM_MISSING_HAS_RUN 641caade7ccSmrg# ------------------ 642caade7ccSmrg# Define MISSING if not defined so far and test if it supports --run. 643caade7ccSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 644caade7ccSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 645caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 646caade7ccSmrgAC_REQUIRE_AUX_FILE([missing])dnl 647caade7ccSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 648caade7ccSmrg# Use eval to expand $SHELL 649caade7ccSmrgif eval "$MISSING --run true"; then 650caade7ccSmrg am_missing_run="$MISSING --run " 651caade7ccSmrgelse 652caade7ccSmrg am_missing_run= 653caade7ccSmrg AC_MSG_WARN([`missing' script is too old or missing]) 654caade7ccSmrgfi 655caade7ccSmrg]) 656caade7ccSmrg 657caade7ccSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 658caade7ccSmrg# 659caade7ccSmrg# This file is free software; the Free Software Foundation 660caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 661caade7ccSmrg# with or without modifications, as long as this notice is preserved. 662caade7ccSmrg 663caade7ccSmrg# AM_PROG_MKDIR_P 664caade7ccSmrg# --------------- 665caade7ccSmrg# Check for `mkdir -p'. 666caade7ccSmrgAC_DEFUN([AM_PROG_MKDIR_P], 667caade7ccSmrg[AC_PREREQ([2.60])dnl 668caade7ccSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 669caade7ccSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 670caade7ccSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 671caade7ccSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 672caade7ccSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 673caade7ccSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 674caade7ccSmrgdnl adjustment using top_builddir (which is defined more often than 675caade7ccSmrgdnl MKDIR_P). 676caade7ccSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 677caade7ccSmrgcase $mkdir_p in 678caade7ccSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 679caade7ccSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 680caade7ccSmrgesac 681caade7ccSmrg]) 682caade7ccSmrg 683caade7ccSmrg# Helper functions for option handling. -*- Autoconf -*- 684caade7ccSmrg 685caade7ccSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 686caade7ccSmrg# 687caade7ccSmrg# This file is free software; the Free Software Foundation 688caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 689caade7ccSmrg# with or without modifications, as long as this notice is preserved. 690caade7ccSmrg 691caade7ccSmrg# serial 3 692caade7ccSmrg 693caade7ccSmrg# _AM_MANGLE_OPTION(NAME) 694caade7ccSmrg# ----------------------- 695caade7ccSmrgAC_DEFUN([_AM_MANGLE_OPTION], 696caade7ccSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 697caade7ccSmrg 698caade7ccSmrg# _AM_SET_OPTION(NAME) 699caade7ccSmrg# ------------------------------ 700caade7ccSmrg# Set option NAME. Presently that only means defining a flag for this option. 701caade7ccSmrgAC_DEFUN([_AM_SET_OPTION], 702caade7ccSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 703caade7ccSmrg 704caade7ccSmrg# _AM_SET_OPTIONS(OPTIONS) 705caade7ccSmrg# ---------------------------------- 706caade7ccSmrg# OPTIONS is a space-separated list of Automake options. 707caade7ccSmrgAC_DEFUN([_AM_SET_OPTIONS], 708caade7ccSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 709caade7ccSmrg 710caade7ccSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 711caade7ccSmrg# ------------------------------------------- 712caade7ccSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 713caade7ccSmrgAC_DEFUN([_AM_IF_OPTION], 714caade7ccSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 715caade7ccSmrg 716caade7ccSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 717caade7ccSmrg 718caade7ccSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 719caade7ccSmrg# Free Software Foundation, Inc. 720caade7ccSmrg# 721caade7ccSmrg# This file is free software; the Free Software Foundation 722caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 723caade7ccSmrg# with or without modifications, as long as this notice is preserved. 724caade7ccSmrg 725caade7ccSmrg# serial 4 726caade7ccSmrg 727caade7ccSmrg# AM_SANITY_CHECK 728caade7ccSmrg# --------------- 729caade7ccSmrgAC_DEFUN([AM_SANITY_CHECK], 730caade7ccSmrg[AC_MSG_CHECKING([whether build environment is sane]) 731caade7ccSmrg# Just in case 732caade7ccSmrgsleep 1 733caade7ccSmrgecho timestamp > conftest.file 734caade7ccSmrg# Do `set' in a subshell so we don't clobber the current shell's 735caade7ccSmrg# arguments. Must try -L first in case configure is actually a 736caade7ccSmrg# symlink; some systems play weird games with the mod time of symlinks 737caade7ccSmrg# (eg FreeBSD returns the mod time of the symlink's containing 738caade7ccSmrg# directory). 739caade7ccSmrgif ( 740caade7ccSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 741caade7ccSmrg if test "$[*]" = "X"; then 742caade7ccSmrg # -L didn't work. 743caade7ccSmrg set X `ls -t $srcdir/configure conftest.file` 744caade7ccSmrg fi 745caade7ccSmrg rm -f conftest.file 746caade7ccSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 747caade7ccSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 748caade7ccSmrg 749caade7ccSmrg # If neither matched, then we have a broken ls. This can happen 750caade7ccSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 751caade7ccSmrg # broken ls alias from the environment. This has actually 752caade7ccSmrg # happened. Such a system could not be considered "sane". 753caade7ccSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 754caade7ccSmrgalias in your environment]) 755caade7ccSmrg fi 756caade7ccSmrg 757caade7ccSmrg test "$[2]" = conftest.file 758caade7ccSmrg ) 759caade7ccSmrgthen 760caade7ccSmrg # Ok. 761caade7ccSmrg : 762caade7ccSmrgelse 763caade7ccSmrg AC_MSG_ERROR([newly created file is older than distributed files! 764caade7ccSmrgCheck your system clock]) 765caade7ccSmrgfi 766caade7ccSmrgAC_MSG_RESULT(yes)]) 767caade7ccSmrg 768caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 769caade7ccSmrg# 770caade7ccSmrg# This file is free software; the Free Software Foundation 771caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 772caade7ccSmrg# with or without modifications, as long as this notice is preserved. 773caade7ccSmrg 774caade7ccSmrg# AM_PROG_INSTALL_STRIP 775caade7ccSmrg# --------------------- 776caade7ccSmrg# One issue with vendor `install' (even GNU) is that you can't 777caade7ccSmrg# specify the program used to strip binaries. This is especially 778caade7ccSmrg# annoying in cross-compiling environments, where the build's strip 779caade7ccSmrg# is unlikely to handle the host's binaries. 780caade7ccSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 781caade7ccSmrg# always use install-sh in `make install-strip', and initialize 782caade7ccSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 783caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 784caade7ccSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 785caade7ccSmrg# Installed binaries are usually stripped using `strip' when the user 786caade7ccSmrg# run `make install-strip'. However `strip' might not be the right 787caade7ccSmrg# tool to use in cross-compilation environments, therefore Automake 788caade7ccSmrg# will honor the `STRIP' environment variable to overrule this program. 789caade7ccSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 790caade7ccSmrgif test "$cross_compiling" != no; then 791caade7ccSmrg AC_CHECK_TOOL([STRIP], [strip], :) 792caade7ccSmrgfi 793caade7ccSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 794caade7ccSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 795caade7ccSmrg 796caade7ccSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 797caade7ccSmrg# 798caade7ccSmrg# This file is free software; the Free Software Foundation 799caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 800caade7ccSmrg# with or without modifications, as long as this notice is preserved. 801caade7ccSmrg 802caade7ccSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 803caade7ccSmrg# --------------------------- 804caade7ccSmrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 805caade7ccSmrg# This macro is traced by Automake. 806caade7ccSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 807caade7ccSmrg 808caade7ccSmrg# Check how to create a tarball. -*- Autoconf -*- 809caade7ccSmrg 810caade7ccSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 811caade7ccSmrg# 812caade7ccSmrg# This file is free software; the Free Software Foundation 813caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 814caade7ccSmrg# with or without modifications, as long as this notice is preserved. 815caade7ccSmrg 816caade7ccSmrg# serial 2 817caade7ccSmrg 818caade7ccSmrg# _AM_PROG_TAR(FORMAT) 819caade7ccSmrg# -------------------- 820caade7ccSmrg# Check how to create a tarball in format FORMAT. 821caade7ccSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 822caade7ccSmrg# 823caade7ccSmrg# Substitute a variable $(am__tar) that is a command 824caade7ccSmrg# writing to stdout a FORMAT-tarball containing the directory 825caade7ccSmrg# $tardir. 826caade7ccSmrg# tardir=directory && $(am__tar) > result.tar 827caade7ccSmrg# 828caade7ccSmrg# Substitute a variable $(am__untar) that extract such 829caade7ccSmrg# a tarball read from stdin. 830caade7ccSmrg# $(am__untar) < result.tar 831caade7ccSmrgAC_DEFUN([_AM_PROG_TAR], 832caade7ccSmrg[# Always define AMTAR for backward compatibility. 833caade7ccSmrgAM_MISSING_PROG([AMTAR], [tar]) 834caade7ccSmrgm4_if([$1], [v7], 835caade7ccSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 836caade7ccSmrg [m4_case([$1], [ustar],, [pax],, 837caade7ccSmrg [m4_fatal([Unknown tar format])]) 838caade7ccSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 839caade7ccSmrg# Loop over all known methods to create a tar archive until one works. 840caade7ccSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 841caade7ccSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 842caade7ccSmrg# Do not fold the above two line into one, because Tru64 sh and 843caade7ccSmrg# Solaris sh will not grok spaces in the rhs of `-'. 844caade7ccSmrgfor _am_tool in $_am_tools 845caade7ccSmrgdo 846caade7ccSmrg case $_am_tool in 847caade7ccSmrg gnutar) 848caade7ccSmrg for _am_tar in tar gnutar gtar; 849caade7ccSmrg do 850caade7ccSmrg AM_RUN_LOG([$_am_tar --version]) && break 851caade7ccSmrg done 852caade7ccSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 853caade7ccSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 854caade7ccSmrg am__untar="$_am_tar -xf -" 855caade7ccSmrg ;; 856caade7ccSmrg plaintar) 857caade7ccSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 858caade7ccSmrg # ustar tarball either. 859caade7ccSmrg (tar --version) >/dev/null 2>&1 && continue 860caade7ccSmrg am__tar='tar chf - "$$tardir"' 861caade7ccSmrg am__tar_='tar chf - "$tardir"' 862caade7ccSmrg am__untar='tar xf -' 863caade7ccSmrg ;; 864caade7ccSmrg pax) 865caade7ccSmrg am__tar='pax -L -x $1 -w "$$tardir"' 866caade7ccSmrg am__tar_='pax -L -x $1 -w "$tardir"' 867caade7ccSmrg am__untar='pax -r' 868caade7ccSmrg ;; 869caade7ccSmrg cpio) 870caade7ccSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 871caade7ccSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 872caade7ccSmrg am__untar='cpio -i -H $1 -d' 873caade7ccSmrg ;; 874caade7ccSmrg none) 875caade7ccSmrg am__tar=false 876caade7ccSmrg am__tar_=false 877caade7ccSmrg am__untar=false 878caade7ccSmrg ;; 879caade7ccSmrg esac 880caade7ccSmrg 881caade7ccSmrg # If the value was cached, stop now. We just wanted to have am__tar 882caade7ccSmrg # and am__untar set. 883caade7ccSmrg test -n "${am_cv_prog_tar_$1}" && break 884caade7ccSmrg 885caade7ccSmrg # tar/untar a dummy directory, and stop if the command works 886caade7ccSmrg rm -rf conftest.dir 887caade7ccSmrg mkdir conftest.dir 888caade7ccSmrg echo GrepMe > conftest.dir/file 889caade7ccSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 890caade7ccSmrg rm -rf conftest.dir 891caade7ccSmrg if test -s conftest.tar; then 892caade7ccSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 893caade7ccSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 894caade7ccSmrg fi 895caade7ccSmrgdone 896caade7ccSmrgrm -rf conftest.dir 897caade7ccSmrg 898caade7ccSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 899caade7ccSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 900caade7ccSmrgAC_SUBST([am__tar]) 901caade7ccSmrgAC_SUBST([am__untar]) 902caade7ccSmrg]) # _AM_PROG_TAR 903caade7ccSmrg 904caade7ccSmrgdnl 905caade7ccSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 906caade7ccSmrgdnl 907caade7ccSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 908caade7ccSmrgdnl copy of this software and associated documentation files (the 909caade7ccSmrgdnl "Software"), to deal in the Software without restriction, including 910caade7ccSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 911caade7ccSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 912caade7ccSmrgdnl to whom the Software is furnished to do so, provided that the above 913caade7ccSmrgdnl copyright notice(s) and this permission notice appear in all copies of 914caade7ccSmrgdnl the Software and that both the above copyright notice(s) and this 915caade7ccSmrgdnl permission notice appear in supporting documentation. 916caade7ccSmrgdnl 917caade7ccSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 918caade7ccSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 919caade7ccSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 920caade7ccSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 921caade7ccSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 922caade7ccSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 923caade7ccSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 924caade7ccSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 925caade7ccSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 926caade7ccSmrgdnl 927caade7ccSmrgdnl Except as contained in this notice, the name of a copyright holder 928caade7ccSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 929caade7ccSmrgdnl or other dealings in this Software without prior written authorization 930caade7ccSmrgdnl of the copyright holder. 931caade7ccSmrg 932caade7ccSmrg# XORG_MACROS_VERSION(required-version) 933caade7ccSmrg# ------------------------------------- 934caade7ccSmrg# Minimum version: 1.1.0 935caade7ccSmrg# 936caade7ccSmrg# If you're using a macro added in Version 1.1 or newer, include this in 937caade7ccSmrg# your configure.ac with the minimum required version, such as: 938caade7ccSmrg# XORG_MACROS_VERSION(1.1) 939caade7ccSmrg# 940caade7ccSmrg# To force at least a version with this macro defined, also add: 941caade7ccSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 942caade7ccSmrg# 943caade7ccSmrg# 944caade7ccSmrg# See the "minimum version" comment for each macro you use to see what 945caade7ccSmrg# version you require. 946caade7ccSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 947caade7ccSmrg [XORG_MACROS_needed_version=$1 948caade7ccSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 949caade7ccSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 950caade7ccSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 951caade7ccSmrg [XORG_MACROS_version=1.1.5 952caade7ccSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 953caade7ccSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 954caade7ccSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 955caade7ccSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 956caade7ccSmrg fi 957caade7ccSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 958caade7ccSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 959caade7ccSmrg fi 960caade7ccSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 961caade7ccSmrg]) # XORG_MACROS_VERSION 962caade7ccSmrg 963caade7ccSmrg# XORG_PROG_RAWCPP() 964caade7ccSmrg# ------------------ 965caade7ccSmrg# Minimum version: 1.0.0 966caade7ccSmrg# 967caade7ccSmrg# Find cpp program and necessary flags for use in pre-processing text files 968caade7ccSmrg# such as man pages and config files 969caade7ccSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 970caade7ccSmrgAC_REQUIRE([AC_PROG_CPP]) 971caade7ccSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 972caade7ccSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 973caade7ccSmrg 974caade7ccSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 975caade7ccSmrg# which is not the best choice for supporting other OS'es, but covers most 976caade7ccSmrg# of the ones we need for now. 977caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 978caade7ccSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 979caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 980caade7ccSmrg AC_MSG_RESULT([no]) 981caade7ccSmrgelse 982caade7ccSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 983caade7ccSmrg RAWCPPFLAGS=-undef 984caade7ccSmrg AC_MSG_RESULT([yes]) 985caade7ccSmrg else 986caade7ccSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 987caade7ccSmrg fi 988caade7ccSmrgfi 989caade7ccSmrgrm -f conftest.$ac_ext 990caade7ccSmrg 991caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 992caade7ccSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 993caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 994caade7ccSmrg AC_MSG_RESULT([no]) 995caade7ccSmrgelse 996caade7ccSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 997caade7ccSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 998caade7ccSmrg AC_MSG_RESULT([yes]) 999caade7ccSmrg else 1000caade7ccSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1001caade7ccSmrg fi 1002caade7ccSmrgfi 1003caade7ccSmrgrm -f conftest.$ac_ext 1004caade7ccSmrgAC_SUBST(RAWCPPFLAGS) 1005caade7ccSmrg]) # XORG_PROG_RAWCPP 1006caade7ccSmrg 1007caade7ccSmrg# XORG_MANPAGE_SECTIONS() 1008caade7ccSmrg# ----------------------- 1009caade7ccSmrg# Minimum version: 1.0.0 1010caade7ccSmrg# 1011caade7ccSmrg# Determine which sections man pages go in for the different man page types 1012caade7ccSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1013caade7ccSmrg# Not sure if there's any better way than just hardcoding by OS name. 1014caade7ccSmrg# Override default settings by setting environment variables 1015caade7ccSmrg 1016caade7ccSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1017caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1018caade7ccSmrg 1019caade7ccSmrgif test x$APP_MAN_SUFFIX = x ; then 1020caade7ccSmrg APP_MAN_SUFFIX=1 1021caade7ccSmrgfi 1022caade7ccSmrgif test x$APP_MAN_DIR = x ; then 1023caade7ccSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1024caade7ccSmrgfi 1025caade7ccSmrg 1026caade7ccSmrgif test x$LIB_MAN_SUFFIX = x ; then 1027caade7ccSmrg LIB_MAN_SUFFIX=3 1028caade7ccSmrgfi 1029caade7ccSmrgif test x$LIB_MAN_DIR = x ; then 1030caade7ccSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1031caade7ccSmrgfi 1032caade7ccSmrg 1033caade7ccSmrgif test x$FILE_MAN_SUFFIX = x ; then 1034caade7ccSmrg case $host_os in 1035caade7ccSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1036caade7ccSmrg *) FILE_MAN_SUFFIX=5 ;; 1037caade7ccSmrg esac 1038caade7ccSmrgfi 1039caade7ccSmrgif test x$FILE_MAN_DIR = x ; then 1040caade7ccSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1041caade7ccSmrgfi 1042caade7ccSmrg 1043caade7ccSmrgif test x$MISC_MAN_SUFFIX = x ; then 1044caade7ccSmrg case $host_os in 1045caade7ccSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1046caade7ccSmrg *) MISC_MAN_SUFFIX=7 ;; 1047caade7ccSmrg esac 1048caade7ccSmrgfi 1049caade7ccSmrgif test x$MISC_MAN_DIR = x ; then 1050caade7ccSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1051caade7ccSmrgfi 1052caade7ccSmrg 1053caade7ccSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1054caade7ccSmrg case $host_os in 1055caade7ccSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1056caade7ccSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1057caade7ccSmrg esac 1058caade7ccSmrgfi 1059caade7ccSmrgif test x$DRIVER_MAN_DIR = x ; then 1060caade7ccSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1061caade7ccSmrgfi 1062caade7ccSmrg 1063caade7ccSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1064caade7ccSmrg case $host_os in 1065caade7ccSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1066caade7ccSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1067caade7ccSmrg esac 1068caade7ccSmrgfi 1069caade7ccSmrgif test x$ADMIN_MAN_DIR = x ; then 1070caade7ccSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1071caade7ccSmrgfi 1072caade7ccSmrg 1073caade7ccSmrg 1074caade7ccSmrgAC_SUBST([APP_MAN_SUFFIX]) 1075caade7ccSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1076caade7ccSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1077caade7ccSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1078caade7ccSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1079caade7ccSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1080caade7ccSmrgAC_SUBST([APP_MAN_DIR]) 1081caade7ccSmrgAC_SUBST([LIB_MAN_DIR]) 1082caade7ccSmrgAC_SUBST([FILE_MAN_DIR]) 1083caade7ccSmrgAC_SUBST([MISC_MAN_DIR]) 1084caade7ccSmrgAC_SUBST([DRIVER_MAN_DIR]) 1085caade7ccSmrgAC_SUBST([ADMIN_MAN_DIR]) 1086caade7ccSmrg]) # XORG_MANPAGE_SECTIONS 1087caade7ccSmrg 1088caade7ccSmrg# XORG_CHECK_LINUXDOC 1089caade7ccSmrg# ------------------- 1090caade7ccSmrg# Minimum version: 1.0.0 1091caade7ccSmrg# 1092caade7ccSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1093caade7ccSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1094caade7ccSmrg# Whether or not the necessary tools and files are found can be checked 1095caade7ccSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1096caade7ccSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1097caade7ccSmrgXORG_SGML_PATH=$prefix/share/sgml 1098caade7ccSmrgHAVE_DEFS_ENT= 1099caade7ccSmrg 1100caade7ccSmrgif test x"$cross_compiling" = x"yes" ; then 1101caade7ccSmrg HAVE_DEFS_ENT=no 1102caade7ccSmrgelse 1103caade7ccSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1104caade7ccSmrgfi 1105caade7ccSmrg 1106caade7ccSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1107caade7ccSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1108caade7ccSmrg 1109caade7ccSmrgAC_MSG_CHECKING([Whether to build documentation]) 1110caade7ccSmrg 1111caade7ccSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1112caade7ccSmrg BUILDDOC=yes 1113caade7ccSmrgelse 1114caade7ccSmrg BUILDDOC=no 1115caade7ccSmrgfi 1116caade7ccSmrg 1117caade7ccSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1118caade7ccSmrg 1119caade7ccSmrgAC_MSG_RESULT([$BUILDDOC]) 1120caade7ccSmrg 1121caade7ccSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1122caade7ccSmrg 1123caade7ccSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1124caade7ccSmrg BUILDPDFDOC=yes 1125caade7ccSmrgelse 1126caade7ccSmrg BUILDPDFDOC=no 1127caade7ccSmrgfi 1128caade7ccSmrg 1129caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1130caade7ccSmrg 1131caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1132caade7ccSmrg 1133caade7ccSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1134caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1135caade7ccSmrgMAKE_PDF="$PS2PDF" 1136caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1137caade7ccSmrg 1138caade7ccSmrgAC_SUBST(MAKE_TEXT) 1139caade7ccSmrgAC_SUBST(MAKE_PS) 1140caade7ccSmrgAC_SUBST(MAKE_PDF) 1141caade7ccSmrgAC_SUBST(MAKE_HTML) 1142caade7ccSmrg]) # XORG_CHECK_LINUXDOC 1143caade7ccSmrg 1144caade7ccSmrg# XORG_CHECK_DOCBOOK 1145caade7ccSmrg# ------------------- 1146caade7ccSmrg# Minimum version: 1.0.0 1147caade7ccSmrg# 1148caade7ccSmrg# Checks for the ability to build output formats from SGML DocBook source. 1149caade7ccSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1150caade7ccSmrg# indicates whether the necessary tools and files are found and, if set, 1151caade7ccSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1152caade7ccSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1153caade7ccSmrgXORG_SGML_PATH=$prefix/share/sgml 1154caade7ccSmrgHAVE_DEFS_ENT= 1155caade7ccSmrgBUILDTXTDOC=no 1156caade7ccSmrgBUILDPDFDOC=no 1157caade7ccSmrgBUILDPSDOC=no 1158caade7ccSmrgBUILDHTMLDOC=no 1159caade7ccSmrg 1160caade7ccSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1161caade7ccSmrg 1162caade7ccSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1163caade7ccSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1164caade7ccSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1165caade7ccSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1166caade7ccSmrg 1167caade7ccSmrgAC_MSG_CHECKING([Whether to build text documentation]) 1168caade7ccSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1169caade7ccSmrg test x$BUILD_TXTDOC != xno; then 1170caade7ccSmrg BUILDTXTDOC=yes 1171caade7ccSmrgfi 1172caade7ccSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1173caade7ccSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1174caade7ccSmrg 1175caade7ccSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 1176caade7ccSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1177caade7ccSmrg test x$BUILD_PDFDOC != xno; then 1178caade7ccSmrg BUILDPDFDOC=yes 1179caade7ccSmrgfi 1180caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1181caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1182caade7ccSmrg 1183caade7ccSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 1184caade7ccSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1185caade7ccSmrg test x$BUILD_PSDOC != xno; then 1186caade7ccSmrg BUILDPSDOC=yes 1187caade7ccSmrgfi 1188caade7ccSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1189caade7ccSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1190caade7ccSmrg 1191caade7ccSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 1192caade7ccSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1193caade7ccSmrg test x$BUILD_HTMLDOC != xno; then 1194caade7ccSmrg BUILDHTMLDOC=yes 1195caade7ccSmrgfi 1196caade7ccSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1197caade7ccSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1198caade7ccSmrg 1199caade7ccSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1200caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1201caade7ccSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1202caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1203caade7ccSmrg 1204caade7ccSmrgAC_SUBST(MAKE_TEXT) 1205caade7ccSmrgAC_SUBST(MAKE_PS) 1206caade7ccSmrgAC_SUBST(MAKE_PDF) 1207caade7ccSmrgAC_SUBST(MAKE_HTML) 1208caade7ccSmrg]) # XORG_CHECK_DOCBOOK 1209caade7ccSmrg 1210caade7ccSmrg# XORG_CHECK_MALLOC_ZERO 1211caade7ccSmrg# ---------------------- 1212caade7ccSmrg# Minimum version: 1.0.0 1213caade7ccSmrg# 1214caade7ccSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1215caade7ccSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1216caade7ccSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1217caade7ccSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1218caade7ccSmrgAC_ARG_ENABLE(malloc0returnsnull, 1219caade7ccSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 1220caade7ccSmrg [malloc(0) returns NULL (default: auto)]), 1221caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1222caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1223caade7ccSmrg 1224caade7ccSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1225caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1226caade7ccSmrg AC_RUN_IFELSE([ 1227caade7ccSmrgchar *malloc(); 1228caade7ccSmrgchar *realloc(); 1229caade7ccSmrgchar *calloc(); 1230caade7ccSmrgmain() { 1231caade7ccSmrg char *m0, *r0, *c0, *p; 1232caade7ccSmrg m0 = malloc(0); 1233caade7ccSmrg p = malloc(10); 1234caade7ccSmrg r0 = realloc(p,0); 1235caade7ccSmrg c0 = calloc(0); 1236caade7ccSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1237caade7ccSmrg}], 1238caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1239caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 1240caade7ccSmrgfi 1241caade7ccSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1242caade7ccSmrg 1243caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1244caade7ccSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1245caade7ccSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1246caade7ccSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1247caade7ccSmrgelse 1248caade7ccSmrg MALLOC_ZERO_CFLAGS="" 1249caade7ccSmrg XMALLOC_ZERO_CFLAGS="" 1250caade7ccSmrg XTMALLOC_ZERO_CFLAGS="" 1251caade7ccSmrgfi 1252caade7ccSmrg 1253caade7ccSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1254caade7ccSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1255caade7ccSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1256caade7ccSmrg]) # XORG_CHECK_MALLOC_ZERO 1257caade7ccSmrg 1258caade7ccSmrg# XORG_WITH_LINT() 1259caade7ccSmrg# ---------------- 1260caade7ccSmrg# Minimum version: 1.1.0 1261caade7ccSmrg# 1262caade7ccSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1263caade7ccSmrg# is specified. (Use --with-lint=sparse for sparse.) 1264caade7ccSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1265caade7ccSmrg# Sets $LINT_FLAGS to flags to pass to source checker 1266caade7ccSmrg# Sets LINT automake conditional if enabled (default: disabled) 1267caade7ccSmrg# 1268caade7ccSmrgAC_DEFUN([XORG_WITH_LINT],[ 1269caade7ccSmrg 1270caade7ccSmrg# Allow checking code with lint, sparse, etc. 1271caade7ccSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 1272caade7ccSmrg [Use a lint-style source code checker (default: disabled)])], 1273caade7ccSmrg [use_lint=$withval], [use_lint=no]) 1274caade7ccSmrgif test "x$use_lint" = "xyes" ; then 1275caade7ccSmrg LINT="lint" 1276caade7ccSmrgelse 1277caade7ccSmrg LINT="$use_lint" 1278caade7ccSmrgfi 1279caade7ccSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1280caade7ccSmrg case $LINT in 1281caade7ccSmrg lint|*/lint) 1282caade7ccSmrg case $host_os in 1283caade7ccSmrg solaris*) 1284caade7ccSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1285caade7ccSmrg ;; 1286caade7ccSmrg esac 1287caade7ccSmrg ;; 1288caade7ccSmrg esac 1289caade7ccSmrgfi 1290caade7ccSmrg 1291caade7ccSmrgAC_SUBST(LINT) 1292caade7ccSmrgAC_SUBST(LINT_FLAGS) 1293caade7ccSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1294caade7ccSmrg 1295caade7ccSmrg]) # XORG_WITH_LINT 1296caade7ccSmrg 1297caade7ccSmrg# XORG_LINT_LIBRARY(LIBNAME) 1298caade7ccSmrg# -------------------------- 1299caade7ccSmrg# Minimum version: 1.1.0 1300caade7ccSmrg# 1301caade7ccSmrg# Sets up flags for building lint libraries for checking programs that call 1302caade7ccSmrg# functions in the library. 1303caade7ccSmrg# Disabled by default, enable with --enable-lint-library 1304caade7ccSmrg# Sets: 1305caade7ccSmrg# @LINTLIB@ - name of lint library file to make 1306caade7ccSmrg# MAKE_LINT_LIB - automake conditional 1307caade7ccSmrg# 1308caade7ccSmrg 1309caade7ccSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1310caade7ccSmrgAC_REQUIRE([XORG_WITH_LINT]) 1311caade7ccSmrg# Build lint "library" for more indepth checks of programs calling this library 1312caade7ccSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1313caade7ccSmrg [Create lint library (default: disabled)])], 1314caade7ccSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1315caade7ccSmrgif test "x$make_lint_lib" != "xno" ; then 1316caade7ccSmrg if test "x$LINT" = "xno" ; then 1317caade7ccSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1318caade7ccSmrg fi 1319caade7ccSmrg if test "x$make_lint_lib" = "xyes" ; then 1320caade7ccSmrg LINTLIB=llib-l$1.ln 1321caade7ccSmrg else 1322caade7ccSmrg LINTLIB=$make_lint_lib 1323caade7ccSmrg fi 1324caade7ccSmrgfi 1325caade7ccSmrgAC_SUBST(LINTLIB) 1326caade7ccSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1327caade7ccSmrg 1328caade7ccSmrg]) # XORG_LINT_LIBRARY 1329caade7ccSmrg 1330caade7ccSmrgdnl Copyright 2005 Red Hat, Inc 1331caade7ccSmrgdnl 1332caade7ccSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1333caade7ccSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1334caade7ccSmrgdnl the above copyright notice appear in all copies and that both that 1335caade7ccSmrgdnl copyright notice and this permission notice appear in supporting 1336caade7ccSmrgdnl documentation. 1337caade7ccSmrgdnl 1338caade7ccSmrgdnl The above copyright notice and this permission notice shall be included 1339caade7ccSmrgdnl in all copies or substantial portions of the Software. 1340caade7ccSmrgdnl 1341caade7ccSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1342caade7ccSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1343caade7ccSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1344caade7ccSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1345caade7ccSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1346caade7ccSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1347caade7ccSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1348caade7ccSmrgdnl 1349caade7ccSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1350caade7ccSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1351caade7ccSmrgdnl other dealings in this Software without prior written authorization 1352caade7ccSmrgdnl from the copyright holders. 1353caade7ccSmrgdnl 1354caade7ccSmrg 1355caade7ccSmrg# XORG_RELEASE_VERSION 1356caade7ccSmrg# -------------------- 1357caade7ccSmrg# Adds --with/without-release-string and changes the PACKAGE and 1358caade7ccSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1359caade7ccSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1360caade7ccSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1361caade7ccSmrg 1362caade7ccSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1363caade7ccSmrg AC_ARG_WITH(release-version, 1364caade7ccSmrg AC_HELP_STRING([--with-release-version=STRING], 1365caade7ccSmrg [Use release version string in package name]), 1366caade7ccSmrg [RELEASE_VERSION="$withval"], 1367caade7ccSmrg [RELEASE_VERSION=""]) 1368caade7ccSmrg if test "x$RELEASE_VERSION" != "x"; then 1369caade7ccSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1370caade7ccSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1371caade7ccSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1372caade7ccSmrg fi 1373caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1374caade7ccSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1375caade7ccSmrg [Major version of this package]) 1376caade7ccSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1377caade7ccSmrg if test "x$PVM" = "x"; then 1378caade7ccSmrg PVM="0" 1379caade7ccSmrg fi 1380caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1381caade7ccSmrg [$PVM], 1382caade7ccSmrg [Minor version of this package]) 1383caade7ccSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1384caade7ccSmrg if test "x$PVP" = "x"; then 1385caade7ccSmrg PVP="0" 1386caade7ccSmrg fi 1387caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1388caade7ccSmrg [$PVP], 1389caade7ccSmrg [Patch version of this package]) 1390caade7ccSmrg]) 1391caade7ccSmrg 1392caade7ccSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1393caade7ccSmrg 1394caade7ccSmrg# serial 48 AC_PROG_LIBTOOL 1395caade7ccSmrg 1396caade7ccSmrg 1397caade7ccSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 1398caade7ccSmrg# ----------------------------------------------------------- 1399caade7ccSmrg# If this macro is not defined by Autoconf, define it here. 1400caade7ccSmrgm4_ifdef([AC_PROVIDE_IFELSE], 1401caade7ccSmrg [], 1402caade7ccSmrg [m4_define([AC_PROVIDE_IFELSE], 1403caade7ccSmrg [m4_ifdef([AC_PROVIDE_$1], 1404caade7ccSmrg [$2], [$3])])]) 1405caade7ccSmrg 1406caade7ccSmrg 1407caade7ccSmrg# AC_PROG_LIBTOOL 1408caade7ccSmrg# --------------- 1409caade7ccSmrgAC_DEFUN([AC_PROG_LIBTOOL], 1410caade7ccSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 1411caade7ccSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 1412caade7ccSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 1413caade7ccSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 1414caade7ccSmrg [AC_LIBTOOL_CXX], 1415caade7ccSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 1416caade7ccSmrg ])]) 1417caade7ccSmrgdnl And a similar setup for Fortran 77 support 1418caade7ccSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 1419caade7ccSmrg [AC_LIBTOOL_F77], 1420caade7ccSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 1421caade7ccSmrg])]) 1422caade7ccSmrg 1423caade7ccSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 1424caade7ccSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 1425caade7ccSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 1426caade7ccSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1427caade7ccSmrg [AC_LIBTOOL_GCJ], 1428caade7ccSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1429caade7ccSmrg [AC_LIBTOOL_GCJ], 1430caade7ccSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 1431caade7ccSmrg [AC_LIBTOOL_GCJ], 1432caade7ccSmrg [ifdef([AC_PROG_GCJ], 1433caade7ccSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1434caade7ccSmrg ifdef([A][M_PROG_GCJ], 1435caade7ccSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1436caade7ccSmrg ifdef([LT_AC_PROG_GCJ], 1437caade7ccSmrg [define([LT_AC_PROG_GCJ], 1438caade7ccSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 1439caade7ccSmrg])])# AC_PROG_LIBTOOL 1440caade7ccSmrg 1441caade7ccSmrg 1442caade7ccSmrg# _AC_PROG_LIBTOOL 1443caade7ccSmrg# ---------------- 1444caade7ccSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 1445caade7ccSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 1446caade7ccSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 1447caade7ccSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 1448caade7ccSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 1449caade7ccSmrg 1450caade7ccSmrg# This can be used to rebuild libtool when needed 1451caade7ccSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1452caade7ccSmrg 1453caade7ccSmrg# Always use our own libtool. 1454caade7ccSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1455caade7ccSmrgAC_SUBST(LIBTOOL)dnl 1456caade7ccSmrg 1457caade7ccSmrg# Prevent multiple expansion 1458caade7ccSmrgdefine([AC_PROG_LIBTOOL], []) 1459caade7ccSmrg])# _AC_PROG_LIBTOOL 1460caade7ccSmrg 1461caade7ccSmrg 1462caade7ccSmrg# AC_LIBTOOL_SETUP 1463caade7ccSmrg# ---------------- 1464caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 1465caade7ccSmrg[AC_PREREQ(2.50)dnl 1466caade7ccSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 1467caade7ccSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 1468caade7ccSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 1469caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 1470caade7ccSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1471caade7ccSmrgAC_REQUIRE([AC_PROG_CC])dnl 1472caade7ccSmrgAC_REQUIRE([AC_PROG_LD])dnl 1473caade7ccSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1474caade7ccSmrgAC_REQUIRE([AC_PROG_NM])dnl 1475caade7ccSmrg 1476caade7ccSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1477caade7ccSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1478caade7ccSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1479caade7ccSmrgAC_REQUIRE([AC_OBJEXT])dnl 1480caade7ccSmrgAC_REQUIRE([AC_EXEEXT])dnl 1481caade7ccSmrgdnl 1482caade7ccSmrg 1483caade7ccSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1484caade7ccSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1485caade7ccSmrgAC_LIBTOOL_OBJDIR 1486caade7ccSmrg 1487caade7ccSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1488caade7ccSmrg_LT_AC_PROG_ECHO_BACKSLASH 1489caade7ccSmrg 1490caade7ccSmrgcase $host_os in 1491caade7ccSmrgaix3*) 1492caade7ccSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1493caade7ccSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1494caade7ccSmrg # vanish in a puff of smoke. 1495caade7ccSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1496caade7ccSmrg COLLECT_NAMES= 1497caade7ccSmrg export COLLECT_NAMES 1498caade7ccSmrg fi 1499caade7ccSmrg ;; 1500caade7ccSmrgesac 1501caade7ccSmrg 1502caade7ccSmrg# Sed substitution that helps us do robust quoting. It backslashifies 1503caade7ccSmrg# metacharacters that are still active within double-quoted strings. 1504caade7ccSmrgXsed='sed -e 1s/^X//' 1505caade7ccSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1506caade7ccSmrg 1507caade7ccSmrg# Same as above, but do not quote variable references. 1508caade7ccSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1509caade7ccSmrg 1510caade7ccSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1511caade7ccSmrg# double_quote_subst'ed string. 1512caade7ccSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1513caade7ccSmrg 1514caade7ccSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1515caade7ccSmrgno_glob_subst='s/\*/\\\*/g' 1516caade7ccSmrg 1517caade7ccSmrg# Constants: 1518caade7ccSmrgrm="rm -f" 1519caade7ccSmrg 1520caade7ccSmrg# Global variables: 1521caade7ccSmrgdefault_ofile=libtool 1522caade7ccSmrgcan_build_shared=yes 1523caade7ccSmrg 1524caade7ccSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1525caade7ccSmrg# which needs '.lib'). 1526caade7ccSmrglibext=a 1527caade7ccSmrgltmain="$ac_aux_dir/ltmain.sh" 1528caade7ccSmrgofile="$default_ofile" 1529caade7ccSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1530caade7ccSmrg 1531caade7ccSmrgAC_CHECK_TOOL(AR, ar, false) 1532caade7ccSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1533caade7ccSmrgAC_CHECK_TOOL(STRIP, strip, :) 1534caade7ccSmrg 1535caade7ccSmrgold_CC="$CC" 1536caade7ccSmrgold_CFLAGS="$CFLAGS" 1537caade7ccSmrg 1538caade7ccSmrg# Set sane defaults for various variables 1539caade7ccSmrgtest -z "$AR" && AR=ar 1540caade7ccSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1541caade7ccSmrgtest -z "$AS" && AS=as 1542caade7ccSmrgtest -z "$CC" && CC=cc 1543caade7ccSmrgtest -z "$LTCC" && LTCC=$CC 1544caade7ccSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1545caade7ccSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1546caade7ccSmrgtest -z "$LD" && LD=ld 1547caade7ccSmrgtest -z "$LN_S" && LN_S="ln -s" 1548caade7ccSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1549caade7ccSmrgtest -z "$NM" && NM=nm 1550caade7ccSmrgtest -z "$SED" && SED=sed 1551caade7ccSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1552caade7ccSmrgtest -z "$RANLIB" && RANLIB=: 1553caade7ccSmrgtest -z "$STRIP" && STRIP=: 1554caade7ccSmrgtest -z "$ac_objext" && ac_objext=o 1555caade7ccSmrg 1556caade7ccSmrg# Determine commands to create old-style static archives. 1557caade7ccSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1558caade7ccSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559caade7ccSmrgold_postuninstall_cmds= 1560caade7ccSmrg 1561caade7ccSmrgif test -n "$RANLIB"; then 1562caade7ccSmrg case $host_os in 1563caade7ccSmrg openbsd*) 1564caade7ccSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1565caade7ccSmrg ;; 1566caade7ccSmrg *) 1567caade7ccSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1568caade7ccSmrg ;; 1569caade7ccSmrg esac 1570caade7ccSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1571caade7ccSmrgfi 1572caade7ccSmrg 1573caade7ccSmrg_LT_CC_BASENAME([$compiler]) 1574caade7ccSmrg 1575caade7ccSmrg# Only perform the check for file, if the check method requires it 1576caade7ccSmrgcase $deplibs_check_method in 1577caade7ccSmrgfile_magic*) 1578caade7ccSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1579caade7ccSmrg AC_PATH_MAGIC 1580caade7ccSmrg fi 1581caade7ccSmrg ;; 1582caade7ccSmrgesac 1583caade7ccSmrg 1584caade7ccSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 1585caade7ccSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1586caade7ccSmrgenable_win32_dll=yes, enable_win32_dll=no) 1587caade7ccSmrg 1588caade7ccSmrgAC_ARG_ENABLE([libtool-lock], 1589caade7ccSmrg [AC_HELP_STRING([--disable-libtool-lock], 1590caade7ccSmrg [avoid locking (might break parallel builds)])]) 1591caade7ccSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1592caade7ccSmrg 1593caade7ccSmrgAC_ARG_WITH([pic], 1594caade7ccSmrg [AC_HELP_STRING([--with-pic], 1595caade7ccSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1596caade7ccSmrg [pic_mode="$withval"], 1597caade7ccSmrg [pic_mode=default]) 1598caade7ccSmrgtest -z "$pic_mode" && pic_mode=default 1599caade7ccSmrg 1600caade7ccSmrg# Use C for the default configuration in the libtool script 1601caade7ccSmrgtagname= 1602caade7ccSmrgAC_LIBTOOL_LANG_C_CONFIG 1603caade7ccSmrg_LT_AC_TAGCONFIG 1604caade7ccSmrg])# AC_LIBTOOL_SETUP 1605caade7ccSmrg 1606caade7ccSmrg 1607caade7ccSmrg# _LT_AC_SYS_COMPILER 1608caade7ccSmrg# ------------------- 1609caade7ccSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 1610caade7ccSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1611caade7ccSmrg 1612caade7ccSmrg# If no C compiler was specified, use CC. 1613caade7ccSmrgLTCC=${LTCC-"$CC"} 1614caade7ccSmrg 1615caade7ccSmrg# If no C compiler flags were specified, use CFLAGS. 1616caade7ccSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1617caade7ccSmrg 1618caade7ccSmrg# Allow CC to be a program name with arguments. 1619caade7ccSmrgcompiler=$CC 1620caade7ccSmrg])# _LT_AC_SYS_COMPILER 1621caade7ccSmrg 1622caade7ccSmrg 1623caade7ccSmrg# _LT_CC_BASENAME(CC) 1624caade7ccSmrg# ------------------- 1625caade7ccSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1626caade7ccSmrgAC_DEFUN([_LT_CC_BASENAME], 1627caade7ccSmrg[for cc_temp in $1""; do 1628caade7ccSmrg case $cc_temp in 1629caade7ccSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1630caade7ccSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1631caade7ccSmrg \-*) ;; 1632caade7ccSmrg *) break;; 1633caade7ccSmrg esac 1634caade7ccSmrgdone 1635caade7ccSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1636caade7ccSmrg]) 1637caade7ccSmrg 1638caade7ccSmrg 1639caade7ccSmrg# _LT_COMPILER_BOILERPLATE 1640caade7ccSmrg# ------------------------ 1641caade7ccSmrg# Check for compiler boilerplate output or warnings with 1642caade7ccSmrg# the simple compiler test code. 1643caade7ccSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 1644caade7ccSmrg[ac_outfile=conftest.$ac_objext 1645caade7ccSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 1646caade7ccSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1647caade7ccSmrg_lt_compiler_boilerplate=`cat conftest.err` 1648caade7ccSmrg$rm conftest* 1649caade7ccSmrg])# _LT_COMPILER_BOILERPLATE 1650caade7ccSmrg 1651caade7ccSmrg 1652caade7ccSmrg# _LT_LINKER_BOILERPLATE 1653caade7ccSmrg# ---------------------- 1654caade7ccSmrg# Check for linker boilerplate output or warnings with 1655caade7ccSmrg# the simple link test code. 1656caade7ccSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 1657caade7ccSmrg[ac_outfile=conftest.$ac_objext 1658caade7ccSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 1659caade7ccSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1660caade7ccSmrg_lt_linker_boilerplate=`cat conftest.err` 1661caade7ccSmrg$rm conftest* 1662caade7ccSmrg])# _LT_LINKER_BOILERPLATE 1663caade7ccSmrg 1664caade7ccSmrg 1665caade7ccSmrg# _LT_AC_SYS_LIBPATH_AIX 1666caade7ccSmrg# ---------------------- 1667caade7ccSmrg# Links a minimal program and checks the executable 1668caade7ccSmrg# for the system default hardcoded library path. In most cases, 1669caade7ccSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1670caade7ccSmrg# the location of the communication and MPI libs are included too. 1671caade7ccSmrg# If we don't find anything, use the default library path according 1672caade7ccSmrg# to the aix ld manual. 1673caade7ccSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 1674caade7ccSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1675caade7ccSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1676caade7ccSmrg}'` 1677caade7ccSmrg# Check for a 64-bit object if we didn't find anything. 1678caade7ccSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1679caade7ccSmrg}'`; fi],[]) 1680caade7ccSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1681caade7ccSmrg])# _LT_AC_SYS_LIBPATH_AIX 1682caade7ccSmrg 1683caade7ccSmrg 1684caade7ccSmrg# _LT_AC_SHELL_INIT(ARG) 1685caade7ccSmrg# ---------------------- 1686caade7ccSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 1687caade7ccSmrg[ifdef([AC_DIVERSION_NOTICE], 1688caade7ccSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1689caade7ccSmrg [AC_DIVERT_PUSH(NOTICE)]) 1690caade7ccSmrg$1 1691caade7ccSmrgAC_DIVERT_POP 1692caade7ccSmrg])# _LT_AC_SHELL_INIT 1693caade7ccSmrg 1694caade7ccSmrg 1695caade7ccSmrg# _LT_AC_PROG_ECHO_BACKSLASH 1696caade7ccSmrg# -------------------------- 1697caade7ccSmrg# Add some code to the start of the generated configure script which 1698caade7ccSmrg# will find an echo command which doesn't interpret backslashes. 1699caade7ccSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 1700caade7ccSmrg[_LT_AC_SHELL_INIT([ 1701caade7ccSmrg# Check that we are running under the correct shell. 1702caade7ccSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1703caade7ccSmrg 1704caade7ccSmrgcase X$ECHO in 1705caade7ccSmrgX*--fallback-echo) 1706caade7ccSmrg # Remove one level of quotation (which was required for Make). 1707caade7ccSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1708caade7ccSmrg ;; 1709caade7ccSmrgesac 1710caade7ccSmrg 1711caade7ccSmrgecho=${ECHO-echo} 1712caade7ccSmrgif test "X[$]1" = X--no-reexec; then 1713caade7ccSmrg # Discard the --no-reexec flag, and continue. 1714caade7ccSmrg shift 1715caade7ccSmrgelif test "X[$]1" = X--fallback-echo; then 1716caade7ccSmrg # Avoid inline document here, it may be left over 1717caade7ccSmrg : 1718caade7ccSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 1719caade7ccSmrg # Yippee, $echo works! 1720caade7ccSmrg : 1721caade7ccSmrgelse 1722caade7ccSmrg # Restart under the correct shell. 1723caade7ccSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1724caade7ccSmrgfi 1725caade7ccSmrg 1726caade7ccSmrgif test "X[$]1" = X--fallback-echo; then 1727caade7ccSmrg # used as fallback echo 1728caade7ccSmrg shift 1729caade7ccSmrg cat <<EOF 1730caade7ccSmrg[$]* 1731caade7ccSmrgEOF 1732caade7ccSmrg exit 0 1733caade7ccSmrgfi 1734caade7ccSmrg 1735caade7ccSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1736caade7ccSmrg# if CDPATH is set. 1737caade7ccSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1738caade7ccSmrg 1739caade7ccSmrgif test -z "$ECHO"; then 1740caade7ccSmrgif test "X${echo_test_string+set}" != Xset; then 1741caade7ccSmrg# find a string as large as possible, as long as the shell can cope with it 1742caade7ccSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1743caade7ccSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1744caade7ccSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 1745caade7ccSmrg echo_test_string=`eval $cmd` && 1746caade7ccSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 1747caade7ccSmrg then 1748caade7ccSmrg break 1749caade7ccSmrg fi 1750caade7ccSmrg done 1751caade7ccSmrgfi 1752caade7ccSmrg 1753caade7ccSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1754caade7ccSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1755caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1756caade7ccSmrg : 1757caade7ccSmrgelse 1758caade7ccSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1759caade7ccSmrg # backslashes. This makes it impossible to quote backslashes using 1760caade7ccSmrg # echo "$something" | sed 's/\\/\\\\/g' 1761caade7ccSmrg # 1762caade7ccSmrg # So, first we look for a working echo in the user's PATH. 1763caade7ccSmrg 1764caade7ccSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1765caade7ccSmrg for dir in $PATH /usr/ucb; do 1766caade7ccSmrg IFS="$lt_save_ifs" 1767caade7ccSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1768caade7ccSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1769caade7ccSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1770caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1771caade7ccSmrg echo="$dir/echo" 1772caade7ccSmrg break 1773caade7ccSmrg fi 1774caade7ccSmrg done 1775caade7ccSmrg IFS="$lt_save_ifs" 1776caade7ccSmrg 1777caade7ccSmrg if test "X$echo" = Xecho; then 1778caade7ccSmrg # We didn't find a better echo, so look for alternatives. 1779caade7ccSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 1780caade7ccSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 1781caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1782caade7ccSmrg # This shell has a builtin print -r that does the trick. 1783caade7ccSmrg echo='print -r' 1784caade7ccSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 1785caade7ccSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1786caade7ccSmrg # If we have ksh, try running configure again with it. 1787caade7ccSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1788caade7ccSmrg export ORIGINAL_CONFIG_SHELL 1789caade7ccSmrg CONFIG_SHELL=/bin/ksh 1790caade7ccSmrg export CONFIG_SHELL 1791caade7ccSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1792caade7ccSmrg else 1793caade7ccSmrg # Try using printf. 1794caade7ccSmrg echo='printf %s\n' 1795caade7ccSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1796caade7ccSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1797caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1798caade7ccSmrg # Cool, printf works 1799caade7ccSmrg : 1800caade7ccSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1801caade7ccSmrg test "X$echo_testing_string" = 'X\t' && 1802caade7ccSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1803caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1804caade7ccSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1805caade7ccSmrg export CONFIG_SHELL 1806caade7ccSmrg SHELL="$CONFIG_SHELL" 1807caade7ccSmrg export SHELL 1808caade7ccSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1809caade7ccSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1810caade7ccSmrg test "X$echo_testing_string" = 'X\t' && 1811caade7ccSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1812caade7ccSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1813caade7ccSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1814caade7ccSmrg else 1815caade7ccSmrg # maybe with a smaller string... 1816caade7ccSmrg prev=: 1817caade7ccSmrg 1818caade7ccSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1819caade7ccSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 1820caade7ccSmrg then 1821caade7ccSmrg break 1822caade7ccSmrg fi 1823caade7ccSmrg prev="$cmd" 1824caade7ccSmrg done 1825caade7ccSmrg 1826caade7ccSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1827caade7ccSmrg echo_test_string=`eval $prev` 1828caade7ccSmrg export echo_test_string 1829caade7ccSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1830caade7ccSmrg else 1831caade7ccSmrg # Oops. We lost completely, so just stick with echo. 1832caade7ccSmrg echo=echo 1833caade7ccSmrg fi 1834caade7ccSmrg fi 1835caade7ccSmrg fi 1836caade7ccSmrg fi 1837caade7ccSmrgfi 1838caade7ccSmrgfi 1839caade7ccSmrg 1840caade7ccSmrg# Copy echo and quote the copy suitably for passing to libtool from 1841caade7ccSmrg# the Makefile, instead of quoting the original, which is used later. 1842caade7ccSmrgECHO=$echo 1843caade7ccSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1844caade7ccSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1845caade7ccSmrgfi 1846caade7ccSmrg 1847caade7ccSmrgAC_SUBST(ECHO) 1848caade7ccSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 1849caade7ccSmrg 1850caade7ccSmrg 1851caade7ccSmrg# _LT_AC_LOCK 1852caade7ccSmrg# ----------- 1853caade7ccSmrgAC_DEFUN([_LT_AC_LOCK], 1854caade7ccSmrg[AC_ARG_ENABLE([libtool-lock], 1855caade7ccSmrg [AC_HELP_STRING([--disable-libtool-lock], 1856caade7ccSmrg [avoid locking (might break parallel builds)])]) 1857caade7ccSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1858caade7ccSmrg 1859caade7ccSmrg# Some flags need to be propagated to the compiler or linker for good 1860caade7ccSmrg# libtool support. 1861caade7ccSmrgcase $host in 1862caade7ccSmrgia64-*-hpux*) 1863caade7ccSmrg # Find out which ABI we are using. 1864caade7ccSmrg echo 'int i;' > conftest.$ac_ext 1865caade7ccSmrg if AC_TRY_EVAL(ac_compile); then 1866caade7ccSmrg case `/usr/bin/file conftest.$ac_objext` in 1867caade7ccSmrg *ELF-32*) 1868caade7ccSmrg HPUX_IA64_MODE="32" 1869caade7ccSmrg ;; 1870caade7ccSmrg *ELF-64*) 1871caade7ccSmrg HPUX_IA64_MODE="64" 1872caade7ccSmrg ;; 1873caade7ccSmrg esac 1874caade7ccSmrg fi 1875caade7ccSmrg rm -rf conftest* 1876caade7ccSmrg ;; 1877caade7ccSmrg*-*-irix6*) 1878caade7ccSmrg # Find out which ABI we are using. 1879caade7ccSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1880caade7ccSmrg if AC_TRY_EVAL(ac_compile); then 1881caade7ccSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1882caade7ccSmrg case `/usr/bin/file conftest.$ac_objext` in 1883caade7ccSmrg *32-bit*) 1884caade7ccSmrg LD="${LD-ld} -melf32bsmip" 1885caade7ccSmrg ;; 1886caade7ccSmrg *N32*) 1887caade7ccSmrg LD="${LD-ld} -melf32bmipn32" 1888caade7ccSmrg ;; 1889caade7ccSmrg *64-bit*) 1890caade7ccSmrg LD="${LD-ld} -melf64bmip" 1891caade7ccSmrg ;; 1892caade7ccSmrg esac 1893caade7ccSmrg else 1894caade7ccSmrg case `/usr/bin/file conftest.$ac_objext` in 1895caade7ccSmrg *32-bit*) 1896caade7ccSmrg LD="${LD-ld} -32" 1897caade7ccSmrg ;; 1898caade7ccSmrg *N32*) 1899caade7ccSmrg LD="${LD-ld} -n32" 1900caade7ccSmrg ;; 1901caade7ccSmrg *64-bit*) 1902caade7ccSmrg LD="${LD-ld} -64" 1903caade7ccSmrg ;; 1904caade7ccSmrg esac 1905caade7ccSmrg fi 1906caade7ccSmrg fi 1907caade7ccSmrg rm -rf conftest* 1908caade7ccSmrg ;; 1909caade7ccSmrg 1910caade7ccSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 1911caade7ccSmrg # Find out which ABI we are using. 1912caade7ccSmrg echo 'int i;' > conftest.$ac_ext 1913caade7ccSmrg if AC_TRY_EVAL(ac_compile); then 1914caade7ccSmrg case `/usr/bin/file conftest.o` in 1915caade7ccSmrg *32-bit*) 1916caade7ccSmrg case $host in 1917caade7ccSmrg x86_64-*linux*) 1918caade7ccSmrg LD="${LD-ld} -m elf_i386" 1919caade7ccSmrg ;; 1920caade7ccSmrg ppc64-*linux*|powerpc64-*linux*) 1921caade7ccSmrg LD="${LD-ld} -m elf32ppclinux" 1922caade7ccSmrg ;; 1923caade7ccSmrg s390x-*linux*) 1924caade7ccSmrg LD="${LD-ld} -m elf_s390" 1925caade7ccSmrg ;; 1926caade7ccSmrg sparc64-*linux*) 1927caade7ccSmrg LD="${LD-ld} -m elf32_sparc" 1928caade7ccSmrg ;; 1929caade7ccSmrg esac 1930caade7ccSmrg ;; 1931caade7ccSmrg *64-bit*) 1932caade7ccSmrg case $host in 1933caade7ccSmrg x86_64-*linux*) 1934caade7ccSmrg LD="${LD-ld} -m elf_x86_64" 1935caade7ccSmrg ;; 1936caade7ccSmrg ppc*-*linux*|powerpc*-*linux*) 1937caade7ccSmrg LD="${LD-ld} -m elf64ppc" 1938caade7ccSmrg ;; 1939caade7ccSmrg s390*-*linux*) 1940caade7ccSmrg LD="${LD-ld} -m elf64_s390" 1941caade7ccSmrg ;; 1942caade7ccSmrg sparc*-*linux*) 1943caade7ccSmrg LD="${LD-ld} -m elf64_sparc" 1944caade7ccSmrg ;; 1945caade7ccSmrg esac 1946caade7ccSmrg ;; 1947caade7ccSmrg esac 1948caade7ccSmrg fi 1949caade7ccSmrg rm -rf conftest* 1950caade7ccSmrg ;; 1951caade7ccSmrg 1952caade7ccSmrg*-*-sco3.2v5*) 1953caade7ccSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1954caade7ccSmrg SAVE_CFLAGS="$CFLAGS" 1955caade7ccSmrg CFLAGS="$CFLAGS -belf" 1956caade7ccSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1957caade7ccSmrg [AC_LANG_PUSH(C) 1958caade7ccSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1959caade7ccSmrg AC_LANG_POP]) 1960caade7ccSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1961caade7ccSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1962caade7ccSmrg CFLAGS="$SAVE_CFLAGS" 1963caade7ccSmrg fi 1964caade7ccSmrg ;; 1965caade7ccSmrgsparc*-*solaris*) 1966caade7ccSmrg # Find out which ABI we are using. 1967caade7ccSmrg echo 'int i;' > conftest.$ac_ext 1968caade7ccSmrg if AC_TRY_EVAL(ac_compile); then 1969caade7ccSmrg case `/usr/bin/file conftest.o` in 1970caade7ccSmrg *64-bit*) 1971caade7ccSmrg case $lt_cv_prog_gnu_ld in 1972caade7ccSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1973caade7ccSmrg *) LD="${LD-ld} -64" ;; 1974caade7ccSmrg esac 1975caade7ccSmrg ;; 1976caade7ccSmrg esac 1977caade7ccSmrg fi 1978caade7ccSmrg rm -rf conftest* 1979caade7ccSmrg ;; 1980caade7ccSmrg 1981caade7ccSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1982caade7ccSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1983caade7ccSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1984caade7ccSmrg AC_CHECK_TOOL(AS, as, false) 1985caade7ccSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1986caade7ccSmrg ;; 1987caade7ccSmrg ]) 1988caade7ccSmrgesac 1989caade7ccSmrg 1990caade7ccSmrgneed_locks="$enable_libtool_lock" 1991caade7ccSmrg 1992caade7ccSmrg])# _LT_AC_LOCK 1993caade7ccSmrg 1994caade7ccSmrg 1995caade7ccSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1996caade7ccSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1997caade7ccSmrg# ---------------------------------------------------------------- 1998caade7ccSmrg# Check whether the given compiler option works 1999caade7ccSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 2000caade7ccSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 2001caade7ccSmrgAC_CACHE_CHECK([$1], [$2], 2002caade7ccSmrg [$2=no 2003caade7ccSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2004caade7ccSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2005caade7ccSmrg lt_compiler_flag="$3" 2006caade7ccSmrg # Insert the option either (1) after the last *FLAGS variable, or 2007caade7ccSmrg # (2) before a word containing "conftest.", or (3) at the end. 2008caade7ccSmrg # Note that $ac_compile itself does not contain backslashes and begins 2009caade7ccSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2010caade7ccSmrg # The option is referenced via a variable to avoid confusing sed. 2011caade7ccSmrg lt_compile=`echo "$ac_compile" | $SED \ 2012caade7ccSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2013caade7ccSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2014caade7ccSmrg -e 's:$: $lt_compiler_flag:'` 2015caade7ccSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2016caade7ccSmrg (eval "$lt_compile" 2>conftest.err) 2017caade7ccSmrg ac_status=$? 2018caade7ccSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2019caade7ccSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2020caade7ccSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 2021caade7ccSmrg # The compiler can only warn and ignore the option if not recognized 2022caade7ccSmrg # So say no if there are warnings other than the usual output. 2023caade7ccSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 2024caade7ccSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2025caade7ccSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2026caade7ccSmrg $2=yes 2027caade7ccSmrg fi 2028caade7ccSmrg fi 2029caade7ccSmrg $rm conftest* 2030caade7ccSmrg]) 2031caade7ccSmrg 2032caade7ccSmrgif test x"[$]$2" = xyes; then 2033caade7ccSmrg ifelse([$5], , :, [$5]) 2034caade7ccSmrgelse 2035caade7ccSmrg ifelse([$6], , :, [$6]) 2036caade7ccSmrgfi 2037caade7ccSmrg])# AC_LIBTOOL_COMPILER_OPTION 2038caade7ccSmrg 2039caade7ccSmrg 2040caade7ccSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2041caade7ccSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2042caade7ccSmrg# ------------------------------------------------------------ 2043caade7ccSmrg# Check whether the given compiler option works 2044caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 2045caade7ccSmrg[AC_CACHE_CHECK([$1], [$2], 2046caade7ccSmrg [$2=no 2047caade7ccSmrg save_LDFLAGS="$LDFLAGS" 2048caade7ccSmrg LDFLAGS="$LDFLAGS $3" 2049caade7ccSmrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 2050caade7ccSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2051caade7ccSmrg # The linker can only warn and ignore the option if not recognized 2052caade7ccSmrg # So say no if there are warnings 2053caade7ccSmrg if test -s conftest.err; then 2054caade7ccSmrg # Append any errors to the config.log. 2055caade7ccSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2056caade7ccSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 2057caade7ccSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2058caade7ccSmrg if diff conftest.exp conftest.er2 >/dev/null; then 2059caade7ccSmrg $2=yes 2060caade7ccSmrg fi 2061caade7ccSmrg else 2062caade7ccSmrg $2=yes 2063caade7ccSmrg fi 2064caade7ccSmrg fi 2065caade7ccSmrg $rm conftest* 2066caade7ccSmrg LDFLAGS="$save_LDFLAGS" 2067caade7ccSmrg]) 2068caade7ccSmrg 2069caade7ccSmrgif test x"[$]$2" = xyes; then 2070caade7ccSmrg ifelse([$4], , :, [$4]) 2071caade7ccSmrgelse 2072caade7ccSmrg ifelse([$5], , :, [$5]) 2073caade7ccSmrgfi 2074caade7ccSmrg])# AC_LIBTOOL_LINKER_OPTION 2075caade7ccSmrg 2076caade7ccSmrg 2077caade7ccSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 2078caade7ccSmrg# -------------------------- 2079caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 2080caade7ccSmrg[# find the maximum length of command line arguments 2081caade7ccSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2082caade7ccSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2083caade7ccSmrg i=0 2084caade7ccSmrg teststring="ABCD" 2085caade7ccSmrg 2086caade7ccSmrg case $build_os in 2087caade7ccSmrg msdosdjgpp*) 2088caade7ccSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2089caade7ccSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2090caade7ccSmrg # during glob expansion). Even if it were fixed, the result of this 2091caade7ccSmrg # check would be larger than it should be. 2092caade7ccSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2093caade7ccSmrg ;; 2094caade7ccSmrg 2095caade7ccSmrg gnu*) 2096caade7ccSmrg # Under GNU Hurd, this test is not required because there is 2097caade7ccSmrg # no limit to the length of command line arguments. 2098caade7ccSmrg # Libtool will interpret -1 as no limit whatsoever 2099caade7ccSmrg lt_cv_sys_max_cmd_len=-1; 2100caade7ccSmrg ;; 2101caade7ccSmrg 2102caade7ccSmrg cygwin* | mingw*) 2103caade7ccSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2104caade7ccSmrg # about 5 minutes as the teststring grows exponentially. 2105caade7ccSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 2106caade7ccSmrg # you end up with a "frozen" computer, even though with patience 2107caade7ccSmrg # the test eventually succeeds (with a max line length of 256k). 2108caade7ccSmrg # Instead, let's just punt: use the minimum linelength reported by 2109caade7ccSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 2110caade7ccSmrg lt_cv_sys_max_cmd_len=8192; 2111caade7ccSmrg ;; 2112caade7ccSmrg 2113caade7ccSmrg amigaos*) 2114caade7ccSmrg # On AmigaOS with pdksh, this test takes hours, literally. 2115caade7ccSmrg # So we just punt and use a minimum line length of 8192. 2116caade7ccSmrg lt_cv_sys_max_cmd_len=8192; 2117caade7ccSmrg ;; 2118caade7ccSmrg 2119caade7ccSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2120caade7ccSmrg # This has been around since 386BSD, at least. Likely further. 2121caade7ccSmrg if test -x /sbin/sysctl; then 2122caade7ccSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2123caade7ccSmrg elif test -x /usr/sbin/sysctl; then 2124caade7ccSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2125caade7ccSmrg else 2126caade7ccSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2127caade7ccSmrg fi 2128caade7ccSmrg # And add a safety zone 2129caade7ccSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2130caade7ccSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2131caade7ccSmrg ;; 2132caade7ccSmrg 2133caade7ccSmrg interix*) 2134caade7ccSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2135caade7ccSmrg lt_cv_sys_max_cmd_len=196608 2136caade7ccSmrg ;; 2137caade7ccSmrg 2138caade7ccSmrg osf*) 2139caade7ccSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2140caade7ccSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2141caade7ccSmrg # nice to cause kernel panics so lets avoid the loop below. 2142caade7ccSmrg # First set a reasonable default. 2143caade7ccSmrg lt_cv_sys_max_cmd_len=16384 2144caade7ccSmrg # 2145caade7ccSmrg if test -x /sbin/sysconfig; then 2146caade7ccSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2147caade7ccSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 2148caade7ccSmrg esac 2149caade7ccSmrg fi 2150caade7ccSmrg ;; 2151caade7ccSmrg sco3.2v5*) 2152caade7ccSmrg lt_cv_sys_max_cmd_len=102400 2153caade7ccSmrg ;; 2154caade7ccSmrg sysv5* | sco5v6* | sysv4.2uw2*) 2155caade7ccSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2156caade7ccSmrg if test -n "$kargmax"; then 2157caade7ccSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2158caade7ccSmrg else 2159caade7ccSmrg lt_cv_sys_max_cmd_len=32768 2160caade7ccSmrg fi 2161caade7ccSmrg ;; 2162caade7ccSmrg *) 2163caade7ccSmrg # If test is not a shell built-in, we'll probably end up computing a 2164caade7ccSmrg # maximum length that is only half of the actual maximum length, but 2165caade7ccSmrg # we can't tell. 2166caade7ccSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2167caade7ccSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 2168caade7ccSmrg = "XX$teststring") >/dev/null 2>&1 && 2169caade7ccSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 2170caade7ccSmrg lt_cv_sys_max_cmd_len=$new_result && 2171caade7ccSmrg test $i != 17 # 1/2 MB should be enough 2172caade7ccSmrg do 2173caade7ccSmrg i=`expr $i + 1` 2174caade7ccSmrg teststring=$teststring$teststring 2175caade7ccSmrg done 2176caade7ccSmrg teststring= 2177caade7ccSmrg # Add a significant safety factor because C++ compilers can tack on massive 2178caade7ccSmrg # amounts of additional arguments before passing them to the linker. 2179caade7ccSmrg # It appears as though 1/2 is a usable value. 2180caade7ccSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2181caade7ccSmrg ;; 2182caade7ccSmrg esac 2183caade7ccSmrg]) 2184caade7ccSmrgif test -n $lt_cv_sys_max_cmd_len ; then 2185caade7ccSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2186caade7ccSmrgelse 2187caade7ccSmrg AC_MSG_RESULT(none) 2188caade7ccSmrgfi 2189caade7ccSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 2190caade7ccSmrg 2191caade7ccSmrg 2192caade7ccSmrg# _LT_AC_CHECK_DLFCN 2193caade7ccSmrg# ------------------ 2194caade7ccSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 2195caade7ccSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 2196caade7ccSmrg])# _LT_AC_CHECK_DLFCN 2197caade7ccSmrg 2198caade7ccSmrg 2199caade7ccSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2200caade7ccSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2201caade7ccSmrg# --------------------------------------------------------------------- 2202caade7ccSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 2203caade7ccSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2204caade7ccSmrgif test "$cross_compiling" = yes; then : 2205caade7ccSmrg [$4] 2206caade7ccSmrgelse 2207caade7ccSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2208caade7ccSmrg lt_status=$lt_dlunknown 2209caade7ccSmrg cat > conftest.$ac_ext <<EOF 2210caade7ccSmrg[#line __oline__ "configure" 2211caade7ccSmrg#include "confdefs.h" 2212caade7ccSmrg 2213caade7ccSmrg#if HAVE_DLFCN_H 2214caade7ccSmrg#include <dlfcn.h> 2215caade7ccSmrg#endif 2216caade7ccSmrg 2217caade7ccSmrg#include <stdio.h> 2218caade7ccSmrg 2219caade7ccSmrg#ifdef RTLD_GLOBAL 2220caade7ccSmrg# define LT_DLGLOBAL RTLD_GLOBAL 2221caade7ccSmrg#else 2222caade7ccSmrg# ifdef DL_GLOBAL 2223caade7ccSmrg# define LT_DLGLOBAL DL_GLOBAL 2224caade7ccSmrg# else 2225caade7ccSmrg# define LT_DLGLOBAL 0 2226caade7ccSmrg# endif 2227caade7ccSmrg#endif 2228caade7ccSmrg 2229caade7ccSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2230caade7ccSmrg find out it does not work in some platform. */ 2231caade7ccSmrg#ifndef LT_DLLAZY_OR_NOW 2232caade7ccSmrg# ifdef RTLD_LAZY 2233caade7ccSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2234caade7ccSmrg# else 2235caade7ccSmrg# ifdef DL_LAZY 2236caade7ccSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 2237caade7ccSmrg# else 2238caade7ccSmrg# ifdef RTLD_NOW 2239caade7ccSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2240caade7ccSmrg# else 2241caade7ccSmrg# ifdef DL_NOW 2242caade7ccSmrg# define LT_DLLAZY_OR_NOW DL_NOW 2243caade7ccSmrg# else 2244caade7ccSmrg# define LT_DLLAZY_OR_NOW 0 2245caade7ccSmrg# endif 2246caade7ccSmrg# endif 2247caade7ccSmrg# endif 2248caade7ccSmrg# endif 2249caade7ccSmrg#endif 2250caade7ccSmrg 2251caade7ccSmrg#ifdef __cplusplus 2252caade7ccSmrgextern "C" void exit (int); 2253caade7ccSmrg#endif 2254caade7ccSmrg 2255caade7ccSmrgvoid fnord() { int i=42;} 2256caade7ccSmrgint main () 2257caade7ccSmrg{ 2258caade7ccSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2259caade7ccSmrg int status = $lt_dlunknown; 2260caade7ccSmrg 2261caade7ccSmrg if (self) 2262caade7ccSmrg { 2263caade7ccSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2264caade7ccSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2265caade7ccSmrg /* dlclose (self); */ 2266caade7ccSmrg } 2267caade7ccSmrg else 2268caade7ccSmrg puts (dlerror ()); 2269caade7ccSmrg 2270caade7ccSmrg exit (status); 2271caade7ccSmrg}] 2272caade7ccSmrgEOF 2273caade7ccSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2274caade7ccSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2275caade7ccSmrg lt_status=$? 2276caade7ccSmrg case x$lt_status in 2277caade7ccSmrg x$lt_dlno_uscore) $1 ;; 2278caade7ccSmrg x$lt_dlneed_uscore) $2 ;; 2279caade7ccSmrg x$lt_dlunknown|x*) $3 ;; 2280caade7ccSmrg esac 2281caade7ccSmrg else : 2282caade7ccSmrg # compilation failed 2283caade7ccSmrg $3 2284caade7ccSmrg fi 2285caade7ccSmrgfi 2286caade7ccSmrgrm -fr conftest* 2287caade7ccSmrg])# _LT_AC_TRY_DLOPEN_SELF 2288caade7ccSmrg 2289caade7ccSmrg 2290caade7ccSmrg# AC_LIBTOOL_DLOPEN_SELF 2291caade7ccSmrg# ---------------------- 2292caade7ccSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 2293caade7ccSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2294caade7ccSmrgif test "x$enable_dlopen" != xyes; then 2295caade7ccSmrg enable_dlopen=unknown 2296caade7ccSmrg enable_dlopen_self=unknown 2297caade7ccSmrg enable_dlopen_self_static=unknown 2298caade7ccSmrgelse 2299caade7ccSmrg lt_cv_dlopen=no 2300caade7ccSmrg lt_cv_dlopen_libs= 2301caade7ccSmrg 2302caade7ccSmrg case $host_os in 2303caade7ccSmrg beos*) 2304caade7ccSmrg lt_cv_dlopen="load_add_on" 2305caade7ccSmrg lt_cv_dlopen_libs= 2306caade7ccSmrg lt_cv_dlopen_self=yes 2307caade7ccSmrg ;; 2308caade7ccSmrg 2309caade7ccSmrg mingw* | pw32*) 2310caade7ccSmrg lt_cv_dlopen="LoadLibrary" 2311caade7ccSmrg lt_cv_dlopen_libs= 2312caade7ccSmrg ;; 2313caade7ccSmrg 2314caade7ccSmrg cygwin*) 2315caade7ccSmrg lt_cv_dlopen="dlopen" 2316caade7ccSmrg lt_cv_dlopen_libs= 2317caade7ccSmrg ;; 2318caade7ccSmrg 2319caade7ccSmrg darwin*) 2320caade7ccSmrg # if libdl is installed we need to link against it 2321caade7ccSmrg AC_CHECK_LIB([dl], [dlopen], 2322caade7ccSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2323caade7ccSmrg lt_cv_dlopen="dyld" 2324caade7ccSmrg lt_cv_dlopen_libs= 2325caade7ccSmrg lt_cv_dlopen_self=yes 2326caade7ccSmrg ]) 2327caade7ccSmrg ;; 2328caade7ccSmrg 2329caade7ccSmrg *) 2330caade7ccSmrg AC_CHECK_FUNC([shl_load], 2331caade7ccSmrg [lt_cv_dlopen="shl_load"], 2332caade7ccSmrg [AC_CHECK_LIB([dld], [shl_load], 2333caade7ccSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 2334caade7ccSmrg [AC_CHECK_FUNC([dlopen], 2335caade7ccSmrg [lt_cv_dlopen="dlopen"], 2336caade7ccSmrg [AC_CHECK_LIB([dl], [dlopen], 2337caade7ccSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2338caade7ccSmrg [AC_CHECK_LIB([svld], [dlopen], 2339caade7ccSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2340caade7ccSmrg [AC_CHECK_LIB([dld], [dld_link], 2341caade7ccSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 2342caade7ccSmrg ]) 2343caade7ccSmrg ]) 2344caade7ccSmrg ]) 2345caade7ccSmrg ]) 2346caade7ccSmrg ]) 2347caade7ccSmrg ;; 2348caade7ccSmrg esac 2349caade7ccSmrg 2350caade7ccSmrg if test "x$lt_cv_dlopen" != xno; then 2351caade7ccSmrg enable_dlopen=yes 2352caade7ccSmrg else 2353caade7ccSmrg enable_dlopen=no 2354caade7ccSmrg fi 2355caade7ccSmrg 2356caade7ccSmrg case $lt_cv_dlopen in 2357caade7ccSmrg dlopen) 2358caade7ccSmrg save_CPPFLAGS="$CPPFLAGS" 2359caade7ccSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2360caade7ccSmrg 2361caade7ccSmrg save_LDFLAGS="$LDFLAGS" 2362caade7ccSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2363caade7ccSmrg 2364caade7ccSmrg save_LIBS="$LIBS" 2365caade7ccSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2366caade7ccSmrg 2367caade7ccSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2368caade7ccSmrg lt_cv_dlopen_self, [dnl 2369caade7ccSmrg _LT_AC_TRY_DLOPEN_SELF( 2370caade7ccSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2371caade7ccSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2372caade7ccSmrg ]) 2373caade7ccSmrg 2374caade7ccSmrg if test "x$lt_cv_dlopen_self" = xyes; then 2375caade7ccSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2376caade7ccSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2377caade7ccSmrg lt_cv_dlopen_self_static, [dnl 2378caade7ccSmrg _LT_AC_TRY_DLOPEN_SELF( 2379caade7ccSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2380caade7ccSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2381caade7ccSmrg ]) 2382caade7ccSmrg fi 2383caade7ccSmrg 2384caade7ccSmrg CPPFLAGS="$save_CPPFLAGS" 2385caade7ccSmrg LDFLAGS="$save_LDFLAGS" 2386caade7ccSmrg LIBS="$save_LIBS" 2387caade7ccSmrg ;; 2388caade7ccSmrg esac 2389caade7ccSmrg 2390caade7ccSmrg case $lt_cv_dlopen_self in 2391caade7ccSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2392caade7ccSmrg *) enable_dlopen_self=unknown ;; 2393caade7ccSmrg esac 2394caade7ccSmrg 2395caade7ccSmrg case $lt_cv_dlopen_self_static in 2396caade7ccSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2397caade7ccSmrg *) enable_dlopen_self_static=unknown ;; 2398caade7ccSmrg esac 2399caade7ccSmrgfi 2400caade7ccSmrg])# AC_LIBTOOL_DLOPEN_SELF 2401caade7ccSmrg 2402caade7ccSmrg 2403caade7ccSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 2404caade7ccSmrg# --------------------------------- 2405caade7ccSmrg# Check to see if options -c and -o are simultaneously supported by compiler 2406caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 2407caade7ccSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 2408caade7ccSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2409caade7ccSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2410caade7ccSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2411caade7ccSmrg $rm -r conftest 2>/dev/null 2412caade7ccSmrg mkdir conftest 2413caade7ccSmrg cd conftest 2414caade7ccSmrg mkdir out 2415caade7ccSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2416caade7ccSmrg 2417caade7ccSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2418caade7ccSmrg # Insert the option either (1) after the last *FLAGS variable, or 2419caade7ccSmrg # (2) before a word containing "conftest.", or (3) at the end. 2420caade7ccSmrg # Note that $ac_compile itself does not contain backslashes and begins 2421caade7ccSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2422caade7ccSmrg lt_compile=`echo "$ac_compile" | $SED \ 2423caade7ccSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2424caade7ccSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2425caade7ccSmrg -e 's:$: $lt_compiler_flag:'` 2426caade7ccSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2427caade7ccSmrg (eval "$lt_compile" 2>out/conftest.err) 2428caade7ccSmrg ac_status=$? 2429caade7ccSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2430caade7ccSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2431caade7ccSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2432caade7ccSmrg then 2433caade7ccSmrg # The compiler can only warn and ignore the option if not recognized 2434caade7ccSmrg # So say no if there are warnings 2435caade7ccSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 2436caade7ccSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2437caade7ccSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2438caade7ccSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2439caade7ccSmrg fi 2440caade7ccSmrg fi 2441caade7ccSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2442caade7ccSmrg $rm conftest* 2443caade7ccSmrg # SGI C++ compiler will create directory out/ii_files/ for 2444caade7ccSmrg # template instantiation 2445caade7ccSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 2446caade7ccSmrg $rm out/* && rmdir out 2447caade7ccSmrg cd .. 2448caade7ccSmrg rmdir conftest 2449caade7ccSmrg $rm conftest* 2450caade7ccSmrg]) 2451caade7ccSmrg])# AC_LIBTOOL_PROG_CC_C_O 2452caade7ccSmrg 2453caade7ccSmrg 2454caade7ccSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 2455caade7ccSmrg# ----------------------------------------- 2456caade7ccSmrg# Check to see if we can do hard links to lock some files if needed 2457caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 2458caade7ccSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 2459caade7ccSmrg 2460caade7ccSmrghard_links="nottested" 2461caade7ccSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2462caade7ccSmrg # do not overwrite the value of need_locks provided by the user 2463caade7ccSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2464caade7ccSmrg hard_links=yes 2465caade7ccSmrg $rm conftest* 2466caade7ccSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2467caade7ccSmrg touch conftest.a 2468caade7ccSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2469caade7ccSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2470caade7ccSmrg AC_MSG_RESULT([$hard_links]) 2471caade7ccSmrg if test "$hard_links" = no; then 2472caade7ccSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2473caade7ccSmrg need_locks=warn 2474caade7ccSmrg fi 2475caade7ccSmrgelse 2476caade7ccSmrg need_locks=no 2477caade7ccSmrgfi 2478caade7ccSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 2479caade7ccSmrg 2480caade7ccSmrg 2481caade7ccSmrg# AC_LIBTOOL_OBJDIR 2482caade7ccSmrg# ----------------- 2483caade7ccSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 2484caade7ccSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2485caade7ccSmrg[rm -f .libs 2>/dev/null 2486caade7ccSmrgmkdir .libs 2>/dev/null 2487caade7ccSmrgif test -d .libs; then 2488caade7ccSmrg lt_cv_objdir=.libs 2489caade7ccSmrgelse 2490caade7ccSmrg # MS-DOS does not allow filenames that begin with a dot. 2491caade7ccSmrg lt_cv_objdir=_libs 2492caade7ccSmrgfi 2493caade7ccSmrgrmdir .libs 2>/dev/null]) 2494caade7ccSmrgobjdir=$lt_cv_objdir 2495caade7ccSmrg])# AC_LIBTOOL_OBJDIR 2496caade7ccSmrg 2497caade7ccSmrg 2498caade7ccSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 2499caade7ccSmrg# ---------------------------------------------- 2500caade7ccSmrg# Check hardcoding attributes. 2501caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 2502caade7ccSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2503caade7ccSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 2504caade7ccSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 2505caade7ccSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 2506caade7ccSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2507caade7ccSmrg 2508caade7ccSmrg # We can hardcode non-existant directories. 2509caade7ccSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 2510caade7ccSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2511caade7ccSmrg # have to relink, otherwise we might link with an installed library 2512caade7ccSmrg # when we should be linking with a yet-to-be-installed one 2513caade7ccSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2514caade7ccSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 2515caade7ccSmrg # Linking always hardcodes the temporary library directory. 2516caade7ccSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 2517caade7ccSmrg else 2518caade7ccSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2519caade7ccSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 2520caade7ccSmrg fi 2521caade7ccSmrgelse 2522caade7ccSmrg # We cannot hardcode anything, or else we can only hardcode existing 2523caade7ccSmrg # directories. 2524caade7ccSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 2525caade7ccSmrgfi 2526caade7ccSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 2527caade7ccSmrg 2528caade7ccSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 2529caade7ccSmrg # Fast installation is not supported 2530caade7ccSmrg enable_fast_install=no 2531caade7ccSmrgelif test "$shlibpath_overrides_runpath" = yes || 2532caade7ccSmrg test "$enable_shared" = no; then 2533caade7ccSmrg # Fast installation is not necessary 2534caade7ccSmrg enable_fast_install=needless 2535caade7ccSmrgfi 2536caade7ccSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2537caade7ccSmrg 2538caade7ccSmrg 2539caade7ccSmrg# AC_LIBTOOL_SYS_LIB_STRIP 2540caade7ccSmrg# ------------------------ 2541caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 2542caade7ccSmrg[striplib= 2543caade7ccSmrgold_striplib= 2544caade7ccSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2545caade7ccSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2546caade7ccSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2547caade7ccSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2548caade7ccSmrg AC_MSG_RESULT([yes]) 2549caade7ccSmrgelse 2550caade7ccSmrg# FIXME - insert some real tests, host_os isn't really good enough 2551caade7ccSmrg case $host_os in 2552caade7ccSmrg darwin*) 2553caade7ccSmrg if test -n "$STRIP" ; then 2554caade7ccSmrg striplib="$STRIP -x" 2555caade7ccSmrg AC_MSG_RESULT([yes]) 2556caade7ccSmrg else 2557caade7ccSmrg AC_MSG_RESULT([no]) 2558caade7ccSmrgfi 2559caade7ccSmrg ;; 2560caade7ccSmrg *) 2561caade7ccSmrg AC_MSG_RESULT([no]) 2562caade7ccSmrg ;; 2563caade7ccSmrg esac 2564caade7ccSmrgfi 2565caade7ccSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 2566caade7ccSmrg 2567caade7ccSmrg 2568caade7ccSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2569caade7ccSmrg# ----------------------------- 2570caade7ccSmrg# PORTME Fill in your ld.so characteristics 2571caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 2572caade7ccSmrg[AC_MSG_CHECKING([dynamic linker characteristics]) 2573caade7ccSmrglibrary_names_spec= 2574caade7ccSmrglibname_spec='lib$name' 2575caade7ccSmrgsoname_spec= 2576caade7ccSmrgshrext_cmds=".so" 2577caade7ccSmrgpostinstall_cmds= 2578caade7ccSmrgpostuninstall_cmds= 2579caade7ccSmrgfinish_cmds= 2580caade7ccSmrgfinish_eval= 2581caade7ccSmrgshlibpath_var= 2582caade7ccSmrgshlibpath_overrides_runpath=unknown 2583caade7ccSmrgversion_type=none 2584caade7ccSmrgdynamic_linker="$host_os ld.so" 2585caade7ccSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2586caade7ccSmrgif test "$GCC" = yes; then 2587caade7ccSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2588caade7ccSmrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 2589caade7ccSmrg # if the path contains ";" then we assume it to be the separator 2590caade7ccSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2591caade7ccSmrg # assumed that no part of a normal pathname contains ";" but that should 2592caade7ccSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2593caade7ccSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2594caade7ccSmrg else 2595caade7ccSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2596caade7ccSmrg fi 2597caade7ccSmrgelse 2598caade7ccSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2599caade7ccSmrgfi 2600caade7ccSmrgneed_lib_prefix=unknown 2601caade7ccSmrghardcode_into_libs=no 2602caade7ccSmrg 2603caade7ccSmrg# when you set need_version to no, make sure it does not cause -set_version 2604caade7ccSmrg# flags to be left without arguments 2605caade7ccSmrgneed_version=unknown 2606caade7ccSmrg 2607caade7ccSmrgcase $host_os in 2608caade7ccSmrgaix3*) 2609caade7ccSmrg version_type=linux 2610caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2611caade7ccSmrg shlibpath_var=LIBPATH 2612caade7ccSmrg 2613caade7ccSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2614caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2615caade7ccSmrg ;; 2616caade7ccSmrg 2617caade7ccSmrgaix4* | aix5*) 2618caade7ccSmrg version_type=linux 2619caade7ccSmrg need_lib_prefix=no 2620caade7ccSmrg need_version=no 2621caade7ccSmrg hardcode_into_libs=yes 2622caade7ccSmrg if test "$host_cpu" = ia64; then 2623caade7ccSmrg # AIX 5 supports IA64 2624caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2625caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2626caade7ccSmrg else 2627caade7ccSmrg # With GCC up to 2.95.x, collect2 would create an import file 2628caade7ccSmrg # for dependence libraries. The import file would start with 2629caade7ccSmrg # the line `#! .'. This would cause the generated library to 2630caade7ccSmrg # depend on `.', always an invalid library. This was fixed in 2631caade7ccSmrg # development snapshots of GCC prior to 3.0. 2632caade7ccSmrg case $host_os in 2633caade7ccSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2634caade7ccSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2635caade7ccSmrg echo ' yes ' 2636caade7ccSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2637caade7ccSmrg : 2638caade7ccSmrg else 2639caade7ccSmrg can_build_shared=no 2640caade7ccSmrg fi 2641caade7ccSmrg ;; 2642caade7ccSmrg esac 2643caade7ccSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2644caade7ccSmrg # soname into executable. Probably we can add versioning support to 2645caade7ccSmrg # collect2, so additional links can be useful in future. 2646caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 2647caade7ccSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2648caade7ccSmrg # instead of lib<name>.a to let people know that these are not 2649caade7ccSmrg # typical AIX shared libraries. 2650caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2651caade7ccSmrg else 2652caade7ccSmrg # We preserve .a as extension for shared libraries through AIX4.2 2653caade7ccSmrg # and later when we are not doing run time linking. 2654caade7ccSmrg library_names_spec='${libname}${release}.a $libname.a' 2655caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2656caade7ccSmrg fi 2657caade7ccSmrg shlibpath_var=LIBPATH 2658caade7ccSmrg fi 2659caade7ccSmrg ;; 2660caade7ccSmrg 2661caade7ccSmrgamigaos*) 2662caade7ccSmrg library_names_spec='$libname.ixlibrary $libname.a' 2663caade7ccSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2664caade7ccSmrg 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' 2665caade7ccSmrg ;; 2666caade7ccSmrg 2667caade7ccSmrgbeos*) 2668caade7ccSmrg library_names_spec='${libname}${shared_ext}' 2669caade7ccSmrg dynamic_linker="$host_os ld.so" 2670caade7ccSmrg shlibpath_var=LIBRARY_PATH 2671caade7ccSmrg ;; 2672caade7ccSmrg 2673caade7ccSmrgbsdi[[45]]*) 2674caade7ccSmrg version_type=linux 2675caade7ccSmrg need_version=no 2676caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2677caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2678caade7ccSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2679caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2680caade7ccSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2681caade7ccSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2682caade7ccSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2683caade7ccSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2684caade7ccSmrg # libtool to hard-code these into programs 2685caade7ccSmrg ;; 2686caade7ccSmrg 2687caade7ccSmrgcygwin* | mingw* | pw32*) 2688caade7ccSmrg version_type=windows 2689caade7ccSmrg shrext_cmds=".dll" 2690caade7ccSmrg need_version=no 2691caade7ccSmrg need_lib_prefix=no 2692caade7ccSmrg 2693caade7ccSmrg case $GCC,$host_os in 2694caade7ccSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 2695caade7ccSmrg library_names_spec='$libname.dll.a' 2696caade7ccSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2697caade7ccSmrg postinstall_cmds='base_file=`basename \${file}`~ 2698caade7ccSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 2699caade7ccSmrg dldir=$destdir/`dirname \$dlpath`~ 2700caade7ccSmrg test -d \$dldir || mkdir -p \$dldir~ 2701caade7ccSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2702caade7ccSmrg chmod a+x \$dldir/$dlname' 2703caade7ccSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2704caade7ccSmrg dlpath=$dir/\$dldll~ 2705caade7ccSmrg $rm \$dlpath' 2706caade7ccSmrg shlibpath_overrides_runpath=yes 2707caade7ccSmrg 2708caade7ccSmrg case $host_os in 2709caade7ccSmrg cygwin*) 2710caade7ccSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2711caade7ccSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2712caade7ccSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2713caade7ccSmrg ;; 2714caade7ccSmrg mingw*) 2715caade7ccSmrg # MinGW DLLs use traditional 'lib' prefix 2716caade7ccSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2717caade7ccSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2718caade7ccSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 2719caade7ccSmrg # It is most probably a Windows format PATH printed by 2720caade7ccSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2721caade7ccSmrg # path with ; separators, and with drive letters. We can handle the 2722caade7ccSmrg # drive letters (cygwin fileutils understands them), so leave them, 2723caade7ccSmrg # especially as we might pass files found there to a mingw objdump, 2724caade7ccSmrg # which wouldn't understand a cygwinified path. Ahh. 2725caade7ccSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2726caade7ccSmrg else 2727caade7ccSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2728caade7ccSmrg fi 2729caade7ccSmrg ;; 2730caade7ccSmrg pw32*) 2731caade7ccSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2732caade7ccSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2733caade7ccSmrg ;; 2734caade7ccSmrg esac 2735caade7ccSmrg ;; 2736caade7ccSmrg 2737caade7ccSmrg *) 2738caade7ccSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2739caade7ccSmrg ;; 2740caade7ccSmrg esac 2741caade7ccSmrg dynamic_linker='Win32 ld.exe' 2742caade7ccSmrg # FIXME: first we should search . and the directory the executable is in 2743caade7ccSmrg shlibpath_var=PATH 2744caade7ccSmrg ;; 2745caade7ccSmrg 2746caade7ccSmrgdarwin* | rhapsody*) 2747caade7ccSmrg dynamic_linker="$host_os dyld" 2748caade7ccSmrg version_type=darwin 2749caade7ccSmrg need_lib_prefix=no 2750caade7ccSmrg need_version=no 2751caade7ccSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2752caade7ccSmrg soname_spec='${libname}${release}${major}$shared_ext' 2753caade7ccSmrg shlibpath_overrides_runpath=yes 2754caade7ccSmrg shlibpath_var=DYLD_LIBRARY_PATH 2755caade7ccSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2756caade7ccSmrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 2757caade7ccSmrg if test "$GCC" = yes; then 2758caade7ccSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 2759caade7ccSmrg else 2760caade7ccSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 2761caade7ccSmrg fi 2762caade7ccSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2763caade7ccSmrg ;; 2764caade7ccSmrg 2765caade7ccSmrgdgux*) 2766caade7ccSmrg version_type=linux 2767caade7ccSmrg need_lib_prefix=no 2768caade7ccSmrg need_version=no 2769caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2770caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2771caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2772caade7ccSmrg ;; 2773caade7ccSmrg 2774caade7ccSmrgfreebsd1*) 2775caade7ccSmrg dynamic_linker=no 2776caade7ccSmrg ;; 2777caade7ccSmrg 2778caade7ccSmrgkfreebsd*-gnu) 2779caade7ccSmrg version_type=linux 2780caade7ccSmrg need_lib_prefix=no 2781caade7ccSmrg need_version=no 2782caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2783caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2784caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2785caade7ccSmrg shlibpath_overrides_runpath=no 2786caade7ccSmrg hardcode_into_libs=yes 2787caade7ccSmrg dynamic_linker='GNU ld.so' 2788caade7ccSmrg ;; 2789caade7ccSmrg 2790caade7ccSmrgfreebsd* | dragonfly*) 2791caade7ccSmrg # DragonFly does not have aout. When/if they implement a new 2792caade7ccSmrg # versioning mechanism, adjust this. 2793caade7ccSmrg if test -x /usr/bin/objformat; then 2794caade7ccSmrg objformat=`/usr/bin/objformat` 2795caade7ccSmrg else 2796caade7ccSmrg case $host_os in 2797caade7ccSmrg freebsd[[123]]*) objformat=aout ;; 2798caade7ccSmrg *) objformat=elf ;; 2799caade7ccSmrg esac 2800caade7ccSmrg fi 2801caade7ccSmrg version_type=freebsd-$objformat 2802caade7ccSmrg case $version_type in 2803caade7ccSmrg freebsd-elf*) 2804caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2805caade7ccSmrg need_version=no 2806caade7ccSmrg need_lib_prefix=no 2807caade7ccSmrg ;; 2808caade7ccSmrg freebsd-*) 2809caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2810caade7ccSmrg need_version=yes 2811caade7ccSmrg ;; 2812caade7ccSmrg esac 2813caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2814caade7ccSmrg case $host_os in 2815caade7ccSmrg freebsd2*) 2816caade7ccSmrg shlibpath_overrides_runpath=yes 2817caade7ccSmrg ;; 2818caade7ccSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2819caade7ccSmrg shlibpath_overrides_runpath=yes 2820caade7ccSmrg hardcode_into_libs=yes 2821caade7ccSmrg ;; 2822caade7ccSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2823caade7ccSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2824caade7ccSmrg shlibpath_overrides_runpath=no 2825caade7ccSmrg hardcode_into_libs=yes 2826caade7ccSmrg ;; 2827caade7ccSmrg freebsd*) # from 4.6 on 2828caade7ccSmrg shlibpath_overrides_runpath=yes 2829caade7ccSmrg hardcode_into_libs=yes 2830caade7ccSmrg ;; 2831caade7ccSmrg esac 2832caade7ccSmrg ;; 2833caade7ccSmrg 2834caade7ccSmrggnu*) 2835caade7ccSmrg version_type=linux 2836caade7ccSmrg need_lib_prefix=no 2837caade7ccSmrg need_version=no 2838caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2839caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2840caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2841caade7ccSmrg hardcode_into_libs=yes 2842caade7ccSmrg ;; 2843caade7ccSmrg 2844caade7ccSmrghpux9* | hpux10* | hpux11*) 2845caade7ccSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2846caade7ccSmrg # link against other versions. 2847caade7ccSmrg version_type=sunos 2848caade7ccSmrg need_lib_prefix=no 2849caade7ccSmrg need_version=no 2850caade7ccSmrg case $host_cpu in 2851caade7ccSmrg ia64*) 2852caade7ccSmrg shrext_cmds='.so' 2853caade7ccSmrg hardcode_into_libs=yes 2854caade7ccSmrg dynamic_linker="$host_os dld.so" 2855caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2856caade7ccSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2857caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2858caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2859caade7ccSmrg if test "X$HPUX_IA64_MODE" = X32; then 2860caade7ccSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2861caade7ccSmrg else 2862caade7ccSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2863caade7ccSmrg fi 2864caade7ccSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2865caade7ccSmrg ;; 2866caade7ccSmrg hppa*64*) 2867caade7ccSmrg shrext_cmds='.sl' 2868caade7ccSmrg hardcode_into_libs=yes 2869caade7ccSmrg dynamic_linker="$host_os dld.sl" 2870caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2871caade7ccSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2872caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2873caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2874caade7ccSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2875caade7ccSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2876caade7ccSmrg ;; 2877caade7ccSmrg *) 2878caade7ccSmrg shrext_cmds='.sl' 2879caade7ccSmrg dynamic_linker="$host_os dld.sl" 2880caade7ccSmrg shlibpath_var=SHLIB_PATH 2881caade7ccSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2882caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2883caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2884caade7ccSmrg ;; 2885caade7ccSmrg esac 2886caade7ccSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2887caade7ccSmrg postinstall_cmds='chmod 555 $lib' 2888caade7ccSmrg ;; 2889caade7ccSmrg 2890caade7ccSmrginterix3*) 2891caade7ccSmrg version_type=linux 2892caade7ccSmrg need_lib_prefix=no 2893caade7ccSmrg need_version=no 2894caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2895caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2896caade7ccSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2897caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2898caade7ccSmrg shlibpath_overrides_runpath=no 2899caade7ccSmrg hardcode_into_libs=yes 2900caade7ccSmrg ;; 2901caade7ccSmrg 2902caade7ccSmrgirix5* | irix6* | nonstopux*) 2903caade7ccSmrg case $host_os in 2904caade7ccSmrg nonstopux*) version_type=nonstopux ;; 2905caade7ccSmrg *) 2906caade7ccSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2907caade7ccSmrg version_type=linux 2908caade7ccSmrg else 2909caade7ccSmrg version_type=irix 2910caade7ccSmrg fi ;; 2911caade7ccSmrg esac 2912caade7ccSmrg need_lib_prefix=no 2913caade7ccSmrg need_version=no 2914caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2915caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2916caade7ccSmrg case $host_os in 2917caade7ccSmrg irix5* | nonstopux*) 2918caade7ccSmrg libsuff= shlibsuff= 2919caade7ccSmrg ;; 2920caade7ccSmrg *) 2921caade7ccSmrg case $LD in # libtool.m4 will add one of these switches to LD 2922caade7ccSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2923caade7ccSmrg libsuff= shlibsuff= libmagic=32-bit;; 2924caade7ccSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2925caade7ccSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2926caade7ccSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2927caade7ccSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2928caade7ccSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2929caade7ccSmrg esac 2930caade7ccSmrg ;; 2931caade7ccSmrg esac 2932caade7ccSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2933caade7ccSmrg shlibpath_overrides_runpath=no 2934caade7ccSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2935caade7ccSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2936caade7ccSmrg hardcode_into_libs=yes 2937caade7ccSmrg ;; 2938caade7ccSmrg 2939caade7ccSmrg# No shared lib support for Linux oldld, aout, or coff. 2940caade7ccSmrglinux*oldld* | linux*aout* | linux*coff*) 2941caade7ccSmrg dynamic_linker=no 2942caade7ccSmrg ;; 2943caade7ccSmrg 2944caade7ccSmrg# This must be Linux ELF. 2945caade7ccSmrglinux*) 2946caade7ccSmrg version_type=linux 2947caade7ccSmrg need_lib_prefix=no 2948caade7ccSmrg need_version=no 2949caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2950caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2951caade7ccSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2952caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2953caade7ccSmrg shlibpath_overrides_runpath=no 2954caade7ccSmrg # This implies no fast_install, which is unacceptable. 2955caade7ccSmrg # Some rework will be needed to allow for fast_install 2956caade7ccSmrg # before this can be enabled. 2957caade7ccSmrg hardcode_into_libs=yes 2958caade7ccSmrg 2959caade7ccSmrg # Append ld.so.conf contents to the search path 2960caade7ccSmrg if test -f /etc/ld.so.conf; then 2961caade7ccSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 2962caade7ccSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2963caade7ccSmrg fi 2964caade7ccSmrg 2965caade7ccSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2966caade7ccSmrg # powerpc, because MkLinux only supported shared libraries with the 2967caade7ccSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2968caade7ccSmrg # most powerpc-linux boxes support dynamic linking these days and 2969caade7ccSmrg # people can always --disable-shared, the test was removed, and we 2970caade7ccSmrg # assume the GNU/Linux dynamic linker is in use. 2971caade7ccSmrg dynamic_linker='GNU/Linux ld.so' 2972caade7ccSmrg ;; 2973caade7ccSmrg 2974caade7ccSmrgknetbsd*-gnu) 2975caade7ccSmrg version_type=linux 2976caade7ccSmrg need_lib_prefix=no 2977caade7ccSmrg need_version=no 2978caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2979caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2980caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 2981caade7ccSmrg shlibpath_overrides_runpath=no 2982caade7ccSmrg hardcode_into_libs=yes 2983caade7ccSmrg dynamic_linker='GNU ld.so' 2984caade7ccSmrg ;; 2985caade7ccSmrg 2986caade7ccSmrgnetbsd*) 2987caade7ccSmrg version_type=sunos 2988caade7ccSmrg need_lib_prefix=no 2989caade7ccSmrg need_version=no 2990caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2991caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2992caade7ccSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2993caade7ccSmrg dynamic_linker='NetBSD (a.out) ld.so' 2994caade7ccSmrg else 2995caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2996caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2997caade7ccSmrg dynamic_linker='NetBSD ld.elf_so' 2998caade7ccSmrg fi 2999caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3000caade7ccSmrg shlibpath_overrides_runpath=yes 3001caade7ccSmrg hardcode_into_libs=yes 3002caade7ccSmrg ;; 3003caade7ccSmrg 3004caade7ccSmrgnewsos6) 3005caade7ccSmrg version_type=linux 3006caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3007caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3008caade7ccSmrg shlibpath_overrides_runpath=yes 3009caade7ccSmrg ;; 3010caade7ccSmrg 3011caade7ccSmrgnto-qnx*) 3012caade7ccSmrg version_type=linux 3013caade7ccSmrg need_lib_prefix=no 3014caade7ccSmrg need_version=no 3015caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3016caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3017caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3018caade7ccSmrg shlibpath_overrides_runpath=yes 3019caade7ccSmrg ;; 3020caade7ccSmrg 3021caade7ccSmrgopenbsd*) 3022caade7ccSmrg version_type=sunos 3023caade7ccSmrg sys_lib_dlsearch_path_spec="/usr/lib" 3024caade7ccSmrg need_lib_prefix=no 3025caade7ccSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3026caade7ccSmrg case $host_os in 3027caade7ccSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3028caade7ccSmrg *) need_version=no ;; 3029caade7ccSmrg esac 3030caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3031caade7ccSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3032caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3033caade7ccSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3034caade7ccSmrg case $host_os in 3035caade7ccSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 3036caade7ccSmrg shlibpath_overrides_runpath=no 3037caade7ccSmrg ;; 3038caade7ccSmrg *) 3039caade7ccSmrg shlibpath_overrides_runpath=yes 3040caade7ccSmrg ;; 3041caade7ccSmrg esac 3042caade7ccSmrg else 3043caade7ccSmrg shlibpath_overrides_runpath=yes 3044caade7ccSmrg fi 3045caade7ccSmrg ;; 3046caade7ccSmrg 3047caade7ccSmrgos2*) 3048caade7ccSmrg libname_spec='$name' 3049caade7ccSmrg shrext_cmds=".dll" 3050caade7ccSmrg need_lib_prefix=no 3051caade7ccSmrg library_names_spec='$libname${shared_ext} $libname.a' 3052caade7ccSmrg dynamic_linker='OS/2 ld.exe' 3053caade7ccSmrg shlibpath_var=LIBPATH 3054caade7ccSmrg ;; 3055caade7ccSmrg 3056caade7ccSmrgosf3* | osf4* | osf5*) 3057caade7ccSmrg version_type=osf 3058caade7ccSmrg need_lib_prefix=no 3059caade7ccSmrg need_version=no 3060caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3061caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3062caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3063caade7ccSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3064caade7ccSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3065caade7ccSmrg ;; 3066caade7ccSmrg 3067caade7ccSmrgsolaris*) 3068caade7ccSmrg version_type=linux 3069caade7ccSmrg need_lib_prefix=no 3070caade7ccSmrg need_version=no 3071caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3072caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3073caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3074caade7ccSmrg shlibpath_overrides_runpath=yes 3075caade7ccSmrg hardcode_into_libs=yes 3076caade7ccSmrg # ldd complains unless libraries are executable 3077caade7ccSmrg postinstall_cmds='chmod +x $lib' 3078caade7ccSmrg ;; 3079caade7ccSmrg 3080caade7ccSmrgsunos4*) 3081caade7ccSmrg version_type=sunos 3082caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3083caade7ccSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3084caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3085caade7ccSmrg shlibpath_overrides_runpath=yes 3086caade7ccSmrg if test "$with_gnu_ld" = yes; then 3087caade7ccSmrg need_lib_prefix=no 3088caade7ccSmrg fi 3089caade7ccSmrg need_version=yes 3090caade7ccSmrg ;; 3091caade7ccSmrg 3092caade7ccSmrgsysv4 | sysv4.3*) 3093caade7ccSmrg version_type=linux 3094caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3095caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3096caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3097caade7ccSmrg case $host_vendor in 3098caade7ccSmrg sni) 3099caade7ccSmrg shlibpath_overrides_runpath=no 3100caade7ccSmrg need_lib_prefix=no 3101caade7ccSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 3102caade7ccSmrg runpath_var=LD_RUN_PATH 3103caade7ccSmrg ;; 3104caade7ccSmrg siemens) 3105caade7ccSmrg need_lib_prefix=no 3106caade7ccSmrg ;; 3107caade7ccSmrg motorola) 3108caade7ccSmrg need_lib_prefix=no 3109caade7ccSmrg need_version=no 3110caade7ccSmrg shlibpath_overrides_runpath=no 3111caade7ccSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3112caade7ccSmrg ;; 3113caade7ccSmrg esac 3114caade7ccSmrg ;; 3115caade7ccSmrg 3116caade7ccSmrgsysv4*MP*) 3117caade7ccSmrg if test -d /usr/nec ;then 3118caade7ccSmrg version_type=linux 3119caade7ccSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3120caade7ccSmrg soname_spec='$libname${shared_ext}.$major' 3121caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3122caade7ccSmrg fi 3123caade7ccSmrg ;; 3124caade7ccSmrg 3125caade7ccSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3126caade7ccSmrg version_type=freebsd-elf 3127caade7ccSmrg need_lib_prefix=no 3128caade7ccSmrg need_version=no 3129caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3130caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3131caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3132caade7ccSmrg hardcode_into_libs=yes 3133caade7ccSmrg if test "$with_gnu_ld" = yes; then 3134caade7ccSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3135caade7ccSmrg shlibpath_overrides_runpath=no 3136caade7ccSmrg else 3137caade7ccSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3138caade7ccSmrg shlibpath_overrides_runpath=yes 3139caade7ccSmrg case $host_os in 3140caade7ccSmrg sco3.2v5*) 3141caade7ccSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3142caade7ccSmrg ;; 3143caade7ccSmrg esac 3144caade7ccSmrg fi 3145caade7ccSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3146caade7ccSmrg ;; 3147caade7ccSmrg 3148caade7ccSmrguts4*) 3149caade7ccSmrg version_type=linux 3150caade7ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3151caade7ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 3152caade7ccSmrg shlibpath_var=LD_LIBRARY_PATH 3153caade7ccSmrg ;; 3154caade7ccSmrg 3155caade7ccSmrg*) 3156caade7ccSmrg dynamic_linker=no 3157caade7ccSmrg ;; 3158caade7ccSmrgesac 3159caade7ccSmrgAC_MSG_RESULT([$dynamic_linker]) 3160caade7ccSmrgtest "$dynamic_linker" = no && can_build_shared=no 3161caade7ccSmrg 3162caade7ccSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3163caade7ccSmrgif test "$GCC" = yes; then 3164caade7ccSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3165caade7ccSmrgfi 3166caade7ccSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3167caade7ccSmrg 3168caade7ccSmrg 3169caade7ccSmrg# _LT_AC_TAGCONFIG 3170caade7ccSmrg# ---------------- 3171caade7ccSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 3172caade7ccSmrg[AC_ARG_WITH([tags], 3173caade7ccSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 3174caade7ccSmrg [include additional configurations @<:@automatic@:>@])], 3175caade7ccSmrg [tagnames="$withval"]) 3176caade7ccSmrg 3177caade7ccSmrgif test -f "$ltmain" && test -n "$tagnames"; then 3178caade7ccSmrg if test ! -f "${ofile}"; then 3179caade7ccSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 3180caade7ccSmrg fi 3181caade7ccSmrg 3182caade7ccSmrg if test -z "$LTCC"; then 3183caade7ccSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 3184caade7ccSmrg if test -z "$LTCC"; then 3185caade7ccSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 3186caade7ccSmrg else 3187caade7ccSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 3188caade7ccSmrg fi 3189caade7ccSmrg fi 3190caade7ccSmrg if test -z "$LTCFLAGS"; then 3191caade7ccSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 3192caade7ccSmrg fi 3193caade7ccSmrg 3194caade7ccSmrg # Extract list of available tagged configurations in $ofile. 3195caade7ccSmrg # Note that this assumes the entire list is on one line. 3196caade7ccSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 3197caade7ccSmrg 3198caade7ccSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3199caade7ccSmrg for tagname in $tagnames; do 3200caade7ccSmrg IFS="$lt_save_ifs" 3201caade7ccSmrg # Check whether tagname contains only valid characters 3202caade7ccSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 3203caade7ccSmrg "") ;; 3204caade7ccSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 3205caade7ccSmrg ;; 3206caade7ccSmrg esac 3207caade7ccSmrg 3208caade7ccSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 3209caade7ccSmrg then 3210caade7ccSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 3211caade7ccSmrg fi 3212caade7ccSmrg 3213caade7ccSmrg # Update the list of available tags. 3214caade7ccSmrg if test -n "$tagname"; then 3215caade7ccSmrg echo appending configuration tag \"$tagname\" to $ofile 3216caade7ccSmrg 3217caade7ccSmrg case $tagname in 3218caade7ccSmrg CXX) 3219caade7ccSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3220caade7ccSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3221caade7ccSmrg (test "X$CXX" != "Xg++"))) ; then 3222caade7ccSmrg AC_LIBTOOL_LANG_CXX_CONFIG 3223caade7ccSmrg else 3224caade7ccSmrg tagname="" 3225caade7ccSmrg fi 3226caade7ccSmrg ;; 3227caade7ccSmrg 3228caade7ccSmrg F77) 3229caade7ccSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 3230caade7ccSmrg AC_LIBTOOL_LANG_F77_CONFIG 3231caade7ccSmrg else 3232caade7ccSmrg tagname="" 3233caade7ccSmrg fi 3234caade7ccSmrg ;; 3235caade7ccSmrg 3236caade7ccSmrg GCJ) 3237caade7ccSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 3238caade7ccSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 3239caade7ccSmrg else 3240caade7ccSmrg tagname="" 3241caade7ccSmrg fi 3242caade7ccSmrg ;; 3243caade7ccSmrg 3244caade7ccSmrg RC) 3245caade7ccSmrg AC_LIBTOOL_LANG_RC_CONFIG 3246caade7ccSmrg ;; 3247caade7ccSmrg 3248caade7ccSmrg *) 3249caade7ccSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 3250caade7ccSmrg ;; 3251caade7ccSmrg esac 3252caade7ccSmrg 3253caade7ccSmrg # Append the new tag name to the list of available tags. 3254caade7ccSmrg if test -n "$tagname" ; then 3255caade7ccSmrg available_tags="$available_tags $tagname" 3256caade7ccSmrg fi 3257caade7ccSmrg fi 3258caade7ccSmrg done 3259caade7ccSmrg IFS="$lt_save_ifs" 3260caade7ccSmrg 3261caade7ccSmrg # Now substitute the updated list of available tags. 3262caade7ccSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 3263caade7ccSmrg mv "${ofile}T" "$ofile" 3264caade7ccSmrg chmod +x "$ofile" 3265caade7ccSmrg else 3266caade7ccSmrg rm -f "${ofile}T" 3267caade7ccSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 3268caade7ccSmrg fi 3269caade7ccSmrgfi 3270caade7ccSmrg])# _LT_AC_TAGCONFIG 3271caade7ccSmrg 3272caade7ccSmrg 3273caade7ccSmrg# AC_LIBTOOL_DLOPEN 3274caade7ccSmrg# ----------------- 3275caade7ccSmrg# enable checks for dlopen support 3276caade7ccSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 3277caade7ccSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 3278caade7ccSmrg])# AC_LIBTOOL_DLOPEN 3279caade7ccSmrg 3280caade7ccSmrg 3281caade7ccSmrg# AC_LIBTOOL_WIN32_DLL 3282caade7ccSmrg# -------------------- 3283caade7ccSmrg# declare package support for building win32 DLLs 3284caade7ccSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 3285caade7ccSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 3286caade7ccSmrg])# AC_LIBTOOL_WIN32_DLL 3287caade7ccSmrg 3288caade7ccSmrg 3289caade7ccSmrg# AC_ENABLE_SHARED([DEFAULT]) 3290caade7ccSmrg# --------------------------- 3291caade7ccSmrg# implement the --enable-shared flag 3292caade7ccSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3293caade7ccSmrgAC_DEFUN([AC_ENABLE_SHARED], 3294caade7ccSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 3295caade7ccSmrgAC_ARG_ENABLE([shared], 3296caade7ccSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 3297caade7ccSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 3298caade7ccSmrg [p=${PACKAGE-default} 3299caade7ccSmrg case $enableval in 3300caade7ccSmrg yes) enable_shared=yes ;; 3301caade7ccSmrg no) enable_shared=no ;; 3302caade7ccSmrg *) 3303caade7ccSmrg enable_shared=no 3304caade7ccSmrg # Look at the argument we got. We use all the common list separators. 3305caade7ccSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3306caade7ccSmrg for pkg in $enableval; do 3307caade7ccSmrg IFS="$lt_save_ifs" 3308caade7ccSmrg if test "X$pkg" = "X$p"; then 3309caade7ccSmrg enable_shared=yes 3310caade7ccSmrg fi 3311caade7ccSmrg done 3312caade7ccSmrg IFS="$lt_save_ifs" 3313caade7ccSmrg ;; 3314caade7ccSmrg esac], 3315caade7ccSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 3316caade7ccSmrg])# AC_ENABLE_SHARED 3317caade7ccSmrg 3318caade7ccSmrg 3319caade7ccSmrg# AC_DISABLE_SHARED 3320caade7ccSmrg# ----------------- 3321caade7ccSmrg# set the default shared flag to --disable-shared 3322caade7ccSmrgAC_DEFUN([AC_DISABLE_SHARED], 3323caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3324caade7ccSmrgAC_ENABLE_SHARED(no) 3325caade7ccSmrg])# AC_DISABLE_SHARED 3326caade7ccSmrg 3327caade7ccSmrg 3328caade7ccSmrg# AC_ENABLE_STATIC([DEFAULT]) 3329caade7ccSmrg# --------------------------- 3330caade7ccSmrg# implement the --enable-static flag 3331caade7ccSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3332caade7ccSmrgAC_DEFUN([AC_ENABLE_STATIC], 3333caade7ccSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 3334caade7ccSmrgAC_ARG_ENABLE([static], 3335caade7ccSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 3336caade7ccSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 3337caade7ccSmrg [p=${PACKAGE-default} 3338caade7ccSmrg case $enableval in 3339caade7ccSmrg yes) enable_static=yes ;; 3340caade7ccSmrg no) enable_static=no ;; 3341caade7ccSmrg *) 3342caade7ccSmrg enable_static=no 3343caade7ccSmrg # Look at the argument we got. We use all the common list separators. 3344caade7ccSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3345caade7ccSmrg for pkg in $enableval; do 3346caade7ccSmrg IFS="$lt_save_ifs" 3347caade7ccSmrg if test "X$pkg" = "X$p"; then 3348caade7ccSmrg enable_static=yes 3349caade7ccSmrg fi 3350caade7ccSmrg done 3351caade7ccSmrg IFS="$lt_save_ifs" 3352caade7ccSmrg ;; 3353caade7ccSmrg esac], 3354caade7ccSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 3355caade7ccSmrg])# AC_ENABLE_STATIC 3356caade7ccSmrg 3357caade7ccSmrg 3358caade7ccSmrg# AC_DISABLE_STATIC 3359caade7ccSmrg# ----------------- 3360caade7ccSmrg# set the default static flag to --disable-static 3361caade7ccSmrgAC_DEFUN([AC_DISABLE_STATIC], 3362caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3363caade7ccSmrgAC_ENABLE_STATIC(no) 3364caade7ccSmrg])# AC_DISABLE_STATIC 3365caade7ccSmrg 3366caade7ccSmrg 3367caade7ccSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 3368caade7ccSmrg# --------------------------------- 3369caade7ccSmrg# implement the --enable-fast-install flag 3370caade7ccSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3371caade7ccSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 3372caade7ccSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 3373caade7ccSmrgAC_ARG_ENABLE([fast-install], 3374caade7ccSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 3375caade7ccSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 3376caade7ccSmrg [p=${PACKAGE-default} 3377caade7ccSmrg case $enableval in 3378caade7ccSmrg yes) enable_fast_install=yes ;; 3379caade7ccSmrg no) enable_fast_install=no ;; 3380caade7ccSmrg *) 3381caade7ccSmrg enable_fast_install=no 3382caade7ccSmrg # Look at the argument we got. We use all the common list separators. 3383caade7ccSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3384caade7ccSmrg for pkg in $enableval; do 3385caade7ccSmrg IFS="$lt_save_ifs" 3386caade7ccSmrg if test "X$pkg" = "X$p"; then 3387caade7ccSmrg enable_fast_install=yes 3388caade7ccSmrg fi 3389caade7ccSmrg done 3390caade7ccSmrg IFS="$lt_save_ifs" 3391caade7ccSmrg ;; 3392caade7ccSmrg esac], 3393caade7ccSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 3394caade7ccSmrg])# AC_ENABLE_FAST_INSTALL 3395caade7ccSmrg 3396caade7ccSmrg 3397caade7ccSmrg# AC_DISABLE_FAST_INSTALL 3398caade7ccSmrg# ----------------------- 3399caade7ccSmrg# set the default to --disable-fast-install 3400caade7ccSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 3401caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3402caade7ccSmrgAC_ENABLE_FAST_INSTALL(no) 3403caade7ccSmrg])# AC_DISABLE_FAST_INSTALL 3404caade7ccSmrg 3405caade7ccSmrg 3406caade7ccSmrg# AC_LIBTOOL_PICMODE([MODE]) 3407caade7ccSmrg# -------------------------- 3408caade7ccSmrg# implement the --with-pic flag 3409caade7ccSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 3410caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 3411caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3412caade7ccSmrgpic_mode=ifelse($#,1,$1,default) 3413caade7ccSmrg])# AC_LIBTOOL_PICMODE 3414caade7ccSmrg 3415caade7ccSmrg 3416caade7ccSmrg# AC_PROG_EGREP 3417caade7ccSmrg# ------------- 3418caade7ccSmrg# This is predefined starting with Autoconf 2.54, so this conditional 3419caade7ccSmrg# definition can be removed once we require Autoconf 2.54 or later. 3420caade7ccSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 3421caade7ccSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 3422caade7ccSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 3423caade7ccSmrg then ac_cv_prog_egrep='grep -E' 3424caade7ccSmrg else ac_cv_prog_egrep='egrep' 3425caade7ccSmrg fi]) 3426caade7ccSmrg EGREP=$ac_cv_prog_egrep 3427caade7ccSmrg AC_SUBST([EGREP]) 3428caade7ccSmrg])]) 3429caade7ccSmrg 3430caade7ccSmrg 3431caade7ccSmrg# AC_PATH_TOOL_PREFIX 3432caade7ccSmrg# ------------------- 3433caade7ccSmrg# find a file program which can recognise shared library 3434caade7ccSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 3435caade7ccSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3436caade7ccSmrgAC_MSG_CHECKING([for $1]) 3437caade7ccSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3438caade7ccSmrg[case $MAGIC_CMD in 3439caade7ccSmrg[[\\/*] | ?:[\\/]*]) 3440caade7ccSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3441caade7ccSmrg ;; 3442caade7ccSmrg*) 3443caade7ccSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 3444caade7ccSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3445caade7ccSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3446caade7ccSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3447caade7ccSmrgdnl not every word. This closes a longstanding sh security hole. 3448caade7ccSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 3449caade7ccSmrg for ac_dir in $ac_dummy; do 3450caade7ccSmrg IFS="$lt_save_ifs" 3451caade7ccSmrg test -z "$ac_dir" && ac_dir=. 3452caade7ccSmrg if test -f $ac_dir/$1; then 3453caade7ccSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3454caade7ccSmrg if test -n "$file_magic_test_file"; then 3455caade7ccSmrg case $deplibs_check_method in 3456caade7ccSmrg "file_magic "*) 3457caade7ccSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3458caade7ccSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3459caade7ccSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3460caade7ccSmrg $EGREP "$file_magic_regex" > /dev/null; then 3461caade7ccSmrg : 3462caade7ccSmrg else 3463caade7ccSmrg cat <<EOF 1>&2 3464caade7ccSmrg 3465caade7ccSmrg*** Warning: the command libtool uses to detect shared libraries, 3466caade7ccSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3467caade7ccSmrg*** The result is that libtool may fail to recognize shared libraries 3468caade7ccSmrg*** as such. This will affect the creation of libtool libraries that 3469caade7ccSmrg*** depend on shared libraries, but programs linked with such libtool 3470caade7ccSmrg*** libraries will work regardless of this problem. Nevertheless, you 3471caade7ccSmrg*** may want to report the problem to your system manager and/or to 3472caade7ccSmrg*** bug-libtool@gnu.org 3473caade7ccSmrg 3474caade7ccSmrgEOF 3475caade7ccSmrg fi ;; 3476caade7ccSmrg esac 3477caade7ccSmrg fi 3478caade7ccSmrg break 3479caade7ccSmrg fi 3480caade7ccSmrg done 3481caade7ccSmrg IFS="$lt_save_ifs" 3482caade7ccSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3483caade7ccSmrg ;; 3484caade7ccSmrgesac]) 3485caade7ccSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3486caade7ccSmrgif test -n "$MAGIC_CMD"; then 3487caade7ccSmrg AC_MSG_RESULT($MAGIC_CMD) 3488caade7ccSmrgelse 3489caade7ccSmrg AC_MSG_RESULT(no) 3490caade7ccSmrgfi 3491caade7ccSmrg])# AC_PATH_TOOL_PREFIX 3492caade7ccSmrg 3493caade7ccSmrg 3494caade7ccSmrg# AC_PATH_MAGIC 3495caade7ccSmrg# ------------- 3496caade7ccSmrg# find a file program which can recognise a shared library 3497caade7ccSmrgAC_DEFUN([AC_PATH_MAGIC], 3498caade7ccSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3499caade7ccSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3500caade7ccSmrg if test -n "$ac_tool_prefix"; then 3501caade7ccSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3502caade7ccSmrg else 3503caade7ccSmrg MAGIC_CMD=: 3504caade7ccSmrg fi 3505caade7ccSmrgfi 3506caade7ccSmrg])# AC_PATH_MAGIC 3507caade7ccSmrg 3508caade7ccSmrg 3509caade7ccSmrg# AC_PROG_LD 3510caade7ccSmrg# ---------- 3511caade7ccSmrg# find the pathname to the GNU or non-GNU linker 3512caade7ccSmrgAC_DEFUN([AC_PROG_LD], 3513caade7ccSmrg[AC_ARG_WITH([gnu-ld], 3514caade7ccSmrg [AC_HELP_STRING([--with-gnu-ld], 3515caade7ccSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3516caade7ccSmrg [test "$withval" = no || with_gnu_ld=yes], 3517caade7ccSmrg [with_gnu_ld=no]) 3518caade7ccSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 3519caade7ccSmrgAC_REQUIRE([AC_PROG_CC])dnl 3520caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3521caade7ccSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3522caade7ccSmrgac_prog=ld 3523caade7ccSmrgif test "$GCC" = yes; then 3524caade7ccSmrg # Check if gcc -print-prog-name=ld gives a path. 3525caade7ccSmrg AC_MSG_CHECKING([for ld used by $CC]) 3526caade7ccSmrg case $host in 3527caade7ccSmrg *-*-mingw*) 3528caade7ccSmrg # gcc leaves a trailing carriage return which upsets mingw 3529caade7ccSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3530caade7ccSmrg *) 3531caade7ccSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3532caade7ccSmrg esac 3533caade7ccSmrg case $ac_prog in 3534caade7ccSmrg # Accept absolute paths. 3535caade7ccSmrg [[\\/]]* | ?:[[\\/]]*) 3536caade7ccSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3537caade7ccSmrg # Canonicalize the pathname of ld 3538caade7ccSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 3539caade7ccSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 3540caade7ccSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 3541caade7ccSmrg done 3542caade7ccSmrg test -z "$LD" && LD="$ac_prog" 3543caade7ccSmrg ;; 3544caade7ccSmrg "") 3545caade7ccSmrg # If it fails, then pretend we aren't using GCC. 3546caade7ccSmrg ac_prog=ld 3547caade7ccSmrg ;; 3548caade7ccSmrg *) 3549caade7ccSmrg # If it is relative, then search for the first ld in PATH. 3550caade7ccSmrg with_gnu_ld=unknown 3551caade7ccSmrg ;; 3552caade7ccSmrg esac 3553caade7ccSmrgelif test "$with_gnu_ld" = yes; then 3554caade7ccSmrg AC_MSG_CHECKING([for GNU ld]) 3555caade7ccSmrgelse 3556caade7ccSmrg AC_MSG_CHECKING([for non-GNU ld]) 3557caade7ccSmrgfi 3558caade7ccSmrgAC_CACHE_VAL(lt_cv_path_LD, 3559caade7ccSmrg[if test -z "$LD"; then 3560caade7ccSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3561caade7ccSmrg for ac_dir in $PATH; do 3562caade7ccSmrg IFS="$lt_save_ifs" 3563caade7ccSmrg test -z "$ac_dir" && ac_dir=. 3564caade7ccSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3565caade7ccSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3566caade7ccSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3567caade7ccSmrg # but apparently some variants of GNU ld only accept -v. 3568caade7ccSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3569caade7ccSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3570caade7ccSmrg *GNU* | *'with BFD'*) 3571caade7ccSmrg test "$with_gnu_ld" != no && break 3572caade7ccSmrg ;; 3573caade7ccSmrg *) 3574caade7ccSmrg test "$with_gnu_ld" != yes && break 3575caade7ccSmrg ;; 3576caade7ccSmrg esac 3577caade7ccSmrg fi 3578caade7ccSmrg done 3579caade7ccSmrg IFS="$lt_save_ifs" 3580caade7ccSmrgelse 3581caade7ccSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3582caade7ccSmrgfi]) 3583caade7ccSmrgLD="$lt_cv_path_LD" 3584caade7ccSmrgif test -n "$LD"; then 3585caade7ccSmrg AC_MSG_RESULT($LD) 3586caade7ccSmrgelse 3587caade7ccSmrg AC_MSG_RESULT(no) 3588caade7ccSmrgfi 3589caade7ccSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3590caade7ccSmrgAC_PROG_LD_GNU 3591caade7ccSmrg])# AC_PROG_LD 3592caade7ccSmrg 3593caade7ccSmrg 3594caade7ccSmrg# AC_PROG_LD_GNU 3595caade7ccSmrg# -------------- 3596caade7ccSmrgAC_DEFUN([AC_PROG_LD_GNU], 3597caade7ccSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3598caade7ccSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3599caade7ccSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3600caade7ccSmrgcase `$LD -v 2>&1 </dev/null` in 3601caade7ccSmrg*GNU* | *'with BFD'*) 3602caade7ccSmrg lt_cv_prog_gnu_ld=yes 3603caade7ccSmrg ;; 3604caade7ccSmrg*) 3605caade7ccSmrg lt_cv_prog_gnu_ld=no 3606caade7ccSmrg ;; 3607caade7ccSmrgesac]) 3608caade7ccSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3609caade7ccSmrg])# AC_PROG_LD_GNU 3610caade7ccSmrg 3611caade7ccSmrg 3612caade7ccSmrg# AC_PROG_LD_RELOAD_FLAG 3613caade7ccSmrg# ---------------------- 3614caade7ccSmrg# find reload flag for linker 3615caade7ccSmrg# -- PORTME Some linkers may need a different reload flag. 3616caade7ccSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 3617caade7ccSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3618caade7ccSmrg lt_cv_ld_reload_flag, 3619caade7ccSmrg [lt_cv_ld_reload_flag='-r']) 3620caade7ccSmrgreload_flag=$lt_cv_ld_reload_flag 3621caade7ccSmrgcase $reload_flag in 3622caade7ccSmrg"" | " "*) ;; 3623caade7ccSmrg*) reload_flag=" $reload_flag" ;; 3624caade7ccSmrgesac 3625caade7ccSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3626caade7ccSmrgcase $host_os in 3627caade7ccSmrg darwin*) 3628caade7ccSmrg if test "$GCC" = yes; then 3629caade7ccSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3630caade7ccSmrg else 3631caade7ccSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3632caade7ccSmrg fi 3633caade7ccSmrg ;; 3634caade7ccSmrgesac 3635caade7ccSmrg])# AC_PROG_LD_RELOAD_FLAG 3636caade7ccSmrg 3637caade7ccSmrg 3638caade7ccSmrg# AC_DEPLIBS_CHECK_METHOD 3639caade7ccSmrg# ----------------------- 3640caade7ccSmrg# how to check for library dependencies 3641caade7ccSmrg# -- PORTME fill in with the dynamic library characteristics 3642caade7ccSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 3643caade7ccSmrg[AC_CACHE_CHECK([how to recognise dependent libraries], 3644caade7ccSmrglt_cv_deplibs_check_method, 3645caade7ccSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3646caade7ccSmrglt_cv_file_magic_test_file= 3647caade7ccSmrglt_cv_deplibs_check_method='unknown' 3648caade7ccSmrg# Need to set the preceding variable on all platforms that support 3649caade7ccSmrg# interlibrary dependencies. 3650caade7ccSmrg# 'none' -- dependencies not supported. 3651caade7ccSmrg# `unknown' -- same as none, but documents that we really don't know. 3652caade7ccSmrg# 'pass_all' -- all dependencies passed with no checks. 3653caade7ccSmrg# 'test_compile' -- check by making test program. 3654caade7ccSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3655caade7ccSmrg# which responds to the $file_magic_cmd with a given extended regex. 3656caade7ccSmrg# If you have `file' or equivalent on your system and you're not sure 3657caade7ccSmrg# whether `pass_all' will *always* work, you probably want this one. 3658caade7ccSmrg 3659caade7ccSmrgcase $host_os in 3660caade7ccSmrgaix4* | aix5*) 3661caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3662caade7ccSmrg ;; 3663caade7ccSmrg 3664caade7ccSmrgbeos*) 3665caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3666caade7ccSmrg ;; 3667caade7ccSmrg 3668caade7ccSmrgbsdi[[45]]*) 3669caade7ccSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3670caade7ccSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3671caade7ccSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3672caade7ccSmrg ;; 3673caade7ccSmrg 3674caade7ccSmrgcygwin*) 3675caade7ccSmrg # func_win32_libid is a shell function defined in ltmain.sh 3676caade7ccSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3677caade7ccSmrg lt_cv_file_magic_cmd='func_win32_libid' 3678caade7ccSmrg ;; 3679caade7ccSmrg 3680caade7ccSmrgmingw* | pw32*) 3681caade7ccSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3682caade7ccSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 3683caade7ccSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3684caade7ccSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3685caade7ccSmrg ;; 3686caade7ccSmrg 3687caade7ccSmrgdarwin* | rhapsody*) 3688caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3689caade7ccSmrg ;; 3690caade7ccSmrg 3691caade7ccSmrgfreebsd* | kfreebsd*-gnu | dragonfly*) 3692caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3693caade7ccSmrg case $host_cpu in 3694caade7ccSmrg i*86 ) 3695caade7ccSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3696caade7ccSmrg # Let's accept both of them until this is cleared up. 3697caade7ccSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3698caade7ccSmrg lt_cv_file_magic_cmd=/usr/bin/file 3699caade7ccSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3700caade7ccSmrg ;; 3701caade7ccSmrg esac 3702caade7ccSmrg else 3703caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3704caade7ccSmrg fi 3705caade7ccSmrg ;; 3706caade7ccSmrg 3707caade7ccSmrggnu*) 3708caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3709caade7ccSmrg ;; 3710caade7ccSmrg 3711caade7ccSmrghpux10.20* | hpux11*) 3712caade7ccSmrg lt_cv_file_magic_cmd=/usr/bin/file 3713caade7ccSmrg case $host_cpu in 3714caade7ccSmrg ia64*) 3715caade7ccSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3716caade7ccSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3717caade7ccSmrg ;; 3718caade7ccSmrg hppa*64*) 3719caade7ccSmrg [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]'] 3720caade7ccSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3721caade7ccSmrg ;; 3722caade7ccSmrg *) 3723caade7ccSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3724caade7ccSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3725caade7ccSmrg ;; 3726caade7ccSmrg esac 3727caade7ccSmrg ;; 3728caade7ccSmrg 3729caade7ccSmrginterix3*) 3730caade7ccSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3731caade7ccSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3732caade7ccSmrg ;; 3733caade7ccSmrg 3734caade7ccSmrgirix5* | irix6* | nonstopux*) 3735caade7ccSmrg case $LD in 3736caade7ccSmrg *-32|*"-32 ") libmagic=32-bit;; 3737caade7ccSmrg *-n32|*"-n32 ") libmagic=N32;; 3738caade7ccSmrg *-64|*"-64 ") libmagic=64-bit;; 3739caade7ccSmrg *) libmagic=never-match;; 3740caade7ccSmrg esac 3741caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3742caade7ccSmrg ;; 3743caade7ccSmrg 3744caade7ccSmrg# This must be Linux ELF. 3745caade7ccSmrglinux*) 3746caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3747caade7ccSmrg ;; 3748caade7ccSmrg 3749caade7ccSmrgnetbsd*) 3750caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3751caade7ccSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3752caade7ccSmrg else 3753caade7ccSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3754caade7ccSmrg fi 3755caade7ccSmrg ;; 3756caade7ccSmrg 3757caade7ccSmrgnewos6*) 3758caade7ccSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3759caade7ccSmrg lt_cv_file_magic_cmd=/usr/bin/file 3760caade7ccSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3761caade7ccSmrg ;; 3762caade7ccSmrg 3763caade7ccSmrgnto-qnx*) 3764caade7ccSmrg lt_cv_deplibs_check_method=unknown 3765caade7ccSmrg ;; 3766caade7ccSmrg 3767caade7ccSmrgopenbsd*) 3768caade7ccSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3769caade7ccSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3770caade7ccSmrg else 3771caade7ccSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3772caade7ccSmrg fi 3773caade7ccSmrg ;; 3774caade7ccSmrg 3775caade7ccSmrgosf3* | osf4* | osf5*) 3776caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3777caade7ccSmrg ;; 3778caade7ccSmrg 3779caade7ccSmrgsolaris*) 3780caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3781caade7ccSmrg ;; 3782caade7ccSmrg 3783caade7ccSmrgsysv4 | sysv4.3*) 3784caade7ccSmrg case $host_vendor in 3785caade7ccSmrg motorola) 3786caade7ccSmrg 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]]' 3787caade7ccSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3788caade7ccSmrg ;; 3789caade7ccSmrg ncr) 3790caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3791caade7ccSmrg ;; 3792caade7ccSmrg sequent) 3793caade7ccSmrg lt_cv_file_magic_cmd='/bin/file' 3794caade7ccSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3795caade7ccSmrg ;; 3796caade7ccSmrg sni) 3797caade7ccSmrg lt_cv_file_magic_cmd='/bin/file' 3798caade7ccSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3799caade7ccSmrg lt_cv_file_magic_test_file=/lib/libc.so 3800caade7ccSmrg ;; 3801caade7ccSmrg siemens) 3802caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3803caade7ccSmrg ;; 3804caade7ccSmrg pc) 3805caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3806caade7ccSmrg ;; 3807caade7ccSmrg esac 3808caade7ccSmrg ;; 3809caade7ccSmrg 3810caade7ccSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3811caade7ccSmrg lt_cv_deplibs_check_method=pass_all 3812caade7ccSmrg ;; 3813caade7ccSmrgesac 3814caade7ccSmrg]) 3815caade7ccSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3816caade7ccSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3817caade7ccSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3818caade7ccSmrg])# AC_DEPLIBS_CHECK_METHOD 3819caade7ccSmrg 3820caade7ccSmrg 3821caade7ccSmrg# AC_PROG_NM 3822caade7ccSmrg# ---------- 3823caade7ccSmrg# find the pathname to a BSD-compatible name lister 3824caade7ccSmrgAC_DEFUN([AC_PROG_NM], 3825caade7ccSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 3826caade7ccSmrg[if test -n "$NM"; then 3827caade7ccSmrg # Let the user override the test. 3828caade7ccSmrg lt_cv_path_NM="$NM" 3829caade7ccSmrgelse 3830caade7ccSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3831caade7ccSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3832caade7ccSmrg lt_nm_to_check="$lt_nm_to_check nm" 3833caade7ccSmrg fi 3834caade7ccSmrg for lt_tmp_nm in $lt_nm_to_check; do 3835caade7ccSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3836caade7ccSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3837caade7ccSmrg IFS="$lt_save_ifs" 3838caade7ccSmrg test -z "$ac_dir" && ac_dir=. 3839caade7ccSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3840caade7ccSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3841caade7ccSmrg # Check to see if the nm accepts a BSD-compat flag. 3842caade7ccSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3843caade7ccSmrg # nm: unknown option "B" ignored 3844caade7ccSmrg # Tru64's nm complains that /dev/null is an invalid object file 3845caade7ccSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3846caade7ccSmrg */dev/null* | *'Invalid file or object type'*) 3847caade7ccSmrg lt_cv_path_NM="$tmp_nm -B" 3848caade7ccSmrg break 3849caade7ccSmrg ;; 3850caade7ccSmrg *) 3851caade7ccSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3852caade7ccSmrg */dev/null*) 3853caade7ccSmrg lt_cv_path_NM="$tmp_nm -p" 3854caade7ccSmrg break 3855caade7ccSmrg ;; 3856caade7ccSmrg *) 3857caade7ccSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3858caade7ccSmrg continue # so that we can try to find one that supports BSD flags 3859caade7ccSmrg ;; 3860caade7ccSmrg esac 3861caade7ccSmrg ;; 3862caade7ccSmrg esac 3863caade7ccSmrg fi 3864caade7ccSmrg done 3865caade7ccSmrg IFS="$lt_save_ifs" 3866caade7ccSmrg done 3867caade7ccSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 3868caade7ccSmrgfi]) 3869caade7ccSmrgNM="$lt_cv_path_NM" 3870caade7ccSmrg])# AC_PROG_NM 3871caade7ccSmrg 3872caade7ccSmrg 3873caade7ccSmrg# AC_CHECK_LIBM 3874caade7ccSmrg# ------------- 3875caade7ccSmrg# check for math library 3876caade7ccSmrgAC_DEFUN([AC_CHECK_LIBM], 3877caade7ccSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3878caade7ccSmrgLIBM= 3879caade7ccSmrgcase $host in 3880caade7ccSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3881caade7ccSmrg # These system don't have libm, or don't need it 3882caade7ccSmrg ;; 3883caade7ccSmrg*-ncr-sysv4.3*) 3884caade7ccSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3885caade7ccSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3886caade7ccSmrg ;; 3887caade7ccSmrg*) 3888caade7ccSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3889caade7ccSmrg ;; 3890caade7ccSmrgesac 3891caade7ccSmrg])# AC_CHECK_LIBM 3892caade7ccSmrg 3893caade7ccSmrg 3894caade7ccSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 3895caade7ccSmrg# ----------------------------------- 3896caade7ccSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 3897caade7ccSmrg# LTDLINCL to the include flags for the libltdl header and adds 3898caade7ccSmrg# --enable-ltdl-convenience to the configure arguments. Note that 3899caade7ccSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3900caade7ccSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 3901caade7ccSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 3902caade7ccSmrg# (note the single quotes!). If your package is not flat and you're not 3903caade7ccSmrg# using automake, define top_builddir and top_srcdir appropriately in 3904caade7ccSmrg# the Makefiles. 3905caade7ccSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 3906caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3907caade7ccSmrg case $enable_ltdl_convenience in 3908caade7ccSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 3909caade7ccSmrg "") enable_ltdl_convenience=yes 3910caade7ccSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 3911caade7ccSmrg esac 3912caade7ccSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 3913caade7ccSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3914caade7ccSmrg # For backwards non-gettext consistent compatibility... 3915caade7ccSmrg INCLTDL="$LTDLINCL" 3916caade7ccSmrg])# AC_LIBLTDL_CONVENIENCE 3917caade7ccSmrg 3918caade7ccSmrg 3919caade7ccSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 3920caade7ccSmrg# ----------------------------------- 3921caade7ccSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 3922caade7ccSmrg# LTDLINCL to the include flags for the libltdl header and adds 3923caade7ccSmrg# --enable-ltdl-install to the configure arguments. Note that 3924caade7ccSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3925caade7ccSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 3926caade7ccSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 3927caade7ccSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 3928caade7ccSmrg# flat and you're not using automake, define top_builddir and top_srcdir 3929caade7ccSmrg# appropriately in the Makefiles. 3930caade7ccSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 3931caade7ccSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 3932caade7ccSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3933caade7ccSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 3934caade7ccSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 3935caade7ccSmrg [if test x"$enable_ltdl_install" = xno; then 3936caade7ccSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 3937caade7ccSmrg else 3938caade7ccSmrg enable_ltdl_install=yes 3939caade7ccSmrg fi 3940caade7ccSmrg ]) 3941caade7ccSmrg if test x"$enable_ltdl_install" = x"yes"; then 3942caade7ccSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 3943caade7ccSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 3944caade7ccSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3945caade7ccSmrg else 3946caade7ccSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 3947caade7ccSmrg LIBLTDL="-lltdl" 3948caade7ccSmrg LTDLINCL= 3949caade7ccSmrg fi 3950caade7ccSmrg # For backwards non-gettext consistent compatibility... 3951caade7ccSmrg INCLTDL="$LTDLINCL" 3952caade7ccSmrg])# AC_LIBLTDL_INSTALLABLE 3953caade7ccSmrg 3954caade7ccSmrg 3955caade7ccSmrg# AC_LIBTOOL_CXX 3956caade7ccSmrg# -------------- 3957caade7ccSmrg# enable support for C++ libraries 3958caade7ccSmrgAC_DEFUN([AC_LIBTOOL_CXX], 3959caade7ccSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 3960caade7ccSmrg])# AC_LIBTOOL_CXX 3961caade7ccSmrg 3962caade7ccSmrg 3963caade7ccSmrg# _LT_AC_LANG_CXX 3964caade7ccSmrg# --------------- 3965caade7ccSmrgAC_DEFUN([_LT_AC_LANG_CXX], 3966caade7ccSmrg[AC_REQUIRE([AC_PROG_CXX]) 3967caade7ccSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3968caade7ccSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 3969caade7ccSmrg])# _LT_AC_LANG_CXX 3970caade7ccSmrg 3971caade7ccSmrg# _LT_AC_PROG_CXXCPP 3972caade7ccSmrg# ------------------ 3973caade7ccSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 3974caade7ccSmrg[ 3975caade7ccSmrgAC_REQUIRE([AC_PROG_CXX]) 3976caade7ccSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 3977caade7ccSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3978caade7ccSmrg (test "X$CXX" != "Xg++"))) ; then 3979caade7ccSmrg AC_PROG_CXXCPP 3980caade7ccSmrgfi 3981caade7ccSmrg])# _LT_AC_PROG_CXXCPP 3982caade7ccSmrg 3983caade7ccSmrg# AC_LIBTOOL_F77 3984caade7ccSmrg# -------------- 3985caade7ccSmrg# enable support for Fortran 77 libraries 3986caade7ccSmrgAC_DEFUN([AC_LIBTOOL_F77], 3987caade7ccSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 3988caade7ccSmrg])# AC_LIBTOOL_F77 3989caade7ccSmrg 3990caade7ccSmrg 3991caade7ccSmrg# _LT_AC_LANG_F77 3992caade7ccSmrg# --------------- 3993caade7ccSmrgAC_DEFUN([_LT_AC_LANG_F77], 3994caade7ccSmrg[AC_REQUIRE([AC_PROG_F77]) 3995caade7ccSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 3996caade7ccSmrg])# _LT_AC_LANG_F77 3997caade7ccSmrg 3998caade7ccSmrg 3999caade7ccSmrg# AC_LIBTOOL_GCJ 4000caade7ccSmrg# -------------- 4001caade7ccSmrg# enable support for GCJ libraries 4002caade7ccSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 4003caade7ccSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 4004caade7ccSmrg])# AC_LIBTOOL_GCJ 4005caade7ccSmrg 4006caade7ccSmrg 4007caade7ccSmrg# _LT_AC_LANG_GCJ 4008caade7ccSmrg# --------------- 4009caade7ccSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 4010caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 4011caade7ccSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 4012caade7ccSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 4013caade7ccSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 4014caade7ccSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 4015caade7ccSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 4016caade7ccSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 4017caade7ccSmrg])# _LT_AC_LANG_GCJ 4018caade7ccSmrg 4019caade7ccSmrg 4020caade7ccSmrg# AC_LIBTOOL_RC 4021caade7ccSmrg# ------------- 4022caade7ccSmrg# enable support for Windows resource files 4023caade7ccSmrgAC_DEFUN([AC_LIBTOOL_RC], 4024caade7ccSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 4025caade7ccSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 4026caade7ccSmrg])# AC_LIBTOOL_RC 4027caade7ccSmrg 4028caade7ccSmrg 4029caade7ccSmrg# AC_LIBTOOL_LANG_C_CONFIG 4030caade7ccSmrg# ------------------------ 4031caade7ccSmrg# Ensure that the configuration vars for the C compiler are 4032caade7ccSmrg# suitably defined. Those variables are subsequently used by 4033caade7ccSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4034caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 4035caade7ccSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 4036caade7ccSmrg[lt_save_CC="$CC" 4037caade7ccSmrgAC_LANG_PUSH(C) 4038caade7ccSmrg 4039caade7ccSmrg# Source file extension for C test sources. 4040caade7ccSmrgac_ext=c 4041caade7ccSmrg 4042caade7ccSmrg# Object file extension for compiled C test sources. 4043caade7ccSmrgobjext=o 4044caade7ccSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4045caade7ccSmrg 4046caade7ccSmrg# Code to be used in simple compile tests 4047caade7ccSmrglt_simple_compile_test_code="int some_variable = 0;\n" 4048caade7ccSmrg 4049caade7ccSmrg# Code to be used in simple link tests 4050caade7ccSmrglt_simple_link_test_code='int main(){return(0);}\n' 4051caade7ccSmrg 4052caade7ccSmrg_LT_AC_SYS_COMPILER 4053caade7ccSmrg 4054caade7ccSmrg# save warnings/boilerplate of simple test code 4055caade7ccSmrg_LT_COMPILER_BOILERPLATE 4056caade7ccSmrg_LT_LINKER_BOILERPLATE 4057caade7ccSmrg 4058caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4059caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4060caade7ccSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4061caade7ccSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4062caade7ccSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4063caade7ccSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4064caade7ccSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4065caade7ccSmrgAC_LIBTOOL_SYS_LIB_STRIP 4066caade7ccSmrgAC_LIBTOOL_DLOPEN_SELF 4067caade7ccSmrg 4068caade7ccSmrg# Report which library types will actually be built 4069caade7ccSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4070caade7ccSmrgAC_MSG_RESULT([$can_build_shared]) 4071caade7ccSmrg 4072caade7ccSmrgAC_MSG_CHECKING([whether to build shared libraries]) 4073caade7ccSmrgtest "$can_build_shared" = "no" && enable_shared=no 4074caade7ccSmrg 4075caade7ccSmrg# On AIX, shared libraries and static libraries use the same namespace, and 4076caade7ccSmrg# are all built from PIC. 4077caade7ccSmrgcase $host_os in 4078caade7ccSmrgaix3*) 4079caade7ccSmrg test "$enable_shared" = yes && enable_static=no 4080caade7ccSmrg if test -n "$RANLIB"; then 4081caade7ccSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4082caade7ccSmrg postinstall_cmds='$RANLIB $lib' 4083caade7ccSmrg fi 4084caade7ccSmrg ;; 4085caade7ccSmrg 4086caade7ccSmrgaix4* | aix5*) 4087caade7ccSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4088caade7ccSmrg test "$enable_shared" = yes && enable_static=no 4089caade7ccSmrg fi 4090caade7ccSmrg ;; 4091caade7ccSmrgesac 4092caade7ccSmrgAC_MSG_RESULT([$enable_shared]) 4093caade7ccSmrg 4094caade7ccSmrgAC_MSG_CHECKING([whether to build static libraries]) 4095caade7ccSmrg# Make sure either enable_shared or enable_static is yes. 4096caade7ccSmrgtest "$enable_shared" = yes || enable_static=yes 4097caade7ccSmrgAC_MSG_RESULT([$enable_static]) 4098caade7ccSmrg 4099caade7ccSmrgAC_LIBTOOL_CONFIG($1) 4100caade7ccSmrg 4101caade7ccSmrgAC_LANG_POP 4102caade7ccSmrgCC="$lt_save_CC" 4103caade7ccSmrg])# AC_LIBTOOL_LANG_C_CONFIG 4104caade7ccSmrg 4105caade7ccSmrg 4106caade7ccSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 4107caade7ccSmrg# -------------------------- 4108caade7ccSmrg# Ensure that the configuration vars for the C compiler are 4109caade7ccSmrg# suitably defined. Those variables are subsequently used by 4110caade7ccSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4111caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 4112caade7ccSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 4113caade7ccSmrg[AC_LANG_PUSH(C++) 4114caade7ccSmrgAC_REQUIRE([AC_PROG_CXX]) 4115caade7ccSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4116caade7ccSmrg 4117caade7ccSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4118caade7ccSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4119caade7ccSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4120caade7ccSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4121caade7ccSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4122caade7ccSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4123caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4124caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4125caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4126caade7ccSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4127caade7ccSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4128caade7ccSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4129caade7ccSmrg_LT_AC_TAGVAR(module_cmds, $1)= 4130caade7ccSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4131caade7ccSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4132caade7ccSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4133caade7ccSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4134caade7ccSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4135caade7ccSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4136caade7ccSmrg 4137caade7ccSmrg# Dependencies to place before and after the object being linked: 4138caade7ccSmrg_LT_AC_TAGVAR(predep_objects, $1)= 4139caade7ccSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 4140caade7ccSmrg_LT_AC_TAGVAR(predeps, $1)= 4141caade7ccSmrg_LT_AC_TAGVAR(postdeps, $1)= 4142caade7ccSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 4143caade7ccSmrg 4144caade7ccSmrg# Source file extension for C++ test sources. 4145caade7ccSmrgac_ext=cpp 4146caade7ccSmrg 4147caade7ccSmrg# Object file extension for compiled C++ test sources. 4148caade7ccSmrgobjext=o 4149caade7ccSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4150caade7ccSmrg 4151caade7ccSmrg# Code to be used in simple compile tests 4152caade7ccSmrglt_simple_compile_test_code="int some_variable = 0;\n" 4153caade7ccSmrg 4154caade7ccSmrg# Code to be used in simple link tests 4155caade7ccSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 4156caade7ccSmrg 4157caade7ccSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4158caade7ccSmrg_LT_AC_SYS_COMPILER 4159caade7ccSmrg 4160caade7ccSmrg# save warnings/boilerplate of simple test code 4161caade7ccSmrg_LT_COMPILER_BOILERPLATE 4162caade7ccSmrg_LT_LINKER_BOILERPLATE 4163caade7ccSmrg 4164caade7ccSmrg# Allow CC to be a program name with arguments. 4165caade7ccSmrglt_save_CC=$CC 4166caade7ccSmrglt_save_LD=$LD 4167caade7ccSmrglt_save_GCC=$GCC 4168caade7ccSmrgGCC=$GXX 4169caade7ccSmrglt_save_with_gnu_ld=$with_gnu_ld 4170caade7ccSmrglt_save_path_LD=$lt_cv_path_LD 4171caade7ccSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 4172caade7ccSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 4173caade7ccSmrgelse 4174caade7ccSmrg $as_unset lt_cv_prog_gnu_ld 4175caade7ccSmrgfi 4176caade7ccSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 4177caade7ccSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 4178caade7ccSmrgelse 4179caade7ccSmrg $as_unset lt_cv_path_LD 4180caade7ccSmrgfi 4181caade7ccSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 4182caade7ccSmrgCC=${CXX-"c++"} 4183caade7ccSmrgcompiler=$CC 4184caade7ccSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4185caade7ccSmrg_LT_CC_BASENAME([$compiler]) 4186caade7ccSmrg 4187caade7ccSmrg# We don't want -fno-exception wen compiling C++ code, so set the 4188caade7ccSmrg# no_builtin_flag separately 4189caade7ccSmrgif test "$GXX" = yes; then 4190caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4191caade7ccSmrgelse 4192caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4193caade7ccSmrgfi 4194caade7ccSmrg 4195caade7ccSmrgif test "$GXX" = yes; then 4196caade7ccSmrg # Set up default GNU C++ configuration 4197caade7ccSmrg 4198caade7ccSmrg AC_PROG_LD 4199caade7ccSmrg 4200caade7ccSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 4201caade7ccSmrg # archiving commands below assume that GNU ld is being used. 4202caade7ccSmrg if test "$with_gnu_ld" = yes; then 4203caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4204caade7ccSmrg _LT_AC_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' 4205caade7ccSmrg 4206caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4207caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4208caade7ccSmrg 4209caade7ccSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4210caade7ccSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 4211caade7ccSmrg # investigate it a little bit more. (MM) 4212caade7ccSmrg wlarc='${wl}' 4213caade7ccSmrg 4214caade7ccSmrg # ancient GNU ld didn't support --whole-archive et. al. 4215caade7ccSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 4216caade7ccSmrg grep 'no-whole-archive' > /dev/null; then 4217caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4218caade7ccSmrg else 4219caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4220caade7ccSmrg fi 4221caade7ccSmrg else 4222caade7ccSmrg with_gnu_ld=no 4223caade7ccSmrg wlarc= 4224caade7ccSmrg 4225caade7ccSmrg # A generic and very simple default shared library creation 4226caade7ccSmrg # command for GNU C++ for the case where it uses the native 4227caade7ccSmrg # linker, instead of GNU ld. If possible, this setting should 4228caade7ccSmrg # overridden to take advantage of the native linker features on 4229caade7ccSmrg # the platform it is being used on. 4230caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4231caade7ccSmrg fi 4232caade7ccSmrg 4233caade7ccSmrg # Commands to make compiler produce verbose output that lists 4234caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4235caade7ccSmrg # linking a shared library. 4236caade7ccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4237caade7ccSmrg 4238caade7ccSmrgelse 4239caade7ccSmrg GXX=no 4240caade7ccSmrg with_gnu_ld=no 4241caade7ccSmrg wlarc= 4242caade7ccSmrgfi 4243caade7ccSmrg 4244caade7ccSmrg# PORTME: fill in a description of your system's C++ link characteristics 4245caade7ccSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4246caade7ccSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 4247caade7ccSmrgcase $host_os in 4248caade7ccSmrg aix3*) 4249caade7ccSmrg # FIXME: insert proper C++ library support 4250caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4251caade7ccSmrg ;; 4252caade7ccSmrg aix4* | aix5*) 4253caade7ccSmrg if test "$host_cpu" = ia64; then 4254caade7ccSmrg # On IA64, the linker does run time linking by default, so we don't 4255caade7ccSmrg # have to do anything special. 4256caade7ccSmrg aix_use_runtimelinking=no 4257caade7ccSmrg exp_sym_flag='-Bexport' 4258caade7ccSmrg no_entry_flag="" 4259caade7ccSmrg else 4260caade7ccSmrg aix_use_runtimelinking=no 4261caade7ccSmrg 4262caade7ccSmrg # Test if we are trying to use run time linking or normal 4263caade7ccSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4264caade7ccSmrg # need to do runtime linking. 4265caade7ccSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 4266caade7ccSmrg for ld_flag in $LDFLAGS; do 4267caade7ccSmrg case $ld_flag in 4268caade7ccSmrg *-brtl*) 4269caade7ccSmrg aix_use_runtimelinking=yes 4270caade7ccSmrg break 4271caade7ccSmrg ;; 4272caade7ccSmrg esac 4273caade7ccSmrg done 4274caade7ccSmrg ;; 4275caade7ccSmrg esac 4276caade7ccSmrg 4277caade7ccSmrg exp_sym_flag='-bexport' 4278caade7ccSmrg no_entry_flag='-bnoentry' 4279caade7ccSmrg fi 4280caade7ccSmrg 4281caade7ccSmrg # When large executables or shared objects are built, AIX ld can 4282caade7ccSmrg # have problems creating the table of contents. If linking a library 4283caade7ccSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4284caade7ccSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4285caade7ccSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4286caade7ccSmrg 4287caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 4288caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4289caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 4290caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4291caade7ccSmrg 4292caade7ccSmrg if test "$GXX" = yes; then 4293caade7ccSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4294caade7ccSmrg # We only want to do this on AIX 4.2 and lower, the check 4295caade7ccSmrg # below for broken collect2 doesn't work under 4.3+ 4296caade7ccSmrg collect2name=`${CC} -print-prog-name=collect2` 4297caade7ccSmrg if test -f "$collect2name" && \ 4298caade7ccSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 4299caade7ccSmrg then 4300caade7ccSmrg # We have reworked collect2 4301caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4302caade7ccSmrg else 4303caade7ccSmrg # We have old collect2 4304caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 4305caade7ccSmrg # It fails to find uninstalled libraries when the uninstalled 4306caade7ccSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4307caade7ccSmrg # to unsupported forces relinking 4308caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 4309caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4310caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4311caade7ccSmrg fi 4312caade7ccSmrg ;; 4313caade7ccSmrg esac 4314caade7ccSmrg shared_flag='-shared' 4315caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 4316caade7ccSmrg shared_flag="$shared_flag "'${wl}-G' 4317caade7ccSmrg fi 4318caade7ccSmrg else 4319caade7ccSmrg # not using gcc 4320caade7ccSmrg if test "$host_cpu" = ia64; then 4321caade7ccSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4322caade7ccSmrg # chokes on -Wl,-G. The following line is correct: 4323caade7ccSmrg shared_flag='-G' 4324caade7ccSmrg else 4325caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 4326caade7ccSmrg shared_flag='${wl}-G' 4327caade7ccSmrg else 4328caade7ccSmrg shared_flag='${wl}-bM:SRE' 4329caade7ccSmrg fi 4330caade7ccSmrg fi 4331caade7ccSmrg fi 4332caade7ccSmrg 4333caade7ccSmrg # It seems that -bexpall does not export symbols beginning with 4334caade7ccSmrg # underscore (_), so it is better to generate a list of symbols to export. 4335caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 4336caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 4337caade7ccSmrg # Warning - without using the other runtime loading flags (-brtl), 4338caade7ccSmrg # -berok will link without error, but may produce a broken library. 4339caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 4340caade7ccSmrg # Determine the default libpath from the value encoded in an empty executable. 4341caade7ccSmrg _LT_AC_SYS_LIBPATH_AIX 4342caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4343caade7ccSmrg 4344caade7ccSmrg _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 4345caade7ccSmrg else 4346caade7ccSmrg if test "$host_cpu" = ia64; then 4347caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4348caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4349caade7ccSmrg _LT_AC_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" 4350caade7ccSmrg else 4351caade7ccSmrg # Determine the default libpath from the value encoded in an empty executable. 4352caade7ccSmrg _LT_AC_SYS_LIBPATH_AIX 4353caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4354caade7ccSmrg # Warning - without using the other run time loading flags, 4355caade7ccSmrg # -berok will link without error, but may produce a broken library. 4356caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4357caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4358caade7ccSmrg # Exported symbols can be pulled into shared objects from archives 4359caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4360caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 4361caade7ccSmrg # This is similar to how AIX traditionally builds its shared libraries. 4362caade7ccSmrg _LT_AC_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' 4363caade7ccSmrg fi 4364caade7ccSmrg fi 4365caade7ccSmrg ;; 4366caade7ccSmrg 4367caade7ccSmrg beos*) 4368caade7ccSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 4369caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4370caade7ccSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4371caade7ccSmrg # support --undefined. This deserves some investigation. FIXME 4372caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4373caade7ccSmrg else 4374caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4375caade7ccSmrg fi 4376caade7ccSmrg ;; 4377caade7ccSmrg 4378caade7ccSmrg chorus*) 4379caade7ccSmrg case $cc_basename in 4380caade7ccSmrg *) 4381caade7ccSmrg # FIXME: insert proper C++ library support 4382caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4383caade7ccSmrg ;; 4384caade7ccSmrg esac 4385caade7ccSmrg ;; 4386caade7ccSmrg 4387caade7ccSmrg cygwin* | mingw* | pw32*) 4388caade7ccSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4389caade7ccSmrg # as there is no search path for DLLs. 4390caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4391caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4392caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 4393caade7ccSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4394caade7ccSmrg 4395caade7ccSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 4396caade7ccSmrg _LT_AC_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' 4397caade7ccSmrg # If the export-symbols file already is a .def file (1st line 4398caade7ccSmrg # is EXPORTS), use it as is; otherwise, prepend... 4399caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4400caade7ccSmrg cp $export_symbols $output_objdir/$soname.def; 4401caade7ccSmrg else 4402caade7ccSmrg echo EXPORTS > $output_objdir/$soname.def; 4403caade7ccSmrg cat $export_symbols >> $output_objdir/$soname.def; 4404caade7ccSmrg fi~ 4405caade7ccSmrg $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' 4406caade7ccSmrg else 4407caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4408caade7ccSmrg fi 4409caade7ccSmrg ;; 4410caade7ccSmrg darwin* | rhapsody*) 4411caade7ccSmrg case $host_os in 4412caade7ccSmrg rhapsody* | darwin1.[[012]]) 4413caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 4414caade7ccSmrg ;; 4415caade7ccSmrg *) # Darwin 1.3 on 4416caade7ccSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 4417caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4418caade7ccSmrg else 4419caade7ccSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 4420caade7ccSmrg 10.[[012]]) 4421caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4422caade7ccSmrg ;; 4423caade7ccSmrg 10.*) 4424caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 4425caade7ccSmrg ;; 4426caade7ccSmrg esac 4427caade7ccSmrg fi 4428caade7ccSmrg ;; 4429caade7ccSmrg esac 4430caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4431caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4432caade7ccSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 4433caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4434caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 4435caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4436caade7ccSmrg 4437caade7ccSmrg if test "$GXX" = yes ; then 4438caade7ccSmrg lt_int_apple_cc_single_mod=no 4439caade7ccSmrg output_verbose_link_cmd='echo' 4440caade7ccSmrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 4441caade7ccSmrg lt_int_apple_cc_single_mod=yes 4442caade7ccSmrg fi 4443caade7ccSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4444caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 4445caade7ccSmrg else 4446caade7ccSmrg _LT_AC_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' 4447caade7ccSmrg fi 4448caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4449caade7ccSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4450caade7ccSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4451caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4452caade7ccSmrg else 4453caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4454caade7ccSmrg fi 4455caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4456caade7ccSmrg else 4457caade7ccSmrg case $cc_basename in 4458caade7ccSmrg xlc*) 4459caade7ccSmrg output_verbose_link_cmd='echo' 4460caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 4461caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4462caade7ccSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4463caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4464caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4465caade7ccSmrg ;; 4466caade7ccSmrg *) 4467caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4468caade7ccSmrg ;; 4469caade7ccSmrg esac 4470caade7ccSmrg fi 4471caade7ccSmrg ;; 4472caade7ccSmrg 4473caade7ccSmrg dgux*) 4474caade7ccSmrg case $cc_basename in 4475caade7ccSmrg ec++*) 4476caade7ccSmrg # FIXME: insert proper C++ library support 4477caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4478caade7ccSmrg ;; 4479caade7ccSmrg ghcx*) 4480caade7ccSmrg # Green Hills C++ Compiler 4481caade7ccSmrg # FIXME: insert proper C++ library support 4482caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4483caade7ccSmrg ;; 4484caade7ccSmrg *) 4485caade7ccSmrg # FIXME: insert proper C++ library support 4486caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4487caade7ccSmrg ;; 4488caade7ccSmrg esac 4489caade7ccSmrg ;; 4490caade7ccSmrg freebsd[[12]]*) 4491caade7ccSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 4492caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4493caade7ccSmrg ;; 4494caade7ccSmrg freebsd-elf*) 4495caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4496caade7ccSmrg ;; 4497caade7ccSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 4498caade7ccSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 4499caade7ccSmrg # conventions 4500caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 4501caade7ccSmrg ;; 4502caade7ccSmrg gnu*) 4503caade7ccSmrg ;; 4504caade7ccSmrg hpux9*) 4505caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4506caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4507caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4508caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4509caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4510caade7ccSmrg # but as the default 4511caade7ccSmrg # location of the library. 4512caade7ccSmrg 4513caade7ccSmrg case $cc_basename in 4514caade7ccSmrg CC*) 4515caade7ccSmrg # FIXME: insert proper C++ library support 4516caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4517caade7ccSmrg ;; 4518caade7ccSmrg aCC*) 4519caade7ccSmrg _LT_AC_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' 4520caade7ccSmrg # Commands to make compiler produce verbose output that lists 4521caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4522caade7ccSmrg # linking a shared library. 4523caade7ccSmrg # 4524caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4525caade7ccSmrg # explicitly linking system object files so we need to strip them 4526caade7ccSmrg # from the output so that they don't get included in the library 4527caade7ccSmrg # dependencies. 4528caade7ccSmrg 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 $list' 4529caade7ccSmrg ;; 4530caade7ccSmrg *) 4531caade7ccSmrg if test "$GXX" = yes; then 4532caade7ccSmrg _LT_AC_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' 4533caade7ccSmrg else 4534caade7ccSmrg # FIXME: insert proper C++ library support 4535caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4536caade7ccSmrg fi 4537caade7ccSmrg ;; 4538caade7ccSmrg esac 4539caade7ccSmrg ;; 4540caade7ccSmrg hpux10*|hpux11*) 4541caade7ccSmrg if test $with_gnu_ld = no; then 4542caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4543caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4544caade7ccSmrg 4545caade7ccSmrg case $host_cpu in 4546caade7ccSmrg hppa*64*|ia64*) 4547caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4548caade7ccSmrg ;; 4549caade7ccSmrg *) 4550caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4551caade7ccSmrg ;; 4552caade7ccSmrg esac 4553caade7ccSmrg fi 4554caade7ccSmrg case $host_cpu in 4555caade7ccSmrg hppa*64*|ia64*) 4556caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4557caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4558caade7ccSmrg ;; 4559caade7ccSmrg *) 4560caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4561caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4562caade7ccSmrg # but as the default 4563caade7ccSmrg # location of the library. 4564caade7ccSmrg ;; 4565caade7ccSmrg esac 4566caade7ccSmrg 4567caade7ccSmrg case $cc_basename in 4568caade7ccSmrg CC*) 4569caade7ccSmrg # FIXME: insert proper C++ library support 4570caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4571caade7ccSmrg ;; 4572caade7ccSmrg aCC*) 4573caade7ccSmrg case $host_cpu in 4574caade7ccSmrg hppa*64*) 4575caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4576caade7ccSmrg ;; 4577caade7ccSmrg ia64*) 4578caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4579caade7ccSmrg ;; 4580caade7ccSmrg *) 4581caade7ccSmrg _LT_AC_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' 4582caade7ccSmrg ;; 4583caade7ccSmrg esac 4584caade7ccSmrg # Commands to make compiler produce verbose output that lists 4585caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4586caade7ccSmrg # linking a shared library. 4587caade7ccSmrg # 4588caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4589caade7ccSmrg # explicitly linking system object files so we need to strip them 4590caade7ccSmrg # from the output so that they don't get included in the library 4591caade7ccSmrg # dependencies. 4592caade7ccSmrg 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 $list' 4593caade7ccSmrg ;; 4594caade7ccSmrg *) 4595caade7ccSmrg if test "$GXX" = yes; then 4596caade7ccSmrg if test $with_gnu_ld = no; then 4597caade7ccSmrg case $host_cpu in 4598caade7ccSmrg hppa*64*) 4599caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4600caade7ccSmrg ;; 4601caade7ccSmrg ia64*) 4602caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4603caade7ccSmrg ;; 4604caade7ccSmrg *) 4605caade7ccSmrg _LT_AC_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' 4606caade7ccSmrg ;; 4607caade7ccSmrg esac 4608caade7ccSmrg fi 4609caade7ccSmrg else 4610caade7ccSmrg # FIXME: insert proper C++ library support 4611caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4612caade7ccSmrg fi 4613caade7ccSmrg ;; 4614caade7ccSmrg esac 4615caade7ccSmrg ;; 4616caade7ccSmrg interix3*) 4617caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4618caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4619caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4620caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4621caade7ccSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4622caade7ccSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4623caade7ccSmrg # default) and relocated if they conflict, which is a slow very memory 4624caade7ccSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4625caade7ccSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4626caade7ccSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4627caade7ccSmrg _LT_AC_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' 4628caade7ccSmrg _LT_AC_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' 4629caade7ccSmrg ;; 4630caade7ccSmrg irix5* | irix6*) 4631caade7ccSmrg case $cc_basename in 4632caade7ccSmrg CC*) 4633caade7ccSmrg # SGI C++ 4634caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4635caade7ccSmrg 4636caade7ccSmrg # Archives containing C++ object files must be created using 4637caade7ccSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 4638caade7ccSmrg # necessary to make sure instantiated templates are included 4639caade7ccSmrg # in the archive. 4640caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 4641caade7ccSmrg ;; 4642caade7ccSmrg *) 4643caade7ccSmrg if test "$GXX" = yes; then 4644caade7ccSmrg if test "$with_gnu_ld" = no; then 4645caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4646caade7ccSmrg else 4647caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 4648caade7ccSmrg fi 4649caade7ccSmrg fi 4650caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4651caade7ccSmrg ;; 4652caade7ccSmrg esac 4653caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4654caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4655caade7ccSmrg ;; 4656caade7ccSmrg linux*) 4657caade7ccSmrg case $cc_basename in 4658caade7ccSmrg KCC*) 4659caade7ccSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4660caade7ccSmrg 4661caade7ccSmrg # KCC will only create a shared library if the output file 4662caade7ccSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4663caade7ccSmrg # to its proper name (with version) after linking. 4664caade7ccSmrg _LT_AC_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' 4665caade7ccSmrg _LT_AC_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' 4666caade7ccSmrg # Commands to make compiler produce verbose output that lists 4667caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4668caade7ccSmrg # linking a shared library. 4669caade7ccSmrg # 4670caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4671caade7ccSmrg # explicitly linking system object files so we need to strip them 4672caade7ccSmrg # from the output so that they don't get included in the library 4673caade7ccSmrg # dependencies. 4674caade7ccSmrg 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 $list' 4675caade7ccSmrg 4676caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 4677caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4678caade7ccSmrg 4679caade7ccSmrg # Archives containing C++ object files must be created using 4680caade7ccSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4681caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4682caade7ccSmrg ;; 4683caade7ccSmrg icpc*) 4684caade7ccSmrg # Intel C++ 4685caade7ccSmrg with_gnu_ld=yes 4686caade7ccSmrg # version 8.0 and above of icpc choke on multiply defined symbols 4687caade7ccSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 4688caade7ccSmrg # earlier do not add the objects themselves. 4689caade7ccSmrg case `$CC -V 2>&1` in 4690caade7ccSmrg *"Version 7."*) 4691caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4692caade7ccSmrg _LT_AC_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' 4693caade7ccSmrg ;; 4694caade7ccSmrg *) # Version 8.0 or newer 4695caade7ccSmrg tmp_idyn= 4696caade7ccSmrg case $host_cpu in 4697caade7ccSmrg ia64*) tmp_idyn=' -i_dynamic';; 4698caade7ccSmrg esac 4699caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4700caade7ccSmrg _LT_AC_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' 4701caade7ccSmrg ;; 4702caade7ccSmrg esac 4703caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4704caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4705caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4706caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 4707caade7ccSmrg ;; 4708caade7ccSmrg pgCC*) 4709caade7ccSmrg # Portland Group C++ compiler 4710caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 4711caade7ccSmrg _LT_AC_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' 4712caade7ccSmrg 4713caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4714caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4715caade7ccSmrg _LT_AC_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' 4716caade7ccSmrg ;; 4717caade7ccSmrg cxx*) 4718caade7ccSmrg # Compaq C++ 4719caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4720caade7ccSmrg _LT_AC_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' 4721caade7ccSmrg 4722caade7ccSmrg runpath_var=LD_RUN_PATH 4723caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4724caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4725caade7ccSmrg 4726caade7ccSmrg # Commands to make compiler produce verbose output that lists 4727caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4728caade7ccSmrg # linking a shared library. 4729caade7ccSmrg # 4730caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4731caade7ccSmrg # explicitly linking system object files so we need to strip them 4732caade7ccSmrg # from the output so that they don't get included in the library 4733caade7ccSmrg # dependencies. 4734caade7ccSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4735caade7ccSmrg ;; 4736caade7ccSmrg esac 4737caade7ccSmrg ;; 4738caade7ccSmrg lynxos*) 4739caade7ccSmrg # FIXME: insert proper C++ library support 4740caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4741caade7ccSmrg ;; 4742caade7ccSmrg m88k*) 4743caade7ccSmrg # FIXME: insert proper C++ library support 4744caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4745caade7ccSmrg ;; 4746caade7ccSmrg mvs*) 4747caade7ccSmrg case $cc_basename in 4748caade7ccSmrg cxx*) 4749caade7ccSmrg # FIXME: insert proper C++ library support 4750caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4751caade7ccSmrg ;; 4752caade7ccSmrg *) 4753caade7ccSmrg # FIXME: insert proper C++ library support 4754caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4755caade7ccSmrg ;; 4756caade7ccSmrg esac 4757caade7ccSmrg ;; 4758caade7ccSmrg netbsd*) 4759caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 4760caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 4761caade7ccSmrg wlarc= 4762caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4763caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4764caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4765caade7ccSmrg fi 4766caade7ccSmrg # Workaround some broken pre-1.5 toolchains 4767caade7ccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 4768caade7ccSmrg ;; 4769caade7ccSmrg openbsd2*) 4770caade7ccSmrg # C++ shared libraries are fairly broken 4771caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4772caade7ccSmrg ;; 4773caade7ccSmrg openbsd*) 4774caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4775caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4776caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4777caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4778caade7ccSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4779caade7ccSmrg _LT_AC_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' 4780caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4781caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4782caade7ccSmrg fi 4783caade7ccSmrg output_verbose_link_cmd='echo' 4784caade7ccSmrg ;; 4785caade7ccSmrg osf3*) 4786caade7ccSmrg case $cc_basename in 4787caade7ccSmrg KCC*) 4788caade7ccSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4789caade7ccSmrg 4790caade7ccSmrg # KCC will only create a shared library if the output file 4791caade7ccSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4792caade7ccSmrg # to its proper name (with version) after linking. 4793caade7ccSmrg _LT_AC_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' 4794caade7ccSmrg 4795caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4796caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4797caade7ccSmrg 4798caade7ccSmrg # Archives containing C++ object files must be created using 4799caade7ccSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4800caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4801caade7ccSmrg 4802caade7ccSmrg ;; 4803caade7ccSmrg RCC*) 4804caade7ccSmrg # Rational C++ 2.4.1 4805caade7ccSmrg # FIXME: insert proper C++ library support 4806caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4807caade7ccSmrg ;; 4808caade7ccSmrg cxx*) 4809caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4810caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4811caade7ccSmrg 4812caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4813caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4814caade7ccSmrg 4815caade7ccSmrg # Commands to make compiler produce verbose output that lists 4816caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4817caade7ccSmrg # linking a shared library. 4818caade7ccSmrg # 4819caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4820caade7ccSmrg # explicitly linking system object files so we need to strip them 4821caade7ccSmrg # from the output so that they don't get included in the library 4822caade7ccSmrg # dependencies. 4823caade7ccSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4824caade7ccSmrg ;; 4825caade7ccSmrg *) 4826caade7ccSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4827caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4828caade7ccSmrg _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4829caade7ccSmrg 4830caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4831caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4832caade7ccSmrg 4833caade7ccSmrg # Commands to make compiler produce verbose output that lists 4834caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4835caade7ccSmrg # linking a shared library. 4836caade7ccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4837caade7ccSmrg 4838caade7ccSmrg else 4839caade7ccSmrg # FIXME: insert proper C++ library support 4840caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4841caade7ccSmrg fi 4842caade7ccSmrg ;; 4843caade7ccSmrg esac 4844caade7ccSmrg ;; 4845caade7ccSmrg osf4* | osf5*) 4846caade7ccSmrg case $cc_basename in 4847caade7ccSmrg KCC*) 4848caade7ccSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4849caade7ccSmrg 4850caade7ccSmrg # KCC will only create a shared library if the output file 4851caade7ccSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4852caade7ccSmrg # to its proper name (with version) after linking. 4853caade7ccSmrg _LT_AC_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' 4854caade7ccSmrg 4855caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4856caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4857caade7ccSmrg 4858caade7ccSmrg # Archives containing C++ object files must be created using 4859caade7ccSmrg # the KAI C++ compiler. 4860caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 4861caade7ccSmrg ;; 4862caade7ccSmrg RCC*) 4863caade7ccSmrg # Rational C++ 2.4.1 4864caade7ccSmrg # FIXME: insert proper C++ library support 4865caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4866caade7ccSmrg ;; 4867caade7ccSmrg cxx*) 4868caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4869caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4870caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 4871caade7ccSmrg echo "-hidden">> $lib.exp~ 4872caade7ccSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ 4873caade7ccSmrg $rm $lib.exp' 4874caade7ccSmrg 4875caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4876caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4877caade7ccSmrg 4878caade7ccSmrg # Commands to make compiler produce verbose output that lists 4879caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4880caade7ccSmrg # linking a shared library. 4881caade7ccSmrg # 4882caade7ccSmrg # There doesn't appear to be a way to prevent this compiler from 4883caade7ccSmrg # explicitly linking system object files so we need to strip them 4884caade7ccSmrg # from the output so that they don't get included in the library 4885caade7ccSmrg # dependencies. 4886caade7ccSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4887caade7ccSmrg ;; 4888caade7ccSmrg *) 4889caade7ccSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4890caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4891caade7ccSmrg _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4892caade7ccSmrg 4893caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4894caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4895caade7ccSmrg 4896caade7ccSmrg # Commands to make compiler produce verbose output that lists 4897caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4898caade7ccSmrg # linking a shared library. 4899caade7ccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4900caade7ccSmrg 4901caade7ccSmrg else 4902caade7ccSmrg # FIXME: insert proper C++ library support 4903caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4904caade7ccSmrg fi 4905caade7ccSmrg ;; 4906caade7ccSmrg esac 4907caade7ccSmrg ;; 4908caade7ccSmrg psos*) 4909caade7ccSmrg # FIXME: insert proper C++ library support 4910caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4911caade7ccSmrg ;; 4912caade7ccSmrg sunos4*) 4913caade7ccSmrg case $cc_basename in 4914caade7ccSmrg CC*) 4915caade7ccSmrg # Sun C++ 4.x 4916caade7ccSmrg # FIXME: insert proper C++ library support 4917caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4918caade7ccSmrg ;; 4919caade7ccSmrg lcc*) 4920caade7ccSmrg # Lucid 4921caade7ccSmrg # FIXME: insert proper C++ library support 4922caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4923caade7ccSmrg ;; 4924caade7ccSmrg *) 4925caade7ccSmrg # FIXME: insert proper C++ library support 4926caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4927caade7ccSmrg ;; 4928caade7ccSmrg esac 4929caade7ccSmrg ;; 4930caade7ccSmrg solaris*) 4931caade7ccSmrg case $cc_basename in 4932caade7ccSmrg CC*) 4933caade7ccSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4934caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 4935caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 4936caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4937caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4938caade7ccSmrg $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' 4939caade7ccSmrg 4940caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4941caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4942caade7ccSmrg case $host_os in 4943caade7ccSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4944caade7ccSmrg *) 4945caade7ccSmrg # The C++ compiler is used as linker so we must use $wl 4946caade7ccSmrg # flag to pass the commands to the underlying system 4947caade7ccSmrg # linker. We must also pass each convience library through 4948caade7ccSmrg # to the system linker between allextract/defaultextract. 4949caade7ccSmrg # The C++ compiler will combine linker options so we 4950caade7ccSmrg # cannot just pass the convience library names through 4951caade7ccSmrg # without $wl. 4952caade7ccSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4953caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 4954caade7ccSmrg ;; 4955caade7ccSmrg esac 4956caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4957caade7ccSmrg 4958caade7ccSmrg output_verbose_link_cmd='echo' 4959caade7ccSmrg 4960caade7ccSmrg # Archives containing C++ object files must be created using 4961caade7ccSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 4962caade7ccSmrg # necessary to make sure instantiated templates are included 4963caade7ccSmrg # in the archive. 4964caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 4965caade7ccSmrg ;; 4966caade7ccSmrg gcx*) 4967caade7ccSmrg # Green Hills C++ Compiler 4968caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4969caade7ccSmrg 4970caade7ccSmrg # The C++ compiler must be used to create the archive. 4971caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 4972caade7ccSmrg ;; 4973caade7ccSmrg *) 4974caade7ccSmrg # GNU C++ compiler with Solaris linker 4975caade7ccSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4976caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 4977caade7ccSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 4978caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4979caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4980caade7ccSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4981caade7ccSmrg 4982caade7ccSmrg # Commands to make compiler produce verbose output that lists 4983caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4984caade7ccSmrg # linking a shared library. 4985caade7ccSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4986caade7ccSmrg else 4987caade7ccSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 4988caade7ccSmrg # platform. 4989caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4990caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4991caade7ccSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4992caade7ccSmrg 4993caade7ccSmrg # Commands to make compiler produce verbose output that lists 4994caade7ccSmrg # what "hidden" libraries, object files and flags are used when 4995caade7ccSmrg # linking a shared library. 4996caade7ccSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4997caade7ccSmrg fi 4998caade7ccSmrg 4999caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 5000caade7ccSmrg fi 5001caade7ccSmrg ;; 5002caade7ccSmrg esac 5003caade7ccSmrg ;; 5004caade7ccSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5005caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5006caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5007caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5008caade7ccSmrg runpath_var='LD_RUN_PATH' 5009caade7ccSmrg 5010caade7ccSmrg case $cc_basename in 5011caade7ccSmrg CC*) 5012caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5013caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5014caade7ccSmrg ;; 5015caade7ccSmrg *) 5016caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5017caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5018caade7ccSmrg ;; 5019caade7ccSmrg esac 5020caade7ccSmrg ;; 5021caade7ccSmrg sysv5* | sco3.2v5* | sco5v6*) 5022caade7ccSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5023caade7ccSmrg # link with -lc, and that would cause any symbols used from libc to 5024caade7ccSmrg # always be unresolved, which means just about no library would 5025caade7ccSmrg # ever link correctly. If we're not using GNU ld we use -z text 5026caade7ccSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5027caade7ccSmrg # as -z defs. 5028caade7ccSmrg # For security reasons, it is highly recommended that you always 5029caade7ccSmrg # use absolute paths for naming shared libraries, and exclude the 5030caade7ccSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5031caade7ccSmrg # requires that you compile everything twice, which is a pain. 5032caade7ccSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 5033caade7ccSmrg # non-empty value in the environment. Most likely only useful for 5034caade7ccSmrg # creating official distributions of packages. 5035caade7ccSmrg # This is a hack until libtool officially supports absolute path 5036caade7ccSmrg # names for shared libraries. 5037caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5038caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5039caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5040caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5041caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 5042caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5043caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5044caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5045caade7ccSmrg runpath_var='LD_RUN_PATH' 5046caade7ccSmrg 5047caade7ccSmrg case $cc_basename in 5048caade7ccSmrg CC*) 5049caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5050caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5051caade7ccSmrg ;; 5052caade7ccSmrg *) 5053caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5054caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5055caade7ccSmrg ;; 5056caade7ccSmrg esac 5057caade7ccSmrg ;; 5058caade7ccSmrg tandem*) 5059caade7ccSmrg case $cc_basename in 5060caade7ccSmrg NCC*) 5061caade7ccSmrg # NonStop-UX NCC 3.20 5062caade7ccSmrg # FIXME: insert proper C++ library support 5063caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5064caade7ccSmrg ;; 5065caade7ccSmrg *) 5066caade7ccSmrg # FIXME: insert proper C++ library support 5067caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5068caade7ccSmrg ;; 5069caade7ccSmrg esac 5070caade7ccSmrg ;; 5071caade7ccSmrg vxworks*) 5072caade7ccSmrg # FIXME: insert proper C++ library support 5073caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5074caade7ccSmrg ;; 5075caade7ccSmrg *) 5076caade7ccSmrg # FIXME: insert proper C++ library support 5077caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5078caade7ccSmrg ;; 5079caade7ccSmrgesac 5080caade7ccSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 5081caade7ccSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5082caade7ccSmrg 5083caade7ccSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 5084caade7ccSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 5085caade7ccSmrg 5086caade7ccSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 5087caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5088caade7ccSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5089caade7ccSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5090caade7ccSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5091caade7ccSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5092caade7ccSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5093caade7ccSmrg 5094caade7ccSmrgAC_LIBTOOL_CONFIG($1) 5095caade7ccSmrg 5096caade7ccSmrgAC_LANG_POP 5097caade7ccSmrgCC=$lt_save_CC 5098caade7ccSmrgLDCXX=$LD 5099caade7ccSmrgLD=$lt_save_LD 5100caade7ccSmrgGCC=$lt_save_GCC 5101caade7ccSmrgwith_gnu_ldcxx=$with_gnu_ld 5102caade7ccSmrgwith_gnu_ld=$lt_save_with_gnu_ld 5103caade7ccSmrglt_cv_path_LDCXX=$lt_cv_path_LD 5104caade7ccSmrglt_cv_path_LD=$lt_save_path_LD 5105caade7ccSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 5106caade7ccSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 5107caade7ccSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 5108caade7ccSmrg 5109caade7ccSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 5110caade7ccSmrg# ------------------------------------ 5111caade7ccSmrg# Figure out "hidden" library dependencies from verbose 5112caade7ccSmrg# compiler output when linking a shared library. 5113caade7ccSmrg# Parse the compiler output and extract the necessary 5114caade7ccSmrg# objects, libraries and library flags. 5115caade7ccSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 5116caade7ccSmrgdnl we can't use the lt_simple_compile_test_code here, 5117caade7ccSmrgdnl because it contains code intended for an executable, 5118caade7ccSmrgdnl not a library. It's possible we should let each 5119caade7ccSmrgdnl tag define a new lt_????_link_test_code variable, 5120caade7ccSmrgdnl but it's only used here... 5121caade7ccSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 5122caade7ccSmrgint a; 5123caade7ccSmrgvoid foo (void) { a = 0; } 5124caade7ccSmrgEOF 5125caade7ccSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 5126caade7ccSmrgclass Foo 5127caade7ccSmrg{ 5128caade7ccSmrgpublic: 5129caade7ccSmrg Foo (void) { a = 0; } 5130caade7ccSmrgprivate: 5131caade7ccSmrg int a; 5132caade7ccSmrg}; 5133caade7ccSmrgEOF 5134caade7ccSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 5135caade7ccSmrg subroutine foo 5136caade7ccSmrg implicit none 5137caade7ccSmrg integer*4 a 5138caade7ccSmrg a=0 5139caade7ccSmrg return 5140caade7ccSmrg end 5141caade7ccSmrgEOF 5142caade7ccSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 5143caade7ccSmrgpublic class foo { 5144caade7ccSmrg private int a; 5145caade7ccSmrg public void bar (void) { 5146caade7ccSmrg a = 0; 5147caade7ccSmrg } 5148caade7ccSmrg}; 5149caade7ccSmrgEOF 5150caade7ccSmrg]) 5151caade7ccSmrgdnl Parse the compiler output and extract the necessary 5152caade7ccSmrgdnl objects, libraries and library flags. 5153caade7ccSmrgif AC_TRY_EVAL(ac_compile); then 5154caade7ccSmrg # Parse the compiler output and extract the necessary 5155caade7ccSmrg # objects, libraries and library flags. 5156caade7ccSmrg 5157caade7ccSmrg # Sentinel used to keep track of whether or not we are before 5158caade7ccSmrg # the conftest object file. 5159caade7ccSmrg pre_test_object_deps_done=no 5160caade7ccSmrg 5161caade7ccSmrg # The `*' in the case matches for architectures that use `case' in 5162caade7ccSmrg # $output_verbose_cmd can trigger glob expansion during the loop 5163caade7ccSmrg # eval without this substitution. 5164caade7ccSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 5165caade7ccSmrg 5166caade7ccSmrg for p in `eval $output_verbose_link_cmd`; do 5167caade7ccSmrg case $p in 5168caade7ccSmrg 5169caade7ccSmrg -L* | -R* | -l*) 5170caade7ccSmrg # Some compilers place space between "-{L,R}" and the path. 5171caade7ccSmrg # Remove the space. 5172caade7ccSmrg if test $p = "-L" \ 5173caade7ccSmrg || test $p = "-R"; then 5174caade7ccSmrg prev=$p 5175caade7ccSmrg continue 5176caade7ccSmrg else 5177caade7ccSmrg prev= 5178caade7ccSmrg fi 5179caade7ccSmrg 5180caade7ccSmrg if test "$pre_test_object_deps_done" = no; then 5181caade7ccSmrg case $p in 5182caade7ccSmrg -L* | -R*) 5183caade7ccSmrg # Internal compiler library paths should come after those 5184caade7ccSmrg # provided the user. The postdeps already come after the 5185caade7ccSmrg # user supplied libs so there is no need to process them. 5186caade7ccSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 5187caade7ccSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 5188caade7ccSmrg else 5189caade7ccSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 5190caade7ccSmrg fi 5191caade7ccSmrg ;; 5192caade7ccSmrg # The "-l" case would never come before the object being 5193caade7ccSmrg # linked, so don't bother handling this case. 5194caade7ccSmrg esac 5195caade7ccSmrg else 5196caade7ccSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 5197caade7ccSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 5198caade7ccSmrg else 5199caade7ccSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 5200caade7ccSmrg fi 5201caade7ccSmrg fi 5202caade7ccSmrg ;; 5203caade7ccSmrg 5204caade7ccSmrg *.$objext) 5205caade7ccSmrg # This assumes that the test object file only shows up 5206caade7ccSmrg # once in the compiler output. 5207caade7ccSmrg if test "$p" = "conftest.$objext"; then 5208caade7ccSmrg pre_test_object_deps_done=yes 5209caade7ccSmrg continue 5210caade7ccSmrg fi 5211caade7ccSmrg 5212caade7ccSmrg if test "$pre_test_object_deps_done" = no; then 5213caade7ccSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 5214caade7ccSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 5215caade7ccSmrg else 5216caade7ccSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 5217caade7ccSmrg fi 5218caade7ccSmrg else 5219caade7ccSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 5220caade7ccSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 5221caade7ccSmrg else 5222caade7ccSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 5223caade7ccSmrg fi 5224caade7ccSmrg fi 5225caade7ccSmrg ;; 5226caade7ccSmrg 5227caade7ccSmrg *) ;; # Ignore the rest. 5228caade7ccSmrg 5229caade7ccSmrg esac 5230caade7ccSmrg done 5231caade7ccSmrg 5232caade7ccSmrg # Clean up. 5233caade7ccSmrg rm -f a.out a.exe 5234caade7ccSmrgelse 5235caade7ccSmrg echo "libtool.m4: error: problem compiling $1 test program" 5236caade7ccSmrgfi 5237caade7ccSmrg 5238caade7ccSmrg$rm -f confest.$objext 5239caade7ccSmrg 5240caade7ccSmrg# PORTME: override above test on systems where it is broken 5241caade7ccSmrgifelse([$1],[CXX], 5242caade7ccSmrg[case $host_os in 5243caade7ccSmrginterix3*) 5244caade7ccSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 5245caade7ccSmrg # hack all around it, let's just trust "g++" to DTRT. 5246caade7ccSmrg _LT_AC_TAGVAR(predep_objects,$1)= 5247caade7ccSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 5248caade7ccSmrg _LT_AC_TAGVAR(postdeps,$1)= 5249caade7ccSmrg ;; 5250caade7ccSmrg 5251caade7ccSmrgsolaris*) 5252caade7ccSmrg case $cc_basename in 5253caade7ccSmrg CC*) 5254caade7ccSmrg # Adding this requires a known-good setup of shared libraries for 5255caade7ccSmrg # Sun compiler versions before 5.6, else PIC objects from an old 5256caade7ccSmrg # archive will be linked into the output, leading to subtle bugs. 5257caade7ccSmrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 5258caade7ccSmrg ;; 5259caade7ccSmrg esac 5260caade7ccSmrg ;; 5261caade7ccSmrgesac 5262caade7ccSmrg]) 5263caade7ccSmrg 5264caade7ccSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 5265caade7ccSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 5266caade7ccSmrgesac 5267caade7ccSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 5268caade7ccSmrg 5269caade7ccSmrg# AC_LIBTOOL_LANG_F77_CONFIG 5270caade7ccSmrg# -------------------------- 5271caade7ccSmrg# Ensure that the configuration vars for the C compiler are 5272caade7ccSmrg# suitably defined. Those variables are subsequently used by 5273caade7ccSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5274caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 5275caade7ccSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 5276caade7ccSmrg[AC_REQUIRE([AC_PROG_F77]) 5277caade7ccSmrgAC_LANG_PUSH(Fortran 77) 5278caade7ccSmrg 5279caade7ccSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5280caade7ccSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 5281caade7ccSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 5282caade7ccSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5283caade7ccSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5284caade7ccSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 5285caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5286caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5287caade7ccSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5288caade7ccSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5289caade7ccSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 5290caade7ccSmrg_LT_AC_TAGVAR(module_cmds, $1)= 5291caade7ccSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 5292caade7ccSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5293caade7ccSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5294caade7ccSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 5295caade7ccSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5296caade7ccSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5297caade7ccSmrg 5298caade7ccSmrg# Source file extension for f77 test sources. 5299caade7ccSmrgac_ext=f 5300caade7ccSmrg 5301caade7ccSmrg# Object file extension for compiled f77 test sources. 5302caade7ccSmrgobjext=o 5303caade7ccSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5304caade7ccSmrg 5305caade7ccSmrg# Code to be used in simple compile tests 5306caade7ccSmrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 5307caade7ccSmrg 5308caade7ccSmrg# Code to be used in simple link tests 5309caade7ccSmrglt_simple_link_test_code=" program t\n end\n" 5310caade7ccSmrg 5311caade7ccSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5312caade7ccSmrg_LT_AC_SYS_COMPILER 5313caade7ccSmrg 5314caade7ccSmrg# save warnings/boilerplate of simple test code 5315caade7ccSmrg_LT_COMPILER_BOILERPLATE 5316caade7ccSmrg_LT_LINKER_BOILERPLATE 5317caade7ccSmrg 5318caade7ccSmrg# Allow CC to be a program name with arguments. 5319caade7ccSmrglt_save_CC="$CC" 5320caade7ccSmrgCC=${F77-"f77"} 5321caade7ccSmrgcompiler=$CC 5322caade7ccSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5323caade7ccSmrg_LT_CC_BASENAME([$compiler]) 5324caade7ccSmrg 5325caade7ccSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 5326caade7ccSmrgAC_MSG_RESULT([$can_build_shared]) 5327caade7ccSmrg 5328caade7ccSmrgAC_MSG_CHECKING([whether to build shared libraries]) 5329caade7ccSmrgtest "$can_build_shared" = "no" && enable_shared=no 5330caade7ccSmrg 5331caade7ccSmrg# On AIX, shared libraries and static libraries use the same namespace, and 5332caade7ccSmrg# are all built from PIC. 5333caade7ccSmrgcase $host_os in 5334caade7ccSmrgaix3*) 5335caade7ccSmrg test "$enable_shared" = yes && enable_static=no 5336caade7ccSmrg if test -n "$RANLIB"; then 5337caade7ccSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5338caade7ccSmrg postinstall_cmds='$RANLIB $lib' 5339caade7ccSmrg fi 5340caade7ccSmrg ;; 5341caade7ccSmrgaix4* | aix5*) 5342caade7ccSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5343caade7ccSmrg test "$enable_shared" = yes && enable_static=no 5344caade7ccSmrg fi 5345caade7ccSmrg ;; 5346caade7ccSmrgesac 5347caade7ccSmrgAC_MSG_RESULT([$enable_shared]) 5348caade7ccSmrg 5349caade7ccSmrgAC_MSG_CHECKING([whether to build static libraries]) 5350caade7ccSmrg# Make sure either enable_shared or enable_static is yes. 5351caade7ccSmrgtest "$enable_shared" = yes || enable_static=yes 5352caade7ccSmrgAC_MSG_RESULT([$enable_static]) 5353caade7ccSmrg 5354caade7ccSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 5355caade7ccSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 5356caade7ccSmrg 5357caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5358caade7ccSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5359caade7ccSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5360caade7ccSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5361caade7ccSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5362caade7ccSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5363caade7ccSmrg 5364caade7ccSmrgAC_LIBTOOL_CONFIG($1) 5365caade7ccSmrg 5366caade7ccSmrgAC_LANG_POP 5367caade7ccSmrgCC="$lt_save_CC" 5368caade7ccSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 5369caade7ccSmrg 5370caade7ccSmrg 5371caade7ccSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 5372caade7ccSmrg# -------------------------- 5373caade7ccSmrg# Ensure that the configuration vars for the C compiler are 5374caade7ccSmrg# suitably defined. Those variables are subsequently used by 5375caade7ccSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5376caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 5377caade7ccSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 5378caade7ccSmrg[AC_LANG_SAVE 5379caade7ccSmrg 5380caade7ccSmrg# Source file extension for Java test sources. 5381caade7ccSmrgac_ext=java 5382caade7ccSmrg 5383caade7ccSmrg# Object file extension for compiled Java test sources. 5384caade7ccSmrgobjext=o 5385caade7ccSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5386caade7ccSmrg 5387caade7ccSmrg# Code to be used in simple compile tests 5388caade7ccSmrglt_simple_compile_test_code="class foo {}\n" 5389caade7ccSmrg 5390caade7ccSmrg# Code to be used in simple link tests 5391caade7ccSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 5392caade7ccSmrg 5393caade7ccSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5394caade7ccSmrg_LT_AC_SYS_COMPILER 5395caade7ccSmrg 5396caade7ccSmrg# save warnings/boilerplate of simple test code 5397caade7ccSmrg_LT_COMPILER_BOILERPLATE 5398caade7ccSmrg_LT_LINKER_BOILERPLATE 5399caade7ccSmrg 5400caade7ccSmrg# Allow CC to be a program name with arguments. 5401caade7ccSmrglt_save_CC="$CC" 5402caade7ccSmrgCC=${GCJ-"gcj"} 5403caade7ccSmrgcompiler=$CC 5404caade7ccSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5405caade7ccSmrg_LT_CC_BASENAME([$compiler]) 5406caade7ccSmrg 5407caade7ccSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 5408caade7ccSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5409caade7ccSmrg 5410caade7ccSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5411caade7ccSmrg 5412caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 5413caade7ccSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5414caade7ccSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5415caade7ccSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5416caade7ccSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5417caade7ccSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5418caade7ccSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5419caade7ccSmrg 5420caade7ccSmrgAC_LIBTOOL_CONFIG($1) 5421caade7ccSmrg 5422caade7ccSmrgAC_LANG_RESTORE 5423caade7ccSmrgCC="$lt_save_CC" 5424caade7ccSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 5425caade7ccSmrg 5426caade7ccSmrg 5427caade7ccSmrg# AC_LIBTOOL_LANG_RC_CONFIG 5428caade7ccSmrg# ------------------------- 5429caade7ccSmrg# Ensure that the configuration vars for the Windows resource compiler are 5430caade7ccSmrg# suitably defined. Those variables are subsequently used by 5431caade7ccSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5432caade7ccSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 5433caade7ccSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 5434caade7ccSmrg[AC_LANG_SAVE 5435caade7ccSmrg 5436caade7ccSmrg# Source file extension for RC test sources. 5437caade7ccSmrgac_ext=rc 5438caade7ccSmrg 5439caade7ccSmrg# Object file extension for compiled RC test sources. 5440caade7ccSmrgobjext=o 5441caade7ccSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5442caade7ccSmrg 5443caade7ccSmrg# Code to be used in simple compile tests 5444caade7ccSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 5445caade7ccSmrg 5446caade7ccSmrg# Code to be used in simple link tests 5447caade7ccSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 5448caade7ccSmrg 5449caade7ccSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5450caade7ccSmrg_LT_AC_SYS_COMPILER 5451caade7ccSmrg 5452caade7ccSmrg# save warnings/boilerplate of simple test code 5453caade7ccSmrg_LT_COMPILER_BOILERPLATE 5454caade7ccSmrg_LT_LINKER_BOILERPLATE 5455caade7ccSmrg 5456caade7ccSmrg# Allow CC to be a program name with arguments. 5457caade7ccSmrglt_save_CC="$CC" 5458caade7ccSmrgCC=${RC-"windres"} 5459caade7ccSmrgcompiler=$CC 5460caade7ccSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5461caade7ccSmrg_LT_CC_BASENAME([$compiler]) 5462caade7ccSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5463caade7ccSmrg 5464caade7ccSmrgAC_LIBTOOL_CONFIG($1) 5465caade7ccSmrg 5466caade7ccSmrgAC_LANG_RESTORE 5467caade7ccSmrgCC="$lt_save_CC" 5468caade7ccSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 5469caade7ccSmrg 5470caade7ccSmrg 5471caade7ccSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 5472caade7ccSmrg# ---------------------------- 5473caade7ccSmrg# If TAGNAME is not passed, then create an initial libtool script 5474caade7ccSmrg# with a default configuration from the untagged config vars. Otherwise 5475caade7ccSmrg# add code to config.status for appending the configuration named by 5476caade7ccSmrg# TAGNAME from the matching tagged config vars. 5477caade7ccSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 5478caade7ccSmrg[# The else clause should only fire when bootstrapping the 5479caade7ccSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 5480caade7ccSmrg# with your package, and you will get complaints that there are 5481caade7ccSmrg# no rules to generate ltmain.sh. 5482caade7ccSmrgif test -f "$ltmain"; then 5483caade7ccSmrg # See if we are running on zsh, and set the options which allow our commands through 5484caade7ccSmrg # without removal of \ escapes. 5485caade7ccSmrg if test -n "${ZSH_VERSION+set}" ; then 5486caade7ccSmrg setopt NO_GLOB_SUBST 5487caade7ccSmrg fi 5488caade7ccSmrg # Now quote all the things that may contain metacharacters while being 5489caade7ccSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 5490caade7ccSmrg # variables and quote the copies for generation of the libtool script. 5491caade7ccSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 5492caade7ccSmrg SED SHELL STRIP \ 5493caade7ccSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 5494caade7ccSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 5495caade7ccSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 5496caade7ccSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 5497caade7ccSmrg lt_cv_sys_global_symbol_to_c_name_address \ 5498caade7ccSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 5499caade7ccSmrg old_postinstall_cmds old_postuninstall_cmds \ 5500caade7ccSmrg _LT_AC_TAGVAR(compiler, $1) \ 5501caade7ccSmrg _LT_AC_TAGVAR(CC, $1) \ 5502caade7ccSmrg _LT_AC_TAGVAR(LD, $1) \ 5503caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 5504caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 5505caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 5506caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 5507caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 5508caade7ccSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 5509caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 5510caade7ccSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 5511caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 5512caade7ccSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 5513caade7ccSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 5514caade7ccSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 5515caade7ccSmrg _LT_AC_TAGVAR(predeps, $1) \ 5516caade7ccSmrg _LT_AC_TAGVAR(postdeps, $1) \ 5517caade7ccSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 5518caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 5519caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 5520caade7ccSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 5521caade7ccSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 5522caade7ccSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 5523caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 5524caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 5525caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 5526caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 5527caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 5528caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 5529caade7ccSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 5530caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 5531caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 5532caade7ccSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 5533caade7ccSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 5534caade7ccSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 5535caade7ccSmrg 5536caade7ccSmrg case $var in 5537caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 5538caade7ccSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 5539caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 5540caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 5541caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 5542caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 5543caade7ccSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 5544caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 5545caade7ccSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 5546caade7ccSmrg postinstall_cmds | postuninstall_cmds | \ 5547caade7ccSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 5548caade7ccSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 5549caade7ccSmrg # Double-quote double-evaled strings. 5550caade7ccSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 5551caade7ccSmrg ;; 5552caade7ccSmrg *) 5553caade7ccSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 5554caade7ccSmrg ;; 5555caade7ccSmrg esac 5556caade7ccSmrg done 5557caade7ccSmrg 5558caade7ccSmrg case $lt_echo in 5559caade7ccSmrg *'\[$]0 --fallback-echo"') 5560caade7ccSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 5561caade7ccSmrg ;; 5562caade7ccSmrg esac 5563caade7ccSmrg 5564caade7ccSmrgifelse([$1], [], 5565caade7ccSmrg [cfgfile="${ofile}T" 5566caade7ccSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 5567caade7ccSmrg $rm -f "$cfgfile" 5568caade7ccSmrg AC_MSG_NOTICE([creating $ofile])], 5569caade7ccSmrg [cfgfile="$ofile"]) 5570caade7ccSmrg 5571caade7ccSmrg cat <<__EOF__ >> "$cfgfile" 5572caade7ccSmrgifelse([$1], [], 5573caade7ccSmrg[#! $SHELL 5574caade7ccSmrg 5575caade7ccSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 5576caade7ccSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 5577caade7ccSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 5578caade7ccSmrg# 5579caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5580caade7ccSmrg# Free Software Foundation, Inc. 5581caade7ccSmrg# 5582caade7ccSmrg# This file is part of GNU Libtool: 5583caade7ccSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5584caade7ccSmrg# 5585caade7ccSmrg# This program is free software; you can redistribute it and/or modify 5586caade7ccSmrg# it under the terms of the GNU General Public License as published by 5587caade7ccSmrg# the Free Software Foundation; either version 2 of the License, or 5588caade7ccSmrg# (at your option) any later version. 5589caade7ccSmrg# 5590caade7ccSmrg# This program is distributed in the hope that it will be useful, but 5591caade7ccSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 5592caade7ccSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5593caade7ccSmrg# General Public License for more details. 5594caade7ccSmrg# 5595caade7ccSmrg# You should have received a copy of the GNU General Public License 5596caade7ccSmrg# along with this program; if not, write to the Free Software 5597caade7ccSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 5598caade7ccSmrg# 5599caade7ccSmrg# As a special exception to the GNU General Public License, if you 5600caade7ccSmrg# distribute this file as part of a program that contains a 5601caade7ccSmrg# configuration script generated by Autoconf, you may include it under 5602caade7ccSmrg# the same distribution terms that you use for the rest of that program. 5603caade7ccSmrg 5604caade7ccSmrg# A sed program that does not truncate output. 5605caade7ccSmrgSED=$lt_SED 5606caade7ccSmrg 5607caade7ccSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 5608caade7ccSmrgXsed="$SED -e 1s/^X//" 5609caade7ccSmrg 5610caade7ccSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5611caade7ccSmrg# if CDPATH is set. 5612caade7ccSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5613caade7ccSmrg 5614caade7ccSmrg# The names of the tagged configurations supported by this script. 5615caade7ccSmrgavailable_tags= 5616caade7ccSmrg 5617caade7ccSmrg# ### BEGIN LIBTOOL CONFIG], 5618caade7ccSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 5619caade7ccSmrg 5620caade7ccSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 5621caade7ccSmrg 5622caade7ccSmrg# Shell to use when invoking shell scripts. 5623caade7ccSmrgSHELL=$lt_SHELL 5624caade7ccSmrg 5625caade7ccSmrg# Whether or not to build shared libraries. 5626caade7ccSmrgbuild_libtool_libs=$enable_shared 5627caade7ccSmrg 5628caade7ccSmrg# Whether or not to build static libraries. 5629caade7ccSmrgbuild_old_libs=$enable_static 5630caade7ccSmrg 5631caade7ccSmrg# Whether or not to add -lc for building shared libraries. 5632caade7ccSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 5633caade7ccSmrg 5634caade7ccSmrg# Whether or not to disallow shared libs when runtime libs are static 5635caade7ccSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 5636caade7ccSmrg 5637caade7ccSmrg# Whether or not to optimize for fast installation. 5638caade7ccSmrgfast_install=$enable_fast_install 5639caade7ccSmrg 5640caade7ccSmrg# The host system. 5641caade7ccSmrghost_alias=$host_alias 5642caade7ccSmrghost=$host 5643caade7ccSmrghost_os=$host_os 5644caade7ccSmrg 5645caade7ccSmrg# The build system. 5646caade7ccSmrgbuild_alias=$build_alias 5647caade7ccSmrgbuild=$build 5648caade7ccSmrgbuild_os=$build_os 5649caade7ccSmrg 5650caade7ccSmrg# An echo program that does not interpret backslashes. 5651caade7ccSmrgecho=$lt_echo 5652caade7ccSmrg 5653caade7ccSmrg# The archiver. 5654caade7ccSmrgAR=$lt_AR 5655caade7ccSmrgAR_FLAGS=$lt_AR_FLAGS 5656caade7ccSmrg 5657caade7ccSmrg# A C compiler. 5658caade7ccSmrgLTCC=$lt_LTCC 5659caade7ccSmrg 5660caade7ccSmrg# LTCC compiler flags. 5661caade7ccSmrgLTCFLAGS=$lt_LTCFLAGS 5662caade7ccSmrg 5663caade7ccSmrg# A language-specific compiler. 5664caade7ccSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 5665caade7ccSmrg 5666caade7ccSmrg# Is the compiler the GNU C compiler? 5667caade7ccSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 5668caade7ccSmrg 5669caade7ccSmrg# An ERE matcher. 5670caade7ccSmrgEGREP=$lt_EGREP 5671caade7ccSmrg 5672caade7ccSmrg# The linker used to build libraries. 5673caade7ccSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 5674caade7ccSmrg 5675caade7ccSmrg# Whether we need hard or soft links. 5676caade7ccSmrgLN_S=$lt_LN_S 5677caade7ccSmrg 5678caade7ccSmrg# A BSD-compatible nm program. 5679caade7ccSmrgNM=$lt_NM 5680caade7ccSmrg 5681caade7ccSmrg# A symbol stripping program 5682caade7ccSmrgSTRIP=$lt_STRIP 5683caade7ccSmrg 5684caade7ccSmrg# Used to examine libraries when file_magic_cmd begins "file" 5685caade7ccSmrgMAGIC_CMD=$MAGIC_CMD 5686caade7ccSmrg 5687caade7ccSmrg# Used on cygwin: DLL creation program. 5688caade7ccSmrgDLLTOOL="$DLLTOOL" 5689caade7ccSmrg 5690caade7ccSmrg# Used on cygwin: object dumper. 5691caade7ccSmrgOBJDUMP="$OBJDUMP" 5692caade7ccSmrg 5693caade7ccSmrg# Used on cygwin: assembler. 5694caade7ccSmrgAS="$AS" 5695caade7ccSmrg 5696caade7ccSmrg# The name of the directory that contains temporary libtool files. 5697caade7ccSmrgobjdir=$objdir 5698caade7ccSmrg 5699caade7ccSmrg# How to create reloadable object files. 5700caade7ccSmrgreload_flag=$lt_reload_flag 5701caade7ccSmrgreload_cmds=$lt_reload_cmds 5702caade7ccSmrg 5703caade7ccSmrg# How to pass a linker flag through the compiler. 5704caade7ccSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 5705caade7ccSmrg 5706caade7ccSmrg# Object file suffix (normally "o"). 5707caade7ccSmrgobjext="$ac_objext" 5708caade7ccSmrg 5709caade7ccSmrg# Old archive suffix (normally "a"). 5710caade7ccSmrglibext="$libext" 5711caade7ccSmrg 5712caade7ccSmrg# Shared library suffix (normally ".so"). 5713caade7ccSmrgshrext_cmds='$shrext_cmds' 5714caade7ccSmrg 5715caade7ccSmrg# Executable file suffix (normally ""). 5716caade7ccSmrgexeext="$exeext" 5717caade7ccSmrg 5718caade7ccSmrg# Additional compiler flags for building library objects. 5719caade7ccSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 5720caade7ccSmrgpic_mode=$pic_mode 5721caade7ccSmrg 5722caade7ccSmrg# What is the maximum length of a command? 5723caade7ccSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5724caade7ccSmrg 5725caade7ccSmrg# Does compiler simultaneously support -c and -o options? 5726caade7ccSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 5727caade7ccSmrg 5728caade7ccSmrg# Must we lock files when doing compilation? 5729caade7ccSmrgneed_locks=$lt_need_locks 5730caade7ccSmrg 5731caade7ccSmrg# Do we need the lib prefix for modules? 5732caade7ccSmrgneed_lib_prefix=$need_lib_prefix 5733caade7ccSmrg 5734caade7ccSmrg# Do we need a version for libraries? 5735caade7ccSmrgneed_version=$need_version 5736caade7ccSmrg 5737caade7ccSmrg# Whether dlopen is supported. 5738caade7ccSmrgdlopen_support=$enable_dlopen 5739caade7ccSmrg 5740caade7ccSmrg# Whether dlopen of programs is supported. 5741caade7ccSmrgdlopen_self=$enable_dlopen_self 5742caade7ccSmrg 5743caade7ccSmrg# Whether dlopen of statically linked programs is supported. 5744caade7ccSmrgdlopen_self_static=$enable_dlopen_self_static 5745caade7ccSmrg 5746caade7ccSmrg# Compiler flag to prevent dynamic linking. 5747caade7ccSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 5748caade7ccSmrg 5749caade7ccSmrg# Compiler flag to turn off builtin functions. 5750caade7ccSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 5751caade7ccSmrg 5752caade7ccSmrg# Compiler flag to allow reflexive dlopens. 5753caade7ccSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 5754caade7ccSmrg 5755caade7ccSmrg# Compiler flag to generate shared objects directly from archives. 5756caade7ccSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 5757caade7ccSmrg 5758caade7ccSmrg# Compiler flag to generate thread-safe objects. 5759caade7ccSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 5760caade7ccSmrg 5761caade7ccSmrg# Library versioning type. 5762caade7ccSmrgversion_type=$version_type 5763caade7ccSmrg 5764caade7ccSmrg# Format of library name prefix. 5765caade7ccSmrglibname_spec=$lt_libname_spec 5766caade7ccSmrg 5767caade7ccSmrg# List of archive names. First name is the real one, the rest are links. 5768caade7ccSmrg# The last name is the one that the linker finds with -lNAME. 5769caade7ccSmrglibrary_names_spec=$lt_library_names_spec 5770caade7ccSmrg 5771caade7ccSmrg# The coded name of the library, if different from the real name. 5772caade7ccSmrgsoname_spec=$lt_soname_spec 5773caade7ccSmrg 5774caade7ccSmrg# Commands used to build and install an old-style archive. 5775caade7ccSmrgRANLIB=$lt_RANLIB 5776caade7ccSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 5777caade7ccSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 5778caade7ccSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 5779caade7ccSmrg 5780caade7ccSmrg# Create an old-style archive from a shared archive. 5781caade7ccSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 5782caade7ccSmrg 5783caade7ccSmrg# Create a temporary old-style archive to link instead of a shared archive. 5784caade7ccSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 5785caade7ccSmrg 5786caade7ccSmrg# Commands used to build and install a shared archive. 5787caade7ccSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 5788caade7ccSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 5789caade7ccSmrgpostinstall_cmds=$lt_postinstall_cmds 5790caade7ccSmrgpostuninstall_cmds=$lt_postuninstall_cmds 5791caade7ccSmrg 5792caade7ccSmrg# Commands used to build a loadable module (assumed same as above if empty) 5793caade7ccSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 5794caade7ccSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 5795caade7ccSmrg 5796caade7ccSmrg# Commands to strip libraries. 5797caade7ccSmrgold_striplib=$lt_old_striplib 5798caade7ccSmrgstriplib=$lt_striplib 5799caade7ccSmrg 5800caade7ccSmrg# Dependencies to place before the objects being linked to create a 5801caade7ccSmrg# shared library. 5802caade7ccSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 5803caade7ccSmrg 5804caade7ccSmrg# Dependencies to place after the objects being linked to create a 5805caade7ccSmrg# shared library. 5806caade7ccSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 5807caade7ccSmrg 5808caade7ccSmrg# Dependencies to place before the objects being linked to create a 5809caade7ccSmrg# shared library. 5810caade7ccSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 5811caade7ccSmrg 5812caade7ccSmrg# Dependencies to place after the objects being linked to create a 5813caade7ccSmrg# shared library. 5814caade7ccSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 5815caade7ccSmrg 5816caade7ccSmrg# The library search path used internally by the compiler when linking 5817caade7ccSmrg# a shared library. 5818caade7ccSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 5819caade7ccSmrg 5820caade7ccSmrg# Method to check whether dependent libraries are shared objects. 5821caade7ccSmrgdeplibs_check_method=$lt_deplibs_check_method 5822caade7ccSmrg 5823caade7ccSmrg# Command to use when deplibs_check_method == file_magic. 5824caade7ccSmrgfile_magic_cmd=$lt_file_magic_cmd 5825caade7ccSmrg 5826caade7ccSmrg# Flag that allows shared libraries with undefined symbols to be built. 5827caade7ccSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 5828caade7ccSmrg 5829caade7ccSmrg# Flag that forces no undefined symbols. 5830caade7ccSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 5831caade7ccSmrg 5832caade7ccSmrg# Commands used to finish a libtool library installation in a directory. 5833caade7ccSmrgfinish_cmds=$lt_finish_cmds 5834caade7ccSmrg 5835caade7ccSmrg# Same as above, but a single script fragment to be evaled but not shown. 5836caade7ccSmrgfinish_eval=$lt_finish_eval 5837caade7ccSmrg 5838caade7ccSmrg# Take the output of nm and produce a listing of raw symbols and C names. 5839caade7ccSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 5840caade7ccSmrg 5841caade7ccSmrg# Transform the output of nm in a proper C declaration 5842caade7ccSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 5843caade7ccSmrg 5844caade7ccSmrg# Transform the output of nm in a C name address pair 5845caade7ccSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 5846caade7ccSmrg 5847caade7ccSmrg# This is the shared library runtime path variable. 5848caade7ccSmrgrunpath_var=$runpath_var 5849caade7ccSmrg 5850caade7ccSmrg# This is the shared library path variable. 5851caade7ccSmrgshlibpath_var=$shlibpath_var 5852caade7ccSmrg 5853caade7ccSmrg# Is shlibpath searched before the hard-coded library search path? 5854caade7ccSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 5855caade7ccSmrg 5856caade7ccSmrg# How to hardcode a shared library path into an executable. 5857caade7ccSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 5858caade7ccSmrg 5859caade7ccSmrg# Whether we should hardcode library paths into libraries. 5860caade7ccSmrghardcode_into_libs=$hardcode_into_libs 5861caade7ccSmrg 5862caade7ccSmrg# Flag to hardcode \$libdir into a binary during linking. 5863caade7ccSmrg# This must work even if \$libdir does not exist. 5864caade7ccSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 5865caade7ccSmrg 5866caade7ccSmrg# If ld is used when linking, flag to hardcode \$libdir into 5867caade7ccSmrg# a binary during linking. This must work even if \$libdir does 5868caade7ccSmrg# not exist. 5869caade7ccSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 5870caade7ccSmrg 5871caade7ccSmrg# Whether we need a single -rpath flag with a separated argument. 5872caade7ccSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 5873caade7ccSmrg 5874caade7ccSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 5875caade7ccSmrg# resulting binary. 5876caade7ccSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 5877caade7ccSmrg 5878caade7ccSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 5879caade7ccSmrg# resulting binary. 5880caade7ccSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 5881caade7ccSmrg 5882caade7ccSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 5883caade7ccSmrg# the resulting binary. 5884caade7ccSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 5885caade7ccSmrg 5886caade7ccSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 5887caade7ccSmrg# and all subsequent libraries and executables linked against it. 5888caade7ccSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 5889caade7ccSmrg 5890caade7ccSmrg# Variables whose values should be saved in libtool wrapper scripts and 5891caade7ccSmrg# restored at relink time. 5892caade7ccSmrgvariables_saved_for_relink="$variables_saved_for_relink" 5893caade7ccSmrg 5894caade7ccSmrg# Whether libtool must link a program against all its dependency libraries. 5895caade7ccSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 5896caade7ccSmrg 5897caade7ccSmrg# Compile-time system search path for libraries 5898caade7ccSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 5899caade7ccSmrg 5900caade7ccSmrg# Run-time system search path for libraries 5901caade7ccSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 5902caade7ccSmrg 5903caade7ccSmrg# Fix the shell variable \$srcfile for the compiler. 5904caade7ccSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 5905caade7ccSmrg 5906caade7ccSmrg# Set to yes if exported symbols are required. 5907caade7ccSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 5908caade7ccSmrg 5909caade7ccSmrg# The commands to list exported symbols. 5910caade7ccSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 5911caade7ccSmrg 5912caade7ccSmrg# The commands to extract the exported symbol list from a shared archive. 5913caade7ccSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 5914caade7ccSmrg 5915caade7ccSmrg# Symbols that should not be listed in the preloaded symbols. 5916caade7ccSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 5917caade7ccSmrg 5918caade7ccSmrg# Symbols that must always be exported. 5919caade7ccSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 5920caade7ccSmrg 5921caade7ccSmrgifelse([$1],[], 5922caade7ccSmrg[# ### END LIBTOOL CONFIG], 5923caade7ccSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 5924caade7ccSmrg 5925caade7ccSmrg__EOF__ 5926caade7ccSmrg 5927caade7ccSmrgifelse([$1],[], [ 5928caade7ccSmrg case $host_os in 5929caade7ccSmrg aix3*) 5930caade7ccSmrg cat <<\EOF >> "$cfgfile" 5931caade7ccSmrg 5932caade7ccSmrg# AIX sometimes has problems with the GCC collect2 program. For some 5933caade7ccSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 5934caade7ccSmrg# vanish in a puff of smoke. 5935caade7ccSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 5936caade7ccSmrg COLLECT_NAMES= 5937caade7ccSmrg export COLLECT_NAMES 5938caade7ccSmrgfi 5939caade7ccSmrgEOF 5940caade7ccSmrg ;; 5941caade7ccSmrg esac 5942caade7ccSmrg 5943caade7ccSmrg # We use sed instead of cat because bash on DJGPP gets confused if 5944caade7ccSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 5945caade7ccSmrg # text mode, it properly converts lines to CR/LF. This bash problem 5946caade7ccSmrg # is reportedly fixed, but why not run on old versions too? 5947caade7ccSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 5948caade7ccSmrg 5949caade7ccSmrg mv -f "$cfgfile" "$ofile" || \ 5950caade7ccSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 5951caade7ccSmrg chmod +x "$ofile" 5952caade7ccSmrg]) 5953caade7ccSmrgelse 5954caade7ccSmrg # If there is no Makefile yet, we rely on a make rule to execute 5955caade7ccSmrg # `config.status --recheck' to rerun these tests and create the 5956caade7ccSmrg # libtool script then. 5957caade7ccSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 5958caade7ccSmrg if test -f "$ltmain_in"; then 5959caade7ccSmrg test -f Makefile && make "$ltmain" 5960caade7ccSmrg fi 5961caade7ccSmrgfi 5962caade7ccSmrg])# AC_LIBTOOL_CONFIG 5963caade7ccSmrg 5964caade7ccSmrg 5965caade7ccSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 5966caade7ccSmrg# ------------------------------------------- 5967caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 5968caade7ccSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 5969caade7ccSmrg 5970caade7ccSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5971caade7ccSmrg 5972caade7ccSmrgif test "$GCC" = yes; then 5973caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5974caade7ccSmrg 5975caade7ccSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5976caade7ccSmrg lt_cv_prog_compiler_rtti_exceptions, 5977caade7ccSmrg [-fno-rtti -fno-exceptions], [], 5978caade7ccSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5979caade7ccSmrgfi 5980caade7ccSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 5981caade7ccSmrg 5982caade7ccSmrg 5983caade7ccSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5984caade7ccSmrg# --------------------------------- 5985caade7ccSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 5986caade7ccSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 5987caade7ccSmrgAC_REQUIRE([AC_PROG_NM]) 5988caade7ccSmrgAC_REQUIRE([AC_OBJEXT]) 5989caade7ccSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5990caade7ccSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5991caade7ccSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5992caade7ccSmrg[ 5993caade7ccSmrg# These are sane defaults that work on at least a few old systems. 5994caade7ccSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5995caade7ccSmrg 5996caade7ccSmrg# Character class describing NM global symbol codes. 5997caade7ccSmrgsymcode='[[BCDEGRST]]' 5998caade7ccSmrg 5999caade7ccSmrg# Regexp to match symbols that can be accessed directly from C. 6000caade7ccSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6001caade7ccSmrg 6002caade7ccSmrg# Transform an extracted symbol line into a proper C declaration 6003caade7ccSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 6004caade7ccSmrg 6005caade7ccSmrg# Transform an extracted symbol line into symbol name and symbol address 6006caade7ccSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6007caade7ccSmrg 6008caade7ccSmrg# Define system-specific variables. 6009caade7ccSmrgcase $host_os in 6010caade7ccSmrgaix*) 6011caade7ccSmrg symcode='[[BCDT]]' 6012caade7ccSmrg ;; 6013caade7ccSmrgcygwin* | mingw* | pw32*) 6014caade7ccSmrg symcode='[[ABCDGISTW]]' 6015caade7ccSmrg ;; 6016caade7ccSmrghpux*) # Its linker distinguishes data from code symbols 6017caade7ccSmrg if test "$host_cpu" = ia64; then 6018caade7ccSmrg symcode='[[ABCDEGRST]]' 6019caade7ccSmrg fi 6020caade7ccSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6021caade7ccSmrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6022caade7ccSmrg ;; 6023caade7ccSmrglinux*) 6024caade7ccSmrg if test "$host_cpu" = ia64; then 6025caade7ccSmrg symcode='[[ABCDGIRSTW]]' 6026caade7ccSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6027caade7ccSmrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6028caade7ccSmrg fi 6029caade7ccSmrg ;; 6030caade7ccSmrgirix* | nonstopux*) 6031caade7ccSmrg symcode='[[BCDEGRST]]' 6032caade7ccSmrg ;; 6033caade7ccSmrgosf*) 6034caade7ccSmrg symcode='[[BCDEGQRST]]' 6035caade7ccSmrg ;; 6036caade7ccSmrgsolaris*) 6037caade7ccSmrg symcode='[[BDRT]]' 6038caade7ccSmrg ;; 6039caade7ccSmrgsco3.2v5*) 6040caade7ccSmrg symcode='[[DT]]' 6041caade7ccSmrg ;; 6042caade7ccSmrgsysv4.2uw2*) 6043caade7ccSmrg symcode='[[DT]]' 6044caade7ccSmrg ;; 6045caade7ccSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 6046caade7ccSmrg symcode='[[ABDT]]' 6047caade7ccSmrg ;; 6048caade7ccSmrgsysv4) 6049caade7ccSmrg symcode='[[DFNSTU]]' 6050caade7ccSmrg ;; 6051caade7ccSmrgesac 6052caade7ccSmrg 6053caade7ccSmrg# Handle CRLF in mingw tool chain 6054caade7ccSmrgopt_cr= 6055caade7ccSmrgcase $build_os in 6056caade7ccSmrgmingw*) 6057caade7ccSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6058caade7ccSmrg ;; 6059caade7ccSmrgesac 6060caade7ccSmrg 6061caade7ccSmrg# If we're using GNU nm, then use its standard symbol codes. 6062caade7ccSmrgcase `$NM -V 2>&1` in 6063caade7ccSmrg*GNU* | *'with BFD'*) 6064caade7ccSmrg symcode='[[ABCDGIRSTW]]' ;; 6065caade7ccSmrgesac 6066caade7ccSmrg 6067caade7ccSmrg# Try without a prefix undercore, then with it. 6068caade7ccSmrgfor ac_symprfx in "" "_"; do 6069caade7ccSmrg 6070caade7ccSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6071caade7ccSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 6072caade7ccSmrg 6073caade7ccSmrg # Write the raw and C identifiers. 6074caade7ccSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6075caade7ccSmrg 6076caade7ccSmrg # Check to see that the pipe works correctly. 6077caade7ccSmrg pipe_works=no 6078caade7ccSmrg 6079caade7ccSmrg rm -f conftest* 6080caade7ccSmrg cat > conftest.$ac_ext <<EOF 6081caade7ccSmrg#ifdef __cplusplus 6082caade7ccSmrgextern "C" { 6083caade7ccSmrg#endif 6084caade7ccSmrgchar nm_test_var; 6085caade7ccSmrgvoid nm_test_func(){} 6086caade7ccSmrg#ifdef __cplusplus 6087caade7ccSmrg} 6088caade7ccSmrg#endif 6089caade7ccSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 6090caade7ccSmrgEOF 6091caade7ccSmrg 6092caade7ccSmrg if AC_TRY_EVAL(ac_compile); then 6093caade7ccSmrg # Now try to grab the symbols. 6094caade7ccSmrg nlist=conftest.nm 6095caade7ccSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 6096caade7ccSmrg # Try sorting and uniquifying the output. 6097caade7ccSmrg if sort "$nlist" | uniq > "$nlist"T; then 6098caade7ccSmrg mv -f "$nlist"T "$nlist" 6099caade7ccSmrg else 6100caade7ccSmrg rm -f "$nlist"T 6101caade7ccSmrg fi 6102caade7ccSmrg 6103caade7ccSmrg # Make sure that we snagged all the symbols we need. 6104caade7ccSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 6105caade7ccSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 6106caade7ccSmrg cat <<EOF > conftest.$ac_ext 6107caade7ccSmrg#ifdef __cplusplus 6108caade7ccSmrgextern "C" { 6109caade7ccSmrg#endif 6110caade7ccSmrg 6111caade7ccSmrgEOF 6112caade7ccSmrg # Now generate the symbol file. 6113caade7ccSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 6114caade7ccSmrg 6115caade7ccSmrg cat <<EOF >> conftest.$ac_ext 6116caade7ccSmrg#if defined (__STDC__) && __STDC__ 6117caade7ccSmrg# define lt_ptr_t void * 6118caade7ccSmrg#else 6119caade7ccSmrg# define lt_ptr_t char * 6120caade7ccSmrg# define const 6121caade7ccSmrg#endif 6122caade7ccSmrg 6123caade7ccSmrg/* The mapping between symbol names and symbols. */ 6124caade7ccSmrgconst struct { 6125caade7ccSmrg const char *name; 6126caade7ccSmrg lt_ptr_t address; 6127caade7ccSmrg} 6128caade7ccSmrglt_preloaded_symbols[[]] = 6129caade7ccSmrg{ 6130caade7ccSmrgEOF 6131caade7ccSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 6132caade7ccSmrg cat <<\EOF >> conftest.$ac_ext 6133caade7ccSmrg {0, (lt_ptr_t) 0} 6134caade7ccSmrg}; 6135caade7ccSmrg 6136caade7ccSmrg#ifdef __cplusplus 6137caade7ccSmrg} 6138caade7ccSmrg#endif 6139caade7ccSmrgEOF 6140caade7ccSmrg # Now try linking the two files. 6141caade7ccSmrg mv conftest.$ac_objext conftstm.$ac_objext 6142caade7ccSmrg lt_save_LIBS="$LIBS" 6143caade7ccSmrg lt_save_CFLAGS="$CFLAGS" 6144caade7ccSmrg LIBS="conftstm.$ac_objext" 6145caade7ccSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6146caade7ccSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6147caade7ccSmrg pipe_works=yes 6148caade7ccSmrg fi 6149caade7ccSmrg LIBS="$lt_save_LIBS" 6150caade7ccSmrg CFLAGS="$lt_save_CFLAGS" 6151caade7ccSmrg else 6152caade7ccSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6153caade7ccSmrg fi 6154caade7ccSmrg else 6155caade7ccSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6156caade7ccSmrg fi 6157caade7ccSmrg else 6158caade7ccSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6159caade7ccSmrg fi 6160caade7ccSmrg else 6161caade7ccSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6162caade7ccSmrg cat conftest.$ac_ext >&5 6163caade7ccSmrg fi 6164caade7ccSmrg rm -f conftest* conftst* 6165caade7ccSmrg 6166caade7ccSmrg # Do not use the global_symbol_pipe unless it works. 6167caade7ccSmrg if test "$pipe_works" = yes; then 6168caade7ccSmrg break 6169caade7ccSmrg else 6170caade7ccSmrg lt_cv_sys_global_symbol_pipe= 6171caade7ccSmrg fi 6172caade7ccSmrgdone 6173caade7ccSmrg]) 6174caade7ccSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6175caade7ccSmrg lt_cv_sys_global_symbol_to_cdecl= 6176caade7ccSmrgfi 6177caade7ccSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6178caade7ccSmrg AC_MSG_RESULT(failed) 6179caade7ccSmrgelse 6180caade7ccSmrg AC_MSG_RESULT(ok) 6181caade7ccSmrgfi 6182caade7ccSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6183caade7ccSmrg 6184caade7ccSmrg 6185caade7ccSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 6186caade7ccSmrg# --------------------------------------- 6187caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 6188caade7ccSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 6189caade7ccSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6190caade7ccSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 6191caade7ccSmrg 6192caade7ccSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 6193caade7ccSmrg ifelse([$1],[CXX],[ 6194caade7ccSmrg # C++ specific cases for pic, static, wl, etc. 6195caade7ccSmrg if test "$GXX" = yes; then 6196caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6197caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6198caade7ccSmrg 6199caade7ccSmrg case $host_os in 6200caade7ccSmrg aix*) 6201caade7ccSmrg # All AIX code is PIC. 6202caade7ccSmrg if test "$host_cpu" = ia64; then 6203caade7ccSmrg # AIX 5 now supports IA64 processor 6204caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6205caade7ccSmrg fi 6206caade7ccSmrg ;; 6207caade7ccSmrg amigaos*) 6208caade7ccSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6209caade7ccSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6210caade7ccSmrg # like `-m68040'. 6211caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6212caade7ccSmrg ;; 6213caade7ccSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6214caade7ccSmrg # PIC is the default for these OSes. 6215caade7ccSmrg ;; 6216caade7ccSmrg mingw* | os2* | pw32*) 6217caade7ccSmrg # This hack is so that the source file can tell whether it is being 6218caade7ccSmrg # built for inclusion in a dll (and should export symbols for example). 6219caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6220caade7ccSmrg ;; 6221caade7ccSmrg darwin* | rhapsody*) 6222caade7ccSmrg # PIC is the default on this platform 6223caade7ccSmrg # Common symbols not allowed in MH_DYLIB files 6224caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6225caade7ccSmrg ;; 6226caade7ccSmrg *djgpp*) 6227caade7ccSmrg # DJGPP does not support shared libraries at all 6228caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6229caade7ccSmrg ;; 6230caade7ccSmrg interix3*) 6231caade7ccSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6232caade7ccSmrg # Instead, we relocate shared libraries at runtime. 6233caade7ccSmrg ;; 6234caade7ccSmrg sysv4*MP*) 6235caade7ccSmrg if test -d /usr/nec; then 6236caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6237caade7ccSmrg fi 6238caade7ccSmrg ;; 6239caade7ccSmrg hpux*) 6240caade7ccSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6241caade7ccSmrg # not for PA HP-UX. 6242caade7ccSmrg case $host_cpu in 6243caade7ccSmrg hppa*64*|ia64*) 6244caade7ccSmrg ;; 6245caade7ccSmrg *) 6246caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6247caade7ccSmrg ;; 6248caade7ccSmrg esac 6249caade7ccSmrg ;; 6250caade7ccSmrg *) 6251caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6252caade7ccSmrg ;; 6253caade7ccSmrg esac 6254caade7ccSmrg else 6255caade7ccSmrg case $host_os in 6256caade7ccSmrg aix4* | aix5*) 6257caade7ccSmrg # All AIX code is PIC. 6258caade7ccSmrg if test "$host_cpu" = ia64; then 6259caade7ccSmrg # AIX 5 now supports IA64 processor 6260caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6261caade7ccSmrg else 6262caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6263caade7ccSmrg fi 6264caade7ccSmrg ;; 6265caade7ccSmrg chorus*) 6266caade7ccSmrg case $cc_basename in 6267caade7ccSmrg cxch68*) 6268caade7ccSmrg # Green Hills C++ Compiler 6269caade7ccSmrg # _LT_AC_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" 6270caade7ccSmrg ;; 6271caade7ccSmrg esac 6272caade7ccSmrg ;; 6273caade7ccSmrg darwin*) 6274caade7ccSmrg # PIC is the default on this platform 6275caade7ccSmrg # Common symbols not allowed in MH_DYLIB files 6276caade7ccSmrg case $cc_basename in 6277caade7ccSmrg xlc*) 6278caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6279caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6280caade7ccSmrg ;; 6281caade7ccSmrg esac 6282caade7ccSmrg ;; 6283caade7ccSmrg dgux*) 6284caade7ccSmrg case $cc_basename in 6285caade7ccSmrg ec++*) 6286caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6287caade7ccSmrg ;; 6288caade7ccSmrg ghcx*) 6289caade7ccSmrg # Green Hills C++ Compiler 6290caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6291caade7ccSmrg ;; 6292caade7ccSmrg *) 6293caade7ccSmrg ;; 6294caade7ccSmrg esac 6295caade7ccSmrg ;; 6296caade7ccSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 6297caade7ccSmrg # FreeBSD uses GNU C++ 6298caade7ccSmrg ;; 6299caade7ccSmrg hpux9* | hpux10* | hpux11*) 6300caade7ccSmrg case $cc_basename in 6301caade7ccSmrg CC*) 6302caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6303caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6304caade7ccSmrg if test "$host_cpu" != ia64; then 6305caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6306caade7ccSmrg fi 6307caade7ccSmrg ;; 6308caade7ccSmrg aCC*) 6309caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6310caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6311caade7ccSmrg case $host_cpu in 6312caade7ccSmrg hppa*64*|ia64*) 6313caade7ccSmrg # +Z the default 6314caade7ccSmrg ;; 6315caade7ccSmrg *) 6316caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6317caade7ccSmrg ;; 6318caade7ccSmrg esac 6319caade7ccSmrg ;; 6320caade7ccSmrg *) 6321caade7ccSmrg ;; 6322caade7ccSmrg esac 6323caade7ccSmrg ;; 6324caade7ccSmrg interix*) 6325caade7ccSmrg # This is c89, which is MS Visual C++ (no shared libs) 6326caade7ccSmrg # Anyone wants to do a port? 6327caade7ccSmrg ;; 6328caade7ccSmrg irix5* | irix6* | nonstopux*) 6329caade7ccSmrg case $cc_basename in 6330caade7ccSmrg CC*) 6331caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6332caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6333caade7ccSmrg # CC pic flag -KPIC is the default. 6334caade7ccSmrg ;; 6335caade7ccSmrg *) 6336caade7ccSmrg ;; 6337caade7ccSmrg esac 6338caade7ccSmrg ;; 6339caade7ccSmrg linux*) 6340caade7ccSmrg case $cc_basename in 6341caade7ccSmrg KCC*) 6342caade7ccSmrg # KAI C++ Compiler 6343caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6344caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6345caade7ccSmrg ;; 6346caade7ccSmrg icpc* | ecpc*) 6347caade7ccSmrg # Intel C++ 6348caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6349caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6350caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6351caade7ccSmrg ;; 6352caade7ccSmrg pgCC*) 6353caade7ccSmrg # Portland Group C++ compiler. 6354caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6355caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6356caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6357caade7ccSmrg ;; 6358caade7ccSmrg cxx*) 6359caade7ccSmrg # Compaq C++ 6360caade7ccSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6361caade7ccSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6362caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6363caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6364caade7ccSmrg ;; 6365caade7ccSmrg *) 6366caade7ccSmrg ;; 6367caade7ccSmrg esac 6368caade7ccSmrg ;; 6369caade7ccSmrg lynxos*) 6370caade7ccSmrg ;; 6371caade7ccSmrg m88k*) 6372caade7ccSmrg ;; 6373caade7ccSmrg mvs*) 6374caade7ccSmrg case $cc_basename in 6375caade7ccSmrg cxx*) 6376caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6377caade7ccSmrg ;; 6378caade7ccSmrg *) 6379caade7ccSmrg ;; 6380caade7ccSmrg esac 6381caade7ccSmrg ;; 6382caade7ccSmrg netbsd*) 6383caade7ccSmrg ;; 6384caade7ccSmrg osf3* | osf4* | osf5*) 6385caade7ccSmrg case $cc_basename in 6386caade7ccSmrg KCC*) 6387caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6388caade7ccSmrg ;; 6389caade7ccSmrg RCC*) 6390caade7ccSmrg # Rational C++ 2.4.1 6391caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6392caade7ccSmrg ;; 6393caade7ccSmrg cxx*) 6394caade7ccSmrg # Digital/Compaq C++ 6395caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6396caade7ccSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6397caade7ccSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6398caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6399caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6400caade7ccSmrg ;; 6401caade7ccSmrg *) 6402caade7ccSmrg ;; 6403caade7ccSmrg esac 6404caade7ccSmrg ;; 6405caade7ccSmrg psos*) 6406caade7ccSmrg ;; 6407caade7ccSmrg solaris*) 6408caade7ccSmrg case $cc_basename in 6409caade7ccSmrg CC*) 6410caade7ccSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6411caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6412caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6413caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6414caade7ccSmrg ;; 6415caade7ccSmrg gcx*) 6416caade7ccSmrg # Green Hills C++ Compiler 6417caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6418caade7ccSmrg ;; 6419caade7ccSmrg *) 6420caade7ccSmrg ;; 6421caade7ccSmrg esac 6422caade7ccSmrg ;; 6423caade7ccSmrg sunos4*) 6424caade7ccSmrg case $cc_basename in 6425caade7ccSmrg CC*) 6426caade7ccSmrg # Sun C++ 4.x 6427caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6428caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6429caade7ccSmrg ;; 6430caade7ccSmrg lcc*) 6431caade7ccSmrg # Lucid 6432caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6433caade7ccSmrg ;; 6434caade7ccSmrg *) 6435caade7ccSmrg ;; 6436caade7ccSmrg esac 6437caade7ccSmrg ;; 6438caade7ccSmrg tandem*) 6439caade7ccSmrg case $cc_basename in 6440caade7ccSmrg NCC*) 6441caade7ccSmrg # NonStop-UX NCC 3.20 6442caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6443caade7ccSmrg ;; 6444caade7ccSmrg *) 6445caade7ccSmrg ;; 6446caade7ccSmrg esac 6447caade7ccSmrg ;; 6448caade7ccSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6449caade7ccSmrg case $cc_basename in 6450caade7ccSmrg CC*) 6451caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6452caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6453caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6454caade7ccSmrg ;; 6455caade7ccSmrg esac 6456caade7ccSmrg ;; 6457caade7ccSmrg vxworks*) 6458caade7ccSmrg ;; 6459caade7ccSmrg *) 6460caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6461caade7ccSmrg ;; 6462caade7ccSmrg esac 6463caade7ccSmrg fi 6464caade7ccSmrg], 6465caade7ccSmrg[ 6466caade7ccSmrg if test "$GCC" = yes; then 6467caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6468caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6469caade7ccSmrg 6470caade7ccSmrg case $host_os in 6471caade7ccSmrg aix*) 6472caade7ccSmrg # All AIX code is PIC. 6473caade7ccSmrg if test "$host_cpu" = ia64; then 6474caade7ccSmrg # AIX 5 now supports IA64 processor 6475caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6476caade7ccSmrg fi 6477caade7ccSmrg ;; 6478caade7ccSmrg 6479caade7ccSmrg amigaos*) 6480caade7ccSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6481caade7ccSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6482caade7ccSmrg # like `-m68040'. 6483caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6484caade7ccSmrg ;; 6485caade7ccSmrg 6486caade7ccSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6487caade7ccSmrg # PIC is the default for these OSes. 6488caade7ccSmrg ;; 6489caade7ccSmrg 6490caade7ccSmrg mingw* | pw32* | os2*) 6491caade7ccSmrg # This hack is so that the source file can tell whether it is being 6492caade7ccSmrg # built for inclusion in a dll (and should export symbols for example). 6493caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6494caade7ccSmrg ;; 6495caade7ccSmrg 6496caade7ccSmrg darwin* | rhapsody*) 6497caade7ccSmrg # PIC is the default on this platform 6498caade7ccSmrg # Common symbols not allowed in MH_DYLIB files 6499caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6500caade7ccSmrg ;; 6501caade7ccSmrg 6502caade7ccSmrg interix3*) 6503caade7ccSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6504caade7ccSmrg # Instead, we relocate shared libraries at runtime. 6505caade7ccSmrg ;; 6506caade7ccSmrg 6507caade7ccSmrg msdosdjgpp*) 6508caade7ccSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6509caade7ccSmrg # on systems that don't support them. 6510caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6511caade7ccSmrg enable_shared=no 6512caade7ccSmrg ;; 6513caade7ccSmrg 6514caade7ccSmrg sysv4*MP*) 6515caade7ccSmrg if test -d /usr/nec; then 6516caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6517caade7ccSmrg fi 6518caade7ccSmrg ;; 6519caade7ccSmrg 6520caade7ccSmrg hpux*) 6521caade7ccSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6522caade7ccSmrg # not for PA HP-UX. 6523caade7ccSmrg case $host_cpu in 6524caade7ccSmrg hppa*64*|ia64*) 6525caade7ccSmrg # +Z the default 6526caade7ccSmrg ;; 6527caade7ccSmrg *) 6528caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6529caade7ccSmrg ;; 6530caade7ccSmrg esac 6531caade7ccSmrg ;; 6532caade7ccSmrg 6533caade7ccSmrg *) 6534caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6535caade7ccSmrg ;; 6536caade7ccSmrg esac 6537caade7ccSmrg else 6538caade7ccSmrg # PORTME Check for flag to pass linker flags through the system compiler. 6539caade7ccSmrg case $host_os in 6540caade7ccSmrg aix*) 6541caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6542caade7ccSmrg if test "$host_cpu" = ia64; then 6543caade7ccSmrg # AIX 5 now supports IA64 processor 6544caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6545caade7ccSmrg else 6546caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6547caade7ccSmrg fi 6548caade7ccSmrg ;; 6549caade7ccSmrg darwin*) 6550caade7ccSmrg # PIC is the default on this platform 6551caade7ccSmrg # Common symbols not allowed in MH_DYLIB files 6552caade7ccSmrg case $cc_basename in 6553caade7ccSmrg xlc*) 6554caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6555caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6556caade7ccSmrg ;; 6557caade7ccSmrg esac 6558caade7ccSmrg ;; 6559caade7ccSmrg 6560caade7ccSmrg mingw* | pw32* | os2*) 6561caade7ccSmrg # This hack is so that the source file can tell whether it is being 6562caade7ccSmrg # built for inclusion in a dll (and should export symbols for example). 6563caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6564caade7ccSmrg ;; 6565caade7ccSmrg 6566caade7ccSmrg hpux9* | hpux10* | hpux11*) 6567caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6568caade7ccSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6569caade7ccSmrg # not for PA HP-UX. 6570caade7ccSmrg case $host_cpu in 6571caade7ccSmrg hppa*64*|ia64*) 6572caade7ccSmrg # +Z the default 6573caade7ccSmrg ;; 6574caade7ccSmrg *) 6575caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6576caade7ccSmrg ;; 6577caade7ccSmrg esac 6578caade7ccSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6579caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6580caade7ccSmrg ;; 6581caade7ccSmrg 6582caade7ccSmrg irix5* | irix6* | nonstopux*) 6583caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6584caade7ccSmrg # PIC (with -KPIC) is the default. 6585caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6586caade7ccSmrg ;; 6587caade7ccSmrg 6588caade7ccSmrg newsos6) 6589caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6590caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6591caade7ccSmrg ;; 6592caade7ccSmrg 6593caade7ccSmrg linux*) 6594caade7ccSmrg case $cc_basename in 6595caade7ccSmrg icc* | ecc*) 6596caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6597caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6598caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6599caade7ccSmrg ;; 6600caade7ccSmrg pgcc* | pgf77* | pgf90* | pgf95*) 6601caade7ccSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 6602caade7ccSmrg # which looks to be a dead project) 6603caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6604caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6605caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6606caade7ccSmrg ;; 6607caade7ccSmrg ccc*) 6608caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6609caade7ccSmrg # All Alpha code is PIC. 6610caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6611caade7ccSmrg ;; 6612caade7ccSmrg esac 6613caade7ccSmrg ;; 6614caade7ccSmrg 6615caade7ccSmrg osf3* | osf4* | osf5*) 6616caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6617caade7ccSmrg # All OSF/1 code is PIC. 6618caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6619caade7ccSmrg ;; 6620caade7ccSmrg 6621caade7ccSmrg solaris*) 6622caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6623caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6624caade7ccSmrg case $cc_basename in 6625caade7ccSmrg f77* | f90* | f95*) 6626caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6627caade7ccSmrg *) 6628caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6629caade7ccSmrg esac 6630caade7ccSmrg ;; 6631caade7ccSmrg 6632caade7ccSmrg sunos4*) 6633caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6634caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6635caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6636caade7ccSmrg ;; 6637caade7ccSmrg 6638caade7ccSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 6639caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6640caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6641caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6642caade7ccSmrg ;; 6643caade7ccSmrg 6644caade7ccSmrg sysv4*MP*) 6645caade7ccSmrg if test -d /usr/nec ;then 6646caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6647caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6648caade7ccSmrg fi 6649caade7ccSmrg ;; 6650caade7ccSmrg 6651caade7ccSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6652caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6653caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6654caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6655caade7ccSmrg ;; 6656caade7ccSmrg 6657caade7ccSmrg unicos*) 6658caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6659caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6660caade7ccSmrg ;; 6661caade7ccSmrg 6662caade7ccSmrg uts4*) 6663caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6664caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6665caade7ccSmrg ;; 6666caade7ccSmrg 6667caade7ccSmrg *) 6668caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6669caade7ccSmrg ;; 6670caade7ccSmrg esac 6671caade7ccSmrg fi 6672caade7ccSmrg]) 6673caade7ccSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 6674caade7ccSmrg 6675caade7ccSmrg# 6676caade7ccSmrg# Check to make sure the PIC flag actually works. 6677caade7ccSmrg# 6678caade7ccSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 6679caade7ccSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 6680caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 6681caade7ccSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 6682caade7ccSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 6683caade7ccSmrg "" | " "*) ;; 6684caade7ccSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6685caade7ccSmrg esac], 6686caade7ccSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6687caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6688caade7ccSmrgfi 6689caade7ccSmrgcase $host_os in 6690caade7ccSmrg # For platforms which do not support PIC, -DPIC is meaningless: 6691caade7ccSmrg *djgpp*) 6692caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6693caade7ccSmrg ;; 6694caade7ccSmrg *) 6695caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 6696caade7ccSmrg ;; 6697caade7ccSmrgesac 6698caade7ccSmrg 6699caade7ccSmrg# 6700caade7ccSmrg# Check to make sure the static flag actually works. 6701caade7ccSmrg# 6702caade7ccSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 6703caade7ccSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6704caade7ccSmrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 6705caade7ccSmrg $lt_tmp_static_flag, 6706caade7ccSmrg [], 6707caade7ccSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 6708caade7ccSmrg]) 6709caade7ccSmrg 6710caade7ccSmrg 6711caade7ccSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 6712caade7ccSmrg# ------------------------------------ 6713caade7ccSmrg# See if the linker supports building shared libraries. 6714caade7ccSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 6715caade7ccSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6716caade7ccSmrgifelse([$1],[CXX],[ 6717caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6718caade7ccSmrg case $host_os in 6719caade7ccSmrg aix4* | aix5*) 6720caade7ccSmrg # If we're using GNU nm, then we don't want the "-C" option. 6721caade7ccSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6722caade7ccSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6723caade7ccSmrg _LT_AC_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' 6724caade7ccSmrg else 6725caade7ccSmrg _LT_AC_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' 6726caade7ccSmrg fi 6727caade7ccSmrg ;; 6728caade7ccSmrg pw32*) 6729caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6730caade7ccSmrg ;; 6731caade7ccSmrg cygwin* | mingw*) 6732caade7ccSmrg _LT_AC_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' 6733caade7ccSmrg ;; 6734caade7ccSmrg *) 6735caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6736caade7ccSmrg ;; 6737caade7ccSmrg esac 6738caade7ccSmrg],[ 6739caade7ccSmrg runpath_var= 6740caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6741caade7ccSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6742caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 6743caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6744caade7ccSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 6745caade7ccSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6746caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6747caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6748caade7ccSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 6749caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6750caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6751caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6752caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6753caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6754caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6755caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6756caade7ccSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 6757caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1)= 6758caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 6759caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6760caade7ccSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6761caade7ccSmrg # include_expsyms should be a list of space-separated symbols to be *always* 6762caade7ccSmrg # included in the symbol list 6763caade7ccSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 6764caade7ccSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 6765caade7ccSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6766caade7ccSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6767caade7ccSmrg # as well as any symbol that contains `d'. 6768caade7ccSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 6769caade7ccSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6770caade7ccSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 6771caade7ccSmrg # the symbol is explicitly referenced. Since portable code cannot 6772caade7ccSmrg # rely on this symbol name, it's probably fine to never include it in 6773caade7ccSmrg # preloaded symbol tables. 6774caade7ccSmrg extract_expsyms_cmds= 6775caade7ccSmrg # Just being paranoid about ensuring that cc_basename is set. 6776caade7ccSmrg _LT_CC_BASENAME([$compiler]) 6777caade7ccSmrg case $host_os in 6778caade7ccSmrg cygwin* | mingw* | pw32*) 6779caade7ccSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6780caade7ccSmrg # When not using gcc, we currently assume that we are using 6781caade7ccSmrg # Microsoft Visual C++. 6782caade7ccSmrg if test "$GCC" != yes; then 6783caade7ccSmrg with_gnu_ld=no 6784caade7ccSmrg fi 6785caade7ccSmrg ;; 6786caade7ccSmrg interix*) 6787caade7ccSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6788caade7ccSmrg with_gnu_ld=yes 6789caade7ccSmrg ;; 6790caade7ccSmrg openbsd*) 6791caade7ccSmrg with_gnu_ld=no 6792caade7ccSmrg ;; 6793caade7ccSmrg esac 6794caade7ccSmrg 6795caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6796caade7ccSmrg if test "$with_gnu_ld" = yes; then 6797caade7ccSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6798caade7ccSmrg wlarc='${wl}' 6799caade7ccSmrg 6800caade7ccSmrg # Set some defaults for GNU ld with shared library support. These 6801caade7ccSmrg # are reset later if shared libraries are not supported. Putting them 6802caade7ccSmrg # here allows them to be overridden if necessary. 6803caade7ccSmrg runpath_var=LD_RUN_PATH 6804caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6805caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6806caade7ccSmrg # ancient GNU ld didn't support --whole-archive et. al. 6807caade7ccSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 6808caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6809caade7ccSmrg else 6810caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6811caade7ccSmrg fi 6812caade7ccSmrg supports_anon_versioning=no 6813caade7ccSmrg case `$LD -v 2>/dev/null` in 6814caade7ccSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6815caade7ccSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6816caade7ccSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6817caade7ccSmrg *\ 2.11.*) ;; # other 2.11 versions 6818caade7ccSmrg *) supports_anon_versioning=yes ;; 6819caade7ccSmrg esac 6820caade7ccSmrg 6821caade7ccSmrg # See if GNU ld supports shared libraries. 6822caade7ccSmrg case $host_os in 6823caade7ccSmrg aix3* | aix4* | aix5*) 6824caade7ccSmrg # On AIX/PPC, the GNU linker is very broken 6825caade7ccSmrg if test "$host_cpu" != ia64; then 6826caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6827caade7ccSmrg cat <<EOF 1>&2 6828caade7ccSmrg 6829caade7ccSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6830caade7ccSmrg*** to be unable to reliably create shared libraries on AIX. 6831caade7ccSmrg*** Therefore, libtool is disabling shared libraries support. If you 6832caade7ccSmrg*** really care for shared libraries, you may want to modify your PATH 6833caade7ccSmrg*** so that a non-GNU linker is found, and then restart. 6834caade7ccSmrg 6835caade7ccSmrgEOF 6836caade7ccSmrg fi 6837caade7ccSmrg ;; 6838caade7ccSmrg 6839caade7ccSmrg amigaos*) 6840caade7ccSmrg _LT_AC_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)' 6841caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6842caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6843caade7ccSmrg 6844caade7ccSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 6845caade7ccSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 6846caade7ccSmrg # to version 4, is to share data among multiple programs linked 6847caade7ccSmrg # with the same dynamic library. Since this doesn't match the 6848caade7ccSmrg # behavior of shared libraries on other platforms, we can't use 6849caade7ccSmrg # them. 6850caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6851caade7ccSmrg ;; 6852caade7ccSmrg 6853caade7ccSmrg beos*) 6854caade7ccSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6855caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6856caade7ccSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6857caade7ccSmrg # support --undefined. This deserves some investigation. FIXME 6858caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6859caade7ccSmrg else 6860caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6861caade7ccSmrg fi 6862caade7ccSmrg ;; 6863caade7ccSmrg 6864caade7ccSmrg cygwin* | mingw* | pw32*) 6865caade7ccSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6866caade7ccSmrg # as there is no search path for DLLs. 6867caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6868caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6869caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6870caade7ccSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6871caade7ccSmrg _LT_AC_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' 6872caade7ccSmrg 6873caade7ccSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 6874caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6875caade7ccSmrg # If the export-symbols file already is a .def file (1st line 6876caade7ccSmrg # is EXPORTS), use it as is; otherwise, prepend... 6877caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6878caade7ccSmrg cp $export_symbols $output_objdir/$soname.def; 6879caade7ccSmrg else 6880caade7ccSmrg echo EXPORTS > $output_objdir/$soname.def; 6881caade7ccSmrg cat $export_symbols >> $output_objdir/$soname.def; 6882caade7ccSmrg fi~ 6883caade7ccSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6884caade7ccSmrg else 6885caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6886caade7ccSmrg fi 6887caade7ccSmrg ;; 6888caade7ccSmrg 6889caade7ccSmrg interix3*) 6890caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6891caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6892caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6893caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6894caade7ccSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6895caade7ccSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6896caade7ccSmrg # default) and relocated if they conflict, which is a slow very memory 6897caade7ccSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6898caade7ccSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6899caade7ccSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6900caade7ccSmrg _LT_AC_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' 6901caade7ccSmrg _LT_AC_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' 6902caade7ccSmrg ;; 6903caade7ccSmrg 6904caade7ccSmrg linux*) 6905caade7ccSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6906caade7ccSmrg tmp_addflag= 6907caade7ccSmrg case $cc_basename,$host_cpu in 6908caade7ccSmrg pgcc*) # Portland Group C compiler 6909caade7ccSmrg _LT_AC_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' 6910caade7ccSmrg tmp_addflag=' $pic_flag' 6911caade7ccSmrg ;; 6912caade7ccSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6913caade7ccSmrg _LT_AC_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' 6914caade7ccSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 6915caade7ccSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6916caade7ccSmrg tmp_addflag=' -i_dynamic' ;; 6917caade7ccSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6918caade7ccSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6919caade7ccSmrg ifc* | ifort*) # Intel Fortran compiler 6920caade7ccSmrg tmp_addflag=' -nofor_main' ;; 6921caade7ccSmrg esac 6922caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6923caade7ccSmrg 6924caade7ccSmrg if test $supports_anon_versioning = yes; then 6925caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 6926caade7ccSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6927caade7ccSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 6928caade7ccSmrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6929caade7ccSmrg fi 6930caade7ccSmrg else 6931caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6932caade7ccSmrg fi 6933caade7ccSmrg ;; 6934caade7ccSmrg 6935caade7ccSmrg netbsd*) 6936caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6937caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6938caade7ccSmrg wlarc= 6939caade7ccSmrg else 6940caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6941caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6942caade7ccSmrg fi 6943caade7ccSmrg ;; 6944caade7ccSmrg 6945caade7ccSmrg solaris*) 6946caade7ccSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 6947caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6948caade7ccSmrg cat <<EOF 1>&2 6949caade7ccSmrg 6950caade7ccSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6951caade7ccSmrg*** create shared libraries on Solaris systems. Therefore, libtool 6952caade7ccSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6953caade7ccSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 6954caade7ccSmrg*** your PATH or compiler configuration so that the native linker is 6955caade7ccSmrg*** used, and then restart. 6956caade7ccSmrg 6957caade7ccSmrgEOF 6958caade7ccSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6959caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6960caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6961caade7ccSmrg else 6962caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6963caade7ccSmrg fi 6964caade7ccSmrg ;; 6965caade7ccSmrg 6966caade7ccSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6967caade7ccSmrg case `$LD -v 2>&1` in 6968caade7ccSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6969caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6970caade7ccSmrg cat <<_LT_EOF 1>&2 6971caade7ccSmrg 6972caade7ccSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6973caade7ccSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6974caade7ccSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6975caade7ccSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6976caade7ccSmrg*** your PATH or compiler configuration so that the native linker is 6977caade7ccSmrg*** used, and then restart. 6978caade7ccSmrg 6979caade7ccSmrg_LT_EOF 6980caade7ccSmrg ;; 6981caade7ccSmrg *) 6982caade7ccSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6983caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 6984caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 6985caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 6986caade7ccSmrg else 6987caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6988caade7ccSmrg fi 6989caade7ccSmrg ;; 6990caade7ccSmrg esac 6991caade7ccSmrg ;; 6992caade7ccSmrg 6993caade7ccSmrg sunos4*) 6994caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6995caade7ccSmrg wlarc= 6996caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6997caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6998caade7ccSmrg ;; 6999caade7ccSmrg 7000caade7ccSmrg *) 7001caade7ccSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7002caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7003caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7004caade7ccSmrg else 7005caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7006caade7ccSmrg fi 7007caade7ccSmrg ;; 7008caade7ccSmrg esac 7009caade7ccSmrg 7010caade7ccSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 7011caade7ccSmrg runpath_var= 7012caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7013caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7014caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7015caade7ccSmrg fi 7016caade7ccSmrg else 7017caade7ccSmrg # PORTME fill in a description of your system's linker (not GNU ld) 7018caade7ccSmrg case $host_os in 7019caade7ccSmrg aix3*) 7020caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7021caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7022caade7ccSmrg _LT_AC_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' 7023caade7ccSmrg # Note: this linker hardcodes the directories in LIBPATH if there 7024caade7ccSmrg # are no directories specified by -L. 7025caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7026caade7ccSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7027caade7ccSmrg # Neither direct hardcoding nor static linking is supported with a 7028caade7ccSmrg # broken collect2. 7029caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7030caade7ccSmrg fi 7031caade7ccSmrg ;; 7032caade7ccSmrg 7033caade7ccSmrg aix4* | aix5*) 7034caade7ccSmrg if test "$host_cpu" = ia64; then 7035caade7ccSmrg # On IA64, the linker does run time linking by default, so we don't 7036caade7ccSmrg # have to do anything special. 7037caade7ccSmrg aix_use_runtimelinking=no 7038caade7ccSmrg exp_sym_flag='-Bexport' 7039caade7ccSmrg no_entry_flag="" 7040caade7ccSmrg else 7041caade7ccSmrg # If we're using GNU nm, then we don't want the "-C" option. 7042caade7ccSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7043caade7ccSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7044caade7ccSmrg _LT_AC_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' 7045caade7ccSmrg else 7046caade7ccSmrg _LT_AC_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' 7047caade7ccSmrg fi 7048caade7ccSmrg aix_use_runtimelinking=no 7049caade7ccSmrg 7050caade7ccSmrg # Test if we are trying to use run time linking or normal 7051caade7ccSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7052caade7ccSmrg # need to do runtime linking. 7053caade7ccSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 7054caade7ccSmrg for ld_flag in $LDFLAGS; do 7055caade7ccSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7056caade7ccSmrg aix_use_runtimelinking=yes 7057caade7ccSmrg break 7058caade7ccSmrg fi 7059caade7ccSmrg done 7060caade7ccSmrg ;; 7061caade7ccSmrg esac 7062caade7ccSmrg 7063caade7ccSmrg exp_sym_flag='-bexport' 7064caade7ccSmrg no_entry_flag='-bnoentry' 7065caade7ccSmrg fi 7066caade7ccSmrg 7067caade7ccSmrg # When large executables or shared objects are built, AIX ld can 7068caade7ccSmrg # have problems creating the table of contents. If linking a library 7069caade7ccSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7070caade7ccSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7071caade7ccSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7072caade7ccSmrg 7073caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 7074caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7075caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7076caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7077caade7ccSmrg 7078caade7ccSmrg if test "$GCC" = yes; then 7079caade7ccSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7080caade7ccSmrg # We only want to do this on AIX 4.2 and lower, the check 7081caade7ccSmrg # below for broken collect2 doesn't work under 4.3+ 7082caade7ccSmrg collect2name=`${CC} -print-prog-name=collect2` 7083caade7ccSmrg if test -f "$collect2name" && \ 7084caade7ccSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 7085caade7ccSmrg then 7086caade7ccSmrg # We have reworked collect2 7087caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7088caade7ccSmrg else 7089caade7ccSmrg # We have old collect2 7090caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7091caade7ccSmrg # It fails to find uninstalled libraries when the uninstalled 7092caade7ccSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7093caade7ccSmrg # to unsupported forces relinking 7094caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7095caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7096caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7097caade7ccSmrg fi 7098caade7ccSmrg ;; 7099caade7ccSmrg esac 7100caade7ccSmrg shared_flag='-shared' 7101caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 7102caade7ccSmrg shared_flag="$shared_flag "'${wl}-G' 7103caade7ccSmrg fi 7104caade7ccSmrg else 7105caade7ccSmrg # not using gcc 7106caade7ccSmrg if test "$host_cpu" = ia64; then 7107caade7ccSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7108caade7ccSmrg # chokes on -Wl,-G. The following line is correct: 7109caade7ccSmrg shared_flag='-G' 7110caade7ccSmrg else 7111caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 7112caade7ccSmrg shared_flag='${wl}-G' 7113caade7ccSmrg else 7114caade7ccSmrg shared_flag='${wl}-bM:SRE' 7115caade7ccSmrg fi 7116caade7ccSmrg fi 7117caade7ccSmrg fi 7118caade7ccSmrg 7119caade7ccSmrg # It seems that -bexpall does not export symbols beginning with 7120caade7ccSmrg # underscore (_), so it is better to generate a list of symbols to export. 7121caade7ccSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7122caade7ccSmrg if test "$aix_use_runtimelinking" = yes; then 7123caade7ccSmrg # Warning - without using the other runtime loading flags (-brtl), 7124caade7ccSmrg # -berok will link without error, but may produce a broken library. 7125caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 7126caade7ccSmrg # Determine the default libpath from the value encoded in an empty executable. 7127caade7ccSmrg _LT_AC_SYS_LIBPATH_AIX 7128caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7129caade7ccSmrg _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7130caade7ccSmrg else 7131caade7ccSmrg if test "$host_cpu" = ia64; then 7132caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7133caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7134caade7ccSmrg _LT_AC_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" 7135caade7ccSmrg else 7136caade7ccSmrg # Determine the default libpath from the value encoded in an empty executable. 7137caade7ccSmrg _LT_AC_SYS_LIBPATH_AIX 7138caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7139caade7ccSmrg # Warning - without using the other run time loading flags, 7140caade7ccSmrg # -berok will link without error, but may produce a broken library. 7141caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7142caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7143caade7ccSmrg # Exported symbols can be pulled into shared objects from archives 7144caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7145caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7146caade7ccSmrg # This is similar to how AIX traditionally builds its shared libraries. 7147caade7ccSmrg _LT_AC_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' 7148caade7ccSmrg fi 7149caade7ccSmrg fi 7150caade7ccSmrg ;; 7151caade7ccSmrg 7152caade7ccSmrg amigaos*) 7153caade7ccSmrg _LT_AC_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)' 7154caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7155caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7156caade7ccSmrg # see comment about different semantics on the GNU ld section 7157caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7158caade7ccSmrg ;; 7159caade7ccSmrg 7160caade7ccSmrg bsdi[[45]]*) 7161caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7162caade7ccSmrg ;; 7163caade7ccSmrg 7164caade7ccSmrg cygwin* | mingw* | pw32*) 7165caade7ccSmrg # When not using gcc, we currently assume that we are using 7166caade7ccSmrg # Microsoft Visual C++. 7167caade7ccSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7168caade7ccSmrg # no search path for DLLs. 7169caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7170caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7171caade7ccSmrg # Tell ltmain to make .lib files, not .a files. 7172caade7ccSmrg libext=lib 7173caade7ccSmrg # Tell ltmain to make .dll files, not .so files. 7174caade7ccSmrg shrext_cmds=".dll" 7175caade7ccSmrg # FIXME: Setting linknames here is a bad hack. 7176caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7177caade7ccSmrg # The linker will automatically build a .lib file if we build a DLL. 7178caade7ccSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 7179caade7ccSmrg # FIXME: Should let the user specify the lib program. 7180caade7ccSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 7181caade7ccSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7182caade7ccSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7183caade7ccSmrg ;; 7184caade7ccSmrg 7185caade7ccSmrg darwin* | rhapsody*) 7186caade7ccSmrg case $host_os in 7187caade7ccSmrg rhapsody* | darwin1.[[012]]) 7188caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 7189caade7ccSmrg ;; 7190caade7ccSmrg *) # Darwin 1.3 on 7191caade7ccSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 7192caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7193caade7ccSmrg else 7194caade7ccSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 7195caade7ccSmrg 10.[[012]]) 7196caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7197caade7ccSmrg ;; 7198caade7ccSmrg 10.*) 7199caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 7200caade7ccSmrg ;; 7201caade7ccSmrg esac 7202caade7ccSmrg fi 7203caade7ccSmrg ;; 7204caade7ccSmrg esac 7205caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7206caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7207caade7ccSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 7208caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7209caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 7210caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7211caade7ccSmrg if test "$GCC" = yes ; then 7212caade7ccSmrg output_verbose_link_cmd='echo' 7213caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 7214caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7215caade7ccSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7216caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7217caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7218caade7ccSmrg else 7219caade7ccSmrg case $cc_basename in 7220caade7ccSmrg xlc*) 7221caade7ccSmrg output_verbose_link_cmd='echo' 7222caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 7223caade7ccSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7224caade7ccSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7225caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7226caade7ccSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7227caade7ccSmrg ;; 7228caade7ccSmrg *) 7229caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7230caade7ccSmrg ;; 7231caade7ccSmrg esac 7232caade7ccSmrg fi 7233caade7ccSmrg ;; 7234caade7ccSmrg 7235caade7ccSmrg dgux*) 7236caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7237caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7238caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7239caade7ccSmrg ;; 7240caade7ccSmrg 7241caade7ccSmrg freebsd1*) 7242caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7243caade7ccSmrg ;; 7244caade7ccSmrg 7245caade7ccSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7246caade7ccSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 7247caade7ccSmrg # does not break anything, and helps significantly (at the cost of a little 7248caade7ccSmrg # extra space). 7249caade7ccSmrg freebsd2.2*) 7250caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7251caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7252caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7253caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7254caade7ccSmrg ;; 7255caade7ccSmrg 7256caade7ccSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7257caade7ccSmrg freebsd2*) 7258caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7259caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7260caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7261caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7262caade7ccSmrg ;; 7263caade7ccSmrg 7264caade7ccSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7265caade7ccSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 7266caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7267caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7268caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7269caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7270caade7ccSmrg ;; 7271caade7ccSmrg 7272caade7ccSmrg hpux9*) 7273caade7ccSmrg if test "$GCC" = yes; then 7274caade7ccSmrg _LT_AC_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' 7275caade7ccSmrg else 7276caade7ccSmrg _LT_AC_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' 7277caade7ccSmrg fi 7278caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7279caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7280caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7281caade7ccSmrg 7282caade7ccSmrg # hardcode_minus_L: Not really in the search PATH, 7283caade7ccSmrg # but as the default location of the library. 7284caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7285caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7286caade7ccSmrg ;; 7287caade7ccSmrg 7288caade7ccSmrg hpux10*) 7289caade7ccSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7290caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7291caade7ccSmrg else 7292caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7293caade7ccSmrg fi 7294caade7ccSmrg if test "$with_gnu_ld" = no; then 7295caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7296caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7297caade7ccSmrg 7298caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7299caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7300caade7ccSmrg 7301caade7ccSmrg # hardcode_minus_L: Not really in the search PATH, 7302caade7ccSmrg # but as the default location of the library. 7303caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7304caade7ccSmrg fi 7305caade7ccSmrg ;; 7306caade7ccSmrg 7307caade7ccSmrg hpux11*) 7308caade7ccSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7309caade7ccSmrg case $host_cpu in 7310caade7ccSmrg hppa*64*) 7311caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7312caade7ccSmrg ;; 7313caade7ccSmrg ia64*) 7314caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7315caade7ccSmrg ;; 7316caade7ccSmrg *) 7317caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7318caade7ccSmrg ;; 7319caade7ccSmrg esac 7320caade7ccSmrg else 7321caade7ccSmrg case $host_cpu in 7322caade7ccSmrg hppa*64*) 7323caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7324caade7ccSmrg ;; 7325caade7ccSmrg ia64*) 7326caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7327caade7ccSmrg ;; 7328caade7ccSmrg *) 7329caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7330caade7ccSmrg ;; 7331caade7ccSmrg esac 7332caade7ccSmrg fi 7333caade7ccSmrg if test "$with_gnu_ld" = no; then 7334caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7335caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7336caade7ccSmrg 7337caade7ccSmrg case $host_cpu in 7338caade7ccSmrg hppa*64*|ia64*) 7339caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7340caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7341caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7342caade7ccSmrg ;; 7343caade7ccSmrg *) 7344caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7345caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7346caade7ccSmrg 7347caade7ccSmrg # hardcode_minus_L: Not really in the search PATH, 7348caade7ccSmrg # but as the default location of the library. 7349caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7350caade7ccSmrg ;; 7351caade7ccSmrg esac 7352caade7ccSmrg fi 7353caade7ccSmrg ;; 7354caade7ccSmrg 7355caade7ccSmrg irix5* | irix6* | nonstopux*) 7356caade7ccSmrg if test "$GCC" = yes; then 7357caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7358caade7ccSmrg else 7359caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 7360caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7361caade7ccSmrg fi 7362caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7363caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7364caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7365caade7ccSmrg ;; 7366caade7ccSmrg 7367caade7ccSmrg netbsd*) 7368caade7ccSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 7369caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7370caade7ccSmrg else 7371caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7372caade7ccSmrg fi 7373caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7374caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7375caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7376caade7ccSmrg ;; 7377caade7ccSmrg 7378caade7ccSmrg newsos6) 7379caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7380caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7381caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7382caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7383caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7384caade7ccSmrg ;; 7385caade7ccSmrg 7386caade7ccSmrg openbsd*) 7387caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7388caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7389caade7ccSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7390caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7391caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7392caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7393caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7394caade7ccSmrg else 7395caade7ccSmrg case $host_os in 7396caade7ccSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7397caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7398caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7399caade7ccSmrg ;; 7400caade7ccSmrg *) 7401caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7402caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7403caade7ccSmrg ;; 7404caade7ccSmrg esac 7405caade7ccSmrg fi 7406caade7ccSmrg ;; 7407caade7ccSmrg 7408caade7ccSmrg os2*) 7409caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7410caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7411caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7412caade7ccSmrg _LT_AC_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' 7413caade7ccSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7414caade7ccSmrg ;; 7415caade7ccSmrg 7416caade7ccSmrg osf3*) 7417caade7ccSmrg if test "$GCC" = yes; then 7418caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7419caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7420caade7ccSmrg else 7421caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7422caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 7423caade7ccSmrg fi 7424caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7425caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7426caade7ccSmrg ;; 7427caade7ccSmrg 7428caade7ccSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7429caade7ccSmrg if test "$GCC" = yes; then 7430caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7431caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7432caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7433caade7ccSmrg else 7434caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7435caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 7436caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 7437caade7ccSmrg $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 7438caade7ccSmrg 7439caade7ccSmrg # Both c and cxx compiler support -rpath directly 7440caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7441caade7ccSmrg fi 7442caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7443caade7ccSmrg ;; 7444caade7ccSmrg 7445caade7ccSmrg solaris*) 7446caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 7447caade7ccSmrg if test "$GCC" = yes; then 7448caade7ccSmrg wlarc='${wl}' 7449caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7450caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7451caade7ccSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 7452caade7ccSmrg else 7453caade7ccSmrg wlarc='' 7454caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7455caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7456caade7ccSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 7457caade7ccSmrg fi 7458caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7459caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7460caade7ccSmrg case $host_os in 7461caade7ccSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7462caade7ccSmrg *) 7463caade7ccSmrg # The compiler driver will combine linker options so we 7464caade7ccSmrg # cannot just pass the convience library names through 7465caade7ccSmrg # without $wl, iff we do not link with $LD. 7466caade7ccSmrg # Luckily, gcc supports the same syntax we need for Sun Studio. 7467caade7ccSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7468caade7ccSmrg case $wlarc in 7469caade7ccSmrg '') 7470caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 7471caade7ccSmrg *) 7472caade7ccSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 7473caade7ccSmrg esac ;; 7474caade7ccSmrg esac 7475caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7476caade7ccSmrg ;; 7477caade7ccSmrg 7478caade7ccSmrg sunos4*) 7479caade7ccSmrg if test "x$host_vendor" = xsequent; then 7480caade7ccSmrg # Use $CC to link under sequent, because it throws in some extra .o 7481caade7ccSmrg # files that make .init and .fini sections work. 7482caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7483caade7ccSmrg else 7484caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7485caade7ccSmrg fi 7486caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7487caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7488caade7ccSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7489caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7490caade7ccSmrg ;; 7491caade7ccSmrg 7492caade7ccSmrg sysv4) 7493caade7ccSmrg case $host_vendor in 7494caade7ccSmrg sni) 7495caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7496caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7497caade7ccSmrg ;; 7498caade7ccSmrg siemens) 7499caade7ccSmrg ## LD is ld it makes a PLAMLIB 7500caade7ccSmrg ## CC just makes a GrossModule. 7501caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7502caade7ccSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7503caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7504caade7ccSmrg ;; 7505caade7ccSmrg motorola) 7506caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7507caade7ccSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7508caade7ccSmrg ;; 7509caade7ccSmrg esac 7510caade7ccSmrg runpath_var='LD_RUN_PATH' 7511caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7512caade7ccSmrg ;; 7513caade7ccSmrg 7514caade7ccSmrg sysv4.3*) 7515caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7516caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7517caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7518caade7ccSmrg ;; 7519caade7ccSmrg 7520caade7ccSmrg sysv4*MP*) 7521caade7ccSmrg if test -d /usr/nec; then 7522caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7523caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7524caade7ccSmrg runpath_var=LD_RUN_PATH 7525caade7ccSmrg hardcode_runpath_var=yes 7526caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 7527caade7ccSmrg fi 7528caade7ccSmrg ;; 7529caade7ccSmrg 7530caade7ccSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 7531caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7532caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7533caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7534caade7ccSmrg runpath_var='LD_RUN_PATH' 7535caade7ccSmrg 7536caade7ccSmrg if test "$GCC" = yes; then 7537caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7538caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7539caade7ccSmrg else 7540caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7541caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7542caade7ccSmrg fi 7543caade7ccSmrg ;; 7544caade7ccSmrg 7545caade7ccSmrg sysv5* | sco3.2v5* | sco5v6*) 7546caade7ccSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7547caade7ccSmrg # link with -lc, and that would cause any symbols used from libc to 7548caade7ccSmrg # always be unresolved, which means just about no library would 7549caade7ccSmrg # ever link correctly. If we're not using GNU ld we use -z text 7550caade7ccSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7551caade7ccSmrg # as -z defs. 7552caade7ccSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7553caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7554caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7555caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7556caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 7557caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7558caade7ccSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7559caade7ccSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7560caade7ccSmrg runpath_var='LD_RUN_PATH' 7561caade7ccSmrg 7562caade7ccSmrg if test "$GCC" = yes; then 7563caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7564caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7565caade7ccSmrg else 7566caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7567caade7ccSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7568caade7ccSmrg fi 7569caade7ccSmrg ;; 7570caade7ccSmrg 7571caade7ccSmrg uts4*) 7572caade7ccSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7573caade7ccSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7574caade7ccSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7575caade7ccSmrg ;; 7576caade7ccSmrg 7577caade7ccSmrg *) 7578caade7ccSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7579caade7ccSmrg ;; 7580caade7ccSmrg esac 7581caade7ccSmrg fi 7582caade7ccSmrg]) 7583caade7ccSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 7584caade7ccSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7585caade7ccSmrg 7586caade7ccSmrg# 7587caade7ccSmrg# Do we need to explicitly link libc? 7588caade7ccSmrg# 7589caade7ccSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 7590caade7ccSmrgx|xyes) 7591caade7ccSmrg # Assume -lc should be added 7592caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7593caade7ccSmrg 7594caade7ccSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7595caade7ccSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 7596caade7ccSmrg *'~'*) 7597caade7ccSmrg # FIXME: we may have to deal with multi-command sequences. 7598caade7ccSmrg ;; 7599caade7ccSmrg '$CC '*) 7600caade7ccSmrg # Test whether the compiler implicitly links with -lc since on some 7601caade7ccSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7602caade7ccSmrg # to ld, don't add -lc before -lgcc. 7603caade7ccSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7604caade7ccSmrg $rm conftest* 7605caade7ccSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 7606caade7ccSmrg 7607caade7ccSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7608caade7ccSmrg soname=conftest 7609caade7ccSmrg lib=conftest 7610caade7ccSmrg libobjs=conftest.$ac_objext 7611caade7ccSmrg deplibs= 7612caade7ccSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 7613caade7ccSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 7614caade7ccSmrg compiler_flags=-v 7615caade7ccSmrg linker_flags=-v 7616caade7ccSmrg verstring= 7617caade7ccSmrg output_objdir=. 7618caade7ccSmrg libname=conftest 7619caade7ccSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 7620caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7621caade7ccSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 7622caade7ccSmrg then 7623caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7624caade7ccSmrg else 7625caade7ccSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7626caade7ccSmrg fi 7627caade7ccSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7628caade7ccSmrg else 7629caade7ccSmrg cat conftest.err 1>&5 7630caade7ccSmrg fi 7631caade7ccSmrg $rm conftest* 7632caade7ccSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 7633caade7ccSmrg ;; 7634caade7ccSmrg esac 7635caade7ccSmrg fi 7636caade7ccSmrg ;; 7637caade7ccSmrgesac 7638caade7ccSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 7639caade7ccSmrg 7640caade7ccSmrg 7641caade7ccSmrg# _LT_AC_FILE_LTDLL_C 7642caade7ccSmrg# ------------------- 7643caade7ccSmrg# Be careful that the start marker always follows a newline. 7644caade7ccSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 7645caade7ccSmrg# /* ltdll.c starts here */ 7646caade7ccSmrg# #define WIN32_LEAN_AND_MEAN 7647caade7ccSmrg# #include <windows.h> 7648caade7ccSmrg# #undef WIN32_LEAN_AND_MEAN 7649caade7ccSmrg# #include <stdio.h> 7650caade7ccSmrg# 7651caade7ccSmrg# #ifndef __CYGWIN__ 7652caade7ccSmrg# # ifdef __CYGWIN32__ 7653caade7ccSmrg# # define __CYGWIN__ __CYGWIN32__ 7654caade7ccSmrg# # endif 7655caade7ccSmrg# #endif 7656caade7ccSmrg# 7657caade7ccSmrg# #ifdef __cplusplus 7658caade7ccSmrg# extern "C" { 7659caade7ccSmrg# #endif 7660caade7ccSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 7661caade7ccSmrg# #ifdef __cplusplus 7662caade7ccSmrg# } 7663caade7ccSmrg# #endif 7664caade7ccSmrg# 7665caade7ccSmrg# #ifdef __CYGWIN__ 7666caade7ccSmrg# #include <cygwin/cygwin_dll.h> 7667caade7ccSmrg# DECLARE_CYGWIN_DLL( DllMain ); 7668caade7ccSmrg# #endif 7669caade7ccSmrg# HINSTANCE __hDllInstance_base; 7670caade7ccSmrg# 7671caade7ccSmrg# BOOL APIENTRY 7672caade7ccSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 7673caade7ccSmrg# { 7674caade7ccSmrg# __hDllInstance_base = hInst; 7675caade7ccSmrg# return TRUE; 7676caade7ccSmrg# } 7677caade7ccSmrg# /* ltdll.c ends here */ 7678caade7ccSmrg])# _LT_AC_FILE_LTDLL_C 7679caade7ccSmrg 7680caade7ccSmrg 7681caade7ccSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 7682caade7ccSmrg# --------------------------------- 7683caade7ccSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 7684caade7ccSmrg 7685caade7ccSmrg 7686caade7ccSmrg# old names 7687caade7ccSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 7688caade7ccSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7689caade7ccSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7690caade7ccSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7691caade7ccSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7692caade7ccSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 7693caade7ccSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 7694caade7ccSmrg 7695caade7ccSmrg# This is just to silence aclocal about the macro not being used 7696caade7ccSmrgifelse([AC_DISABLE_FAST_INSTALL]) 7697caade7ccSmrg 7698caade7ccSmrgAC_DEFUN([LT_AC_PROG_GCJ], 7699caade7ccSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 7700caade7ccSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7701caade7ccSmrg AC_SUBST(GCJFLAGS) 7702caade7ccSmrg]) 7703caade7ccSmrg 7704caade7ccSmrgAC_DEFUN([LT_AC_PROG_RC], 7705caade7ccSmrg[AC_CHECK_TOOL(RC, windres, no) 7706caade7ccSmrg]) 7707caade7ccSmrg 7708caade7ccSmrg# NOTE: This macro has been submitted for inclusion into # 7709caade7ccSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7710caade7ccSmrg# a released version of Autoconf we should remove this # 7711caade7ccSmrg# macro and use it instead. # 7712caade7ccSmrg# LT_AC_PROG_SED 7713caade7ccSmrg# -------------- 7714caade7ccSmrg# Check for a fully-functional sed program, that truncates 7715caade7ccSmrg# as few characters as possible. Prefer GNU sed if found. 7716caade7ccSmrgAC_DEFUN([LT_AC_PROG_SED], 7717caade7ccSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7718caade7ccSmrgAC_CACHE_VAL(lt_cv_path_SED, 7719caade7ccSmrg[# Loop through the user's path and test for sed and gsed. 7720caade7ccSmrg# Then use that list of sed's as ones to test for truncation. 7721caade7ccSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7722caade7ccSmrgfor as_dir in $PATH 7723caade7ccSmrgdo 7724caade7ccSmrg IFS=$as_save_IFS 7725caade7ccSmrg test -z "$as_dir" && as_dir=. 7726caade7ccSmrg for lt_ac_prog in sed gsed; do 7727caade7ccSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7728caade7ccSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7729caade7ccSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7730caade7ccSmrg fi 7731caade7ccSmrg done 7732caade7ccSmrg done 7733caade7ccSmrgdone 7734caade7ccSmrglt_ac_max=0 7735caade7ccSmrglt_ac_count=0 7736caade7ccSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7737caade7ccSmrg# along with /bin/sed that truncates output. 7738caade7ccSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7739caade7ccSmrg test ! -f $lt_ac_sed && continue 7740caade7ccSmrg cat /dev/null > conftest.in 7741caade7ccSmrg lt_ac_count=0 7742caade7ccSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7743caade7ccSmrg # Check for GNU sed and select it if it is found. 7744caade7ccSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7745caade7ccSmrg lt_cv_path_SED=$lt_ac_sed 7746caade7ccSmrg break 7747caade7ccSmrg fi 7748caade7ccSmrg while true; do 7749caade7ccSmrg cat conftest.in conftest.in >conftest.tmp 7750caade7ccSmrg mv conftest.tmp conftest.in 7751caade7ccSmrg cp conftest.in conftest.nl 7752caade7ccSmrg echo >>conftest.nl 7753caade7ccSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7754caade7ccSmrg cmp -s conftest.out conftest.nl || break 7755caade7ccSmrg # 10000 chars as input seems more than enough 7756caade7ccSmrg test $lt_ac_count -gt 10 && break 7757caade7ccSmrg lt_ac_count=`expr $lt_ac_count + 1` 7758caade7ccSmrg if test $lt_ac_count -gt $lt_ac_max; then 7759caade7ccSmrg lt_ac_max=$lt_ac_count 7760caade7ccSmrg lt_cv_path_SED=$lt_ac_sed 7761caade7ccSmrg fi 7762caade7ccSmrg done 7763caade7ccSmrgdone 7764caade7ccSmrg]) 7765caade7ccSmrgSED=$lt_cv_path_SED 7766caade7ccSmrgAC_MSG_RESULT([$SED]) 7767caade7ccSmrg]) 7768caade7ccSmrg 7769caade7ccSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7770caade7ccSmrg# 7771caade7ccSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7772caade7ccSmrg# 7773caade7ccSmrg# This program is free software; you can redistribute it and/or modify 7774caade7ccSmrg# it under the terms of the GNU General Public License as published by 7775caade7ccSmrg# the Free Software Foundation; either version 2 of the License, or 7776caade7ccSmrg# (at your option) any later version. 7777caade7ccSmrg# 7778caade7ccSmrg# This program is distributed in the hope that it will be useful, but 7779caade7ccSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7780caade7ccSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7781caade7ccSmrg# General Public License for more details. 7782caade7ccSmrg# 7783caade7ccSmrg# You should have received a copy of the GNU General Public License 7784caade7ccSmrg# along with this program; if not, write to the Free Software 7785caade7ccSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7786caade7ccSmrg# 7787caade7ccSmrg# As a special exception to the GNU General Public License, if you 7788caade7ccSmrg# distribute this file as part of a program that contains a 7789caade7ccSmrg# configuration script generated by Autoconf, you may include it under 7790caade7ccSmrg# the same distribution terms that you use for the rest of that program. 7791caade7ccSmrg 7792caade7ccSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7793caade7ccSmrg# ---------------------------------- 7794caade7ccSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7795caade7ccSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7796caade7ccSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7797caade7ccSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 7798caade7ccSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 7799caade7ccSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 7800caade7ccSmrgfi 7801caade7ccSmrgif test -n "$PKG_CONFIG"; then 7802caade7ccSmrg _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 7803caade7ccSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 7804caade7ccSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 7805caade7ccSmrg AC_MSG_RESULT([yes]) 7806caade7ccSmrg else 7807caade7ccSmrg AC_MSG_RESULT([no]) 7808caade7ccSmrg PKG_CONFIG="" 7809caade7ccSmrg fi 7810caade7ccSmrg 7811caade7ccSmrgfi[]dnl 7812caade7ccSmrg])# PKG_PROG_PKG_CONFIG 7813caade7ccSmrg 7814caade7ccSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 7815caade7ccSmrg# 7816caade7ccSmrg# Check to see whether a particular set of modules exists. Similar 7817caade7ccSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 7818caade7ccSmrg# 7819caade7ccSmrg# 7820caade7ccSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 7821caade7ccSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 7822caade7ccSmrg# PKG_CHECK_EXISTS manually 7823caade7ccSmrg# -------------------------------------------------------------- 7824caade7ccSmrgAC_DEFUN([PKG_CHECK_EXISTS], 7825caade7ccSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 7826caade7ccSmrgif test -n "$PKG_CONFIG" && \ 7827caade7ccSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 7828caade7ccSmrg m4_ifval([$2], [$2], [:]) 7829caade7ccSmrgm4_ifvaln([$3], [else 7830caade7ccSmrg $3])dnl 7831caade7ccSmrgfi]) 7832caade7ccSmrg 7833caade7ccSmrg 7834caade7ccSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 7835caade7ccSmrg# --------------------------------------------- 7836caade7ccSmrgm4_define([_PKG_CONFIG], 7837caade7ccSmrg[if test -n "$PKG_CONFIG"; then 7838caade7ccSmrg PKG_CHECK_EXISTS([$3], 7839caade7ccSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 7840caade7ccSmrg [pkg_failed=yes]) 7841caade7ccSmrgelse 7842caade7ccSmrg pkg_failed=untried 7843caade7ccSmrgfi[]dnl 7844caade7ccSmrg])# _PKG_CONFIG 7845caade7ccSmrg 7846caade7ccSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 7847caade7ccSmrg# [ACTION-IF-NOT-FOUND]) 7848caade7ccSmrg# 7849caade7ccSmrg# 7850caade7ccSmrg# Note that if there is a possibility the first call to 7851caade7ccSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 7852caade7ccSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 7853caade7ccSmrg# 7854caade7ccSmrg# 7855caade7ccSmrg# -------------------------------------------------------------- 7856caade7ccSmrgAC_DEFUN([PKG_CHECK_MODULES], 7857caade7ccSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 7858caade7ccSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 7859caade7ccSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 7860caade7ccSmrg 7861caade7ccSmrgpkg_failed=no 7862caade7ccSmrgAC_MSG_CHECKING([for $1]) 7863caade7ccSmrg 7864caade7ccSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 7865caade7ccSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 7866caade7ccSmrg 7867caade7ccSmrgif test $pkg_failed = yes; then 7868caade7ccSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 7869caade7ccSmrg # Put the nasty error message in config.log where it belongs 7870caade7ccSmrg echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 7871caade7ccSmrg 7872caade7ccSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 7873caade7ccSmrg[Package requirements ($2) were not met. 7874caade7ccSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 7875caade7ccSmrginstalled software in a non-standard prefix. 7876caade7ccSmrg 7877caade7ccSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 7878caade7ccSmrgto avoid the need to call pkg-config. See the pkg-config man page for 7879caade7ccSmrgmore details.])], 7880caade7ccSmrg [$4]) 7881caade7ccSmrgelif test $pkg_failed = untried; then 7882caade7ccSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 7883caade7ccSmrg[The pkg-config script could not be found or is too old. Make sure it 7884caade7ccSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 7885caade7ccSmrgpath to pkg-config. 7886caade7ccSmrg 7887caade7ccSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 7888caade7ccSmrgto avoid the need to call pkg-config. See the pkg-config man page for 7889caade7ccSmrgmore details. 7890caade7ccSmrg 7891caade7ccSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 7892caade7ccSmrg [$4]) 7893caade7ccSmrgelse 7894caade7ccSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 7895caade7ccSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 7896caade7ccSmrg AC_MSG_RESULT([yes]) 7897caade7ccSmrg ifelse([$3], , :, [$3]) 7898caade7ccSmrgfi[]dnl 7899caade7ccSmrg])# PKG_CHECK_MODULES 7900caade7ccSmrg 7901