aclocal.m4 revision 8c9fbc29
18c9fbc29Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*-
28c9fbc29Smrg
38c9fbc29Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
48c9fbc29Smrg# 2005, 2006  Free Software Foundation, Inc.
58c9fbc29Smrg# This file is free software; the Free Software Foundation
68c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
78c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
88c9fbc29Smrg
98c9fbc29Smrg# This program is distributed in the hope that it will be useful,
108c9fbc29Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
118c9fbc29Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
128c9fbc29Smrg# PARTICULAR PURPOSE.
138c9fbc29Smrg
148c9fbc29Smrgm4_if(m4_PACKAGE_VERSION, [2.61],,
158c9fbc29Smrg[m4_fatal([this file was generated for autoconf 2.61.
168c9fbc29SmrgYou have another version of autoconf.  If you want to use that,
178c9fbc29Smrgyou should regenerate the build system entirely.], [63])])
188c9fbc29Smrg
198c9fbc29Smrg# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
208c9fbc29Smrg#
218c9fbc29Smrg# This file is free software; the Free Software Foundation
228c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
238c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
248c9fbc29Smrg
258c9fbc29Smrg# AM_AUTOMAKE_VERSION(VERSION)
268c9fbc29Smrg# ----------------------------
278c9fbc29Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
288c9fbc29Smrg# generated from the m4 files accompanying Automake X.Y.
298c9fbc29Smrg# (This private macro should not be called outside this file.)
308c9fbc29SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
318c9fbc29Smrg[am__api_version='1.10'
328c9fbc29Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
338c9fbc29Smrgdnl require some minimum version.  Point them to the right macro.
348c9fbc29Smrgm4_if([$1], [1.10], [],
358c9fbc29Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
368c9fbc29Smrg])
378c9fbc29Smrg
388c9fbc29Smrg# _AM_AUTOCONF_VERSION(VERSION)
398c9fbc29Smrg# -----------------------------
408c9fbc29Smrg# aclocal traces this macro to find the Autoconf version.
418c9fbc29Smrg# This is a private macro too.  Using m4_define simplifies
428c9fbc29Smrg# the logic in aclocal, which can simply ignore this definition.
438c9fbc29Smrgm4_define([_AM_AUTOCONF_VERSION], [])
448c9fbc29Smrg
458c9fbc29Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
468c9fbc29Smrg# -------------------------------
478c9fbc29Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
488c9fbc29Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
498c9fbc29SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
508c9fbc29Smrg[AM_AUTOMAKE_VERSION([1.10])dnl
518c9fbc29Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
528c9fbc29Smrg
538c9fbc29Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
548c9fbc29Smrg
558c9fbc29Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
568c9fbc29Smrg#
578c9fbc29Smrg# This file is free software; the Free Software Foundation
588c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
598c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
608c9fbc29Smrg
618c9fbc29Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
628c9fbc29Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
638c9fbc29Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
648c9fbc29Smrg#
658c9fbc29Smrg# Of course, Automake must honor this variable whenever it calls a
668c9fbc29Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
678c9fbc29Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
688c9fbc29Smrg# depending on how configure is run.  This is pretty annoying, since
698c9fbc29Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
708c9fbc29Smrg# source directory, any form will work fine, but in subdirectories a
718c9fbc29Smrg# relative path needs to be adjusted first.
728c9fbc29Smrg#
738c9fbc29Smrg# $ac_aux_dir/missing
748c9fbc29Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
758c9fbc29Smrg# $top_srcdir/$ac_aux_dir/missing
768c9fbc29Smrg#    fails if $ac_aux_dir is absolute,
778c9fbc29Smrg#    fails when called from a subdirectory in a VPATH build with
788c9fbc29Smrg#          a relative $ac_aux_dir
798c9fbc29Smrg#
808c9fbc29Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
818c9fbc29Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
828c9fbc29Smrg# harmless because $srcdir is `.', but things will broke when you
838c9fbc29Smrg# start a VPATH build or use an absolute $srcdir.
848c9fbc29Smrg#
858c9fbc29Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
868c9fbc29Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
878c9fbc29Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
888c9fbc29Smrg# and then we would define $MISSING as
898c9fbc29Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
908c9fbc29Smrg# This will work as long as MISSING is not called from configure, because
918c9fbc29Smrg# unfortunately $(top_srcdir) has no meaning in configure.
928c9fbc29Smrg# However there are other variables, like CC, which are often used in
938c9fbc29Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
948c9fbc29Smrg#
958c9fbc29Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
968c9fbc29Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
978c9fbc29Smrg# configured tree to be moved without reconfiguration.
988c9fbc29Smrg
998c9fbc29SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1008c9fbc29Smrg[dnl Rely on autoconf to set up CDPATH properly.
1018c9fbc29SmrgAC_PREREQ([2.50])dnl
1028c9fbc29Smrg# expand $ac_aux_dir to an absolute path
1038c9fbc29Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1048c9fbc29Smrg])
1058c9fbc29Smrg
1068c9fbc29Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1078c9fbc29Smrg
1088c9fbc29Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
1098c9fbc29Smrg# Free Software Foundation, Inc.
1108c9fbc29Smrg#
1118c9fbc29Smrg# This file is free software; the Free Software Foundation
1128c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
1138c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
1148c9fbc29Smrg
1158c9fbc29Smrg# serial 8
1168c9fbc29Smrg
1178c9fbc29Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1188c9fbc29Smrg# -------------------------------------
1198c9fbc29Smrg# Define a conditional.
1208c9fbc29SmrgAC_DEFUN([AM_CONDITIONAL],
1218c9fbc29Smrg[AC_PREREQ(2.52)dnl
1228c9fbc29Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1238c9fbc29Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1248c9fbc29SmrgAC_SUBST([$1_TRUE])dnl
1258c9fbc29SmrgAC_SUBST([$1_FALSE])dnl
1268c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1278c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1288c9fbc29Smrgif $2; then
1298c9fbc29Smrg  $1_TRUE=
1308c9fbc29Smrg  $1_FALSE='#'
1318c9fbc29Smrgelse
1328c9fbc29Smrg  $1_TRUE='#'
1338c9fbc29Smrg  $1_FALSE=
1348c9fbc29Smrgfi
1358c9fbc29SmrgAC_CONFIG_COMMANDS_PRE(
1368c9fbc29Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1378c9fbc29Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1388c9fbc29SmrgUsually this means the macro was only invoked conditionally.]])
1398c9fbc29Smrgfi])])
1408c9fbc29Smrg
1418c9fbc29Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1428c9fbc29Smrg# Free Software Foundation, Inc.
1438c9fbc29Smrg#
1448c9fbc29Smrg# This file is free software; the Free Software Foundation
1458c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
1468c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
1478c9fbc29Smrg
1488c9fbc29Smrg# serial 9
1498c9fbc29Smrg
1508c9fbc29Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1518c9fbc29Smrg# written in clear, in which case automake, when reading aclocal.m4,
1528c9fbc29Smrg# will think it sees a *use*, and therefore will trigger all it's
1538c9fbc29Smrg# C support machinery.  Also note that it means that autoscan, seeing
1548c9fbc29Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1558c9fbc29Smrg
1568c9fbc29Smrg
1578c9fbc29Smrg# _AM_DEPENDENCIES(NAME)
1588c9fbc29Smrg# ----------------------
1598c9fbc29Smrg# See how the compiler implements dependency checking.
1608c9fbc29Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
1618c9fbc29Smrg# We try a few techniques and use that to set a single cache variable.
1628c9fbc29Smrg#
1638c9fbc29Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1648c9fbc29Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1658c9fbc29Smrg# dependency, and given that the user is not expected to run this macro,
1668c9fbc29Smrg# just rely on AC_PROG_CC.
1678c9fbc29SmrgAC_DEFUN([_AM_DEPENDENCIES],
1688c9fbc29Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1698c9fbc29SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1708c9fbc29SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1718c9fbc29SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1728c9fbc29Smrg
1738c9fbc29Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1748c9fbc29Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1758c9fbc29Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1768c9fbc29Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1778c9fbc29Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1788c9fbc29Smrg                   [depcc="$$1"   am_compiler_list=])
1798c9fbc29Smrg
1808c9fbc29SmrgAC_CACHE_CHECK([dependency style of $depcc],
1818c9fbc29Smrg               [am_cv_$1_dependencies_compiler_type],
1828c9fbc29Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1838c9fbc29Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1848c9fbc29Smrg  # making bogus files that we don't know about and never remove.  For
1858c9fbc29Smrg  # instance it was reported that on HP-UX the gcc test will end up
1868c9fbc29Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
1878c9fbc29Smrg  # in D'.
1888c9fbc29Smrg  mkdir conftest.dir
1898c9fbc29Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1908c9fbc29Smrg  # using a relative directory.
1918c9fbc29Smrg  cp "$am_depcomp" conftest.dir
1928c9fbc29Smrg  cd conftest.dir
1938c9fbc29Smrg  # We will build objects and dependencies in a subdirectory because
1948c9fbc29Smrg  # it helps to detect inapplicable dependency modes.  For instance
1958c9fbc29Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1968c9fbc29Smrg  # side effect of compilation, but ICC will put the dependencies in
1978c9fbc29Smrg  # the current directory while Tru64 will put them in the object
1988c9fbc29Smrg  # directory.
1998c9fbc29Smrg  mkdir sub
2008c9fbc29Smrg
2018c9fbc29Smrg  am_cv_$1_dependencies_compiler_type=none
2028c9fbc29Smrg  if test "$am_compiler_list" = ""; then
2038c9fbc29Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2048c9fbc29Smrg  fi
2058c9fbc29Smrg  for depmode in $am_compiler_list; do
2068c9fbc29Smrg    # Setup a source with many dependencies, because some compilers
2078c9fbc29Smrg    # like to wrap large dependency lists on column 80 (with \), and
2088c9fbc29Smrg    # we should not choose a depcomp mode which is confused by this.
2098c9fbc29Smrg    #
2108c9fbc29Smrg    # We need to recreate these files for each test, as the compiler may
2118c9fbc29Smrg    # overwrite some of them when testing with obscure command lines.
2128c9fbc29Smrg    # This happens at least with the AIX C compiler.
2138c9fbc29Smrg    : > sub/conftest.c
2148c9fbc29Smrg    for i in 1 2 3 4 5 6; do
2158c9fbc29Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2168c9fbc29Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2178c9fbc29Smrg      # Solaris 8's {/usr,}/bin/sh.
2188c9fbc29Smrg      touch sub/conftst$i.h
2198c9fbc29Smrg    done
2208c9fbc29Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2218c9fbc29Smrg
2228c9fbc29Smrg    case $depmode in
2238c9fbc29Smrg    nosideeffect)
2248c9fbc29Smrg      # after this tag, mechanisms are not by side-effect, so they'll
2258c9fbc29Smrg      # only be used when explicitly requested
2268c9fbc29Smrg      if test "x$enable_dependency_tracking" = xyes; then
2278c9fbc29Smrg	continue
2288c9fbc29Smrg      else
2298c9fbc29Smrg	break
2308c9fbc29Smrg      fi
2318c9fbc29Smrg      ;;
2328c9fbc29Smrg    none) break ;;
2338c9fbc29Smrg    esac
2348c9fbc29Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2358c9fbc29Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2368c9fbc29Smrg    # handle `-M -o', and we need to detect this.
2378c9fbc29Smrg    if depmode=$depmode \
2388c9fbc29Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2398c9fbc29Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2408c9fbc29Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2418c9fbc29Smrg         >/dev/null 2>conftest.err &&
2428c9fbc29Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2438c9fbc29Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2448c9fbc29Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2458c9fbc29Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2468c9fbc29Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2478c9fbc29Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2488c9fbc29Smrg      # that says an option was ignored or not supported.
2498c9fbc29Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2508c9fbc29Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2518c9fbc29Smrg      # The diagnosis changed in icc 8.0:
2528c9fbc29Smrg      #   icc: Command line remark: option '-MP' not supported
2538c9fbc29Smrg      if (grep 'ignoring option' conftest.err ||
2548c9fbc29Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2558c9fbc29Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2568c9fbc29Smrg        break
2578c9fbc29Smrg      fi
2588c9fbc29Smrg    fi
2598c9fbc29Smrg  done
2608c9fbc29Smrg
2618c9fbc29Smrg  cd ..
2628c9fbc29Smrg  rm -rf conftest.dir
2638c9fbc29Smrgelse
2648c9fbc29Smrg  am_cv_$1_dependencies_compiler_type=none
2658c9fbc29Smrgfi
2668c9fbc29Smrg])
2678c9fbc29SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2688c9fbc29SmrgAM_CONDITIONAL([am__fastdep$1], [
2698c9fbc29Smrg  test "x$enable_dependency_tracking" != xno \
2708c9fbc29Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2718c9fbc29Smrg])
2728c9fbc29Smrg
2738c9fbc29Smrg
2748c9fbc29Smrg# AM_SET_DEPDIR
2758c9fbc29Smrg# -------------
2768c9fbc29Smrg# Choose a directory name for dependency files.
2778c9fbc29Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
2788c9fbc29SmrgAC_DEFUN([AM_SET_DEPDIR],
2798c9fbc29Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2808c9fbc29SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2818c9fbc29Smrg])
2828c9fbc29Smrg
2838c9fbc29Smrg
2848c9fbc29Smrg# AM_DEP_TRACK
2858c9fbc29Smrg# ------------
2868c9fbc29SmrgAC_DEFUN([AM_DEP_TRACK],
2878c9fbc29Smrg[AC_ARG_ENABLE(dependency-tracking,
2888c9fbc29Smrg[  --disable-dependency-tracking  speeds up one-time build
2898c9fbc29Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
2908c9fbc29Smrgif test "x$enable_dependency_tracking" != xno; then
2918c9fbc29Smrg  am_depcomp="$ac_aux_dir/depcomp"
2928c9fbc29Smrg  AMDEPBACKSLASH='\'
2938c9fbc29Smrgfi
2948c9fbc29SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2958c9fbc29SmrgAC_SUBST([AMDEPBACKSLASH])dnl
2968c9fbc29Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
2978c9fbc29Smrg])
2988c9fbc29Smrg
2998c9fbc29Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3008c9fbc29Smrg
3018c9fbc29Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
3028c9fbc29Smrg# Free Software Foundation, Inc.
3038c9fbc29Smrg#
3048c9fbc29Smrg# This file is free software; the Free Software Foundation
3058c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
3068c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
3078c9fbc29Smrg
3088c9fbc29Smrg#serial 3
3098c9fbc29Smrg
3108c9fbc29Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3118c9fbc29Smrg# ------------------------------
3128c9fbc29SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3138c9fbc29Smrg[for mf in $CONFIG_FILES; do
3148c9fbc29Smrg  # Strip MF so we end up with the name of the file.
3158c9fbc29Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
3168c9fbc29Smrg  # Check whether this is an Automake generated Makefile or not.
3178c9fbc29Smrg  # We used to match only the files named `Makefile.in', but
3188c9fbc29Smrg  # some people rename them; so instead we look at the file content.
3198c9fbc29Smrg  # Grep'ing the first line is not enough: some people post-process
3208c9fbc29Smrg  # each Makefile.in and add a new line on top of each file to say so.
3218c9fbc29Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
3228c9fbc29Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
3238c9fbc29Smrg  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
3248c9fbc29Smrg    dirpart=`AS_DIRNAME("$mf")`
3258c9fbc29Smrg  else
3268c9fbc29Smrg    continue
3278c9fbc29Smrg  fi
3288c9fbc29Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
3298c9fbc29Smrg  # from the Makefile without running `make'.
3308c9fbc29Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3318c9fbc29Smrg  test -z "$DEPDIR" && continue
3328c9fbc29Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
3338c9fbc29Smrg  test -z "am__include" && continue
3348c9fbc29Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3358c9fbc29Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
3368c9fbc29Smrg  U=`sed -n 's/^U = //p' < "$mf"`
3378c9fbc29Smrg  # Find all dependency output files, they are included files with
3388c9fbc29Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
3398c9fbc29Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
3408c9fbc29Smrg  # expansion.
3418c9fbc29Smrg  for file in `sed -n "
3428c9fbc29Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3438c9fbc29Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3448c9fbc29Smrg    # Make sure the directory exists.
3458c9fbc29Smrg    test -f "$dirpart/$file" && continue
3468c9fbc29Smrg    fdir=`AS_DIRNAME(["$file"])`
3478c9fbc29Smrg    AS_MKDIR_P([$dirpart/$fdir])
3488c9fbc29Smrg    # echo "creating $dirpart/$file"
3498c9fbc29Smrg    echo '# dummy' > "$dirpart/$file"
3508c9fbc29Smrg  done
3518c9fbc29Smrgdone
3528c9fbc29Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3538c9fbc29Smrg
3548c9fbc29Smrg
3558c9fbc29Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3568c9fbc29Smrg# -----------------------------
3578c9fbc29Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
3588c9fbc29Smrg#
3598c9fbc29Smrg# This code is only required when automatic dependency tracking
3608c9fbc29Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
3618c9fbc29Smrg# need in order to bootstrap the dependency handling code.
3628c9fbc29SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3638c9fbc29Smrg[AC_CONFIG_COMMANDS([depfiles],
3648c9fbc29Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3658c9fbc29Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3668c9fbc29Smrg])
3678c9fbc29Smrg
3688c9fbc29Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
3698c9fbc29Smrg# Free Software Foundation, Inc.
3708c9fbc29Smrg#
3718c9fbc29Smrg# This file is free software; the Free Software Foundation
3728c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
3738c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
3748c9fbc29Smrg
3758c9fbc29Smrg# serial 8
3768c9fbc29Smrg
3778c9fbc29Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
3788c9fbc29SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
3798c9fbc29Smrg
3808c9fbc29Smrg# Do all the work for Automake.                             -*- Autoconf -*-
3818c9fbc29Smrg
3828c9fbc29Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3838c9fbc29Smrg# 2005, 2006 Free Software Foundation, Inc.
3848c9fbc29Smrg#
3858c9fbc29Smrg# This file is free software; the Free Software Foundation
3868c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
3878c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
3888c9fbc29Smrg
3898c9fbc29Smrg# serial 12
3908c9fbc29Smrg
3918c9fbc29Smrg# This macro actually does too much.  Some checks are only needed if
3928c9fbc29Smrg# your package does certain things.  But this isn't really a big deal.
3938c9fbc29Smrg
3948c9fbc29Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3958c9fbc29Smrg# AM_INIT_AUTOMAKE([OPTIONS])
3968c9fbc29Smrg# -----------------------------------------------
3978c9fbc29Smrg# The call with PACKAGE and VERSION arguments is the old style
3988c9fbc29Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
3998c9fbc29Smrg# and VERSION should now be passed to AC_INIT and removed from
4008c9fbc29Smrg# the call to AM_INIT_AUTOMAKE.
4018c9fbc29Smrg# We support both call styles for the transition.  After
4028c9fbc29Smrg# the next Automake release, Autoconf can make the AC_INIT
4038c9fbc29Smrg# arguments mandatory, and then we can depend on a new Autoconf
4048c9fbc29Smrg# release and drop the old call support.
4058c9fbc29SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4068c9fbc29Smrg[AC_PREREQ([2.60])dnl
4078c9fbc29Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4088c9fbc29Smrgdnl the ones we care about.
4098c9fbc29Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4108c9fbc29SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4118c9fbc29SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4128c9fbc29Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4138c9fbc29Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4148c9fbc29Smrg  # is not polluted with repeated "-I."
4158c9fbc29Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4168c9fbc29Smrg  # test to see if srcdir already configured
4178c9fbc29Smrg  if test -f $srcdir/config.status; then
4188c9fbc29Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4198c9fbc29Smrg  fi
4208c9fbc29Smrgfi
4218c9fbc29Smrg
4228c9fbc29Smrg# test whether we have cygpath
4238c9fbc29Smrgif test -z "$CYGPATH_W"; then
4248c9fbc29Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4258c9fbc29Smrg    CYGPATH_W='cygpath -w'
4268c9fbc29Smrg  else
4278c9fbc29Smrg    CYGPATH_W=echo
4288c9fbc29Smrg  fi
4298c9fbc29Smrgfi
4308c9fbc29SmrgAC_SUBST([CYGPATH_W])
4318c9fbc29Smrg
4328c9fbc29Smrg# Define the identity of the package.
4338c9fbc29Smrgdnl Distinguish between old-style and new-style calls.
4348c9fbc29Smrgm4_ifval([$2],
4358c9fbc29Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4368c9fbc29Smrg AC_SUBST([PACKAGE], [$1])dnl
4378c9fbc29Smrg AC_SUBST([VERSION], [$2])],
4388c9fbc29Smrg[_AM_SET_OPTIONS([$1])dnl
4398c9fbc29Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4408c9fbc29Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
4418c9fbc29Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4428c9fbc29Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4438c9fbc29Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4448c9fbc29Smrg
4458c9fbc29Smrg_AM_IF_OPTION([no-define],,
4468c9fbc29Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4478c9fbc29Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4488c9fbc29Smrg
4498c9fbc29Smrg# Some tools Automake needs.
4508c9fbc29SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4518c9fbc29SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4528c9fbc29SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4538c9fbc29SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
4548c9fbc29SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4558c9fbc29SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
4568c9fbc29SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
4578c9fbc29SmrgAM_PROG_INSTALL_SH
4588c9fbc29SmrgAM_PROG_INSTALL_STRIP
4598c9fbc29SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
4608c9fbc29Smrg# We need awk for the "check" target.  The system "awk" is bad on
4618c9fbc29Smrg# some platforms.
4628c9fbc29SmrgAC_REQUIRE([AC_PROG_AWK])dnl
4638c9fbc29SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
4648c9fbc29SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
4658c9fbc29Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
4668c9fbc29Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
4678c9fbc29Smrg	      		     [_AM_PROG_TAR([v7])])])
4688c9fbc29Smrg_AM_IF_OPTION([no-dependencies],,
4698c9fbc29Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
4708c9fbc29Smrg                  [_AM_DEPENDENCIES(CC)],
4718c9fbc29Smrg                  [define([AC_PROG_CC],
4728c9fbc29Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
4738c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
4748c9fbc29Smrg                  [_AM_DEPENDENCIES(CXX)],
4758c9fbc29Smrg                  [define([AC_PROG_CXX],
4768c9fbc29Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
4778c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
4788c9fbc29Smrg                  [_AM_DEPENDENCIES(OBJC)],
4798c9fbc29Smrg                  [define([AC_PROG_OBJC],
4808c9fbc29Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
4818c9fbc29Smrg])
4828c9fbc29Smrg])
4838c9fbc29Smrg
4848c9fbc29Smrg
4858c9fbc29Smrg# When config.status generates a header, we must update the stamp-h file.
4868c9fbc29Smrg# This file resides in the same directory as the config header
4878c9fbc29Smrg# that is generated.  The stamp files are numbered to have different names.
4888c9fbc29Smrg
4898c9fbc29Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
4908c9fbc29Smrg# loop where config.status creates the headers, so we can generate
4918c9fbc29Smrg# our stamp files there.
4928c9fbc29SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
4938c9fbc29Smrg[# Compute $1's index in $config_headers.
4948c9fbc29Smrg_am_stamp_count=1
4958c9fbc29Smrgfor _am_header in $config_headers :; do
4968c9fbc29Smrg  case $_am_header in
4978c9fbc29Smrg    $1 | $1:* )
4988c9fbc29Smrg      break ;;
4998c9fbc29Smrg    * )
5008c9fbc29Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5018c9fbc29Smrg  esac
5028c9fbc29Smrgdone
5038c9fbc29Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
5048c9fbc29Smrg
5058c9fbc29Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
5068c9fbc29Smrg#
5078c9fbc29Smrg# This file is free software; the Free Software Foundation
5088c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5098c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5108c9fbc29Smrg
5118c9fbc29Smrg# AM_PROG_INSTALL_SH
5128c9fbc29Smrg# ------------------
5138c9fbc29Smrg# Define $install_sh.
5148c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
5158c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5168c9fbc29Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
5178c9fbc29SmrgAC_SUBST(install_sh)])
5188c9fbc29Smrg
5198c9fbc29Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
5208c9fbc29Smrg#
5218c9fbc29Smrg# This file is free software; the Free Software Foundation
5228c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5238c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5248c9fbc29Smrg
5258c9fbc29Smrg# serial 2
5268c9fbc29Smrg
5278c9fbc29Smrg# Check whether the underlying file-system supports filenames
5288c9fbc29Smrg# with a leading dot.  For instance MS-DOS doesn't.
5298c9fbc29SmrgAC_DEFUN([AM_SET_LEADING_DOT],
5308c9fbc29Smrg[rm -rf .tst 2>/dev/null
5318c9fbc29Smrgmkdir .tst 2>/dev/null
5328c9fbc29Smrgif test -d .tst; then
5338c9fbc29Smrg  am__leading_dot=.
5348c9fbc29Smrgelse
5358c9fbc29Smrg  am__leading_dot=_
5368c9fbc29Smrgfi
5378c9fbc29Smrgrmdir .tst 2>/dev/null
5388c9fbc29SmrgAC_SUBST([am__leading_dot])])
5398c9fbc29Smrg
5408c9fbc29Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
5418c9fbc29Smrg# From Jim Meyering
5428c9fbc29Smrg
5438c9fbc29Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
5448c9fbc29Smrg# Free Software Foundation, Inc.
5458c9fbc29Smrg#
5468c9fbc29Smrg# This file is free software; the Free Software Foundation
5478c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5488c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5498c9fbc29Smrg
5508c9fbc29Smrg# serial 4
5518c9fbc29Smrg
5528c9fbc29SmrgAC_DEFUN([AM_MAINTAINER_MODE],
5538c9fbc29Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
5548c9fbc29Smrg  dnl maintainer-mode is disabled by default
5558c9fbc29Smrg  AC_ARG_ENABLE(maintainer-mode,
5568c9fbc29Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
5578c9fbc29Smrg			  (and sometimes confusing) to the casual installer],
5588c9fbc29Smrg      USE_MAINTAINER_MODE=$enableval,
5598c9fbc29Smrg      USE_MAINTAINER_MODE=no)
5608c9fbc29Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
5618c9fbc29Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
5628c9fbc29Smrg  MAINT=$MAINTAINER_MODE_TRUE
5638c9fbc29Smrg  AC_SUBST(MAINT)dnl
5648c9fbc29Smrg]
5658c9fbc29Smrg)
5668c9fbc29Smrg
5678c9fbc29SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
5688c9fbc29Smrg
5698c9fbc29Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
5708c9fbc29Smrg
5718c9fbc29Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
5728c9fbc29Smrg#
5738c9fbc29Smrg# This file is free software; the Free Software Foundation
5748c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5758c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5768c9fbc29Smrg
5778c9fbc29Smrg# serial 3
5788c9fbc29Smrg
5798c9fbc29Smrg# AM_MAKE_INCLUDE()
5808c9fbc29Smrg# -----------------
5818c9fbc29Smrg# Check to see how make treats includes.
5828c9fbc29SmrgAC_DEFUN([AM_MAKE_INCLUDE],
5838c9fbc29Smrg[am_make=${MAKE-make}
5848c9fbc29Smrgcat > confinc << 'END'
5858c9fbc29Smrgam__doit:
5868c9fbc29Smrg	@echo done
5878c9fbc29Smrg.PHONY: am__doit
5888c9fbc29SmrgEND
5898c9fbc29Smrg# If we don't find an include directive, just comment out the code.
5908c9fbc29SmrgAC_MSG_CHECKING([for style of include used by $am_make])
5918c9fbc29Smrgam__include="#"
5928c9fbc29Smrgam__quote=
5938c9fbc29Smrg_am_result=none
5948c9fbc29Smrg# First try GNU make style include.
5958c9fbc29Smrgecho "include confinc" > confmf
5968c9fbc29Smrg# We grep out `Entering directory' and `Leaving directory'
5978c9fbc29Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
5988c9fbc29Smrg# In particular we don't look at `^make:' because GNU make might
5998c9fbc29Smrg# be invoked under some other name (usually "gmake"), in which
6008c9fbc29Smrg# case it prints its new name instead of `make'.
6018c9fbc29Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6028c9fbc29Smrg   am__include=include
6038c9fbc29Smrg   am__quote=
6048c9fbc29Smrg   _am_result=GNU
6058c9fbc29Smrgfi
6068c9fbc29Smrg# Now try BSD make style include.
6078c9fbc29Smrgif test "$am__include" = "#"; then
6088c9fbc29Smrg   echo '.include "confinc"' > confmf
6098c9fbc29Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6108c9fbc29Smrg      am__include=.include
6118c9fbc29Smrg      am__quote="\""
6128c9fbc29Smrg      _am_result=BSD
6138c9fbc29Smrg   fi
6148c9fbc29Smrgfi
6158c9fbc29SmrgAC_SUBST([am__include])
6168c9fbc29SmrgAC_SUBST([am__quote])
6178c9fbc29SmrgAC_MSG_RESULT([$_am_result])
6188c9fbc29Smrgrm -f confinc confmf
6198c9fbc29Smrg])
6208c9fbc29Smrg
6218c9fbc29Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6228c9fbc29Smrg
6238c9fbc29Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
6248c9fbc29Smrg# Free Software Foundation, Inc.
6258c9fbc29Smrg#
6268c9fbc29Smrg# This file is free software; the Free Software Foundation
6278c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
6288c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
6298c9fbc29Smrg
6308c9fbc29Smrg# serial 5
6318c9fbc29Smrg
6328c9fbc29Smrg# AM_MISSING_PROG(NAME, PROGRAM)
6338c9fbc29Smrg# ------------------------------
6348c9fbc29SmrgAC_DEFUN([AM_MISSING_PROG],
6358c9fbc29Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
6368c9fbc29Smrg$1=${$1-"${am_missing_run}$2"}
6378c9fbc29SmrgAC_SUBST($1)])
6388c9fbc29Smrg
6398c9fbc29Smrg
6408c9fbc29Smrg# AM_MISSING_HAS_RUN
6418c9fbc29Smrg# ------------------
6428c9fbc29Smrg# Define MISSING if not defined so far and test if it supports --run.
6438c9fbc29Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
6448c9fbc29SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
6458c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6468c9fbc29SmrgAC_REQUIRE_AUX_FILE([missing])dnl
6478c9fbc29Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6488c9fbc29Smrg# Use eval to expand $SHELL
6498c9fbc29Smrgif eval "$MISSING --run true"; then
6508c9fbc29Smrg  am_missing_run="$MISSING --run "
6518c9fbc29Smrgelse
6528c9fbc29Smrg  am_missing_run=
6538c9fbc29Smrg  AC_MSG_WARN([`missing' script is too old or missing])
6548c9fbc29Smrgfi
6558c9fbc29Smrg])
6568c9fbc29Smrg
6578c9fbc29Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
6588c9fbc29Smrg#
6598c9fbc29Smrg# This file is free software; the Free Software Foundation
6608c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
6618c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
6628c9fbc29Smrg
6638c9fbc29Smrg# AM_PROG_MKDIR_P
6648c9fbc29Smrg# ---------------
6658c9fbc29Smrg# Check for `mkdir -p'.
6668c9fbc29SmrgAC_DEFUN([AM_PROG_MKDIR_P],
6678c9fbc29Smrg[AC_PREREQ([2.60])dnl
6688c9fbc29SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
6698c9fbc29Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
6708c9fbc29Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
6718c9fbc29Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
6728c9fbc29Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
6738c9fbc29Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
6748c9fbc29Smrgdnl adjustment using top_builddir (which is defined more often than
6758c9fbc29Smrgdnl MKDIR_P).
6768c9fbc29SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
6778c9fbc29Smrgcase $mkdir_p in
6788c9fbc29Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
6798c9fbc29Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
6808c9fbc29Smrgesac
6818c9fbc29Smrg])
6828c9fbc29Smrg
6838c9fbc29Smrg# Helper functions for option handling.                     -*- Autoconf -*-
6848c9fbc29Smrg
6858c9fbc29Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
6868c9fbc29Smrg#
6878c9fbc29Smrg# This file is free software; the Free Software Foundation
6888c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
6898c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
6908c9fbc29Smrg
6918c9fbc29Smrg# serial 3
6928c9fbc29Smrg
6938c9fbc29Smrg# _AM_MANGLE_OPTION(NAME)
6948c9fbc29Smrg# -----------------------
6958c9fbc29SmrgAC_DEFUN([_AM_MANGLE_OPTION],
6968c9fbc29Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6978c9fbc29Smrg
6988c9fbc29Smrg# _AM_SET_OPTION(NAME)
6998c9fbc29Smrg# ------------------------------
7008c9fbc29Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7018c9fbc29SmrgAC_DEFUN([_AM_SET_OPTION],
7028c9fbc29Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7038c9fbc29Smrg
7048c9fbc29Smrg# _AM_SET_OPTIONS(OPTIONS)
7058c9fbc29Smrg# ----------------------------------
7068c9fbc29Smrg# OPTIONS is a space-separated list of Automake options.
7078c9fbc29SmrgAC_DEFUN([_AM_SET_OPTIONS],
7088c9fbc29Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7098c9fbc29Smrg
7108c9fbc29Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7118c9fbc29Smrg# -------------------------------------------
7128c9fbc29Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7138c9fbc29SmrgAC_DEFUN([_AM_IF_OPTION],
7148c9fbc29Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7158c9fbc29Smrg
7168c9fbc29Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7178c9fbc29Smrg
7188c9fbc29Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7198c9fbc29Smrg# Free Software Foundation, Inc.
7208c9fbc29Smrg#
7218c9fbc29Smrg# This file is free software; the Free Software Foundation
7228c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
7238c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
7248c9fbc29Smrg
7258c9fbc29Smrg# serial 4
7268c9fbc29Smrg
7278c9fbc29Smrg# AM_SANITY_CHECK
7288c9fbc29Smrg# ---------------
7298c9fbc29SmrgAC_DEFUN([AM_SANITY_CHECK],
7308c9fbc29Smrg[AC_MSG_CHECKING([whether build environment is sane])
7318c9fbc29Smrg# Just in case
7328c9fbc29Smrgsleep 1
7338c9fbc29Smrgecho timestamp > conftest.file
7348c9fbc29Smrg# Do `set' in a subshell so we don't clobber the current shell's
7358c9fbc29Smrg# arguments.  Must try -L first in case configure is actually a
7368c9fbc29Smrg# symlink; some systems play weird games with the mod time of symlinks
7378c9fbc29Smrg# (eg FreeBSD returns the mod time of the symlink's containing
7388c9fbc29Smrg# directory).
7398c9fbc29Smrgif (
7408c9fbc29Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7418c9fbc29Smrg   if test "$[*]" = "X"; then
7428c9fbc29Smrg      # -L didn't work.
7438c9fbc29Smrg      set X `ls -t $srcdir/configure conftest.file`
7448c9fbc29Smrg   fi
7458c9fbc29Smrg   rm -f conftest.file
7468c9fbc29Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
7478c9fbc29Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7488c9fbc29Smrg
7498c9fbc29Smrg      # If neither matched, then we have a broken ls.  This can happen
7508c9fbc29Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
7518c9fbc29Smrg      # broken ls alias from the environment.  This has actually
7528c9fbc29Smrg      # happened.  Such a system could not be considered "sane".
7538c9fbc29Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7548c9fbc29Smrgalias in your environment])
7558c9fbc29Smrg   fi
7568c9fbc29Smrg
7578c9fbc29Smrg   test "$[2]" = conftest.file
7588c9fbc29Smrg   )
7598c9fbc29Smrgthen
7608c9fbc29Smrg   # Ok.
7618c9fbc29Smrg   :
7628c9fbc29Smrgelse
7638c9fbc29Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
7648c9fbc29SmrgCheck your system clock])
7658c9fbc29Smrgfi
7668c9fbc29SmrgAC_MSG_RESULT(yes)])
7678c9fbc29Smrg
7688c9fbc29Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7698c9fbc29Smrg#
7708c9fbc29Smrg# This file is free software; the Free Software Foundation
7718c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
7728c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
7738c9fbc29Smrg
7748c9fbc29Smrg# AM_PROG_INSTALL_STRIP
7758c9fbc29Smrg# ---------------------
7768c9fbc29Smrg# One issue with vendor `install' (even GNU) is that you can't
7778c9fbc29Smrg# specify the program used to strip binaries.  This is especially
7788c9fbc29Smrg# annoying in cross-compiling environments, where the build's strip
7798c9fbc29Smrg# is unlikely to handle the host's binaries.
7808c9fbc29Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
7818c9fbc29Smrg# always use install-sh in `make install-strip', and initialize
7828c9fbc29Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
7838c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
7848c9fbc29Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7858c9fbc29Smrg# Installed binaries are usually stripped using `strip' when the user
7868c9fbc29Smrg# run `make install-strip'.  However `strip' might not be the right
7878c9fbc29Smrg# tool to use in cross-compilation environments, therefore Automake
7888c9fbc29Smrg# will honor the `STRIP' environment variable to overrule this program.
7898c9fbc29Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7908c9fbc29Smrgif test "$cross_compiling" != no; then
7918c9fbc29Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
7928c9fbc29Smrgfi
7938c9fbc29SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7948c9fbc29SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
7958c9fbc29Smrg
7968c9fbc29Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
7978c9fbc29Smrg#
7988c9fbc29Smrg# This file is free software; the Free Software Foundation
7998c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
8008c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
8018c9fbc29Smrg
8028c9fbc29Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
8038c9fbc29Smrg# ---------------------------
8048c9fbc29Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
8058c9fbc29Smrg# This macro is traced by Automake.
8068c9fbc29SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
8078c9fbc29Smrg
8088c9fbc29Smrg# Check how to create a tarball.                            -*- Autoconf -*-
8098c9fbc29Smrg
8108c9fbc29Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
8118c9fbc29Smrg#
8128c9fbc29Smrg# This file is free software; the Free Software Foundation
8138c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
8148c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
8158c9fbc29Smrg
8168c9fbc29Smrg# serial 2
8178c9fbc29Smrg
8188c9fbc29Smrg# _AM_PROG_TAR(FORMAT)
8198c9fbc29Smrg# --------------------
8208c9fbc29Smrg# Check how to create a tarball in format FORMAT.
8218c9fbc29Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
8228c9fbc29Smrg#
8238c9fbc29Smrg# Substitute a variable $(am__tar) that is a command
8248c9fbc29Smrg# writing to stdout a FORMAT-tarball containing the directory
8258c9fbc29Smrg# $tardir.
8268c9fbc29Smrg#     tardir=directory && $(am__tar) > result.tar
8278c9fbc29Smrg#
8288c9fbc29Smrg# Substitute a variable $(am__untar) that extract such
8298c9fbc29Smrg# a tarball read from stdin.
8308c9fbc29Smrg#     $(am__untar) < result.tar
8318c9fbc29SmrgAC_DEFUN([_AM_PROG_TAR],
8328c9fbc29Smrg[# Always define AMTAR for backward compatibility.
8338c9fbc29SmrgAM_MISSING_PROG([AMTAR], [tar])
8348c9fbc29Smrgm4_if([$1], [v7],
8358c9fbc29Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8368c9fbc29Smrg     [m4_case([$1], [ustar],, [pax],,
8378c9fbc29Smrg              [m4_fatal([Unknown tar format])])
8388c9fbc29SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
8398c9fbc29Smrg# Loop over all known methods to create a tar archive until one works.
8408c9fbc29Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8418c9fbc29Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
8428c9fbc29Smrg# Do not fold the above two line into one, because Tru64 sh and
8438c9fbc29Smrg# Solaris sh will not grok spaces in the rhs of `-'.
8448c9fbc29Smrgfor _am_tool in $_am_tools
8458c9fbc29Smrgdo
8468c9fbc29Smrg  case $_am_tool in
8478c9fbc29Smrg  gnutar)
8488c9fbc29Smrg    for _am_tar in tar gnutar gtar;
8498c9fbc29Smrg    do
8508c9fbc29Smrg      AM_RUN_LOG([$_am_tar --version]) && break
8518c9fbc29Smrg    done
8528c9fbc29Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8538c9fbc29Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8548c9fbc29Smrg    am__untar="$_am_tar -xf -"
8558c9fbc29Smrg    ;;
8568c9fbc29Smrg  plaintar)
8578c9fbc29Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
8588c9fbc29Smrg    # ustar tarball either.
8598c9fbc29Smrg    (tar --version) >/dev/null 2>&1 && continue
8608c9fbc29Smrg    am__tar='tar chf - "$$tardir"'
8618c9fbc29Smrg    am__tar_='tar chf - "$tardir"'
8628c9fbc29Smrg    am__untar='tar xf -'
8638c9fbc29Smrg    ;;
8648c9fbc29Smrg  pax)
8658c9fbc29Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
8668c9fbc29Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
8678c9fbc29Smrg    am__untar='pax -r'
8688c9fbc29Smrg    ;;
8698c9fbc29Smrg  cpio)
8708c9fbc29Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8718c9fbc29Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8728c9fbc29Smrg    am__untar='cpio -i -H $1 -d'
8738c9fbc29Smrg    ;;
8748c9fbc29Smrg  none)
8758c9fbc29Smrg    am__tar=false
8768c9fbc29Smrg    am__tar_=false
8778c9fbc29Smrg    am__untar=false
8788c9fbc29Smrg    ;;
8798c9fbc29Smrg  esac
8808c9fbc29Smrg
8818c9fbc29Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
8828c9fbc29Smrg  # and am__untar set.
8838c9fbc29Smrg  test -n "${am_cv_prog_tar_$1}" && break
8848c9fbc29Smrg
8858c9fbc29Smrg  # tar/untar a dummy directory, and stop if the command works
8868c9fbc29Smrg  rm -rf conftest.dir
8878c9fbc29Smrg  mkdir conftest.dir
8888c9fbc29Smrg  echo GrepMe > conftest.dir/file
8898c9fbc29Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8908c9fbc29Smrg  rm -rf conftest.dir
8918c9fbc29Smrg  if test -s conftest.tar; then
8928c9fbc29Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
8938c9fbc29Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8948c9fbc29Smrg  fi
8958c9fbc29Smrgdone
8968c9fbc29Smrgrm -rf conftest.dir
8978c9fbc29Smrg
8988c9fbc29SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8998c9fbc29SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9008c9fbc29SmrgAC_SUBST([am__tar])
9018c9fbc29SmrgAC_SUBST([am__untar])
9028c9fbc29Smrg]) # _AM_PROG_TAR
9038c9fbc29Smrg
9048c9fbc29Smrgdnl Copyright 2005 Red Hat, Inc
9058c9fbc29Smrgdnl
9068c9fbc29Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
9078c9fbc29Smrgdnl documentation for any purpose is hereby granted without fee, provided that
9088c9fbc29Smrgdnl the above copyright notice appear in all copies and that both that
9098c9fbc29Smrgdnl copyright notice and this permission notice appear in supporting
9108c9fbc29Smrgdnl documentation.
9118c9fbc29Smrgdnl
9128c9fbc29Smrgdnl The above copyright notice and this permission notice shall be included
9138c9fbc29Smrgdnl in all copies or substantial portions of the Software.
9148c9fbc29Smrgdnl
9158c9fbc29Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9168c9fbc29Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9178c9fbc29Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9188c9fbc29Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
9198c9fbc29Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
9208c9fbc29Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
9218c9fbc29Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
9228c9fbc29Smrgdnl
9238c9fbc29Smrgdnl Except as contained in this notice, the name of the copyright holders shall
9248c9fbc29Smrgdnl not be used in advertising or otherwise to promote the sale, use or
9258c9fbc29Smrgdnl other dealings in this Software without prior written authorization
9268c9fbc29Smrgdnl from the copyright holders.
9278c9fbc29Smrgdnl
9288c9fbc29Smrg
9298c9fbc29Smrg# XORG_RELEASE_VERSION
9308c9fbc29Smrg# --------------------
9318c9fbc29Smrg# Adds --with/without-release-string and changes the PACKAGE and
9328c9fbc29Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
9338c9fbc29Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
9348c9fbc29Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
9358c9fbc29Smrg 
9368c9fbc29SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
9378c9fbc29Smrg	AC_ARG_WITH(release-version,
9388c9fbc29Smrg			AC_HELP_STRING([--with-release-version=STRING],
9398c9fbc29Smrg				[Use release version string in package name]),
9408c9fbc29Smrg			[RELEASE_VERSION="$withval"],
9418c9fbc29Smrg			[RELEASE_VERSION=""])
9428c9fbc29Smrg	if test "x$RELEASE_VERSION" != "x"; then
9438c9fbc29Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
9448c9fbc29Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
9458c9fbc29Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
9468c9fbc29Smrg	fi
9478c9fbc29Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
9488c9fbc29Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
9498c9fbc29Smrg		[Major version of this package])
9508c9fbc29Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
9518c9fbc29Smrg	if test "x$PVM" = "x"; then
9528c9fbc29Smrg		PVM="0"
9538c9fbc29Smrg	fi
9548c9fbc29Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
9558c9fbc29Smrg		[$PVM],
9568c9fbc29Smrg		[Minor version of this package])
9578c9fbc29Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
9588c9fbc29Smrg	if test "x$PVP" = "x"; then
9598c9fbc29Smrg		PVP="0"
9608c9fbc29Smrg	fi
9618c9fbc29Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
9628c9fbc29Smrg		[$PVP],
9638c9fbc29Smrg		[Patch version of this package])
9648c9fbc29Smrg])
9658c9fbc29Smrg
9668c9fbc29Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
9678c9fbc29Smrg
9688c9fbc29Smrg# serial 48 AC_PROG_LIBTOOL
9698c9fbc29Smrg
9708c9fbc29Smrg
9718c9fbc29Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
9728c9fbc29Smrg# -----------------------------------------------------------
9738c9fbc29Smrg# If this macro is not defined by Autoconf, define it here.
9748c9fbc29Smrgm4_ifdef([AC_PROVIDE_IFELSE],
9758c9fbc29Smrg         [],
9768c9fbc29Smrg         [m4_define([AC_PROVIDE_IFELSE],
9778c9fbc29Smrg	         [m4_ifdef([AC_PROVIDE_$1],
9788c9fbc29Smrg		           [$2], [$3])])])
9798c9fbc29Smrg
9808c9fbc29Smrg
9818c9fbc29Smrg# AC_PROG_LIBTOOL
9828c9fbc29Smrg# ---------------
9838c9fbc29SmrgAC_DEFUN([AC_PROG_LIBTOOL],
9848c9fbc29Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
9858c9fbc29Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
9868c9fbc29Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
9878c9fbc29Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
9888c9fbc29Smrg    [AC_LIBTOOL_CXX],
9898c9fbc29Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
9908c9fbc29Smrg  ])])
9918c9fbc29Smrgdnl And a similar setup for Fortran 77 support
9928c9fbc29Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
9938c9fbc29Smrg    [AC_LIBTOOL_F77],
9948c9fbc29Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
9958c9fbc29Smrg])])
9968c9fbc29Smrg
9978c9fbc29Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
9988c9fbc29Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
9998c9fbc29Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
10008c9fbc29Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
10018c9fbc29Smrg    [AC_LIBTOOL_GCJ],
10028c9fbc29Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
10038c9fbc29Smrg      [AC_LIBTOOL_GCJ],
10048c9fbc29Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
10058c9fbc29Smrg	[AC_LIBTOOL_GCJ],
10068c9fbc29Smrg      [ifdef([AC_PROG_GCJ],
10078c9fbc29Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
10088c9fbc29Smrg       ifdef([A][M_PROG_GCJ],
10098c9fbc29Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
10108c9fbc29Smrg       ifdef([LT_AC_PROG_GCJ],
10118c9fbc29Smrg	     [define([LT_AC_PROG_GCJ],
10128c9fbc29Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
10138c9fbc29Smrg])])# AC_PROG_LIBTOOL
10148c9fbc29Smrg
10158c9fbc29Smrg
10168c9fbc29Smrg# _AC_PROG_LIBTOOL
10178c9fbc29Smrg# ----------------
10188c9fbc29SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
10198c9fbc29Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
10208c9fbc29SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
10218c9fbc29SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
10228c9fbc29SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
10238c9fbc29Smrg
10248c9fbc29Smrg# This can be used to rebuild libtool when needed
10258c9fbc29SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
10268c9fbc29Smrg
10278c9fbc29Smrg# Always use our own libtool.
10288c9fbc29SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
10298c9fbc29SmrgAC_SUBST(LIBTOOL)dnl
10308c9fbc29Smrg
10318c9fbc29Smrg# Prevent multiple expansion
10328c9fbc29Smrgdefine([AC_PROG_LIBTOOL], [])
10338c9fbc29Smrg])# _AC_PROG_LIBTOOL
10348c9fbc29Smrg
10358c9fbc29Smrg
10368c9fbc29Smrg# AC_LIBTOOL_SETUP
10378c9fbc29Smrg# ----------------
10388c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
10398c9fbc29Smrg[AC_PREREQ(2.50)dnl
10408c9fbc29SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
10418c9fbc29SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
10428c9fbc29SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
10438c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
10448c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
10458c9fbc29SmrgAC_REQUIRE([AC_PROG_CC])dnl
10468c9fbc29SmrgAC_REQUIRE([AC_PROG_LD])dnl
10478c9fbc29SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
10488c9fbc29SmrgAC_REQUIRE([AC_PROG_NM])dnl
10498c9fbc29Smrg
10508c9fbc29SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
10518c9fbc29SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10528c9fbc29Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10538c9fbc29SmrgAC_REQUIRE([AC_OBJEXT])dnl
10548c9fbc29SmrgAC_REQUIRE([AC_EXEEXT])dnl
10558c9fbc29Smrgdnl
10568c9fbc29Smrg
10578c9fbc29SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
10588c9fbc29SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10598c9fbc29SmrgAC_LIBTOOL_OBJDIR
10608c9fbc29Smrg
10618c9fbc29SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10628c9fbc29Smrg_LT_AC_PROG_ECHO_BACKSLASH
10638c9fbc29Smrg
10648c9fbc29Smrgcase $host_os in
10658c9fbc29Smrgaix3*)
10668c9fbc29Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
10678c9fbc29Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
10688c9fbc29Smrg  # vanish in a puff of smoke.
10698c9fbc29Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
10708c9fbc29Smrg    COLLECT_NAMES=
10718c9fbc29Smrg    export COLLECT_NAMES
10728c9fbc29Smrg  fi
10738c9fbc29Smrg  ;;
10748c9fbc29Smrgesac
10758c9fbc29Smrg
10768c9fbc29Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
10778c9fbc29Smrg# metacharacters that are still active within double-quoted strings.
10788c9fbc29SmrgXsed='sed -e 1s/^X//'
10798c9fbc29Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
10808c9fbc29Smrg
10818c9fbc29Smrg# Same as above, but do not quote variable references.
10828c9fbc29Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
10838c9fbc29Smrg
10848c9fbc29Smrg# Sed substitution to delay expansion of an escaped shell variable in a
10858c9fbc29Smrg# double_quote_subst'ed string.
10868c9fbc29Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
10878c9fbc29Smrg
10888c9fbc29Smrg# Sed substitution to avoid accidental globbing in evaled expressions
10898c9fbc29Smrgno_glob_subst='s/\*/\\\*/g'
10908c9fbc29Smrg
10918c9fbc29Smrg# Constants:
10928c9fbc29Smrgrm="rm -f"
10938c9fbc29Smrg
10948c9fbc29Smrg# Global variables:
10958c9fbc29Smrgdefault_ofile=libtool
10968c9fbc29Smrgcan_build_shared=yes
10978c9fbc29Smrg
10988c9fbc29Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
10998c9fbc29Smrg# which needs '.lib').
11008c9fbc29Smrglibext=a
11018c9fbc29Smrgltmain="$ac_aux_dir/ltmain.sh"
11028c9fbc29Smrgofile="$default_ofile"
11038c9fbc29Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
11048c9fbc29Smrg
11058c9fbc29SmrgAC_CHECK_TOOL(AR, ar, false)
11068c9fbc29SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
11078c9fbc29SmrgAC_CHECK_TOOL(STRIP, strip, :)
11088c9fbc29Smrg
11098c9fbc29Smrgold_CC="$CC"
11108c9fbc29Smrgold_CFLAGS="$CFLAGS"
11118c9fbc29Smrg
11128c9fbc29Smrg# Set sane defaults for various variables
11138c9fbc29Smrgtest -z "$AR" && AR=ar
11148c9fbc29Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
11158c9fbc29Smrgtest -z "$AS" && AS=as
11168c9fbc29Smrgtest -z "$CC" && CC=cc
11178c9fbc29Smrgtest -z "$LTCC" && LTCC=$CC
11188c9fbc29Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
11198c9fbc29Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
11208c9fbc29Smrgtest -z "$LD" && LD=ld
11218c9fbc29Smrgtest -z "$LN_S" && LN_S="ln -s"
11228c9fbc29Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
11238c9fbc29Smrgtest -z "$NM" && NM=nm
11248c9fbc29Smrgtest -z "$SED" && SED=sed
11258c9fbc29Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
11268c9fbc29Smrgtest -z "$RANLIB" && RANLIB=:
11278c9fbc29Smrgtest -z "$STRIP" && STRIP=:
11288c9fbc29Smrgtest -z "$ac_objext" && ac_objext=o
11298c9fbc29Smrg
11308c9fbc29Smrg# Determine commands to create old-style static archives.
11318c9fbc29Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
11328c9fbc29Smrgold_postinstall_cmds='chmod 644 $oldlib'
11338c9fbc29Smrgold_postuninstall_cmds=
11348c9fbc29Smrg
11358c9fbc29Smrgif test -n "$RANLIB"; then
11368c9fbc29Smrg  case $host_os in
11378c9fbc29Smrg  openbsd*)
11388c9fbc29Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
11398c9fbc29Smrg    ;;
11408c9fbc29Smrg  *)
11418c9fbc29Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
11428c9fbc29Smrg    ;;
11438c9fbc29Smrg  esac
11448c9fbc29Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
11458c9fbc29Smrgfi
11468c9fbc29Smrg
11478c9fbc29Smrg_LT_CC_BASENAME([$compiler])
11488c9fbc29Smrg
11498c9fbc29Smrg# Only perform the check for file, if the check method requires it
11508c9fbc29Smrgcase $deplibs_check_method in
11518c9fbc29Smrgfile_magic*)
11528c9fbc29Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
11538c9fbc29Smrg    AC_PATH_MAGIC
11548c9fbc29Smrg  fi
11558c9fbc29Smrg  ;;
11568c9fbc29Smrgesac
11578c9fbc29Smrg
11588c9fbc29SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
11598c9fbc29SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
11608c9fbc29Smrgenable_win32_dll=yes, enable_win32_dll=no)
11618c9fbc29Smrg
11628c9fbc29SmrgAC_ARG_ENABLE([libtool-lock],
11638c9fbc29Smrg    [AC_HELP_STRING([--disable-libtool-lock],
11648c9fbc29Smrg	[avoid locking (might break parallel builds)])])
11658c9fbc29Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
11668c9fbc29Smrg
11678c9fbc29SmrgAC_ARG_WITH([pic],
11688c9fbc29Smrg    [AC_HELP_STRING([--with-pic],
11698c9fbc29Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
11708c9fbc29Smrg    [pic_mode="$withval"],
11718c9fbc29Smrg    [pic_mode=default])
11728c9fbc29Smrgtest -z "$pic_mode" && pic_mode=default
11738c9fbc29Smrg
11748c9fbc29Smrg# Use C for the default configuration in the libtool script
11758c9fbc29Smrgtagname=
11768c9fbc29SmrgAC_LIBTOOL_LANG_C_CONFIG
11778c9fbc29Smrg_LT_AC_TAGCONFIG
11788c9fbc29Smrg])# AC_LIBTOOL_SETUP
11798c9fbc29Smrg
11808c9fbc29Smrg
11818c9fbc29Smrg# _LT_AC_SYS_COMPILER
11828c9fbc29Smrg# -------------------
11838c9fbc29SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
11848c9fbc29Smrg[AC_REQUIRE([AC_PROG_CC])dnl
11858c9fbc29Smrg
11868c9fbc29Smrg# If no C compiler was specified, use CC.
11878c9fbc29SmrgLTCC=${LTCC-"$CC"}
11888c9fbc29Smrg
11898c9fbc29Smrg# If no C compiler flags were specified, use CFLAGS.
11908c9fbc29SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11918c9fbc29Smrg
11928c9fbc29Smrg# Allow CC to be a program name with arguments.
11938c9fbc29Smrgcompiler=$CC
11948c9fbc29Smrg])# _LT_AC_SYS_COMPILER
11958c9fbc29Smrg
11968c9fbc29Smrg
11978c9fbc29Smrg# _LT_CC_BASENAME(CC)
11988c9fbc29Smrg# -------------------
11998c9fbc29Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
12008c9fbc29SmrgAC_DEFUN([_LT_CC_BASENAME],
12018c9fbc29Smrg[for cc_temp in $1""; do
12028c9fbc29Smrg  case $cc_temp in
12038c9fbc29Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
12048c9fbc29Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
12058c9fbc29Smrg    \-*) ;;
12068c9fbc29Smrg    *) break;;
12078c9fbc29Smrg  esac
12088c9fbc29Smrgdone
12098c9fbc29Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
12108c9fbc29Smrg])
12118c9fbc29Smrg
12128c9fbc29Smrg
12138c9fbc29Smrg# _LT_COMPILER_BOILERPLATE
12148c9fbc29Smrg# ------------------------
12158c9fbc29Smrg# Check for compiler boilerplate output or warnings with
12168c9fbc29Smrg# the simple compiler test code.
12178c9fbc29SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
12188c9fbc29Smrg[ac_outfile=conftest.$ac_objext
12198c9fbc29Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
12208c9fbc29Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12218c9fbc29Smrg_lt_compiler_boilerplate=`cat conftest.err`
12228c9fbc29Smrg$rm conftest*
12238c9fbc29Smrg])# _LT_COMPILER_BOILERPLATE
12248c9fbc29Smrg
12258c9fbc29Smrg
12268c9fbc29Smrg# _LT_LINKER_BOILERPLATE
12278c9fbc29Smrg# ----------------------
12288c9fbc29Smrg# Check for linker boilerplate output or warnings with
12298c9fbc29Smrg# the simple link test code.
12308c9fbc29SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
12318c9fbc29Smrg[ac_outfile=conftest.$ac_objext
12328c9fbc29Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
12338c9fbc29Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12348c9fbc29Smrg_lt_linker_boilerplate=`cat conftest.err`
12358c9fbc29Smrg$rm conftest*
12368c9fbc29Smrg])# _LT_LINKER_BOILERPLATE
12378c9fbc29Smrg
12388c9fbc29Smrg
12398c9fbc29Smrg# _LT_AC_SYS_LIBPATH_AIX
12408c9fbc29Smrg# ----------------------
12418c9fbc29Smrg# Links a minimal program and checks the executable
12428c9fbc29Smrg# for the system default hardcoded library path. In most cases,
12438c9fbc29Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
12448c9fbc29Smrg# the location of the communication and MPI libs are included too.
12458c9fbc29Smrg# If we don't find anything, use the default library path according
12468c9fbc29Smrg# to the aix ld manual.
12478c9fbc29SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
12488c9fbc29Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
12498c9fbc29Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
12508c9fbc29Smrg}'`
12518c9fbc29Smrg# Check for a 64-bit object if we didn't find anything.
12528c9fbc29Smrgif 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; }
12538c9fbc29Smrg}'`; fi],[])
12548c9fbc29Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
12558c9fbc29Smrg])# _LT_AC_SYS_LIBPATH_AIX
12568c9fbc29Smrg
12578c9fbc29Smrg
12588c9fbc29Smrg# _LT_AC_SHELL_INIT(ARG)
12598c9fbc29Smrg# ----------------------
12608c9fbc29SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
12618c9fbc29Smrg[ifdef([AC_DIVERSION_NOTICE],
12628c9fbc29Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
12638c9fbc29Smrg	 [AC_DIVERT_PUSH(NOTICE)])
12648c9fbc29Smrg$1
12658c9fbc29SmrgAC_DIVERT_POP
12668c9fbc29Smrg])# _LT_AC_SHELL_INIT
12678c9fbc29Smrg
12688c9fbc29Smrg
12698c9fbc29Smrg# _LT_AC_PROG_ECHO_BACKSLASH
12708c9fbc29Smrg# --------------------------
12718c9fbc29Smrg# Add some code to the start of the generated configure script which
12728c9fbc29Smrg# will find an echo command which doesn't interpret backslashes.
12738c9fbc29SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
12748c9fbc29Smrg[_LT_AC_SHELL_INIT([
12758c9fbc29Smrg# Check that we are running under the correct shell.
12768c9fbc29SmrgSHELL=${CONFIG_SHELL-/bin/sh}
12778c9fbc29Smrg
12788c9fbc29Smrgcase X$ECHO in
12798c9fbc29SmrgX*--fallback-echo)
12808c9fbc29Smrg  # Remove one level of quotation (which was required for Make).
12818c9fbc29Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
12828c9fbc29Smrg  ;;
12838c9fbc29Smrgesac
12848c9fbc29Smrg
12858c9fbc29Smrgecho=${ECHO-echo}
12868c9fbc29Smrgif test "X[$]1" = X--no-reexec; then
12878c9fbc29Smrg  # Discard the --no-reexec flag, and continue.
12888c9fbc29Smrg  shift
12898c9fbc29Smrgelif test "X[$]1" = X--fallback-echo; then
12908c9fbc29Smrg  # Avoid inline document here, it may be left over
12918c9fbc29Smrg  :
12928c9fbc29Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
12938c9fbc29Smrg  # Yippee, $echo works!
12948c9fbc29Smrg  :
12958c9fbc29Smrgelse
12968c9fbc29Smrg  # Restart under the correct shell.
12978c9fbc29Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
12988c9fbc29Smrgfi
12998c9fbc29Smrg
13008c9fbc29Smrgif test "X[$]1" = X--fallback-echo; then
13018c9fbc29Smrg  # used as fallback echo
13028c9fbc29Smrg  shift
13038c9fbc29Smrg  cat <<EOF
13048c9fbc29Smrg[$]*
13058c9fbc29SmrgEOF
13068c9fbc29Smrg  exit 0
13078c9fbc29Smrgfi
13088c9fbc29Smrg
13098c9fbc29Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
13108c9fbc29Smrg# if CDPATH is set.
13118c9fbc29Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13128c9fbc29Smrg
13138c9fbc29Smrgif test -z "$ECHO"; then
13148c9fbc29Smrgif test "X${echo_test_string+set}" != Xset; then
13158c9fbc29Smrg# find a string as large as possible, as long as the shell can cope with it
13168c9fbc29Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
13178c9fbc29Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
13188c9fbc29Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
13198c9fbc29Smrg       echo_test_string=`eval $cmd` &&
13208c9fbc29Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
13218c9fbc29Smrg    then
13228c9fbc29Smrg      break
13238c9fbc29Smrg    fi
13248c9fbc29Smrg  done
13258c9fbc29Smrgfi
13268c9fbc29Smrg
13278c9fbc29Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
13288c9fbc29Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
13298c9fbc29Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
13308c9fbc29Smrg  :
13318c9fbc29Smrgelse
13328c9fbc29Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
13338c9fbc29Smrg  # backslashes.  This makes it impossible to quote backslashes using
13348c9fbc29Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
13358c9fbc29Smrg  #
13368c9fbc29Smrg  # So, first we look for a working echo in the user's PATH.
13378c9fbc29Smrg
13388c9fbc29Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13398c9fbc29Smrg  for dir in $PATH /usr/ucb; do
13408c9fbc29Smrg    IFS="$lt_save_ifs"
13418c9fbc29Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
13428c9fbc29Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
13438c9fbc29Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
13448c9fbc29Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
13458c9fbc29Smrg      echo="$dir/echo"
13468c9fbc29Smrg      break
13478c9fbc29Smrg    fi
13488c9fbc29Smrg  done
13498c9fbc29Smrg  IFS="$lt_save_ifs"
13508c9fbc29Smrg
13518c9fbc29Smrg  if test "X$echo" = Xecho; then
13528c9fbc29Smrg    # We didn't find a better echo, so look for alternatives.
13538c9fbc29Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
13548c9fbc29Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
13558c9fbc29Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
13568c9fbc29Smrg      # This shell has a builtin print -r that does the trick.
13578c9fbc29Smrg      echo='print -r'
13588c9fbc29Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
13598c9fbc29Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
13608c9fbc29Smrg      # If we have ksh, try running configure again with it.
13618c9fbc29Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
13628c9fbc29Smrg      export ORIGINAL_CONFIG_SHELL
13638c9fbc29Smrg      CONFIG_SHELL=/bin/ksh
13648c9fbc29Smrg      export CONFIG_SHELL
13658c9fbc29Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
13668c9fbc29Smrg    else
13678c9fbc29Smrg      # Try using printf.
13688c9fbc29Smrg      echo='printf %s\n'
13698c9fbc29Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
13708c9fbc29Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
13718c9fbc29Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
13728c9fbc29Smrg	# Cool, printf works
13738c9fbc29Smrg	:
13748c9fbc29Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
13758c9fbc29Smrg	   test "X$echo_testing_string" = 'X\t' &&
13768c9fbc29Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
13778c9fbc29Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
13788c9fbc29Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
13798c9fbc29Smrg	export CONFIG_SHELL
13808c9fbc29Smrg	SHELL="$CONFIG_SHELL"
13818c9fbc29Smrg	export SHELL
13828c9fbc29Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
13838c9fbc29Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
13848c9fbc29Smrg	   test "X$echo_testing_string" = 'X\t' &&
13858c9fbc29Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
13868c9fbc29Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
13878c9fbc29Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
13888c9fbc29Smrg      else
13898c9fbc29Smrg	# maybe with a smaller string...
13908c9fbc29Smrg	prev=:
13918c9fbc29Smrg
13928c9fbc29Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
13938c9fbc29Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
13948c9fbc29Smrg	  then
13958c9fbc29Smrg	    break
13968c9fbc29Smrg	  fi
13978c9fbc29Smrg	  prev="$cmd"
13988c9fbc29Smrg	done
13998c9fbc29Smrg
14008c9fbc29Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
14018c9fbc29Smrg	  echo_test_string=`eval $prev`
14028c9fbc29Smrg	  export echo_test_string
14038c9fbc29Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
14048c9fbc29Smrg	else
14058c9fbc29Smrg	  # Oops.  We lost completely, so just stick with echo.
14068c9fbc29Smrg	  echo=echo
14078c9fbc29Smrg	fi
14088c9fbc29Smrg      fi
14098c9fbc29Smrg    fi
14108c9fbc29Smrg  fi
14118c9fbc29Smrgfi
14128c9fbc29Smrgfi
14138c9fbc29Smrg
14148c9fbc29Smrg# Copy echo and quote the copy suitably for passing to libtool from
14158c9fbc29Smrg# the Makefile, instead of quoting the original, which is used later.
14168c9fbc29SmrgECHO=$echo
14178c9fbc29Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
14188c9fbc29Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
14198c9fbc29Smrgfi
14208c9fbc29Smrg
14218c9fbc29SmrgAC_SUBST(ECHO)
14228c9fbc29Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
14238c9fbc29Smrg
14248c9fbc29Smrg
14258c9fbc29Smrg# _LT_AC_LOCK
14268c9fbc29Smrg# -----------
14278c9fbc29SmrgAC_DEFUN([_LT_AC_LOCK],
14288c9fbc29Smrg[AC_ARG_ENABLE([libtool-lock],
14298c9fbc29Smrg    [AC_HELP_STRING([--disable-libtool-lock],
14308c9fbc29Smrg	[avoid locking (might break parallel builds)])])
14318c9fbc29Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
14328c9fbc29Smrg
14338c9fbc29Smrg# Some flags need to be propagated to the compiler or linker for good
14348c9fbc29Smrg# libtool support.
14358c9fbc29Smrgcase $host in
14368c9fbc29Smrgia64-*-hpux*)
14378c9fbc29Smrg  # Find out which ABI we are using.
14388c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
14398c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
14408c9fbc29Smrg    case `/usr/bin/file conftest.$ac_objext` in
14418c9fbc29Smrg    *ELF-32*)
14428c9fbc29Smrg      HPUX_IA64_MODE="32"
14438c9fbc29Smrg      ;;
14448c9fbc29Smrg    *ELF-64*)
14458c9fbc29Smrg      HPUX_IA64_MODE="64"
14468c9fbc29Smrg      ;;
14478c9fbc29Smrg    esac
14488c9fbc29Smrg  fi
14498c9fbc29Smrg  rm -rf conftest*
14508c9fbc29Smrg  ;;
14518c9fbc29Smrg*-*-irix6*)
14528c9fbc29Smrg  # Find out which ABI we are using.
14538c9fbc29Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
14548c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
14558c9fbc29Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
14568c9fbc29Smrg    case `/usr/bin/file conftest.$ac_objext` in
14578c9fbc29Smrg    *32-bit*)
14588c9fbc29Smrg      LD="${LD-ld} -melf32bsmip"
14598c9fbc29Smrg      ;;
14608c9fbc29Smrg    *N32*)
14618c9fbc29Smrg      LD="${LD-ld} -melf32bmipn32"
14628c9fbc29Smrg      ;;
14638c9fbc29Smrg    *64-bit*)
14648c9fbc29Smrg      LD="${LD-ld} -melf64bmip"
14658c9fbc29Smrg      ;;
14668c9fbc29Smrg    esac
14678c9fbc29Smrg   else
14688c9fbc29Smrg    case `/usr/bin/file conftest.$ac_objext` in
14698c9fbc29Smrg    *32-bit*)
14708c9fbc29Smrg      LD="${LD-ld} -32"
14718c9fbc29Smrg      ;;
14728c9fbc29Smrg    *N32*)
14738c9fbc29Smrg      LD="${LD-ld} -n32"
14748c9fbc29Smrg      ;;
14758c9fbc29Smrg    *64-bit*)
14768c9fbc29Smrg      LD="${LD-ld} -64"
14778c9fbc29Smrg      ;;
14788c9fbc29Smrg    esac
14798c9fbc29Smrg   fi
14808c9fbc29Smrg  fi
14818c9fbc29Smrg  rm -rf conftest*
14828c9fbc29Smrg  ;;
14838c9fbc29Smrg
14848c9fbc29Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
14858c9fbc29Smrg  # Find out which ABI we are using.
14868c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
14878c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
14888c9fbc29Smrg    case `/usr/bin/file conftest.o` in
14898c9fbc29Smrg    *32-bit*)
14908c9fbc29Smrg      case $host in
14918c9fbc29Smrg        x86_64-*linux*)
14928c9fbc29Smrg          LD="${LD-ld} -m elf_i386"
14938c9fbc29Smrg          ;;
14948c9fbc29Smrg        ppc64-*linux*|powerpc64-*linux*)
14958c9fbc29Smrg          LD="${LD-ld} -m elf32ppclinux"
14968c9fbc29Smrg          ;;
14978c9fbc29Smrg        s390x-*linux*)
14988c9fbc29Smrg          LD="${LD-ld} -m elf_s390"
14998c9fbc29Smrg          ;;
15008c9fbc29Smrg        sparc64-*linux*)
15018c9fbc29Smrg          LD="${LD-ld} -m elf32_sparc"
15028c9fbc29Smrg          ;;
15038c9fbc29Smrg      esac
15048c9fbc29Smrg      ;;
15058c9fbc29Smrg    *64-bit*)
15068c9fbc29Smrg      case $host in
15078c9fbc29Smrg        x86_64-*linux*)
15088c9fbc29Smrg          LD="${LD-ld} -m elf_x86_64"
15098c9fbc29Smrg          ;;
15108c9fbc29Smrg        ppc*-*linux*|powerpc*-*linux*)
15118c9fbc29Smrg          LD="${LD-ld} -m elf64ppc"
15128c9fbc29Smrg          ;;
15138c9fbc29Smrg        s390*-*linux*)
15148c9fbc29Smrg          LD="${LD-ld} -m elf64_s390"
15158c9fbc29Smrg          ;;
15168c9fbc29Smrg        sparc*-*linux*)
15178c9fbc29Smrg          LD="${LD-ld} -m elf64_sparc"
15188c9fbc29Smrg          ;;
15198c9fbc29Smrg      esac
15208c9fbc29Smrg      ;;
15218c9fbc29Smrg    esac
15228c9fbc29Smrg  fi
15238c9fbc29Smrg  rm -rf conftest*
15248c9fbc29Smrg  ;;
15258c9fbc29Smrg
15268c9fbc29Smrg*-*-sco3.2v5*)
15278c9fbc29Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
15288c9fbc29Smrg  SAVE_CFLAGS="$CFLAGS"
15298c9fbc29Smrg  CFLAGS="$CFLAGS -belf"
15308c9fbc29Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
15318c9fbc29Smrg    [AC_LANG_PUSH(C)
15328c9fbc29Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
15338c9fbc29Smrg     AC_LANG_POP])
15348c9fbc29Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
15358c9fbc29Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
15368c9fbc29Smrg    CFLAGS="$SAVE_CFLAGS"
15378c9fbc29Smrg  fi
15388c9fbc29Smrg  ;;
15398c9fbc29Smrgsparc*-*solaris*)
15408c9fbc29Smrg  # Find out which ABI we are using.
15418c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
15428c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
15438c9fbc29Smrg    case `/usr/bin/file conftest.o` in
15448c9fbc29Smrg    *64-bit*)
15458c9fbc29Smrg      case $lt_cv_prog_gnu_ld in
15468c9fbc29Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
15478c9fbc29Smrg      *)    LD="${LD-ld} -64" ;;
15488c9fbc29Smrg      esac
15498c9fbc29Smrg      ;;
15508c9fbc29Smrg    esac
15518c9fbc29Smrg  fi
15528c9fbc29Smrg  rm -rf conftest*
15538c9fbc29Smrg  ;;
15548c9fbc29Smrg
15558c9fbc29SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
15568c9fbc29Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
15578c9fbc29Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
15588c9fbc29Smrg  AC_CHECK_TOOL(AS, as, false)
15598c9fbc29Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
15608c9fbc29Smrg  ;;
15618c9fbc29Smrg  ])
15628c9fbc29Smrgesac
15638c9fbc29Smrg
15648c9fbc29Smrgneed_locks="$enable_libtool_lock"
15658c9fbc29Smrg
15668c9fbc29Smrg])# _LT_AC_LOCK
15678c9fbc29Smrg
15688c9fbc29Smrg
15698c9fbc29Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15708c9fbc29Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15718c9fbc29Smrg# ----------------------------------------------------------------
15728c9fbc29Smrg# Check whether the given compiler option works
15738c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
15748c9fbc29Smrg[AC_REQUIRE([LT_AC_PROG_SED])
15758c9fbc29SmrgAC_CACHE_CHECK([$1], [$2],
15768c9fbc29Smrg  [$2=no
15778c9fbc29Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15788c9fbc29Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
15798c9fbc29Smrg   lt_compiler_flag="$3"
15808c9fbc29Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15818c9fbc29Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15828c9fbc29Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15838c9fbc29Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15848c9fbc29Smrg   # The option is referenced via a variable to avoid confusing sed.
15858c9fbc29Smrg   lt_compile=`echo "$ac_compile" | $SED \
15868c9fbc29Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15878c9fbc29Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
15888c9fbc29Smrg   -e 's:$: $lt_compiler_flag:'`
15898c9fbc29Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
15908c9fbc29Smrg   (eval "$lt_compile" 2>conftest.err)
15918c9fbc29Smrg   ac_status=$?
15928c9fbc29Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
15938c9fbc29Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
15948c9fbc29Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
15958c9fbc29Smrg     # The compiler can only warn and ignore the option if not recognized
15968c9fbc29Smrg     # So say no if there are warnings other than the usual output.
15978c9fbc29Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
15988c9fbc29Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15998c9fbc29Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16008c9fbc29Smrg       $2=yes
16018c9fbc29Smrg     fi
16028c9fbc29Smrg   fi
16038c9fbc29Smrg   $rm conftest*
16048c9fbc29Smrg])
16058c9fbc29Smrg
16068c9fbc29Smrgif test x"[$]$2" = xyes; then
16078c9fbc29Smrg    ifelse([$5], , :, [$5])
16088c9fbc29Smrgelse
16098c9fbc29Smrg    ifelse([$6], , :, [$6])
16108c9fbc29Smrgfi
16118c9fbc29Smrg])# AC_LIBTOOL_COMPILER_OPTION
16128c9fbc29Smrg
16138c9fbc29Smrg
16148c9fbc29Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16158c9fbc29Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
16168c9fbc29Smrg# ------------------------------------------------------------
16178c9fbc29Smrg# Check whether the given compiler option works
16188c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
16198c9fbc29Smrg[AC_CACHE_CHECK([$1], [$2],
16208c9fbc29Smrg  [$2=no
16218c9fbc29Smrg   save_LDFLAGS="$LDFLAGS"
16228c9fbc29Smrg   LDFLAGS="$LDFLAGS $3"
16238c9fbc29Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
16248c9fbc29Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16258c9fbc29Smrg     # The linker can only warn and ignore the option if not recognized
16268c9fbc29Smrg     # So say no if there are warnings
16278c9fbc29Smrg     if test -s conftest.err; then
16288c9fbc29Smrg       # Append any errors to the config.log.
16298c9fbc29Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16308c9fbc29Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16318c9fbc29Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16328c9fbc29Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
16338c9fbc29Smrg         $2=yes
16348c9fbc29Smrg       fi
16358c9fbc29Smrg     else
16368c9fbc29Smrg       $2=yes
16378c9fbc29Smrg     fi
16388c9fbc29Smrg   fi
16398c9fbc29Smrg   $rm conftest*
16408c9fbc29Smrg   LDFLAGS="$save_LDFLAGS"
16418c9fbc29Smrg])
16428c9fbc29Smrg
16438c9fbc29Smrgif test x"[$]$2" = xyes; then
16448c9fbc29Smrg    ifelse([$4], , :, [$4])
16458c9fbc29Smrgelse
16468c9fbc29Smrg    ifelse([$5], , :, [$5])
16478c9fbc29Smrgfi
16488c9fbc29Smrg])# AC_LIBTOOL_LINKER_OPTION
16498c9fbc29Smrg
16508c9fbc29Smrg
16518c9fbc29Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
16528c9fbc29Smrg# --------------------------
16538c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
16548c9fbc29Smrg[# find the maximum length of command line arguments
16558c9fbc29SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16568c9fbc29SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16578c9fbc29Smrg  i=0
16588c9fbc29Smrg  teststring="ABCD"
16598c9fbc29Smrg
16608c9fbc29Smrg  case $build_os in
16618c9fbc29Smrg  msdosdjgpp*)
16628c9fbc29Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16638c9fbc29Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16648c9fbc29Smrg    # during glob expansion).  Even if it were fixed, the result of this
16658c9fbc29Smrg    # check would be larger than it should be.
16668c9fbc29Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16678c9fbc29Smrg    ;;
16688c9fbc29Smrg
16698c9fbc29Smrg  gnu*)
16708c9fbc29Smrg    # Under GNU Hurd, this test is not required because there is
16718c9fbc29Smrg    # no limit to the length of command line arguments.
16728c9fbc29Smrg    # Libtool will interpret -1 as no limit whatsoever
16738c9fbc29Smrg    lt_cv_sys_max_cmd_len=-1;
16748c9fbc29Smrg    ;;
16758c9fbc29Smrg
16768c9fbc29Smrg  cygwin* | mingw*)
16778c9fbc29Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
16788c9fbc29Smrg    # about 5 minutes as the teststring grows exponentially.
16798c9fbc29Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
16808c9fbc29Smrg    # you end up with a "frozen" computer, even though with patience
16818c9fbc29Smrg    # the test eventually succeeds (with a max line length of 256k).
16828c9fbc29Smrg    # Instead, let's just punt: use the minimum linelength reported by
16838c9fbc29Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
16848c9fbc29Smrg    lt_cv_sys_max_cmd_len=8192;
16858c9fbc29Smrg    ;;
16868c9fbc29Smrg
16878c9fbc29Smrg  amigaos*)
16888c9fbc29Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
16898c9fbc29Smrg    # So we just punt and use a minimum line length of 8192.
16908c9fbc29Smrg    lt_cv_sys_max_cmd_len=8192;
16918c9fbc29Smrg    ;;
16928c9fbc29Smrg
16938c9fbc29Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16948c9fbc29Smrg    # This has been around since 386BSD, at least.  Likely further.
16958c9fbc29Smrg    if test -x /sbin/sysctl; then
16968c9fbc29Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16978c9fbc29Smrg    elif test -x /usr/sbin/sysctl; then
16988c9fbc29Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16998c9fbc29Smrg    else
17008c9fbc29Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17018c9fbc29Smrg    fi
17028c9fbc29Smrg    # And add a safety zone
17038c9fbc29Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17048c9fbc29Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17058c9fbc29Smrg    ;;
17068c9fbc29Smrg
17078c9fbc29Smrg  interix*)
17088c9fbc29Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17098c9fbc29Smrg    lt_cv_sys_max_cmd_len=196608
17108c9fbc29Smrg    ;;
17118c9fbc29Smrg
17128c9fbc29Smrg  osf*)
17138c9fbc29Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17148c9fbc29Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17158c9fbc29Smrg    # nice to cause kernel panics so lets avoid the loop below.
17168c9fbc29Smrg    # First set a reasonable default.
17178c9fbc29Smrg    lt_cv_sys_max_cmd_len=16384
17188c9fbc29Smrg    #
17198c9fbc29Smrg    if test -x /sbin/sysconfig; then
17208c9fbc29Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17218c9fbc29Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17228c9fbc29Smrg      esac
17238c9fbc29Smrg    fi
17248c9fbc29Smrg    ;;
17258c9fbc29Smrg  sco3.2v5*)
17268c9fbc29Smrg    lt_cv_sys_max_cmd_len=102400
17278c9fbc29Smrg    ;;
17288c9fbc29Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
17298c9fbc29Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17308c9fbc29Smrg    if test -n "$kargmax"; then
17318c9fbc29Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
17328c9fbc29Smrg    else
17338c9fbc29Smrg      lt_cv_sys_max_cmd_len=32768
17348c9fbc29Smrg    fi
17358c9fbc29Smrg    ;;
17368c9fbc29Smrg  *)
17378c9fbc29Smrg    # If test is not a shell built-in, we'll probably end up computing a
17388c9fbc29Smrg    # maximum length that is only half of the actual maximum length, but
17398c9fbc29Smrg    # we can't tell.
17408c9fbc29Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17418c9fbc29Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
17428c9fbc29Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
17438c9fbc29Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
17448c9fbc29Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
17458c9fbc29Smrg	    test $i != 17 # 1/2 MB should be enough
17468c9fbc29Smrg    do
17478c9fbc29Smrg      i=`expr $i + 1`
17488c9fbc29Smrg      teststring=$teststring$teststring
17498c9fbc29Smrg    done
17508c9fbc29Smrg    teststring=
17518c9fbc29Smrg    # Add a significant safety factor because C++ compilers can tack on massive
17528c9fbc29Smrg    # amounts of additional arguments before passing them to the linker.
17538c9fbc29Smrg    # It appears as though 1/2 is a usable value.
17548c9fbc29Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
17558c9fbc29Smrg    ;;
17568c9fbc29Smrg  esac
17578c9fbc29Smrg])
17588c9fbc29Smrgif test -n $lt_cv_sys_max_cmd_len ; then
17598c9fbc29Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
17608c9fbc29Smrgelse
17618c9fbc29Smrg  AC_MSG_RESULT(none)
17628c9fbc29Smrgfi
17638c9fbc29Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
17648c9fbc29Smrg
17658c9fbc29Smrg
17668c9fbc29Smrg# _LT_AC_CHECK_DLFCN
17678c9fbc29Smrg# ------------------
17688c9fbc29SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
17698c9fbc29Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
17708c9fbc29Smrg])# _LT_AC_CHECK_DLFCN
17718c9fbc29Smrg
17728c9fbc29Smrg
17738c9fbc29Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
17748c9fbc29Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
17758c9fbc29Smrg# ---------------------------------------------------------------------
17768c9fbc29SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
17778c9fbc29Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
17788c9fbc29Smrgif test "$cross_compiling" = yes; then :
17798c9fbc29Smrg  [$4]
17808c9fbc29Smrgelse
17818c9fbc29Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17828c9fbc29Smrg  lt_status=$lt_dlunknown
17838c9fbc29Smrg  cat > conftest.$ac_ext <<EOF
17848c9fbc29Smrg[#line __oline__ "configure"
17858c9fbc29Smrg#include "confdefs.h"
17868c9fbc29Smrg
17878c9fbc29Smrg#if HAVE_DLFCN_H
17888c9fbc29Smrg#include <dlfcn.h>
17898c9fbc29Smrg#endif
17908c9fbc29Smrg
17918c9fbc29Smrg#include <stdio.h>
17928c9fbc29Smrg
17938c9fbc29Smrg#ifdef RTLD_GLOBAL
17948c9fbc29Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
17958c9fbc29Smrg#else
17968c9fbc29Smrg#  ifdef DL_GLOBAL
17978c9fbc29Smrg#    define LT_DLGLOBAL		DL_GLOBAL
17988c9fbc29Smrg#  else
17998c9fbc29Smrg#    define LT_DLGLOBAL		0
18008c9fbc29Smrg#  endif
18018c9fbc29Smrg#endif
18028c9fbc29Smrg
18038c9fbc29Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18048c9fbc29Smrg   find out it does not work in some platform. */
18058c9fbc29Smrg#ifndef LT_DLLAZY_OR_NOW
18068c9fbc29Smrg#  ifdef RTLD_LAZY
18078c9fbc29Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18088c9fbc29Smrg#  else
18098c9fbc29Smrg#    ifdef DL_LAZY
18108c9fbc29Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18118c9fbc29Smrg#    else
18128c9fbc29Smrg#      ifdef RTLD_NOW
18138c9fbc29Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18148c9fbc29Smrg#      else
18158c9fbc29Smrg#        ifdef DL_NOW
18168c9fbc29Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18178c9fbc29Smrg#        else
18188c9fbc29Smrg#          define LT_DLLAZY_OR_NOW	0
18198c9fbc29Smrg#        endif
18208c9fbc29Smrg#      endif
18218c9fbc29Smrg#    endif
18228c9fbc29Smrg#  endif
18238c9fbc29Smrg#endif
18248c9fbc29Smrg
18258c9fbc29Smrg#ifdef __cplusplus
18268c9fbc29Smrgextern "C" void exit (int);
18278c9fbc29Smrg#endif
18288c9fbc29Smrg
18298c9fbc29Smrgvoid fnord() { int i=42;}
18308c9fbc29Smrgint main ()
18318c9fbc29Smrg{
18328c9fbc29Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18338c9fbc29Smrg  int status = $lt_dlunknown;
18348c9fbc29Smrg
18358c9fbc29Smrg  if (self)
18368c9fbc29Smrg    {
18378c9fbc29Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
18388c9fbc29Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
18398c9fbc29Smrg      /* dlclose (self); */
18408c9fbc29Smrg    }
18418c9fbc29Smrg  else
18428c9fbc29Smrg    puts (dlerror ());
18438c9fbc29Smrg
18448c9fbc29Smrg    exit (status);
18458c9fbc29Smrg}]
18468c9fbc29SmrgEOF
18478c9fbc29Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
18488c9fbc29Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
18498c9fbc29Smrg    lt_status=$?
18508c9fbc29Smrg    case x$lt_status in
18518c9fbc29Smrg      x$lt_dlno_uscore) $1 ;;
18528c9fbc29Smrg      x$lt_dlneed_uscore) $2 ;;
18538c9fbc29Smrg      x$lt_dlunknown|x*) $3 ;;
18548c9fbc29Smrg    esac
18558c9fbc29Smrg  else :
18568c9fbc29Smrg    # compilation failed
18578c9fbc29Smrg    $3
18588c9fbc29Smrg  fi
18598c9fbc29Smrgfi
18608c9fbc29Smrgrm -fr conftest*
18618c9fbc29Smrg])# _LT_AC_TRY_DLOPEN_SELF
18628c9fbc29Smrg
18638c9fbc29Smrg
18648c9fbc29Smrg# AC_LIBTOOL_DLOPEN_SELF
18658c9fbc29Smrg# ----------------------
18668c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
18678c9fbc29Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
18688c9fbc29Smrgif test "x$enable_dlopen" != xyes; then
18698c9fbc29Smrg  enable_dlopen=unknown
18708c9fbc29Smrg  enable_dlopen_self=unknown
18718c9fbc29Smrg  enable_dlopen_self_static=unknown
18728c9fbc29Smrgelse
18738c9fbc29Smrg  lt_cv_dlopen=no
18748c9fbc29Smrg  lt_cv_dlopen_libs=
18758c9fbc29Smrg
18768c9fbc29Smrg  case $host_os in
18778c9fbc29Smrg  beos*)
18788c9fbc29Smrg    lt_cv_dlopen="load_add_on"
18798c9fbc29Smrg    lt_cv_dlopen_libs=
18808c9fbc29Smrg    lt_cv_dlopen_self=yes
18818c9fbc29Smrg    ;;
18828c9fbc29Smrg
18838c9fbc29Smrg  mingw* | pw32*)
18848c9fbc29Smrg    lt_cv_dlopen="LoadLibrary"
18858c9fbc29Smrg    lt_cv_dlopen_libs=
18868c9fbc29Smrg   ;;
18878c9fbc29Smrg
18888c9fbc29Smrg  cygwin*)
18898c9fbc29Smrg    lt_cv_dlopen="dlopen"
18908c9fbc29Smrg    lt_cv_dlopen_libs=
18918c9fbc29Smrg   ;;
18928c9fbc29Smrg
18938c9fbc29Smrg  darwin*)
18948c9fbc29Smrg  # if libdl is installed we need to link against it
18958c9fbc29Smrg    AC_CHECK_LIB([dl], [dlopen],
18968c9fbc29Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
18978c9fbc29Smrg    lt_cv_dlopen="dyld"
18988c9fbc29Smrg    lt_cv_dlopen_libs=
18998c9fbc29Smrg    lt_cv_dlopen_self=yes
19008c9fbc29Smrg    ])
19018c9fbc29Smrg   ;;
19028c9fbc29Smrg
19038c9fbc29Smrg  *)
19048c9fbc29Smrg    AC_CHECK_FUNC([shl_load],
19058c9fbc29Smrg	  [lt_cv_dlopen="shl_load"],
19068c9fbc29Smrg      [AC_CHECK_LIB([dld], [shl_load],
19078c9fbc29Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
19088c9fbc29Smrg	[AC_CHECK_FUNC([dlopen],
19098c9fbc29Smrg	      [lt_cv_dlopen="dlopen"],
19108c9fbc29Smrg	  [AC_CHECK_LIB([dl], [dlopen],
19118c9fbc29Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
19128c9fbc29Smrg	    [AC_CHECK_LIB([svld], [dlopen],
19138c9fbc29Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
19148c9fbc29Smrg	      [AC_CHECK_LIB([dld], [dld_link],
19158c9fbc29Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
19168c9fbc29Smrg	      ])
19178c9fbc29Smrg	    ])
19188c9fbc29Smrg	  ])
19198c9fbc29Smrg	])
19208c9fbc29Smrg      ])
19218c9fbc29Smrg    ;;
19228c9fbc29Smrg  esac
19238c9fbc29Smrg
19248c9fbc29Smrg  if test "x$lt_cv_dlopen" != xno; then
19258c9fbc29Smrg    enable_dlopen=yes
19268c9fbc29Smrg  else
19278c9fbc29Smrg    enable_dlopen=no
19288c9fbc29Smrg  fi
19298c9fbc29Smrg
19308c9fbc29Smrg  case $lt_cv_dlopen in
19318c9fbc29Smrg  dlopen)
19328c9fbc29Smrg    save_CPPFLAGS="$CPPFLAGS"
19338c9fbc29Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19348c9fbc29Smrg
19358c9fbc29Smrg    save_LDFLAGS="$LDFLAGS"
19368c9fbc29Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19378c9fbc29Smrg
19388c9fbc29Smrg    save_LIBS="$LIBS"
19398c9fbc29Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
19408c9fbc29Smrg
19418c9fbc29Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
19428c9fbc29Smrg	  lt_cv_dlopen_self, [dnl
19438c9fbc29Smrg	  _LT_AC_TRY_DLOPEN_SELF(
19448c9fbc29Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
19458c9fbc29Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
19468c9fbc29Smrg    ])
19478c9fbc29Smrg
19488c9fbc29Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
19498c9fbc29Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19508c9fbc29Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
19518c9fbc29Smrg    	  lt_cv_dlopen_self_static, [dnl
19528c9fbc29Smrg	  _LT_AC_TRY_DLOPEN_SELF(
19538c9fbc29Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
19548c9fbc29Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
19558c9fbc29Smrg      ])
19568c9fbc29Smrg    fi
19578c9fbc29Smrg
19588c9fbc29Smrg    CPPFLAGS="$save_CPPFLAGS"
19598c9fbc29Smrg    LDFLAGS="$save_LDFLAGS"
19608c9fbc29Smrg    LIBS="$save_LIBS"
19618c9fbc29Smrg    ;;
19628c9fbc29Smrg  esac
19638c9fbc29Smrg
19648c9fbc29Smrg  case $lt_cv_dlopen_self in
19658c9fbc29Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19668c9fbc29Smrg  *) enable_dlopen_self=unknown ;;
19678c9fbc29Smrg  esac
19688c9fbc29Smrg
19698c9fbc29Smrg  case $lt_cv_dlopen_self_static in
19708c9fbc29Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19718c9fbc29Smrg  *) enable_dlopen_self_static=unknown ;;
19728c9fbc29Smrg  esac
19738c9fbc29Smrgfi
19748c9fbc29Smrg])# AC_LIBTOOL_DLOPEN_SELF
19758c9fbc29Smrg
19768c9fbc29Smrg
19778c9fbc29Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
19788c9fbc29Smrg# ---------------------------------
19798c9fbc29Smrg# Check to see if options -c and -o are simultaneously supported by compiler
19808c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
19818c9fbc29Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
19828c9fbc29SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
19838c9fbc29Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
19848c9fbc29Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
19858c9fbc29Smrg   $rm -r conftest 2>/dev/null
19868c9fbc29Smrg   mkdir conftest
19878c9fbc29Smrg   cd conftest
19888c9fbc29Smrg   mkdir out
19898c9fbc29Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
19908c9fbc29Smrg
19918c9fbc29Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
19928c9fbc29Smrg   # Insert the option either (1) after the last *FLAGS variable, or
19938c9fbc29Smrg   # (2) before a word containing "conftest.", or (3) at the end.
19948c9fbc29Smrg   # Note that $ac_compile itself does not contain backslashes and begins
19958c9fbc29Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
19968c9fbc29Smrg   lt_compile=`echo "$ac_compile" | $SED \
19978c9fbc29Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19988c9fbc29Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
19998c9fbc29Smrg   -e 's:$: $lt_compiler_flag:'`
20008c9fbc29Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20018c9fbc29Smrg   (eval "$lt_compile" 2>out/conftest.err)
20028c9fbc29Smrg   ac_status=$?
20038c9fbc29Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20048c9fbc29Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20058c9fbc29Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20068c9fbc29Smrg   then
20078c9fbc29Smrg     # The compiler can only warn and ignore the option if not recognized
20088c9fbc29Smrg     # So say no if there are warnings
20098c9fbc29Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
20108c9fbc29Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20118c9fbc29Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20128c9fbc29Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
20138c9fbc29Smrg     fi
20148c9fbc29Smrg   fi
20158c9fbc29Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
20168c9fbc29Smrg   $rm conftest*
20178c9fbc29Smrg   # SGI C++ compiler will create directory out/ii_files/ for
20188c9fbc29Smrg   # template instantiation
20198c9fbc29Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
20208c9fbc29Smrg   $rm out/* && rmdir out
20218c9fbc29Smrg   cd ..
20228c9fbc29Smrg   rmdir conftest
20238c9fbc29Smrg   $rm conftest*
20248c9fbc29Smrg])
20258c9fbc29Smrg])# AC_LIBTOOL_PROG_CC_C_O
20268c9fbc29Smrg
20278c9fbc29Smrg
20288c9fbc29Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
20298c9fbc29Smrg# -----------------------------------------
20308c9fbc29Smrg# Check to see if we can do hard links to lock some files if needed
20318c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
20328c9fbc29Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
20338c9fbc29Smrg
20348c9fbc29Smrghard_links="nottested"
20358c9fbc29Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
20368c9fbc29Smrg  # do not overwrite the value of need_locks provided by the user
20378c9fbc29Smrg  AC_MSG_CHECKING([if we can lock with hard links])
20388c9fbc29Smrg  hard_links=yes
20398c9fbc29Smrg  $rm conftest*
20408c9fbc29Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
20418c9fbc29Smrg  touch conftest.a
20428c9fbc29Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
20438c9fbc29Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
20448c9fbc29Smrg  AC_MSG_RESULT([$hard_links])
20458c9fbc29Smrg  if test "$hard_links" = no; then
20468c9fbc29Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
20478c9fbc29Smrg    need_locks=warn
20488c9fbc29Smrg  fi
20498c9fbc29Smrgelse
20508c9fbc29Smrg  need_locks=no
20518c9fbc29Smrgfi
20528c9fbc29Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
20538c9fbc29Smrg
20548c9fbc29Smrg
20558c9fbc29Smrg# AC_LIBTOOL_OBJDIR
20568c9fbc29Smrg# -----------------
20578c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
20588c9fbc29Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
20598c9fbc29Smrg[rm -f .libs 2>/dev/null
20608c9fbc29Smrgmkdir .libs 2>/dev/null
20618c9fbc29Smrgif test -d .libs; then
20628c9fbc29Smrg  lt_cv_objdir=.libs
20638c9fbc29Smrgelse
20648c9fbc29Smrg  # MS-DOS does not allow filenames that begin with a dot.
20658c9fbc29Smrg  lt_cv_objdir=_libs
20668c9fbc29Smrgfi
20678c9fbc29Smrgrmdir .libs 2>/dev/null])
20688c9fbc29Smrgobjdir=$lt_cv_objdir
20698c9fbc29Smrg])# AC_LIBTOOL_OBJDIR
20708c9fbc29Smrg
20718c9fbc29Smrg
20728c9fbc29Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
20738c9fbc29Smrg# ----------------------------------------------
20748c9fbc29Smrg# Check hardcoding attributes.
20758c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
20768c9fbc29Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
20778c9fbc29Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
20788c9fbc29Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
20798c9fbc29Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
20808c9fbc29Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
20818c9fbc29Smrg
20828c9fbc29Smrg  # We can hardcode non-existant directories.
20838c9fbc29Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
20848c9fbc29Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
20858c9fbc29Smrg     # have to relink, otherwise we might link with an installed library
20868c9fbc29Smrg     # when we should be linking with a yet-to-be-installed one
20878c9fbc29Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
20888c9fbc29Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
20898c9fbc29Smrg    # Linking always hardcodes the temporary library directory.
20908c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
20918c9fbc29Smrg  else
20928c9fbc29Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
20938c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
20948c9fbc29Smrg  fi
20958c9fbc29Smrgelse
20968c9fbc29Smrg  # We cannot hardcode anything, or else we can only hardcode existing
20978c9fbc29Smrg  # directories.
20988c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
20998c9fbc29Smrgfi
21008c9fbc29SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
21018c9fbc29Smrg
21028c9fbc29Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
21038c9fbc29Smrg  # Fast installation is not supported
21048c9fbc29Smrg  enable_fast_install=no
21058c9fbc29Smrgelif test "$shlibpath_overrides_runpath" = yes ||
21068c9fbc29Smrg     test "$enable_shared" = no; then
21078c9fbc29Smrg  # Fast installation is not necessary
21088c9fbc29Smrg  enable_fast_install=needless
21098c9fbc29Smrgfi
21108c9fbc29Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
21118c9fbc29Smrg
21128c9fbc29Smrg
21138c9fbc29Smrg# AC_LIBTOOL_SYS_LIB_STRIP
21148c9fbc29Smrg# ------------------------
21158c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
21168c9fbc29Smrg[striplib=
21178c9fbc29Smrgold_striplib=
21188c9fbc29SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
21198c9fbc29Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
21208c9fbc29Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
21218c9fbc29Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
21228c9fbc29Smrg  AC_MSG_RESULT([yes])
21238c9fbc29Smrgelse
21248c9fbc29Smrg# FIXME - insert some real tests, host_os isn't really good enough
21258c9fbc29Smrg  case $host_os in
21268c9fbc29Smrg   darwin*)
21278c9fbc29Smrg       if test -n "$STRIP" ; then
21288c9fbc29Smrg         striplib="$STRIP -x"
21298c9fbc29Smrg         AC_MSG_RESULT([yes])
21308c9fbc29Smrg       else
21318c9fbc29Smrg  AC_MSG_RESULT([no])
21328c9fbc29Smrgfi
21338c9fbc29Smrg       ;;
21348c9fbc29Smrg   *)
21358c9fbc29Smrg  AC_MSG_RESULT([no])
21368c9fbc29Smrg    ;;
21378c9fbc29Smrg  esac
21388c9fbc29Smrgfi
21398c9fbc29Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
21408c9fbc29Smrg
21418c9fbc29Smrg
21428c9fbc29Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
21438c9fbc29Smrg# -----------------------------
21448c9fbc29Smrg# PORTME Fill in your ld.so characteristics
21458c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
21468c9fbc29Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
21478c9fbc29Smrglibrary_names_spec=
21488c9fbc29Smrglibname_spec='lib$name'
21498c9fbc29Smrgsoname_spec=
21508c9fbc29Smrgshrext_cmds=".so"
21518c9fbc29Smrgpostinstall_cmds=
21528c9fbc29Smrgpostuninstall_cmds=
21538c9fbc29Smrgfinish_cmds=
21548c9fbc29Smrgfinish_eval=
21558c9fbc29Smrgshlibpath_var=
21568c9fbc29Smrgshlibpath_overrides_runpath=unknown
21578c9fbc29Smrgversion_type=none
21588c9fbc29Smrgdynamic_linker="$host_os ld.so"
21598c9fbc29Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
21608c9fbc29Smrgif test "$GCC" = yes; then
21618c9fbc29Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
21628c9fbc29Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
21638c9fbc29Smrg    # if the path contains ";" then we assume it to be the separator
21648c9fbc29Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
21658c9fbc29Smrg    # assumed that no part of a normal pathname contains ";" but that should
21668c9fbc29Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
21678c9fbc29Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21688c9fbc29Smrg  else
21698c9fbc29Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
21708c9fbc29Smrg  fi
21718c9fbc29Smrgelse
21728c9fbc29Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21738c9fbc29Smrgfi
21748c9fbc29Smrgneed_lib_prefix=unknown
21758c9fbc29Smrghardcode_into_libs=no
21768c9fbc29Smrg
21778c9fbc29Smrg# when you set need_version to no, make sure it does not cause -set_version
21788c9fbc29Smrg# flags to be left without arguments
21798c9fbc29Smrgneed_version=unknown
21808c9fbc29Smrg
21818c9fbc29Smrgcase $host_os in
21828c9fbc29Smrgaix3*)
21838c9fbc29Smrg  version_type=linux
21848c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21858c9fbc29Smrg  shlibpath_var=LIBPATH
21868c9fbc29Smrg
21878c9fbc29Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
21888c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
21898c9fbc29Smrg  ;;
21908c9fbc29Smrg
21918c9fbc29Smrgaix4* | aix5*)
21928c9fbc29Smrg  version_type=linux
21938c9fbc29Smrg  need_lib_prefix=no
21948c9fbc29Smrg  need_version=no
21958c9fbc29Smrg  hardcode_into_libs=yes
21968c9fbc29Smrg  if test "$host_cpu" = ia64; then
21978c9fbc29Smrg    # AIX 5 supports IA64
21988c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21998c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
22008c9fbc29Smrg  else
22018c9fbc29Smrg    # With GCC up to 2.95.x, collect2 would create an import file
22028c9fbc29Smrg    # for dependence libraries.  The import file would start with
22038c9fbc29Smrg    # the line `#! .'.  This would cause the generated library to
22048c9fbc29Smrg    # depend on `.', always an invalid library.  This was fixed in
22058c9fbc29Smrg    # development snapshots of GCC prior to 3.0.
22068c9fbc29Smrg    case $host_os in
22078c9fbc29Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
22088c9fbc29Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
22098c9fbc29Smrg	   echo ' yes '
22108c9fbc29Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
22118c9fbc29Smrg	:
22128c9fbc29Smrg      else
22138c9fbc29Smrg	can_build_shared=no
22148c9fbc29Smrg      fi
22158c9fbc29Smrg      ;;
22168c9fbc29Smrg    esac
22178c9fbc29Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
22188c9fbc29Smrg    # soname into executable. Probably we can add versioning support to
22198c9fbc29Smrg    # collect2, so additional links can be useful in future.
22208c9fbc29Smrg    if test "$aix_use_runtimelinking" = yes; then
22218c9fbc29Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
22228c9fbc29Smrg      # instead of lib<name>.a to let people know that these are not
22238c9fbc29Smrg      # typical AIX shared libraries.
22248c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22258c9fbc29Smrg    else
22268c9fbc29Smrg      # We preserve .a as extension for shared libraries through AIX4.2
22278c9fbc29Smrg      # and later when we are not doing run time linking.
22288c9fbc29Smrg      library_names_spec='${libname}${release}.a $libname.a'
22298c9fbc29Smrg      soname_spec='${libname}${release}${shared_ext}$major'
22308c9fbc29Smrg    fi
22318c9fbc29Smrg    shlibpath_var=LIBPATH
22328c9fbc29Smrg  fi
22338c9fbc29Smrg  ;;
22348c9fbc29Smrg
22358c9fbc29Smrgamigaos*)
22368c9fbc29Smrg  library_names_spec='$libname.ixlibrary $libname.a'
22378c9fbc29Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
22388c9fbc29Smrg  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'
22398c9fbc29Smrg  ;;
22408c9fbc29Smrg
22418c9fbc29Smrgbeos*)
22428c9fbc29Smrg  library_names_spec='${libname}${shared_ext}'
22438c9fbc29Smrg  dynamic_linker="$host_os ld.so"
22448c9fbc29Smrg  shlibpath_var=LIBRARY_PATH
22458c9fbc29Smrg  ;;
22468c9fbc29Smrg
22478c9fbc29Smrgbsdi[[45]]*)
22488c9fbc29Smrg  version_type=linux
22498c9fbc29Smrg  need_version=no
22508c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22518c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
22528c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
22538c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
22548c9fbc29Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
22558c9fbc29Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
22568c9fbc29Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
22578c9fbc29Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
22588c9fbc29Smrg  # libtool to hard-code these into programs
22598c9fbc29Smrg  ;;
22608c9fbc29Smrg
22618c9fbc29Smrgcygwin* | mingw* | pw32*)
22628c9fbc29Smrg  version_type=windows
22638c9fbc29Smrg  shrext_cmds=".dll"
22648c9fbc29Smrg  need_version=no
22658c9fbc29Smrg  need_lib_prefix=no
22668c9fbc29Smrg
22678c9fbc29Smrg  case $GCC,$host_os in
22688c9fbc29Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
22698c9fbc29Smrg    library_names_spec='$libname.dll.a'
22708c9fbc29Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
22718c9fbc29Smrg    postinstall_cmds='base_file=`basename \${file}`~
22728c9fbc29Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
22738c9fbc29Smrg      dldir=$destdir/`dirname \$dlpath`~
22748c9fbc29Smrg      test -d \$dldir || mkdir -p \$dldir~
22758c9fbc29Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
22768c9fbc29Smrg      chmod a+x \$dldir/$dlname'
22778c9fbc29Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22788c9fbc29Smrg      dlpath=$dir/\$dldll~
22798c9fbc29Smrg       $rm \$dlpath'
22808c9fbc29Smrg    shlibpath_overrides_runpath=yes
22818c9fbc29Smrg
22828c9fbc29Smrg    case $host_os in
22838c9fbc29Smrg    cygwin*)
22848c9fbc29Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
22858c9fbc29Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22868c9fbc29Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
22878c9fbc29Smrg      ;;
22888c9fbc29Smrg    mingw*)
22898c9fbc29Smrg      # MinGW DLLs use traditional 'lib' prefix
22908c9fbc29Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22918c9fbc29Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
22928c9fbc29Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
22938c9fbc29Smrg        # It is most probably a Windows format PATH printed by
22948c9fbc29Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
22958c9fbc29Smrg        # path with ; separators, and with drive letters. We can handle the
22968c9fbc29Smrg        # drive letters (cygwin fileutils understands them), so leave them,
22978c9fbc29Smrg        # especially as we might pass files found there to a mingw objdump,
22988c9fbc29Smrg        # which wouldn't understand a cygwinified path. Ahh.
22998c9fbc29Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
23008c9fbc29Smrg      else
23018c9fbc29Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
23028c9fbc29Smrg      fi
23038c9fbc29Smrg      ;;
23048c9fbc29Smrg    pw32*)
23058c9fbc29Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
23068c9fbc29Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
23078c9fbc29Smrg      ;;
23088c9fbc29Smrg    esac
23098c9fbc29Smrg    ;;
23108c9fbc29Smrg
23118c9fbc29Smrg  *)
23128c9fbc29Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
23138c9fbc29Smrg    ;;
23148c9fbc29Smrg  esac
23158c9fbc29Smrg  dynamic_linker='Win32 ld.exe'
23168c9fbc29Smrg  # FIXME: first we should search . and the directory the executable is in
23178c9fbc29Smrg  shlibpath_var=PATH
23188c9fbc29Smrg  ;;
23198c9fbc29Smrg
23208c9fbc29Smrgdarwin* | rhapsody*)
23218c9fbc29Smrg  dynamic_linker="$host_os dyld"
23228c9fbc29Smrg  version_type=darwin
23238c9fbc29Smrg  need_lib_prefix=no
23248c9fbc29Smrg  need_version=no
23258c9fbc29Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
23268c9fbc29Smrg  soname_spec='${libname}${release}${major}$shared_ext'
23278c9fbc29Smrg  shlibpath_overrides_runpath=yes
23288c9fbc29Smrg  shlibpath_var=DYLD_LIBRARY_PATH
23298c9fbc29Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
23308c9fbc29Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
23318c9fbc29Smrg  if test "$GCC" = yes; then
23328c9fbc29Smrg    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"`
23338c9fbc29Smrg  else
23348c9fbc29Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
23358c9fbc29Smrg  fi
23368c9fbc29Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
23378c9fbc29Smrg  ;;
23388c9fbc29Smrg
23398c9fbc29Smrgdgux*)
23408c9fbc29Smrg  version_type=linux
23418c9fbc29Smrg  need_lib_prefix=no
23428c9fbc29Smrg  need_version=no
23438c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
23448c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
23458c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
23468c9fbc29Smrg  ;;
23478c9fbc29Smrg
23488c9fbc29Smrgfreebsd1*)
23498c9fbc29Smrg  dynamic_linker=no
23508c9fbc29Smrg  ;;
23518c9fbc29Smrg
23528c9fbc29Smrgkfreebsd*-gnu)
23538c9fbc29Smrg  version_type=linux
23548c9fbc29Smrg  need_lib_prefix=no
23558c9fbc29Smrg  need_version=no
23568c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
23578c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
23588c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
23598c9fbc29Smrg  shlibpath_overrides_runpath=no
23608c9fbc29Smrg  hardcode_into_libs=yes
23618c9fbc29Smrg  dynamic_linker='GNU ld.so'
23628c9fbc29Smrg  ;;
23638c9fbc29Smrg
23648c9fbc29Smrgfreebsd* | dragonfly*)
23658c9fbc29Smrg  # DragonFly does not have aout.  When/if they implement a new
23668c9fbc29Smrg  # versioning mechanism, adjust this.
23678c9fbc29Smrg  if test -x /usr/bin/objformat; then
23688c9fbc29Smrg    objformat=`/usr/bin/objformat`
23698c9fbc29Smrg  else
23708c9fbc29Smrg    case $host_os in
23718c9fbc29Smrg    freebsd[[123]]*) objformat=aout ;;
23728c9fbc29Smrg    *) objformat=elf ;;
23738c9fbc29Smrg    esac
23748c9fbc29Smrg  fi
23758c9fbc29Smrg  version_type=freebsd-$objformat
23768c9fbc29Smrg  case $version_type in
23778c9fbc29Smrg    freebsd-elf*)
23788c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
23798c9fbc29Smrg      need_version=no
23808c9fbc29Smrg      need_lib_prefix=no
23818c9fbc29Smrg      ;;
23828c9fbc29Smrg    freebsd-*)
23838c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
23848c9fbc29Smrg      need_version=yes
23858c9fbc29Smrg      ;;
23868c9fbc29Smrg  esac
23878c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
23888c9fbc29Smrg  case $host_os in
23898c9fbc29Smrg  freebsd2*)
23908c9fbc29Smrg    shlibpath_overrides_runpath=yes
23918c9fbc29Smrg    ;;
23928c9fbc29Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
23938c9fbc29Smrg    shlibpath_overrides_runpath=yes
23948c9fbc29Smrg    hardcode_into_libs=yes
23958c9fbc29Smrg    ;;
23968c9fbc29Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
23978c9fbc29Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
23988c9fbc29Smrg    shlibpath_overrides_runpath=no
23998c9fbc29Smrg    hardcode_into_libs=yes
24008c9fbc29Smrg    ;;
24018c9fbc29Smrg  freebsd*) # from 4.6 on
24028c9fbc29Smrg    shlibpath_overrides_runpath=yes
24038c9fbc29Smrg    hardcode_into_libs=yes
24048c9fbc29Smrg    ;;
24058c9fbc29Smrg  esac
24068c9fbc29Smrg  ;;
24078c9fbc29Smrg
24088c9fbc29Smrggnu*)
24098c9fbc29Smrg  version_type=linux
24108c9fbc29Smrg  need_lib_prefix=no
24118c9fbc29Smrg  need_version=no
24128c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
24138c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24148c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
24158c9fbc29Smrg  hardcode_into_libs=yes
24168c9fbc29Smrg  ;;
24178c9fbc29Smrg
24188c9fbc29Smrghpux9* | hpux10* | hpux11*)
24198c9fbc29Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
24208c9fbc29Smrg  # link against other versions.
24218c9fbc29Smrg  version_type=sunos
24228c9fbc29Smrg  need_lib_prefix=no
24238c9fbc29Smrg  need_version=no
24248c9fbc29Smrg  case $host_cpu in
24258c9fbc29Smrg  ia64*)
24268c9fbc29Smrg    shrext_cmds='.so'
24278c9fbc29Smrg    hardcode_into_libs=yes
24288c9fbc29Smrg    dynamic_linker="$host_os dld.so"
24298c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
24308c9fbc29Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
24318c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24328c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
24338c9fbc29Smrg    if test "X$HPUX_IA64_MODE" = X32; then
24348c9fbc29Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
24358c9fbc29Smrg    else
24368c9fbc29Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
24378c9fbc29Smrg    fi
24388c9fbc29Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
24398c9fbc29Smrg    ;;
24408c9fbc29Smrg   hppa*64*)
24418c9fbc29Smrg     shrext_cmds='.sl'
24428c9fbc29Smrg     hardcode_into_libs=yes
24438c9fbc29Smrg     dynamic_linker="$host_os dld.sl"
24448c9fbc29Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
24458c9fbc29Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
24468c9fbc29Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24478c9fbc29Smrg     soname_spec='${libname}${release}${shared_ext}$major'
24488c9fbc29Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
24498c9fbc29Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
24508c9fbc29Smrg     ;;
24518c9fbc29Smrg   *)
24528c9fbc29Smrg    shrext_cmds='.sl'
24538c9fbc29Smrg    dynamic_linker="$host_os dld.sl"
24548c9fbc29Smrg    shlibpath_var=SHLIB_PATH
24558c9fbc29Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
24568c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24578c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
24588c9fbc29Smrg    ;;
24598c9fbc29Smrg  esac
24608c9fbc29Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
24618c9fbc29Smrg  postinstall_cmds='chmod 555 $lib'
24628c9fbc29Smrg  ;;
24638c9fbc29Smrg
24648c9fbc29Smrginterix3*)
24658c9fbc29Smrg  version_type=linux
24668c9fbc29Smrg  need_lib_prefix=no
24678c9fbc29Smrg  need_version=no
24688c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24698c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24708c9fbc29Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
24718c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
24728c9fbc29Smrg  shlibpath_overrides_runpath=no
24738c9fbc29Smrg  hardcode_into_libs=yes
24748c9fbc29Smrg  ;;
24758c9fbc29Smrg
24768c9fbc29Smrgirix5* | irix6* | nonstopux*)
24778c9fbc29Smrg  case $host_os in
24788c9fbc29Smrg    nonstopux*) version_type=nonstopux ;;
24798c9fbc29Smrg    *)
24808c9fbc29Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
24818c9fbc29Smrg		version_type=linux
24828c9fbc29Smrg	else
24838c9fbc29Smrg		version_type=irix
24848c9fbc29Smrg	fi ;;
24858c9fbc29Smrg  esac
24868c9fbc29Smrg  need_lib_prefix=no
24878c9fbc29Smrg  need_version=no
24888c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24898c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
24908c9fbc29Smrg  case $host_os in
24918c9fbc29Smrg  irix5* | nonstopux*)
24928c9fbc29Smrg    libsuff= shlibsuff=
24938c9fbc29Smrg    ;;
24948c9fbc29Smrg  *)
24958c9fbc29Smrg    case $LD in # libtool.m4 will add one of these switches to LD
24968c9fbc29Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
24978c9fbc29Smrg      libsuff= shlibsuff= libmagic=32-bit;;
24988c9fbc29Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
24998c9fbc29Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
25008c9fbc29Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
25018c9fbc29Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
25028c9fbc29Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
25038c9fbc29Smrg    esac
25048c9fbc29Smrg    ;;
25058c9fbc29Smrg  esac
25068c9fbc29Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
25078c9fbc29Smrg  shlibpath_overrides_runpath=no
25088c9fbc29Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
25098c9fbc29Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
25108c9fbc29Smrg  hardcode_into_libs=yes
25118c9fbc29Smrg  ;;
25128c9fbc29Smrg
25138c9fbc29Smrg# No shared lib support for Linux oldld, aout, or coff.
25148c9fbc29Smrglinux*oldld* | linux*aout* | linux*coff*)
25158c9fbc29Smrg  dynamic_linker=no
25168c9fbc29Smrg  ;;
25178c9fbc29Smrg
25188c9fbc29Smrg# This must be Linux ELF.
25198c9fbc29Smrglinux*)
25208c9fbc29Smrg  version_type=linux
25218c9fbc29Smrg  need_lib_prefix=no
25228c9fbc29Smrg  need_version=no
25238c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25248c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25258c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
25268c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
25278c9fbc29Smrg  shlibpath_overrides_runpath=no
25288c9fbc29Smrg  # This implies no fast_install, which is unacceptable.
25298c9fbc29Smrg  # Some rework will be needed to allow for fast_install
25308c9fbc29Smrg  # before this can be enabled.
25318c9fbc29Smrg  hardcode_into_libs=yes
25328c9fbc29Smrg
25338c9fbc29Smrg  # Append ld.so.conf contents to the search path
25348c9fbc29Smrg  if test -f /etc/ld.so.conf; then
25358c9fbc29Smrg    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' ' '`
25368c9fbc29Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
25378c9fbc29Smrg  fi
25388c9fbc29Smrg
25398c9fbc29Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
25408c9fbc29Smrg  # powerpc, because MkLinux only supported shared libraries with the
25418c9fbc29Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
25428c9fbc29Smrg  # most powerpc-linux boxes support dynamic linking these days and
25438c9fbc29Smrg  # people can always --disable-shared, the test was removed, and we
25448c9fbc29Smrg  # assume the GNU/Linux dynamic linker is in use.
25458c9fbc29Smrg  dynamic_linker='GNU/Linux ld.so'
25468c9fbc29Smrg  ;;
25478c9fbc29Smrg
25488c9fbc29Smrgknetbsd*-gnu)
25498c9fbc29Smrg  version_type=linux
25508c9fbc29Smrg  need_lib_prefix=no
25518c9fbc29Smrg  need_version=no
25528c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25538c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25548c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
25558c9fbc29Smrg  shlibpath_overrides_runpath=no
25568c9fbc29Smrg  hardcode_into_libs=yes
25578c9fbc29Smrg  dynamic_linker='GNU ld.so'
25588c9fbc29Smrg  ;;
25598c9fbc29Smrg
25608c9fbc29Smrgnetbsd*)
25618c9fbc29Smrg  version_type=sunos
25628c9fbc29Smrg  need_lib_prefix=no
25638c9fbc29Smrg  need_version=no
25648c9fbc29Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
25658c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
25668c9fbc29Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
25678c9fbc29Smrg    dynamic_linker='NetBSD (a.out) ld.so'
25688c9fbc29Smrg  else
25698c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25708c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
25718c9fbc29Smrg    dynamic_linker='NetBSD ld.elf_so'
25728c9fbc29Smrg  fi
25738c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
25748c9fbc29Smrg  shlibpath_overrides_runpath=yes
25758c9fbc29Smrg  hardcode_into_libs=yes
25768c9fbc29Smrg  ;;
25778c9fbc29Smrg
25788c9fbc29Smrgnewsos6)
25798c9fbc29Smrg  version_type=linux
25808c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25818c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
25828c9fbc29Smrg  shlibpath_overrides_runpath=yes
25838c9fbc29Smrg  ;;
25848c9fbc29Smrg
25858c9fbc29Smrgnto-qnx*)
25868c9fbc29Smrg  version_type=linux
25878c9fbc29Smrg  need_lib_prefix=no
25888c9fbc29Smrg  need_version=no
25898c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25908c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25918c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
25928c9fbc29Smrg  shlibpath_overrides_runpath=yes
25938c9fbc29Smrg  ;;
25948c9fbc29Smrg
25958c9fbc29Smrgopenbsd*)
25968c9fbc29Smrg  version_type=sunos
25978c9fbc29Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
25988c9fbc29Smrg  need_lib_prefix=no
25998c9fbc29Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
26008c9fbc29Smrg  case $host_os in
26018c9fbc29Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
26028c9fbc29Smrg    *)                         need_version=no  ;;
26038c9fbc29Smrg  esac
26048c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
26058c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
26068c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
26078c9fbc29Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
26088c9fbc29Smrg    case $host_os in
26098c9fbc29Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
26108c9fbc29Smrg	shlibpath_overrides_runpath=no
26118c9fbc29Smrg	;;
26128c9fbc29Smrg      *)
26138c9fbc29Smrg	shlibpath_overrides_runpath=yes
26148c9fbc29Smrg	;;
26158c9fbc29Smrg      esac
26168c9fbc29Smrg  else
26178c9fbc29Smrg    shlibpath_overrides_runpath=yes
26188c9fbc29Smrg  fi
26198c9fbc29Smrg  ;;
26208c9fbc29Smrg
26218c9fbc29Smrgos2*)
26228c9fbc29Smrg  libname_spec='$name'
26238c9fbc29Smrg  shrext_cmds=".dll"
26248c9fbc29Smrg  need_lib_prefix=no
26258c9fbc29Smrg  library_names_spec='$libname${shared_ext} $libname.a'
26268c9fbc29Smrg  dynamic_linker='OS/2 ld.exe'
26278c9fbc29Smrg  shlibpath_var=LIBPATH
26288c9fbc29Smrg  ;;
26298c9fbc29Smrg
26308c9fbc29Smrgosf3* | osf4* | osf5*)
26318c9fbc29Smrg  version_type=osf
26328c9fbc29Smrg  need_lib_prefix=no
26338c9fbc29Smrg  need_version=no
26348c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26358c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26368c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
26378c9fbc29Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
26388c9fbc29Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
26398c9fbc29Smrg  ;;
26408c9fbc29Smrg
26418c9fbc29Smrgsolaris*)
26428c9fbc29Smrg  version_type=linux
26438c9fbc29Smrg  need_lib_prefix=no
26448c9fbc29Smrg  need_version=no
26458c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26468c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26478c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
26488c9fbc29Smrg  shlibpath_overrides_runpath=yes
26498c9fbc29Smrg  hardcode_into_libs=yes
26508c9fbc29Smrg  # ldd complains unless libraries are executable
26518c9fbc29Smrg  postinstall_cmds='chmod +x $lib'
26528c9fbc29Smrg  ;;
26538c9fbc29Smrg
26548c9fbc29Smrgsunos4*)
26558c9fbc29Smrg  version_type=sunos
26568c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
26578c9fbc29Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
26588c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
26598c9fbc29Smrg  shlibpath_overrides_runpath=yes
26608c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
26618c9fbc29Smrg    need_lib_prefix=no
26628c9fbc29Smrg  fi
26638c9fbc29Smrg  need_version=yes
26648c9fbc29Smrg  ;;
26658c9fbc29Smrg
26668c9fbc29Smrgsysv4 | sysv4.3*)
26678c9fbc29Smrg  version_type=linux
26688c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26698c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26708c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
26718c9fbc29Smrg  case $host_vendor in
26728c9fbc29Smrg    sni)
26738c9fbc29Smrg      shlibpath_overrides_runpath=no
26748c9fbc29Smrg      need_lib_prefix=no
26758c9fbc29Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
26768c9fbc29Smrg      runpath_var=LD_RUN_PATH
26778c9fbc29Smrg      ;;
26788c9fbc29Smrg    siemens)
26798c9fbc29Smrg      need_lib_prefix=no
26808c9fbc29Smrg      ;;
26818c9fbc29Smrg    motorola)
26828c9fbc29Smrg      need_lib_prefix=no
26838c9fbc29Smrg      need_version=no
26848c9fbc29Smrg      shlibpath_overrides_runpath=no
26858c9fbc29Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
26868c9fbc29Smrg      ;;
26878c9fbc29Smrg  esac
26888c9fbc29Smrg  ;;
26898c9fbc29Smrg
26908c9fbc29Smrgsysv4*MP*)
26918c9fbc29Smrg  if test -d /usr/nec ;then
26928c9fbc29Smrg    version_type=linux
26938c9fbc29Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
26948c9fbc29Smrg    soname_spec='$libname${shared_ext}.$major'
26958c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
26968c9fbc29Smrg  fi
26978c9fbc29Smrg  ;;
26988c9fbc29Smrg
26998c9fbc29Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
27008c9fbc29Smrg  version_type=freebsd-elf
27018c9fbc29Smrg  need_lib_prefix=no
27028c9fbc29Smrg  need_version=no
27038c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
27048c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27058c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
27068c9fbc29Smrg  hardcode_into_libs=yes
27078c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
27088c9fbc29Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
27098c9fbc29Smrg    shlibpath_overrides_runpath=no
27108c9fbc29Smrg  else
27118c9fbc29Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
27128c9fbc29Smrg    shlibpath_overrides_runpath=yes
27138c9fbc29Smrg    case $host_os in
27148c9fbc29Smrg      sco3.2v5*)
27158c9fbc29Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
27168c9fbc29Smrg	;;
27178c9fbc29Smrg    esac
27188c9fbc29Smrg  fi
27198c9fbc29Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
27208c9fbc29Smrg  ;;
27218c9fbc29Smrg
27228c9fbc29Smrguts4*)
27238c9fbc29Smrg  version_type=linux
27248c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27258c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27268c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
27278c9fbc29Smrg  ;;
27288c9fbc29Smrg
27298c9fbc29Smrg*)
27308c9fbc29Smrg  dynamic_linker=no
27318c9fbc29Smrg  ;;
27328c9fbc29Smrgesac
27338c9fbc29SmrgAC_MSG_RESULT([$dynamic_linker])
27348c9fbc29Smrgtest "$dynamic_linker" = no && can_build_shared=no
27358c9fbc29Smrg
27368c9fbc29Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
27378c9fbc29Smrgif test "$GCC" = yes; then
27388c9fbc29Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
27398c9fbc29Smrgfi
27408c9fbc29Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
27418c9fbc29Smrg
27428c9fbc29Smrg
27438c9fbc29Smrg# _LT_AC_TAGCONFIG
27448c9fbc29Smrg# ----------------
27458c9fbc29SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
27468c9fbc29Smrg[AC_ARG_WITH([tags],
27478c9fbc29Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
27488c9fbc29Smrg        [include additional configurations @<:@automatic@:>@])],
27498c9fbc29Smrg    [tagnames="$withval"])
27508c9fbc29Smrg
27518c9fbc29Smrgif test -f "$ltmain" && test -n "$tagnames"; then
27528c9fbc29Smrg  if test ! -f "${ofile}"; then
27538c9fbc29Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
27548c9fbc29Smrg  fi
27558c9fbc29Smrg
27568c9fbc29Smrg  if test -z "$LTCC"; then
27578c9fbc29Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
27588c9fbc29Smrg    if test -z "$LTCC"; then
27598c9fbc29Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
27608c9fbc29Smrg    else
27618c9fbc29Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
27628c9fbc29Smrg    fi
27638c9fbc29Smrg  fi
27648c9fbc29Smrg  if test -z "$LTCFLAGS"; then
27658c9fbc29Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
27668c9fbc29Smrg  fi
27678c9fbc29Smrg
27688c9fbc29Smrg  # Extract list of available tagged configurations in $ofile.
27698c9fbc29Smrg  # Note that this assumes the entire list is on one line.
27708c9fbc29Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
27718c9fbc29Smrg
27728c9fbc29Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
27738c9fbc29Smrg  for tagname in $tagnames; do
27748c9fbc29Smrg    IFS="$lt_save_ifs"
27758c9fbc29Smrg    # Check whether tagname contains only valid characters
27768c9fbc29Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
27778c9fbc29Smrg    "") ;;
27788c9fbc29Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
27798c9fbc29Smrg	;;
27808c9fbc29Smrg    esac
27818c9fbc29Smrg
27828c9fbc29Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
27838c9fbc29Smrg    then
27848c9fbc29Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
27858c9fbc29Smrg    fi
27868c9fbc29Smrg
27878c9fbc29Smrg    # Update the list of available tags.
27888c9fbc29Smrg    if test -n "$tagname"; then
27898c9fbc29Smrg      echo appending configuration tag \"$tagname\" to $ofile
27908c9fbc29Smrg
27918c9fbc29Smrg      case $tagname in
27928c9fbc29Smrg      CXX)
27938c9fbc29Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27948c9fbc29Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27958c9fbc29Smrg	    (test "X$CXX" != "Xg++"))) ; then
27968c9fbc29Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
27978c9fbc29Smrg	else
27988c9fbc29Smrg	  tagname=""
27998c9fbc29Smrg	fi
28008c9fbc29Smrg	;;
28018c9fbc29Smrg
28028c9fbc29Smrg      F77)
28038c9fbc29Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
28048c9fbc29Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
28058c9fbc29Smrg	else
28068c9fbc29Smrg	  tagname=""
28078c9fbc29Smrg	fi
28088c9fbc29Smrg	;;
28098c9fbc29Smrg
28108c9fbc29Smrg      GCJ)
28118c9fbc29Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
28128c9fbc29Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
28138c9fbc29Smrg	else
28148c9fbc29Smrg	  tagname=""
28158c9fbc29Smrg	fi
28168c9fbc29Smrg	;;
28178c9fbc29Smrg
28188c9fbc29Smrg      RC)
28198c9fbc29Smrg	AC_LIBTOOL_LANG_RC_CONFIG
28208c9fbc29Smrg	;;
28218c9fbc29Smrg
28228c9fbc29Smrg      *)
28238c9fbc29Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
28248c9fbc29Smrg	;;
28258c9fbc29Smrg      esac
28268c9fbc29Smrg
28278c9fbc29Smrg      # Append the new tag name to the list of available tags.
28288c9fbc29Smrg      if test -n "$tagname" ; then
28298c9fbc29Smrg      available_tags="$available_tags $tagname"
28308c9fbc29Smrg    fi
28318c9fbc29Smrg    fi
28328c9fbc29Smrg  done
28338c9fbc29Smrg  IFS="$lt_save_ifs"
28348c9fbc29Smrg
28358c9fbc29Smrg  # Now substitute the updated list of available tags.
28368c9fbc29Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
28378c9fbc29Smrg    mv "${ofile}T" "$ofile"
28388c9fbc29Smrg    chmod +x "$ofile"
28398c9fbc29Smrg  else
28408c9fbc29Smrg    rm -f "${ofile}T"
28418c9fbc29Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
28428c9fbc29Smrg  fi
28438c9fbc29Smrgfi
28448c9fbc29Smrg])# _LT_AC_TAGCONFIG
28458c9fbc29Smrg
28468c9fbc29Smrg
28478c9fbc29Smrg# AC_LIBTOOL_DLOPEN
28488c9fbc29Smrg# -----------------
28498c9fbc29Smrg# enable checks for dlopen support
28508c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
28518c9fbc29Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
28528c9fbc29Smrg])# AC_LIBTOOL_DLOPEN
28538c9fbc29Smrg
28548c9fbc29Smrg
28558c9fbc29Smrg# AC_LIBTOOL_WIN32_DLL
28568c9fbc29Smrg# --------------------
28578c9fbc29Smrg# declare package support for building win32 DLLs
28588c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
28598c9fbc29Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
28608c9fbc29Smrg])# AC_LIBTOOL_WIN32_DLL
28618c9fbc29Smrg
28628c9fbc29Smrg
28638c9fbc29Smrg# AC_ENABLE_SHARED([DEFAULT])
28648c9fbc29Smrg# ---------------------------
28658c9fbc29Smrg# implement the --enable-shared flag
28668c9fbc29Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
28678c9fbc29SmrgAC_DEFUN([AC_ENABLE_SHARED],
28688c9fbc29Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
28698c9fbc29SmrgAC_ARG_ENABLE([shared],
28708c9fbc29Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
28718c9fbc29Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
28728c9fbc29Smrg    [p=${PACKAGE-default}
28738c9fbc29Smrg    case $enableval in
28748c9fbc29Smrg    yes) enable_shared=yes ;;
28758c9fbc29Smrg    no) enable_shared=no ;;
28768c9fbc29Smrg    *)
28778c9fbc29Smrg      enable_shared=no
28788c9fbc29Smrg      # Look at the argument we got.  We use all the common list separators.
28798c9fbc29Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
28808c9fbc29Smrg      for pkg in $enableval; do
28818c9fbc29Smrg	IFS="$lt_save_ifs"
28828c9fbc29Smrg	if test "X$pkg" = "X$p"; then
28838c9fbc29Smrg	  enable_shared=yes
28848c9fbc29Smrg	fi
28858c9fbc29Smrg      done
28868c9fbc29Smrg      IFS="$lt_save_ifs"
28878c9fbc29Smrg      ;;
28888c9fbc29Smrg    esac],
28898c9fbc29Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
28908c9fbc29Smrg])# AC_ENABLE_SHARED
28918c9fbc29Smrg
28928c9fbc29Smrg
28938c9fbc29Smrg# AC_DISABLE_SHARED
28948c9fbc29Smrg# -----------------
28958c9fbc29Smrg# set the default shared flag to --disable-shared
28968c9fbc29SmrgAC_DEFUN([AC_DISABLE_SHARED],
28978c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
28988c9fbc29SmrgAC_ENABLE_SHARED(no)
28998c9fbc29Smrg])# AC_DISABLE_SHARED
29008c9fbc29Smrg
29018c9fbc29Smrg
29028c9fbc29Smrg# AC_ENABLE_STATIC([DEFAULT])
29038c9fbc29Smrg# ---------------------------
29048c9fbc29Smrg# implement the --enable-static flag
29058c9fbc29Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
29068c9fbc29SmrgAC_DEFUN([AC_ENABLE_STATIC],
29078c9fbc29Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
29088c9fbc29SmrgAC_ARG_ENABLE([static],
29098c9fbc29Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
29108c9fbc29Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
29118c9fbc29Smrg    [p=${PACKAGE-default}
29128c9fbc29Smrg    case $enableval in
29138c9fbc29Smrg    yes) enable_static=yes ;;
29148c9fbc29Smrg    no) enable_static=no ;;
29158c9fbc29Smrg    *)
29168c9fbc29Smrg     enable_static=no
29178c9fbc29Smrg      # Look at the argument we got.  We use all the common list separators.
29188c9fbc29Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
29198c9fbc29Smrg      for pkg in $enableval; do
29208c9fbc29Smrg	IFS="$lt_save_ifs"
29218c9fbc29Smrg	if test "X$pkg" = "X$p"; then
29228c9fbc29Smrg	  enable_static=yes
29238c9fbc29Smrg	fi
29248c9fbc29Smrg      done
29258c9fbc29Smrg      IFS="$lt_save_ifs"
29268c9fbc29Smrg      ;;
29278c9fbc29Smrg    esac],
29288c9fbc29Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
29298c9fbc29Smrg])# AC_ENABLE_STATIC
29308c9fbc29Smrg
29318c9fbc29Smrg
29328c9fbc29Smrg# AC_DISABLE_STATIC
29338c9fbc29Smrg# -----------------
29348c9fbc29Smrg# set the default static flag to --disable-static
29358c9fbc29SmrgAC_DEFUN([AC_DISABLE_STATIC],
29368c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
29378c9fbc29SmrgAC_ENABLE_STATIC(no)
29388c9fbc29Smrg])# AC_DISABLE_STATIC
29398c9fbc29Smrg
29408c9fbc29Smrg
29418c9fbc29Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
29428c9fbc29Smrg# ---------------------------------
29438c9fbc29Smrg# implement the --enable-fast-install flag
29448c9fbc29Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
29458c9fbc29SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
29468c9fbc29Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
29478c9fbc29SmrgAC_ARG_ENABLE([fast-install],
29488c9fbc29Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
29498c9fbc29Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
29508c9fbc29Smrg    [p=${PACKAGE-default}
29518c9fbc29Smrg    case $enableval in
29528c9fbc29Smrg    yes) enable_fast_install=yes ;;
29538c9fbc29Smrg    no) enable_fast_install=no ;;
29548c9fbc29Smrg    *)
29558c9fbc29Smrg      enable_fast_install=no
29568c9fbc29Smrg      # Look at the argument we got.  We use all the common list separators.
29578c9fbc29Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
29588c9fbc29Smrg      for pkg in $enableval; do
29598c9fbc29Smrg	IFS="$lt_save_ifs"
29608c9fbc29Smrg	if test "X$pkg" = "X$p"; then
29618c9fbc29Smrg	  enable_fast_install=yes
29628c9fbc29Smrg	fi
29638c9fbc29Smrg      done
29648c9fbc29Smrg      IFS="$lt_save_ifs"
29658c9fbc29Smrg      ;;
29668c9fbc29Smrg    esac],
29678c9fbc29Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
29688c9fbc29Smrg])# AC_ENABLE_FAST_INSTALL
29698c9fbc29Smrg
29708c9fbc29Smrg
29718c9fbc29Smrg# AC_DISABLE_FAST_INSTALL
29728c9fbc29Smrg# -----------------------
29738c9fbc29Smrg# set the default to --disable-fast-install
29748c9fbc29SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
29758c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
29768c9fbc29SmrgAC_ENABLE_FAST_INSTALL(no)
29778c9fbc29Smrg])# AC_DISABLE_FAST_INSTALL
29788c9fbc29Smrg
29798c9fbc29Smrg
29808c9fbc29Smrg# AC_LIBTOOL_PICMODE([MODE])
29818c9fbc29Smrg# --------------------------
29828c9fbc29Smrg# implement the --with-pic flag
29838c9fbc29Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
29848c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
29858c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
29868c9fbc29Smrgpic_mode=ifelse($#,1,$1,default)
29878c9fbc29Smrg])# AC_LIBTOOL_PICMODE
29888c9fbc29Smrg
29898c9fbc29Smrg
29908c9fbc29Smrg# AC_PROG_EGREP
29918c9fbc29Smrg# -------------
29928c9fbc29Smrg# This is predefined starting with Autoconf 2.54, so this conditional
29938c9fbc29Smrg# definition can be removed once we require Autoconf 2.54 or later.
29948c9fbc29Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
29958c9fbc29Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
29968c9fbc29Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
29978c9fbc29Smrg    then ac_cv_prog_egrep='grep -E'
29988c9fbc29Smrg    else ac_cv_prog_egrep='egrep'
29998c9fbc29Smrg    fi])
30008c9fbc29Smrg EGREP=$ac_cv_prog_egrep
30018c9fbc29Smrg AC_SUBST([EGREP])
30028c9fbc29Smrg])])
30038c9fbc29Smrg
30048c9fbc29Smrg
30058c9fbc29Smrg# AC_PATH_TOOL_PREFIX
30068c9fbc29Smrg# -------------------
30078c9fbc29Smrg# find a file program which can recognise shared library
30088c9fbc29SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
30098c9fbc29Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
30108c9fbc29SmrgAC_MSG_CHECKING([for $1])
30118c9fbc29SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
30128c9fbc29Smrg[case $MAGIC_CMD in
30138c9fbc29Smrg[[\\/*] |  ?:[\\/]*])
30148c9fbc29Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
30158c9fbc29Smrg  ;;
30168c9fbc29Smrg*)
30178c9fbc29Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
30188c9fbc29Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
30198c9fbc29Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
30208c9fbc29Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
30218c9fbc29Smrgdnl not every word.  This closes a longstanding sh security hole.
30228c9fbc29Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
30238c9fbc29Smrg  for ac_dir in $ac_dummy; do
30248c9fbc29Smrg    IFS="$lt_save_ifs"
30258c9fbc29Smrg    test -z "$ac_dir" && ac_dir=.
30268c9fbc29Smrg    if test -f $ac_dir/$1; then
30278c9fbc29Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
30288c9fbc29Smrg      if test -n "$file_magic_test_file"; then
30298c9fbc29Smrg	case $deplibs_check_method in
30308c9fbc29Smrg	"file_magic "*)
30318c9fbc29Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
30328c9fbc29Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
30338c9fbc29Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
30348c9fbc29Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
30358c9fbc29Smrg	    :
30368c9fbc29Smrg	  else
30378c9fbc29Smrg	    cat <<EOF 1>&2
30388c9fbc29Smrg
30398c9fbc29Smrg*** Warning: the command libtool uses to detect shared libraries,
30408c9fbc29Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
30418c9fbc29Smrg*** The result is that libtool may fail to recognize shared libraries
30428c9fbc29Smrg*** as such.  This will affect the creation of libtool libraries that
30438c9fbc29Smrg*** depend on shared libraries, but programs linked with such libtool
30448c9fbc29Smrg*** libraries will work regardless of this problem.  Nevertheless, you
30458c9fbc29Smrg*** may want to report the problem to your system manager and/or to
30468c9fbc29Smrg*** bug-libtool@gnu.org
30478c9fbc29Smrg
30488c9fbc29SmrgEOF
30498c9fbc29Smrg	  fi ;;
30508c9fbc29Smrg	esac
30518c9fbc29Smrg      fi
30528c9fbc29Smrg      break
30538c9fbc29Smrg    fi
30548c9fbc29Smrg  done
30558c9fbc29Smrg  IFS="$lt_save_ifs"
30568c9fbc29Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
30578c9fbc29Smrg  ;;
30588c9fbc29Smrgesac])
30598c9fbc29SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
30608c9fbc29Smrgif test -n "$MAGIC_CMD"; then
30618c9fbc29Smrg  AC_MSG_RESULT($MAGIC_CMD)
30628c9fbc29Smrgelse
30638c9fbc29Smrg  AC_MSG_RESULT(no)
30648c9fbc29Smrgfi
30658c9fbc29Smrg])# AC_PATH_TOOL_PREFIX
30668c9fbc29Smrg
30678c9fbc29Smrg
30688c9fbc29Smrg# AC_PATH_MAGIC
30698c9fbc29Smrg# -------------
30708c9fbc29Smrg# find a file program which can recognise a shared library
30718c9fbc29SmrgAC_DEFUN([AC_PATH_MAGIC],
30728c9fbc29Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
30738c9fbc29Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
30748c9fbc29Smrg  if test -n "$ac_tool_prefix"; then
30758c9fbc29Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
30768c9fbc29Smrg  else
30778c9fbc29Smrg    MAGIC_CMD=:
30788c9fbc29Smrg  fi
30798c9fbc29Smrgfi
30808c9fbc29Smrg])# AC_PATH_MAGIC
30818c9fbc29Smrg
30828c9fbc29Smrg
30838c9fbc29Smrg# AC_PROG_LD
30848c9fbc29Smrg# ----------
30858c9fbc29Smrg# find the pathname to the GNU or non-GNU linker
30868c9fbc29SmrgAC_DEFUN([AC_PROG_LD],
30878c9fbc29Smrg[AC_ARG_WITH([gnu-ld],
30888c9fbc29Smrg    [AC_HELP_STRING([--with-gnu-ld],
30898c9fbc29Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
30908c9fbc29Smrg    [test "$withval" = no || with_gnu_ld=yes],
30918c9fbc29Smrg    [with_gnu_ld=no])
30928c9fbc29SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
30938c9fbc29SmrgAC_REQUIRE([AC_PROG_CC])dnl
30948c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
30958c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
30968c9fbc29Smrgac_prog=ld
30978c9fbc29Smrgif test "$GCC" = yes; then
30988c9fbc29Smrg  # Check if gcc -print-prog-name=ld gives a path.
30998c9fbc29Smrg  AC_MSG_CHECKING([for ld used by $CC])
31008c9fbc29Smrg  case $host in
31018c9fbc29Smrg  *-*-mingw*)
31028c9fbc29Smrg    # gcc leaves a trailing carriage return which upsets mingw
31038c9fbc29Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
31048c9fbc29Smrg  *)
31058c9fbc29Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
31068c9fbc29Smrg  esac
31078c9fbc29Smrg  case $ac_prog in
31088c9fbc29Smrg    # Accept absolute paths.
31098c9fbc29Smrg    [[\\/]]* | ?:[[\\/]]*)
31108c9fbc29Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
31118c9fbc29Smrg      # Canonicalize the pathname of ld
31128c9fbc29Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
31138c9fbc29Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
31148c9fbc29Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
31158c9fbc29Smrg      done
31168c9fbc29Smrg      test -z "$LD" && LD="$ac_prog"
31178c9fbc29Smrg      ;;
31188c9fbc29Smrg  "")
31198c9fbc29Smrg    # If it fails, then pretend we aren't using GCC.
31208c9fbc29Smrg    ac_prog=ld
31218c9fbc29Smrg    ;;
31228c9fbc29Smrg  *)
31238c9fbc29Smrg    # If it is relative, then search for the first ld in PATH.
31248c9fbc29Smrg    with_gnu_ld=unknown
31258c9fbc29Smrg    ;;
31268c9fbc29Smrg  esac
31278c9fbc29Smrgelif test "$with_gnu_ld" = yes; then
31288c9fbc29Smrg  AC_MSG_CHECKING([for GNU ld])
31298c9fbc29Smrgelse
31308c9fbc29Smrg  AC_MSG_CHECKING([for non-GNU ld])
31318c9fbc29Smrgfi
31328c9fbc29SmrgAC_CACHE_VAL(lt_cv_path_LD,
31338c9fbc29Smrg[if test -z "$LD"; then
31348c9fbc29Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
31358c9fbc29Smrg  for ac_dir in $PATH; do
31368c9fbc29Smrg    IFS="$lt_save_ifs"
31378c9fbc29Smrg    test -z "$ac_dir" && ac_dir=.
31388c9fbc29Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
31398c9fbc29Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
31408c9fbc29Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
31418c9fbc29Smrg      # but apparently some variants of GNU ld only accept -v.
31428c9fbc29Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
31438c9fbc29Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
31448c9fbc29Smrg      *GNU* | *'with BFD'*)
31458c9fbc29Smrg	test "$with_gnu_ld" != no && break
31468c9fbc29Smrg	;;
31478c9fbc29Smrg      *)
31488c9fbc29Smrg	test "$with_gnu_ld" != yes && break
31498c9fbc29Smrg	;;
31508c9fbc29Smrg      esac
31518c9fbc29Smrg    fi
31528c9fbc29Smrg  done
31538c9fbc29Smrg  IFS="$lt_save_ifs"
31548c9fbc29Smrgelse
31558c9fbc29Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
31568c9fbc29Smrgfi])
31578c9fbc29SmrgLD="$lt_cv_path_LD"
31588c9fbc29Smrgif test -n "$LD"; then
31598c9fbc29Smrg  AC_MSG_RESULT($LD)
31608c9fbc29Smrgelse
31618c9fbc29Smrg  AC_MSG_RESULT(no)
31628c9fbc29Smrgfi
31638c9fbc29Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
31648c9fbc29SmrgAC_PROG_LD_GNU
31658c9fbc29Smrg])# AC_PROG_LD
31668c9fbc29Smrg
31678c9fbc29Smrg
31688c9fbc29Smrg# AC_PROG_LD_GNU
31698c9fbc29Smrg# --------------
31708c9fbc29SmrgAC_DEFUN([AC_PROG_LD_GNU],
31718c9fbc29Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
31728c9fbc29SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
31738c9fbc29Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
31748c9fbc29Smrgcase `$LD -v 2>&1 </dev/null` in
31758c9fbc29Smrg*GNU* | *'with BFD'*)
31768c9fbc29Smrg  lt_cv_prog_gnu_ld=yes
31778c9fbc29Smrg  ;;
31788c9fbc29Smrg*)
31798c9fbc29Smrg  lt_cv_prog_gnu_ld=no
31808c9fbc29Smrg  ;;
31818c9fbc29Smrgesac])
31828c9fbc29Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
31838c9fbc29Smrg])# AC_PROG_LD_GNU
31848c9fbc29Smrg
31858c9fbc29Smrg
31868c9fbc29Smrg# AC_PROG_LD_RELOAD_FLAG
31878c9fbc29Smrg# ----------------------
31888c9fbc29Smrg# find reload flag for linker
31898c9fbc29Smrg#   -- PORTME Some linkers may need a different reload flag.
31908c9fbc29SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
31918c9fbc29Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
31928c9fbc29Smrg  lt_cv_ld_reload_flag,
31938c9fbc29Smrg  [lt_cv_ld_reload_flag='-r'])
31948c9fbc29Smrgreload_flag=$lt_cv_ld_reload_flag
31958c9fbc29Smrgcase $reload_flag in
31968c9fbc29Smrg"" | " "*) ;;
31978c9fbc29Smrg*) reload_flag=" $reload_flag" ;;
31988c9fbc29Smrgesac
31998c9fbc29Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
32008c9fbc29Smrgcase $host_os in
32018c9fbc29Smrg  darwin*)
32028c9fbc29Smrg    if test "$GCC" = yes; then
32038c9fbc29Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
32048c9fbc29Smrg    else
32058c9fbc29Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
32068c9fbc29Smrg    fi
32078c9fbc29Smrg    ;;
32088c9fbc29Smrgesac
32098c9fbc29Smrg])# AC_PROG_LD_RELOAD_FLAG
32108c9fbc29Smrg
32118c9fbc29Smrg
32128c9fbc29Smrg# AC_DEPLIBS_CHECK_METHOD
32138c9fbc29Smrg# -----------------------
32148c9fbc29Smrg# how to check for library dependencies
32158c9fbc29Smrg#  -- PORTME fill in with the dynamic library characteristics
32168c9fbc29SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
32178c9fbc29Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
32188c9fbc29Smrglt_cv_deplibs_check_method,
32198c9fbc29Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
32208c9fbc29Smrglt_cv_file_magic_test_file=
32218c9fbc29Smrglt_cv_deplibs_check_method='unknown'
32228c9fbc29Smrg# Need to set the preceding variable on all platforms that support
32238c9fbc29Smrg# interlibrary dependencies.
32248c9fbc29Smrg# 'none' -- dependencies not supported.
32258c9fbc29Smrg# `unknown' -- same as none, but documents that we really don't know.
32268c9fbc29Smrg# 'pass_all' -- all dependencies passed with no checks.
32278c9fbc29Smrg# 'test_compile' -- check by making test program.
32288c9fbc29Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
32298c9fbc29Smrg# which responds to the $file_magic_cmd with a given extended regex.
32308c9fbc29Smrg# If you have `file' or equivalent on your system and you're not sure
32318c9fbc29Smrg# whether `pass_all' will *always* work, you probably want this one.
32328c9fbc29Smrg
32338c9fbc29Smrgcase $host_os in
32348c9fbc29Smrgaix4* | aix5*)
32358c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
32368c9fbc29Smrg  ;;
32378c9fbc29Smrg
32388c9fbc29Smrgbeos*)
32398c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
32408c9fbc29Smrg  ;;
32418c9fbc29Smrg
32428c9fbc29Smrgbsdi[[45]]*)
32438c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
32448c9fbc29Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
32458c9fbc29Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
32468c9fbc29Smrg  ;;
32478c9fbc29Smrg
32488c9fbc29Smrgcygwin*)
32498c9fbc29Smrg  # func_win32_libid is a shell function defined in ltmain.sh
32508c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
32518c9fbc29Smrg  lt_cv_file_magic_cmd='func_win32_libid'
32528c9fbc29Smrg  ;;
32538c9fbc29Smrg
32548c9fbc29Smrgmingw* | pw32*)
32558c9fbc29Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
32568c9fbc29Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
32578c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
32588c9fbc29Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
32598c9fbc29Smrg  ;;
32608c9fbc29Smrg
32618c9fbc29Smrgdarwin* | rhapsody*)
32628c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
32638c9fbc29Smrg  ;;
32648c9fbc29Smrg
32658c9fbc29Smrgfreebsd* | kfreebsd*-gnu | dragonfly*)
32668c9fbc29Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
32678c9fbc29Smrg    case $host_cpu in
32688c9fbc29Smrg    i*86 )
32698c9fbc29Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
32708c9fbc29Smrg      # Let's accept both of them until this is cleared up.
32718c9fbc29Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
32728c9fbc29Smrg      lt_cv_file_magic_cmd=/usr/bin/file
32738c9fbc29Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
32748c9fbc29Smrg      ;;
32758c9fbc29Smrg    esac
32768c9fbc29Smrg  else
32778c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
32788c9fbc29Smrg  fi
32798c9fbc29Smrg  ;;
32808c9fbc29Smrg
32818c9fbc29Smrggnu*)
32828c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
32838c9fbc29Smrg  ;;
32848c9fbc29Smrg
32858c9fbc29Smrghpux10.20* | hpux11*)
32868c9fbc29Smrg  lt_cv_file_magic_cmd=/usr/bin/file
32878c9fbc29Smrg  case $host_cpu in
32888c9fbc29Smrg  ia64*)
32898c9fbc29Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
32908c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
32918c9fbc29Smrg    ;;
32928c9fbc29Smrg  hppa*64*)
32938c9fbc29Smrg    [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]']
32948c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
32958c9fbc29Smrg    ;;
32968c9fbc29Smrg  *)
32978c9fbc29Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
32988c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
32998c9fbc29Smrg    ;;
33008c9fbc29Smrg  esac
33018c9fbc29Smrg  ;;
33028c9fbc29Smrg
33038c9fbc29Smrginterix3*)
33048c9fbc29Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
33058c9fbc29Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
33068c9fbc29Smrg  ;;
33078c9fbc29Smrg
33088c9fbc29Smrgirix5* | irix6* | nonstopux*)
33098c9fbc29Smrg  case $LD in
33108c9fbc29Smrg  *-32|*"-32 ") libmagic=32-bit;;
33118c9fbc29Smrg  *-n32|*"-n32 ") libmagic=N32;;
33128c9fbc29Smrg  *-64|*"-64 ") libmagic=64-bit;;
33138c9fbc29Smrg  *) libmagic=never-match;;
33148c9fbc29Smrg  esac
33158c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
33168c9fbc29Smrg  ;;
33178c9fbc29Smrg
33188c9fbc29Smrg# This must be Linux ELF.
33198c9fbc29Smrglinux*)
33208c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
33218c9fbc29Smrg  ;;
33228c9fbc29Smrg
33238c9fbc29Smrgnetbsd*)
33248c9fbc29Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
33258c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33268c9fbc29Smrg  else
33278c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
33288c9fbc29Smrg  fi
33298c9fbc29Smrg  ;;
33308c9fbc29Smrg
33318c9fbc29Smrgnewos6*)
33328c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
33338c9fbc29Smrg  lt_cv_file_magic_cmd=/usr/bin/file
33348c9fbc29Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
33358c9fbc29Smrg  ;;
33368c9fbc29Smrg
33378c9fbc29Smrgnto-qnx*)
33388c9fbc29Smrg  lt_cv_deplibs_check_method=unknown
33398c9fbc29Smrg  ;;
33408c9fbc29Smrg
33418c9fbc29Smrgopenbsd*)
33428c9fbc29Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
33438c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
33448c9fbc29Smrg  else
33458c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33468c9fbc29Smrg  fi
33478c9fbc29Smrg  ;;
33488c9fbc29Smrg
33498c9fbc29Smrgosf3* | osf4* | osf5*)
33508c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
33518c9fbc29Smrg  ;;
33528c9fbc29Smrg
33538c9fbc29Smrgsolaris*)
33548c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
33558c9fbc29Smrg  ;;
33568c9fbc29Smrg
33578c9fbc29Smrgsysv4 | sysv4.3*)
33588c9fbc29Smrg  case $host_vendor in
33598c9fbc29Smrg  motorola)
33608c9fbc29Smrg    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]]'
33618c9fbc29Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
33628c9fbc29Smrg    ;;
33638c9fbc29Smrg  ncr)
33648c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
33658c9fbc29Smrg    ;;
33668c9fbc29Smrg  sequent)
33678c9fbc29Smrg    lt_cv_file_magic_cmd='/bin/file'
33688c9fbc29Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
33698c9fbc29Smrg    ;;
33708c9fbc29Smrg  sni)
33718c9fbc29Smrg    lt_cv_file_magic_cmd='/bin/file'
33728c9fbc29Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
33738c9fbc29Smrg    lt_cv_file_magic_test_file=/lib/libc.so
33748c9fbc29Smrg    ;;
33758c9fbc29Smrg  siemens)
33768c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
33778c9fbc29Smrg    ;;
33788c9fbc29Smrg  pc)
33798c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
33808c9fbc29Smrg    ;;
33818c9fbc29Smrg  esac
33828c9fbc29Smrg  ;;
33838c9fbc29Smrg
33848c9fbc29Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
33858c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
33868c9fbc29Smrg  ;;
33878c9fbc29Smrgesac
33888c9fbc29Smrg])
33898c9fbc29Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
33908c9fbc29Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
33918c9fbc29Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
33928c9fbc29Smrg])# AC_DEPLIBS_CHECK_METHOD
33938c9fbc29Smrg
33948c9fbc29Smrg
33958c9fbc29Smrg# AC_PROG_NM
33968c9fbc29Smrg# ----------
33978c9fbc29Smrg# find the pathname to a BSD-compatible name lister
33988c9fbc29SmrgAC_DEFUN([AC_PROG_NM],
33998c9fbc29Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
34008c9fbc29Smrg[if test -n "$NM"; then
34018c9fbc29Smrg  # Let the user override the test.
34028c9fbc29Smrg  lt_cv_path_NM="$NM"
34038c9fbc29Smrgelse
34048c9fbc29Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
34058c9fbc29Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
34068c9fbc29Smrg    lt_nm_to_check="$lt_nm_to_check nm"
34078c9fbc29Smrg  fi
34088c9fbc29Smrg  for lt_tmp_nm in $lt_nm_to_check; do
34098c9fbc29Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34108c9fbc29Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
34118c9fbc29Smrg      IFS="$lt_save_ifs"
34128c9fbc29Smrg      test -z "$ac_dir" && ac_dir=.
34138c9fbc29Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
34148c9fbc29Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
34158c9fbc29Smrg	# Check to see if the nm accepts a BSD-compat flag.
34168c9fbc29Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
34178c9fbc29Smrg	#   nm: unknown option "B" ignored
34188c9fbc29Smrg	# Tru64's nm complains that /dev/null is an invalid object file
34198c9fbc29Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
34208c9fbc29Smrg	*/dev/null* | *'Invalid file or object type'*)
34218c9fbc29Smrg	  lt_cv_path_NM="$tmp_nm -B"
34228c9fbc29Smrg	  break
34238c9fbc29Smrg	  ;;
34248c9fbc29Smrg	*)
34258c9fbc29Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
34268c9fbc29Smrg	  */dev/null*)
34278c9fbc29Smrg	    lt_cv_path_NM="$tmp_nm -p"
34288c9fbc29Smrg	    break
34298c9fbc29Smrg	    ;;
34308c9fbc29Smrg	  *)
34318c9fbc29Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
34328c9fbc29Smrg	    continue # so that we can try to find one that supports BSD flags
34338c9fbc29Smrg	    ;;
34348c9fbc29Smrg	  esac
34358c9fbc29Smrg	  ;;
34368c9fbc29Smrg	esac
34378c9fbc29Smrg      fi
34388c9fbc29Smrg    done
34398c9fbc29Smrg    IFS="$lt_save_ifs"
34408c9fbc29Smrg  done
34418c9fbc29Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
34428c9fbc29Smrgfi])
34438c9fbc29SmrgNM="$lt_cv_path_NM"
34448c9fbc29Smrg])# AC_PROG_NM
34458c9fbc29Smrg
34468c9fbc29Smrg
34478c9fbc29Smrg# AC_CHECK_LIBM
34488c9fbc29Smrg# -------------
34498c9fbc29Smrg# check for math library
34508c9fbc29SmrgAC_DEFUN([AC_CHECK_LIBM],
34518c9fbc29Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
34528c9fbc29SmrgLIBM=
34538c9fbc29Smrgcase $host in
34548c9fbc29Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
34558c9fbc29Smrg  # These system don't have libm, or don't need it
34568c9fbc29Smrg  ;;
34578c9fbc29Smrg*-ncr-sysv4.3*)
34588c9fbc29Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
34598c9fbc29Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
34608c9fbc29Smrg  ;;
34618c9fbc29Smrg*)
34628c9fbc29Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
34638c9fbc29Smrg  ;;
34648c9fbc29Smrgesac
34658c9fbc29Smrg])# AC_CHECK_LIBM
34668c9fbc29Smrg
34678c9fbc29Smrg
34688c9fbc29Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
34698c9fbc29Smrg# -----------------------------------
34708c9fbc29Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
34718c9fbc29Smrg# LTDLINCL to the include flags for the libltdl header and adds
34728c9fbc29Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
34738c9fbc29Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
34748c9fbc29Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
34758c9fbc29Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
34768c9fbc29Smrg# (note the single quotes!).  If your package is not flat and you're not
34778c9fbc29Smrg# using automake, define top_builddir and top_srcdir appropriately in
34788c9fbc29Smrg# the Makefiles.
34798c9fbc29SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
34808c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
34818c9fbc29Smrg  case $enable_ltdl_convenience in
34828c9fbc29Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
34838c9fbc29Smrg  "") enable_ltdl_convenience=yes
34848c9fbc29Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
34858c9fbc29Smrg  esac
34868c9fbc29Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
34878c9fbc29Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
34888c9fbc29Smrg  # For backwards non-gettext consistent compatibility...
34898c9fbc29Smrg  INCLTDL="$LTDLINCL"
34908c9fbc29Smrg])# AC_LIBLTDL_CONVENIENCE
34918c9fbc29Smrg
34928c9fbc29Smrg
34938c9fbc29Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
34948c9fbc29Smrg# -----------------------------------
34958c9fbc29Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
34968c9fbc29Smrg# LTDLINCL to the include flags for the libltdl header and adds
34978c9fbc29Smrg# --enable-ltdl-install to the configure arguments.  Note that
34988c9fbc29Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
34998c9fbc29Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
35008c9fbc29Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
35018c9fbc29Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
35028c9fbc29Smrg# flat and you're not using automake, define top_builddir and top_srcdir
35038c9fbc29Smrg# appropriately in the Makefiles.
35048c9fbc29Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
35058c9fbc29SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
35068c9fbc29Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
35078c9fbc29Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
35088c9fbc29Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
35098c9fbc29Smrg  [if test x"$enable_ltdl_install" = xno; then
35108c9fbc29Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
35118c9fbc29Smrg   else
35128c9fbc29Smrg     enable_ltdl_install=yes
35138c9fbc29Smrg   fi
35148c9fbc29Smrg  ])
35158c9fbc29Smrg  if test x"$enable_ltdl_install" = x"yes"; then
35168c9fbc29Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
35178c9fbc29Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
35188c9fbc29Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
35198c9fbc29Smrg  else
35208c9fbc29Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
35218c9fbc29Smrg    LIBLTDL="-lltdl"
35228c9fbc29Smrg    LTDLINCL=
35238c9fbc29Smrg  fi
35248c9fbc29Smrg  # For backwards non-gettext consistent compatibility...
35258c9fbc29Smrg  INCLTDL="$LTDLINCL"
35268c9fbc29Smrg])# AC_LIBLTDL_INSTALLABLE
35278c9fbc29Smrg
35288c9fbc29Smrg
35298c9fbc29Smrg# AC_LIBTOOL_CXX
35308c9fbc29Smrg# --------------
35318c9fbc29Smrg# enable support for C++ libraries
35328c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_CXX],
35338c9fbc29Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
35348c9fbc29Smrg])# AC_LIBTOOL_CXX
35358c9fbc29Smrg
35368c9fbc29Smrg
35378c9fbc29Smrg# _LT_AC_LANG_CXX
35388c9fbc29Smrg# ---------------
35398c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_CXX],
35408c9fbc29Smrg[AC_REQUIRE([AC_PROG_CXX])
35418c9fbc29SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
35428c9fbc29Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
35438c9fbc29Smrg])# _LT_AC_LANG_CXX
35448c9fbc29Smrg
35458c9fbc29Smrg# _LT_AC_PROG_CXXCPP
35468c9fbc29Smrg# ------------------
35478c9fbc29SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
35488c9fbc29Smrg[
35498c9fbc29SmrgAC_REQUIRE([AC_PROG_CXX])
35508c9fbc29Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
35518c9fbc29Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
35528c9fbc29Smrg    (test "X$CXX" != "Xg++"))) ; then
35538c9fbc29Smrg  AC_PROG_CXXCPP
35548c9fbc29Smrgfi
35558c9fbc29Smrg])# _LT_AC_PROG_CXXCPP
35568c9fbc29Smrg
35578c9fbc29Smrg# AC_LIBTOOL_F77
35588c9fbc29Smrg# --------------
35598c9fbc29Smrg# enable support for Fortran 77 libraries
35608c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_F77],
35618c9fbc29Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
35628c9fbc29Smrg])# AC_LIBTOOL_F77
35638c9fbc29Smrg
35648c9fbc29Smrg
35658c9fbc29Smrg# _LT_AC_LANG_F77
35668c9fbc29Smrg# ---------------
35678c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_F77],
35688c9fbc29Smrg[AC_REQUIRE([AC_PROG_F77])
35698c9fbc29Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
35708c9fbc29Smrg])# _LT_AC_LANG_F77
35718c9fbc29Smrg
35728c9fbc29Smrg
35738c9fbc29Smrg# AC_LIBTOOL_GCJ
35748c9fbc29Smrg# --------------
35758c9fbc29Smrg# enable support for GCJ libraries
35768c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
35778c9fbc29Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
35788c9fbc29Smrg])# AC_LIBTOOL_GCJ
35798c9fbc29Smrg
35808c9fbc29Smrg
35818c9fbc29Smrg# _LT_AC_LANG_GCJ
35828c9fbc29Smrg# ---------------
35838c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
35848c9fbc29Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
35858c9fbc29Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
35868c9fbc29Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
35878c9fbc29Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
35888c9fbc29Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
35898c9fbc29Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
35908c9fbc29Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
35918c9fbc29Smrg])# _LT_AC_LANG_GCJ
35928c9fbc29Smrg
35938c9fbc29Smrg
35948c9fbc29Smrg# AC_LIBTOOL_RC
35958c9fbc29Smrg# -------------
35968c9fbc29Smrg# enable support for Windows resource files
35978c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_RC],
35988c9fbc29Smrg[AC_REQUIRE([LT_AC_PROG_RC])
35998c9fbc29Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
36008c9fbc29Smrg])# AC_LIBTOOL_RC
36018c9fbc29Smrg
36028c9fbc29Smrg
36038c9fbc29Smrg# AC_LIBTOOL_LANG_C_CONFIG
36048c9fbc29Smrg# ------------------------
36058c9fbc29Smrg# Ensure that the configuration vars for the C compiler are
36068c9fbc29Smrg# suitably defined.  Those variables are subsequently used by
36078c9fbc29Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
36088c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
36098c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
36108c9fbc29Smrg[lt_save_CC="$CC"
36118c9fbc29SmrgAC_LANG_PUSH(C)
36128c9fbc29Smrg
36138c9fbc29Smrg# Source file extension for C test sources.
36148c9fbc29Smrgac_ext=c
36158c9fbc29Smrg
36168c9fbc29Smrg# Object file extension for compiled C test sources.
36178c9fbc29Smrgobjext=o
36188c9fbc29Smrg_LT_AC_TAGVAR(objext, $1)=$objext
36198c9fbc29Smrg
36208c9fbc29Smrg# Code to be used in simple compile tests
36218c9fbc29Smrglt_simple_compile_test_code="int some_variable = 0;\n"
36228c9fbc29Smrg
36238c9fbc29Smrg# Code to be used in simple link tests
36248c9fbc29Smrglt_simple_link_test_code='int main(){return(0);}\n'
36258c9fbc29Smrg
36268c9fbc29Smrg_LT_AC_SYS_COMPILER
36278c9fbc29Smrg
36288c9fbc29Smrg# save warnings/boilerplate of simple test code
36298c9fbc29Smrg_LT_COMPILER_BOILERPLATE
36308c9fbc29Smrg_LT_LINKER_BOILERPLATE
36318c9fbc29Smrg
36328c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
36338c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
36348c9fbc29SmrgAC_LIBTOOL_PROG_CC_C_O($1)
36358c9fbc29SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
36368c9fbc29SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
36378c9fbc29SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
36388c9fbc29SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
36398c9fbc29SmrgAC_LIBTOOL_SYS_LIB_STRIP
36408c9fbc29SmrgAC_LIBTOOL_DLOPEN_SELF
36418c9fbc29Smrg
36428c9fbc29Smrg# Report which library types will actually be built
36438c9fbc29SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
36448c9fbc29SmrgAC_MSG_RESULT([$can_build_shared])
36458c9fbc29Smrg
36468c9fbc29SmrgAC_MSG_CHECKING([whether to build shared libraries])
36478c9fbc29Smrgtest "$can_build_shared" = "no" && enable_shared=no
36488c9fbc29Smrg
36498c9fbc29Smrg# On AIX, shared libraries and static libraries use the same namespace, and
36508c9fbc29Smrg# are all built from PIC.
36518c9fbc29Smrgcase $host_os in
36528c9fbc29Smrgaix3*)
36538c9fbc29Smrg  test "$enable_shared" = yes && enable_static=no
36548c9fbc29Smrg  if test -n "$RANLIB"; then
36558c9fbc29Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
36568c9fbc29Smrg    postinstall_cmds='$RANLIB $lib'
36578c9fbc29Smrg  fi
36588c9fbc29Smrg  ;;
36598c9fbc29Smrg
36608c9fbc29Smrgaix4* | aix5*)
36618c9fbc29Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
36628c9fbc29Smrg    test "$enable_shared" = yes && enable_static=no
36638c9fbc29Smrg  fi
36648c9fbc29Smrg    ;;
36658c9fbc29Smrgesac
36668c9fbc29SmrgAC_MSG_RESULT([$enable_shared])
36678c9fbc29Smrg
36688c9fbc29SmrgAC_MSG_CHECKING([whether to build static libraries])
36698c9fbc29Smrg# Make sure either enable_shared or enable_static is yes.
36708c9fbc29Smrgtest "$enable_shared" = yes || enable_static=yes
36718c9fbc29SmrgAC_MSG_RESULT([$enable_static])
36728c9fbc29Smrg
36738c9fbc29SmrgAC_LIBTOOL_CONFIG($1)
36748c9fbc29Smrg
36758c9fbc29SmrgAC_LANG_POP
36768c9fbc29SmrgCC="$lt_save_CC"
36778c9fbc29Smrg])# AC_LIBTOOL_LANG_C_CONFIG
36788c9fbc29Smrg
36798c9fbc29Smrg
36808c9fbc29Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
36818c9fbc29Smrg# --------------------------
36828c9fbc29Smrg# Ensure that the configuration vars for the C compiler are
36838c9fbc29Smrg# suitably defined.  Those variables are subsequently used by
36848c9fbc29Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
36858c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
36868c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
36878c9fbc29Smrg[AC_LANG_PUSH(C++)
36888c9fbc29SmrgAC_REQUIRE([AC_PROG_CXX])
36898c9fbc29SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
36908c9fbc29Smrg
36918c9fbc29Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
36928c9fbc29Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
36938c9fbc29Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
36948c9fbc29Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
36958c9fbc29Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
36968c9fbc29Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
36978c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
36988c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
36998c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
37008c9fbc29Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
37018c9fbc29Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
37028c9fbc29Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
37038c9fbc29Smrg_LT_AC_TAGVAR(module_cmds, $1)=
37048c9fbc29Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
37058c9fbc29Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
37068c9fbc29Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
37078c9fbc29Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
37088c9fbc29Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
37098c9fbc29Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
37108c9fbc29Smrg
37118c9fbc29Smrg# Dependencies to place before and after the object being linked:
37128c9fbc29Smrg_LT_AC_TAGVAR(predep_objects, $1)=
37138c9fbc29Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
37148c9fbc29Smrg_LT_AC_TAGVAR(predeps, $1)=
37158c9fbc29Smrg_LT_AC_TAGVAR(postdeps, $1)=
37168c9fbc29Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
37178c9fbc29Smrg
37188c9fbc29Smrg# Source file extension for C++ test sources.
37198c9fbc29Smrgac_ext=cpp
37208c9fbc29Smrg
37218c9fbc29Smrg# Object file extension for compiled C++ test sources.
37228c9fbc29Smrgobjext=o
37238c9fbc29Smrg_LT_AC_TAGVAR(objext, $1)=$objext
37248c9fbc29Smrg
37258c9fbc29Smrg# Code to be used in simple compile tests
37268c9fbc29Smrglt_simple_compile_test_code="int some_variable = 0;\n"
37278c9fbc29Smrg
37288c9fbc29Smrg# Code to be used in simple link tests
37298c9fbc29Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
37308c9fbc29Smrg
37318c9fbc29Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
37328c9fbc29Smrg_LT_AC_SYS_COMPILER
37338c9fbc29Smrg
37348c9fbc29Smrg# save warnings/boilerplate of simple test code
37358c9fbc29Smrg_LT_COMPILER_BOILERPLATE
37368c9fbc29Smrg_LT_LINKER_BOILERPLATE
37378c9fbc29Smrg
37388c9fbc29Smrg# Allow CC to be a program name with arguments.
37398c9fbc29Smrglt_save_CC=$CC
37408c9fbc29Smrglt_save_LD=$LD
37418c9fbc29Smrglt_save_GCC=$GCC
37428c9fbc29SmrgGCC=$GXX
37438c9fbc29Smrglt_save_with_gnu_ld=$with_gnu_ld
37448c9fbc29Smrglt_save_path_LD=$lt_cv_path_LD
37458c9fbc29Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
37468c9fbc29Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
37478c9fbc29Smrgelse
37488c9fbc29Smrg  $as_unset lt_cv_prog_gnu_ld
37498c9fbc29Smrgfi
37508c9fbc29Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
37518c9fbc29Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
37528c9fbc29Smrgelse
37538c9fbc29Smrg  $as_unset lt_cv_path_LD
37548c9fbc29Smrgfi
37558c9fbc29Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
37568c9fbc29SmrgCC=${CXX-"c++"}
37578c9fbc29Smrgcompiler=$CC
37588c9fbc29Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
37598c9fbc29Smrg_LT_CC_BASENAME([$compiler])
37608c9fbc29Smrg
37618c9fbc29Smrg# We don't want -fno-exception wen compiling C++ code, so set the
37628c9fbc29Smrg# no_builtin_flag separately
37638c9fbc29Smrgif test "$GXX" = yes; then
37648c9fbc29Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
37658c9fbc29Smrgelse
37668c9fbc29Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
37678c9fbc29Smrgfi
37688c9fbc29Smrg
37698c9fbc29Smrgif test "$GXX" = yes; then
37708c9fbc29Smrg  # Set up default GNU C++ configuration
37718c9fbc29Smrg
37728c9fbc29Smrg  AC_PROG_LD
37738c9fbc29Smrg
37748c9fbc29Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
37758c9fbc29Smrg  # archiving commands below assume that GNU ld is being used.
37768c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
37778c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
37788c9fbc29Smrg    _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'
37798c9fbc29Smrg
37808c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
37818c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
37828c9fbc29Smrg
37838c9fbc29Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
37848c9fbc29Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
37858c9fbc29Smrg    #     investigate it a little bit more. (MM)
37868c9fbc29Smrg    wlarc='${wl}'
37878c9fbc29Smrg
37888c9fbc29Smrg    # ancient GNU ld didn't support --whole-archive et. al.
37898c9fbc29Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
37908c9fbc29Smrg	grep 'no-whole-archive' > /dev/null; then
37918c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
37928c9fbc29Smrg    else
37938c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
37948c9fbc29Smrg    fi
37958c9fbc29Smrg  else
37968c9fbc29Smrg    with_gnu_ld=no
37978c9fbc29Smrg    wlarc=
37988c9fbc29Smrg
37998c9fbc29Smrg    # A generic and very simple default shared library creation
38008c9fbc29Smrg    # command for GNU C++ for the case where it uses the native
38018c9fbc29Smrg    # linker, instead of GNU ld.  If possible, this setting should
38028c9fbc29Smrg    # overridden to take advantage of the native linker features on
38038c9fbc29Smrg    # the platform it is being used on.
38048c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
38058c9fbc29Smrg  fi
38068c9fbc29Smrg
38078c9fbc29Smrg  # Commands to make compiler produce verbose output that lists
38088c9fbc29Smrg  # what "hidden" libraries, object files and flags are used when
38098c9fbc29Smrg  # linking a shared library.
38108c9fbc29Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
38118c9fbc29Smrg
38128c9fbc29Smrgelse
38138c9fbc29Smrg  GXX=no
38148c9fbc29Smrg  with_gnu_ld=no
38158c9fbc29Smrg  wlarc=
38168c9fbc29Smrgfi
38178c9fbc29Smrg
38188c9fbc29Smrg# PORTME: fill in a description of your system's C++ link characteristics
38198c9fbc29SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
38208c9fbc29Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
38218c9fbc29Smrgcase $host_os in
38228c9fbc29Smrg  aix3*)
38238c9fbc29Smrg    # FIXME: insert proper C++ library support
38248c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
38258c9fbc29Smrg    ;;
38268c9fbc29Smrg  aix4* | aix5*)
38278c9fbc29Smrg    if test "$host_cpu" = ia64; then
38288c9fbc29Smrg      # On IA64, the linker does run time linking by default, so we don't
38298c9fbc29Smrg      # have to do anything special.
38308c9fbc29Smrg      aix_use_runtimelinking=no
38318c9fbc29Smrg      exp_sym_flag='-Bexport'
38328c9fbc29Smrg      no_entry_flag=""
38338c9fbc29Smrg    else
38348c9fbc29Smrg      aix_use_runtimelinking=no
38358c9fbc29Smrg
38368c9fbc29Smrg      # Test if we are trying to use run time linking or normal
38378c9fbc29Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
38388c9fbc29Smrg      # need to do runtime linking.
38398c9fbc29Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
38408c9fbc29Smrg	for ld_flag in $LDFLAGS; do
38418c9fbc29Smrg	  case $ld_flag in
38428c9fbc29Smrg	  *-brtl*)
38438c9fbc29Smrg	    aix_use_runtimelinking=yes
38448c9fbc29Smrg	    break
38458c9fbc29Smrg	    ;;
38468c9fbc29Smrg	  esac
38478c9fbc29Smrg	done
38488c9fbc29Smrg	;;
38498c9fbc29Smrg      esac
38508c9fbc29Smrg
38518c9fbc29Smrg      exp_sym_flag='-bexport'
38528c9fbc29Smrg      no_entry_flag='-bnoentry'
38538c9fbc29Smrg    fi
38548c9fbc29Smrg
38558c9fbc29Smrg    # When large executables or shared objects are built, AIX ld can
38568c9fbc29Smrg    # have problems creating the table of contents.  If linking a library
38578c9fbc29Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
38588c9fbc29Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
38598c9fbc29Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
38608c9fbc29Smrg
38618c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
38628c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
38638c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
38648c9fbc29Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
38658c9fbc29Smrg
38668c9fbc29Smrg    if test "$GXX" = yes; then
38678c9fbc29Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
38688c9fbc29Smrg      # We only want to do this on AIX 4.2 and lower, the check
38698c9fbc29Smrg      # below for broken collect2 doesn't work under 4.3+
38708c9fbc29Smrg	collect2name=`${CC} -print-prog-name=collect2`
38718c9fbc29Smrg	if test -f "$collect2name" && \
38728c9fbc29Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
38738c9fbc29Smrg	then
38748c9fbc29Smrg	  # We have reworked collect2
38758c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
38768c9fbc29Smrg	else
38778c9fbc29Smrg	  # We have old collect2
38788c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
38798c9fbc29Smrg	  # It fails to find uninstalled libraries when the uninstalled
38808c9fbc29Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
38818c9fbc29Smrg	  # to unsupported forces relinking
38828c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
38838c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
38848c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
38858c9fbc29Smrg	fi
38868c9fbc29Smrg	;;
38878c9fbc29Smrg      esac
38888c9fbc29Smrg      shared_flag='-shared'
38898c9fbc29Smrg      if test "$aix_use_runtimelinking" = yes; then
38908c9fbc29Smrg	shared_flag="$shared_flag "'${wl}-G'
38918c9fbc29Smrg      fi
38928c9fbc29Smrg    else
38938c9fbc29Smrg      # not using gcc
38948c9fbc29Smrg      if test "$host_cpu" = ia64; then
38958c9fbc29Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
38968c9fbc29Smrg	# chokes on -Wl,-G. The following line is correct:
38978c9fbc29Smrg	shared_flag='-G'
38988c9fbc29Smrg      else
38998c9fbc29Smrg	if test "$aix_use_runtimelinking" = yes; then
39008c9fbc29Smrg	  shared_flag='${wl}-G'
39018c9fbc29Smrg	else
39028c9fbc29Smrg	  shared_flag='${wl}-bM:SRE'
39038c9fbc29Smrg	fi
39048c9fbc29Smrg      fi
39058c9fbc29Smrg    fi
39068c9fbc29Smrg
39078c9fbc29Smrg    # It seems that -bexpall does not export symbols beginning with
39088c9fbc29Smrg    # underscore (_), so it is better to generate a list of symbols to export.
39098c9fbc29Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
39108c9fbc29Smrg    if test "$aix_use_runtimelinking" = yes; then
39118c9fbc29Smrg      # Warning - without using the other runtime loading flags (-brtl),
39128c9fbc29Smrg      # -berok will link without error, but may produce a broken library.
39138c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
39148c9fbc29Smrg      # Determine the default libpath from the value encoded in an empty executable.
39158c9fbc29Smrg      _LT_AC_SYS_LIBPATH_AIX
39168c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
39178c9fbc29Smrg
39188c9fbc29Smrg      _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"
39198c9fbc29Smrg     else
39208c9fbc29Smrg      if test "$host_cpu" = ia64; then
39218c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
39228c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
39238c9fbc29Smrg	_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"
39248c9fbc29Smrg      else
39258c9fbc29Smrg	# Determine the default libpath from the value encoded in an empty executable.
39268c9fbc29Smrg	_LT_AC_SYS_LIBPATH_AIX
39278c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
39288c9fbc29Smrg	# Warning - without using the other run time loading flags,
39298c9fbc29Smrg	# -berok will link without error, but may produce a broken library.
39308c9fbc29Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
39318c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
39328c9fbc29Smrg	# Exported symbols can be pulled into shared objects from archives
39338c9fbc29Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
39348c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
39358c9fbc29Smrg	# This is similar to how AIX traditionally builds its shared libraries.
39368c9fbc29Smrg	_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'
39378c9fbc29Smrg      fi
39388c9fbc29Smrg    fi
39398c9fbc29Smrg    ;;
39408c9fbc29Smrg
39418c9fbc29Smrg  beos*)
39428c9fbc29Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
39438c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
39448c9fbc29Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
39458c9fbc29Smrg      # support --undefined.  This deserves some investigation.  FIXME
39468c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
39478c9fbc29Smrg    else
39488c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
39498c9fbc29Smrg    fi
39508c9fbc29Smrg    ;;
39518c9fbc29Smrg
39528c9fbc29Smrg  chorus*)
39538c9fbc29Smrg    case $cc_basename in
39548c9fbc29Smrg      *)
39558c9fbc29Smrg	# FIXME: insert proper C++ library support
39568c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
39578c9fbc29Smrg	;;
39588c9fbc29Smrg    esac
39598c9fbc29Smrg    ;;
39608c9fbc29Smrg
39618c9fbc29Smrg  cygwin* | mingw* | pw32*)
39628c9fbc29Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
39638c9fbc29Smrg    # as there is no search path for DLLs.
39648c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
39658c9fbc29Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
39668c9fbc29Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
39678c9fbc29Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
39688c9fbc29Smrg
39698c9fbc29Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
39708c9fbc29Smrg      _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'
39718c9fbc29Smrg      # If the export-symbols file already is a .def file (1st line
39728c9fbc29Smrg      # is EXPORTS), use it as is; otherwise, prepend...
39738c9fbc29Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
39748c9fbc29Smrg	cp $export_symbols $output_objdir/$soname.def;
39758c9fbc29Smrg      else
39768c9fbc29Smrg	echo EXPORTS > $output_objdir/$soname.def;
39778c9fbc29Smrg	cat $export_symbols >> $output_objdir/$soname.def;
39788c9fbc29Smrg      fi~
39798c9fbc29Smrg      $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'
39808c9fbc29Smrg    else
39818c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
39828c9fbc29Smrg    fi
39838c9fbc29Smrg  ;;
39848c9fbc29Smrg      darwin* | rhapsody*)
39858c9fbc29Smrg        case $host_os in
39868c9fbc29Smrg        rhapsody* | darwin1.[[012]])
39878c9fbc29Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
39888c9fbc29Smrg         ;;
39898c9fbc29Smrg       *) # Darwin 1.3 on
39908c9fbc29Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
39918c9fbc29Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
39928c9fbc29Smrg         else
39938c9fbc29Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
39948c9fbc29Smrg             10.[[012]])
39958c9fbc29Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
39968c9fbc29Smrg               ;;
39978c9fbc29Smrg             10.*)
39988c9fbc29Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
39998c9fbc29Smrg               ;;
40008c9fbc29Smrg           esac
40018c9fbc29Smrg         fi
40028c9fbc29Smrg         ;;
40038c9fbc29Smrg        esac
40048c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
40058c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
40068c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
40078c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
40088c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
40098c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
40108c9fbc29Smrg
40118c9fbc29Smrg    if test "$GXX" = yes ; then
40128c9fbc29Smrg      lt_int_apple_cc_single_mod=no
40138c9fbc29Smrg      output_verbose_link_cmd='echo'
40148c9fbc29Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
40158c9fbc29Smrg       lt_int_apple_cc_single_mod=yes
40168c9fbc29Smrg      fi
40178c9fbc29Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
40188c9fbc29Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
40198c9fbc29Smrg      else
40208c9fbc29Smrg          _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'
40218c9fbc29Smrg        fi
40228c9fbc29Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
40238c9fbc29Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
40248c9fbc29Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
40258c9fbc29Smrg            _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}'
40268c9fbc29Smrg          else
40278c9fbc29Smrg            _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}'
40288c9fbc29Smrg          fi
40298c9fbc29Smrg            _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}'
40308c9fbc29Smrg      else
40318c9fbc29Smrg      case $cc_basename in
40328c9fbc29Smrg        xlc*)
40338c9fbc29Smrg         output_verbose_link_cmd='echo'
40348c9fbc29Smrg          _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'
40358c9fbc29Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
40368c9fbc29Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
40378c9fbc29Smrg          _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}'
40388c9fbc29Smrg          _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}'
40398c9fbc29Smrg          ;;
40408c9fbc29Smrg       *)
40418c9fbc29Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
40428c9fbc29Smrg          ;;
40438c9fbc29Smrg      esac
40448c9fbc29Smrg      fi
40458c9fbc29Smrg        ;;
40468c9fbc29Smrg
40478c9fbc29Smrg  dgux*)
40488c9fbc29Smrg    case $cc_basename in
40498c9fbc29Smrg      ec++*)
40508c9fbc29Smrg	# FIXME: insert proper C++ library support
40518c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
40528c9fbc29Smrg	;;
40538c9fbc29Smrg      ghcx*)
40548c9fbc29Smrg	# Green Hills C++ Compiler
40558c9fbc29Smrg	# FIXME: insert proper C++ library support
40568c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
40578c9fbc29Smrg	;;
40588c9fbc29Smrg      *)
40598c9fbc29Smrg	# FIXME: insert proper C++ library support
40608c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
40618c9fbc29Smrg	;;
40628c9fbc29Smrg    esac
40638c9fbc29Smrg    ;;
40648c9fbc29Smrg  freebsd[[12]]*)
40658c9fbc29Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
40668c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
40678c9fbc29Smrg    ;;
40688c9fbc29Smrg  freebsd-elf*)
40698c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
40708c9fbc29Smrg    ;;
40718c9fbc29Smrg  freebsd* | kfreebsd*-gnu | dragonfly*)
40728c9fbc29Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
40738c9fbc29Smrg    # conventions
40748c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
40758c9fbc29Smrg    ;;
40768c9fbc29Smrg  gnu*)
40778c9fbc29Smrg    ;;
40788c9fbc29Smrg  hpux9*)
40798c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
40808c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
40818c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
40828c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
40838c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
40848c9fbc29Smrg				# but as the default
40858c9fbc29Smrg				# location of the library.
40868c9fbc29Smrg
40878c9fbc29Smrg    case $cc_basename in
40888c9fbc29Smrg    CC*)
40898c9fbc29Smrg      # FIXME: insert proper C++ library support
40908c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
40918c9fbc29Smrg      ;;
40928c9fbc29Smrg    aCC*)
40938c9fbc29Smrg      _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'
40948c9fbc29Smrg      # Commands to make compiler produce verbose output that lists
40958c9fbc29Smrg      # what "hidden" libraries, object files and flags are used when
40968c9fbc29Smrg      # linking a shared library.
40978c9fbc29Smrg      #
40988c9fbc29Smrg      # There doesn't appear to be a way to prevent this compiler from
40998c9fbc29Smrg      # explicitly linking system object files so we need to strip them
41008c9fbc29Smrg      # from the output so that they don't get included in the library
41018c9fbc29Smrg      # dependencies.
41028c9fbc29Smrg      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'
41038c9fbc29Smrg      ;;
41048c9fbc29Smrg    *)
41058c9fbc29Smrg      if test "$GXX" = yes; then
41068c9fbc29Smrg        _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'
41078c9fbc29Smrg      else
41088c9fbc29Smrg        # FIXME: insert proper C++ library support
41098c9fbc29Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
41108c9fbc29Smrg      fi
41118c9fbc29Smrg      ;;
41128c9fbc29Smrg    esac
41138c9fbc29Smrg    ;;
41148c9fbc29Smrg  hpux10*|hpux11*)
41158c9fbc29Smrg    if test $with_gnu_ld = no; then
41168c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
41178c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
41188c9fbc29Smrg
41198c9fbc29Smrg      case $host_cpu in
41208c9fbc29Smrg      hppa*64*|ia64*)
41218c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
41228c9fbc29Smrg        ;;
41238c9fbc29Smrg      *)
41248c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
41258c9fbc29Smrg        ;;
41268c9fbc29Smrg      esac
41278c9fbc29Smrg    fi
41288c9fbc29Smrg    case $host_cpu in
41298c9fbc29Smrg    hppa*64*|ia64*)
41308c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
41318c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
41328c9fbc29Smrg      ;;
41338c9fbc29Smrg    *)
41348c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
41358c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
41368c9fbc29Smrg					      # but as the default
41378c9fbc29Smrg					      # location of the library.
41388c9fbc29Smrg      ;;
41398c9fbc29Smrg    esac
41408c9fbc29Smrg
41418c9fbc29Smrg    case $cc_basename in
41428c9fbc29Smrg      CC*)
41438c9fbc29Smrg	# FIXME: insert proper C++ library support
41448c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
41458c9fbc29Smrg	;;
41468c9fbc29Smrg      aCC*)
41478c9fbc29Smrg	case $host_cpu in
41488c9fbc29Smrg	hppa*64*)
41498c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
41508c9fbc29Smrg	  ;;
41518c9fbc29Smrg	ia64*)
41528c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
41538c9fbc29Smrg	  ;;
41548c9fbc29Smrg	*)
41558c9fbc29Smrg	  _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'
41568c9fbc29Smrg	  ;;
41578c9fbc29Smrg	esac
41588c9fbc29Smrg	# Commands to make compiler produce verbose output that lists
41598c9fbc29Smrg	# what "hidden" libraries, object files and flags are used when
41608c9fbc29Smrg	# linking a shared library.
41618c9fbc29Smrg	#
41628c9fbc29Smrg	# There doesn't appear to be a way to prevent this compiler from
41638c9fbc29Smrg	# explicitly linking system object files so we need to strip them
41648c9fbc29Smrg	# from the output so that they don't get included in the library
41658c9fbc29Smrg	# dependencies.
41668c9fbc29Smrg	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'
41678c9fbc29Smrg	;;
41688c9fbc29Smrg      *)
41698c9fbc29Smrg	if test "$GXX" = yes; then
41708c9fbc29Smrg	  if test $with_gnu_ld = no; then
41718c9fbc29Smrg	    case $host_cpu in
41728c9fbc29Smrg	    hppa*64*)
41738c9fbc29Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
41748c9fbc29Smrg	      ;;
41758c9fbc29Smrg	    ia64*)
41768c9fbc29Smrg	      _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'
41778c9fbc29Smrg	      ;;
41788c9fbc29Smrg	    *)
41798c9fbc29Smrg	      _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'
41808c9fbc29Smrg	      ;;
41818c9fbc29Smrg	    esac
41828c9fbc29Smrg	  fi
41838c9fbc29Smrg	else
41848c9fbc29Smrg	  # FIXME: insert proper C++ library support
41858c9fbc29Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
41868c9fbc29Smrg	fi
41878c9fbc29Smrg	;;
41888c9fbc29Smrg    esac
41898c9fbc29Smrg    ;;
41908c9fbc29Smrg  interix3*)
41918c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
41928c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
41938c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
41948c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
41958c9fbc29Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
41968c9fbc29Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
41978c9fbc29Smrg    # default) and relocated if they conflict, which is a slow very memory
41988c9fbc29Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
41998c9fbc29Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
42008c9fbc29Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
42018c9fbc29Smrg    _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'
42028c9fbc29Smrg    _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'
42038c9fbc29Smrg    ;;
42048c9fbc29Smrg  irix5* | irix6*)
42058c9fbc29Smrg    case $cc_basename in
42068c9fbc29Smrg      CC*)
42078c9fbc29Smrg	# SGI C++
42088c9fbc29Smrg	_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'
42098c9fbc29Smrg
42108c9fbc29Smrg	# Archives containing C++ object files must be created using
42118c9fbc29Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
42128c9fbc29Smrg	# necessary to make sure instantiated templates are included
42138c9fbc29Smrg	# in the archive.
42148c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
42158c9fbc29Smrg	;;
42168c9fbc29Smrg      *)
42178c9fbc29Smrg	if test "$GXX" = yes; then
42188c9fbc29Smrg	  if test "$with_gnu_ld" = no; then
42198c9fbc29Smrg	    _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'
42208c9fbc29Smrg	  else
42218c9fbc29Smrg	    _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'
42228c9fbc29Smrg	  fi
42238c9fbc29Smrg	fi
42248c9fbc29Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
42258c9fbc29Smrg	;;
42268c9fbc29Smrg    esac
42278c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
42288c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
42298c9fbc29Smrg    ;;
42308c9fbc29Smrg  linux*)
42318c9fbc29Smrg    case $cc_basename in
42328c9fbc29Smrg      KCC*)
42338c9fbc29Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
42348c9fbc29Smrg
42358c9fbc29Smrg	# KCC will only create a shared library if the output file
42368c9fbc29Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
42378c9fbc29Smrg	# to its proper name (with version) after linking.
42388c9fbc29Smrg	_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'
42398c9fbc29Smrg	_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'
42408c9fbc29Smrg	# Commands to make compiler produce verbose output that lists
42418c9fbc29Smrg	# what "hidden" libraries, object files and flags are used when
42428c9fbc29Smrg	# linking a shared library.
42438c9fbc29Smrg	#
42448c9fbc29Smrg	# There doesn't appear to be a way to prevent this compiler from
42458c9fbc29Smrg	# explicitly linking system object files so we need to strip them
42468c9fbc29Smrg	# from the output so that they don't get included in the library
42478c9fbc29Smrg	# dependencies.
42488c9fbc29Smrg	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'
42498c9fbc29Smrg
42508c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
42518c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
42528c9fbc29Smrg
42538c9fbc29Smrg	# Archives containing C++ object files must be created using
42548c9fbc29Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
42558c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
42568c9fbc29Smrg	;;
42578c9fbc29Smrg      icpc*)
42588c9fbc29Smrg	# Intel C++
42598c9fbc29Smrg	with_gnu_ld=yes
42608c9fbc29Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
42618c9fbc29Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
42628c9fbc29Smrg	# earlier do not add the objects themselves.
42638c9fbc29Smrg	case `$CC -V 2>&1` in
42648c9fbc29Smrg	*"Version 7."*)
42658c9fbc29Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
42668c9fbc29Smrg  	  _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'
42678c9fbc29Smrg	  ;;
42688c9fbc29Smrg	*)  # Version 8.0 or newer
42698c9fbc29Smrg	  tmp_idyn=
42708c9fbc29Smrg	  case $host_cpu in
42718c9fbc29Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
42728c9fbc29Smrg	  esac
42738c9fbc29Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
42748c9fbc29Smrg	  _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'
42758c9fbc29Smrg	  ;;
42768c9fbc29Smrg	esac
42778c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
42788c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
42798c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
42808c9fbc29Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
42818c9fbc29Smrg	;;
42828c9fbc29Smrg      pgCC*)
42838c9fbc29Smrg        # Portland Group C++ compiler
42848c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
42858c9fbc29Smrg  	_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'
42868c9fbc29Smrg
42878c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
42888c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
42898c9fbc29Smrg	_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'
42908c9fbc29Smrg        ;;
42918c9fbc29Smrg      cxx*)
42928c9fbc29Smrg	# Compaq C++
42938c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
42948c9fbc29Smrg	_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'
42958c9fbc29Smrg
42968c9fbc29Smrg	runpath_var=LD_RUN_PATH
42978c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
42988c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
42998c9fbc29Smrg
43008c9fbc29Smrg	# Commands to make compiler produce verbose output that lists
43018c9fbc29Smrg	# what "hidden" libraries, object files and flags are used when
43028c9fbc29Smrg	# linking a shared library.
43038c9fbc29Smrg	#
43048c9fbc29Smrg	# There doesn't appear to be a way to prevent this compiler from
43058c9fbc29Smrg	# explicitly linking system object files so we need to strip them
43068c9fbc29Smrg	# from the output so that they don't get included in the library
43078c9fbc29Smrg	# dependencies.
43088c9fbc29Smrg	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'
43098c9fbc29Smrg	;;
43108c9fbc29Smrg    esac
43118c9fbc29Smrg    ;;
43128c9fbc29Smrg  lynxos*)
43138c9fbc29Smrg    # FIXME: insert proper C++ library support
43148c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
43158c9fbc29Smrg    ;;
43168c9fbc29Smrg  m88k*)
43178c9fbc29Smrg    # FIXME: insert proper C++ library support
43188c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
43198c9fbc29Smrg    ;;
43208c9fbc29Smrg  mvs*)
43218c9fbc29Smrg    case $cc_basename in
43228c9fbc29Smrg      cxx*)
43238c9fbc29Smrg	# FIXME: insert proper C++ library support
43248c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
43258c9fbc29Smrg	;;
43268c9fbc29Smrg      *)
43278c9fbc29Smrg	# FIXME: insert proper C++ library support
43288c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
43298c9fbc29Smrg	;;
43308c9fbc29Smrg    esac
43318c9fbc29Smrg    ;;
43328c9fbc29Smrg  netbsd*)
43338c9fbc29Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
43348c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
43358c9fbc29Smrg      wlarc=
43368c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
43378c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
43388c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
43398c9fbc29Smrg    fi
43408c9fbc29Smrg    # Workaround some broken pre-1.5 toolchains
43418c9fbc29Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
43428c9fbc29Smrg    ;;
43438c9fbc29Smrg  openbsd2*)
43448c9fbc29Smrg    # C++ shared libraries are fairly broken
43458c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
43468c9fbc29Smrg    ;;
43478c9fbc29Smrg  openbsd*)
43488c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
43498c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
43508c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
43518c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
43528c9fbc29Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
43538c9fbc29Smrg      _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'
43548c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
43558c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
43568c9fbc29Smrg    fi
43578c9fbc29Smrg    output_verbose_link_cmd='echo'
43588c9fbc29Smrg    ;;
43598c9fbc29Smrg  osf3*)
43608c9fbc29Smrg    case $cc_basename in
43618c9fbc29Smrg      KCC*)
43628c9fbc29Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
43638c9fbc29Smrg
43648c9fbc29Smrg	# KCC will only create a shared library if the output file
43658c9fbc29Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
43668c9fbc29Smrg	# to its proper name (with version) after linking.
43678c9fbc29Smrg	_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'
43688c9fbc29Smrg
43698c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
43708c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
43718c9fbc29Smrg
43728c9fbc29Smrg	# Archives containing C++ object files must be created using
43738c9fbc29Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
43748c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
43758c9fbc29Smrg
43768c9fbc29Smrg	;;
43778c9fbc29Smrg      RCC*)
43788c9fbc29Smrg	# Rational C++ 2.4.1
43798c9fbc29Smrg	# FIXME: insert proper C++ library support
43808c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
43818c9fbc29Smrg	;;
43828c9fbc29Smrg      cxx*)
43838c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
43848c9fbc29Smrg	_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'
43858c9fbc29Smrg
43868c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
43878c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
43888c9fbc29Smrg
43898c9fbc29Smrg	# Commands to make compiler produce verbose output that lists
43908c9fbc29Smrg	# what "hidden" libraries, object files and flags are used when
43918c9fbc29Smrg	# linking a shared library.
43928c9fbc29Smrg	#
43938c9fbc29Smrg	# There doesn't appear to be a way to prevent this compiler from
43948c9fbc29Smrg	# explicitly linking system object files so we need to strip them
43958c9fbc29Smrg	# from the output so that they don't get included in the library
43968c9fbc29Smrg	# dependencies.
43978c9fbc29Smrg	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'
43988c9fbc29Smrg	;;
43998c9fbc29Smrg      *)
44008c9fbc29Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
44018c9fbc29Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
44028c9fbc29Smrg	  _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'
44038c9fbc29Smrg
44048c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
44058c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
44068c9fbc29Smrg
44078c9fbc29Smrg	  # Commands to make compiler produce verbose output that lists
44088c9fbc29Smrg	  # what "hidden" libraries, object files and flags are used when
44098c9fbc29Smrg	  # linking a shared library.
44108c9fbc29Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
44118c9fbc29Smrg
44128c9fbc29Smrg	else
44138c9fbc29Smrg	  # FIXME: insert proper C++ library support
44148c9fbc29Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
44158c9fbc29Smrg	fi
44168c9fbc29Smrg	;;
44178c9fbc29Smrg    esac
44188c9fbc29Smrg    ;;
44198c9fbc29Smrg  osf4* | osf5*)
44208c9fbc29Smrg    case $cc_basename in
44218c9fbc29Smrg      KCC*)
44228c9fbc29Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
44238c9fbc29Smrg
44248c9fbc29Smrg	# KCC will only create a shared library if the output file
44258c9fbc29Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
44268c9fbc29Smrg	# to its proper name (with version) after linking.
44278c9fbc29Smrg	_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'
44288c9fbc29Smrg
44298c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
44308c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
44318c9fbc29Smrg
44328c9fbc29Smrg	# Archives containing C++ object files must be created using
44338c9fbc29Smrg	# the KAI C++ compiler.
44348c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
44358c9fbc29Smrg	;;
44368c9fbc29Smrg      RCC*)
44378c9fbc29Smrg	# Rational C++ 2.4.1
44388c9fbc29Smrg	# FIXME: insert proper C++ library support
44398c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
44408c9fbc29Smrg	;;
44418c9fbc29Smrg      cxx*)
44428c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
44438c9fbc29Smrg	_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'
44448c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
44458c9fbc29Smrg	  echo "-hidden">> $lib.exp~
44468c9fbc29Smrg	  $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~
44478c9fbc29Smrg	  $rm $lib.exp'
44488c9fbc29Smrg
44498c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
44508c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
44518c9fbc29Smrg
44528c9fbc29Smrg	# Commands to make compiler produce verbose output that lists
44538c9fbc29Smrg	# what "hidden" libraries, object files and flags are used when
44548c9fbc29Smrg	# linking a shared library.
44558c9fbc29Smrg	#
44568c9fbc29Smrg	# There doesn't appear to be a way to prevent this compiler from
44578c9fbc29Smrg	# explicitly linking system object files so we need to strip them
44588c9fbc29Smrg	# from the output so that they don't get included in the library
44598c9fbc29Smrg	# dependencies.
44608c9fbc29Smrg	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'
44618c9fbc29Smrg	;;
44628c9fbc29Smrg      *)
44638c9fbc29Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
44648c9fbc29Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
44658c9fbc29Smrg	 _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'
44668c9fbc29Smrg
44678c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
44688c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
44698c9fbc29Smrg
44708c9fbc29Smrg	  # Commands to make compiler produce verbose output that lists
44718c9fbc29Smrg	  # what "hidden" libraries, object files and flags are used when
44728c9fbc29Smrg	  # linking a shared library.
44738c9fbc29Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
44748c9fbc29Smrg
44758c9fbc29Smrg	else
44768c9fbc29Smrg	  # FIXME: insert proper C++ library support
44778c9fbc29Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
44788c9fbc29Smrg	fi
44798c9fbc29Smrg	;;
44808c9fbc29Smrg    esac
44818c9fbc29Smrg    ;;
44828c9fbc29Smrg  psos*)
44838c9fbc29Smrg    # FIXME: insert proper C++ library support
44848c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
44858c9fbc29Smrg    ;;
44868c9fbc29Smrg  sunos4*)
44878c9fbc29Smrg    case $cc_basename in
44888c9fbc29Smrg      CC*)
44898c9fbc29Smrg	# Sun C++ 4.x
44908c9fbc29Smrg	# FIXME: insert proper C++ library support
44918c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
44928c9fbc29Smrg	;;
44938c9fbc29Smrg      lcc*)
44948c9fbc29Smrg	# Lucid
44958c9fbc29Smrg	# FIXME: insert proper C++ library support
44968c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
44978c9fbc29Smrg	;;
44988c9fbc29Smrg      *)
44998c9fbc29Smrg	# FIXME: insert proper C++ library support
45008c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
45018c9fbc29Smrg	;;
45028c9fbc29Smrg    esac
45038c9fbc29Smrg    ;;
45048c9fbc29Smrg  solaris*)
45058c9fbc29Smrg    case $cc_basename in
45068c9fbc29Smrg      CC*)
45078c9fbc29Smrg	# Sun C++ 4.2, 5.x and Centerline C++
45088c9fbc29Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
45098c9fbc29Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
45108c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
45118c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
45128c9fbc29Smrg	$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'
45138c9fbc29Smrg
45148c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
45158c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
45168c9fbc29Smrg	case $host_os in
45178c9fbc29Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
45188c9fbc29Smrg	  *)
45198c9fbc29Smrg	    # The C++ compiler is used as linker so we must use $wl
45208c9fbc29Smrg	    # flag to pass the commands to the underlying system
45218c9fbc29Smrg	    # linker. We must also pass each convience library through
45228c9fbc29Smrg	    # to the system linker between allextract/defaultextract.
45238c9fbc29Smrg	    # The C++ compiler will combine linker options so we
45248c9fbc29Smrg	    # cannot just pass the convience library names through
45258c9fbc29Smrg	    # without $wl.
45268c9fbc29Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
45278c9fbc29Smrg	    _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'
45288c9fbc29Smrg	    ;;
45298c9fbc29Smrg	esac
45308c9fbc29Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
45318c9fbc29Smrg
45328c9fbc29Smrg	output_verbose_link_cmd='echo'
45338c9fbc29Smrg
45348c9fbc29Smrg	# Archives containing C++ object files must be created using
45358c9fbc29Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
45368c9fbc29Smrg	# necessary to make sure instantiated templates are included
45378c9fbc29Smrg	# in the archive.
45388c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
45398c9fbc29Smrg	;;
45408c9fbc29Smrg      gcx*)
45418c9fbc29Smrg	# Green Hills C++ Compiler
45428c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
45438c9fbc29Smrg
45448c9fbc29Smrg	# The C++ compiler must be used to create the archive.
45458c9fbc29Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
45468c9fbc29Smrg	;;
45478c9fbc29Smrg      *)
45488c9fbc29Smrg	# GNU C++ compiler with Solaris linker
45498c9fbc29Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
45508c9fbc29Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
45518c9fbc29Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
45528c9fbc29Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
45538c9fbc29Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
45548c9fbc29Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
45558c9fbc29Smrg
45568c9fbc29Smrg	    # Commands to make compiler produce verbose output that lists
45578c9fbc29Smrg	    # what "hidden" libraries, object files and flags are used when
45588c9fbc29Smrg	    # linking a shared library.
45598c9fbc29Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
45608c9fbc29Smrg	  else
45618c9fbc29Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
45628c9fbc29Smrg	    # platform.
45638c9fbc29Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
45648c9fbc29Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
45658c9fbc29Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
45668c9fbc29Smrg
45678c9fbc29Smrg	    # Commands to make compiler produce verbose output that lists
45688c9fbc29Smrg	    # what "hidden" libraries, object files and flags are used when
45698c9fbc29Smrg	    # linking a shared library.
45708c9fbc29Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
45718c9fbc29Smrg	  fi
45728c9fbc29Smrg
45738c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
45748c9fbc29Smrg	fi
45758c9fbc29Smrg	;;
45768c9fbc29Smrg    esac
45778c9fbc29Smrg    ;;
45788c9fbc29Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
45798c9fbc29Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
45808c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
45818c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
45828c9fbc29Smrg    runpath_var='LD_RUN_PATH'
45838c9fbc29Smrg
45848c9fbc29Smrg    case $cc_basename in
45858c9fbc29Smrg      CC*)
45868c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
45878c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
45888c9fbc29Smrg	;;
45898c9fbc29Smrg      *)
45908c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
45918c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
45928c9fbc29Smrg	;;
45938c9fbc29Smrg    esac
45948c9fbc29Smrg    ;;
45958c9fbc29Smrg  sysv5* | sco3.2v5* | sco5v6*)
45968c9fbc29Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
45978c9fbc29Smrg    # link with -lc, and that would cause any symbols used from libc to
45988c9fbc29Smrg    # always be unresolved, which means just about no library would
45998c9fbc29Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
46008c9fbc29Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
46018c9fbc29Smrg    # as -z defs.
46028c9fbc29Smrg    # For security reasons, it is highly recommended that you always
46038c9fbc29Smrg    # use absolute paths for naming shared libraries, and exclude the
46048c9fbc29Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
46058c9fbc29Smrg    # requires that you compile everything twice, which is a pain.
46068c9fbc29Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
46078c9fbc29Smrg    # non-empty value in the environment.  Most likely only useful for
46088c9fbc29Smrg    # creating official distributions of packages.
46098c9fbc29Smrg    # This is a hack until libtool officially supports absolute path
46108c9fbc29Smrg    # names for shared libraries.
46118c9fbc29Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
46128c9fbc29Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
46138c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
46148c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
46158c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
46168c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
46178c9fbc29Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
46188c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
46198c9fbc29Smrg    runpath_var='LD_RUN_PATH'
46208c9fbc29Smrg
46218c9fbc29Smrg    case $cc_basename in
46228c9fbc29Smrg      CC*)
46238c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
46248c9fbc29Smrg	_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'
46258c9fbc29Smrg	;;
46268c9fbc29Smrg      *)
46278c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
46288c9fbc29Smrg	_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'
46298c9fbc29Smrg	;;
46308c9fbc29Smrg    esac
46318c9fbc29Smrg    ;;
46328c9fbc29Smrg  tandem*)
46338c9fbc29Smrg    case $cc_basename in
46348c9fbc29Smrg      NCC*)
46358c9fbc29Smrg	# NonStop-UX NCC 3.20
46368c9fbc29Smrg	# FIXME: insert proper C++ library support
46378c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
46388c9fbc29Smrg	;;
46398c9fbc29Smrg      *)
46408c9fbc29Smrg	# FIXME: insert proper C++ library support
46418c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
46428c9fbc29Smrg	;;
46438c9fbc29Smrg    esac
46448c9fbc29Smrg    ;;
46458c9fbc29Smrg  vxworks*)
46468c9fbc29Smrg    # FIXME: insert proper C++ library support
46478c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
46488c9fbc29Smrg    ;;
46498c9fbc29Smrg  *)
46508c9fbc29Smrg    # FIXME: insert proper C++ library support
46518c9fbc29Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
46528c9fbc29Smrg    ;;
46538c9fbc29Smrgesac
46548c9fbc29SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
46558c9fbc29Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
46568c9fbc29Smrg
46578c9fbc29Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
46588c9fbc29Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
46598c9fbc29Smrg
46608c9fbc29SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
46618c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
46628c9fbc29SmrgAC_LIBTOOL_PROG_CC_C_O($1)
46638c9fbc29SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
46648c9fbc29SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
46658c9fbc29SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
46668c9fbc29SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
46678c9fbc29Smrg
46688c9fbc29SmrgAC_LIBTOOL_CONFIG($1)
46698c9fbc29Smrg
46708c9fbc29SmrgAC_LANG_POP
46718c9fbc29SmrgCC=$lt_save_CC
46728c9fbc29SmrgLDCXX=$LD
46738c9fbc29SmrgLD=$lt_save_LD
46748c9fbc29SmrgGCC=$lt_save_GCC
46758c9fbc29Smrgwith_gnu_ldcxx=$with_gnu_ld
46768c9fbc29Smrgwith_gnu_ld=$lt_save_with_gnu_ld
46778c9fbc29Smrglt_cv_path_LDCXX=$lt_cv_path_LD
46788c9fbc29Smrglt_cv_path_LD=$lt_save_path_LD
46798c9fbc29Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
46808c9fbc29Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
46818c9fbc29Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
46828c9fbc29Smrg
46838c9fbc29Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
46848c9fbc29Smrg# ------------------------------------
46858c9fbc29Smrg# Figure out "hidden" library dependencies from verbose
46868c9fbc29Smrg# compiler output when linking a shared library.
46878c9fbc29Smrg# Parse the compiler output and extract the necessary
46888c9fbc29Smrg# objects, libraries and library flags.
46898c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
46908c9fbc29Smrgdnl we can't use the lt_simple_compile_test_code here,
46918c9fbc29Smrgdnl because it contains code intended for an executable,
46928c9fbc29Smrgdnl not a library.  It's possible we should let each
46938c9fbc29Smrgdnl tag define a new lt_????_link_test_code variable,
46948c9fbc29Smrgdnl but it's only used here...
46958c9fbc29Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
46968c9fbc29Smrgint a;
46978c9fbc29Smrgvoid foo (void) { a = 0; }
46988c9fbc29SmrgEOF
46998c9fbc29Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
47008c9fbc29Smrgclass Foo
47018c9fbc29Smrg{
47028c9fbc29Smrgpublic:
47038c9fbc29Smrg  Foo (void) { a = 0; }
47048c9fbc29Smrgprivate:
47058c9fbc29Smrg  int a;
47068c9fbc29Smrg};
47078c9fbc29SmrgEOF
47088c9fbc29Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
47098c9fbc29Smrg      subroutine foo
47108c9fbc29Smrg      implicit none
47118c9fbc29Smrg      integer*4 a
47128c9fbc29Smrg      a=0
47138c9fbc29Smrg      return
47148c9fbc29Smrg      end
47158c9fbc29SmrgEOF
47168c9fbc29Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
47178c9fbc29Smrgpublic class foo {
47188c9fbc29Smrg  private int a;
47198c9fbc29Smrg  public void bar (void) {
47208c9fbc29Smrg    a = 0;
47218c9fbc29Smrg  }
47228c9fbc29Smrg};
47238c9fbc29SmrgEOF
47248c9fbc29Smrg])
47258c9fbc29Smrgdnl Parse the compiler output and extract the necessary
47268c9fbc29Smrgdnl objects, libraries and library flags.
47278c9fbc29Smrgif AC_TRY_EVAL(ac_compile); then
47288c9fbc29Smrg  # Parse the compiler output and extract the necessary
47298c9fbc29Smrg  # objects, libraries and library flags.
47308c9fbc29Smrg
47318c9fbc29Smrg  # Sentinel used to keep track of whether or not we are before
47328c9fbc29Smrg  # the conftest object file.
47338c9fbc29Smrg  pre_test_object_deps_done=no
47348c9fbc29Smrg
47358c9fbc29Smrg  # The `*' in the case matches for architectures that use `case' in
47368c9fbc29Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
47378c9fbc29Smrg  # eval without this substitution.
47388c9fbc29Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
47398c9fbc29Smrg
47408c9fbc29Smrg  for p in `eval $output_verbose_link_cmd`; do
47418c9fbc29Smrg    case $p in
47428c9fbc29Smrg
47438c9fbc29Smrg    -L* | -R* | -l*)
47448c9fbc29Smrg       # Some compilers place space between "-{L,R}" and the path.
47458c9fbc29Smrg       # Remove the space.
47468c9fbc29Smrg       if test $p = "-L" \
47478c9fbc29Smrg	  || test $p = "-R"; then
47488c9fbc29Smrg	 prev=$p
47498c9fbc29Smrg	 continue
47508c9fbc29Smrg       else
47518c9fbc29Smrg	 prev=
47528c9fbc29Smrg       fi
47538c9fbc29Smrg
47548c9fbc29Smrg       if test "$pre_test_object_deps_done" = no; then
47558c9fbc29Smrg	 case $p in
47568c9fbc29Smrg	 -L* | -R*)
47578c9fbc29Smrg	   # Internal compiler library paths should come after those
47588c9fbc29Smrg	   # provided the user.  The postdeps already come after the
47598c9fbc29Smrg	   # user supplied libs so there is no need to process them.
47608c9fbc29Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
47618c9fbc29Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
47628c9fbc29Smrg	   else
47638c9fbc29Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
47648c9fbc29Smrg	   fi
47658c9fbc29Smrg	   ;;
47668c9fbc29Smrg	 # The "-l" case would never come before the object being
47678c9fbc29Smrg	 # linked, so don't bother handling this case.
47688c9fbc29Smrg	 esac
47698c9fbc29Smrg       else
47708c9fbc29Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
47718c9fbc29Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
47728c9fbc29Smrg	 else
47738c9fbc29Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
47748c9fbc29Smrg	 fi
47758c9fbc29Smrg       fi
47768c9fbc29Smrg       ;;
47778c9fbc29Smrg
47788c9fbc29Smrg    *.$objext)
47798c9fbc29Smrg       # This assumes that the test object file only shows up
47808c9fbc29Smrg       # once in the compiler output.
47818c9fbc29Smrg       if test "$p" = "conftest.$objext"; then
47828c9fbc29Smrg	 pre_test_object_deps_done=yes
47838c9fbc29Smrg	 continue
47848c9fbc29Smrg       fi
47858c9fbc29Smrg
47868c9fbc29Smrg       if test "$pre_test_object_deps_done" = no; then
47878c9fbc29Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
47888c9fbc29Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
47898c9fbc29Smrg	 else
47908c9fbc29Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
47918c9fbc29Smrg	 fi
47928c9fbc29Smrg       else
47938c9fbc29Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
47948c9fbc29Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
47958c9fbc29Smrg	 else
47968c9fbc29Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
47978c9fbc29Smrg	 fi
47988c9fbc29Smrg       fi
47998c9fbc29Smrg       ;;
48008c9fbc29Smrg
48018c9fbc29Smrg    *) ;; # Ignore the rest.
48028c9fbc29Smrg
48038c9fbc29Smrg    esac
48048c9fbc29Smrg  done
48058c9fbc29Smrg
48068c9fbc29Smrg  # Clean up.
48078c9fbc29Smrg  rm -f a.out a.exe
48088c9fbc29Smrgelse
48098c9fbc29Smrg  echo "libtool.m4: error: problem compiling $1 test program"
48108c9fbc29Smrgfi
48118c9fbc29Smrg
48128c9fbc29Smrg$rm -f confest.$objext
48138c9fbc29Smrg
48148c9fbc29Smrg# PORTME: override above test on systems where it is broken
48158c9fbc29Smrgifelse([$1],[CXX],
48168c9fbc29Smrg[case $host_os in
48178c9fbc29Smrginterix3*)
48188c9fbc29Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
48198c9fbc29Smrg  # hack all around it, let's just trust "g++" to DTRT.
48208c9fbc29Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
48218c9fbc29Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
48228c9fbc29Smrg  _LT_AC_TAGVAR(postdeps,$1)=
48238c9fbc29Smrg  ;;
48248c9fbc29Smrg
48258c9fbc29Smrgsolaris*)
48268c9fbc29Smrg  case $cc_basename in
48278c9fbc29Smrg  CC*)
48288c9fbc29Smrg    # Adding this requires a known-good setup of shared libraries for
48298c9fbc29Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
48308c9fbc29Smrg    # archive will be linked into the output, leading to subtle bugs.
48318c9fbc29Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
48328c9fbc29Smrg    ;;
48338c9fbc29Smrg  esac
48348c9fbc29Smrg  ;;
48358c9fbc29Smrgesac
48368c9fbc29Smrg])
48378c9fbc29Smrg
48388c9fbc29Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
48398c9fbc29Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
48408c9fbc29Smrgesac
48418c9fbc29Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
48428c9fbc29Smrg
48438c9fbc29Smrg# AC_LIBTOOL_LANG_F77_CONFIG
48448c9fbc29Smrg# --------------------------
48458c9fbc29Smrg# Ensure that the configuration vars for the C compiler are
48468c9fbc29Smrg# suitably defined.  Those variables are subsequently used by
48478c9fbc29Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
48488c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
48498c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
48508c9fbc29Smrg[AC_REQUIRE([AC_PROG_F77])
48518c9fbc29SmrgAC_LANG_PUSH(Fortran 77)
48528c9fbc29Smrg
48538c9fbc29Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
48548c9fbc29Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
48558c9fbc29Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
48568c9fbc29Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
48578c9fbc29Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
48588c9fbc29Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
48598c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
48608c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
48618c9fbc29Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
48628c9fbc29Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
48638c9fbc29Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
48648c9fbc29Smrg_LT_AC_TAGVAR(module_cmds, $1)=
48658c9fbc29Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
48668c9fbc29Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
48678c9fbc29Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
48688c9fbc29Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
48698c9fbc29Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
48708c9fbc29Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
48718c9fbc29Smrg
48728c9fbc29Smrg# Source file extension for f77 test sources.
48738c9fbc29Smrgac_ext=f
48748c9fbc29Smrg
48758c9fbc29Smrg# Object file extension for compiled f77 test sources.
48768c9fbc29Smrgobjext=o
48778c9fbc29Smrg_LT_AC_TAGVAR(objext, $1)=$objext
48788c9fbc29Smrg
48798c9fbc29Smrg# Code to be used in simple compile tests
48808c9fbc29Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
48818c9fbc29Smrg
48828c9fbc29Smrg# Code to be used in simple link tests
48838c9fbc29Smrglt_simple_link_test_code="      program t\n      end\n"
48848c9fbc29Smrg
48858c9fbc29Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
48868c9fbc29Smrg_LT_AC_SYS_COMPILER
48878c9fbc29Smrg
48888c9fbc29Smrg# save warnings/boilerplate of simple test code
48898c9fbc29Smrg_LT_COMPILER_BOILERPLATE
48908c9fbc29Smrg_LT_LINKER_BOILERPLATE
48918c9fbc29Smrg
48928c9fbc29Smrg# Allow CC to be a program name with arguments.
48938c9fbc29Smrglt_save_CC="$CC"
48948c9fbc29SmrgCC=${F77-"f77"}
48958c9fbc29Smrgcompiler=$CC
48968c9fbc29Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
48978c9fbc29Smrg_LT_CC_BASENAME([$compiler])
48988c9fbc29Smrg
48998c9fbc29SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
49008c9fbc29SmrgAC_MSG_RESULT([$can_build_shared])
49018c9fbc29Smrg
49028c9fbc29SmrgAC_MSG_CHECKING([whether to build shared libraries])
49038c9fbc29Smrgtest "$can_build_shared" = "no" && enable_shared=no
49048c9fbc29Smrg
49058c9fbc29Smrg# On AIX, shared libraries and static libraries use the same namespace, and
49068c9fbc29Smrg# are all built from PIC.
49078c9fbc29Smrgcase $host_os in
49088c9fbc29Smrgaix3*)
49098c9fbc29Smrg  test "$enable_shared" = yes && enable_static=no
49108c9fbc29Smrg  if test -n "$RANLIB"; then
49118c9fbc29Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
49128c9fbc29Smrg    postinstall_cmds='$RANLIB $lib'
49138c9fbc29Smrg  fi
49148c9fbc29Smrg  ;;
49158c9fbc29Smrgaix4* | aix5*)
49168c9fbc29Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
49178c9fbc29Smrg    test "$enable_shared" = yes && enable_static=no
49188c9fbc29Smrg  fi
49198c9fbc29Smrg  ;;
49208c9fbc29Smrgesac
49218c9fbc29SmrgAC_MSG_RESULT([$enable_shared])
49228c9fbc29Smrg
49238c9fbc29SmrgAC_MSG_CHECKING([whether to build static libraries])
49248c9fbc29Smrg# Make sure either enable_shared or enable_static is yes.
49258c9fbc29Smrgtest "$enable_shared" = yes || enable_static=yes
49268c9fbc29SmrgAC_MSG_RESULT([$enable_static])
49278c9fbc29Smrg
49288c9fbc29Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
49298c9fbc29Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
49308c9fbc29Smrg
49318c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
49328c9fbc29SmrgAC_LIBTOOL_PROG_CC_C_O($1)
49338c9fbc29SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
49348c9fbc29SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
49358c9fbc29SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
49368c9fbc29SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
49378c9fbc29Smrg
49388c9fbc29SmrgAC_LIBTOOL_CONFIG($1)
49398c9fbc29Smrg
49408c9fbc29SmrgAC_LANG_POP
49418c9fbc29SmrgCC="$lt_save_CC"
49428c9fbc29Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
49438c9fbc29Smrg
49448c9fbc29Smrg
49458c9fbc29Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
49468c9fbc29Smrg# --------------------------
49478c9fbc29Smrg# Ensure that the configuration vars for the C compiler are
49488c9fbc29Smrg# suitably defined.  Those variables are subsequently used by
49498c9fbc29Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
49508c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
49518c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
49528c9fbc29Smrg[AC_LANG_SAVE
49538c9fbc29Smrg
49548c9fbc29Smrg# Source file extension for Java test sources.
49558c9fbc29Smrgac_ext=java
49568c9fbc29Smrg
49578c9fbc29Smrg# Object file extension for compiled Java test sources.
49588c9fbc29Smrgobjext=o
49598c9fbc29Smrg_LT_AC_TAGVAR(objext, $1)=$objext
49608c9fbc29Smrg
49618c9fbc29Smrg# Code to be used in simple compile tests
49628c9fbc29Smrglt_simple_compile_test_code="class foo {}\n"
49638c9fbc29Smrg
49648c9fbc29Smrg# Code to be used in simple link tests
49658c9fbc29Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
49668c9fbc29Smrg
49678c9fbc29Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
49688c9fbc29Smrg_LT_AC_SYS_COMPILER
49698c9fbc29Smrg
49708c9fbc29Smrg# save warnings/boilerplate of simple test code
49718c9fbc29Smrg_LT_COMPILER_BOILERPLATE
49728c9fbc29Smrg_LT_LINKER_BOILERPLATE
49738c9fbc29Smrg
49748c9fbc29Smrg# Allow CC to be a program name with arguments.
49758c9fbc29Smrglt_save_CC="$CC"
49768c9fbc29SmrgCC=${GCJ-"gcj"}
49778c9fbc29Smrgcompiler=$CC
49788c9fbc29Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
49798c9fbc29Smrg_LT_CC_BASENAME([$compiler])
49808c9fbc29Smrg
49818c9fbc29Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
49828c9fbc29Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
49838c9fbc29Smrg
49848c9fbc29Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
49858c9fbc29Smrg
49868c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
49878c9fbc29SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
49888c9fbc29SmrgAC_LIBTOOL_PROG_CC_C_O($1)
49898c9fbc29SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
49908c9fbc29SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
49918c9fbc29SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
49928c9fbc29SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
49938c9fbc29Smrg
49948c9fbc29SmrgAC_LIBTOOL_CONFIG($1)
49958c9fbc29Smrg
49968c9fbc29SmrgAC_LANG_RESTORE
49978c9fbc29SmrgCC="$lt_save_CC"
49988c9fbc29Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
49998c9fbc29Smrg
50008c9fbc29Smrg
50018c9fbc29Smrg# AC_LIBTOOL_LANG_RC_CONFIG
50028c9fbc29Smrg# -------------------------
50038c9fbc29Smrg# Ensure that the configuration vars for the Windows resource compiler are
50048c9fbc29Smrg# suitably defined.  Those variables are subsequently used by
50058c9fbc29Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
50068c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
50078c9fbc29SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
50088c9fbc29Smrg[AC_LANG_SAVE
50098c9fbc29Smrg
50108c9fbc29Smrg# Source file extension for RC test sources.
50118c9fbc29Smrgac_ext=rc
50128c9fbc29Smrg
50138c9fbc29Smrg# Object file extension for compiled RC test sources.
50148c9fbc29Smrgobjext=o
50158c9fbc29Smrg_LT_AC_TAGVAR(objext, $1)=$objext
50168c9fbc29Smrg
50178c9fbc29Smrg# Code to be used in simple compile tests
50188c9fbc29Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
50198c9fbc29Smrg
50208c9fbc29Smrg# Code to be used in simple link tests
50218c9fbc29Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
50228c9fbc29Smrg
50238c9fbc29Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
50248c9fbc29Smrg_LT_AC_SYS_COMPILER
50258c9fbc29Smrg
50268c9fbc29Smrg# save warnings/boilerplate of simple test code
50278c9fbc29Smrg_LT_COMPILER_BOILERPLATE
50288c9fbc29Smrg_LT_LINKER_BOILERPLATE
50298c9fbc29Smrg
50308c9fbc29Smrg# Allow CC to be a program name with arguments.
50318c9fbc29Smrglt_save_CC="$CC"
50328c9fbc29SmrgCC=${RC-"windres"}
50338c9fbc29Smrgcompiler=$CC
50348c9fbc29Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
50358c9fbc29Smrg_LT_CC_BASENAME([$compiler])
50368c9fbc29Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
50378c9fbc29Smrg
50388c9fbc29SmrgAC_LIBTOOL_CONFIG($1)
50398c9fbc29Smrg
50408c9fbc29SmrgAC_LANG_RESTORE
50418c9fbc29SmrgCC="$lt_save_CC"
50428c9fbc29Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
50438c9fbc29Smrg
50448c9fbc29Smrg
50458c9fbc29Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
50468c9fbc29Smrg# ----------------------------
50478c9fbc29Smrg# If TAGNAME is not passed, then create an initial libtool script
50488c9fbc29Smrg# with a default configuration from the untagged config vars.  Otherwise
50498c9fbc29Smrg# add code to config.status for appending the configuration named by
50508c9fbc29Smrg# TAGNAME from the matching tagged config vars.
50518c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
50528c9fbc29Smrg[# The else clause should only fire when bootstrapping the
50538c9fbc29Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
50548c9fbc29Smrg# with your package, and you will get complaints that there are
50558c9fbc29Smrg# no rules to generate ltmain.sh.
50568c9fbc29Smrgif test -f "$ltmain"; then
50578c9fbc29Smrg  # See if we are running on zsh, and set the options which allow our commands through
50588c9fbc29Smrg  # without removal of \ escapes.
50598c9fbc29Smrg  if test -n "${ZSH_VERSION+set}" ; then
50608c9fbc29Smrg    setopt NO_GLOB_SUBST
50618c9fbc29Smrg  fi
50628c9fbc29Smrg  # Now quote all the things that may contain metacharacters while being
50638c9fbc29Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
50648c9fbc29Smrg  # variables and quote the copies for generation of the libtool script.
50658c9fbc29Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
50668c9fbc29Smrg    SED SHELL STRIP \
50678c9fbc29Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
50688c9fbc29Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
50698c9fbc29Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
50708c9fbc29Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
50718c9fbc29Smrg    lt_cv_sys_global_symbol_to_c_name_address \
50728c9fbc29Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
50738c9fbc29Smrg    old_postinstall_cmds old_postuninstall_cmds \
50748c9fbc29Smrg    _LT_AC_TAGVAR(compiler, $1) \
50758c9fbc29Smrg    _LT_AC_TAGVAR(CC, $1) \
50768c9fbc29Smrg    _LT_AC_TAGVAR(LD, $1) \
50778c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
50788c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
50798c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
50808c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
50818c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
50828c9fbc29Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
50838c9fbc29Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
50848c9fbc29Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
50858c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
50868c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
50878c9fbc29Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
50888c9fbc29Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
50898c9fbc29Smrg    _LT_AC_TAGVAR(predeps, $1) \
50908c9fbc29Smrg    _LT_AC_TAGVAR(postdeps, $1) \
50918c9fbc29Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
50928c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
50938c9fbc29Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
50948c9fbc29Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
50958c9fbc29Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
50968c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
50978c9fbc29Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
50988c9fbc29Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
50998c9fbc29Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
51008c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
51018c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
51028c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
51038c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
51048c9fbc29Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
51058c9fbc29Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
51068c9fbc29Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
51078c9fbc29Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
51088c9fbc29Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
51098c9fbc29Smrg
51108c9fbc29Smrg    case $var in
51118c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
51128c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
51138c9fbc29Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
51148c9fbc29Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
51158c9fbc29Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
51168c9fbc29Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
51178c9fbc29Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
51188c9fbc29Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
51198c9fbc29Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
51208c9fbc29Smrg    postinstall_cmds | postuninstall_cmds | \
51218c9fbc29Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
51228c9fbc29Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
51238c9fbc29Smrg      # Double-quote double-evaled strings.
51248c9fbc29Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
51258c9fbc29Smrg      ;;
51268c9fbc29Smrg    *)
51278c9fbc29Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
51288c9fbc29Smrg      ;;
51298c9fbc29Smrg    esac
51308c9fbc29Smrg  done
51318c9fbc29Smrg
51328c9fbc29Smrg  case $lt_echo in
51338c9fbc29Smrg  *'\[$]0 --fallback-echo"')
51348c9fbc29Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
51358c9fbc29Smrg    ;;
51368c9fbc29Smrg  esac
51378c9fbc29Smrg
51388c9fbc29Smrgifelse([$1], [],
51398c9fbc29Smrg  [cfgfile="${ofile}T"
51408c9fbc29Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
51418c9fbc29Smrg  $rm -f "$cfgfile"
51428c9fbc29Smrg  AC_MSG_NOTICE([creating $ofile])],
51438c9fbc29Smrg  [cfgfile="$ofile"])
51448c9fbc29Smrg
51458c9fbc29Smrg  cat <<__EOF__ >> "$cfgfile"
51468c9fbc29Smrgifelse([$1], [],
51478c9fbc29Smrg[#! $SHELL
51488c9fbc29Smrg
51498c9fbc29Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
51508c9fbc29Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
51518c9fbc29Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
51528c9fbc29Smrg#
51538c9fbc29Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
51548c9fbc29Smrg# Free Software Foundation, Inc.
51558c9fbc29Smrg#
51568c9fbc29Smrg# This file is part of GNU Libtool:
51578c9fbc29Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
51588c9fbc29Smrg#
51598c9fbc29Smrg# This program is free software; you can redistribute it and/or modify
51608c9fbc29Smrg# it under the terms of the GNU General Public License as published by
51618c9fbc29Smrg# the Free Software Foundation; either version 2 of the License, or
51628c9fbc29Smrg# (at your option) any later version.
51638c9fbc29Smrg#
51648c9fbc29Smrg# This program is distributed in the hope that it will be useful, but
51658c9fbc29Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
51668c9fbc29Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
51678c9fbc29Smrg# General Public License for more details.
51688c9fbc29Smrg#
51698c9fbc29Smrg# You should have received a copy of the GNU General Public License
51708c9fbc29Smrg# along with this program; if not, write to the Free Software
51718c9fbc29Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
51728c9fbc29Smrg#
51738c9fbc29Smrg# As a special exception to the GNU General Public License, if you
51748c9fbc29Smrg# distribute this file as part of a program that contains a
51758c9fbc29Smrg# configuration script generated by Autoconf, you may include it under
51768c9fbc29Smrg# the same distribution terms that you use for the rest of that program.
51778c9fbc29Smrg
51788c9fbc29Smrg# A sed program that does not truncate output.
51798c9fbc29SmrgSED=$lt_SED
51808c9fbc29Smrg
51818c9fbc29Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
51828c9fbc29SmrgXsed="$SED -e 1s/^X//"
51838c9fbc29Smrg
51848c9fbc29Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
51858c9fbc29Smrg# if CDPATH is set.
51868c9fbc29Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51878c9fbc29Smrg
51888c9fbc29Smrg# The names of the tagged configurations supported by this script.
51898c9fbc29Smrgavailable_tags=
51908c9fbc29Smrg
51918c9fbc29Smrg# ### BEGIN LIBTOOL CONFIG],
51928c9fbc29Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
51938c9fbc29Smrg
51948c9fbc29Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
51958c9fbc29Smrg
51968c9fbc29Smrg# Shell to use when invoking shell scripts.
51978c9fbc29SmrgSHELL=$lt_SHELL
51988c9fbc29Smrg
51998c9fbc29Smrg# Whether or not to build shared libraries.
52008c9fbc29Smrgbuild_libtool_libs=$enable_shared
52018c9fbc29Smrg
52028c9fbc29Smrg# Whether or not to build static libraries.
52038c9fbc29Smrgbuild_old_libs=$enable_static
52048c9fbc29Smrg
52058c9fbc29Smrg# Whether or not to add -lc for building shared libraries.
52068c9fbc29Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
52078c9fbc29Smrg
52088c9fbc29Smrg# Whether or not to disallow shared libs when runtime libs are static
52098c9fbc29Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
52108c9fbc29Smrg
52118c9fbc29Smrg# Whether or not to optimize for fast installation.
52128c9fbc29Smrgfast_install=$enable_fast_install
52138c9fbc29Smrg
52148c9fbc29Smrg# The host system.
52158c9fbc29Smrghost_alias=$host_alias
52168c9fbc29Smrghost=$host
52178c9fbc29Smrghost_os=$host_os
52188c9fbc29Smrg
52198c9fbc29Smrg# The build system.
52208c9fbc29Smrgbuild_alias=$build_alias
52218c9fbc29Smrgbuild=$build
52228c9fbc29Smrgbuild_os=$build_os
52238c9fbc29Smrg
52248c9fbc29Smrg# An echo program that does not interpret backslashes.
52258c9fbc29Smrgecho=$lt_echo
52268c9fbc29Smrg
52278c9fbc29Smrg# The archiver.
52288c9fbc29SmrgAR=$lt_AR
52298c9fbc29SmrgAR_FLAGS=$lt_AR_FLAGS
52308c9fbc29Smrg
52318c9fbc29Smrg# A C compiler.
52328c9fbc29SmrgLTCC=$lt_LTCC
52338c9fbc29Smrg
52348c9fbc29Smrg# LTCC compiler flags.
52358c9fbc29SmrgLTCFLAGS=$lt_LTCFLAGS
52368c9fbc29Smrg
52378c9fbc29Smrg# A language-specific compiler.
52388c9fbc29SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
52398c9fbc29Smrg
52408c9fbc29Smrg# Is the compiler the GNU C compiler?
52418c9fbc29Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
52428c9fbc29Smrg
52438c9fbc29Smrg# An ERE matcher.
52448c9fbc29SmrgEGREP=$lt_EGREP
52458c9fbc29Smrg
52468c9fbc29Smrg# The linker used to build libraries.
52478c9fbc29SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
52488c9fbc29Smrg
52498c9fbc29Smrg# Whether we need hard or soft links.
52508c9fbc29SmrgLN_S=$lt_LN_S
52518c9fbc29Smrg
52528c9fbc29Smrg# A BSD-compatible nm program.
52538c9fbc29SmrgNM=$lt_NM
52548c9fbc29Smrg
52558c9fbc29Smrg# A symbol stripping program
52568c9fbc29SmrgSTRIP=$lt_STRIP
52578c9fbc29Smrg
52588c9fbc29Smrg# Used to examine libraries when file_magic_cmd begins "file"
52598c9fbc29SmrgMAGIC_CMD=$MAGIC_CMD
52608c9fbc29Smrg
52618c9fbc29Smrg# Used on cygwin: DLL creation program.
52628c9fbc29SmrgDLLTOOL="$DLLTOOL"
52638c9fbc29Smrg
52648c9fbc29Smrg# Used on cygwin: object dumper.
52658c9fbc29SmrgOBJDUMP="$OBJDUMP"
52668c9fbc29Smrg
52678c9fbc29Smrg# Used on cygwin: assembler.
52688c9fbc29SmrgAS="$AS"
52698c9fbc29Smrg
52708c9fbc29Smrg# The name of the directory that contains temporary libtool files.
52718c9fbc29Smrgobjdir=$objdir
52728c9fbc29Smrg
52738c9fbc29Smrg# How to create reloadable object files.
52748c9fbc29Smrgreload_flag=$lt_reload_flag
52758c9fbc29Smrgreload_cmds=$lt_reload_cmds
52768c9fbc29Smrg
52778c9fbc29Smrg# How to pass a linker flag through the compiler.
52788c9fbc29Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
52798c9fbc29Smrg
52808c9fbc29Smrg# Object file suffix (normally "o").
52818c9fbc29Smrgobjext="$ac_objext"
52828c9fbc29Smrg
52838c9fbc29Smrg# Old archive suffix (normally "a").
52848c9fbc29Smrglibext="$libext"
52858c9fbc29Smrg
52868c9fbc29Smrg# Shared library suffix (normally ".so").
52878c9fbc29Smrgshrext_cmds='$shrext_cmds'
52888c9fbc29Smrg
52898c9fbc29Smrg# Executable file suffix (normally "").
52908c9fbc29Smrgexeext="$exeext"
52918c9fbc29Smrg
52928c9fbc29Smrg# Additional compiler flags for building library objects.
52938c9fbc29Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
52948c9fbc29Smrgpic_mode=$pic_mode
52958c9fbc29Smrg
52968c9fbc29Smrg# What is the maximum length of a command?
52978c9fbc29Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
52988c9fbc29Smrg
52998c9fbc29Smrg# Does compiler simultaneously support -c and -o options?
53008c9fbc29Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
53018c9fbc29Smrg
53028c9fbc29Smrg# Must we lock files when doing compilation?
53038c9fbc29Smrgneed_locks=$lt_need_locks
53048c9fbc29Smrg
53058c9fbc29Smrg# Do we need the lib prefix for modules?
53068c9fbc29Smrgneed_lib_prefix=$need_lib_prefix
53078c9fbc29Smrg
53088c9fbc29Smrg# Do we need a version for libraries?
53098c9fbc29Smrgneed_version=$need_version
53108c9fbc29Smrg
53118c9fbc29Smrg# Whether dlopen is supported.
53128c9fbc29Smrgdlopen_support=$enable_dlopen
53138c9fbc29Smrg
53148c9fbc29Smrg# Whether dlopen of programs is supported.
53158c9fbc29Smrgdlopen_self=$enable_dlopen_self
53168c9fbc29Smrg
53178c9fbc29Smrg# Whether dlopen of statically linked programs is supported.
53188c9fbc29Smrgdlopen_self_static=$enable_dlopen_self_static
53198c9fbc29Smrg
53208c9fbc29Smrg# Compiler flag to prevent dynamic linking.
53218c9fbc29Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
53228c9fbc29Smrg
53238c9fbc29Smrg# Compiler flag to turn off builtin functions.
53248c9fbc29Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
53258c9fbc29Smrg
53268c9fbc29Smrg# Compiler flag to allow reflexive dlopens.
53278c9fbc29Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
53288c9fbc29Smrg
53298c9fbc29Smrg# Compiler flag to generate shared objects directly from archives.
53308c9fbc29Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
53318c9fbc29Smrg
53328c9fbc29Smrg# Compiler flag to generate thread-safe objects.
53338c9fbc29Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
53348c9fbc29Smrg
53358c9fbc29Smrg# Library versioning type.
53368c9fbc29Smrgversion_type=$version_type
53378c9fbc29Smrg
53388c9fbc29Smrg# Format of library name prefix.
53398c9fbc29Smrglibname_spec=$lt_libname_spec
53408c9fbc29Smrg
53418c9fbc29Smrg# List of archive names.  First name is the real one, the rest are links.
53428c9fbc29Smrg# The last name is the one that the linker finds with -lNAME.
53438c9fbc29Smrglibrary_names_spec=$lt_library_names_spec
53448c9fbc29Smrg
53458c9fbc29Smrg# The coded name of the library, if different from the real name.
53468c9fbc29Smrgsoname_spec=$lt_soname_spec
53478c9fbc29Smrg
53488c9fbc29Smrg# Commands used to build and install an old-style archive.
53498c9fbc29SmrgRANLIB=$lt_RANLIB
53508c9fbc29Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
53518c9fbc29Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
53528c9fbc29Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
53538c9fbc29Smrg
53548c9fbc29Smrg# Create an old-style archive from a shared archive.
53558c9fbc29Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
53568c9fbc29Smrg
53578c9fbc29Smrg# Create a temporary old-style archive to link instead of a shared archive.
53588c9fbc29Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
53598c9fbc29Smrg
53608c9fbc29Smrg# Commands used to build and install a shared archive.
53618c9fbc29Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
53628c9fbc29Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
53638c9fbc29Smrgpostinstall_cmds=$lt_postinstall_cmds
53648c9fbc29Smrgpostuninstall_cmds=$lt_postuninstall_cmds
53658c9fbc29Smrg
53668c9fbc29Smrg# Commands used to build a loadable module (assumed same as above if empty)
53678c9fbc29Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
53688c9fbc29Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
53698c9fbc29Smrg
53708c9fbc29Smrg# Commands to strip libraries.
53718c9fbc29Smrgold_striplib=$lt_old_striplib
53728c9fbc29Smrgstriplib=$lt_striplib
53738c9fbc29Smrg
53748c9fbc29Smrg# Dependencies to place before the objects being linked to create a
53758c9fbc29Smrg# shared library.
53768c9fbc29Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
53778c9fbc29Smrg
53788c9fbc29Smrg# Dependencies to place after the objects being linked to create a
53798c9fbc29Smrg# shared library.
53808c9fbc29Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
53818c9fbc29Smrg
53828c9fbc29Smrg# Dependencies to place before the objects being linked to create a
53838c9fbc29Smrg# shared library.
53848c9fbc29Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
53858c9fbc29Smrg
53868c9fbc29Smrg# Dependencies to place after the objects being linked to create a
53878c9fbc29Smrg# shared library.
53888c9fbc29Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
53898c9fbc29Smrg
53908c9fbc29Smrg# The library search path used internally by the compiler when linking
53918c9fbc29Smrg# a shared library.
53928c9fbc29Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
53938c9fbc29Smrg
53948c9fbc29Smrg# Method to check whether dependent libraries are shared objects.
53958c9fbc29Smrgdeplibs_check_method=$lt_deplibs_check_method
53968c9fbc29Smrg
53978c9fbc29Smrg# Command to use when deplibs_check_method == file_magic.
53988c9fbc29Smrgfile_magic_cmd=$lt_file_magic_cmd
53998c9fbc29Smrg
54008c9fbc29Smrg# Flag that allows shared libraries with undefined symbols to be built.
54018c9fbc29Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
54028c9fbc29Smrg
54038c9fbc29Smrg# Flag that forces no undefined symbols.
54048c9fbc29Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
54058c9fbc29Smrg
54068c9fbc29Smrg# Commands used to finish a libtool library installation in a directory.
54078c9fbc29Smrgfinish_cmds=$lt_finish_cmds
54088c9fbc29Smrg
54098c9fbc29Smrg# Same as above, but a single script fragment to be evaled but not shown.
54108c9fbc29Smrgfinish_eval=$lt_finish_eval
54118c9fbc29Smrg
54128c9fbc29Smrg# Take the output of nm and produce a listing of raw symbols and C names.
54138c9fbc29Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
54148c9fbc29Smrg
54158c9fbc29Smrg# Transform the output of nm in a proper C declaration
54168c9fbc29Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
54178c9fbc29Smrg
54188c9fbc29Smrg# Transform the output of nm in a C name address pair
54198c9fbc29Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
54208c9fbc29Smrg
54218c9fbc29Smrg# This is the shared library runtime path variable.
54228c9fbc29Smrgrunpath_var=$runpath_var
54238c9fbc29Smrg
54248c9fbc29Smrg# This is the shared library path variable.
54258c9fbc29Smrgshlibpath_var=$shlibpath_var
54268c9fbc29Smrg
54278c9fbc29Smrg# Is shlibpath searched before the hard-coded library search path?
54288c9fbc29Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
54298c9fbc29Smrg
54308c9fbc29Smrg# How to hardcode a shared library path into an executable.
54318c9fbc29Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
54328c9fbc29Smrg
54338c9fbc29Smrg# Whether we should hardcode library paths into libraries.
54348c9fbc29Smrghardcode_into_libs=$hardcode_into_libs
54358c9fbc29Smrg
54368c9fbc29Smrg# Flag to hardcode \$libdir into a binary during linking.
54378c9fbc29Smrg# This must work even if \$libdir does not exist.
54388c9fbc29Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
54398c9fbc29Smrg
54408c9fbc29Smrg# If ld is used when linking, flag to hardcode \$libdir into
54418c9fbc29Smrg# a binary during linking. This must work even if \$libdir does
54428c9fbc29Smrg# not exist.
54438c9fbc29Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
54448c9fbc29Smrg
54458c9fbc29Smrg# Whether we need a single -rpath flag with a separated argument.
54468c9fbc29Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
54478c9fbc29Smrg
54488c9fbc29Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
54498c9fbc29Smrg# resulting binary.
54508c9fbc29Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
54518c9fbc29Smrg
54528c9fbc29Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
54538c9fbc29Smrg# resulting binary.
54548c9fbc29Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
54558c9fbc29Smrg
54568c9fbc29Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
54578c9fbc29Smrg# the resulting binary.
54588c9fbc29Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
54598c9fbc29Smrg
54608c9fbc29Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
54618c9fbc29Smrg# and all subsequent libraries and executables linked against it.
54628c9fbc29Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
54638c9fbc29Smrg
54648c9fbc29Smrg# Variables whose values should be saved in libtool wrapper scripts and
54658c9fbc29Smrg# restored at relink time.
54668c9fbc29Smrgvariables_saved_for_relink="$variables_saved_for_relink"
54678c9fbc29Smrg
54688c9fbc29Smrg# Whether libtool must link a program against all its dependency libraries.
54698c9fbc29Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
54708c9fbc29Smrg
54718c9fbc29Smrg# Compile-time system search path for libraries
54728c9fbc29Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
54738c9fbc29Smrg
54748c9fbc29Smrg# Run-time system search path for libraries
54758c9fbc29Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
54768c9fbc29Smrg
54778c9fbc29Smrg# Fix the shell variable \$srcfile for the compiler.
54788c9fbc29Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
54798c9fbc29Smrg
54808c9fbc29Smrg# Set to yes if exported symbols are required.
54818c9fbc29Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
54828c9fbc29Smrg
54838c9fbc29Smrg# The commands to list exported symbols.
54848c9fbc29Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
54858c9fbc29Smrg
54868c9fbc29Smrg# The commands to extract the exported symbol list from a shared archive.
54878c9fbc29Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
54888c9fbc29Smrg
54898c9fbc29Smrg# Symbols that should not be listed in the preloaded symbols.
54908c9fbc29Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
54918c9fbc29Smrg
54928c9fbc29Smrg# Symbols that must always be exported.
54938c9fbc29Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
54948c9fbc29Smrg
54958c9fbc29Smrgifelse([$1],[],
54968c9fbc29Smrg[# ### END LIBTOOL CONFIG],
54978c9fbc29Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
54988c9fbc29Smrg
54998c9fbc29Smrg__EOF__
55008c9fbc29Smrg
55018c9fbc29Smrgifelse([$1],[], [
55028c9fbc29Smrg  case $host_os in
55038c9fbc29Smrg  aix3*)
55048c9fbc29Smrg    cat <<\EOF >> "$cfgfile"
55058c9fbc29Smrg
55068c9fbc29Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
55078c9fbc29Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
55088c9fbc29Smrg# vanish in a puff of smoke.
55098c9fbc29Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
55108c9fbc29Smrg  COLLECT_NAMES=
55118c9fbc29Smrg  export COLLECT_NAMES
55128c9fbc29Smrgfi
55138c9fbc29SmrgEOF
55148c9fbc29Smrg    ;;
55158c9fbc29Smrg  esac
55168c9fbc29Smrg
55178c9fbc29Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
55188c9fbc29Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
55198c9fbc29Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
55208c9fbc29Smrg  # is reportedly fixed, but why not run on old versions too?
55218c9fbc29Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
55228c9fbc29Smrg
55238c9fbc29Smrg  mv -f "$cfgfile" "$ofile" || \
55248c9fbc29Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
55258c9fbc29Smrg  chmod +x "$ofile"
55268c9fbc29Smrg])
55278c9fbc29Smrgelse
55288c9fbc29Smrg  # If there is no Makefile yet, we rely on a make rule to execute
55298c9fbc29Smrg  # `config.status --recheck' to rerun these tests and create the
55308c9fbc29Smrg  # libtool script then.
55318c9fbc29Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
55328c9fbc29Smrg  if test -f "$ltmain_in"; then
55338c9fbc29Smrg    test -f Makefile && make "$ltmain"
55348c9fbc29Smrg  fi
55358c9fbc29Smrgfi
55368c9fbc29Smrg])# AC_LIBTOOL_CONFIG
55378c9fbc29Smrg
55388c9fbc29Smrg
55398c9fbc29Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
55408c9fbc29Smrg# -------------------------------------------
55418c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
55428c9fbc29Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
55438c9fbc29Smrg
55448c9fbc29Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
55458c9fbc29Smrg
55468c9fbc29Smrgif test "$GCC" = yes; then
55478c9fbc29Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
55488c9fbc29Smrg
55498c9fbc29Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
55508c9fbc29Smrg    lt_cv_prog_compiler_rtti_exceptions,
55518c9fbc29Smrg    [-fno-rtti -fno-exceptions], [],
55528c9fbc29Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
55538c9fbc29Smrgfi
55548c9fbc29Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
55558c9fbc29Smrg
55568c9fbc29Smrg
55578c9fbc29Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
55588c9fbc29Smrg# ---------------------------------
55598c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
55608c9fbc29Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
55618c9fbc29SmrgAC_REQUIRE([AC_PROG_NM])
55628c9fbc29SmrgAC_REQUIRE([AC_OBJEXT])
55638c9fbc29Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
55648c9fbc29SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
55658c9fbc29SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
55668c9fbc29Smrg[
55678c9fbc29Smrg# These are sane defaults that work on at least a few old systems.
55688c9fbc29Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
55698c9fbc29Smrg
55708c9fbc29Smrg# Character class describing NM global symbol codes.
55718c9fbc29Smrgsymcode='[[BCDEGRST]]'
55728c9fbc29Smrg
55738c9fbc29Smrg# Regexp to match symbols that can be accessed directly from C.
55748c9fbc29Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
55758c9fbc29Smrg
55768c9fbc29Smrg# Transform an extracted symbol line into a proper C declaration
55778c9fbc29Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
55788c9fbc29Smrg
55798c9fbc29Smrg# Transform an extracted symbol line into symbol name and symbol address
55808c9fbc29Smrglt_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'"
55818c9fbc29Smrg
55828c9fbc29Smrg# Define system-specific variables.
55838c9fbc29Smrgcase $host_os in
55848c9fbc29Smrgaix*)
55858c9fbc29Smrg  symcode='[[BCDT]]'
55868c9fbc29Smrg  ;;
55878c9fbc29Smrgcygwin* | mingw* | pw32*)
55888c9fbc29Smrg  symcode='[[ABCDGISTW]]'
55898c9fbc29Smrg  ;;
55908c9fbc29Smrghpux*) # Its linker distinguishes data from code symbols
55918c9fbc29Smrg  if test "$host_cpu" = ia64; then
55928c9fbc29Smrg    symcode='[[ABCDEGRST]]'
55938c9fbc29Smrg  fi
55948c9fbc29Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
55958c9fbc29Smrg  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'"
55968c9fbc29Smrg  ;;
55978c9fbc29Smrglinux*)
55988c9fbc29Smrg  if test "$host_cpu" = ia64; then
55998c9fbc29Smrg    symcode='[[ABCDGIRSTW]]'
56008c9fbc29Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
56018c9fbc29Smrg    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'"
56028c9fbc29Smrg  fi
56038c9fbc29Smrg  ;;
56048c9fbc29Smrgirix* | nonstopux*)
56058c9fbc29Smrg  symcode='[[BCDEGRST]]'
56068c9fbc29Smrg  ;;
56078c9fbc29Smrgosf*)
56088c9fbc29Smrg  symcode='[[BCDEGQRST]]'
56098c9fbc29Smrg  ;;
56108c9fbc29Smrgsolaris*)
56118c9fbc29Smrg  symcode='[[BDRT]]'
56128c9fbc29Smrg  ;;
56138c9fbc29Smrgsco3.2v5*)
56148c9fbc29Smrg  symcode='[[DT]]'
56158c9fbc29Smrg  ;;
56168c9fbc29Smrgsysv4.2uw2*)
56178c9fbc29Smrg  symcode='[[DT]]'
56188c9fbc29Smrg  ;;
56198c9fbc29Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
56208c9fbc29Smrg  symcode='[[ABDT]]'
56218c9fbc29Smrg  ;;
56228c9fbc29Smrgsysv4)
56238c9fbc29Smrg  symcode='[[DFNSTU]]'
56248c9fbc29Smrg  ;;
56258c9fbc29Smrgesac
56268c9fbc29Smrg
56278c9fbc29Smrg# Handle CRLF in mingw tool chain
56288c9fbc29Smrgopt_cr=
56298c9fbc29Smrgcase $build_os in
56308c9fbc29Smrgmingw*)
56318c9fbc29Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
56328c9fbc29Smrg  ;;
56338c9fbc29Smrgesac
56348c9fbc29Smrg
56358c9fbc29Smrg# If we're using GNU nm, then use its standard symbol codes.
56368c9fbc29Smrgcase `$NM -V 2>&1` in
56378c9fbc29Smrg*GNU* | *'with BFD'*)
56388c9fbc29Smrg  symcode='[[ABCDGIRSTW]]' ;;
56398c9fbc29Smrgesac
56408c9fbc29Smrg
56418c9fbc29Smrg# Try without a prefix undercore, then with it.
56428c9fbc29Smrgfor ac_symprfx in "" "_"; do
56438c9fbc29Smrg
56448c9fbc29Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
56458c9fbc29Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
56468c9fbc29Smrg
56478c9fbc29Smrg  # Write the raw and C identifiers.
56488c9fbc29Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
56498c9fbc29Smrg
56508c9fbc29Smrg  # Check to see that the pipe works correctly.
56518c9fbc29Smrg  pipe_works=no
56528c9fbc29Smrg
56538c9fbc29Smrg  rm -f conftest*
56548c9fbc29Smrg  cat > conftest.$ac_ext <<EOF
56558c9fbc29Smrg#ifdef __cplusplus
56568c9fbc29Smrgextern "C" {
56578c9fbc29Smrg#endif
56588c9fbc29Smrgchar nm_test_var;
56598c9fbc29Smrgvoid nm_test_func(){}
56608c9fbc29Smrg#ifdef __cplusplus
56618c9fbc29Smrg}
56628c9fbc29Smrg#endif
56638c9fbc29Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
56648c9fbc29SmrgEOF
56658c9fbc29Smrg
56668c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
56678c9fbc29Smrg    # Now try to grab the symbols.
56688c9fbc29Smrg    nlist=conftest.nm
56698c9fbc29Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
56708c9fbc29Smrg      # Try sorting and uniquifying the output.
56718c9fbc29Smrg      if sort "$nlist" | uniq > "$nlist"T; then
56728c9fbc29Smrg	mv -f "$nlist"T "$nlist"
56738c9fbc29Smrg      else
56748c9fbc29Smrg	rm -f "$nlist"T
56758c9fbc29Smrg      fi
56768c9fbc29Smrg
56778c9fbc29Smrg      # Make sure that we snagged all the symbols we need.
56788c9fbc29Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
56798c9fbc29Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
56808c9fbc29Smrg	  cat <<EOF > conftest.$ac_ext
56818c9fbc29Smrg#ifdef __cplusplus
56828c9fbc29Smrgextern "C" {
56838c9fbc29Smrg#endif
56848c9fbc29Smrg
56858c9fbc29SmrgEOF
56868c9fbc29Smrg	  # Now generate the symbol file.
56878c9fbc29Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
56888c9fbc29Smrg
56898c9fbc29Smrg	  cat <<EOF >> conftest.$ac_ext
56908c9fbc29Smrg#if defined (__STDC__) && __STDC__
56918c9fbc29Smrg# define lt_ptr_t void *
56928c9fbc29Smrg#else
56938c9fbc29Smrg# define lt_ptr_t char *
56948c9fbc29Smrg# define const
56958c9fbc29Smrg#endif
56968c9fbc29Smrg
56978c9fbc29Smrg/* The mapping between symbol names and symbols. */
56988c9fbc29Smrgconst struct {
56998c9fbc29Smrg  const char *name;
57008c9fbc29Smrg  lt_ptr_t address;
57018c9fbc29Smrg}
57028c9fbc29Smrglt_preloaded_symbols[[]] =
57038c9fbc29Smrg{
57048c9fbc29SmrgEOF
57058c9fbc29Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
57068c9fbc29Smrg	  cat <<\EOF >> conftest.$ac_ext
57078c9fbc29Smrg  {0, (lt_ptr_t) 0}
57088c9fbc29Smrg};
57098c9fbc29Smrg
57108c9fbc29Smrg#ifdef __cplusplus
57118c9fbc29Smrg}
57128c9fbc29Smrg#endif
57138c9fbc29SmrgEOF
57148c9fbc29Smrg	  # Now try linking the two files.
57158c9fbc29Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
57168c9fbc29Smrg	  lt_save_LIBS="$LIBS"
57178c9fbc29Smrg	  lt_save_CFLAGS="$CFLAGS"
57188c9fbc29Smrg	  LIBS="conftstm.$ac_objext"
57198c9fbc29Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
57208c9fbc29Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
57218c9fbc29Smrg	    pipe_works=yes
57228c9fbc29Smrg	  fi
57238c9fbc29Smrg	  LIBS="$lt_save_LIBS"
57248c9fbc29Smrg	  CFLAGS="$lt_save_CFLAGS"
57258c9fbc29Smrg	else
57268c9fbc29Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
57278c9fbc29Smrg	fi
57288c9fbc29Smrg      else
57298c9fbc29Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
57308c9fbc29Smrg      fi
57318c9fbc29Smrg    else
57328c9fbc29Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
57338c9fbc29Smrg    fi
57348c9fbc29Smrg  else
57358c9fbc29Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
57368c9fbc29Smrg    cat conftest.$ac_ext >&5
57378c9fbc29Smrg  fi
57388c9fbc29Smrg  rm -f conftest* conftst*
57398c9fbc29Smrg
57408c9fbc29Smrg  # Do not use the global_symbol_pipe unless it works.
57418c9fbc29Smrg  if test "$pipe_works" = yes; then
57428c9fbc29Smrg    break
57438c9fbc29Smrg  else
57448c9fbc29Smrg    lt_cv_sys_global_symbol_pipe=
57458c9fbc29Smrg  fi
57468c9fbc29Smrgdone
57478c9fbc29Smrg])
57488c9fbc29Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
57498c9fbc29Smrg  lt_cv_sys_global_symbol_to_cdecl=
57508c9fbc29Smrgfi
57518c9fbc29Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
57528c9fbc29Smrg  AC_MSG_RESULT(failed)
57538c9fbc29Smrgelse
57548c9fbc29Smrg  AC_MSG_RESULT(ok)
57558c9fbc29Smrgfi
57568c9fbc29Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
57578c9fbc29Smrg
57588c9fbc29Smrg
57598c9fbc29Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
57608c9fbc29Smrg# ---------------------------------------
57618c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
57628c9fbc29Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
57638c9fbc29Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
57648c9fbc29Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
57658c9fbc29Smrg
57668c9fbc29SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
57678c9fbc29Smrg ifelse([$1],[CXX],[
57688c9fbc29Smrg  # C++ specific cases for pic, static, wl, etc.
57698c9fbc29Smrg  if test "$GXX" = yes; then
57708c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57718c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
57728c9fbc29Smrg
57738c9fbc29Smrg    case $host_os in
57748c9fbc29Smrg    aix*)
57758c9fbc29Smrg      # All AIX code is PIC.
57768c9fbc29Smrg      if test "$host_cpu" = ia64; then
57778c9fbc29Smrg	# AIX 5 now supports IA64 processor
57788c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57798c9fbc29Smrg      fi
57808c9fbc29Smrg      ;;
57818c9fbc29Smrg    amigaos*)
57828c9fbc29Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
57838c9fbc29Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
57848c9fbc29Smrg      # like `-m68040'.
57858c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
57868c9fbc29Smrg      ;;
57878c9fbc29Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
57888c9fbc29Smrg      # PIC is the default for these OSes.
57898c9fbc29Smrg      ;;
57908c9fbc29Smrg    mingw* | os2* | pw32*)
57918c9fbc29Smrg      # This hack is so that the source file can tell whether it is being
57928c9fbc29Smrg      # built for inclusion in a dll (and should export symbols for example).
57938c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
57948c9fbc29Smrg      ;;
57958c9fbc29Smrg    darwin* | rhapsody*)
57968c9fbc29Smrg      # PIC is the default on this platform
57978c9fbc29Smrg      # Common symbols not allowed in MH_DYLIB files
57988c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
57998c9fbc29Smrg      ;;
58008c9fbc29Smrg    *djgpp*)
58018c9fbc29Smrg      # DJGPP does not support shared libraries at all
58028c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
58038c9fbc29Smrg      ;;
58048c9fbc29Smrg    interix3*)
58058c9fbc29Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
58068c9fbc29Smrg      # Instead, we relocate shared libraries at runtime.
58078c9fbc29Smrg      ;;
58088c9fbc29Smrg    sysv4*MP*)
58098c9fbc29Smrg      if test -d /usr/nec; then
58108c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
58118c9fbc29Smrg      fi
58128c9fbc29Smrg      ;;
58138c9fbc29Smrg    hpux*)
58148c9fbc29Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
58158c9fbc29Smrg      # not for PA HP-UX.
58168c9fbc29Smrg      case $host_cpu in
58178c9fbc29Smrg      hppa*64*|ia64*)
58188c9fbc29Smrg	;;
58198c9fbc29Smrg      *)
58208c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
58218c9fbc29Smrg	;;
58228c9fbc29Smrg      esac
58238c9fbc29Smrg      ;;
58248c9fbc29Smrg    *)
58258c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
58268c9fbc29Smrg      ;;
58278c9fbc29Smrg    esac
58288c9fbc29Smrg  else
58298c9fbc29Smrg    case $host_os in
58308c9fbc29Smrg      aix4* | aix5*)
58318c9fbc29Smrg	# All AIX code is PIC.
58328c9fbc29Smrg	if test "$host_cpu" = ia64; then
58338c9fbc29Smrg	  # AIX 5 now supports IA64 processor
58348c9fbc29Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
58358c9fbc29Smrg	else
58368c9fbc29Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
58378c9fbc29Smrg	fi
58388c9fbc29Smrg	;;
58398c9fbc29Smrg      chorus*)
58408c9fbc29Smrg	case $cc_basename in
58418c9fbc29Smrg	cxch68*)
58428c9fbc29Smrg	  # Green Hills C++ Compiler
58438c9fbc29Smrg	  # _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"
58448c9fbc29Smrg	  ;;
58458c9fbc29Smrg	esac
58468c9fbc29Smrg	;;
58478c9fbc29Smrg       darwin*)
58488c9fbc29Smrg         # PIC is the default on this platform
58498c9fbc29Smrg         # Common symbols not allowed in MH_DYLIB files
58508c9fbc29Smrg         case $cc_basename in
58518c9fbc29Smrg           xlc*)
58528c9fbc29Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
58538c9fbc29Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
58548c9fbc29Smrg           ;;
58558c9fbc29Smrg         esac
58568c9fbc29Smrg       ;;
58578c9fbc29Smrg      dgux*)
58588c9fbc29Smrg	case $cc_basename in
58598c9fbc29Smrg	  ec++*)
58608c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
58618c9fbc29Smrg	    ;;
58628c9fbc29Smrg	  ghcx*)
58638c9fbc29Smrg	    # Green Hills C++ Compiler
58648c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
58658c9fbc29Smrg	    ;;
58668c9fbc29Smrg	  *)
58678c9fbc29Smrg	    ;;
58688c9fbc29Smrg	esac
58698c9fbc29Smrg	;;
58708c9fbc29Smrg      freebsd* | kfreebsd*-gnu | dragonfly*)
58718c9fbc29Smrg	# FreeBSD uses GNU C++
58728c9fbc29Smrg	;;
58738c9fbc29Smrg      hpux9* | hpux10* | hpux11*)
58748c9fbc29Smrg	case $cc_basename in
58758c9fbc29Smrg	  CC*)
58768c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
58778c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
58788c9fbc29Smrg	    if test "$host_cpu" != ia64; then
58798c9fbc29Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
58808c9fbc29Smrg	    fi
58818c9fbc29Smrg	    ;;
58828c9fbc29Smrg	  aCC*)
58838c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
58848c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
58858c9fbc29Smrg	    case $host_cpu in
58868c9fbc29Smrg	    hppa*64*|ia64*)
58878c9fbc29Smrg	      # +Z the default
58888c9fbc29Smrg	      ;;
58898c9fbc29Smrg	    *)
58908c9fbc29Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
58918c9fbc29Smrg	      ;;
58928c9fbc29Smrg	    esac
58938c9fbc29Smrg	    ;;
58948c9fbc29Smrg	  *)
58958c9fbc29Smrg	    ;;
58968c9fbc29Smrg	esac
58978c9fbc29Smrg	;;
58988c9fbc29Smrg      interix*)
58998c9fbc29Smrg	# This is c89, which is MS Visual C++ (no shared libs)
59008c9fbc29Smrg	# Anyone wants to do a port?
59018c9fbc29Smrg	;;
59028c9fbc29Smrg      irix5* | irix6* | nonstopux*)
59038c9fbc29Smrg	case $cc_basename in
59048c9fbc29Smrg	  CC*)
59058c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
59068c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
59078c9fbc29Smrg	    # CC pic flag -KPIC is the default.
59088c9fbc29Smrg	    ;;
59098c9fbc29Smrg	  *)
59108c9fbc29Smrg	    ;;
59118c9fbc29Smrg	esac
59128c9fbc29Smrg	;;
59138c9fbc29Smrg      linux*)
59148c9fbc29Smrg	case $cc_basename in
59158c9fbc29Smrg	  KCC*)
59168c9fbc29Smrg	    # KAI C++ Compiler
59178c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
59188c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
59198c9fbc29Smrg	    ;;
59208c9fbc29Smrg	  icpc* | ecpc*)
59218c9fbc29Smrg	    # Intel C++
59228c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
59238c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
59248c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
59258c9fbc29Smrg	    ;;
59268c9fbc29Smrg	  pgCC*)
59278c9fbc29Smrg	    # Portland Group C++ compiler.
59288c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
59298c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
59308c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
59318c9fbc29Smrg	    ;;
59328c9fbc29Smrg	  cxx*)
59338c9fbc29Smrg	    # Compaq C++
59348c9fbc29Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
59358c9fbc29Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
59368c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
59378c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
59388c9fbc29Smrg	    ;;
59398c9fbc29Smrg	  *)
59408c9fbc29Smrg	    ;;
59418c9fbc29Smrg	esac
59428c9fbc29Smrg	;;
59438c9fbc29Smrg      lynxos*)
59448c9fbc29Smrg	;;
59458c9fbc29Smrg      m88k*)
59468c9fbc29Smrg	;;
59478c9fbc29Smrg      mvs*)
59488c9fbc29Smrg	case $cc_basename in
59498c9fbc29Smrg	  cxx*)
59508c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
59518c9fbc29Smrg	    ;;
59528c9fbc29Smrg	  *)
59538c9fbc29Smrg	    ;;
59548c9fbc29Smrg	esac
59558c9fbc29Smrg	;;
59568c9fbc29Smrg      netbsd*)
59578c9fbc29Smrg	;;
59588c9fbc29Smrg      osf3* | osf4* | osf5*)
59598c9fbc29Smrg	case $cc_basename in
59608c9fbc29Smrg	  KCC*)
59618c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
59628c9fbc29Smrg	    ;;
59638c9fbc29Smrg	  RCC*)
59648c9fbc29Smrg	    # Rational C++ 2.4.1
59658c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
59668c9fbc29Smrg	    ;;
59678c9fbc29Smrg	  cxx*)
59688c9fbc29Smrg	    # Digital/Compaq C++
59698c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
59708c9fbc29Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
59718c9fbc29Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
59728c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
59738c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
59748c9fbc29Smrg	    ;;
59758c9fbc29Smrg	  *)
59768c9fbc29Smrg	    ;;
59778c9fbc29Smrg	esac
59788c9fbc29Smrg	;;
59798c9fbc29Smrg      psos*)
59808c9fbc29Smrg	;;
59818c9fbc29Smrg      solaris*)
59828c9fbc29Smrg	case $cc_basename in
59838c9fbc29Smrg	  CC*)
59848c9fbc29Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
59858c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
59868c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
59878c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
59888c9fbc29Smrg	    ;;
59898c9fbc29Smrg	  gcx*)
59908c9fbc29Smrg	    # Green Hills C++ Compiler
59918c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
59928c9fbc29Smrg	    ;;
59938c9fbc29Smrg	  *)
59948c9fbc29Smrg	    ;;
59958c9fbc29Smrg	esac
59968c9fbc29Smrg	;;
59978c9fbc29Smrg      sunos4*)
59988c9fbc29Smrg	case $cc_basename in
59998c9fbc29Smrg	  CC*)
60008c9fbc29Smrg	    # Sun C++ 4.x
60018c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
60028c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
60038c9fbc29Smrg	    ;;
60048c9fbc29Smrg	  lcc*)
60058c9fbc29Smrg	    # Lucid
60068c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
60078c9fbc29Smrg	    ;;
60088c9fbc29Smrg	  *)
60098c9fbc29Smrg	    ;;
60108c9fbc29Smrg	esac
60118c9fbc29Smrg	;;
60128c9fbc29Smrg      tandem*)
60138c9fbc29Smrg	case $cc_basename in
60148c9fbc29Smrg	  NCC*)
60158c9fbc29Smrg	    # NonStop-UX NCC 3.20
60168c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
60178c9fbc29Smrg	    ;;
60188c9fbc29Smrg	  *)
60198c9fbc29Smrg	    ;;
60208c9fbc29Smrg	esac
60218c9fbc29Smrg	;;
60228c9fbc29Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
60238c9fbc29Smrg	case $cc_basename in
60248c9fbc29Smrg	  CC*)
60258c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
60268c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
60278c9fbc29Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
60288c9fbc29Smrg	    ;;
60298c9fbc29Smrg	esac
60308c9fbc29Smrg	;;
60318c9fbc29Smrg      vxworks*)
60328c9fbc29Smrg	;;
60338c9fbc29Smrg      *)
60348c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
60358c9fbc29Smrg	;;
60368c9fbc29Smrg    esac
60378c9fbc29Smrg  fi
60388c9fbc29Smrg],
60398c9fbc29Smrg[
60408c9fbc29Smrg  if test "$GCC" = yes; then
60418c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
60428c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
60438c9fbc29Smrg
60448c9fbc29Smrg    case $host_os in
60458c9fbc29Smrg      aix*)
60468c9fbc29Smrg      # All AIX code is PIC.
60478c9fbc29Smrg      if test "$host_cpu" = ia64; then
60488c9fbc29Smrg	# AIX 5 now supports IA64 processor
60498c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
60508c9fbc29Smrg      fi
60518c9fbc29Smrg      ;;
60528c9fbc29Smrg
60538c9fbc29Smrg    amigaos*)
60548c9fbc29Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
60558c9fbc29Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
60568c9fbc29Smrg      # like `-m68040'.
60578c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
60588c9fbc29Smrg      ;;
60598c9fbc29Smrg
60608c9fbc29Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
60618c9fbc29Smrg      # PIC is the default for these OSes.
60628c9fbc29Smrg      ;;
60638c9fbc29Smrg
60648c9fbc29Smrg    mingw* | pw32* | os2*)
60658c9fbc29Smrg      # This hack is so that the source file can tell whether it is being
60668c9fbc29Smrg      # built for inclusion in a dll (and should export symbols for example).
60678c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
60688c9fbc29Smrg      ;;
60698c9fbc29Smrg
60708c9fbc29Smrg    darwin* | rhapsody*)
60718c9fbc29Smrg      # PIC is the default on this platform
60728c9fbc29Smrg      # Common symbols not allowed in MH_DYLIB files
60738c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
60748c9fbc29Smrg      ;;
60758c9fbc29Smrg
60768c9fbc29Smrg    interix3*)
60778c9fbc29Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
60788c9fbc29Smrg      # Instead, we relocate shared libraries at runtime.
60798c9fbc29Smrg      ;;
60808c9fbc29Smrg
60818c9fbc29Smrg    msdosdjgpp*)
60828c9fbc29Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
60838c9fbc29Smrg      # on systems that don't support them.
60848c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
60858c9fbc29Smrg      enable_shared=no
60868c9fbc29Smrg      ;;
60878c9fbc29Smrg
60888c9fbc29Smrg    sysv4*MP*)
60898c9fbc29Smrg      if test -d /usr/nec; then
60908c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
60918c9fbc29Smrg      fi
60928c9fbc29Smrg      ;;
60938c9fbc29Smrg
60948c9fbc29Smrg    hpux*)
60958c9fbc29Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
60968c9fbc29Smrg      # not for PA HP-UX.
60978c9fbc29Smrg      case $host_cpu in
60988c9fbc29Smrg      hppa*64*|ia64*)
60998c9fbc29Smrg	# +Z the default
61008c9fbc29Smrg	;;
61018c9fbc29Smrg      *)
61028c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
61038c9fbc29Smrg	;;
61048c9fbc29Smrg      esac
61058c9fbc29Smrg      ;;
61068c9fbc29Smrg
61078c9fbc29Smrg    *)
61088c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
61098c9fbc29Smrg      ;;
61108c9fbc29Smrg    esac
61118c9fbc29Smrg  else
61128c9fbc29Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
61138c9fbc29Smrg    case $host_os in
61148c9fbc29Smrg    aix*)
61158c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61168c9fbc29Smrg      if test "$host_cpu" = ia64; then
61178c9fbc29Smrg	# AIX 5 now supports IA64 processor
61188c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
61198c9fbc29Smrg      else
61208c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
61218c9fbc29Smrg      fi
61228c9fbc29Smrg      ;;
61238c9fbc29Smrg      darwin*)
61248c9fbc29Smrg        # PIC is the default on this platform
61258c9fbc29Smrg        # Common symbols not allowed in MH_DYLIB files
61268c9fbc29Smrg       case $cc_basename in
61278c9fbc29Smrg         xlc*)
61288c9fbc29Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
61298c9fbc29Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61308c9fbc29Smrg         ;;
61318c9fbc29Smrg       esac
61328c9fbc29Smrg       ;;
61338c9fbc29Smrg
61348c9fbc29Smrg    mingw* | pw32* | os2*)
61358c9fbc29Smrg      # This hack is so that the source file can tell whether it is being
61368c9fbc29Smrg      # built for inclusion in a dll (and should export symbols for example).
61378c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
61388c9fbc29Smrg      ;;
61398c9fbc29Smrg
61408c9fbc29Smrg    hpux9* | hpux10* | hpux11*)
61418c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61428c9fbc29Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
61438c9fbc29Smrg      # not for PA HP-UX.
61448c9fbc29Smrg      case $host_cpu in
61458c9fbc29Smrg      hppa*64*|ia64*)
61468c9fbc29Smrg	# +Z the default
61478c9fbc29Smrg	;;
61488c9fbc29Smrg      *)
61498c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
61508c9fbc29Smrg	;;
61518c9fbc29Smrg      esac
61528c9fbc29Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
61538c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
61548c9fbc29Smrg      ;;
61558c9fbc29Smrg
61568c9fbc29Smrg    irix5* | irix6* | nonstopux*)
61578c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61588c9fbc29Smrg      # PIC (with -KPIC) is the default.
61598c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61608c9fbc29Smrg      ;;
61618c9fbc29Smrg
61628c9fbc29Smrg    newsos6)
61638c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
61648c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
61658c9fbc29Smrg      ;;
61668c9fbc29Smrg
61678c9fbc29Smrg    linux*)
61688c9fbc29Smrg      case $cc_basename in
61698c9fbc29Smrg      icc* | ecc*)
61708c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61718c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
61728c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
61738c9fbc29Smrg        ;;
61748c9fbc29Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
61758c9fbc29Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
61768c9fbc29Smrg	# which looks to be a dead project)
61778c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61788c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
61798c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
61808c9fbc29Smrg        ;;
61818c9fbc29Smrg      ccc*)
61828c9fbc29Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61838c9fbc29Smrg        # All Alpha code is PIC.
61848c9fbc29Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61858c9fbc29Smrg        ;;
61868c9fbc29Smrg      esac
61878c9fbc29Smrg      ;;
61888c9fbc29Smrg
61898c9fbc29Smrg    osf3* | osf4* | osf5*)
61908c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
61918c9fbc29Smrg      # All OSF/1 code is PIC.
61928c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61938c9fbc29Smrg      ;;
61948c9fbc29Smrg
61958c9fbc29Smrg    solaris*)
61968c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
61978c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
61988c9fbc29Smrg      case $cc_basename in
61998c9fbc29Smrg      f77* | f90* | f95*)
62008c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
62018c9fbc29Smrg      *)
62028c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
62038c9fbc29Smrg      esac
62048c9fbc29Smrg      ;;
62058c9fbc29Smrg
62068c9fbc29Smrg    sunos4*)
62078c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
62088c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
62098c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62108c9fbc29Smrg      ;;
62118c9fbc29Smrg
62128c9fbc29Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
62138c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
62148c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
62158c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62168c9fbc29Smrg      ;;
62178c9fbc29Smrg
62188c9fbc29Smrg    sysv4*MP*)
62198c9fbc29Smrg      if test -d /usr/nec ;then
62208c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
62218c9fbc29Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62228c9fbc29Smrg      fi
62238c9fbc29Smrg      ;;
62248c9fbc29Smrg
62258c9fbc29Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
62268c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
62278c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
62288c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62298c9fbc29Smrg      ;;
62308c9fbc29Smrg
62318c9fbc29Smrg    unicos*)
62328c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
62338c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
62348c9fbc29Smrg      ;;
62358c9fbc29Smrg
62368c9fbc29Smrg    uts4*)
62378c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
62388c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
62398c9fbc29Smrg      ;;
62408c9fbc29Smrg
62418c9fbc29Smrg    *)
62428c9fbc29Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
62438c9fbc29Smrg      ;;
62448c9fbc29Smrg    esac
62458c9fbc29Smrg  fi
62468c9fbc29Smrg])
62478c9fbc29SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
62488c9fbc29Smrg
62498c9fbc29Smrg#
62508c9fbc29Smrg# Check to make sure the PIC flag actually works.
62518c9fbc29Smrg#
62528c9fbc29Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
62538c9fbc29Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
62548c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
62558c9fbc29Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
62568c9fbc29Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
62578c9fbc29Smrg     "" | " "*) ;;
62588c9fbc29Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
62598c9fbc29Smrg     esac],
62608c9fbc29Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
62618c9fbc29Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
62628c9fbc29Smrgfi
62638c9fbc29Smrgcase $host_os in
62648c9fbc29Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
62658c9fbc29Smrg  *djgpp*)
62668c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
62678c9fbc29Smrg    ;;
62688c9fbc29Smrg  *)
62698c9fbc29Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
62708c9fbc29Smrg    ;;
62718c9fbc29Smrgesac
62728c9fbc29Smrg
62738c9fbc29Smrg#
62748c9fbc29Smrg# Check to make sure the static flag actually works.
62758c9fbc29Smrg#
62768c9fbc29Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
62778c9fbc29SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
62788c9fbc29Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
62798c9fbc29Smrg  $lt_tmp_static_flag,
62808c9fbc29Smrg  [],
62818c9fbc29Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
62828c9fbc29Smrg])
62838c9fbc29Smrg
62848c9fbc29Smrg
62858c9fbc29Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
62868c9fbc29Smrg# ------------------------------------
62878c9fbc29Smrg# See if the linker supports building shared libraries.
62888c9fbc29SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
62898c9fbc29Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
62908c9fbc29Smrgifelse([$1],[CXX],[
62918c9fbc29Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
62928c9fbc29Smrg  case $host_os in
62938c9fbc29Smrg  aix4* | aix5*)
62948c9fbc29Smrg    # If we're using GNU nm, then we don't want the "-C" option.
62958c9fbc29Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
62968c9fbc29Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
62978c9fbc29Smrg      _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'
62988c9fbc29Smrg    else
62998c9fbc29Smrg      _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'
63008c9fbc29Smrg    fi
63018c9fbc29Smrg    ;;
63028c9fbc29Smrg  pw32*)
63038c9fbc29Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
63048c9fbc29Smrg  ;;
63058c9fbc29Smrg  cygwin* | mingw*)
63068c9fbc29Smrg    _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'
63078c9fbc29Smrg  ;;
63088c9fbc29Smrg  *)
63098c9fbc29Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
63108c9fbc29Smrg  ;;
63118c9fbc29Smrg  esac
63128c9fbc29Smrg],[
63138c9fbc29Smrg  runpath_var=
63148c9fbc29Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
63158c9fbc29Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63168c9fbc29Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
63178c9fbc29Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
63188c9fbc29Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
63198c9fbc29Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
63208c9fbc29Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
63218c9fbc29Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
63228c9fbc29Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
63238c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
63248c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
63258c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
63268c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
63278c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
63288c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63298c9fbc29Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
63308c9fbc29Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
63318c9fbc29Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
63328c9fbc29Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
63338c9fbc29Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
63348c9fbc29Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
63358c9fbc29Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
63368c9fbc29Smrg  # included in the symbol list
63378c9fbc29Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
63388c9fbc29Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
63398c9fbc29Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
63408c9fbc29Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
63418c9fbc29Smrg  # as well as any symbol that contains `d'.
63428c9fbc29Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
63438c9fbc29Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
63448c9fbc29Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
63458c9fbc29Smrg  # the symbol is explicitly referenced.  Since portable code cannot
63468c9fbc29Smrg  # rely on this symbol name, it's probably fine to never include it in
63478c9fbc29Smrg  # preloaded symbol tables.
63488c9fbc29Smrg  extract_expsyms_cmds=
63498c9fbc29Smrg  # Just being paranoid about ensuring that cc_basename is set.
63508c9fbc29Smrg  _LT_CC_BASENAME([$compiler])
63518c9fbc29Smrg  case $host_os in
63528c9fbc29Smrg  cygwin* | mingw* | pw32*)
63538c9fbc29Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
63548c9fbc29Smrg    # When not using gcc, we currently assume that we are using
63558c9fbc29Smrg    # Microsoft Visual C++.
63568c9fbc29Smrg    if test "$GCC" != yes; then
63578c9fbc29Smrg      with_gnu_ld=no
63588c9fbc29Smrg    fi
63598c9fbc29Smrg    ;;
63608c9fbc29Smrg  interix*)
63618c9fbc29Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
63628c9fbc29Smrg    with_gnu_ld=yes
63638c9fbc29Smrg    ;;
63648c9fbc29Smrg  openbsd*)
63658c9fbc29Smrg    with_gnu_ld=no
63668c9fbc29Smrg    ;;
63678c9fbc29Smrg  esac
63688c9fbc29Smrg
63698c9fbc29Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
63708c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
63718c9fbc29Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
63728c9fbc29Smrg    wlarc='${wl}'
63738c9fbc29Smrg
63748c9fbc29Smrg    # Set some defaults for GNU ld with shared library support. These
63758c9fbc29Smrg    # are reset later if shared libraries are not supported. Putting them
63768c9fbc29Smrg    # here allows them to be overridden if necessary.
63778c9fbc29Smrg    runpath_var=LD_RUN_PATH
63788c9fbc29Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
63798c9fbc29Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
63808c9fbc29Smrg    # ancient GNU ld didn't support --whole-archive et. al.
63818c9fbc29Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
63828c9fbc29Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
63838c9fbc29Smrg      else
63848c9fbc29Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
63858c9fbc29Smrg    fi
63868c9fbc29Smrg    supports_anon_versioning=no
63878c9fbc29Smrg    case `$LD -v 2>/dev/null` in
63888c9fbc29Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
63898c9fbc29Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
63908c9fbc29Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
63918c9fbc29Smrg      *\ 2.11.*) ;; # other 2.11 versions
63928c9fbc29Smrg      *) supports_anon_versioning=yes ;;
63938c9fbc29Smrg    esac
63948c9fbc29Smrg
63958c9fbc29Smrg    # See if GNU ld supports shared libraries.
63968c9fbc29Smrg    case $host_os in
63978c9fbc29Smrg    aix3* | aix4* | aix5*)
63988c9fbc29Smrg      # On AIX/PPC, the GNU linker is very broken
63998c9fbc29Smrg      if test "$host_cpu" != ia64; then
64008c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
64018c9fbc29Smrg	cat <<EOF 1>&2
64028c9fbc29Smrg
64038c9fbc29Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
64048c9fbc29Smrg*** to be unable to reliably create shared libraries on AIX.
64058c9fbc29Smrg*** Therefore, libtool is disabling shared libraries support.  If you
64068c9fbc29Smrg*** really care for shared libraries, you may want to modify your PATH
64078c9fbc29Smrg*** so that a non-GNU linker is found, and then restart.
64088c9fbc29Smrg
64098c9fbc29SmrgEOF
64108c9fbc29Smrg      fi
64118c9fbc29Smrg      ;;
64128c9fbc29Smrg
64138c9fbc29Smrg    amigaos*)
64148c9fbc29Smrg      _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)'
64158c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64168c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
64178c9fbc29Smrg
64188c9fbc29Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
64198c9fbc29Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
64208c9fbc29Smrg      # to version 4, is to share data among multiple programs linked
64218c9fbc29Smrg      # with the same dynamic library.  Since this doesn't match the
64228c9fbc29Smrg      # behavior of shared libraries on other platforms, we can't use
64238c9fbc29Smrg      # them.
64248c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
64258c9fbc29Smrg      ;;
64268c9fbc29Smrg
64278c9fbc29Smrg    beos*)
64288c9fbc29Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
64298c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
64308c9fbc29Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
64318c9fbc29Smrg	# support --undefined.  This deserves some investigation.  FIXME
64328c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
64338c9fbc29Smrg      else
64348c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
64358c9fbc29Smrg      fi
64368c9fbc29Smrg      ;;
64378c9fbc29Smrg
64388c9fbc29Smrg    cygwin* | mingw* | pw32*)
64398c9fbc29Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
64408c9fbc29Smrg      # as there is no search path for DLLs.
64418c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64428c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
64438c9fbc29Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
64448c9fbc29Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
64458c9fbc29Smrg      _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'
64468c9fbc29Smrg
64478c9fbc29Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
64488c9fbc29Smrg        _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'
64498c9fbc29Smrg	# If the export-symbols file already is a .def file (1st line
64508c9fbc29Smrg	# is EXPORTS), use it as is; otherwise, prepend...
64518c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
64528c9fbc29Smrg	  cp $export_symbols $output_objdir/$soname.def;
64538c9fbc29Smrg	else
64548c9fbc29Smrg	  echo EXPORTS > $output_objdir/$soname.def;
64558c9fbc29Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
64568c9fbc29Smrg	fi~
64578c9fbc29Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
64588c9fbc29Smrg      else
64598c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
64608c9fbc29Smrg      fi
64618c9fbc29Smrg      ;;
64628c9fbc29Smrg
64638c9fbc29Smrg    interix3*)
64648c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
64658c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
64668c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64678c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
64688c9fbc29Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
64698c9fbc29Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
64708c9fbc29Smrg      # default) and relocated if they conflict, which is a slow very memory
64718c9fbc29Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
64728c9fbc29Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
64738c9fbc29Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
64748c9fbc29Smrg      _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'
64758c9fbc29Smrg      _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'
64768c9fbc29Smrg      ;;
64778c9fbc29Smrg
64788c9fbc29Smrg    linux*)
64798c9fbc29Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
64808c9fbc29Smrg	tmp_addflag=
64818c9fbc29Smrg	case $cc_basename,$host_cpu in
64828c9fbc29Smrg	pgcc*)				# Portland Group C compiler
64838c9fbc29Smrg	  _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'
64848c9fbc29Smrg	  tmp_addflag=' $pic_flag'
64858c9fbc29Smrg	  ;;
64868c9fbc29Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
64878c9fbc29Smrg	  _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'
64888c9fbc29Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
64898c9fbc29Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
64908c9fbc29Smrg	  tmp_addflag=' -i_dynamic' ;;
64918c9fbc29Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
64928c9fbc29Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
64938c9fbc29Smrg	ifc* | ifort*)			# Intel Fortran compiler
64948c9fbc29Smrg	  tmp_addflag=' -nofor_main' ;;
64958c9fbc29Smrg	esac
64968c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
64978c9fbc29Smrg
64988c9fbc29Smrg	if test $supports_anon_versioning = yes; then
64998c9fbc29Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
65008c9fbc29Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
65018c9fbc29Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
65028c9fbc29Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
65038c9fbc29Smrg	fi
65048c9fbc29Smrg      else
65058c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
65068c9fbc29Smrg      fi
65078c9fbc29Smrg      ;;
65088c9fbc29Smrg
65098c9fbc29Smrg    netbsd*)
65108c9fbc29Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
65118c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
65128c9fbc29Smrg	wlarc=
65138c9fbc29Smrg      else
65148c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
65158c9fbc29Smrg	_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'
65168c9fbc29Smrg      fi
65178c9fbc29Smrg      ;;
65188c9fbc29Smrg
65198c9fbc29Smrg    solaris*)
65208c9fbc29Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
65218c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
65228c9fbc29Smrg	cat <<EOF 1>&2
65238c9fbc29Smrg
65248c9fbc29Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
65258c9fbc29Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
65268c9fbc29Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
65278c9fbc29Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
65288c9fbc29Smrg*** your PATH or compiler configuration so that the native linker is
65298c9fbc29Smrg*** used, and then restart.
65308c9fbc29Smrg
65318c9fbc29SmrgEOF
65328c9fbc29Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
65338c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
65348c9fbc29Smrg	_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'
65358c9fbc29Smrg      else
65368c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
65378c9fbc29Smrg      fi
65388c9fbc29Smrg      ;;
65398c9fbc29Smrg
65408c9fbc29Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
65418c9fbc29Smrg      case `$LD -v 2>&1` in
65428c9fbc29Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
65438c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
65448c9fbc29Smrg	cat <<_LT_EOF 1>&2
65458c9fbc29Smrg
65468c9fbc29Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
65478c9fbc29Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
65488c9fbc29Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
65498c9fbc29Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
65508c9fbc29Smrg*** your PATH or compiler configuration so that the native linker is
65518c9fbc29Smrg*** used, and then restart.
65528c9fbc29Smrg
65538c9fbc29Smrg_LT_EOF
65548c9fbc29Smrg	;;
65558c9fbc29Smrg	*)
65568c9fbc29Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
65578c9fbc29Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
65588c9fbc29Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
65598c9fbc29Smrg	    _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'
65608c9fbc29Smrg	  else
65618c9fbc29Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
65628c9fbc29Smrg	  fi
65638c9fbc29Smrg	;;
65648c9fbc29Smrg      esac
65658c9fbc29Smrg      ;;
65668c9fbc29Smrg
65678c9fbc29Smrg    sunos4*)
65688c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
65698c9fbc29Smrg      wlarc=
65708c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
65718c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
65728c9fbc29Smrg      ;;
65738c9fbc29Smrg
65748c9fbc29Smrg    *)
65758c9fbc29Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
65768c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
65778c9fbc29Smrg	_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'
65788c9fbc29Smrg      else
65798c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
65808c9fbc29Smrg      fi
65818c9fbc29Smrg      ;;
65828c9fbc29Smrg    esac
65838c9fbc29Smrg
65848c9fbc29Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
65858c9fbc29Smrg      runpath_var=
65868c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
65878c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
65888c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
65898c9fbc29Smrg    fi
65908c9fbc29Smrg  else
65918c9fbc29Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
65928c9fbc29Smrg    case $host_os in
65938c9fbc29Smrg    aix3*)
65948c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
65958c9fbc29Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
65968c9fbc29Smrg      _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'
65978c9fbc29Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
65988c9fbc29Smrg      # are no directories specified by -L.
65998c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
66008c9fbc29Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
66018c9fbc29Smrg	# Neither direct hardcoding nor static linking is supported with a
66028c9fbc29Smrg	# broken collect2.
66038c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
66048c9fbc29Smrg      fi
66058c9fbc29Smrg      ;;
66068c9fbc29Smrg
66078c9fbc29Smrg    aix4* | aix5*)
66088c9fbc29Smrg      if test "$host_cpu" = ia64; then
66098c9fbc29Smrg	# On IA64, the linker does run time linking by default, so we don't
66108c9fbc29Smrg	# have to do anything special.
66118c9fbc29Smrg	aix_use_runtimelinking=no
66128c9fbc29Smrg	exp_sym_flag='-Bexport'
66138c9fbc29Smrg	no_entry_flag=""
66148c9fbc29Smrg      else
66158c9fbc29Smrg	# If we're using GNU nm, then we don't want the "-C" option.
66168c9fbc29Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
66178c9fbc29Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
66188c9fbc29Smrg	  _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'
66198c9fbc29Smrg	else
66208c9fbc29Smrg	  _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'
66218c9fbc29Smrg	fi
66228c9fbc29Smrg	aix_use_runtimelinking=no
66238c9fbc29Smrg
66248c9fbc29Smrg	# Test if we are trying to use run time linking or normal
66258c9fbc29Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
66268c9fbc29Smrg	# need to do runtime linking.
66278c9fbc29Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
66288c9fbc29Smrg	  for ld_flag in $LDFLAGS; do
66298c9fbc29Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
66308c9fbc29Smrg  	    aix_use_runtimelinking=yes
66318c9fbc29Smrg  	    break
66328c9fbc29Smrg  	  fi
66338c9fbc29Smrg	  done
66348c9fbc29Smrg	  ;;
66358c9fbc29Smrg	esac
66368c9fbc29Smrg
66378c9fbc29Smrg	exp_sym_flag='-bexport'
66388c9fbc29Smrg	no_entry_flag='-bnoentry'
66398c9fbc29Smrg      fi
66408c9fbc29Smrg
66418c9fbc29Smrg      # When large executables or shared objects are built, AIX ld can
66428c9fbc29Smrg      # have problems creating the table of contents.  If linking a library
66438c9fbc29Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
66448c9fbc29Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
66458c9fbc29Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
66468c9fbc29Smrg
66478c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
66488c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
66498c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
66508c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
66518c9fbc29Smrg
66528c9fbc29Smrg      if test "$GCC" = yes; then
66538c9fbc29Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
66548c9fbc29Smrg	# We only want to do this on AIX 4.2 and lower, the check
66558c9fbc29Smrg	# below for broken collect2 doesn't work under 4.3+
66568c9fbc29Smrg	  collect2name=`${CC} -print-prog-name=collect2`
66578c9fbc29Smrg	  if test -f "$collect2name" && \
66588c9fbc29Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
66598c9fbc29Smrg	  then
66608c9fbc29Smrg  	  # We have reworked collect2
66618c9fbc29Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
66628c9fbc29Smrg	  else
66638c9fbc29Smrg  	  # We have old collect2
66648c9fbc29Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
66658c9fbc29Smrg  	  # It fails to find uninstalled libraries when the uninstalled
66668c9fbc29Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
66678c9fbc29Smrg  	  # to unsupported forces relinking
66688c9fbc29Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
66698c9fbc29Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66708c9fbc29Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
66718c9fbc29Smrg	  fi
66728c9fbc29Smrg	  ;;
66738c9fbc29Smrg	esac
66748c9fbc29Smrg	shared_flag='-shared'
66758c9fbc29Smrg	if test "$aix_use_runtimelinking" = yes; then
66768c9fbc29Smrg	  shared_flag="$shared_flag "'${wl}-G'
66778c9fbc29Smrg	fi
66788c9fbc29Smrg      else
66798c9fbc29Smrg	# not using gcc
66808c9fbc29Smrg	if test "$host_cpu" = ia64; then
66818c9fbc29Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
66828c9fbc29Smrg  	# chokes on -Wl,-G. The following line is correct:
66838c9fbc29Smrg	  shared_flag='-G'
66848c9fbc29Smrg	else
66858c9fbc29Smrg	  if test "$aix_use_runtimelinking" = yes; then
66868c9fbc29Smrg	    shared_flag='${wl}-G'
66878c9fbc29Smrg	  else
66888c9fbc29Smrg	    shared_flag='${wl}-bM:SRE'
66898c9fbc29Smrg	  fi
66908c9fbc29Smrg	fi
66918c9fbc29Smrg      fi
66928c9fbc29Smrg
66938c9fbc29Smrg      # It seems that -bexpall does not export symbols beginning with
66948c9fbc29Smrg      # underscore (_), so it is better to generate a list of symbols to export.
66958c9fbc29Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
66968c9fbc29Smrg      if test "$aix_use_runtimelinking" = yes; then
66978c9fbc29Smrg	# Warning - without using the other runtime loading flags (-brtl),
66988c9fbc29Smrg	# -berok will link without error, but may produce a broken library.
66998c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
67008c9fbc29Smrg       # Determine the default libpath from the value encoded in an empty executable.
67018c9fbc29Smrg       _LT_AC_SYS_LIBPATH_AIX
67028c9fbc29Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
67038c9fbc29Smrg	_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"
67048c9fbc29Smrg       else
67058c9fbc29Smrg	if test "$host_cpu" = ia64; then
67068c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
67078c9fbc29Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
67088c9fbc29Smrg	  _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"
67098c9fbc29Smrg	else
67108c9fbc29Smrg	 # Determine the default libpath from the value encoded in an empty executable.
67118c9fbc29Smrg	 _LT_AC_SYS_LIBPATH_AIX
67128c9fbc29Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
67138c9fbc29Smrg	  # Warning - without using the other run time loading flags,
67148c9fbc29Smrg	  # -berok will link without error, but may produce a broken library.
67158c9fbc29Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
67168c9fbc29Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
67178c9fbc29Smrg	  # Exported symbols can be pulled into shared objects from archives
67188c9fbc29Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
67198c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
67208c9fbc29Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
67218c9fbc29Smrg	  _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'
67228c9fbc29Smrg	fi
67238c9fbc29Smrg      fi
67248c9fbc29Smrg      ;;
67258c9fbc29Smrg
67268c9fbc29Smrg    amigaos*)
67278c9fbc29Smrg      _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)'
67288c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67298c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
67308c9fbc29Smrg      # see comment about different semantics on the GNU ld section
67318c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
67328c9fbc29Smrg      ;;
67338c9fbc29Smrg
67348c9fbc29Smrg    bsdi[[45]]*)
67358c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
67368c9fbc29Smrg      ;;
67378c9fbc29Smrg
67388c9fbc29Smrg    cygwin* | mingw* | pw32*)
67398c9fbc29Smrg      # When not using gcc, we currently assume that we are using
67408c9fbc29Smrg      # Microsoft Visual C++.
67418c9fbc29Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
67428c9fbc29Smrg      # no search path for DLLs.
67438c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
67448c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
67458c9fbc29Smrg      # Tell ltmain to make .lib files, not .a files.
67468c9fbc29Smrg      libext=lib
67478c9fbc29Smrg      # Tell ltmain to make .dll files, not .so files.
67488c9fbc29Smrg      shrext_cmds=".dll"
67498c9fbc29Smrg      # FIXME: Setting linknames here is a bad hack.
67508c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
67518c9fbc29Smrg      # The linker will automatically build a .lib file if we build a DLL.
67528c9fbc29Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
67538c9fbc29Smrg      # FIXME: Should let the user specify the lib program.
67548c9fbc29Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
67558c9fbc29Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
67568c9fbc29Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67578c9fbc29Smrg      ;;
67588c9fbc29Smrg
67598c9fbc29Smrg    darwin* | rhapsody*)
67608c9fbc29Smrg      case $host_os in
67618c9fbc29Smrg        rhapsody* | darwin1.[[012]])
67628c9fbc29Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
67638c9fbc29Smrg         ;;
67648c9fbc29Smrg       *) # Darwin 1.3 on
67658c9fbc29Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
67668c9fbc29Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
67678c9fbc29Smrg         else
67688c9fbc29Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
67698c9fbc29Smrg             10.[[012]])
67708c9fbc29Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
67718c9fbc29Smrg               ;;
67728c9fbc29Smrg             10.*)
67738c9fbc29Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
67748c9fbc29Smrg               ;;
67758c9fbc29Smrg           esac
67768c9fbc29Smrg         fi
67778c9fbc29Smrg         ;;
67788c9fbc29Smrg      esac
67798c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
67808c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
67818c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
67828c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
67838c9fbc29Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
67848c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
67858c9fbc29Smrg    if test "$GCC" = yes ; then
67868c9fbc29Smrg    	output_verbose_link_cmd='echo'
67878c9fbc29Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
67888c9fbc29Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
67898c9fbc29Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
67908c9fbc29Smrg      _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}'
67918c9fbc29Smrg      _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}'
67928c9fbc29Smrg    else
67938c9fbc29Smrg      case $cc_basename in
67948c9fbc29Smrg        xlc*)
67958c9fbc29Smrg         output_verbose_link_cmd='echo'
67968c9fbc29Smrg         _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'
67978c9fbc29Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
67988c9fbc29Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
67998c9fbc29Smrg         _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}'
68008c9fbc29Smrg          _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}'
68018c9fbc29Smrg          ;;
68028c9fbc29Smrg       *)
68038c9fbc29Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
68048c9fbc29Smrg          ;;
68058c9fbc29Smrg      esac
68068c9fbc29Smrg    fi
68078c9fbc29Smrg      ;;
68088c9fbc29Smrg
68098c9fbc29Smrg    dgux*)
68108c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68118c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
68128c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
68138c9fbc29Smrg      ;;
68148c9fbc29Smrg
68158c9fbc29Smrg    freebsd1*)
68168c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
68178c9fbc29Smrg      ;;
68188c9fbc29Smrg
68198c9fbc29Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
68208c9fbc29Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
68218c9fbc29Smrg    # does not break anything, and helps significantly (at the cost of a little
68228c9fbc29Smrg    # extra space).
68238c9fbc29Smrg    freebsd2.2*)
68248c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
68258c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
68268c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68278c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
68288c9fbc29Smrg      ;;
68298c9fbc29Smrg
68308c9fbc29Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
68318c9fbc29Smrg    freebsd2*)
68328c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
68338c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68348c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
68358c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
68368c9fbc29Smrg      ;;
68378c9fbc29Smrg
68388c9fbc29Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
68398c9fbc29Smrg    freebsd* | kfreebsd*-gnu | dragonfly*)
68408c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
68418c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
68428c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68438c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
68448c9fbc29Smrg      ;;
68458c9fbc29Smrg
68468c9fbc29Smrg    hpux9*)
68478c9fbc29Smrg      if test "$GCC" = yes; then
68488c9fbc29Smrg	_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'
68498c9fbc29Smrg      else
68508c9fbc29Smrg	_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'
68518c9fbc29Smrg      fi
68528c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
68538c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
68548c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
68558c9fbc29Smrg
68568c9fbc29Smrg      # hardcode_minus_L: Not really in the search PATH,
68578c9fbc29Smrg      # but as the default location of the library.
68588c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
68598c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
68608c9fbc29Smrg      ;;
68618c9fbc29Smrg
68628c9fbc29Smrg    hpux10*)
68638c9fbc29Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
68648c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
68658c9fbc29Smrg      else
68668c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
68678c9fbc29Smrg      fi
68688c9fbc29Smrg      if test "$with_gnu_ld" = no; then
68698c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
68708c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
68718c9fbc29Smrg
68728c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
68738c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
68748c9fbc29Smrg
68758c9fbc29Smrg	# hardcode_minus_L: Not really in the search PATH,
68768c9fbc29Smrg	# but as the default location of the library.
68778c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
68788c9fbc29Smrg      fi
68798c9fbc29Smrg      ;;
68808c9fbc29Smrg
68818c9fbc29Smrg    hpux11*)
68828c9fbc29Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
68838c9fbc29Smrg	case $host_cpu in
68848c9fbc29Smrg	hppa*64*)
68858c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
68868c9fbc29Smrg	  ;;
68878c9fbc29Smrg	ia64*)
68888c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
68898c9fbc29Smrg	  ;;
68908c9fbc29Smrg	*)
68918c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
68928c9fbc29Smrg	  ;;
68938c9fbc29Smrg	esac
68948c9fbc29Smrg      else
68958c9fbc29Smrg	case $host_cpu in
68968c9fbc29Smrg	hppa*64*)
68978c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
68988c9fbc29Smrg	  ;;
68998c9fbc29Smrg	ia64*)
69008c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
69018c9fbc29Smrg	  ;;
69028c9fbc29Smrg	*)
69038c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
69048c9fbc29Smrg	  ;;
69058c9fbc29Smrg	esac
69068c9fbc29Smrg      fi
69078c9fbc29Smrg      if test "$with_gnu_ld" = no; then
69088c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
69098c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
69108c9fbc29Smrg
69118c9fbc29Smrg	case $host_cpu in
69128c9fbc29Smrg	hppa*64*|ia64*)
69138c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
69148c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
69158c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
69168c9fbc29Smrg	  ;;
69178c9fbc29Smrg	*)
69188c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
69198c9fbc29Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
69208c9fbc29Smrg
69218c9fbc29Smrg	  # hardcode_minus_L: Not really in the search PATH,
69228c9fbc29Smrg	  # but as the default location of the library.
69238c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
69248c9fbc29Smrg	  ;;
69258c9fbc29Smrg	esac
69268c9fbc29Smrg      fi
69278c9fbc29Smrg      ;;
69288c9fbc29Smrg
69298c9fbc29Smrg    irix5* | irix6* | nonstopux*)
69308c9fbc29Smrg      if test "$GCC" = yes; then
69318c9fbc29Smrg	_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'
69328c9fbc29Smrg      else
69338c9fbc29Smrg	_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'
69348c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
69358c9fbc29Smrg      fi
69368c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
69378c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
69388c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
69398c9fbc29Smrg      ;;
69408c9fbc29Smrg
69418c9fbc29Smrg    netbsd*)
69428c9fbc29Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
69438c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
69448c9fbc29Smrg      else
69458c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
69468c9fbc29Smrg      fi
69478c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
69488c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
69498c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
69508c9fbc29Smrg      ;;
69518c9fbc29Smrg
69528c9fbc29Smrg    newsos6)
69538c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
69548c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
69558c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
69568c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
69578c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
69588c9fbc29Smrg      ;;
69598c9fbc29Smrg
69608c9fbc29Smrg    openbsd*)
69618c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
69628c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
69638c9fbc29Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
69648c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
69658c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
69668c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
69678c9fbc29Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
69688c9fbc29Smrg      else
69698c9fbc29Smrg       case $host_os in
69708c9fbc29Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
69718c9fbc29Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
69728c9fbc29Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
69738c9fbc29Smrg	   ;;
69748c9fbc29Smrg	 *)
69758c9fbc29Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
69768c9fbc29Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
69778c9fbc29Smrg	   ;;
69788c9fbc29Smrg       esac
69798c9fbc29Smrg      fi
69808c9fbc29Smrg      ;;
69818c9fbc29Smrg
69828c9fbc29Smrg    os2*)
69838c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
69848c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
69858c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
69868c9fbc29Smrg      _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'
69878c9fbc29Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
69888c9fbc29Smrg      ;;
69898c9fbc29Smrg
69908c9fbc29Smrg    osf3*)
69918c9fbc29Smrg      if test "$GCC" = yes; then
69928c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
69938c9fbc29Smrg	_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'
69948c9fbc29Smrg      else
69958c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
69968c9fbc29Smrg	_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'
69978c9fbc29Smrg      fi
69988c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
69998c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
70008c9fbc29Smrg      ;;
70018c9fbc29Smrg
70028c9fbc29Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
70038c9fbc29Smrg      if test "$GCC" = yes; then
70048c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
70058c9fbc29Smrg	_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'
70068c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
70078c9fbc29Smrg      else
70088c9fbc29Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
70098c9fbc29Smrg	_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'
70108c9fbc29Smrg	_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~
70118c9fbc29Smrg	$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'
70128c9fbc29Smrg
70138c9fbc29Smrg	# Both c and cxx compiler support -rpath directly
70148c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70158c9fbc29Smrg      fi
70168c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
70178c9fbc29Smrg      ;;
70188c9fbc29Smrg
70198c9fbc29Smrg    solaris*)
70208c9fbc29Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
70218c9fbc29Smrg      if test "$GCC" = yes; then
70228c9fbc29Smrg	wlarc='${wl}'
70238c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
70248c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
70258c9fbc29Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
70268c9fbc29Smrg      else
70278c9fbc29Smrg	wlarc=''
70288c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
70298c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
70308c9fbc29Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
70318c9fbc29Smrg      fi
70328c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70338c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70348c9fbc29Smrg      case $host_os in
70358c9fbc29Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
70368c9fbc29Smrg      *)
70378c9fbc29Smrg 	# The compiler driver will combine linker options so we
70388c9fbc29Smrg 	# cannot just pass the convience library names through
70398c9fbc29Smrg 	# without $wl, iff we do not link with $LD.
70408c9fbc29Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
70418c9fbc29Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
70428c9fbc29Smrg 	case $wlarc in
70438c9fbc29Smrg 	'')
70448c9fbc29Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
70458c9fbc29Smrg 	*)
70468c9fbc29Smrg 	  _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' ;;
70478c9fbc29Smrg 	esac ;;
70488c9fbc29Smrg      esac
70498c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
70508c9fbc29Smrg      ;;
70518c9fbc29Smrg
70528c9fbc29Smrg    sunos4*)
70538c9fbc29Smrg      if test "x$host_vendor" = xsequent; then
70548c9fbc29Smrg	# Use $CC to link under sequent, because it throws in some extra .o
70558c9fbc29Smrg	# files that make .init and .fini sections work.
70568c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
70578c9fbc29Smrg      else
70588c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
70598c9fbc29Smrg      fi
70608c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
70618c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
70628c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
70638c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70648c9fbc29Smrg      ;;
70658c9fbc29Smrg
70668c9fbc29Smrg    sysv4)
70678c9fbc29Smrg      case $host_vendor in
70688c9fbc29Smrg	sni)
70698c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
70708c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
70718c9fbc29Smrg	;;
70728c9fbc29Smrg	siemens)
70738c9fbc29Smrg	  ## LD is ld it makes a PLAMLIB
70748c9fbc29Smrg	  ## CC just makes a GrossModule.
70758c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
70768c9fbc29Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
70778c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
70788c9fbc29Smrg        ;;
70798c9fbc29Smrg	motorola)
70808c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
70818c9fbc29Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
70828c9fbc29Smrg	;;
70838c9fbc29Smrg      esac
70848c9fbc29Smrg      runpath_var='LD_RUN_PATH'
70858c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70868c9fbc29Smrg      ;;
70878c9fbc29Smrg
70888c9fbc29Smrg    sysv4.3*)
70898c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
70908c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70918c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
70928c9fbc29Smrg      ;;
70938c9fbc29Smrg
70948c9fbc29Smrg    sysv4*MP*)
70958c9fbc29Smrg      if test -d /usr/nec; then
70968c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
70978c9fbc29Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
70988c9fbc29Smrg	runpath_var=LD_RUN_PATH
70998c9fbc29Smrg	hardcode_runpath_var=yes
71008c9fbc29Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
71018c9fbc29Smrg      fi
71028c9fbc29Smrg      ;;
71038c9fbc29Smrg
71048c9fbc29Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
71058c9fbc29Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
71068c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
71078c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71088c9fbc29Smrg      runpath_var='LD_RUN_PATH'
71098c9fbc29Smrg
71108c9fbc29Smrg      if test "$GCC" = yes; then
71118c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
71128c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
71138c9fbc29Smrg      else
71148c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
71158c9fbc29Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
71168c9fbc29Smrg      fi
71178c9fbc29Smrg      ;;
71188c9fbc29Smrg
71198c9fbc29Smrg    sysv5* | sco3.2v5* | sco5v6*)
71208c9fbc29Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
71218c9fbc29Smrg      # link with -lc, and that would cause any symbols used from libc to
71228c9fbc29Smrg      # always be unresolved, which means just about no library would
71238c9fbc29Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
71248c9fbc29Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
71258c9fbc29Smrg      # as -z defs.
71268c9fbc29Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
71278c9fbc29Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
71288c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
71298c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71308c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
71318c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
71328c9fbc29Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
71338c9fbc29Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
71348c9fbc29Smrg      runpath_var='LD_RUN_PATH'
71358c9fbc29Smrg
71368c9fbc29Smrg      if test "$GCC" = yes; then
71378c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
71388c9fbc29Smrg	_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'
71398c9fbc29Smrg      else
71408c9fbc29Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
71418c9fbc29Smrg	_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'
71428c9fbc29Smrg      fi
71438c9fbc29Smrg      ;;
71448c9fbc29Smrg
71458c9fbc29Smrg    uts4*)
71468c9fbc29Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
71478c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
71488c9fbc29Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
71498c9fbc29Smrg      ;;
71508c9fbc29Smrg
71518c9fbc29Smrg    *)
71528c9fbc29Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
71538c9fbc29Smrg      ;;
71548c9fbc29Smrg    esac
71558c9fbc29Smrg  fi
71568c9fbc29Smrg])
71578c9fbc29SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
71588c9fbc29Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
71598c9fbc29Smrg
71608c9fbc29Smrg#
71618c9fbc29Smrg# Do we need to explicitly link libc?
71628c9fbc29Smrg#
71638c9fbc29Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
71648c9fbc29Smrgx|xyes)
71658c9fbc29Smrg  # Assume -lc should be added
71668c9fbc29Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
71678c9fbc29Smrg
71688c9fbc29Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
71698c9fbc29Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
71708c9fbc29Smrg    *'~'*)
71718c9fbc29Smrg      # FIXME: we may have to deal with multi-command sequences.
71728c9fbc29Smrg      ;;
71738c9fbc29Smrg    '$CC '*)
71748c9fbc29Smrg      # Test whether the compiler implicitly links with -lc since on some
71758c9fbc29Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
71768c9fbc29Smrg      # to ld, don't add -lc before -lgcc.
71778c9fbc29Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
71788c9fbc29Smrg      $rm conftest*
71798c9fbc29Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
71808c9fbc29Smrg
71818c9fbc29Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
71828c9fbc29Smrg        soname=conftest
71838c9fbc29Smrg        lib=conftest
71848c9fbc29Smrg        libobjs=conftest.$ac_objext
71858c9fbc29Smrg        deplibs=
71868c9fbc29Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
71878c9fbc29Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
71888c9fbc29Smrg        compiler_flags=-v
71898c9fbc29Smrg        linker_flags=-v
71908c9fbc29Smrg        verstring=
71918c9fbc29Smrg        output_objdir=.
71928c9fbc29Smrg        libname=conftest
71938c9fbc29Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
71948c9fbc29Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
71958c9fbc29Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
71968c9fbc29Smrg        then
71978c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
71988c9fbc29Smrg        else
71998c9fbc29Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
72008c9fbc29Smrg        fi
72018c9fbc29Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
72028c9fbc29Smrg      else
72038c9fbc29Smrg        cat conftest.err 1>&5
72048c9fbc29Smrg      fi
72058c9fbc29Smrg      $rm conftest*
72068c9fbc29Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
72078c9fbc29Smrg      ;;
72088c9fbc29Smrg    esac
72098c9fbc29Smrg  fi
72108c9fbc29Smrg  ;;
72118c9fbc29Smrgesac
72128c9fbc29Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
72138c9fbc29Smrg
72148c9fbc29Smrg
72158c9fbc29Smrg# _LT_AC_FILE_LTDLL_C
72168c9fbc29Smrg# -------------------
72178c9fbc29Smrg# Be careful that the start marker always follows a newline.
72188c9fbc29SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
72198c9fbc29Smrg# /* ltdll.c starts here */
72208c9fbc29Smrg# #define WIN32_LEAN_AND_MEAN
72218c9fbc29Smrg# #include <windows.h>
72228c9fbc29Smrg# #undef WIN32_LEAN_AND_MEAN
72238c9fbc29Smrg# #include <stdio.h>
72248c9fbc29Smrg#
72258c9fbc29Smrg# #ifndef __CYGWIN__
72268c9fbc29Smrg# #  ifdef __CYGWIN32__
72278c9fbc29Smrg# #    define __CYGWIN__ __CYGWIN32__
72288c9fbc29Smrg# #  endif
72298c9fbc29Smrg# #endif
72308c9fbc29Smrg#
72318c9fbc29Smrg# #ifdef __cplusplus
72328c9fbc29Smrg# extern "C" {
72338c9fbc29Smrg# #endif
72348c9fbc29Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
72358c9fbc29Smrg# #ifdef __cplusplus
72368c9fbc29Smrg# }
72378c9fbc29Smrg# #endif
72388c9fbc29Smrg#
72398c9fbc29Smrg# #ifdef __CYGWIN__
72408c9fbc29Smrg# #include <cygwin/cygwin_dll.h>
72418c9fbc29Smrg# DECLARE_CYGWIN_DLL( DllMain );
72428c9fbc29Smrg# #endif
72438c9fbc29Smrg# HINSTANCE __hDllInstance_base;
72448c9fbc29Smrg#
72458c9fbc29Smrg# BOOL APIENTRY
72468c9fbc29Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
72478c9fbc29Smrg# {
72488c9fbc29Smrg#   __hDllInstance_base = hInst;
72498c9fbc29Smrg#   return TRUE;
72508c9fbc29Smrg# }
72518c9fbc29Smrg# /* ltdll.c ends here */
72528c9fbc29Smrg])# _LT_AC_FILE_LTDLL_C
72538c9fbc29Smrg
72548c9fbc29Smrg
72558c9fbc29Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
72568c9fbc29Smrg# ---------------------------------
72578c9fbc29SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
72588c9fbc29Smrg
72598c9fbc29Smrg
72608c9fbc29Smrg# old names
72618c9fbc29SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
72628c9fbc29SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
72638c9fbc29SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
72648c9fbc29SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
72658c9fbc29SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
72668c9fbc29SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
72678c9fbc29SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
72688c9fbc29Smrg
72698c9fbc29Smrg# This is just to silence aclocal about the macro not being used
72708c9fbc29Smrgifelse([AC_DISABLE_FAST_INSTALL])
72718c9fbc29Smrg
72728c9fbc29SmrgAC_DEFUN([LT_AC_PROG_GCJ],
72738c9fbc29Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
72748c9fbc29Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
72758c9fbc29Smrg  AC_SUBST(GCJFLAGS)
72768c9fbc29Smrg])
72778c9fbc29Smrg
72788c9fbc29SmrgAC_DEFUN([LT_AC_PROG_RC],
72798c9fbc29Smrg[AC_CHECK_TOOL(RC, windres, no)
72808c9fbc29Smrg])
72818c9fbc29Smrg
72828c9fbc29Smrg# NOTE: This macro has been submitted for inclusion into   #
72838c9fbc29Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
72848c9fbc29Smrg#  a released version of Autoconf we should remove this    #
72858c9fbc29Smrg#  macro and use it instead.                               #
72868c9fbc29Smrg# LT_AC_PROG_SED
72878c9fbc29Smrg# --------------
72888c9fbc29Smrg# Check for a fully-functional sed program, that truncates
72898c9fbc29Smrg# as few characters as possible.  Prefer GNU sed if found.
72908c9fbc29SmrgAC_DEFUN([LT_AC_PROG_SED],
72918c9fbc29Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
72928c9fbc29SmrgAC_CACHE_VAL(lt_cv_path_SED,
72938c9fbc29Smrg[# Loop through the user's path and test for sed and gsed.
72948c9fbc29Smrg# Then use that list of sed's as ones to test for truncation.
72958c9fbc29Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
72968c9fbc29Smrgfor as_dir in $PATH
72978c9fbc29Smrgdo
72988c9fbc29Smrg  IFS=$as_save_IFS
72998c9fbc29Smrg  test -z "$as_dir" && as_dir=.
73008c9fbc29Smrg  for lt_ac_prog in sed gsed; do
73018c9fbc29Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
73028c9fbc29Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
73038c9fbc29Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
73048c9fbc29Smrg      fi
73058c9fbc29Smrg    done
73068c9fbc29Smrg  done
73078c9fbc29Smrgdone
73088c9fbc29Smrglt_ac_max=0
73098c9fbc29Smrglt_ac_count=0
73108c9fbc29Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
73118c9fbc29Smrg# along with /bin/sed that truncates output.
73128c9fbc29Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
73138c9fbc29Smrg  test ! -f $lt_ac_sed && continue
73148c9fbc29Smrg  cat /dev/null > conftest.in
73158c9fbc29Smrg  lt_ac_count=0
73168c9fbc29Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
73178c9fbc29Smrg  # Check for GNU sed and select it if it is found.
73188c9fbc29Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
73198c9fbc29Smrg    lt_cv_path_SED=$lt_ac_sed
73208c9fbc29Smrg    break
73218c9fbc29Smrg  fi
73228c9fbc29Smrg  while true; do
73238c9fbc29Smrg    cat conftest.in conftest.in >conftest.tmp
73248c9fbc29Smrg    mv conftest.tmp conftest.in
73258c9fbc29Smrg    cp conftest.in conftest.nl
73268c9fbc29Smrg    echo >>conftest.nl
73278c9fbc29Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
73288c9fbc29Smrg    cmp -s conftest.out conftest.nl || break
73298c9fbc29Smrg    # 10000 chars as input seems more than enough
73308c9fbc29Smrg    test $lt_ac_count -gt 10 && break
73318c9fbc29Smrg    lt_ac_count=`expr $lt_ac_count + 1`
73328c9fbc29Smrg    if test $lt_ac_count -gt $lt_ac_max; then
73338c9fbc29Smrg      lt_ac_max=$lt_ac_count
73348c9fbc29Smrg      lt_cv_path_SED=$lt_ac_sed
73358c9fbc29Smrg    fi
73368c9fbc29Smrg  done
73378c9fbc29Smrgdone
73388c9fbc29Smrg])
73398c9fbc29SmrgSED=$lt_cv_path_SED
73408c9fbc29SmrgAC_MSG_RESULT([$SED])
73418c9fbc29Smrg])
73428c9fbc29Smrg
73438c9fbc29Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
73448c9fbc29Smrg# 
73458c9fbc29Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
73468c9fbc29Smrg#
73478c9fbc29Smrg# This program is free software; you can redistribute it and/or modify
73488c9fbc29Smrg# it under the terms of the GNU General Public License as published by
73498c9fbc29Smrg# the Free Software Foundation; either version 2 of the License, or
73508c9fbc29Smrg# (at your option) any later version.
73518c9fbc29Smrg#
73528c9fbc29Smrg# This program is distributed in the hope that it will be useful, but
73538c9fbc29Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
73548c9fbc29Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
73558c9fbc29Smrg# General Public License for more details.
73568c9fbc29Smrg#
73578c9fbc29Smrg# You should have received a copy of the GNU General Public License
73588c9fbc29Smrg# along with this program; if not, write to the Free Software
73598c9fbc29Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
73608c9fbc29Smrg#
73618c9fbc29Smrg# As a special exception to the GNU General Public License, if you
73628c9fbc29Smrg# distribute this file as part of a program that contains a
73638c9fbc29Smrg# configuration script generated by Autoconf, you may include it under
73648c9fbc29Smrg# the same distribution terms that you use for the rest of that program.
73658c9fbc29Smrg
73668c9fbc29Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
73678c9fbc29Smrg# ----------------------------------
73688c9fbc29SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
73698c9fbc29Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
73708c9fbc29Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
73718c9fbc29SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
73728c9fbc29Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
73738c9fbc29Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
73748c9fbc29Smrgfi
73758c9fbc29Smrgif test -n "$PKG_CONFIG"; then
73768c9fbc29Smrg	_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
73778c9fbc29Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
73788c9fbc29Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
73798c9fbc29Smrg		AC_MSG_RESULT([yes])
73808c9fbc29Smrg	else
73818c9fbc29Smrg		AC_MSG_RESULT([no])
73828c9fbc29Smrg		PKG_CONFIG=""
73838c9fbc29Smrg	fi
73848c9fbc29Smrg		
73858c9fbc29Smrgfi[]dnl
73868c9fbc29Smrg])# PKG_PROG_PKG_CONFIG
73878c9fbc29Smrg
73888c9fbc29Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
73898c9fbc29Smrg#
73908c9fbc29Smrg# Check to see whether a particular set of modules exists.  Similar
73918c9fbc29Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
73928c9fbc29Smrg#
73938c9fbc29Smrg#
73948c9fbc29Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
73958c9fbc29Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
73968c9fbc29Smrg# PKG_CHECK_EXISTS manually
73978c9fbc29Smrg# --------------------------------------------------------------
73988c9fbc29SmrgAC_DEFUN([PKG_CHECK_EXISTS],
73998c9fbc29Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
74008c9fbc29Smrgif test -n "$PKG_CONFIG" && \
74018c9fbc29Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
74028c9fbc29Smrg  m4_ifval([$2], [$2], [:])
74038c9fbc29Smrgm4_ifvaln([$3], [else
74048c9fbc29Smrg  $3])dnl
74058c9fbc29Smrgfi])
74068c9fbc29Smrg
74078c9fbc29Smrg
74088c9fbc29Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
74098c9fbc29Smrg# ---------------------------------------------
74108c9fbc29Smrgm4_define([_PKG_CONFIG],
74118c9fbc29Smrg[if test -n "$PKG_CONFIG"; then
74128c9fbc29Smrg        PKG_CHECK_EXISTS([$3],
74138c9fbc29Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
74148c9fbc29Smrg			 [pkg_failed=yes])
74158c9fbc29Smrgelse
74168c9fbc29Smrg	pkg_failed=untried
74178c9fbc29Smrgfi[]dnl
74188c9fbc29Smrg])# _PKG_CONFIG
74198c9fbc29Smrg
74208c9fbc29Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
74218c9fbc29Smrg# [ACTION-IF-NOT-FOUND])
74228c9fbc29Smrg#
74238c9fbc29Smrg#
74248c9fbc29Smrg# Note that if there is a possibility the first call to
74258c9fbc29Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
74268c9fbc29Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
74278c9fbc29Smrg#
74288c9fbc29Smrg#
74298c9fbc29Smrg# --------------------------------------------------------------
74308c9fbc29SmrgAC_DEFUN([PKG_CHECK_MODULES],
74318c9fbc29Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
74328c9fbc29SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
74338c9fbc29SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
74348c9fbc29Smrg
74358c9fbc29Smrgpkg_failed=no
74368c9fbc29SmrgAC_MSG_CHECKING([for $1])
74378c9fbc29Smrg
74388c9fbc29Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
74398c9fbc29Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
74408c9fbc29Smrg
74418c9fbc29Smrgif test $pkg_failed = yes; then
74428c9fbc29Smrg	$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
74438c9fbc29Smrg	# Put the nasty error message in config.log where it belongs
74448c9fbc29Smrg	echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
74458c9fbc29Smrg
74468c9fbc29Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
74478c9fbc29Smrg[Package requirements ($2) were not met.
74488c9fbc29SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
74498c9fbc29Smrginstalled software in a non-standard prefix.
74508c9fbc29Smrg
74518c9fbc29SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
74528c9fbc29Smrgto avoid the need to call pkg-config.  See the pkg-config man page for
74538c9fbc29Smrgmore details.])],
74548c9fbc29Smrg		[$4])
74558c9fbc29Smrgelif test $pkg_failed = untried; then
74568c9fbc29Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
74578c9fbc29Smrg[The pkg-config script could not be found or is too old.  Make sure it
74588c9fbc29Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
74598c9fbc29Smrgpath to pkg-config.
74608c9fbc29Smrg
74618c9fbc29SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables
74628c9fbc29Smrgto avoid the need to call pkg-config.  See the pkg-config man page for
74638c9fbc29Smrgmore details.
74648c9fbc29Smrg
74658c9fbc29SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
74668c9fbc29Smrg		[$4])
74678c9fbc29Smrgelse
74688c9fbc29Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
74698c9fbc29Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
74708c9fbc29Smrg        AC_MSG_RESULT([yes])
74718c9fbc29Smrg	ifelse([$3], , :, [$3])
74728c9fbc29Smrgfi[]dnl
74738c9fbc29Smrg])# PKG_CHECK_MODULES
74748c9fbc29Smrg
7475